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

Saturday, May 21, 2022

[FIXED] How can I update Twig in Symfony 4?

 May 21, 2022     composer-php, symfony, twig     No comments   

Issue

I am trying to update Twig in Symfony 4 like this:

composer require twig/twig

The error message is:

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

  Problem 1
    - twig/extensions is locked to version v1.5.4 and an update of this package was not requested.
    - twig/extensions v1.5.4 requires twig/twig ^1.27|^2.0 -> found twig/twig[v1.27.0, ..., v1.44.2, v2.0.0, ..., v2.14.4] but it conflicts with your root composer.json require (^3.3).

Solution

It's often easiest to first remove the package that's blocking the update and then install it again after the update. First do:

composer remove twig/extensions

and then

composer require twig/twig
composer require twig/extensions

This should first remove the extensions, update twig and then install the extensions again.



Answered By - h00ligan
Answer Checked By - Terry (PHPFixing Volunteer)
  • 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