Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.8.0
->^1.0.0
^0.12.42
->^1.0.0
^0.13.1
->^1.0.0
Release Notes
Jan0707/phpstan-prophecy
v1.0.0
Compare Source
For a full diff see [
0.8.1...1.0.0
][0.8.1...1.0.0].Changed
phpstan/phpstan:^1.0.0
and dropped support for non-stable versions ofphpstan/phpstan
([#266]), by [@alexander-schranz]phpstan/phpstan
v1.2.0
Compare Source
Improvements 🔧
new
in initializers - RFC (phpstan/phpstan-src@1a102fe)array_is_list()
- RFC (#770), thanks @canvural!literal-string
with encapsed strings (#768), thanks @craigfrancis!rules
config section by their class name (phpstan/phpstan-src@50cb90d)Bugfixes 🐛
::class
is always considered a classname (phpstan/phpstan-src@da34d3f), #5979@var
tags (phpstan/phpstan-src@2652f2d), #5921Function signature fixes 🤖
v1.1.2
Compare Source
Bugfixes 🐛
=&
) too (phpstan/phpstan-src@74787be), #5935self::
(phpstan/phpstan-src@b5e44f7), #5951pecl_http
(ondrejmirtes/BetterReflection@9f2b6eb, ondrejmirtes/BetterReflection@bdd2523), #5460, thanks @kukulich!Function signature fixes 🤖
v1.1.1
Compare Source
Bugfixes 🐛
/** @​phpstan-ignore-line */
and/** @​phpstan-ignore-next-line */
annotations sometimes not working because of AST (phpstan/phpstan-src@9474696), #4750, #4759, #3834, #3563, #4250, #4798function_exists()
check (phpstan/phpstan-src@28e8c11), #3576function_exists()
similar tois_callable()
(phpstan/phpstan-src@4a98863), #1849v1.1.0
Compare Source
Improvements 🔧
nikic/php-parser
to 4.13.1 (phpstan/phpstan-src@6a64c8a), #5458jetbrains/phpstorm-stubs
(phpstan/phpstan-src@546e87c), #5833PhpStormStubsElementAvailable
attribute injetbrains/phpstorm-stubs
(phpstan/phpstan-src@e41e66a)never
return type - RFC (phpstan/phpstan-src@59be92f)Bugfixes 🐛
Function signature fixes 🤖
get_loaded_extensions()
(#754), thanks @dktapps!call_user_func_array()
support named arguments (#727), thanks @mglaman!phpversion()
does not return false when no arguments are given (#753), thanks @dktapps!v1.0.2
Compare Source
Bugfixes 🐛
Composer
namespace only with static reflection, some classes in PHAR are unprefixed (phpstan/phpstan-src@95754d1), https://github.com/composer/composer/pull/10253Function signature fixes 🤖
array_map
parameter (phpstan/phpstan-src@9433345)connection_aborted()
signature (#715), thanks @staabm!str_split()
signature (#718), thanks @staabm!DateFunctionReturnTypeExtension
: support more precise single-char date-formats (#721), thanks @staabm!$preserve_keys
argument foriterator_to_array()
(#748), thanks @Lctrs!v1.0.1
Compare Source
DerivativeContainerFactory
- pass all arguments to the derived container (phpstan/phpstan-src@f28c7e9)PhpStanNamespaceIn3rdPartyPackageRule
- fix segfault when there's no composer.json (phpstan/phpstan-src@d4efedb)v1.0.0
Compare Source
PHPStan 1.0 is here and I'm really excited about it! Read the accompanying article on PHPStan's blog and also check out the merchandise we're selling for limited time (until November 22nd). It includes white and blue PHPStan t-shirts, PHPStan stickers, and also something very special: Rule level badges that you can pin to your clothes to show off that you care about code quality 😊
Major new features 🚀
New rules
@final
classes (phpstan/phpstan-src@dffd2c2), https://github.com/phpstan/phpstan/discussions/5343??
operator issues (#36), thanks @leongersen!@var
PHPDoc tag (phpstan/phpstan-src@5886053)static::
(phpstan/phpstan-src@d8e8953, phpstan/phpstan-src@bad2607, phpstan/phpstan-src@270326a)@throws void
does not have an explicit throw point (phpstan/phpstan-src@8b3382a)isset()
(phpstan/phpstan-src@25b61d9)empty()
rule (phpstan/phpstan-src@601460c), #970array_map()
andarray_filter()
calls (#555), #5609, #5356, #1954, thanks @BackEndTea!implode()
function rule (#679), thanks @staabm!DateTime
instantiation (#380), thanks @b1rdex!random_int()
dynamic return type extension and parameters rule (#99), thanks @cs278!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), #5756dump-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
nikic/php-parser
to version 4.13.0, you should now use->getArgs()
instead of->args
wherever possible.* Helpful message about this change is also included in PHPStan itself: phpstan/phpstan-src@c836a42
PHPStan\Parser\Parser
service is no longer autowired. You need to choose the right instance for your needs and register it in thearguments
section of your service that needs the parser in the configuration. The Parser services you can choose from are:@defaultAnalysisParser
- the best choice if you're parsing files that are among the analysed files@currentPhpVersionSimpleDirectParser
- the closest choice to default behaviour from previous PHPStan versionsCompoundTypeHelper
(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)IntersectionType
with less than two types (phpstan/phpstan-src@f7d232a)ReflectionWithFilename
, useClassReflection|FunctionReflection
instead (phpstan/phpstan-src@3738fcd)Improvements 🔧
FileHelper::normalizePath()
(#735), thanks @staabm!TypeCombinator::compareTypesInUnion()
(#742), thanks @voku!TypeCombinator::union()
(#743), thanks @voku!TypeCombinator::union()
v2 (#747), thanks @voku!TypeCombinator::intersect()
(#747), thanks @voku!TypeCombinator::remove()
(#746), thanks @voku!analysedPathsFromConfig
(phpstan/phpstan-src@9f5f911), #5850IssetRule
everything whatVariableCertaintyInIssetRule
does (phpstan/phpstan-src@9689fbd), #970MissingReturnRule
- make the error non-ignorable for native typehints (phpstan/phpstan-src@9ecefd5)get_class()
returnsfalse
for mixed argument types (phpstan/phpstan-src@e86742d), #4741RecursiveIterator
,RecursiveArrayIterator
,WeakMap
(phpstan/phpstan-src@0b92888)new $string
leads toobject
, notmixed
(phpstan/phpstan-src@78a9f05)interface-string
andtrait-string
(phpstan/phpstan-src@d0ef5d4)SpecifiedTypes
phpdocs (#682), thanks @staabmPHP_INT_MAX
as positive integer (#684), thanks @herndlm!config.platform.php
in project'scomposer.json
is respected and overrides the current runtime PHP version (phpstan/phpstan-src@d235195)int|string
(phpstan/phpstan-src@724c8ba), #3753preserveOriginalNames
set to true (phpstan/phpstan-src@2a9d1be)E_DEPRECATED
(phpstan/phpstan-src@1a43385)Bugfixes 🐛
Throwable::toString()
can throw an exception (phpstan/phpstan-src@18adc8c)new $object
with a template type (phpstan/phpstan-src@956a7f4)never
is always an explicit throw point (phpstan/phpstan-src@c362fc5), #5627+
-operator withnon-empty-array
should lead tonon-empty-array
(#739), thanks @staabm!Function signature fixes 🤖
$cmp_function
parameters to$callback
(phpstan/phpstan-src@27a5d0f)static
(phpstan/phpstan-src@4653d15), #5700exit()
status should be in the range 0 to 254 (#707), thanks @staabm!sascha-egerer/phpstan-typo3
v1.0.0
Compare Source
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by WhiteSource Renovate. View repository job log here.