Closed geerteltink closed 6 years ago
@weierophinney There is an inconsistency in the copyright line in the license files throughout the components:
Copyright (c) 2015-2016, Zend Technologies USA, Inc. All rights reserved.
Vs
Copyright (c) 2015-2016, Zend Technologies USA, Inc.
All rights reserved.
Also I've tested this against zend-expressive and all source code files are updated as expected. I've only found some issues with updating the copyright date which needs to be fixed.
@weierophinney I've ironed out the issues. The dates in COPYING and LICENSE are now updated correctly. And the text in those files are now forced to be the same as the default so we get consistency between all components. So far I've tested zend-expressive and zend-code. In 14 seconds it updated all source files and created COPYING.md.
I've ran into another consistency issue.
Expressive:
/**
* @see https://github.com/zendframework/zend-expressive for the canonical source repository
* @copyright https://github.com/zendframework/zend-expressive/blob/master/COPYING.md Copyright
* @license https://github.com/zendframework/zend-expressive/blob/master/LICENSE.md New BSD License
*/
zend-code:
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
Specifically the extra text and @see
Vs @link
. This can be fixed as well, but I need to know what the preferred format should be.
EDIT: According to PSR-5 PHPDoc (if it ever gets released), @link
is deprecated. I'll enforce the @see
tag.
Example phpcs.xml
config file in a component:
<?xml version="1.0"?>
<ruleset name="Zend Framework Coding Standard">
<!-- Load ruleset -->
<rule ref="./vendor/zendframework/zend-coding-standard/src/ZendCodingStandard/ruleset.xml"/>
<!-- Check copyright and license files -->
<file>./COPYRIGHT.md</file>
<file>./LICENSE.md</file>
<!-- Paths to check -->
<file>./src</file>
<file>./test</file>
<!-- Exclude test assets -->
<exclude-pattern>*/TestAsset/*</exclude-pattern>
</ruleset>
/cc @weierophinney
Superseded by #4
The test are executed independent of the standard
AbstractSniffUnitTest
class. That class is only available ifPHP_CodeSniffer
is downloaded by composer withprefer-source
.Copyright year detection:
Violation detection (when running phpcs):
Fixes (when running phpcbf):
TODO:
Discussion:
<rule ref="vendor/zendframework/zend-coding-standard/ruleset.xml"/>
<rule ref="vendor/zendframework/zend-coding-standard/src/ZendCodingStandard/ruleset.xml"/>
The first is like a wrapper and loads the second one anyway.