-
Notifications
You must be signed in to change notification settings - Fork 5
Prepare for PHPStan 1.0 #9
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
Comments
Hey 👋 |
Hi @liutauraskavaliauskas, Contribution is still very welcome !! I'll maintain the lib for at least some versions and still wrapping my head about what to do with the |
I'm working on updating this package to PHPStan 1.0, stay tuned. |
Here you go: #11 |
Closed by #11 |
When can we expect the new version published? |
Hello everyone 👋
I announced today that PHPStan 1.0 is going to be released on November 1st 2021.
I'm approaching you as one of the most popular PHPStan extensions. I'd love if you could prepare your code for PHPStan 1.0 in advance so that it's ready to release on the same day.
Here's a brief guide how to approach the upgrade:
"phpstan/phpstan": "^1.0"
, add"minimum-stability": "dev"
and"prefer-stable": true
if necessary.Thank you!
Here are the BC breaks. The list is huge but most of those have very little impact.
There are new rules around using PHPStan internals in regard to backward compatibility promise: https://phpstan.org/developing-extensions/backward-compatibility-promise
It's possible that not everything you use is covered by it - so I'm here to help you to transition to correct usage, or add some
@api
annotations in PHPStan itself so that more is covered by the promise. Let me know!BC breaks for end-users
max
is now level 9. Feel free to updatemax
to8
if your code isn't ready.numeric-string
(it was previously described asstring&numeric
), and also array shapes.baselineNeon
error formatter, use--generate-baseline
CLI option instead (phpstan/phpstan-src@492cfbc)polluteCatchScopeWithTryAssignments
config parameter (phpstan/phpstan-src@8933c7e)autoload_files
parameter - use Discovering Symbols instead (phpstan/phpstan-src@7a21246)autoload_directories
parameter - use Discovering Symbols instead (phpstan/phpstan-src@f67b48a)bootstrap
parameter - usebootstrapFiles
instead (phpstan/phpstan-src@1baa294)implicitThrows
configuration parameter toexceptions.implicitThrows
(phpstan/phpstan-src@96b7c48)--paths-file
CLI option (phpstan/phpstan-src@5670cf2)dump-deps
command (phpstan/phpstan-src@9c7017c)excludes_analyse
option, useexcludePaths
instead (phpstan/phpstan-src@d25c5e5)The following are interesting only if you create a custom ruleset in your configuration file:
DeadCatchRule
, replaced byCatchWithUnthrownExceptionRule
(phpstan/phpstan-src@4dba60b)VariableCertaintyInIssetRule
, replaced byIssetRule
(phpstan/phpstan-src@2e858de)MissingClosureNativeReturnTypehintRule
, no longer needed thanks to type inference (phpstan/phpstan-src@1c34d8d)BC breaks for extension developers
CompoundTypeHelper
(phpstan/phpstan-src@145c4e3)CommentHelper
(phpstan/phpstan-src@ebad6f6)DependencyDumper
(phpstan/phpstan-src@9c7017c)PHPStan\Reflection\Generic\ResolvedFunctionVariant
, replaced byPHPStan\Reflection\ResolvedFunctionVariant
(phpstan/phpstan-src@1cc6c81)ClassReflection::getNativeMethods()
, usegetNativeReflection()
instead (phpstan/phpstan-src@d2c1446)PhpPropertyReflection::hasPhpDoc()
, replaced byhasPhpDocType()
(phpstan/phpstan-src@bedd5be)NodeDependencies
no longer iterable (phpstan/phpstan-src@f76875a)TestCase
toPHPStanTestCase
(#634), thanks @frankdejonge!StaticType
andThisType
- requireClassReflection
in constructor (phpstan/phpstan-src@7aabc84)PHPStanTestCase
- extensions can no longer be provided by overriding methods fromPHPStanTestCase
. UsegetAdditionalConfigFiles()
instead. (phpstan/phpstan-src@65efd93, phpstan/phpstan-src@239291a)|false
to|null
(phpstan/phpstan-src@629ccf6)BrokerAwareExtension
(phpstan/phpstan-src@db2f7fb)PHPStanTestCase::createBroker()
. UsecreateReflectionProvider()
instead. (phpstan/phpstan-src@1e5cf58)PHPStan\Broker\Broker
. UsePHPStan\Reflection\ReflectionProvider
instead. (phpstan/phpstan-src@c775594)PHPStan\Broker\Broker::getInstance()
. UsePHPStan\Reflection\ReflectionProviderStaticAccessor
instead. (phpstan/phpstan-src@4e7d60d)The text was updated successfully, but these errors were encountered: