Skip to content

Add template generics for PSR-11 implementations in PHPStan and Psalm#3322

Merged
akrabat merged 8 commits into
slimphp:4.xfrom
limarkxx:add-psalm
Jun 13, 2024
Merged

Add template generics for PSR-11 implementations in PHPStan and Psalm#3322
akrabat merged 8 commits into
slimphp:4.xfrom
limarkxx:add-psalm

Conversation

@limarkxx
Copy link
Copy Markdown
Contributor

Slim v4 abstracts out DI to PSR-11, which means given a Slim/App it is unclear what its DI container is capable of.
Psalm and PHPStan both provide mechanisms to express the types generically, allowing them to ensure that you are calling the correct set method on a DI container received from getContainer

Comment thread Slim/CallableResolver.php
@limarkxx limarkxx marked this pull request as ready for review May 14, 2024 04:17
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 99.427% (-0.002%) from 99.429%
when pulling c7910ea on limarkxx:add-psalm
into 8388b33 on slimphp:4.x.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 99.429%. remained the same
when pulling c7910ea on limarkxx:add-psalm
into 8388b33 on slimphp:4.x.

@akrabat akrabat merged commit b8de7c1 into slimphp:4.x Jun 13, 2024
@akrabat
Copy link
Copy Markdown
Member

akrabat commented Jun 13, 2024

Thanks!

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.

3 participants