Webwide is the inclusive forum community for web designers, developers & makers.

Whether you're an enthusiast, in training, or a seasoned pro – you'll fit right in at Webwide. We understand that our community is one of creation which is why we, unlike many other discussion forums, encourage sharing of your own projects and content. Creating a forum account is fast, easy and completely free so you can start participating right away.

Read our Code of Conduct

Free Forum Membership Benefits

  • Participate in hundreds of interesting discussions
  • Network with industry peers and make new connections
  • Show off your own projects and relevant content
  • Get help and feedback for your coding and designs
  • Buy and sell services and resources in the marketplace
  • Participate in our friendly community challenges
  • Earn trophies and work your way up our leaderboards
  • Enjoy exclusive Webwide member discounts and offers
  • ...and so much more!

Help Wanted Understanding composer error

TGDesigns

Member
Joined
Nov 20, 2019
Messages
35
Reaction score
20
Points
10
Hi all,
Sorry if it seems like im always asking for help!

Im attempting to dive deep into learning frameworks and general webdev tools, im attempting to follow this tutorial:
Symfony Tutorial: Building a Blog (Part 1)

Which I unserddstand so far but im running into an issue when I get to the section where I need to run this command:

composer require hwi/oauth-bundle php-http/guzzle6-adapter php-http/httplug-bundle

it fails and reverts my composer.json with this error message:
Code:
Using version ^0.6.3 for hwi/oauth-bundle
Using version ^2.0 for php-http/guzzle6-adapter
Using version ^1.16 for php-http/httplug-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "5.0.*"
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for hwi/oauth-bundle ^0.6.3 -> satisfiable by hwi/oauth-bundle[0.6.3].
    - hwi/oauth-bundle 0.6.3 requires symfony/framework-bundle ^2.8|^3.0|^4.0 -> no matching package found.
  Problem 2
    - Installation request for php-http/httplug-bundle ^1.16 -> satisfiable by php-http/httplug-bundle[1.16.0].
    - php-http/httplug-bundle 1.16.0 requires symfony/config ^3.4.20 || ^4.2.1 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Any suggestions on how I can go about troubleshooting this, my first though was to install symfony/framework-bundle and symfony/config but that didnt seem to work either!

Any help/suggestions greatly appreciated!

Cheers,
Tom
 
  • Like
Reactions: Adam

Adam

Mr. Webwide
Administrator
Joined
Sep 24, 2019
Messages
822
Reaction score
841
Points
915
Location
United Kingdom
Local Time
Today, 14:08
Website
adgr.dev
Pronouns
he/him
At risk of pointing out something you've already spotted, under that command in the tutorial it has this:

Screenshot 2019-12-16 at 23.08.33.png


Seeing as the tutorial is relatively old, could it be a PHP version issue? Have you tried removing that requirement?
 
Last edited:
  • Like
Reactions: usa

TGDesigns

Member
Joined
Nov 20, 2019
Messages
35
Reaction score
20
Points
10
I Didn’t try removing the requirement only lowering it, I wasn’t sure that that was the same error I was getting. I’m finding the composer error messages a little hard to understand honestly!
 

Gummibeer

Well-known member
Joined
Oct 5, 2019
Messages
747
Reaction score
631
Points
635
Age
27
Location
Hamburg, Germany
Local Time
Today, 15:08
Website
gummibeer.de
For your first time the error messages aren't that clear but at the end they are very verbose.
Could you post the state of your composer.json and php -v output?
At the end the packages require another version of Symfony than you've installed. So the question is which version is installed and on which PHP Version you are running. Could you also run composer show symfony/framework-bundle -a output?
 

TGDesigns

Member
Joined
Nov 20, 2019
Messages
35
Reaction score
20
Points
10
Sure, this is my composer.json:

Code:
{
    "type": "project",
    "license": "proprietary",
    "require": {
        "php": "^7.2.5",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "sensio/framework-extra-bundle": "^5.5",
        "symfony/console": "5.0.*",
        "symfony/dotenv": "5.0.*",
        "symfony/flex": "^1.3.1",
        "symfony/framework-bundle": "5.0.*",
        "symfony/orm-pack": "^1.0",
        "symfony/security-bundle": "5.0.*",
        "symfony/twig-pack": "^1.0",
        "symfony/validator": "5.0.*",
        "symfony/yaml": "5.0.*"
    },
    "require-dev": {
        "doctrine/doctrine-fixtures-bundle": "^3.3",
        "symfony/maker-bundle": "^1.14"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "paragonie/random_compat": "2.*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php72": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "5.0.*"
        }
    }
}
This is my php -v output
Code:
PHP 7.3.3 (cli) (built: Mar  6 2019 21:53:23) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.3, Copyright (c) 1998-2018 Zend Technologies
and this is the output of the composer show command:
Code:
Restricting packages listed in "symfony/symfony" to "5.0.*"
name     : symfony/framework-bundle
descrip. : Symfony FrameworkBundle
keywords :
versions : 5.0.x-dev, v5.0.1, v5.0.0, v5.0.0-RC1, v5.0.0-BETA2, v5.0.0-BETA1
type     : symfony-bundle
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source   : [git] https://github.com/symfony/framework-bundle.git fa1275b54d5743ee8107ca9c212a6b620b867284
dist     : [zip] https://api.github.com/repos/symfony/framework-bundle/zipball/fa1275b54d5743ee8107ca9c212a6b620b867284 fa1275b54d5743ee8107ca9c212a6b620b867284
names    : symfony/framework-bundle

