idmarinas / common-bundle
Fund package maintenance!
Paypal
Githubsponsors
Installs: 447
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^8.1
- symfony/config: ^5.4 | ^6.4 | ^7.0
- symfony/console: ^5.4 | ^6.4 | ^7.0
- symfony/dependency-injection: ^5.4 | ^6.4 | ^7.0
- symfony/filesystem: ^5.4 | ^6.4 | ^7.0
Requires (Dev)
- doctrine/doctrine-bundle: ^2.13
- doctrine/orm: ^2.20
- easycorp/easyadmin-bundle: ^4.0
- fakerphp/faker: ^1.21
- gedmo/doctrine-extensions: ^3.17
- matthiasnoback/symfony-config-test: ^4.2 | ^5.0
- matthiasnoback/symfony-dependency-injection-test: ^4.2 | ^5.0 | ^6.0
- nyholm/symfony-bundle-test: ^2.0
- php-mock/php-mock-phpunit: ^2.10
- phpunit/phpunit: ^9.5
- rector/rector: ^1.2
- symfony/form: ^5.4 | ^6.4 | ^7.0
- symfony/framework-bundle: ^5.4 | ^6.4 | ^7.0
- symfony/phpunit-bridge: ^5.4
- symfony/test-pack: ^1.0
- symfony/validator: ^5.4 | ^6.4 | ^7.0
README
IDMarinas Common Bundle
This bundle is intended to group common and often repeated things when creating an APP with Symfony.
Content
Command
Reset cache of OPcache
symfony console idm:opcache:reset
Regenerate APP_SECRET
# Change var APP_SECRET in .env file symfony console idm:regenerate:app_secret # Only show value WITHOUT update .env file symfony console idm:regenerate:app_secret --show
Entity
AbstractContact
: to create a table with contact messages from the web.
Form
AbstractContactFormType
: to create form for send contact messages.
Repository
AbstractContactRepository
: repository for AbstractContact entity.
Traits
Entity
IdTrait
: add a field id in INT format
UuidTrait
: add a field uuid in UUID format
Tool
FakerTrait
: add a Faker method to use in test, fixtures...
VersionTrait
: add two methods:
- convertVersionToString converts a version like '100000000' to STRING version like '1.0.0'
- convertVersionToInt converts a version like '1.0.0' to INT version like '100000000'
Validator
Constraint
IsEven
check if value is an even value.
IsOdd
check if value is an odd value.