Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Fatal error: Uncaught Error: Class 'drupol\phposinfo\OsInfo' not found #4375

Closed
mikemadison13 opened this issue May 17, 2021 · 2 comments · Fixed by #4377
Closed

PHP Fatal error: Uncaught Error: Class 'drupol\phposinfo\OsInfo' not found #4375

mikemadison13 opened this issue May 17, 2021 · 2 comments · Fixed by #4377
Labels
Bug Something isn't working

Comments

@mikemadison13
Copy link
Contributor

Describe the bug
After updating to BLT 13.x, BLT update runs and fails with the following:

PHP Fatal error:  Uncaught Error: Class 'drupol\phposinfo\OsInfo' not found

To Reproduce
Steps to reproduce the behavior, ideally starting from a fresh install of BLT:

  1. update composer.json to ^13 for BLT
  2. Run composer update acquia/blt --with-all-dependences

Expected behavior
BLT update runs successfully

Detailed error output

blt update
PHP Fatal error:  Uncaught Error: Class 'drupol\phposinfo\OsInfo' not found in /Users/mike.madison/git/d4g/Drupal-GovCon-2017/vendor/acquia/blt/src/Robo/Common/EnvironmentDetector.php:157
Stack trace:
#0 /Users/mike.madison/git/d4g/Drupal-GovCon-2017/vendor/acquia/blt/src/Robo/Common/EnvironmentDetector.php(171): Acquia\Blt\Robo\Common\EnvironmentDetector::getPlatform()
#1 /Users/mike.madison/git/d4g/Drupal-GovCon-2017/vendor/acquia/blt/src/Robo/Blt.php(116): Acquia\Blt\Robo\Common\EnvironmentDetector::getMachineUuid()
#2 /Users/mike.madison/git/d4g/Drupal-GovCon-2017/vendor/acquia/blt/src/Robo/Blt.php(92): Acquia\Blt\Robo\Blt->initializeAmplitude()
#3 /Users/mike.madison/git/d4g/Drupal-GovCon-2017/vendor/acquia/blt/bin/blt-robo-run.php(34): Acquia\Blt\Robo\Blt->__construct(Object(Acquia\Blt\Robo\Config\DefaultConfig), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Composer\Autoload\ClassLoader))
#4 /Users/mike.madison/git/d4g/Drupal-GovCon-2017/vendor/acquia/b in /Users/mike.madison/git/d4g/Drupal-GovCon-2017/vendor/acquia/blt/src/Robo/Common/EnvironmentDetector.php on line 157

Fatal error: Uncaught Error: Class 'drupol\phposinfo\OsInfo' not found in /Users/mike.madison/git/d4g/Drupal-GovCon-2017/vendor/acquia/blt/src/Robo/Common/EnvironmentDetector.php:157
Stack trace:
#0 /Users/mike.madison/git/d4g/Drupal-GovCon-2017/vendor/acquia/blt/src/Robo/Common/EnvironmentDetector.php(171): Acquia\Blt\Robo\Common\EnvironmentDetector::getPlatform()
#1 /Users/mike.madison/git/d4g/Drupal-GovCon-2017/vendor/acquia/blt/src/Robo/Blt.php(116): Acquia\Blt\Robo\Common\EnvironmentDetector::getMachineUuid()
#2 /Users/mike.madison/git/d4g/Drupal-GovCon-2017/vendor/acquia/blt/src/Robo/Blt.php(92): Acquia\Blt\Robo\Blt->initializeAmplitude()
#3 /Users/mike.madison/git/d4g/Drupal-GovCon-2017/vendor/acquia/blt/bin/blt-robo-run.php(34): Acquia\Blt\Robo\Blt->__construct(Object(Acquia\Blt\Robo\Config\DefaultConfig), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Composer\Autoload\ClassLoader))
#4 /Users/mike.madison/git/d4g/Drupal-GovCon-2017/vendor/acquia/b in /Users/mike.madison/git/d4g/Drupal-GovCon-2017/vendor/acquia/blt/src/Robo/Common/EnvironmentDetector.php on line 157

Additional context
Manually running composer require drupol/phposinfo seems to correct the issue, so I'm guessing either BLT or the Environment Detector need to be updated to have this as a dependency.

@mikemadison13 mikemadison13 added the Bug Something isn't working label May 17, 2021
@protitude
Copy link

I'm getting the same bug, thanks for the fix.

@danepowell
Copy link
Contributor

Thanks for reporting, I suspect this is a regression introduced by #4374

Seems like I overlooked the fact that the new class is not a drop-in replacement because of the new namespace

danepowell added a commit that referenced this issue Jun 29, 2021
* Fix #4375: Add required drupol/phposinfo dependency

* Removed abandoned drupol/phposinfo, updated EnvironmentDetector to use new version

* Require loophp/phposinfo 1.7

* New version

Co-authored-by: Dane Powell <git@danepowell.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants