Deekshith's avatar

Composer error when i try to use composer commands

i am trying to use compose update but getting below error,

Fatal error: Class UpdateHelper\ComposerPlugin contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Composer\Plugin\PluginInterface::deactivate, Composer\Plugin\PluginInterface::uninstall) in /projectpath/public_html/vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php on line 11

I am using "laravel/framework": "5.5.*", Any suggestions/Fix? Shall i delete kylekatarnls folder inside vendor?

0 likes
8 replies
Deekshith's avatar

@tisuchi Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.2.5". You are running 7.1.33. in /projectpath/public_html/vendor/composer/platform_check.php on line 24

Now i am getting above error any suggestion?

tisuchi's avatar

@deekshith This means, your php version is 7.1.33 but for some reasons (probably some of the packages need a higher version of php) composer required 7.2.5 version or above.

So, if possible, I strongly suggest you to upgrade php version at least. It's recommeneded also to upgradate Laravel version (The current version is 8 and you are using 5.5)

Deekshith's avatar

Ya I changed and is there any quick fix for sizeof problem for first ()?

munazzil's avatar

You could try with below command , it will allow only what are the packages currently with your composer.json file not upgrading or downgrading,

    composer install --ignore-platform-reqs
Deekshith's avatar

to avoid warning and error in sizeof() for query of single element i have used below code in web.php

if(version_compare(PHP_VERSION, '7.2.0', '>=')) {
    error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);
}

any security issue? i am working on some changes in application and it will take some days to complete. for temporary i am using this.

Please or to participate in this conversation.