-
Notifications
You must be signed in to change notification settings - Fork 43
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
Fix Doctrine\Common\Persistence deprecations #32
Conversation
06c344c
to
1cf7d64
Compare
Oops, messed up my rebase onto master and it automatically closed the PR. |
This can't be merged as is because it makes Psalm think there are $ composer update --prefer-lowest --prefer-stable
.......
$ rg 'Doctrine\\Persistence' vendor # no results
$ The options I see:
Regardless of the approach chosen we also need a way to test that stubs are actually overriding existing classes (vimeo/psalm#1252 would be very handy here). |
There might be a third option. You could release a new major version which will support Doctrine from 2.9.
Cons:
|
I think @orklah is the accepted way to do this sort of thing in most open source projects yeah? Though I think it would be a pain to maintain two versions going forward for something as basic as a namespace change. If there were drastic differences for Doctrine 2.9 it might be the way to go. Maybe we'll need to do this for Doctrine 3.0? I think I prefer the runtime check though @weirdan, surely there's a nice way we can run all tests using |
Now that doctrine/persistence 2.0 and doctrine/orm 3.0 are released, maybe we could reconsider this? @weirdan could you let us know what solution you might accept or not regarding this issue? |
With upstream major bump adding new branch to support that seems to be the best option to me. |
@weirdan does that means that this PR could be merged on master and released as a new major? |
Just ran into this as well. Can we have a new version with a fix? |
@ndench You missed a |
Thanks @ddebin I'll add that in. |
Could you rebase this? There is most likely going to be a new major version with Psalm 4 support anyway. |
1df9fc1
to
2dd8e17
Compare
Sorry for the radio silence. I've rebased this branch onto master. |
2dd8e17
to
e26fa32
Compare
I think it's the best solution:
This is already done in the phpunit plugin https://github.com/psalm/psalm-plugin-phpunit/blob/master/src/Plugin.php#L15-L17 |
There will be no Psalm 3 branches. |
The new names were introduced in doctrine/persistence@548f75f (version 1.3.0). So this could be bumped to |
Just a basic find and replace of
Doctrine\Common\Persistence
withDoctrine\Persistence
.There are two failing tests but they are unrelated and were failing before.