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

Composer V2 Support #100

Closed
wants to merge 14 commits into from
Closed

Composer V2 Support #100

wants to merge 14 commits into from

Conversation

sadortun
Copy link
Contributor

@sadortun sadortun commented Apr 23, 2020

Added support for Composer V2. Currently testing....

Todo

  • Add support for metadata-url
  • Add support for providers-api (optional)

V2 is just incretibly faster ! Its amaizing !

composer self-update --snapshot
composer clear-cache
time composer update
real    0m57.831s
user    0m0.030s
sys     0m0.060s

composer self-update --stable
composer clear-cache
time composer update
real    3m46.648s
user    0m0.015s
sys     0m0.075s

@sadortun sadortun changed the title WIP Composer V2 Support Composer V2 Support Apr 26, 2020
@sadortun
Copy link
Contributor Author

sadortun commented Apr 26, 2020

@akondas Done plenty of tests in about 10 differents projects, for a total of 1600 installs.

I think this is ready to get merged.

FYI, Repman and Composer V2 are incredebly fast ! Our update time went from about 5-10 minutes to about 30 seconds ! ❤️

@akondas
Copy link
Member

akondas commented Apr 26, 2020

I'm very happy about this. And thank you very much for your time spent on work.

@akondas
Copy link
Member

akondas commented Apr 26, 2020

Could you enable the "Allow edits from maintainers." option. I would add tests and we could merge.

@sadortun
Copy link
Contributor Author

@akondas No clue where is the option Allow edits from maintainers., it should be in the sidebar, but its not ! I added you as a maintainer of my fork instead, hehhhe!

@@ -5,6 +5,7 @@
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
package_name_pattern: '[A-Za-z0-9_.-]+/[A-Za-z0-9_./-]+?'
package_name_pattern_v2: '[A-Za-z0-9_.-]+/[A-Za-z0-9_./~-]+?'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why ~?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to be able to pass through dev packages, and they contain a ~

https://packagist.org/p2/symfony/polyfill-php72~dev.json

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you could merge it in the previous pattern, but i wanted to make it obvious

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we can combine it

return Option::none();
}

return $this->metadataProvider->fromUrl($this->getUrl($providerPath->get()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will probably need to do it differently, in this case we will overwrite the v1 data with the v2 version.
If I find a moment, I can finish it, but currently I am still involved in something else, if you would like to finish it yourself, I suggest you do it through an additional parameter and save the data in a separate directory p2

@akondas
Copy link
Member

akondas commented Jun 26, 2020

Thanks @sadortun for help. @karniv00l created complete support for v2 based on your work. I will add your name to changelog. We didn't want to do it in this PR so as not to waste your time. If we can do something more, let me know. Thanks again 👏

@akondas akondas closed this Jun 26, 2020
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

Successfully merging this pull request may close these issues.

2 participants