Got the message after fresh install of phpcs/drupalcs.

Uncaught exception 'PHP_CodeSniffer_Exception' with message 'Referenced sniff PSR2.Classes.PropertyDeclaration does not exist' in /usr/share/php/PHP/CodeSniffer.php:859

  • Ubuntu server 12.10
  • PHP 5.4.6
  • php-codesniffer 1.3.4-1
CommentFileSizeAuthor
#1 coder-1857906-1.patch847 byteschi

Comments

chi’s picture

Status: Active » Needs review
StatusFileSize
new847 bytes

In my case phpcs has been installed from apt. Now I've installed phpcs 1.4.3 from pear and fixed the problem.
Seems like PSR standards were introduced in phpcs 1.3.5. So we need bump code sniffer requirements.

klausi’s picture

Component: Code Sniffer » Coder Review
Status: Needs review » Fixed

Committed, thanks!

klausi’s picture

Component: Coder Review » Coder Sniffer

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sgabe’s picture

Just a note if somebody bumps into this. Unfortunately installing PHPCS 1.3.5 did not solve the issue for me, though I see PSR2 in the Standards directory. In turn the latest 1.5.0RC3 seems unsupported at this time, hence I tried to install 1.4.3 as mentioned in the first post and that actually solved the issue.