Search code examples
phpphpcodesnifferphpcs

phpcs error references old project path -- how do I update the path?


When I run phpcs, it prints an error that references the path where my project formerly was located, but is no longer located...

PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'DirectoryIterator::__construct(/my/old/directory/public_html/coder/coder_sniffer): failed to open dir: No such file or directory' in /usr/share/php/PHP/CodeSniffer.php:2159

How do I fix the my/old/directory path?


Solution

  • I was able to fix the problem by following the instructions at https://www.drupal.org/node/1419988 under "Install Coder and PHPCS with Composer"

    I did not need to do the parts that begin "If you wish to use a different version of coder" and "You can also use a git repository".