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

Tuesday, January 4, 2022

[FIXED] How to update symfony with flex?

 January 04, 2022     composer-php, php, symfony, symfony-flex     No comments   

Issue

I think my question may be stupid, but I can’t figure out how to upgrade my Symfony project from version 4.1. * to version 4.3. *.

I tried to touch the composer.json. But it sends me an error message... Does anyone have the solution?

composer.json

I had this :

"conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "4.1.*"
        }
    }

I changed by that:

"conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "4.3.*"
        }
    }

Version 4.4 does not download or update...


Solution

extra.symfony.require is for performance reasons, as symfony has too many versions and update may take a long time. To update project you also need to add 4.3.* constraint to the require section:

"require": {
    "php": "^7.1.3",
    "ext-ctype": "*",
    "ext-iconv": "*",
    "symfony/console": "4.3.*",
    "symfony/dotenv": "4.3.*",
    "symfony/flex": "^1.1",
    "symfony/framework-bundle": "4.3.*",
    "symfony/yaml": "4.3.*"
},


Answered By - BoShurik
  • 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