FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=19448&edit=1

ID: 19448
Updated by: gsherwood@squiz.net
Reported By: papadopa+pear at gmail dot com
Summary: Problem with detecting remote standards
-Status: Assigned
+Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Package Version: 1.3.4
PHP Version: 5.3.3
Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Assigned
+Status: Closed
Appears that the symlink issue has been fixed by other changes anyway,
so I've
been able to revert it and allow this functionality to work again.

Committed to Github repo:
https://github.com/squizlabs/PHP_CodeSniffer/commit/fbab82e310f76b9e77ca9bcf1d
a08f76f16e2de5


Previous Comments:
------------------------------------------------------------------------

[2012-06-19 01:43:32] squiz

-Assigned To:
+Assigned To: squiz
This was specifically changed in this commit:
https://github.com/squizlabs/PHP_CodeSniffer/commit/5de1faaa66730a165e9bb72fa
28780b38d6c30c4

To allow symlinks to work. Reverting this line certainly does fix this
issue, but I'm
going to have to find another way around the symlink issue first.

Thanks for finding the bad line of code for this. Helped a lot.

------------------------------------------------------------------------

[2012-06-01 17:46:21] acp

Description:
------------
While trying to use a "remote" (as in not in phpcs' installation path),
I got
errors indicating that phpcs could not find the Sniff files.

Having checked the code, making one small change on line 834 (of the
1.3.4 release) was enough to fix this. Changed:
$path =
realpath(dirname(__FILE__).'/CodeSniffer/Standards').DIRECTORY_SEPAR
ATOR.$path;

to

$path =
realpath(dirname(__FILE__).'/CodeSniffer/Standards'.DIRECTORY_SEPAR
ATOR.$path);

(see the closing parenthesis of realpath)

Since dirname(__FILE__) . '/CodeSniffer/Standards' will in normal
circumstances refer to the local standards, this should not return
false,
therefore the immediatly next line (if ($path === false....) does not
really
make sense imho. However, including the whole path up to the sniff in
realpath() will correctly check for its existence and return false if
not
found.

This problem makes "remote" standards not useable.

------------------------------------------------------------------------

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
grouppear-bugs @
categoriesphp
postedJun 18, '12 at 11:38p
activeJun 19, '12 at 12:33a
posts2
users1
websitepear.php.net

1 user in discussion

Gsherwood: 2 posts

People

Translate

site design / logo © 2022 Grokbase