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:
v4
->v5
^1.10
->^2.0
^9.5 || ^10.5
->^9.5 || ^10.5 || ^11.0
4.2.10
->6.0.1
5.0.10
->6.0.1
5.1.4
->6.0.1
Release Notes
codecov/codecov-action (codecov/codecov-action)
v5
Compare Source
phpstan/phpstan (phpstan/phpstan)
v2.0.1
Compare Source
Bugfixes 🐛
v2.0.0
Compare Source
Read more about PHPStan 2.0.
Check out the UPGRADING guide!.
Buy the PHPStan elephpant and T-shirts!
Major new features 🚀
mixed
types strictly, not just explicitmixed
list
type (#1751), #3311, #8185, #6243, thanks @rvanvelzen!@readonly
rule that disallows default values (#1391), thanks @herndlm!@phpstan-consistent-constructor
(#1296), thanks @canvural!is_a()
orclass_parents()
(phpstan/phpstan-src@c4a662a)new ReflectionMethod()
(phpstan/phpstan-src@5363066)instanceof
of classes not covered by backward compatibility promise (phpstan/phpstan-src@ff4d02d)instanceof
of classes covered by backward compatibility promise but where the assumption might change (phpstan/phpstan-src@996bc69)@phpstan-self-out
(phpstan/phpstan-src@6838669)@param-out
(phpstan/phpstan-src@30c4b9e), #10260@param-closure-this
(phpstan/phpstan-src@2fa539a), #10933@var
tag type against native type (phpstan/phpstan-src@a69e3bc)reportWrongPhpDocTypeInVarTag
totrue
to have all types validated, not just native onesreportAnyTypeWideningInVarTag: true
for stricter behaviour (#2840), thanks @janedbal!@phpstan-pure
above functions and methodsPHPStan\Type\Type
interface via@var
(phpstan/phpstan-src@713b98f), https://github.com/nunomaduro/larastan/issues/1567#issuecomment-1460445389@mixin
PHPDoc tag above traits (phpstan/phpstan-src@0d0de94)@extends
,@implements
,@use
for unresolvable types (phpstan/phpstan-src@2bb5282), #11552@method
tags (phpstan/phpstan-src@5b7e474)@method
@template
tags above traits (phpstan/phpstan-src@aadbf62)@property
tags (phpstan/phpstan-src@55ea2ae), #10752, #9356var_export
without$return=true
(#3225), #11320, thanks @staabm!new
/function call/method call/static method call on a separate line without any side effects even without@phpstan-pure
PHPDoc tag on the declaration sidecall_user_func()
(#2479), thanks @staabm!array_filter()
calls (#1077), #6840, thanks @leongersen!array_values()
calls (#2917), thanks @kamil-zacek!@no-named-arguments
(phpstan/phpstan-src@74ba8c2), #5968@phpstan-self-out
(phpstan/phpstan-src@892b319)@mixin
(phpstan/phpstan-src@3175c81)polluteScopeWithBlock
(defaults totrue
,false
inphpstan-strict-rules
) (phpstan/phpstan-src@946cf18)@readonly
property and@immutable
class PHPDoc (#1295, #1335), #4082, thanks @herndlm!instanceof *Type
in favour of new methods onType
interface, (phpstan/phpstan-src@436e6d3), learn more: Why Is instanceof *Type Wrong and Getting Deprecated?Improvements 🔧
exceptions.check.tooWideThrowType
made true by default (phpstan/phpstan-src@1b1da3e)implicitThrows
to only look for explicit throw points in too-wide@throws
rules when set tofalse
(phpstan/phpstan-src@a0e688c)GenericObjectType
(#2818, #2821)RuleLevelHelper::accepts()
behaviour (phpstan/phpstan-src@941fc81), #11119, #4174Throw_
(phpstan/phpstan-src@22eef6d), #4912@param-out
(phpstan/phpstan-src@56b2002)@final
method in OverridingMethodRule, #9135@param-out
(phpstan/phpstan-src@7ceb19d), https://github.com/phpstan/phpstan/issues/8880#issuecomment-1426971473skipCheckGenericClasses
(phpstan/phpstan-src@28c2c79)??
/isset
/empty
with different message (#1253), thanks @rajyan!is_array
(#1191), thanks @herndlm!isset()
, not just on PHP 8.2+ (#3476), thanks @ondrejmirtes!Collection<...>|Foo[]
being resolved to Collection of Foo (phpstan/phpstan-src@fff8f09)PhpMethodReflection
andPhpFunctionReflection::isVariadic()
(#3534), thanks @staabm!Bugfixes 🐛
mixed
type based on config (#2885), thanks @schlndh!Function signature fixes 🤖
0|positive-int
(#1027), thanks @staabm!Imagick
parameter types (#2334), thanks @zonuexe!max()
/min()
should expect non-empty-array (#2163), thanks @staabm!Closure::bind
$newScope
param (#2817), thanks @mvorisek!error_log
errors withmessage_type=2
(#2428), #9380, thanks @staabm!FILE_NO_DEFAULT_CONTEXT
infile()
(#2482), thanks @staabm!file()
flags args (#2476, #2482), thanks @staabm!flock()
operation flags (#2477), thanks @staabm!stream_socket_client()
signature (#2519), thanks @staabm!scandir()
signature (#2518), thanks @staabm!extract()
signature (#2517), thanks @staabm!RecursiveIteratorIterator::__construct()
parameter types (#2835), thanks @staabm!Locale
signatures (#2880), thanks @devnix!$mode
parameter for thecount()
(#3190), thanks @kuma3!filter_input*
type param type (#2271), thanks @herndlm!curl_setopt
function signature based on 2nd arg (#1719), thanks @staabm!count_chars()
(#3596), thanks @u01jmg3!Internals 🔍
$templateTags
is required (phpstan/phpstan-src@5b58f83)$usePathConstantsAsConstantString
made required (phpstan/phpstan-src@f88d9ba)PhpMethodReflectionFactory::create()
- all parameters are required (phpstan/phpstan-src@8bfbf8f)$nodeType
and$acceptsNamedArguments
made required (phpstan/phpstan-src@4937527)$ignorable
ofcompare()
method made required (phpstan/phpstan-src@f85a500)$dateTimeClass
of DateTimeModifyReturnTypeExtension constructor made required (phpstan/phpstan-src@a8cd423)PhpVersion
parameter to variousType
methods (#3478), thanks @VincentLanglet!getClass()
return types in extension interfaces (#1754), thanks @staabm!FunctionCallParametersCheck::check()
parameters (phpstan/phpstan-src@710e09c)instanceof self
inConstantArrayType
(#3552), thanks @herndlm!bashunit -a
exit_code to check for errors (#3533), thanks @Chemaclass!sebastianbergmann/phpunit (phpunit/phpunit)
v11.4.3
: PHPUnit 11.4.3Compare Source
Changed
assertGreaterThan()
,assertGreaterThanOrEqual()
,assertLessThan()
, andassertLessThanOrEqual()
Fixed
How to install or update PHPUnit
v11.4.2
: PHPUnit 11.4.2Compare Source
Changed
Fixed
How to install or update PHPUnit
v11.4.1
: PHPUnit 11.4.1Compare Source
Changed
StringMatchesFormatDescription
constraint to be consistent with PHP'srun-tests.php
Fixed
E_DEPRECATED
issuesHow to install or update PHPUnit
v11.4.0
: PHPUnit 11.4.0Compare Source
Changed
#[RequiresPhpunitExtension]
attributevendor/phpunit/phpunit/phpunit.xsd
(instead ofhttps://schema.phpunit.de/X.Y/phpunit.xsd
) when PHPUnit was installed using Composer andphpunit --generate-configuration
was invoked in the directory wherevendor
is located--migrate-configuration
command no longer replacesvendor/phpunit/phpunit/phpunit.xsd
withhttps://schema.phpunit.de/X.Y/phpunit.xsd
--list-groups
now shows how many tests a group contains--list-suites
now shows how many tests a test suite containsDeprecated
includeUncoveredFiles
configuration option#[CoversTrait]
and#[UsesTrait]
attributes#[CoversMethod]
and#[UsesMethod]
attributes (and respective annotations)How to install or update PHPUnit
v11.3.6
: PHPUnit 11.3.6Compare Source
Changed
E_STRICT
constant in PHP 8.4Fixed
trim()
med when it contains$
characterHow to install or update PHPUnit
v11.3.5
: PHPUnit 11.3.5Compare Source
Fixed
static
return type declaration is not properly initializedname
property on<testsuites>
element in JUnit XML logfileCallback
throws aTypeError
when checking acallable
has variadic parametersHow to install or update PHPUnit
v11.3.4
: PHPUnit 11.3.4Compare Source
Fixed
assertJsonStringEqualsJsonString()
considers objects with sequential numeric keys equal to be arraysCallback
constraint does not handle variadic arguments correctly when used for mock object expectations$
at the beginning gets truncated when used with a data providerdefault
groupHow to install or update PHPUnit
v11.3.3
: PHPUnit 11.3.3Compare Source
Added
failOnPhpunitDeprecation
attribute on the<phpunit>
element of the XML configuration file and--fail-on-phpunit-deprecation
CLI option for controlling whether PHPUnit deprecations should be considered when determining the test runner's shell exit code (default: do not consider)displayDetailsOnPhpunitDeprecations
attribute on the<phpunit>
element of the XML configuration file and--display-phpunit-deprecations
CLI option for controlling whether details on PHPUnit deprecations should be displayed (default: do not display)Changed
--fail-on-phpunit-deprecation
CLI option or thefailOnPhpunitDeprecation="true"
attribute on the<phpunit>
element of the XML configuration file.--display-phpunit-deprecations
CLI option or thedisplayDetailsOnPhpunitDeprecations
attribute on the<phpunit>
element of the XML configuration file.How to install or update PHPUnit
v11.3.2
: PHPUnit 11.3.2Compare Source
Changed
name
property on<testsuites>
element in JUnit XML logfile.phpstorm.meta.php
file as methods such asTestCase::createStub()
use generics / template types for their return types and PhpStorm, for example, uses that informationFixed
@
operatorHow to install or update PHPUnit
v11.3.1
: PHPUnit 11.3.1Compare Source
Changed
How to install or update PHPUnit
v11.3.0
: PHPUnit 11.3.0Compare Source
Added
shortenArraysForExportThreshold
attribute on the<phpunit>
element of the XML configuration file to limit the export of arrays to a specified number of elements (default:0
/ do not limit the export of arrays)--extension
CLI option to register a test runner extensionChanged
--generate-configuration
now limits the export of arrays to 10 elements in order to improve performanceHow to install or update PHPUnit
v11.2.9
: PHPUnit 11.2.9Compare Source
Fixed
--list-tests
and--list-tests-xml
CLI options do not report error when data provider method throws exceptionHow to install or update PHPUnit
v11.2.8
: PHPUnit 11.2.8Compare Source
Fixed
Test\Passed
event is not emitted for PHPT tests--coverage-filter
CLI option could not be used multiple timesHow to install or update PHPUnit
v11.2.7
: PHPUnit 11.2.7Compare Source
Changed
--prefer-lowest
CLI option also get recent versions)Fixed
phpunit.xml
are not handled correctly when--generate-configuration
is usedHow to install or update PHPUnit
v11.2.6
: PHPUnit 11.2.6Compare Source
Changed
How to install or update PHPUnit
v11.2.5
: PHPUnit 11.2.5Compare Source
Changed
array_pop()
instead ofarray_shift()
for processingTest
objects inTestSuite::run()
and optimizeTestSuite::isEmpty()
How to install or update PHPUnit
v11.2.4
: PHPUnit 11.2.4Compare Source
Changed
TestCase
objects early that use a data providerHow to install or update PHPUnit
v11.2.3
: PHPUnit 11.2.3Compare Source
Changed
debug_backtrace()
How to install or update PHPUnit
v11.2.2
: PHPUnit 11.2.2Compare Source
Changed
TestCase
object after its test was runFixed
How to install or update PHPUnit
v11.2.1
: PHPUnit 11.2.1Compare Source
Fixed
cacheDirectory
attribute from<coverage>
element when migrating from PHPUnit 11.1 to PHPUnit 11.2How to install or update PHPUnit
v11.2.0
: PHPUnit 11.2.0Compare Source
Added
#[CoversTrait]
and#[UsesTrait]
attributesreadonly
classesassertObjectNotEquals()
Deprecated
Configuration
📅 Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - 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 was generated by Mend Renovate. View the repository job log.