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

Private bundle 99999.99999 version when branch doesn't contain specific recipe version. #983

Open
gspirov opened this issue Jun 21, 2023 · 0 comments

Comments

@gspirov
Copy link

gspirov commented Jun 21, 2023

Hi folks!

First of all my issue is related to this one #887 which seems unresolved.

The issue happens to me as well.

When I use private bundle + private recipe repository and the composer.json in "require" section contains "my-org/my-bundle":"dev-master" on the 1st composer install (or update regarding if there is a composer.lock file) all other recipes from symfony 3rd party bundles are installed. At this moment my custom recipe for the particular custom bundle is postponed.

After a bit research inside Symfony\Flex\Downloader I saw that all of the bundles containing recipes when they are on branch (dev-master, dev-trunk, dev-develop, etc) it searches for branch aliasing for this package and when there is no such alias set, it automatically transforms the current version of the recipe to (master|develop|trunk, etc).999999 and lately version_compare function is invoked in order to check if the version (this with .999999) is lower than the version from the recipe. If the version is lower then the recipe is never generated and you need to run it manually. Although manually run, the recipe is written in the symfony.lock file with version 99999.99999 which lately on each of the commands throws:

In VersionParser.php line 186:
                                            
  Invalid version string "9999999.9999999"  

A workaround for this is to create branch-alias for your dev-master: 1.0-dev inside the bundle's repository.

But my question here is, imagine that you're working in organisation where you have a custom bundle + custom recipe for it and during development the dev- branches in the root project which points to the custom bundle are subject of changing (which is normal, like testing specific change in the core bundle on staging). How in this case would you manage branch changes and running the composer commands which interact particularly with the recipes version?

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant