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

Set minimum-stability to "stable" #266

Open
rodrigoaguilera opened this issue Apr 25, 2017 · 10 comments
Open

Set minimum-stability to "stable" #266

rodrigoaguilera opened this issue Apr 25, 2017 · 10 comments
Assignees
Labels
composer.json State: In progress The issue is being worked on Type: Documentation Type: Feature Issue is a new feature request

Comments

@rodrigoaguilera
Copy link
Contributor

rodrigoaguilera commented Apr 25, 2017

Currently minimum-stability is set to "dev".
I think we should rely on composer defaults and have the minimum stability set to "stable" just by removing that line.
https://getcomposer.org/doc/04-schema.md#minimum-stability

Then we will need to add dev, alpha, beta, RC suffixes to the specific dependencies that need it like for example devel or drupal console.
https://getcomposer.org/doc/04-schema.md#package-links
The composer.json get also more semantic.

This way we don't hide dependencies on modules, libraries, etc that are not so mature.

This all started for me because there is a contrib module with a broken HEAD
https://www.drupal.org/node/2872222

What do you think?

@webflo
Copy link
Member

webflo commented May 5, 2017

This should not happen we use "minimum-stability": "dev" and "prefer-stable": true for this reason. Are you sure you have both in your composer.json?

@rodrigoaguilera
Copy link
Contributor Author

I think they fixed superfish module now but I will try to publish a dummy library to reproduce this.

Anyway that problem is not the main reason for this change. Is about making dev,beta, alpha and rc dependencies more explicit instead of saying pick any stability but prefer stable.

I feel we also get a speed improvement since less releases are scanned.

@slootjes
Copy link

+1 on this. It's safer and faster to specify the stability on a per package level.

@rodrigoaguilera
Copy link
Contributor Author

With drupal console stable now the template doesn't even has to specify any stability.

We can add devel as an example that is going to need a @rc tag if "minimum-stability": "dev" is removed

@joelpittet
Copy link
Contributor

Seems like core is grappling with this at the moment too:
https://www.drupal.org/project/drupal/issues/3135247

@leymannx
Copy link
Collaborator

leymannx commented Jan 12, 2021

Core indeed moved to stable now (9.1.0). The change record contains a lot of good arguments to do the same. Then the README needs to be updated to explain how to properly require unstable releases.

@joelpittet
Copy link
Contributor

I'm on board with this too now, you can be explicit about your @dev if you need the unstable.

@AlexSkrypnyk AlexSkrypnyk self-assigned this May 12, 2024
@AlexSkrypnyk
Copy link
Collaborator

As per D9 change record:

This ("minimum-stability": "dev") allowed any development version to be installed with the template; however, it occasionally produced unexpected results, such as upgrading to newer unstable releases rather than remaining on a current stable release. The Composer "prefer stable" setting is considered to be advisory only, and does not guarantee that a stable release will be chosen even when one is available.

Having dev as default is not what consumer projects most likely would use - stable versions are usually preferable to unstable ones. Any unstable versions can be manually resolved by a consumer site developer on per-need basis.

I suggest we do 2 things:

  1. Change minimum-stability to stable in this project.
  2. Add a readme entry explaining how to switch to use non-stable versions.

@AlexSkrypnyk AlexSkrypnyk added Type: Feature Issue is a new feature request and removed feature request labels May 13, 2024
@leymannx
Copy link
Collaborator

+1 on both points.

@AlexSkrypnyk AlexSkrypnyk added the State: Confirmed The issue was triaged and confirmed for development label May 13, 2024
@joelpittet
Copy link
Contributor

I moved to minimum-stability: stable for everything as we just need to be explicit in non-stable versions, which is a net benefit. +1 to this change

@AlexSkrypnyk AlexSkrypnyk added State: In progress The issue is being worked on and removed State: Confirmed The issue was triaged and confirmed for development labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
composer.json State: In progress The issue is being worked on Type: Documentation Type: Feature Issue is a new feature request
Projects
None yet
Development

No branches or pull requests

6 participants