-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove support for PHPDriver #9277
Comments
Let me start by saying that I completely understand why wou would want to remove/delete this, when having the In my codebase, I'm having my domain code and infrastructure code separate. This means that my domain model lives in my Reading the documentation of the Whilst deprecating/removing the |
* 2.11.x: PHPStan 1.3.3, Psalm 4.18.1 Remove Psalm job for analyzing DBAL 2 Use the readonly annotation (doctrine#9340) Add support for custom types with requireSQLConversion and ResultSetMappingBuilder::generateSelectClause() PSR-6 second level cache Fix type errors in AbstractQuery and QueryBuilder (doctrine#9275) Mark columnName as always set Add support for PHP 8.1 enums. Remove ignore rules for issues fixed upstream (doctrine#9336) [doctrineGH-9277] deprecate php driver (doctrine#9309)
* 2.11.x: PHPStan 1.3.3, Psalm 4.18.1 Remove Psalm job for analyzing DBAL 2 Use the readonly annotation (doctrine#9340) Add support for custom types with requireSQLConversion and ResultSetMappingBuilder::generateSelectClause() PSR-6 second level cache Fix type errors in AbstractQuery and QueryBuilder (doctrine#9275) Mark columnName as always set Add support for PHP 8.1 enums. Remove ignore rules for issues fixed upstream (doctrine#9336) [doctrineGH-9277] deprecate php driver (doctrine#9309)
* 2.11.x: PHPStan 1.3.3, Psalm 4.18.1 Remove Psalm job for analyzing DBAL 2 Use the readonly annotation (doctrine#9340) Add support for custom types with requireSQLConversion and ResultSetMappingBuilder::generateSelectClause() PSR-6 second level cache Fix type errors in AbstractQuery and QueryBuilder (doctrine#9275) Mark columnName as always set Add support for PHP 8.1 enums. Remove ignore rules for issues fixed upstream (doctrine#9336) [doctrineGH-9277] deprecate php driver (doctrine#9309)
Just out of curiosity, cause it seems just super counterproductive to me (and even other drivers too), @darthf1 why would you want to separate mapping from entity? |
@darthf1 the alternative is to use the XML driver. |
Kind of a shame that the PHPDriver is going away. One thing it allowed was to group the mapping files into one directory while at the same time the entities could live wherever they wanted. You could organize your code by feature. And yes putting your entities in entity specific directories is the norm but it is a bit restrictive. Looking forward to ORM 3's release. Maybe some clever coder can tweak the xml mapping stuff to support php thus removing the testing burden from the core group. |
IMO StaticPHP is undoubtedly best driver of them all. Not needlessly separating definitions, allowing to use basic PHP stuff, like constant for discriminator map etc. Not needing to learn/know some new format. All round way better than anything else, just documentation sucks. :( |
Summary
We should deprecate and remove the PHPDriver, because using a magic variable
$metadata
in a file is confusing and the StaticPHPDriver offers a better API with a method on the entity. This will reduce the amount of test-code we have to maintain significantly.Users can use the
orm:convert-mapping
command in the 2.* branches to move to another mapping driver without great effort.In addition if they want to stay with programmatic metadata configuration,
StaticPHPDriver
could be used in a simple way to keep the old mapping:The text was updated successfully, but these errors were encountered: