PHPackages                             mocean/symfony-mocean-bundle - 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. [Framework](/categories/framework)
4. /
5. mocean/symfony-mocean-bundle

ActiveLibrary[Framework](/categories/framework)

mocean/symfony-mocean-bundle
============================

Mocean API for Symfony Framework

v2.0.0(6y ago)09[1 PRs](https://github.com/MoceanAPI/symfony-mocean-bundle/pulls)MITPHP

Since Dec 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/MoceanAPI/symfony-mocean-bundle)[ Packagist](https://packagist.org/packages/mocean/symfony-mocean-bundle)[ RSS](/packages/mocean-symfony-mocean-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (4)Used By (0)

Symfony Mocean
==============

[](#symfony-mocean)

[![Latest Stable Version](https://camo.githubusercontent.com/6b209206cb4e43999240a97839ab47e7a3749288f57bc5cb52acb15ccea94d25/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f6365616e2f73796d666f6e792d6d6f6365616e2d62756e646c652e737667)](https://packagist.org/packages/mocean/symfony-mocean-bundle)[![Build Status](https://camo.githubusercontent.com/eaac2722b7a1a1bbba5da2bb5ff240fdf202bf697f8067b05c0dbefbabaac33b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f4d6f6365616e4150492f73796d666f6e792d6d6f6365616e2d62756e646c652e737667)](https://travis-ci.com/MoceanAPI/symfony-mocean-bundle)[![StyleCI](https://camo.githubusercontent.com/28a7896d93e74e077112ba831c87f5bbf785a977225479ed3d5655dbf80b7951/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3136313734363538352f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/161746585)[![License](https://camo.githubusercontent.com/4e00c4c930f77ad22f6d67332264bf1f135f9c038715e51a422f4728c5b09eae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d6f6365616e2f73796d666f6e792d6d6f6365616e2d62756e646c652e737667)](https://packagist.org/packages/mocean/symfony-mocean-bundle)[![Total Downloads](https://camo.githubusercontent.com/a6ebcb8e3437e96873fd90770e472266d2305f47aefb1545f5ed67ad9367c909/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f6365616e2f73796d666f6e792d6d6f6365616e2d62756e646c652e737667)](https://packagist.org/packages/mocean/symfony-mocean-bundle)

Symfony Mocean API Integration

Installation
------------

[](#installation)

To install the library, run this command in terminal:

```
composer require mocean/symfony-mocean-bundle
```

Add this to config.yml

```
mocean:
  defaults: main    # define the account to use here
  accounts:         # here is where you define multiple accounts
    main:
      api_key: mainAccountApiKey
      api_secret: mainAccountApiSecret
    secondary:
      api_key: secondaryAccountApiKey
      api_secret: secondaryAccountApiSecret
```

### Symfony 4

[](#symfony-4)

Add the bundle to `config/bundles.php`

```
return [
    //... framework bundles
    MoceanSymBundle\MoceanBundle::class => ['all' => true],
];
```

### Symfony 3

[](#symfony-3)

Add the bundle to `app/AppKernel.php`

```
$bundles = array(
    //... framework bundles
    new MoceanSymBundle\MoceanBundle(),
);
```

Usage
-----

[](#usage)

Usage through dependency injection (symfony 4 and above)

Bind mocean manager class in service yaml

```
# config/services.yaml

services:
  App\Controller\YourController:
    bind:
      $mocean: '@mocean_manager'
```

Using autowiring

```
# config/services.yaml

services:
  MoceanSymBundle\Services\MoceanManager: '@mocean_manager'
```

In controller

```
class YourController extends AbstractController
{
    /**
     * @Route("/")
     */
    public function index(MoceanSymBundle\Services\MoceanManager $mocean)
    {
        $res = $mocean->message()->send([
            'mocean-to' => '60123456789',
            'mocean-from' => 'MOCEAN',
            'mocean-text' => 'Hello World'
        ]);
    }
}
```

Usage through container

```
class YourController extends Controller
{
    /**
     * @Route("/")
     */
    public function index()
    {
        $mocean = $this->container->get('mocean_manager');
        $res = $mocean->message()->send(...);
    }
}
```

The above example will be using the account define in defaults.
If you have multiple account defined in config, you can use like this

```
$mocean->using('secondary')->message()->send(...);
$mocean->using('third')->message()->send(...);
```

License
-------

[](#license)

Laravel Mocean is licensed under the [MIT License](LICENSE)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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 ~192 days

Total

2

Last Release

2512d ago

Major Versions

v1.0.0 → v2.0.02019-06-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/acc98571adfb81af696cf57565b5e27b22a46ca4a4f360d5209271fd8bed9ba7?d=identicon)[MoceanAPI](/maintainers/MoceanAPI)

![](https://www.gravatar.com/avatar/aca461123c7542f69d0c14b646c4e16b5f2001e182784f53d76f9978abbb44e2?d=identicon)[lkloon123](/maintainers/lkloon123)

---

Top Contributors

[![lkloon123](https://avatars.githubusercontent.com/u/21114981?v=4)](https://github.com/lkloon123 "lkloon123 (10 commits)")

---

Tags

moceanmoceanapismssymfonysymfonyframeworkverifysmsmocean

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mocean-symfony-mocean-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/mocean-symfony-mocean-bundle/health.svg)](https://phpackages.com/packages/mocean-symfony-mocean-bundle)
```

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[dragon-code/support

Support package is a collection of helpers and tools for any project.

238.7M101](/packages/dragon-code-support)[lagdo/symfony-facades

Call Symfony services using facades.

1868.7k](/packages/lagdo-symfony-facades)[bartacus/bartacus-bundle

Integrates the Symfony full-stack framework into TYPO3

1346.3k3](/packages/bartacus-bartacus-bundle)

PHPackages © 2026

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