autoload
psr-4
Symfony\Bundle\FrameworkBundle\ => .
exclude-from-classmap

requires
ext-xml *
symfony/cache ^4.4|^5.0
symfony/config ^5.0
symfony/http-foundation ^4.4|^5.0
symfony/http-kernel ^5.0
symfony/polyfill-mbstring ~1.0
symfony/filesystem ^4.4|^5.0
symfony/finder ^4.4|^5.0
symfony/routing ^5.0
php ^7.2.5
symfony/dependency-injection ^5.0.1
symfony/error-handler ^4.4.1|^5.0.1

requires (dev)
doctrine/annotations ~1.7
doctrine/cache ~1.0
symfony/asset ^4.4|^5.0
symfony/browser-kit ^4.4|^5.0
symfony/console ^4.4|^5.0
symfony/css-selector ^4.4|^5.0
symfony/dom-crawler ^4.4|^5.0
symfony/dotenv ^4.4|^5.0
symfony/polyfill-intl-icu ~1.0
symfony/form ^4.4|^5.0
symfony/expression-language ^4.4|^5.0
symfony/http-client ^4.4|^5.0
symfony/lock ^4.4|^5.0
symfony/mailer ^4.4|^5.0
symfony/messenger ^4.4|^5.0
symfony/mime ^4.4|^5.0
symfony/process ^4.4|^5.0
symfony/security-csrf ^4.4|^5.0
symfony/security-http ^4.4|^5.0
symfony/serializer ^4.4|^5.0
symfony/stopwatch ^4.4|^5.0
symfony/string ~5.0.0
symfony/translation ^5.0
symfony/twig-bundle ^4.4|^5.0
symfony/validator ^4.4|^5.0
symfony/workflow ^4.4|^5.0
symfony/yaml ^4.4|^5.0
symfony/property-info ^4.4|^5.0
symfony/web-link ^4.4|^5.0
phpdocumentor/reflection-docblock ^3.0|^4.0
paragonie/sodium_compat ^1.8
twig/twig ^2.10|^3.0

suggests
ext-apcu For best performance of the system caches
symfony/console For using the console commands
symfony/form For using forms
symfony/serializer For using the serializer service
symfony/validator For using validation
symfony/yaml For using the debug:config and lint:yaml commands
symfony/property-info For using the property_info service
symfony/web-link For using web links, features such as preloading, prefetching or prerendering

conflicts
phpdocumentor/reflection-docblock <3.0
phpdocumentor/type-resolver <0.2.1
phpunit/phpunit <5.4.3
symfony/asset <4.4
symfony/browser-kit <4.4
symfony/console <4.4
symfony/dotenv <4.4
symfony/dom-crawler <4.4
symfony/http-client <4.4
symfony/form <4.4
symfony/lock <4.4
symfony/mailer <4.4
symfony/messenger <4.4
symfony/mime <4.4
symfony/property-info <4.4
symfony/serializer <4.4
symfony/stopwatch <4.4
symfony/translation <5.0
symfony/twig-bridge <4.4
symfony/twig-bundle <4.4
symfony/validator <4.4
symfony/web-profiler-bundle <4.4
symfony/workflow <4.4
doctrine/persistence <1.3
Thanks for the help guys!
 

Gummibeer

Well-known member
Joined
Oct 5, 2019
Messages
747
Reaction score
631
Points
635
Age
27
Location
Hamburg, Germany
Local Time
Today, 15:08
Website
gummibeer.de
Okay, that's the problem. You are already on Symfony 5 but the other packages are only tested/work with Symfony 4.
Could you change the version of all entries starting with symfony/ in your composer.json to ^4.4. To be safe you should delete the composer.lock file and vendor folder. After this you can execute the composer require ... command - if everything is fine it will install all the other dependencies as well.
 
  • Like
Reactions: usa

TGDesigns

Member
Joined
Nov 20, 2019
Messages
35
Reaction score
20
Points
10
Ok thanks gummibeer I will give this a go on lunch and report back!
 

TGDesigns

