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

Cannot install with composer on php 7.0, 7.1 & 7.2 because of incorrect phposinfo reference/usage #115

Open
tenzap opened this issue Feb 13, 2024 · 1 comment

Comments

@tenzap
Copy link

tenzap commented Feb 13, 2024

When running php 7.0, 7.1 & 7.2, composer is not able to install your package.

Error is:

  - Installing seld/jsonlint (1.10.2): Extracting archive
  - Installing loophp/phposinfo (1.6.5): Extracting archive
  - Installing vaimo/composer-patches (5.1.2): Extracting archive
    Install of vaimo/composer-patches failed
Error: Class 'loophp\phposinfo\OsInfo' not found

In Context.php line 16:

The problem apparently could be that you ask for 'loophp\phposinfo\OsInfo' while in loophp/phposinfo (1.6.5) (which is the most recent version for php 7.0 7.1 & 7.2) the composer.json of upstream actually advertises itself as drupol/phposinfo.

https://github.com/loophp/phposinfo/blob/1.6.5/composer.json

Maybe you could use drupol if loophp is not available?

@tenzap tenzap changed the title Cannot install with composer on php 7.0, 7.1 & 7.2 because of incorrect phposinfo Cannot install with composer on php 7.0, 7.1 & 7.2 because of incorrect phposinfo reference/usage Feb 13, 2024
tenzap added a commit to tenzap/Kalkun that referenced this issue Feb 13, 2024
because with vaimo/composer-patches patching randomly fails with weird errors:
There is also vaimo/composer-patches#115

Processing patches configuration
  - Applying patches for codeigniter/framework (2)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support.patch [NEW]
      Add support for PHP 8.2 (part1)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support-part2.patch [NEW]
      Add support for PHP 8.2 (part2)

Error: Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-test/CONTRIBUTING.md:

In Filesystem.php line 288:

  Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-t
  est/CONTRIBUTING.md:

or

Processing patches configuration
  - Applying patches for codeigniter/framework (2)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support.patch [NEW]
      Add support for PHP 8.2 (part1)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support-part2.patch [NEW]
      Add support for PHP 8.2 (part2)

Error: Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-test/.gitignore:

In Filesystem.php line 288:

  Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-t
  est/.gitignore:
tenzap added a commit to tenzap/Kalkun that referenced this issue Feb 13, 2024
because with vaimo/composer-patches patching randomly fails with weird errors:
There is also vaimo/composer-patches#115

Processing patches configuration
  - Applying patches for codeigniter/framework (2)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support.patch [NEW]
      Add support for PHP 8.2 (part1)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support-part2.patch [NEW]
      Add support for PHP 8.2 (part2)

Error: Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-test/CONTRIBUTING.md:

In Filesystem.php line 288:

  Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-t
  est/CONTRIBUTING.md:

or

Processing patches configuration
  - Applying patches for codeigniter/framework (2)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support.patch [NEW]
      Add support for PHP 8.2 (part1)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support-part2.patch [NEW]
      Add support for PHP 8.2 (part2)

Error: Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-test/.gitignore:

In Filesystem.php line 288:

  Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-t
  est/.gitignore:
tenzap added a commit to tenzap/Kalkun that referenced this issue Feb 13, 2024
because with vaimo/composer-patches:
- there is vaimo/composer-patches#115 which refrains
  from using it on php 7.0 7.1 & 7.2
- patching randomly fails with weird errors:

Processing patches configuration
  - Applying patches for codeigniter/framework (2)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support.patch [NEW]
      Add support for PHP 8.2 (part1)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support-part2.patch [NEW]
      Add support for PHP 8.2 (part2)

Error: Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-test/CONTRIBUTING.md:

In Filesystem.php line 288:

  Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-t
  est/CONTRIBUTING.md:

or

Processing patches configuration
  - Applying patches for codeigniter/framework (2)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support.patch [NEW]
      Add support for PHP 8.2 (part1)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support-part2.patch [NEW]
      Add support for PHP 8.2 (part2)

Error: Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-test/.gitignore:

In Filesystem.php line 288:

  Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-t
  est/.gitignore:
tenzap added a commit to tenzap/Kalkun that referenced this issue Feb 13, 2024
because with vaimo/composer-patches:
- there is vaimo/composer-patches#115 which refrains
  from using it on php 7.0 7.1 & 7.2
- patching randomly fails with weird errors:

Processing patches configuration
  - Applying patches for codeigniter/framework (2)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support.patch [NEW]
      Add support for PHP 8.2 (part1)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support-part2.patch [NEW]
      Add support for PHP 8.2 (part2)

Error: Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-test/CONTRIBUTING.md:

