All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
For a full diff see 2.3.0...main
.
For a full diff see 2.2.0...2.3.0
.
- Allowed installation on PHP 8.4 (#862), by @localheinz
For a full diff see 2.1.0...2.2.0
.
- Allowed installation of
nikic/php-parser:^5.0.0
(#735), by @localheinz
For a full diff see 2.0.0...2.1.0
.
- Dropped support for PHP 8.0 (#567), by @localheinz
- Added support for PHP 8.3 ([#604]), by @nunomaduro
For a full diff see 1.0.0...2.0.0
.
- Added
methodsAllowedToUseContainerTypeDeclarations
parameter to allow configuring a list of method names that are allowed to have container parameter type declarations ([#541), by @localheinz - Allowed disabling rules ([#542), by @localheinz
- Added support for nullable union types ([#543), by @localheinz
- Dropped support for PHP 7.2 (#496), by @localheinz
- Dropped support for PHP 7.3 (#498), by @localheinz
- Dropped support for PHP 7.4 (#499), by @localheinz
- Added support for PHP 8.2 (#540), by @localheinz
For a full diff see 0.15.3...1.0.0
.
- Added support for
phpstan/phpstan:^1.0.0
and dropped support for non-stable versions ofphpstan/phpstan
(#381), by @rpkamp
- Adjusted
Classes\FinalRule
to not report an error when a non-final class has aDoctrinbe\ORM\Mapping\Entity
attribute (#395), by @localheinz
For a full diff see 0.15.2...0.15.3
.
- Allow installation with PHP 8.0 (#294), by @localheinz
For a full diff see 0.15.1...0.15.2
.
- Dropped support for PHP 7.1 (#259), by @localheinz
For a full diff see 0.15.0...0.15.1
.
- Adjusted
Methods\FinalInAbstractClass
rule to allow non-final
public
constructors in abstract classes (#248), by @Slamdunk
For a full diff see 0.14.4...0.15.0
.
- Added
Classes\PHPUnit\Framework\TestCaseWithSuffixRule
, which reports an error when a concrete class extendingPHPUnit\Framework\TestCase
does not have aTest
suffix (#225), by @localheinz
For a full diff see 0.14.3...0.14.4
.
- Ignored classes with
@ORM\Mapping\Entity
annotations inFinalRule
(#202), by @localheinz
For a full diff see 0.14.2...0.14.3
.
- Ignored first line in
DeclareStrictTypesRule
when it is a shebang (#186), by @Great-Antique
For a full diff see 0.14.1...0.14.2
.
- Brought back support for PHP 7.1 (#166), by @localheinz
For a full diff see 0.14.0...0.14.1
.
- Removed an inappropriate
replace
configuration fromcomposer.json
(#161), by @localheinz
For a full diff see 0.13.0...0.14.0
.
-
Allowed installation of
phpstan/phpstan:~0.12.0
(#147), by @localheinz -
Renamed vendor namespace
Localheinz
toErgebnis
after move to @ergebnis (#157), by @localheinzRun
composer remove localheinz/phpstan-rules
and
composer require ergebnis/phpstan-rules
to update.
Run
find . -type f -exec sed -i '.bak' 's/Localheinz\\PHPStan/Ergebnis\\PHPStan/g' {} \;
to replace occurrences of
Localheinz\PHPStan
withErgebnis\PHPStan
.Run
find -type f -name '*.bak' -delete
to delete backup files created in the previous step.
-
Moved parameters into
ergebnis
section to prevent conflicts with global parameters (#158), by @localheinzWhere previously
phpstan.neon
looked like the followingparameters: allowAbstractClasses: true classesAllowedToBeExtended: [] classesNotRequiredToBeAbstractOrFinal: [] interfacesImplementedByContainers: - Psr\Container\ContainerInterface
these parameters now need to be moved into an
ergebnis
section:parameters: - allowAbstractClasses: true - classesAllowedToBeExtended: [] - classesNotRequiredToBeAbstractOrFinal: [] - interfacesImplementedByContainers: - - Psr\Container\ContainerInterface + ergebnis: + allowAbstractClasses: true + classesAllowedToBeExtended: [] + classesNotRequiredToBeAbstractOrFinal: [] + interfacesImplementedByContainers: + - Psr\Container\ContainerInterface
- Dropped support for PHP 7.1 (#141), by @localheinz
For a full diff see 0.12.2...0.13.0
.
- Added
Methods\PrivateInFinalClassRule
which reports an error when a method in afinal
class isprotected
when it could beprivate
(#126), by @localheinz
For a full diff see 0.12.1...0.12.2
.
- Started ignoring interfaces from analysis by
Methods\FinalInAbstractClassRule
to avoid inappropriate errors (#132), by @localheinz
For a full diff see 0.12.0...0.12.1
.
- Started resolving class name in type declaration before attempting to analyze it in the
Methods\NoParameterWithContainerTypeDeclarationRule
to avoid errors where classself
is not found (#128), by @localheinz
For a full diff see 0.11.0...0.12.0
.
- Added
Methods\NoParameterWithContainerTypeDeclarationRule
, which reports an error when a method has a type declaration that corresponds to a known dependency injection container or service locator (#122), by @localheinz - Added
Methods\FinalInAbstractClassRule
, which reports an error when a concretepublic
orprotected
method in anabstract
class is notfinal
(#123), by @localheinz
For a full diff see 0.10.0...0.11.0
.
- Added
Files\DeclareStrictTypesRule
, which reports an error when a PHP file does not have adeclare(strict_types=1)
declaration (#79 - Added
Expressions\NoEmptyRule
, which reports an error when the language constructempty()
is used (#110), by @localheinz - Added
Expressions\NoEvalRule
, which reports an error when the language constructeval()
is used (#112), by @localheinz - Added
Expressions\NoErrorSuppressionRule
, which reports an error when@
is used to suppress errors (#113), by @localheinz - Added
Expressions\NoCompactRule
, which reports an error when the functioncompact()
is used (#116), by @localheinz - Added
Statements\NoSwitchRule
, which reports an error when the statementswitch()
is used (#117), by @localheinz
- Require at least
nikic/php-parser:^4.2.3
(#102), by @localheinz - Require at least
phpstan/phpstan:~0.11.15
(#103), by @localheinz
For a full diff see 0.9.1...0.10.0
.
- Require at least
phpstan/phpstan:~0.11.7
(#91), by @localheinz
- Added missing
parametersSchema
configuration torules.neon
, which is required for use withbleedingEdge.neon
, seephpstan/phpstan@54a125d
(#93), by @localheinz
For a full diff see 0.9.0...0.9.1
.
- Allow usage with
phpstan/extension-installer
(#89), by @localheinz
For a full diff see 0.8.1...0.9.0
.
- Adjusted
Classes\FinalRule
to ignore Doctrine entities when they are annotated (#84), by @localheinz
For a full diff see 0.8.0...0.8.1
.
- Actually enable
Expressions\NoIssetRule
(#83), by @localheinz
For a full diff see 0.7.1...0.8.0
.
- Added
Expressions\NoIssetRule
, which reports an error when the language constructisset()
is used (#81), by @localheinz
For a full diff see 0.7.0...0.7.1
.
- Configured
Classes\NoExtendsRule
to allow a set of default classes to be extended (#73), by @localheinz
For a full diff see 0.6.0...0.7.0
.
- Added
Classes\NoExtendsRule
, which reports an error when a class extends a class that is not allowed to be extended (#68), by @localheinz
For a full diff see 0.5.0...0.6.0
.
- Allow installation with
phpstan/phpstan:~0.11.0
(#65), by @localheinz
For a full diff see 0.4.0...0.5.0
.
- Added
Methods\NoConstructorParameterWithDefaultValueRule
, which reports an error when a constructor of an anonymous class or a class has a parameter with a default value (#45), by @localheinz - Added parameters
$allowAbstractClasses
and$classesNotRequiredToBeAbstractOrFinal
to allow configuration ofClasses
FinalRule` (#51), by @localheinz
- Removed
Classes\AbstractOrFinalRule
after merging behaviour intoClasses\FinalRule
(#51), by @localheinz - Removed default values from constructor of
Classes\FinalRule
(#53), by @localheinz
For a full diff see 0.3.0...0.4.0
- Removed double-quotes from error messages to be more consistent with error messages generated by
phpstan/phstan
(#39), by @localheinz - Modified wording and placement of method, function, and parameter names in error messages to be more consistent with error messages generated by
phpstan/phstan
(#42), by @localheinz
For a full diff see 0.2.0...0.3.0
- Added
Functions\NoNullableReturnTypeDeclarationRule
, which reports an error when a function has a nullable return type declaration, andMethods\NoNullableReturnTypeDeclarationRule
, which reports an error when a method declared in an anonymous class, a class, or an interface has a nullable return type declaration (#16), by @localheinz - Added
Closures\NoParameterWithNullDefaultValueRule
, which reports an error when a closure has a parameter withnull
as default value (#26), by @localheinz - Added
Closures\NoNullableReturnTypeDeclarationRule
, which reports an error when a closure has a nullable return type declaration (#29), by @localheinz - Added
Functions\NoParameterWithNullDefaultValueRule
, which reports an error when a function has a parameter withnull
as default value (#31), by @localheinz - Added
Methods\NoParameterWithNullDefaultValueRule
, which reports an error when a method declared in an anonymous class, a class, or an interface has a parameter withnull
as default value (#32), by @localheinz - Added
Closures\NoParameterWithNullableTypeDeclarationRule
, which reports an error when a closure has a parameter with a nullable type declaration (#33), by @localheinz - Added
Functions\NoParameterWithNullableTypeDeclarationRule
, which reports an error when a function has a parameter with a nullable type declaration (#34), by @localheinz - Added
Methods\NoParameterWithNullableTypeDeclarationRule
, which reports an error when a method declared in an anonymous class, a class, or an interface has a parameter with a nullable type declaration (#35), by @localheinz - Extracted
rules.neon
, so you can easily enable all rules by including it in yourphpstan.neon
(#37), by @localheinz
For a full diff see 0.1.0...0.2.0
- Added
Classes\FinalRule
, which reports an error when a non-anonymous class is notfinal
, (#4), by @localheinz
- Added an
$excludeClassNames
argument to the constructors ofClasses\AbstractOrFinalRule
andClasses\FinalRule
to allow whitelisting of classes, (#11), by @localheinz
For a full diff see 362c7ea...0.1.0
.
- Added
Classes\AbstractOrFinalRule
, which reports an error when a non-anonymous class is neitherabstract
norfinal
, (#1), by @localheinz