{"id":15045090,"url":"https://github.com/scaytrase/symfony-sms-interface","last_synced_at":"2025-10-25T00:31:42.158Z","repository":{"id":18214303,"uuid":"21350893","full_name":"scaytrase/symfony-sms-interface","owner":"scaytrase","description":"SMS Sender service","archived":false,"fork":false,"pushed_at":"2017-03-29T09:02:02.000Z","size":99,"stargazers_count":5,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T00:33:06.151Z","etag":null,"topics":["php","sms","symfony-bundle","symony","transport"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scaytrase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-30T12:51:33.000Z","updated_at":"2017-09-24T14:25:59.000Z","dependencies_parsed_at":"2022-09-14T13:52:51.229Z","dependency_job_id":null,"html_url":"https://github.com/scaytrase/symfony-sms-interface","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaytrase%2Fsymfony-sms-interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaytrase%2Fsymfony-sms-interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaytrase%2Fsymfony-sms-interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaytrase%2Fsymfony-sms-interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scaytrase","download_url":"https://codeload.github.com/scaytrase/symfony-sms-interface/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238053514,"owners_count":19408699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","sms","symfony-bundle","symony","transport"],"created_at":"2024-09-24T20:51:26.733Z","updated_at":"2025-10-25T00:31:37.821Z","avatar_url":"https://github.com/scaytrase.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scaytrase/symfony-sms-delivery-bundle\n[![Latest Stable Version](https://poser.pugx.org/scaytrase/symfony-sms-interface/v/stable.svg)](https://packagist.org/packages/scaytrase/symfony-sms-interface)\n[![Total Downloads](https://poser.pugx.org/scaytrase/symfony-sms-interface/downloads.svg)](https://packagist.org/packages/scaytrase/symfony-sms-interface)\n[![Latest Unstable Version](https://poser.pugx.org/scaytrase/symfony-sms-interface/v/unstable.svg)](https://packagist.org/packages/scaytrase/symfony-sms-interface)\n[![License](https://poser.pugx.org/scaytrase/symfony-sms-interface/license.svg)](https://packagist.org/packages/scaytrase/symfony-sms-interface)\n\n[![Monthly Downloads](https://poser.pugx.org/scaytrase/symfony-sms-interface/d/monthly.png)](https://packagist.org/packages/scaytrase/symfony-sms-interface)\n[![Daily Downloads](https://poser.pugx.org/scaytrase/symfony-sms-interface/d/daily.png)](https://packagist.org/packages/scaytrase/symfony-sms-interface)\n\nThis Symfony bundle provides basic service for sending short messages. This bundle does not provide you any finished\nimplementation for communicating the SMS gateway. To use it you have use some transport implementation or\nimplement a transport on your own. See [usage section](#usage) for known implementations\n\n## Features\n\n### Current features\n\n- [x] Service and configurable transports\n- [x] Ability to disable delivery via config for testing purposes\n- [x] Ability to force redirect messages for testing purposes\n- [x] Profiling via Sf2 Toolbar\n- [x] Spooling and delayed sending\n\n### Planned features\n\n- [ ] Bulk sending\n\n## Installation\n\nThis bunde could be installed via Composer\n\n```\ncomposer require scaytrase/symfony-sms-delivery-bundle:~2.0\n```\n\n### app/AppKernel.php\n\nupdate your kernel bundle requirements as follows:\n\n```php \n$bundles = array(\n    //....\n    new ScayTrase\\SmsDeliveryBundle\\SmsDeliveryBundle(),\n    //....\n    );\n```\n\n## Configuration\n\nBelow is the configuration example and their default values\n\n```yaml\nsms_delivery:\n    spool: sms_delivery.spool.instant\n    transport: sms_delivery.dummy_sender # @id of the transport service \n    disable_delivery: false # disable delivery overrides spool with disabled spool\n    delivery_recipient: null # delivery recipient overrides recipient when sending\n```\n\n## Usage\n\nTo use this interface you must create a message class implementing  ``ShortMessageInterface`` and create the implementation of the\n``TransportInterface`` that delivers your message to end point sms gateway.\nYou can refer my [WebSMS](https://github.com/scaytrase/symfony-websms-bundle) gateway implementation as a reference.\n \n \n### Example\n\n```php\nclass MyMessage implements ShortMessageInterface { /*...*/ }\n\nclass SmsController extends Controller {\n\n  public function sendSmsAction()\n  {\n    $message = new MyMessage('5552368','Help!')\n    $sender = $this-\u003eget('sms_delivery.sender');\n    $sender-\u003espoolMessage($message);\n    $result = $sender-\u003eflush();\n    return new Response('Delivery '. $result ? 'successful' : 'failed');\n  }\n}\n```\n\n\n### Standalone usage\n\nDespite of the fact that this library is designed as Symfony bundle it could be used as standalone library for sending\nshort messages. You should just instantiate sender service on your own.\n\n```php\n\n    class MyProviderSmsTransport implements TransportInterface { /*...*/ }\n\n    class MyMessage implements ShortMessageInterface { /*...*/ }\n\n    $transport = new MyProviderSmsTransport();\n    $sender = new MessageDeliveryService($transport);\n    $sender-\u003espoolMessage(new MyMessage('Message body'));\n    $sender-\u003eflush(); // Default InstantSpool does not actually needs flushing but you can use another spool instead\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaytrase%2Fsymfony-sms-interface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscaytrase%2Fsymfony-sms-interface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaytrase%2Fsymfony-sms-interface/lists"}