[WIP] This bundle is under development. It's not suitable for production.
This bundle is heavily inspired by awesome Sylius Work ;)
composer require nicolassing/sequence-bundle
Register the bundle:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Nicolassing\SequenceBundle\NicolassingSequenceBundle(),
);
// ...
}
Create your Sequence class:
<?php
// src/AppBundle/Entity/Sequence.php
namespace AppBundle\Entity;
use Nicolassing\SequenceBundle\Model\Sequence as BaseSequence;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="sequence")
*/
class Sequence extends BaseSequence
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
}
Configure the bundle:
# app/config/config.yml
nicolassing_sequence:
sequence_class: AppBundle\Entity\Sequence
If you want to run tests, please check that you have installed dev dependencies.
./vendor/bin/phpunit