PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, January 20, 2022

[FIXED] Error installation phpoffice/phpspreadsheet with composer

 January 20, 2022     composer-php, php, phpspreadsheet, symfony, symfony-3.4     No comments   

Issue

I try to install a specific spreachsheet lib with this command:

composer require phpoffice/phpspreadsheet:1.8.2 (because I have Php5 version)

I have this error :

Your requirements could not be resolved to an installable set of packages.

Problem 1

- symfony/symfony is locked to version v3.4.10 and an update of this package was not requested.

- Only one of these can be installed: symfony/twig-bundle[v3.4.26], symfony/symfony[v3.4.10]. symfony/symfony replaces symfony/twig-bundle and thus cannot coexist with it.

- symfony/twig-bundle is locked to version v3.4.26 and an update of this package was not requested.

my composer.json:

{ "name": "symfony/framework-standard-edition", "license": "MIT", "type": "project", "description": "The "Symfony Standard Edition" distribution", "autoload": { "psr-4": { "": "src/" }, "classmap": [ "app/AppKernel.php", "app/AppCache.php" ] }, "autoload-dev": { "psr-4": { "AppBundle\Tests\": "tests/" }, "files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ] }, "require": { "php": ">=5.5.9", "beberlei/doctrineextensions": "1.1.9", "doctrine/doctrine-bundle": "^1.6", "doctrine/doctrine-migrations-bundle": "^1.3", "doctrine/orm": "^2.5", "incenteev/composer-parameter-handler": "^2.0", "paragonie/random_compat": "~1.3", "phpseclib/phpseclib": "^2.0", "ramsey/uuid": "^3.8", "sensio/distribution-bundle": "^5.0.19", "sensio/framework-extra-bundle": "^5.0.0", "symfony/assetic-bundle": "^2.8", "symfony/monolog-bundle": "^3.1.0", "symfony/polyfill-apcu": "^1.0", "symfony/symfony": "3.4.10", "symfony/translation": "^3.4", "symfony/twig-bundle": "3.4.26", "symfony/validator": "^3.4", "theodo-evolution/legacy-wrapper-bundle": "^1.2", "theodo-evolution/session-bundle": "^1.0", "twig/twig": "^1.0||^2.0" }, "require-dev": { "phpunit/phpunit": "^5.7.27", "sensio/generator-bundle": "^3.0", "symfony/phpunit-bridge": "^3.0" }, "scripts": { "symfony-scripts": [ "Incenteev\ParameterHandler\ScriptHandler::buildParameters", "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap", "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache", "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets", "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile", "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget" ], "post-install-cmd": [ "@symfony-scripts" ], "post-update-cmd": [ "@symfony-scripts" ] }, "config": { "platform": { "php": "5.6" }, "sort-packages": true }, "extra": { "symfony-app-dir": "app", "symfony-bin-dir": "bin", "symfony-var-dir": "var", "symfony-web-dir": "web", "symfony-tests-dir": "tests", "symfony-assets-install": "relative", "incenteev-parameters": { "file": "app/config/parameters.yml" }, "branch-alias": { "dev-master": "3.4-dev" } } }

Someone has an idea please ?


Solution

symfony/symfony is a package that contains all components of the Symfony framework. This also contains symfony/twig-bundle. There's no need to install both of these packages, so you can safely remove symfony/twig-bundle. Afterwards, it should be possible to add whatever package you want to add



Answered By - Nico Haase
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing