• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Laravel Deployment Composer Error

andrewsk

New Pleskian
Server operating system version
Linux
Plesk version and microupdate number
18.0.45
I am using the Laravel Toolkit which has been really great!
All of a sudden I am now receiving this error on the Installing Composer dependencies step when I run the Update feature on the Deployment tab:
The task "ext-laravel-task\laravelupdatetask" has failed.
In PluginManager.php line 762:
plesk/composer-command-info (installed globally) contains a Composer plugin which is blocked by your allow-plugins config. You may add it to the list if you consider it safe.
You can run "composer global config --no-plugins allow-plugins.plesk/composer-command-info [true|false]" to enable it (true) or disable it explicitly and suppress this exception (false)

I've tried the recommended fix here, along with trying to run the composer global command that the error states to do, but nothing.
This was working correctly a few weeks ago, so I'm not sure if something happened in this recent update or not.

Any guidance would be appreciated!
 
Actually, issue seemed to have resolved itself by removing the Composer extension, then adding it back and rescanning.
Leaving just in case this happens to anyone else
 
Still a problem if I re-install it. Maybe a plesk developer could check this out. Global check is already disabled and this message still occours.
 
Still a problem if I re-install it. Maybe a plesk developer could check this out. Global check is already disabled and this message still occours.
The next day after I posted the fix, it happened again.
Removing the composer extension and the data along with it then reinstalling and rescanning was still the fix for me.

This solution works for me because I only have 1 app on this server, others with more may not find this workaround viable, so there is something to still be looked at by the extension devs.
 
I fixed it for `<username>` with these commands:

```
# su - <username>
$ /opt/plesk/php/8.0/bin/php /usr/lib64/plesk-9.0/composer.phar global config --no-plugins allow-plugins.plesk/composer-command-info true
```
 
I don't if you have resolved this issue, but maybe someone will look at this after.
I had Composer version 2.3 and didn't work out with any solution i had found, so i downgraded Composer to version 2.0 and everything worked as usual.
I found this that may be helpful:

"Composer 2.2 comes with a new security feature, it does not trust plugins by default unless you specify it in the composer file, in July 2022 plugins will no longer be executed if they aren't specified in the composer.json file.
So, you have two options:
  • Downgrade Composer to < 2.2 version (this worked for me).
  • Update composer.json file accepting the request when running composer install (didn't work for me)."
I don't know if Plesk isn't compatible with this feature, but surely it does gives you problems.
 
Back
Top