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

  ID: 20231
  Updated by: gsherwood@squiz.net
  Reported By: sb at sebastian-bergmann dot de
  Summary: Cannot use custom standard with PHAR
-Status: Open
+Status: Closed
  Type: Bug
  Package: PHP_CodeSniffer
  Operating System: Linux
  Package Version: SVN
  PHP Version: HEAD SVN-2014-03-31
-Assigned To:
+Assigned To: squiz
  Roadmap Versions:
  New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: squiz
Committed a fix here:
https://github.com/squizlabs/PHP_CodeSniffer/commit/a2b3a9ef164995e0e8dcf2aac6
35355ef490f38f


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

[2014-03-31 10:32:06] sebastian

Description:
------------
git clone git@github.com:squizlabs/PHP_CodeSniffer.git

git checkout phpcs-fixer

php scripts/build-phar.php phpcs.phar
Building phpcs phar
  => /usr/local/src/PHP_CodeSniffer/phpcs.phar
  => adding files from package.xml... done
  => adding stub... done
Building phpcbf phar
  => /usr/local/src/PHP_CodeSniffer/phpcbf.phar
  => adding files from package.xml... done
  => adding stub... done

phpcs.phar --standard=/path/to/custom/standard .

Warning:
file_get_contents(phar:///usr/local/src/PHP_CodeSniffer/phpcs.phar/CodeSniffer/Standards//path/to/custom/standard):
failed to open stream: phar error:
"CodeSniffer/Standards/path/to/custom/standard" is not a file in phar
"/usr/local/src/PHP_CodeSniffer/phpcs.phar" in
phar:///usr/local/src/PHP_CodeSniffer/phpcs.phar/CodeSniffer.php on line
662

Fatal error: Uncaught exception 'PHP_CodeSniffer_Exception' with message
'Ruleset
phar:///usr/local/src/PHP_CodeSniffer/phpcs.phar/CodeSniffer/Standards//path/to/custom/standard
is not valid' in
phar:///usr/local/src/PHP_CodeSniffer/phpcs.phar/CodeSniffer.php:664
Stack trace:
#0
phar:///usr/local/src/PHP_CodeSniffer/phpcs.phar/CodeSniffer.php(533):
PHP_CodeSniffer->processRuleset('phar:///usr/loc...')
#1
phar:///usr/local/src/PHP_CodeSniffer/phpcs.phar/CodeSniffer/CLI.php(727):
PHP_CodeSniffer->initStandard(Array, Array)
#2
phar:///usr/local/src/PHP_CodeSniffer/phpcs.phar/CodeSniffer/CLI.php(91):
PHP_CodeSniffer_CLI->process()
#3 /usr/local/src/PHP_CodeSniffer/phpcs.phar(2):
PHP_CodeSniffer_CLI->runphpcs()
#4 {main}
   thrown in
phar:///usr/local/src/PHP_CodeSniffer/phpcs.phar/CodeSniffer.php on line
664

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouppear-bugs @
categoriesphp
postedMar 31, '14 at 11:07p
activeMar 31, '14 at 11:07p
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase