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

feat(composer): support providers without a hash #13000

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Dec 7, 2021

Changes:

We're using a Nexus repository with the Composer plugin installed and I noticed that querying packages.json returns this

{
  "providers-url": "https://host/repository/repo-name/p/%package%.json",
  "providers": {
    "foo/bar": {
      "sha256": null
    }
  }
}

which was not supported yet because the packagist datasource assumes that a hash is always set.

I did not find specs yet but asked at composer/composer#10337. Irrelevant of the outcome though I think this should be supported as Composer updates are working perfectly fine.

Context:

Might close #10649

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@herndlm herndlm marked this pull request as ready for review December 7, 2021 21:55
rarkins
rarkins previously approved these changes Dec 8, 2021
@herndlm herndlm requested a review from viceice December 8, 2021 05:28
@herndlm herndlm requested a review from rarkins December 8, 2021 06:07
@rarkins rarkins merged commit 3f586ef into renovatebot:main Dec 8, 2021
@herndlm herndlm deleted the feature/composer-support-providers-without-a-hash branch December 8, 2021 08:27
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 29.34.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@herndlm
Copy link
Contributor Author

herndlm commented Dec 8, 2021

Fyi got an answer to my question:

It's not an ideal repository implementation if it doesn't have hashes as it forbids caching, plus it is Composer v1 format and not the faster Composer v2 one, but technically null values there are supported by Composer.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants