diff --git a/.gitignore b/.gitignore index 29d5022..6088a2d 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,7 @@ ###> kocal/biome-js-bundle bin/biome ###< kocal/biome-js-bundle + +###> misc ### +.opencode/ +###< misc ### diff --git a/README.md b/README.md index e5777ba..5d883f1 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ opencode --prompt agents/downgrade-to-symfony-7-4-LTS.md * [Stack](#stack-) * [Features](#features-) * [Feature branches](#feature-branches-) + * [Minimalistic-versions](#minimalistic-versions) * [Infrastructure](#infrastructure) * [Database](#database-) * [Tooling](#tooling-) @@ -183,6 +184,12 @@ For example, have you ever dreamed of testing [Eloquent](https://laravel.com/doc the Laravel ORM, on a Symfony project? Then clone the `eloquent` branch and run `composer install && make load-fixtures`. + +### Minimalistic versions + +* Doctrine less ([PR](https://github.com/strangebuzz/MicroSymfony/pull/222), [branch](https://github.com/strangebuzz/MicroSymfony/tree/doctrine-less), rebased on 2026-01-17) + + ### Infrastructure * Symfony-docker ([PR](https://github.com/strangebuzz/MicroSymfony/pull/98), [branch](https://github.com/strangebuzz/MicroSymfony/tree/symfony-docker), rebased on 2024-11-17) diff --git a/agents/remove-doctrine.md b/agents/remove-doctrine.md new file mode 100644 index 0000000..6d61bdd --- /dev/null +++ b/agents/remove-doctrine.md @@ -0,0 +1,64 @@ +# Remove Doctrine from MicroSymfony + +Welcome AI agent! + +In order to keep MicroSymfony dependencies light, follow the next steps to remove +Doctrine from MicroSymfony. + +To verify what has to be removed and modified, you can have a look at the original +PR adding Doctrine: https://github.com/strangebuzz/MicroSymfony/pull/219/changes + + +## composer.json + +In the `composer.json` file: + +* remove `doctrine/dbal` +* remove `doctrine/orm` +* remove `doctrine/doctrine-bundle` +* remove `doctrine/doctrine-migrations-bundle` +* remove `zenstruck/foundry` and the ending comma from the line above + +## In the `config/` directory + +* Remove the `config/packages/doctrine.php` file +* Remove the `config/packages/doctrine_migrations.php` file +* Remove the `config/packages/zenstruck_foundry.php` file + +## In the `src/` directory + +* Remove the `src/Controller/ListUsersAction.php` file +* Remove the `src/Entity/User.php` file +* Remove the `src/Factory/UserFactory.php` file +* Remove the `src/Repository/UserRepository.php` file +* Remove the `src/Story/AppStory.php` file + +## In the `templates/` directory + +* Remove the `templates/App/Controller/ListUsersAction.html.twig` file +* In the `templates/base.html.twig` file remove the line referencing the `ListUsersAction` controller + +## In the `tests/` directory + +* Remove the `tests/Functional/Controller/ListUsersActionTest.php` file +* Remove the `tests/Integration/Entity/UserTest.php` file +* Remove the `tests/Unit/Entity/UserTest.php` file + +## Other files + +* Remove the `migrations/Version20260117053612.php` file +* Remove the `var/data.db` file +* In the `.env` file remove the section related to Doctrine +* In the `phpunit.xml.dist` file remove the `Zenstruck` extension +* In the `Makefile` file, remove all targets related to Doctrine +* In the `castor.php` file, remove all functions related to Doctrine + +## Composer update + +* Run `make fix-php` to fix the modified PHP code +* Run `composer update` and verify that it completes without errors and that no + dependency conflicts are reported. + +## Checks + +* Ensure that `make ci` run without any error