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

can't use guzzle #78

Open
tacman opened this issue Jan 26, 2019 · 2 comments
Open

can't use guzzle #78

tacman opened this issue Jan 26, 2019 · 2 comments

Comments

@tacman
Copy link

tacman commented Jan 26, 2019

With a very basic symfony app (based on the Symfony4.2 demo, all started plugins), I'm having difficult configuring the bundle.

I can install it, but can't install an adapter. The problem is httplug version, needs to allow version 2.

In HttpClientDiscovery.php line 27:
                                                                                                                                             
  No HTTPlug clients found. Make sure to install a package providing "php-http/client-implementation". Example: "php-http/guzzle6-adapter".  
                                                                                                                                             

In DiscoveryFailedException.php line 41:
                                                                                                                                                                                                                                                           
  Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors                                                                                                           
   - Puli Factory is not available                                                                                                                                                                                                                         
   - No valid candidate found using strategy "Http\Discovery\Strategy\CommonClassesStrategy". We tested the following candidates: Http\Adapter\Guzzle6\Client, Http\Adapter\Guzzle5\Client, Http\Client\Curl\Client, Http\Client\Socket\Client, Http\Adap  
  ter\Buzz\Client, Http\Adapter\React\Client, Http\Adapter\Cake\Client, Http\Adapter\Zend\Client, Http\Adapter\Artax\Client, Http\Discovery\Strategy\CommonClassesStrategy::buzzInstantiate.                                                               
   - No valid candidate found using strategy "Http\Discovery\Strategy\CommonPsr17ClassesStrategy". We tested the following candidates: .                                                                                                                   
                                                                                                                                                                                                                                                           

swiftmailer:email:send [--from FROM] [--to TO] [--subject SUBJECT] [--body BODY] [--mailer MAILER] [--content-type CONTENT-TYPE] [--charset CHARSET] [--body-source BODY-SOURCE] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>

tac@wild-dog:~/rappnet$ composer require php-http/guzzle6-adapter
Using version ^2.0 for php-http/guzzle6-adapter
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.2.*"
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install php-http/guzzle6-adapter v2.0.1
    - Conclusion: don't install php-http/guzzle6-adapter v2.0.0
    - Conclusion: remove php-http/httplug v1.1.0
    - Installation request for php-http/guzzle6-adapter ^2.0 -> satisfiable by php-http/guzzle6-adapter[2.x-dev, v2.0.0, v2.0.1].
    - Conclusion: don't install php-http/httplug v1.1.0
    - php-http/guzzle6-adapter 2.x-dev requires php-http/httplug ^2.0 -> satisfiable by php-http/httplug[2.0.x-dev, v2.0.0].
    - Can only install one of: php-http/httplug[2.0.x-dev, v1.1.0].
    - Can only install one of: php-http/httplug[v2.0.0, v1.1.0].
    - Installation request for php-http/httplug (locked at v1.1.0) -> satisfiable by php-http/httplug[v1.1.0].


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

depends [-r|--recursive] [-t|--tree] [--] <package> [<constraint>]

tac@wild-dog:~/rappnet$ composer why php-http/httplug
mailgun/mailgun-php     2.6.0  requires  php-http/httplug (^1.0)  
php-http/client-common  1.9.0  requires  php-http/httplug (^1.1)  
@tacman
Copy link
Author

tacman commented Jan 26, 2019

I was able to install guzzle6 with composer req php-http/guzzle6-adapter ^1, but better would be the ability to install it by default, with composer require php-http/guzzle6-adapter

@nicodemuz
Copy link

The following worked for me:

composer require cspoo/swiftmailer-mailgun-bundle
composer require php-http/httplug-pack 1.1

brandonkelly added a commit to brandonkelly/swiftmailer-mailgun-bundle that referenced this issue Oct 23, 2020
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