Skip to content

Phpstan stub for Psr\Container#1070

Merged
dantleech merged 2 commits intophpbench:masterfrom
aivchen:phpstan-container-stub
Dec 19, 2023
Merged

Phpstan stub for Psr\Container#1070
dantleech merged 2 commits intophpbench:masterfrom
aivchen:phpstan-container-stub

Conversation

@aivchen
Copy link
Contributor

@aivchen aivchen commented Dec 19, 2023

This will let us know the type of the object returned by container:

\PHPStan\dumpType($this->container()->get(SomeClass:class)) // "mixed" before change and "SomeClass" after the change

@aivchen aivchen changed the title Phpstan container stub Phpstan stub for Psr\Container Dec 19, 2023
@dantleech
Copy link
Member

We could also add it directly to the Container package as the PSR ContainerInterface isn't used anyway. But happy to merge this

@dantleech dantleech merged commit a2c16ca into phpbench:master Dec 19, 2023
@aivchen aivchen deleted the phpstan-container-stub branch December 20, 2023 06:21
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.

2 participants