- Restrict php-cs-fixer version 3.65.0 (included in ECS version 12.4+) from being installed because of bug in
NullableTypeDeclarationFixer.
- Disable incorrectly behaving PhpdocAlignFixer.
- Add most of the available checks for PER-2 coding style.
- Add many new checks from
php-cs-fixerup to version 3.56. - Add available php-cs-fixer rules for PHP 8.1 and 8.2 (which are automatically run only on compatible PHP versions).
- BC: Update to symplify/easy-coding-standard ^12.1 and change configuration format in
ecs.php. See UPGRADE-4.0.md for step-by-step upgrade howto. - BC: Move coding standard declarations from
ecs-7.4.php,ecs-8.0.phpandecs-8.1.phptoecs.phpand remove the former files. - BC: Change base coding standard from PSR-2 to PSR-12.
- BC: Change deprecated
php-cs-fixersniffs to new ones. - Rebrand to Alma Career in documentation and meta information.
- Require PHP ^8.0.
- Update to slevomat/coding-standard ^8.0.
- Update to squizlabs/php_codesniffer ^3.9.
- Refactor: Remove nette/utils dependency.
- Add tests to ensure the code style defined by this library is being properly checked and fixed.
- Lock
symplify/easy-coding-standardto <10.2.4 because of backward incompatibilities introduced in its bugfix releases.
- Update to symplify/easy-coding-standard ^10.0
- Allow
slevomat/coding-standard^7 - Add new
ecs-8.0.phpcoding standard declaration file for PHP 8.0+. - Add new
ecs-8.1.phpcoding standard declaration file for PHP 8.1+.
- Fix SpecifyArgSeparatorFixer type error when adding empty
$numeric_prefixparameter in PHP 7.4+.
- Fix SpecifyArgSeparatorFixer not compatible with php-cs-fixer 3.0.
- Add new
ecs-7.4.phpcoding standard declaration file for PHP 7.4+.
- Use php-cs-fixer 3.0.
- Use new prefixed version of symplify/easy-coding-standard.
PhpUnitExpectationFixeris now used only on PHP 8.0+. See symplify#3130.
- [BC break] Change YAML config to PHP. See UPGRADE-3.0.md for step-by-step upgrade howto.
- Replace
Symplify\CodingStandard\Sniffs\Naming\[AbstractClassNameSniff, ClassNameSuffixByParentSniff, InterfaceNameSniff and TraitNameSniff]with equivalent versions backported to this repository. - Drop PHP 7.2 support.
- Upgrade to easy-coding-standard 9.
- Add new fixers from PHP-CS-Fixer 2.17:
ArrayPushFixer- Converts simple usages ofarray_push($x, $y);to$x[] = $y;.SwitchContinueToBreakFixer- Switch case must not be ended withcontinuebut withbreak.LambdaNotUsedImportFixer- Lambda must not import variables it doesn't use.NoUselessSprintfFixer- There must be nosprintfcalls with only the first argument.SingleSpaceAfterConstructFixer- Ensures a single space after language constructs.CleanNamespaceFixer- Namespace must not contain spacing, comments or PHPDoc.TernaryToElvisOperatorFixer- Use the Elvis operator?:where possible.PhpdocOrderByValueFixerOrder phpdoc tags by value (order by default contents of 'covers', 'group' and 'throws').HeredocIndentationFixer- Heredoc/nowdoc content must be properly indented.
- Add new PHP_CodeSniffer sniffs:
GitMergeConflictSniff- Detects merge conflict artifacts left in files.
- Add various dangerous function calls to list of forbidden functions.
- Fix an improper fix of PSR-2 checks made in 2.0.3 to really make them being used again.
- Fix PSR-2 checks to be used again (they were unintentionally not loaded since coding-standard version 2.0.0).
- Lock dependency of
symplify/coding-standardto <7.2.20 to avoid deprecation errors.
- Increase required version of symplify/easy-coding-standard to ^7.2.3.
- Temporarily disable
ArrayDeclarationSniff.ValueNoNewlinebecause of bug in PHP_CodeSniffer 3.5.5.
- BC: change the way the standard is imported to your
easy-coding-standard.yaml(change%vendor_dir%placeholder directly to name of the vendor directory likevendor). See example in README. - Drop PHP 7.1 support.
- Require EasyCodingStandard 7+.
VisibilityRequiredFixernow check visibility is declared also on class constants.- Add
Symplify\ParamReturnAndVarTagMalformsFixer- the@param,@returnand@varannotations should keep standard format. - Add new fixers from PHP-CS-Fixer 2.15 and 2.16:
NativeFunctionTypeDeclarationCasingFixer- native type hints for functions should use the correct case.SingleTraitInsertPerStatementFixer- each traitusemust be done as single statement.PhpUnitDedicateAssertInternalTypeFixer- PHPUnit assertions likeassertIsArray()should be used overassertInternalType()(PHPUnit 7.5+ required).PhpUnitMockShortWillReturnFixer- Use of eg.->will($this->returnValue(..))must be replaced by its shorter equivalent such as->willReturn(...).
NoSuperfluousPhpdocTagsFixernow also removes superfluous@inheritdoctags.
- Require EasyCodingStandard 5+.
- Add new fixers from PHP-CS-Fixer 2.14 and 2.13:
CombineNestedDirnameFixer- replace multiple nested calls ofdirnameby only one call with second$levelparameter.FopenFlagOrderFixer- order the flags infopencalls,bandtmust be last.FopenFlagsFixer- the flags infopencalls must containband must omitt.ImplodeCallFixer- functionimplodemust be called with 2 arguments in the documented order.PhpdocVarAnnotationCorrectOrderFixer-@varand@typeannotations must have type and name in the correct order
- Keep
@mixedannotations preserved when explicitly declared.
- Replace deprecated
Symplify\CodingStandard\Fixer\Naming\MagicMethodsNamingFixerwithPhpCsFixer\Fixer\Casing\MagicMethodCasingFixer. - Add new fixers:
NoSuperfluousPhpdocTagsFixerto remove unnecessary@returnand@paramPHPDocs.PhpUnitTestCaseStaticMethodCallsFixerto unify how assertion methods in PHPUnit tests are called.SetTypeToCastFixerto ensure casting is used instead ofsettype().
- Change deprecated implementation of
Symplify\CodingStandard\Fixer\Naming\ClassNameSuffixByParentFixertoSymplify\CodingStandard\Sniffs\Naming\ClassNameSuffixByParentSniff
- Fix
Generic.Commenting.DocComment.SpacingBeforeTagsbeing reported on one-line phpDoc annotations (when PHP_Codesniffer 3.3.0+ is used).
- Add
SpecifyArgSeparatorFixerto make sure arg_separator is always defined when usinghttp_build_query()function. - Add PHPUnit fixers:
PhpUnitMockFixer: Ensure dedicated helper methodscreateMock()andcreatePartialMock()are used where possible instead of->getMock().PhpUnitNoExpectationAnnotationFixer: UsesetExpectedException()instead of@expectedExceptionannotation.PhpUnitSetUpTearDownVisibilityFixer: Visibility ofsetUp()andtearDown()method should be kept protected as defined in PHPUnit TestCase.
- Do not check for
EventSubscriberclass suffixes viaClassNameSuffixByParentFixer.
- Replace deprecated
ExceptionNameFixerwith more genericClassNameSuffixByParentFixer.
- Initial version