Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@
###> kocal/biome-js-bundle
bin/biome
###< kocal/biome-js-bundle

###> misc ###
.opencode/
###< misc ###
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-)
Expand Down Expand Up @@ -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)
Expand Down
64 changes: 64 additions & 0 deletions agents/remove-doctrine.md
Original file line number Diff line number Diff line change
@@ -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
Comment thread
COil marked this conversation as resolved.


## 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