Skip to content

Merge symplify/phpstan-extenisons here, as only few classes#270

Merged
TomasVotruba merged 7 commits into
mainfrom
tv-type-extension
Jun 9, 2026
Merged

Merge symplify/phpstan-extenisons here, as only few classes#270
TomasVotruba merged 7 commits into
mainfrom
tv-type-extension

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Jun 8, 2026

Copy link
Copy Markdown
Member

Merges symplify/phpstan-extensions into this package (only a few classes), adding return type extensions and a Symplify error formatter.

All return type extensions are disabled by default and opt-in via parameters in your phpstan.neon:

parameters:
    symfonyReturnType: true   # Container::get($id) => $id type; Finder SplFileInfo::getRealPath() => string
    laravelReturnType: true   # Container::make($class) => $class type
    pathStrings: true         # getcwd()/dirname()/realpath() => always "string"
Parameter Enables
symfonyReturnType ContainerGetReturnTypeExtension, SplFileInfoTolerantReturnTypeExtension
laravelReturnType LaravelContainerMakeTypeExtension
pathStrings NativeFunctionReturnTypeExtension

The errorFormat: symplify formatter is registered unconditionally.

@TomasVotruba TomasVotruba changed the title tv type extension Merge symplify/phpstan-extenisons here, as onyl few classes Jun 8, 2026
@TomasVotruba TomasVotruba marked this pull request as draft June 8, 2026 22:13
@TomasVotruba TomasVotruba changed the title Merge symplify/phpstan-extenisons here, as onyl few classes Merge symplify/phpstan-extenisons here, as only few classes Jun 9, 2026
@TomasVotruba TomasVotruba marked this pull request as ready for review June 9, 2026 06:11
@TomasVotruba TomasVotruba merged commit ae512cb into main Jun 9, 2026
7 checks passed
@TomasVotruba TomasVotruba deleted the tv-type-extension branch June 9, 2026 21:54
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.

1 participant