PHPackages                             serwersms/serwersmsbundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. serwersms/serwersmsbundle

ActiveSymfony-bundle[API Development](/categories/api)

serwersms/serwersmsbundle
=========================

This is a Symfony2,3,4 Bundle for communication with the API v2 SerwerSMS.pl

1.0.3(6y ago)212.2k6[1 issues](https://github.com/SerwerSMSpl/serwersms-symfony-bundle/issues)[1 PRs](https://github.com/SerwerSMSpl/serwersms-symfony-bundle/pulls)MITPHPPHP &gt;=5.3.9

Since May 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/SerwerSMSpl/serwersms-symfony-bundle)[ Packagist](https://packagist.org/packages/serwersms/serwersmsbundle)[ Docs](https://serwersms.pl/)[ RSS](/packages/serwersms-serwersmsbundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

SerwerSMSBundle - Symfony
=========================

[](#serwersmsbundle---symfony)

Klient PHP dla frameworka Symfony (ver 2,3,4) do komunikacji zdalnej z API v2 SerwerSMS.pl

Zalecane jest, aby komunikacja przez HTTPS API odbywała się z loginów utworzonych specjalnie do połączenia przez API. Konto użytkownika API można utworzyć w Panelu Klienta → Ustawienia interfejsów → HTTP API → Użytkownicy API.

Instalacja
----------

[](#instalacja)

Instalacja odbywa się poprzez composer i dodanie do pliku composer.json poniższego kodu:

```
	{
        "require": {
            "serwersms/serwersmsbundle" : "1.0.3"
        }

    }
```

Wysyłka SMS Symfony 4
---------------------

[](#wysyłka-sms-symfony-4)

\#service.yml:

```
	parameters:
	    serwer_sms_username: "username"
	    serwer_sms_password: "password"
	    serwer_sms_api_url: "https://api2.serwersms.pl/"
	    serwer_sms_format: "json"

```

Controller:

```
    namespace App\Controller;
    use SerwerSMS\SerwerSMSBundle\SerwerSMS\SerwerSMS;
    use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

    class TestController  extends AbstractController
    {
        public function index(SerwerSMS $serwersms)
        {
            try{

            	  $result = $serwersms->messages->sendSms(
        	            array(
        	                    '+48500600700',
        	                    '+48600700800'
        	            ),
        	            'Test FULL message',
        	            'INFORMACJA',
        	            array(
        	                    'test' => true,
        	                    'details' => true
        	            )
        	    );

                die(var_dump($result));

            } catch(Exception $e){
    	        echo 'ERROR: '.$e->getMessage();
    	    }
        }
    }
```

Wysyłka SMS Symfony 2,3
-----------------------

[](#wysyłka-sms-symfony-23)

AppKernel.php:

```
	class AppKernel extends Kernel
	{
	    public function registerBundles()
	    {
	        $bundles = array(
	            ...
	            new SerwerSMS\SerwerSMSBundle\SerwerSMSBundle(),
	        );

	        ...

	        return $bundles;
	    }
	}
```

config.php:

```
	parameters:
	    serwer_sms_username: "username"
	    serwer_sms_password: "password"
	    serwer_sms_api_url: "https://api2.serwersms.pl/"
	    serwer_sms_format: "json"
```

App:

```
	try{

	  $serwersms = $this->get('serwer_sms');

	  // SMS FULL
	  $result = $serwersms->messages->sendSms(
	            array(
	                    '+48500600700',
	                    '+48600700800'
	            ),
	            'Test FULL message',
	            'INFORMACJA',
	            array(
	                    'test' => true,
	                    'details' => true
	            )
	  );

	  // SMS ECO
	  $result = $serwersms->messages->sendSms(
	            array(
	                    '+48500600700',
	                    '+48600700800'
	            ),
	            'Test ECO message',
	            null,
	            array(
	                    'test' => true,
	                    'details' => true
	            )
	  );

	  // VOICE from text
	  $result = $serwersms->messages->sendVoice(
	            array(
	                    '+48500600700',
	                    '+48600700800'
	            ),
	            array(
	                    'text' => 'Test message',
	                    'test' => true,
	                    'details' => true
	            )
	  );

	  // MMS
	  $list = $serwersms->files->index('mms');
	  $result = $serwersms->messages->sendMms(
	            array(
	                    '+48500600700',
	                    '+48600700800'
	            ),
	            'MMS Title',
	            array(
	                    'test' => true,
	                    'file_id' => $list->items[0]->id,
	                    'details' => true
	            )
	  );

	  echo 'Skolejkowano: '.$result->queued.'';
	  echo 'Niewysłano: '.$result->unsent.'';

	  foreach($result->items as $sms){

	        echo 'ID: '.$sms->id.'';
	        echo 'NUMER: '.$sms->phone.'';
	        echo 'STATUS: '.$sms->status.'';
	        echo 'CZĘŚCI: '.$sms->parts.'';
	        echo 'WIADOMOŚĆ: '.$sms->text.'';

	  }

	} catch(Exception $e){
	    echo 'ERROR: '.$e->getMessage();
	}
```

Wysyłka spersonalizowanych SMS

```
	try{

	  $serwersms = $this->get('serwer_sms');

	  $messages[] = array(
	      'phone' => '500600700',
	      'text' => 'First message'
	  );
	  $messages[] = array(
	      'phone' => '600700800',
	      'text' => 'Second message'
	  );

	  $result = $serwersms->messages->sendPersonalized(
	            $messages,
	            'INFORMACJA',
	            array(
	                    'test' => true,
	                    'details' => true
	            )
	  );

	  echo 'Skolejkowano: '.$result->queued.'';
	  echo 'Niewysłano: '.$result->unsent.'';

	  foreach($result->items as $sms){

	        echo 'ID: '.$sms->id.'';
	        echo 'NUMER: '.$sms->phone.'';
	        echo 'STATUS: '.$sms->status.'';
	        echo 'CZĘŚCI: '.$sms->parts.'';
	        echo 'WIADOMOŚĆ: '.$sms->text.'';

	  }

	} catch(Exception $e){
	    echo 'ERROR: '.$e->getMessage();
	}
```

Pobieranie raportów doręczeń

```
	try{

    	  $serwersms = $this->get('serwer_sms');

    	  // Get messages reports
    	  $result = $serwersms->messages->reports(array('id' => array('aca3944055')));

    	  foreach($result->items as $sms){

    	        echo 'ID: '.$sms->id.'';
    	        echo 'NUMER: '.$sms->phone.'';
    	        echo 'STATUS: '.$sms->status.'';
    	        echo 'SKOLEJKOWANO: '.$sms->queued.'';
    	        echo 'WYSŁANO: '.$sms->sent.'';
    	        echo 'DORĘCZONO: '.$sms->delivered.'';
    	        echo 'NADAWCA: '.$sms->sender.'';
    	        echo 'TYP: '.$sms->type.'';
    	        echo 'WIADOMOŚĆ: '.$sms->text.'';

    	  }

	} catch(Exception $e){
	    echo 'ERROR: '.$e->getMessage();
	}
```

Pobieranie wiadomości przychodzących

```
	try{
    	  $serwersms = $this->get('serwer_sms');

    	  // Get recived messages
    	  $result = $serwersms->messages->recived('ndi');

    	  foreach($result->items as $sms){

    	        echo 'ID: '.$sms->id.'';
    	        echo 'TYP: '.$sms->type.'';
    	        echo 'NUMER: '.$sms->phone.'';
    	        echo 'DATA: '.$sms->recived.'';
    	        echo 'CZARNA LISTA: '.$sms->blacklist.'';
    	        echo 'WIADOMOŚĆ: '.$sms->text.'';

    	  }

	} catch(Exception $e){
	    echo 'ERROR: '.$e->getMessage();
	}
```

Wymagania
---------

[](#wymagania)

php &gt;= 5.3.9

symfony &gt;= 2.7.\*

Dokumentacja
------------

[](#dokumentacja)

Konsola API

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

2

Last Release

2542d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/635e49d7360c710e89db0936e781e747f34342609d7d29a05eb060a78bb556bb?d=identicon)[SerwerSMSpl](/maintainers/SerwerSMSpl)

---

Top Contributors

[![SerwerSMSpl](https://avatars.githubusercontent.com/u/7964146?v=4)](https://github.com/SerwerSMSpl "SerwerSMSpl (16 commits)")

---

Tags

smsserwersmsapi sms

### Embed Badge

![Health badge](/badges/serwersms-serwersmsbundle/health.svg)

```
[![Health](https://phpackages.com/badges/serwersms-serwersmsbundle/health.svg)](https://phpackages.com/packages/serwersms-serwersmsbundle)
```

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[aloha/twilio

Twilio API for Laravel

4733.6M5](/packages/aloha-twilio)[plivo/plivo-php

A PHP SDK to make voice calls &amp; send SMS using Plivo and to generate Plivo XML

1102.8M18](/packages/plivo-plivo-php)[plivo/php-sdk

A PHP SDK to make voice calls &amp; send SMS using Plivo and to generate Plivo XML

1101.9M5](/packages/plivo-php-sdk)[smsapi/php-client

SMSAPI API PHP Client

652.1M17](/packages/smsapi-php-client)[africastalking/africastalking

Official Africa's Talking PHP SDK

122557.6k10](/packages/africastalking-africastalking)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
