8p / EightPointsGuzzleBundle

⛽️ Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony
MIT License
440 stars 71 forks source link

Unrecognized option error when installing with Flex #158

Closed OJezu closed 6 years ago

OJezu commented 6 years ago

I've tried adding this bundle using Symfony Flex to a new project, but I got a following error instead:

$ composer config extra.symfony.allow-contrib true
$ composer require eightpoints/guzzle-bundle
Using version ^7.2 for eightpoints/guzzle-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing symfony/expression-language (v3.4.0-RC1)
    Downloading: 100%         

  - Installing guzzlehttp/promises (v1.3.1)
    Downloading: 100%         

  - Installing psr/http-message (1.0.1)
    Downloading: 100%         

  - Installing guzzlehttp/psr7 (1.4.2)
    Downloading: 100%         

  - Installing guzzlehttp/guzzle (6.3.0)
    Downloading: 100%         

  - Installing eightpoints/guzzle-bundle (v7.2.1)
    Downloading: 100%         

Writing lock file
Generating autoload files
Symfony operations: 1 recipe (7c641b8b5dd18e383b6a184205d6190a)
  - Configuring eightpoints/guzzle-bundle (7.0): From github.com/symfony/recipes-contrib:master
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!  In ArrayNode.php line 319:
!!                                                                                 
!!    Unrecognized option "plugin" under "eight_points_guzzle.clients.my_client.o  
!!    ptions"                                                                      
!!                                                                                 
!!  
!!  

Installation failed, reverting ./composer.json to its original content.

I'm using Symfony 3.4-RC1 (list of installed packages below).

$ composer show
eightpoints/guzzle-bundle    v7.2.1     Integrates Guzzle into Symfony2, comes with WSSE Plugin for RESTful Interfaces
guzzlehttp/guzzle            6.3.0      Guzzle is a PHP HTTP client library
guzzlehttp/promises          v1.3.1     Guzzle promises library
guzzlehttp/psr7              1.4.2      PSR-7 message implementation that also provides common utility methods
paragonie/random_compat      v2.0.11    PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
psr/cache                    1.0.1      Common interface for caching libraries
psr/container                1.0.0      Common Container Interface (PHP FIG PSR-11)
psr/http-message             1.0.1      Common interface for HTTP messages
psr/log                      1.0.2      Common interface for logging libraries
psr/simple-cache             1.0.0      Common interfaces for simple caching
symfony/cache                v3.4.0-RC1 Symfony Cache component with PSR-6, PSR-16, and tags
symfony/class-loader         v3.4.0-RC1 Symfony ClassLoader Component
symfony/config               v3.4.0-RC1 Symfony Config Component
symfony/console              v3.4.0-RC1 Symfony Console Component
symfony/debug                v3.4.0-RC1 Symfony Debug Component
symfony/dependency-injection v3.4.0-RC1 Symfony DependencyInjection Component
symfony/dotenv               v3.4.0-RC1 Registers environment variables from a .env file
symfony/event-dispatcher     v3.4.0-RC1 Symfony EventDispatcher Component
symfony/expression-language  v3.4.0-RC1 Symfony ExpressionLanguage Component
symfony/filesystem           v3.4.0-RC1 Symfony Filesystem Component
symfony/finder               v3.4.0-RC1 Symfony Finder Component
symfony/flex                 v1.0.41    
symfony/framework-bundle     v3.4.0-RC1 Symfony FrameworkBundle
symfony/http-foundation      v3.4.0-RC1 Symfony HttpFoundation Component
symfony/http-kernel          v3.4.0-RC1 Symfony HttpKernel Component
symfony/lts                  v3         Enforces Long Term Supported versions of Symfony components
symfony/polyfill-apcu        v1.6.0     Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-mbstring    v1.6.0     Symfony polyfill for the Mbstring extension
symfony/polyfill-php70       v1.6.0     Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/routing              v3.4.0-RC1 Symfony Routing Component
symfony/yaml                 v3.4.0-RC1 Symfony Yaml Component
gregurco commented 6 years ago

@OJezu thank you for using flex with GuzzleBundle and reporting this problem. I created PR with fix of this problem yesterday: https://github.com/symfony/recipes-contrib/pull/150 Waiting for merging it. Watch out for changes in PR.

For now please install using native guide: https://github.com/8p/EightPointsGuzzleBundle#installation

Duplicated issue: https://github.com/symfony/recipes-contrib/issues/145

OJezu commented 6 years ago

Oh, I guess I should have looked in the recipes repo too.

Workaround is to fix the config file after failed installation, and re-issuing composer req. It does not overwrite config file when present. No need to give up flex to install the bundle.