-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Discussion: Composer support (PHP) #1357
Comments
I would definitely be happy to add composer support, especially if you are able to help out. Package manager support needs a bit more refactoring to be “easy” to add a new one, so I plan on that first. For composer, do you think the parsing, lookup and logic can be done all in JavaScript, or more effective to spawn out to a cli command for things like lookups and upgrade decisions and then parse the stdout or resulting file? |
I think it's best to spawn to commands in order to be consistent with the regular usage of Composer. I think Composer parsing of tilde ranges is a bit different than npm's so it'd be best to use the Composer one. For upgrade decisions, we should definitely use Composer commands, because there are lots of things to consider including platform configurations, extensions listed as requirements etc. which would be a mistake to repeat in a separate codebase. |
@rarkins Can i help you with this issue, maybe you can point on some places where i start implement? |
@evilebottnawi that would be awesome. Adding new package managers - basic support at least - is now fairly easy. See python and buildkite. I also added a doc about it here: https://github.com/renovateapp/renovate/blob/master/docs/adding-a-package-manager.md Adding "advanced" managers has a couple of challenges right now though:
I am doing a major refactor right now to address (2) and many other smaller pain points so that new package managers can get all the advanced features we have for npm/yarn, without having to reimplement them all (e.g. pinning, separating major/minor PRs, etc). The best thing you could help with right now is to investigate the feasibility of porting Composer's semver implementation to JS. It's here: https://github.com/composer/semver Option 1: completely rewrite, but piggy backing on the JS semver logic we already have. |
@rarkins Thanks for clarify
try to find better way for this 👍 |
Just information: https://gitlab.com/kornelski/babel-preset-php looks very good to transpile php semver to js semver without rewriting |
@evilebottnawi that looks interesting - I hadn't noticed it previously. At a high level, I had thought it might be a two step process:
If you can solve (1) then I can probably do most of (2) |
@rarkins i try to do this in this week, i think we can do this without |
@evilebottnawi the WIP PR for Composer support (#1993) is now ready for the versioning part, if you're still interested |
Outstanding issues for Composer support:
|
@rarkins good work! |
Composer support is now nearly ready for enabling by default. It supports versions, ranges and lock file updating. I will keep this issue open until I consider Composer support to be fully mature, and post updates here until then so you can be informed as new features and fixes are added. |
Thank you @rarkins You've been awesome... |
I just like to say that I've tried on a bunch of my repos and I can say the following things work
You can see here https://wpquark.io/swashata/composer-renovate-test/merge_requests ;) |
@rarkins will be great also support custom register, example
Example package |
Please create a new feature request for custom registries and include any info you have on “how it’s usually done”, etc. Eg if there are ways it’s defined within the registry itself, or always out of band. |
@rarkins I've enabled composer support for a private repository but don't receive any PRs for updated dependencies. I've checked if there are any through
|
@robinvdvleuten can you repost this to the renovatebot/config-help repo and include an extract of what your |
@rarkins sure! see renovatebot/config-help#73 |
I made three fixes/improvements to PHP logic yesterday:
Also note: |
@rarkins I think we need a way to restrict dependencies within renovateapp for platform config present in the Because in many cases, we develop and build under PHP7 env, whereas we want dependencies to be compatible with PHP 5.6. So in my project I have set |
New: Composer lock updating is now live in the hosted app |
Nice, now the only thing left for feature parity with dependencies.io is transitive dependency updates (#1382) 🎉 |
Is transitive dependencies on the horizon? I love renovate, and it's great, but I have to manually check out the branches to update the transitive dependencies just now. Especially when an update requires a transitive update, I'm not able to merge until I've done that. |
@McInkay could you give an example, especially if you have one where transitive dependency updates are required? |
Here's one where the drush update required an update to a dependency, so I needed to manually run composer with |
@McInkay I've added |
Great, thanks :-) |
I'm going to close this issue now, as it has solved its purpose and Composer support is pretty solid. New issues for features are always welcome. |
Hi! This is a great tool and I've seen how it gets used by the folks at Algolia on their public repositories. We're just integrating it ourselves for our Yarn-based flow and npm packages.
However, we are also using Composer for PHP packages. Do you think this is something you'd consider adding?
Would you point me how to add another package manager? I couldn't find an article about that in the docs.
Thank you!
The text was updated successfully, but these errors were encountered: