| Newsgroups |
php.pear.bugs |
| Message-ID |
<[email protected]> |
Edit report at https://pear.php.net/bugs/bug.php?id=20323&edit=1
ID: 20323
Comment by: [email protected]
Reported By: info at bsnw dot nl
Summary: PHPCS tries to load sniffs from hidden directories
Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Operating System: Fedora 20
Package Version: 1.5.3
PHP Version: 5.5.13
Assigned To: squiz
Roadmap Versions:
New Comment:
This broke coding standard installations in the hidden .composer
directory. Fix proposed here:
https://github.com/squizlabs/PHP_CodeSniffer/pull/229
Previous Comments:
------------------------------------------------------------------------
[2014-07-02 07:06:12] squiz
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: squiz
Fix committed to github repo:
https://github.com/squizlabs/PHP_CodeSniffer/commit/11ac602ef55af565585e048592
6bef14260276d0
------------------------------------------------------------------------
[2014-06-28 12:07:32] gboer
Description:
------------
Mac OS creates hidden directories like ".AppleDouble" and stores
information about the files that it finds within the directory it is in.
Each file it stores information about, is stored in the .AppleDouble
directory with the exact same filename. So information about Test.php
would be stored in .AppleDouble as Test.php as well. However, the
information is stored in binary and is in no way actual PHP-code.
When phpcs tries to load sniffs from a directory, it also scans these
hidden Mac OS directories and tries to execute it, which it obviously
can't. This results in rather ugly fatal errors after which phpcs is
unable to continue.
Expected result:
----------------
I expect phpcs to ignore hidden directories when trying to load sniffs,
since this not only impacts directories that are created by Mac OS, but
also svn and possibly other systems that create directories like this as
well.
Actual result:
--------------
Errors like this:
????DEV?INO?SYN?SV~?DisallowHashCommentsSniff.phpF?F?F?n????Mn Fatal
error: Class
'phpcs_Sniffs_Commenting_.AppleDouble_DisallowHashCommentsSniff' not
found in /usr/share/pear/PHP/CodeSniffer.php on line 1053
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=20323&edit=1