PEAR CS: Add an exception for PHPUnitDescription:
------------
PHPUnit relies on a constant, named "PHPUnit_MAIN_METHOD".
The PEAR CS asks for all constants to be uppercase.
What happens is people do the right thing, and fix their code; only to have PHPUnit running their tests twice.
if (PHPUNIT_MAIN_METHOD == 'PHP_Shell_AllTests::main') {
PHP_Shell_AllTests::main();
}
vs:
if (PHPUnit_MAIN_METHOD == 'PHP_Shell_AllTests::main') {
PHP_Shell_AllTests::main();
}
Consider adding an exception for this to the relevant sniff.doconnor
doconnorhttp://pear.php.net/bugs/17798
PHP_CodeSniffer Feature/Change Request
Reported by doconnor
2010-08-22T22:41:39+00:00
PHP: 5.3.3 OS: Package Version: SVN
Description:
------------
PHPUnit relies on a constant, named "PHPUnit_MAIN_METHOD".
The PEAR CS asks for all constants to be uppercase.
What happens is people do the right thing, and fix their code; only to have PHPUnit running their tests twice.
if (PHPUNIT_MAIN_METHOD == 'PHP_Shell_AllTests::main') {
PHP_Shell_AllTests::main();
}
vs:
if (PHPUnit_MAIN_METHOD == 'PHP_Shell_AllTests::main') {
PHP_Shell_AllTests::main();
}
Consider adding an exception for this to the relevant sniff.]]>PHP_CodeSniffer Feature/Change Request
Reported by doconnor
2010-08-22T22:41:39+00:00
PHP: 5.3.3 OS: Package Version: SVN
Description:
------------
PHPUnit relies on a constant, named "PHPUnit_MAIN_METHOD".
The PEAR CS asks for all constants to be uppercase.
What happens is people do the right thing, and fix their code; only to have PHPUnit running their tests twice.
if (PHPUNIT_MAIN_METHOD == 'PHP_Shell_AllTests::main') {
PHP_Shell_AllTests::main();
}
vs:
if (PHPUnit_MAIN_METHOD == 'PHP_Shell_AllTests::main') {
PHP_Shell_AllTests::main();
}
Consider adding an exception for this to the relevant sniff.]]>2010-08-22T22:41:39+00:00
sebastian [2010-08-25 15:34] http://pear.php.net/bugs/17798#1282750441
PHPUnit no longer relies on this constant (at least since PHPUnit 3.4).]]>PHPUnit no longer relies on this constant (at least since PHPUnit 3.4).]]>2010-08-25T15:34:01+00:00
squiz [2010-08-23 04:53] http://pear.php.net/bugs/17798#1282539232
And forgot to mention that this is now working in SVN.]]>And forgot to mention that this is now working in SVN.]]>2010-08-23T04:53:52+00:00
squiz [2010-08-23 04:53] http://pear.php.net/bugs/17798#1282539209
<div id="changeset">
<span class="removed">-Status: Open</span>
<span class="added">+Status: Closed</span>
<span class="removed">-Assigned To:</span>
<span class="added">+Assigned To: squiz</span>
</div>I don't see any reason not to include the exception.]]><div id="changeset">
<span class="removed">-Status: Open</span>
<span class="added">+Status: Closed</span>
<span class="removed">-Assigned To:</span>
<span class="added">+Assigned To: squiz</span>
</div>I don't see any reason not to include the exception.]]>2010-08-23T04:53:29+00:00
jeff_dickey [2010-08-23 02:50] http://pear.php.net/bugs/17798#1282531806
Agreed this should be an exception. While the dogmatic approach would be to ask Sebastian to change his constant name, the sheer number of user tests that would almost certainly break were he to do so argue convincingly for a legacy-code exception to the rule. (Perhaps a duplicate, all-caps constant could be added, documented and encouraged, with the mixed-case one marked as legacy code that will break in a future non-BC release of PHPUnit?)]]>Agreed this should be an exception. While the dogmatic approach would be to ask Sebastian to change his constant name, the sheer number of user tests that would almost certainly break were he to do so argue convincingly for a legacy-code exception to the rule. (Perhaps a duplicate, all-caps constant could be added, documented and encouraged, with the mixed-case one marked as legacy code that will break in a future non-BC release of PHPUnit?)]]>2010-08-23T02:50:06+00:00