Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
lookyman merged 1 commit into phpstan:master from dbrekelmans:master
Jan 22, 2020
Merged

Add a bunch of stubs #72

lookyman merged 1 commit into phpstan:master from dbrekelmans:master
Jan 22, 2020

Conversation

Copy link
Contributor

@dbrekelmans dbrekelmans commented Jan 20, 2020
edited
Loading

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
edited
Loading

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.

nusje2000 reacted with thumbs up emoji
Copy link
Collaborator

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

dbrekelmans reacted with thumbs up emoji

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

Thank you!

dbrekelmans and KoenvanWijnen reacted with hooray emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
2 more reviewers

@nvdbeek nvdbeek nvdbeek approved these changes

@nusje2000 nusje2000 nusje2000 approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /