composer-wp-pro-plugins icon indicating copy to clipboard operation
composer-wp-pro-plugins copied to clipboard

Composer PHP Fatal error

Open BoylenAdmin opened this issue 1 year ago • 2 comments

Hi Junaid,

We're encountering a composer error when deploying via Buddyworks. The execution logs have been attached for your reference. The error occurs during the "Run Deploy, Composer, NPM, and CSS" step.

The specific error message is as follows:

Connected. Executing commands... cd /home/ENCRYPTED/webapps/immanuel composer clear-cache PHP Fatal error: Uncaught Error: Class 'PhpOption\Option' not found in /home/ENCRYPTED/webapps/immanuel/vendor/vlucas/phpdotenv/src/Store/File/Reader.php:50 Stack trace: #0 /home/ENCRYPTED/webapps/immanuel/vendor/vlucas/phpdotenv/src/Store/File/Reader.php(26): Dotenv\Store\File\Reader::readFromFile() #1 /home/ENCRYPTED/webapps/immanuel/vendor/vlucas/phpdotenv/src/Store/FileStore.php(51): Dotenv\Store\File\Reader::read() #2 /home/ENCRYPTED/webapps/immanuel/vendor/vlucas/phpdotenv/src/Dotenv.php(157): Dotenv\Store\FileStore->read() #3 /home/ENCRYPTED/webapps/immanuel/vendor/vlucas/phpdotenv/src/Dotenv.php(170): Dotenv\Dotenv->load() #4 /home/ENCRYPTED/webapps/immanuel/vendor/junaidbhura/composer-wp-pro-plugins/Installer.php(95): Dotenv\Dotenv->safeLoad() #5 /home/ENCRYPTED/webapps/immanuel/vendor/junaidbhura/composer-wp-pro-plugins/Installer.php(54): Junaidbhura\Composer\WPProPlugins\Installer->loadDotenv() #6 phar:///usr/sbin/composer/src/Composer/Plugin/PluginManager.php(237): Junaidbhura\Composer\WPProPlugins\Installer->activate() in /home/ENCRYPTED/webapps/immanuel/vendor/vlucas/phpdotenv/src/Store/File/Reader.php on line 50 Fatal error: Uncaught Error: Class 'PhpOption\Option' not found in /home/ENCRYPTED/webapps/immanuel/vendor/vlucas/phpdotenv/src/Store/File/Reader.php:50 Stack trace: #0 /home/ENCRYPTED/webapps/immanuel/vendor/vlucas/phpdotenv/src/Store/File/Reader.php(26): Dotenv\Store\File\Reader::readFromFile() #1 /home/ENCRYPTED/webapps/immanuel/vendor/vlucas/phpdotenv/src/Store/FileStore.php(51): Dotenv\Store\File\Reader::read() #2 /home/ENCRYPTED/webapps/immanuel/vendor/vlucas/phpdotenv/src/Dotenv.php(157): Dotenv\Store\FileStore->read() #3 /home/ENCRYPTED/webapps/immanuel/vendor/vlucas/phpdotenv/src/Dotenv.php(170): Dotenv\Dotenv->load() #4 /home/ENCRYPTED/webapps/immanuel/vendor/junaidbhura/composer-wp-pro-plugins/Installer.php(95): Dotenv\Dotenv->safeLoad() #5 /home/ENCRYPTED/webapps/immanuel/vendor/junaidbhura/composer-wp-pro-plugins/Installer.php(54): Junaidbhura\Composer\WPProPlugins\Installer->loadDotenv() #6 phar:///usr/sbin/composer/src/Composer/Plugin/PluginManager.php(237): Junaidbhura\Composer\WPProPlugins\Installer->activate() in /home/ENCRYPTED/webapps/immanuel/vendor/vlucas/phpdotenv/src/Store/File/Reader.php on line 50

We initially suspected a PHP version mismatch, as the server is running PHP 7.4, while the Composer file was configured for PHP 7.1. We have since updated the Composer file to reflect PHP 7.4, and we are now able to run Composer and update our local copy of the site successfully. However, the deployment to the server is still failing with the error mentioned above.

I have also attached the Composer file for your reference.

Any insights or suggestions you can provide to resolve this issue would be greatly appreciated.

Thank you, and please let me know if you need any further information.

Best regards,

  • Adam (Boylen Support)

composer-json.txt

BoylenAdmin avatar May 24 '23 05:05 BoylenAdmin

Hey @BoylenAdmin !

Looks like an issue unrelated to this plugin.

Are you sure /home/ENCRYPTED/webapps/immanuel/vendor exists?

You may also want to try to update all composer dependencies.

junaidbhura avatar May 24 '23 06:05 junaidbhura

Hi Junaid,

We’ll take a look, but the /home/ENCRYPTED/webapps/immanuel/vendor exists on the designated server.

I’ll have our team update all composer dependencies.

Regards, Adam Tarca Support Manager

P: 08 8233 9433 D: 08 8233 9401 E: @.@.> W: www.boylen.com.auhttp://www.boylen.com.au/ [Icon Description automatically generated]https://support.boylen.com.au/support/tickets/new Submit a tickethttps://support.boylen.com.au/support/tickets/new

From: Junaid Bhura @.> Sent: Wednesday, May 24, 2023 4:26 PM To: junaidbhura/composer-wp-pro-plugins @.> Cc: Adam Tarca @.>; Mention @.> Subject: Re: [junaidbhura/composer-wp-pro-plugins] Composer PHP Fatal error (Issue #66)

Hey @BoylenAdminhttps://github.com/BoylenAdmin !

Looks like an issue unrelated to this plugin.

Are you sure /home/ENCRYPTED/webapps/immanuel/vendor exists?

You may also want to try to update all composer dependencies.

— Reply to this email directly, view it on GitHubhttps://github.com/junaidbhura/composer-wp-pro-plugins/issues/66#issuecomment-1560552245, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGK23DDZFKWS6IBRRTHQQGTXHWWHHANCNFSM6AAAAAAYM3CMY4. You are receiving this because you were mentioned.Message ID: @.@.>>

BoylenAdmin avatar May 25 '23 01:05 BoylenAdmin