In Filesystem.php line 288:

  Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-t
  est/CONTRIBUTING.md:

or

Processing patches configuration
  - Applying patches for codeigniter/framework (2)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support.patch [NEW]
      Add support for PHP 8.2 (part1)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support-part2.patch [NEW]
      Add support for PHP 8.2 (part2)

Error: Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-test/.gitignore:

In Filesystem.php line 288:

  Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-t
  est/.gitignore:
tenzap added a commit to kalkun-sms/Kalkun that referenced this issue Feb 17, 2024
because with vaimo/composer-patches:
- there is vaimo/composer-patches#115 which refrains
  from using it on php 7.0 7.1 & 7.2
- patching randomly fails with weird errors:

Processing patches configuration
  - Applying patches for codeigniter/framework (2)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support.patch [NEW]
      Add support for PHP 8.2 (part1)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support-part2.patch [NEW]
      Add support for PHP 8.2 (part2)

Error: Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-test/CONTRIBUTING.md:

In Filesystem.php line 288:

  Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-t
  est/CONTRIBUTING.md:

or

Processing patches configuration
  - Applying patches for codeigniter/framework (2)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support.patch [NEW]
      Add support for PHP 8.2 (part1)
    ~ kalkun-sms/kalkun: patches/Codeigniter_Framework/v3.1.13/10-php82_support-part2.patch [NEW]
      Add support for PHP 8.2 (part2)

Error: Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-test/.gitignore:

In Filesystem.php line 288:

  Could not delete /home/runner/work/Kalkun/Kalkun/vendor/kenjis/ci-phpunit-t
  est/.gitignore:
@hnsr
Copy link

hnsr commented Apr 10, 2024

I'm also unable to run composer anymore with PHP 8.1 / 8.2 because it errors out on:

composer i

In Context.php line 16:

  [Error]
  Class "loophp\phposinfo\OsInfo" not found


Exception trace:
  at /Users/hans/Projects/project-kommago-m2/vendor/vaimo/composer-patches/src/Config/Context.php:16
 Vaimo\ComposerPatches\Config\Context->__construct() at /Users/hans/Projects/project-kommago-m2/vendor/vaimo/composer-patches/src/Factories/ConfigFactory.php:56
 Vaimo\ComposerPatches\Factories\ConfigFactory->__construct() at /Users/hans/Projects/project-kommago-m2/vendor/vaimo/composer-patches/src/Plugin.php:53
 Vaimo\ComposerPatches\Plugin->activate() at phar:///Users/hans/bin/composer/src/Composer/Plugin/PluginManager.php:392
 Composer\Plugin\PluginManager->addPlugin() at phar:///Users/hans/bin/composer/src/Composer/Plugin/PluginManager.php:296
 Composer\Plugin\PluginManager->registerPackage() at phar:///Users/hans/bin/composer/src/Composer/Plugin/PluginManager.php:470
 Composer\Plugin\PluginManager->loadRepository() at phar:///Users/hans/bin/composer/src/Composer/Plugin/PluginManager.php:101
 Composer\Plugin\PluginManager->loadInstalledPlugins() at phar:///Users/hans/bin/composer/src/Composer/Factory.php:443
 Composer\Factory->createComposer() at phar:///Users/hans/bin/composer/src/Composer/Factory.php:629
 Composer\Factory::create() at phar:///Users/hans/bin/composer/src/Composer/Console/Application.php:520
 Composer\Console\Application->getComposer() at phar:///Users/hans/bin/composer/src/Composer/Command/BaseCommand.php:127
 Composer\Command\BaseCommand->tryComposer() at phar:///Users/hans/bin/composer/src/Composer/Command/BaseCommand.php:240
 Composer\Command\BaseCommand->initialize() at phar:///Users/hans/bin/composer/vendor/symfony/console/Command/Command.php:264
 Symfony\Component\Console\Command\Command->run() at phar:///Users/hans/bin/composer/vendor/symfony/console/Application.php:1040
 Symfony\Component\Console\Application->doRunCommand() at phar:///Users/hans/bin/composer/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at phar:///Users/hans/bin/composer/src/Composer/Console/Application.php:385
 Composer\Console\Application->doRun() at phar:///Users/hans/bin/composer/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///Users/hans/bin/composer/src/Composer/Console/Application.php:145
 Composer\Console\Application->run() at phar:///Users/hans/bin/composer/bin/composer:93
 require() at /Users/hans/bin/composer:29

install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]

EDIT: It seems vendor/loophp/phposinfo/src/OsInfo.php just didn't exist anymore. Fixed it with:

rm -rf vendor/loophp/phposinfo
composer i --no-plugins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants