junaidbhura/composer-wp-pro-plugins

Composer PHP Fatal error

Opened this issue · 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

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.