Skip to content

Add a bunch of stubs #72

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

Merged
merged 1 commit into from
Jan 22, 2020
Merged

Add a bunch of stubs #72

merged 1 commit into from
Jan 22, 2020

Conversation

dbrekelmans
Copy link
Contributor

@dbrekelmans dbrekelmans commented Jan 20, 2020

Mostly adding array<mixed> where symfony documents array (phpstan will complain about this on max level when implementing these interfaces).

Also added an "empty" ContainerBuilder stub, since phpstan complained about not knowing the class when seeing it in ExtensionInterface.stub. If there's another way to fix this please let me know.

These changes are based off of symfony 4.4 and tested on a medium to large-ish codebase.

interface EventSubscriberInterface
{
/**
* @return array<string, string|array<string, int>|array<int, string|array<string, int>|array<int, string>>>
Copy link
Contributor Author

@dbrekelmans dbrekelmans Jan 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is clearly documented at https://github.com/symfony/symfony/blob/master/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php and tested against a codebase that uses all the different structures.

@lookyman
Copy link
Collaborator

I'll have a proper look a bit later, but it looks good. Thanks.

@lookyman lookyman merged commit 5e4b7ba into phpstan:master Jan 22, 2020
@lookyman
Copy link
Collaborator

Thank you!

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

Successfully merging this pull request may close these issues.

4 participants