Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 725572 - dev-php/PHP_CodeSniffer-3.5.4 config file path error
Summary: dev-php/PHP_CodeSniffer-3.5.4 config file path error
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-05-27 06:59 UTC by Giuseppe Foti
Modified: 2022-06-27 09:29 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild with fix (PHP_CodeSniffer-3.6.1.ebuild,1.45 KB, text/plain)
2022-06-27 09:13 UTC, sligo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Giuseppe Foti 2020-05-27 06:59:38 UTC
Hi, I tried to install the PHPCompatibility config set with this command

phpcs --config-set installed_paths /path/to/PHPCodeSniffer/PHPCompatibility-9.3.5
but I received this error message:

PHP Warning:  file_put_contents(/usr/share/php/data/PHP_CodeSniffer/CodeSniffer.conf): failed to open stream: No such file or directory in /usr/share/php/PHP/CodeSniffer/src/Config.php on line 1598
ERROR: Config file /usr/share/php/data/PHP_CodeSniffer/CodeSniffer.conf could not be written

I installed phpcs from portage and it creates 
/usr/share/php/data/PHP/CodeSniffer/CodeSniffer.conf.dist

and the install dir is
/usr/share/php/PHP/CodeSniffer
Comment 1 sligo 2022-06-27 09:13:58 UTC
Created attachment 788003 [details]
Ebuild with fix

This issue remains and installing any additional configs isn't possible. The fix is a trivial change in the Ebuilds src_prepare sed line.

Adding the fixed Ebuild (sed on line 30).