nicolassing / sequence-bundle
Nicolassing sequence bundle allow you to create sequential number (eg reference, invoice number, ...)
Installs: 58
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ~7.1
- doctrine/doctrine-bundle: ^1.7
- doctrine/orm: ^2.5
- friendsofphp/php-cs-fixer: ^2.9
- psr/log: ^1.0
- symfony/config: ^3.3|^4.0
- symfony/debug: ^3.3|^3.0|^4.0
- symfony/dependency-injection: ^3.3|^4.0
- symfony/event-dispatcher: ^3.3|^4.0
- symfony/options-resolver: ^3.3|^4.0
- symfony/property-access: ^3.3|^4.0
- symfony/yaml: ^3.3|^4.0
Requires (Dev)
- phpunit/phpunit: ^6.0
- symfony/http-kernel: ^3.3|^4.0
This package is auto-updated.
Last update: 2024-11-20 06:13:22 UTC
README
[WIP] This bundle is under development. It's not suitable for production.
This bundle is heavily inspired by awesome Sylius Work ;)
INSTALLATION via Composer
composer require nicolassing/sequence-bundle
CONFIGURATION
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
USAGE
TESTS
If you want to run tests, please check that you have installed dev dependencies.
./vendor/bin/phpunit