Releases: loadsys/loadsys_codesniffer
3.0.8
3.0.7 Release
- Relaxes the namespace requirements for /config/Seeds/ files since Phinx is incapable of using Seed files that are namespaced.
- Fixes codesniffs.
3.0.6
Implements a single new sniff that requires classes to be imported at the top of the file via use Some\Class;
. Consider the following examples:
Invalid:
<?php
$var = new \DateTime();
$var = new \Vendor\Lib();
$var = new Local\SubClass();
Valid:
<?php
use Vendor\Lib;
use \DateTime;
//...
$var = new DateTime();
$var = new Lib();
3.0.5
Incorporates a number of improvements:
- Adds a sniff to enforce trailing commas on multi-line arrays. (Closes #40)
- Removes unnecessary rule duplication from
Loadsys/ruleset.xml
. (Closes #41) - Turns on code sniffs in Travis builds for the
Loadsys/Sniffs/
classes themselves by using a custom ruleset that likewise suppresses some of our normal rules that conflict with PHPCS requirements (not being able to use namespaces or CamelCased class names.) (Closes #42) - Imports some relaxed ruleset tweaks from real-world use to reduce noise from Cake 3 classes that "break the rules" (like Entity classes using
public $_accessible;
) - Reduces the severity of
Todo
markers to facilitate suppressing only those more easily via thecodesniffer-run
wrapper script in the CakePHP-Shell-Scripts repo.
3.0.4 Release
- Adds some handy debugging and informational resources to the README.
- Relaxes the namespace requirements for
*/config/Migrations/*
files since Phinx is incapable of using Migration files that are namespaced (it can't guess the fully-namespaced class name from the filename alone.)
3.0.3 Release
- Better tests!
- We can determine what sniffs a "failing" sample file is expected to trigger.
- We can tell when our sample tests collectively fail to "cover" a specific rule from our ruleset.
- We aren't excluding some parts of ruleset from phpunit test runs because our tests live in a folder blacklisted by the ruleset itself.
- Better docs!
- Lots of notes on testing the coding standard itself added.
- Better rules!
- Private and protected vars/methods starting with an underscore are now reported as a warning. The sniff is valuable because "best practice" is to not use the underscore prefix, but due to the Cake 3 core still requiring this pattern in certain places, like Entities, we don't want this to be a hard error. Switching to a warning allows us to suppress them during Travis builds, while still alerting developers to the usage during local sniff runs.
- Opening brackets are enforced again (on the same line).
- Tabs are fully enforced.
3.0.2 Release
Sorted and eliminated duplicate rules.
Removed the Commented Out Code Rule.
Adds TODO Comments as Warnings
Underscored Variables and Functions are now Warnings as opposed to Errors.
Documented usage of the -n
CLI option to suppress warnings for Travis Builds.
Updated underscored method/var rules.
Excludes Entities from sniffs that disallow methods and properties starting with an underscore (since Entities must use this pattern in Cake 3.)
Initial 3.0.0 Release
Updates to support PHP Code Sniffer 2.1
Updates to support CakePHP Code Sniff Version 2.x
Updates to support CakePHP version 3.x Projects
Any future support for CakePHP 3.x Projects will be based on this Major Version.
To support CakePHP 2.x Projects use the 2.x branch of this project.
Initial 2.0.0 Release
Initial release to target Cake 2.x projects.
No major changes from the 1.x branch, simply updating the SemVer numbers to match CakePHP version numbers.