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

Saturday, January 29, 2022

[FIXED] Disable composer for update?

 January 29, 2022     composer-php, php, symfony     No comments   

Issue

I made project in Symfony2 and i use composer to get all required bundles.

I got there for example:

"symfony/symfony": "2.5.*",
"knplabs/knp-snappy-bundle": "dev-master",
"knplabs/knp-menu-bundle": "~1.1",
"sonata-project/core-bundle": "*",

It works well, but for the month if bundles will be updated then it breaks down.

How is the best way to blocked composer for update only current version bundles? I know - I can provide the current versions, but where to get them?


Solution

The best is to fix versions to tags so you are sure you stay with the same code. For example:

"symfony/symfony": "2.5.5"

It can be a fastidious task to set tags for all your bundles. (at least the very first time). But for an application in production, NEVER rely on dev or master branches. After, for example you can update those tags after each symfony release.

To find the tags you can use packagist, it will be much more quicker than Github. For example for the knp-snappy-bundle:

enter image description here



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