Search code examples
phpdockershelllinux-mintphpcs

PHPCompatibility with PHP Code Sniffer, with PHP in Docker/Shell, fails to create CodeSniffer.conf , Read-only file system in phar


I'm trying to run PHP Compatibility tests, using this tool set: https://github.com/PHPCompatibility/PHPCompatibility

I have the phpcs (PHP Code Sniffer) as a .phar file. And I use an alias for the "phpcs" as well as my php ,

Here are my aliases so you know:

enter image description here

My PHP executable is basically this:

enter image description here

And as you can see in the aliases I pass an "php_phar_readonly_false.ini" configuration file, it basically sets the phar.readonly = Off , and I have tested and the configuration takes effect,

But, when I get to the step where I have to add the PHPCompatibility in the installed_paths, I get an error saying filesystem is readonly inside my phpcs.phar , I thought passing the .ini configuration with phar.readonly = Off would solve but it did not,

Here is what I am talking about:

enter image description here

I have tried using chmod to change permissions of the phpcs.phar but with no luck, I have also tried to use the paths directly without aliases but also no luck,

I basically would like to be able to run the tool to test PHP Compatibility from anywhere, using the phar files, without composer installs or other methods if possible,

Help would be appreciated, Thanks in advance!

Btw the .ini configuration is basically this: enter image description here

And I have tested that it took effect by running my php alias like "php5516 -r 'phpinfo();' >> somefile.txt" and I saw that phar.readonly was Off and other settings were there in the phpinfo too.


Solution

  • To solve this issue you have to remove the ":ro" ( which means read only ) from the -v "$HOME":"$HOME":ro