-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Update mirroring code to our official mirror code #133
Comments
Of course, I will change to use them. An unexpected effect of creating this mirror is the fact that it has become an alternative in places where internet access is restricted, not just the ability to parallelize, as is the case in China with the great firewall of china. I asked this a while ago, would you have the documented specification of the metadata structure? |
The v2 metadata is much simpler, two files per package ($name~dev.json for dev versions and $name.json for the rest), and mostly documented in https://github.com/composer/composer/blob/master/UPGRADE-2.0.md#for-composer-repository-implementors - but it's also fully implemented by the mirroring script code and packagist.org, so unless you're serving your own packages, you don't really need to care just for process of mirroring. |
Do you think it is better to update the code to use this script or archive this project and suggest using the new repository? |
I don't know how much effort it is for you to migrate.. And I don't know how much people need/care about the "homepage" aspect of this repo. My thing is really just a background worker to mirror files. So I wouldn't say it replaces all of this repo.. That's why I thought maybe it'd be good to continue having this as a sample homepage for mirrors that they can tweak as needed. |
I need a few days to offer support, I will follow closely the evolution of composer v2, congratulations! I am very happy with the evolution. If you want to migrate this repository in the future, we can talk to make a plan for it, it is up to you. |
I'm interested in migrating original I want to know current works about that and binding above two mirrors together successfully :). |
Hi @peter279k please start a PR, because covid the country I live was huge impacted and my time is focus on my current job, I appreciate help. :) |
Any progress here? As per composer/composer#9297 it seems that currently this repo generates invalid repositories for Composer 2. |
For now, I don't figure out the current way to migrate Maybe we can use Please suggest some recommendations about this. Thanks. |
Well IMO the entire mirroring script here should be replaced by the composer/mirror logic. As per the setup instructions, you should run all 3 commands to produce a mirror which supports composer 1 and 2. If you only want v2 you can skip the --v1 command and set has_v1_mirror to false in the config. I am not familiar with the code in this repo, nor how bin/mirror works, but right now the mirror in south africa advertises v2 metadata by defining a metadata-url but it doesn't actually have the data files present, so it breaks. It should at least remove metadata-url if v2 is not fully supported, so that composer 2 can still rely on the v1 metadata files and keep working. |
I just published https://github.com/composer/mirror which supports Composer 1 and Composer 2 style metadata mirroring. I would appreciate very much if you could update this repo to use this instead of however you are doing it now. I am fairly sure our implementation is correct, and especially that it will be maintained.
I'm happy to discuss how to achieve this etc.
Also note that generally speaking I hope Composer 2 will reduce the need for third party mirrors as it does parallelize requests to the repository, and data transfer is overall smaller, so latency should be much less problematic.
The text was updated successfully, but these errors were encountered: