laravel-notification-channels / smsc-ru Goto Github PK
View Code? Open in Web Editor NEWsmsc.ru notifications channel for Laravel 5.3+
Home Page: http://laravel-notification-channels.com/
License: MIT License
smsc.ru notifications channel for Laravel 5.3+
Home Page: http://laravel-notification-channels.com/
License: MIT License
I can't update my project to Laravel 11.x and PHP 8.3 because Composer throws an error when installing "laravel-notification-channels/smsc-ru."
Could you please add support for Laravel 11?
Your requirements could not be resolved to an installable set of packages.
Problem 1
- illuminate/support[v5.6.0, ..., 5.8.x-dev] require php ^7.1.3 -> your php version (8.3; overridden via config.platform, actual: 8.3.10) does not satisfy that requirement.
- illuminate/support[v6.0.0, ..., v6.19.1] require php ^7.2 -> your php version (8.3; overridden via config.platform, actual: 8.3.10) does not satisfy that requirement.
- illuminate/support[v7.0.0, ..., v7.28.4] require php ^7.2.5 -> your php version (8.3; overridden via config.platform, actual: 8.3.10) does not satisfy that requirement.
- illuminate/support[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.3; overridden via config.platform, actual: 8.3.10) does not satisfy that requirement.
- Root composer.json requires laravel-notification-channels/smsc-ru ^3.4 -> satisfiable by laravel-notification-channels/smsc-ru[v3.4.0].
- Conclusion: don't install laravel/framework v11.20.0 (conflict analysis result)
- laravel-notification-channels/smsc-ru v3.4.0 requires illuminate/support 5.1 - 5.8|^6.0|^7.0|^8.0|^9.0|^10.0 -> satisfiable by illuminate/support[v5.1.1, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev, v10.0.0, ..., 10.x-dev].
- Only one of these can be installed: illuminate/support[v5.1.1, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev, v10.0.0, ..., 10.x-dev, v11.0.0, ..., 11.x-dev], laravel/framework[v11.20.0, 11.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
- Root composer.json requires laravel/framework ^11.20 -> satisfiable by laravel/framework[v11.20.0, 11.x-dev].
add support for new 5.6 version laravel
Problem 1
- laravel-notification-channels/smsc-ru v1.1.3 requires illuminate/support 5.1.*|5.2.*|5.3.*|5.4.*|5.5.* -> satisfiable by laravel/framework[v5.5.34], illuminate/support[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34].
- laravel-notification-channels/smsc-ru v1.1.2 requires illuminate/support 5.1.*|5.2.*|5.3.*|5.4.*|5.5.* -> satisfiable by laravel/framework[v5.5.34], illuminate/support[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34].
- laravel-notification-channels/smsc-ru v1.1.3 requires illuminate/support 5.1.*|5.2.*|5.3.*|5.4.*|5.5.* -> satisfiable by laravel/framework[v5.5.34], illuminate/support[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34].
- laravel-notification-channels/smsc-ru v1.1.0 requires illuminate/queue 5.1.*|5.2.*|5.3.*|5.4.* -> satisfiable by illuminate/queue[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9].
- laravel-notification-channels/smsc-ru v1.1.1 requires illuminate/queue 5.1.*|5.2.*|5.3.*|5.4.* -> satisfiable by illuminate/queue[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9].
.....
- Installation request for laravel/framework 5.6.* -> satisfiable by laravel/framework[v5.6.0].
- Installation request for laravel-notification-channels/smsc-ru ^1.1 -> satisfiable by laravel-notification-channels/smsc-ru[v1.1.0, v1.1.1, v1.1.2, v1.1.3].
NotificationChannels \ SmscRu \ Exceptions \ CouldNotSendNotification
Notification was not sent. Phone number is missing.
Hi, maybe move the setting apiUrl
from file SmscRuApi.php
protected $apiUrl = 'https://smsc.ru/sys/send.php';
in the configuration file config/services.php
. Example:
// config/services.php
...
'smscru' => [
'url' => env('SMSCRU_URL'),
'login' => env('SMSCRU_LOGIN'),
'secret' => env('SMSCRU_SECRET'),
'sender' => 'John_Doe'
],
...
I need to change only the address smsc.ru
to smsc.kz
. This services identical. Thank.
Please update the repository to php 8
It happens that you need to directly specify the recipient in the message object. (For example, a similar functionality is in the library for working with Firebase Cloud Messaging). This is necessary when we work with AnonymousNotifiable.
If I return null
, an empty string or an empty array from the routeNotificationForSmscru
method of a Notifiable, I get a CouldNotSendNotification
exception. I think this is incorrect because all the built-in Laravel channels just do nothing if no recipient is set (examples: 1, 2, 3).
To workaround it I have to do the following in my notification classes:
public function via($notifiable)
{
if ($notifiable->routeNotificationFor('smscru', $this)) {
return [SmscRuChannel::class];
} else {
return [];
}
}
There is one more problem. Notifications objects are not passed to the routeNotificationForSmscru
method so I can't decide what number to send an SMS to depending on the notification class or object.
Also it would be great if I can return either a string or an array of phone numbers from routeNotificationForSmscru
method. I know I can return multiple phones in a single string separating them by comma, but the array would be a more convenient and Laravel-style way.
If you agree, I can implement all the features and make a pull request.
The documentation says so routeNotificationForSmscRu, but to work it is necessary to write routeNotificationForSmscru
Если передать пустой параметр login, psw, sender
значения по умолчанию будут перезаписаны на пустые.
В метод send прилетает массив параметров:
Array
(
[phones] => +78008835651
[mes] => Код подтверждения: 92899. Используйте его, чтобы войти.
[sender] =>
)
Есть $base
который содержит базовый набор параметров, также содержит sender
, который берется из настроек.
При выполнении $params = array_merge($base, $params);
где $params['sender'] === ''
(пустая строка) происходит смещение и базовый параметр sender
перезаписываться на пустое значение.
Так как в NotificationChannels\SmscRu\SmscRuMessage
свойство $from
пустая строка, то базовое значение всегда перезаписывается на пустое, если явно не указать в массиве $params
.
Laravel 8 has been released today and we need to update this repo to support it.
See https://laravel.com/docs/8.x/upgrade & laravel-notification-channels/channels#107
Error in "src/Exceptions/CouldNotSendNotification.php" at 48 line
return new static( "The communication with smsc.ru failed. Reason: {$exception->getMessage()}". $exception->getCode(), $exception );
Line must be ended by comma.
return new static( "The communication with smsc.ru failed. Reason: {$exception->getMessage()}", $exception->getCode(), $exception );
SmscRuMessage
переданное значения from
не меняется при отправке сообщения.
The test seems to fail for all environment expect lowest on PHP 7.
Could you fix this?
https://travis-ci.org/laravel-notification-channels/smsc-ru/builds/152038732
Let me know when your package is ready. I'll do a review of the code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.