East Common
Create PHP application following the #East programming philosophy.
Package to provide tools to create applications (webapp, website and worker) with East Foundation. It provides management of users and media, and also provides persisting services and querying agnostical databases services (Currently support MongoDB and Doctrine ODM, but it's compliant with Doctrine DBAL and ORM or any others persisting library).
Common supports also Twig and template rendering and provides tools to help transmission of objects from recipes to views. Minify tools front assets (Javascript and CSS) without Webpack, to avoid to install NPM on full PHP environment is bundled with this package.
Common is framework free, and can be easily integrated with any PSR 7 framework. An administration panel is provided on Symfony 6.4+ and Recipe to manage any peristabled object.
A default integration to Symfony is available.
This common is built on this package with Symfony 6.4.
Features
MongoDb
All dynamics contents are stored into a MongoDb.
Symfony 6.4
Usable with Symfony 6.4+.
PSR-11
Interoperable with any framework implementing the PSR-11 recommendation.
Extendable
Thanks to Recipe, can be extendable only via the DI's configuration.
Fork the project on GitHub
It is open source! Hosted, developed, and maintained on GitHub.
View GitHub Project
Support this project on Patreon
This project is free and will remain free, but its development is not. If you like it and help us maintain it and evolve it, don't hesitate to support us on Patreon.
Support it
Example
#These operations are not required with teknoo/east-common-symfony #config/packages/di_bridge.yaml: di_bridge: compilation_path: '%kernel.project_dir%/var/cache/phpdi' definitions: - '%kernel.project_dir%/config/di.php' #config/packages/east_foundation.yaml: di_bridge: definitions: - '%kernel.project_dir%/vendor/teknoo/east-foundation/src/di.php' - '%kernel.project_dir%/vendor/teknoo/east-foundation/infrastructures/symfony/Resources/config/di.php' - '%kernel.project_dir%/vendor/teknoo/east-foundation/infrastructures/symfony/Resources/config/laminas_di.php' import: Psr\Log\LoggerInterface: 'logger' #config/packages/east_common_di.yaml: di_bridge: definitions: - '%kernel.project_dir%/vendor/teknoo/east-common/src/di.php' - '%kernel.project_dir%/vendor/teknoo/east-common/infrastructures/doctrine/di.php' - '%kernel.project_dir%/vendor/teknoo/east-common/infrastructures/symfony/Resources/config/di.php' - '%kernel.project_dir%/vendor/teknoo/east-common/infrastructures/symfony/Resources/config/laminas_di.php' - '%kernel.project_dir%/vendor/teknoo/east-common/infrastructures/di.php' import: Doctrine\Persistence\ObjectManager: 'doctrine_mongodb.odm.default_document_manager' #bundles.php ... Teknoo\DI\SymfonyBridge\DIBridgeBundle::class => ['all' => true], Teknoo\East\FoundationBundle\EastFoundationBundle::class => ['all' => true], Teknoo\East\CommonBundle\TeknooEastCommonBundle::class => ['all' => true], #In doctrine config (east_common_doctrine_mongodb.yaml) doctrine_mongodb: document_managers: default: auto_mapping: true mappings: TeknooEastCommon: type: 'xml' dir: '%kernel.project_dir%/vendor/teknoo/east-common/infrastructures/doctrine/config/universal' is_bundle: false prefix: 'Teknoo\East\Common\Object' TeknooEastCommonDoctrine: type: 'xml' dir: '%kernel.project_dir%/vendor/teknoo/east-common/infrastructures/doctrine/config/doctrine' is_bundle: false prefix: 'Teknoo\East\Common\Doctrine\Object' #In security.yaml security: #... providers: with_password: id: 'Teknoo\East\CommonBundle\Provider\PasswordAuthenticatedUserProvider' password_hashers: Teknoo\East\CommonBundle\Object\PasswordAuthenticatedUser: algorithm: '%teknoo.east.common.bundle.password_authenticated_user_provider.default_algo%' #In routes/common.yaml admin_common: resource: '@TeknooEastCommonBundle/Resources/config/admin_routing.yaml' prefix: '/admin' common: resource: '@TeknooEastCommonBundle/Resources/config/routing.yaml'