Member
Joined
Nov 20, 2019
Messages
35
Reaction score
20
Points
10
I gave it a go, and im now getting a different error which is good means things are progressing:

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

  Problem 1
    - Installation request for hwi/oauth-bundle ^0.6.3 -> satisfiable by hwi/oauth-bundle[0.6.3].
    - hwi/oauth-bundle 0.6.3 requires symfony/framework-bundle ^2.8|^3.0|^4.0 -> satisfiable by symfony/framework-bundle[2.8.x-dev, 3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev, 4.0.x-dev, 4.1.x-dev, 4.2.x-dev, 4.3.x-dev, 4.4.x-dev, v2.8.0, v2.8.0-BETA1, v2.8.1, v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.14, v2.8.15, v2.8.16, v2.8.17, v2.8.18, v2.8.19, v2.8.2, v2.8.20, v2.8.21, v2.8.22, v2.8.23, v2.8.24, v2.8.25, v2.8.26, v2.8.27, v2.8.28, v2.8.29, v2.8.3, v2.8.30, v2.8.31, v2.8.32, v2.8.33, v2.8.34, v2.8.35, v2.8.36, v2.8.37, v2.8.38, v2.8.39, v2.8.4, v2.8.40, v2.8.41, v2.8.42, v2.8.43, v2.8.44, v2.8.45, v2.8.46, v2.8.47, v2.8.48, v2.8.49, v2.8.5, v2.8.50, v2.8.52, v2.8.6, v2.8.7, v2.8.8, v2.8.9, v3.0.0, v3.0.0-BETA1, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9, v3.1.0, v3.1.0-BETA1, v3.1.0-RC1, v3.1.1, v3.1.10, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7, v3.1.8, v3.1.9, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.10, v3.2.11, v3.2.12, v3.2.13, v3.2.14, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.2.7, v3.2.8, v3.2.9, v3.3.0, v3.3.0-BETA1, v3.3.0-RC1, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.17, v3.3.18, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.28, v3.4.29, v3.4.3, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.0.0, v4.0.0-BETA1, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.0-RC1, v4.0.0-RC2, v4.0.1, v4.0.10, v4.0.11, v4.0.12, v4.0.13, v4.0.14, v4.0.15, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0, v4.1.0-BETA1, v4.1.0-BETA2, v4.1.0-BETA3, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.0, v4.2.0-BETA1, v4.2.0-BETA2, v4.2.0-RC1, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.0-BETA1, v4.3.0-BETA2, v4.3.0-RC1, v4.3.1, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.4.0, v4.4.0-BETA1, v4.4.0-BETA2, v4.4.0-RC1, v4.4.1] but these conflict with your requirements or minimum-stability.
  Problem 2
    - Installation request for php-http/httplug-bundle ^1.16 -> satisfiable by php-http/httplug-bundle[1.16.0].
    - symfony/framework-bundle v5.0.1 requires symfony/dependency-injection ^5.0.1 -> satisfiable by symfony/dependency-injection[v5.0.1].
    - Conclusion: don't install symfony/dependency-injection v5.0.1
    - php-http/httplug-bundle 1.16.0 requires symfony/config ^3.4.20 || ^4.2.1 -> satisfiable by symfony/config[v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.28, v3.4.29, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.1, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.4.0, v4.4.1].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.20].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.21].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.22].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.23].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.24].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.25].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.26].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.27].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.28].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.29].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.30].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.31].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.32].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.33].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.34].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.35].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v3.4.36].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.2.1].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.2.10].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.2.11].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.2.12].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.2.2].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.2.3].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.2.4].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.2.5].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.2.6].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.2.7].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.2.8].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.2.9].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.3.0].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.3.1].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.3.2].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.3.3].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.3.4].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.3.5].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.3.6].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.3.7].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.3.8].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.3.9].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.4.0].
    - symfony/dependency-injection v5.0.0 conflicts with symfony/config[v4.4.1].
    - symfony/framework-bundle v5.0.0 requires symfony/dependency-injection ^5.0 -> satisfiable by symfony/dependency-injection[v5.0.0, v5.0.1].
    - Installation request for symfony/framework-bundle 5.0.* -> satisfiable by symfony/framework-bundle[v5.0.0, v5.0.1].


Installation failed, reverting ./composer.json to its original content.
At this point im wondering if I just find a more up to date tutorial on creating a blog with symfony?
 
Last edited:

Gummibeer

Well-known member
Joined
Oct 5, 2019
Messages
747
Reaction score
631
Points
635
Age
27
Location
Hamburg, Germany
Local Time
Today, 15:08
Website
gummibeer.de
Are you sure that you've replaced all Symfony dependency versions by the v4 one?

symfony/framework-bundle v5.0.1 requires symfony/dependency-injection ^5.0.1 -> satisfiable by symfony/dependency-injection[v5.0.1].
Otherwise a bit opinionated but try Laravel. It's a lot easier to setup and also easier for understanding MVC and frameworks.
The community is amazing. So if you have problems just ask here, in Larachat Slack or Laracast Forum. I've also started with Laravel after failing with Zend and Symfony.
 

TGDesigns

Member
Joined
Nov 20, 2019
Messages
35
Reaction score
20
Points
10
I might give larval a go the only reason I went with Symfony is that I "thought" I sorta understood composer XD Im looking for something a lightweight as possible so I can go through its inner workings and not have to sift through 8 bazillion files!
 
Top