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

Appearance settings

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Aug 12, 2021

Q A
Branch? 6.0
Bug fix? no
New feature? yes
Deprecations? no
Tickets #40154
License MIT
Doc PR -

Extracted from #42496 for components that shouldn't be extended very often.

@nicolas-grekas
Copy link
Member Author

📗 (psalm failure are false-positives here.)

* @return CacheItemPoolInterface
*/
public static function create(string $file, CacheItemPoolInterface $fallbackPool)
public static function create(string $file, CacheItemPoolInterface $fallbackPool): CacheItemPoolInterface
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public static function create(string $file, CacheItemPoolInterface $fallbackPool): CacheItemPoolInterface
public static function create(string $file, CacheItemPoolInterface $fallbackPool): static

I don't quite understand why the previously annotated return type was so wide, tbh.

src/Symfony/Component/Stopwatch/Section.php Outdated Show resolved Hide resolved
src/Symfony/Component/Stopwatch/Section.php Outdated Show resolved Hide resolved
@nicolas-grekas nicolas-grekas merged commit da0ad85 into symfony:6.0 Aug 13, 2021
@nicolas-grekas nicolas-grekas deleted the return-types-1 branch August 13, 2021 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.