Совместимость PHPC с PHP Code Sniffer с PHP в Docker / Shell не позволяет создать CodeSniffer.conf, файловую систему только для чтения в phar - PullRequest
0 голосов
/ 06 августа 2020

Я пытаюсь запустить PHP тесты совместимости, используя этот набор инструментов: https://github.com/PHPCompatibility/PHPCompatibility

У меня есть phpcs (PHP Code Sniffer) как .phar файл. И я использую псевдоним для «phpcs», а также мои php,

Вот мои псевдонимы, чтобы вы знали:

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: введите описание изображения здесь

И я проверил, что это сработало, запустив мой php псевдоним вроде «php5516 -r 'phpinfo ();' >> somefile.txt ", и я увидел, что phar.readonly был выключен, и другие настройки также были в phpinfo.

1 Ответ

0 голосов
/ 11 августа 2020

Чтобы решить эту проблему, вам необходимо удалить «: ro» (что означает только чтение) из -v «$ HOME»: «$ HOME»: ro

...