wouterj / eloquent-bundle
Implementing the Eloquent ORM into Symfony
Installs: 121 809
Dependents: 2
Suggesters: 0
Security: 0
Stars: 167
Watchers: 7
Forks: 41
Type:symfony-bundle
Requires
- php: ^8.0
- illuminate/console: ^9.39 || ^10.0 || ^11.0
- illuminate/database: ^9.0 || ^10.0 || ^11.0
- illuminate/events: ^9.0 || ^10.0 || ^11.0
- jdorn/sql-formatter: ^1.2.17
- laravel/serializable-closure: ^1.0
- symfony/dependency-injection: ^6.0 || ^7.0
- symfony/framework-bundle: ^6.0 || ^7.0
Requires (Dev)
- doctrine/annotations: 1.*
- mockery/mockery: ^1.6
- psalm/plugin-symfony: ^5.0
- symfony/browser-kit: ^6.0 || ^7.0
- symfony/console: ^6.0 || ^7.0
- symfony/dom-crawler: ^6.0 || ^7.0
- symfony/event-dispatcher: ^6.0 || ^7.0
- symfony/finder: ^6.0 || ^7.0
- symfony/form: ^6.0 || ^7.0
- symfony/http-kernel: ^6.0 || ^7.0
- symfony/maker-bundle: ^1.49
- symfony/phpunit-bridge: ^6.0 || ^7.0
- symfony/process: ^6.0 || ^7.0
- symfony/security-bundle: ^6.0 || ^7.0
- symfony/twig-bridge: ^6.0 || ^7.0
- symfony/twig-bundle: ^6.0 || ^7.0
- symfony/validator: ^6.0 || ^7.0
- symfony/var-dumper: ^6.0 || ^7.0
- symfony/yaml: ^6.0 || ^7.0
- twig/twig: ^2.0 || ^3.0
- vimeo/psalm: ^5.0
Conflicts
- nesbot/carbon: <2.63
README
The WouterJEloquentBundle claims to integrate the Eloquent ORM into the Symfony framework.
Maintained Releases
Only the latest release of this bundle is maintained. Backwards compatible support for new versions of PHP, Symfony and Laravel are considered bug fixes. Dropping support for old versions is considered a feature.
New releases will be made as much as once a week following semantic versioning. The default branch (2.x) will be released as minor or patch version, depending on the changes with the last release (features or only bug fixes).
Installation
Step 1: Download the Bundle
Open a command console, enter your project directory and run the following command to download the latest stable version of this bundle:
$ composer require wouterj/eloquent-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
When you want to use useful make commands (e.g. make:model
), also
make sure you have the Symfony MakerBundle installed.
Step 2: Enable the Bundle
If you're using Symfony Flex, the previous step already got you up and running and you can skip this step!
Otherwise, enable the bundle by adding it to the list of registered
bundles in the app/AppKernel.php
file of your project:
<?php // config/bundles.php return [ // ... WouterJ\EloquentBundle\WouterJEloquentBundle::class => ['all' => true], ];
Step 3: Configure the Database
To use the Eloquent ORM, configure a connection by setting the correct
environment variables in .env.local
:
# .env.local DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=symfony DB_USERNAME=root DB_PASSWORD=s3cr3t
If you're not using Symfony Flex, create the configuration file yourself:
# config/packages/eloquent.yaml wouterj_eloquent: driver: mysql host: localhost database: db_name username: root password: pass prefix: ~
For more information, refer to the documentation below.
Table of Content
- Installation
- Usage
- Migrations and Seeding
- Using Models in Forms
- Using the Eloquent User Provider
- Events and Observers
- Configuration
- License
- Contributing
- Backwards Compatibility
License
This project is licensed under the MIT license. For more information, see the license file included in this bundle.
Contributing
I love contributors. You can submit fixes, report bugs, share your opinion, advocate this bundle or just say "hello". I welcome anything that makes this project better.