Skip to content
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

doctrine/collections phpstubs outdated/obsolete #138

Open
boesing opened this issue Feb 15, 2023 · 3 comments
Open

doctrine/collections phpstubs outdated/obsolete #138

boesing opened this issue Feb 15, 2023 · 3 comments

Comments

@boesing
Copy link

boesing commented Feb 15, 2023

Hey there,

doctrine/collection started to introduce generics and stuff.
I actually get some issues from this doctrine plugin as it overrides the non-stub types.

I'll have a look into this when I find some time, just want to raise the issue to keep track of it.

Thanks.


Refs:

doctrine/collections v1.7.0

https://github.com/doctrine/collections/blob/07d15c8a766e664ec271ae84e5dfc597aeeb03b1/lib/Doctrine/Common/Collections/Collection.php#L27-L30

https://github.com/doctrine/collections/blob/07d15c8a766e664ec271ae84e5dfc597aeeb03b1/lib/Doctrine/Common/Collections/Selectable.php#L17-L18

@weirdan
Copy link
Member

weirdan commented Feb 15, 2023

Good, that's how it was intended from the very beginning of this plugin, back when doctrine maintainers were not as receptive to static analysis as they are now.

doctrine/collection started to introduce generics and stuff.

... about 4 years ago actually (in doctrine/collections#177)

We used to have version checks for doctrine/collections, it shouldn't be too hard to selectively disable some stubs using

private function hasPackageOfVersion(string $packageName, string $constraints): bool

@kjacquesmashbo
Copy link

This is also causing issue for me.

I see this commit: 2.x...disable-collection-stub

Are there any plans to merge this?

@orklah
Copy link
Collaborator

orklah commented Apr 11, 2023

We're very short staffed and none of the maintainers actually uses Doctrine these days so we rely on contributors for improving this plugin. If you have some time to spare, you could try making a PR from that to see how the CI reacts :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants