Closed elb98rm closed 3 years ago
@elb98rm Thanks for reporting this.
Unfortunately I have not been able to reproduce the issue (on Windows).
Steps I executed using PHP 7.4.12 and Composer 2.0.7:
composer create-project --prefer-dist cakephp/app:~4.0 my_app_name
cd my-app_name
vendor/bin/phpcs -i
All worked and finished without errors, with the output of the last command being The installed coding standards are MySource, PEAR, PSR1, PSR12, PSR2, Squiz, Zend, SlevomatCodingStandard and CakePHP
.
As Windows is more fiddly than Linux, I expect the same results on Ubuntu.
In your issue you mention that you are attempting to update the install though. I'm willing to give it another try, but would need more detailed information on what the old version of CakePHP was from which you are upgrading, possibly a composer.lock
file of the old install would help. Also, what is the update command you are using ?
I've seen similar issues in the past that were related to composer being run from one environment for the initial install but then run from another environment for a sebsequent update. For instance when Docker or other virtual environments were involved.
Read/Write/Delete errors then occur because the access right from one environment do not match that of the other.
@elb98rm Could something like that be happening here?
Hi, sorry for the delay! Was away for the weekend.
I've been able to resolve this by executing this in another folder; which suggests that permissions are wrong somehow.
Not sure if it's vagrant weirdness either... the relevant folder (/var/www/test
) was set to 777.
This executed fine in the home directory however.
However, I find this even weirder.. composer doesn't fail for other modules, and scripts associated with other frameworks don't seem to have a problem.
Oh well. For anyone else with this issue:
"Try it in your home directory".
Thanks for investigating.
@elb98rm Thanks for getting back to us and posting your solution. Hopefully it will help someone else who may run into this.
Problem/Motivation
Attempting to do a CakePHP upgrade using composer and this plugin is failing
Expected behaviour
Composer should update normally
Actual behaviour
Composer runs into errors:
Using either:
"cakephp/cakephp-codesniffer":
:"0.7.0"
or"dev-master"
results in:(which then causes):
Steps to reproduce
This is a clean install from cakephp, using the dev-master branch.
Proposed changes
Have attempted to use
dev-master
as described above.Environment
composer create-project --prefer-dist cakephp/app:~4.0 my_app_name
Output of
vendor/bin/phpcs --config-show
:Tested against
master
branch?master
branch.