Modifying Symfony composer vendors and using them until their PR is merged
I want to create a PR to a Github repo that is used as a vendor in a Symfony project until the merge is done. Let's suppose that it will be done in the future and not get rejected. The repo is not pulled using git, is installed using composer.
Now, this replaced the package in the vendor with my own forked project's branch. I want to edit some files, commit them, and when I'm ready to, PR to the original repository.
How can I do that?
I've tried pushing some changes to my own repo first, but I'm getting the following:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
This is the repository downloaded with composer, so that might be the problem. If I'd pull it myself it would most likely work, but I want to make this work with composter-downloaded repositories because I want to test them on working projects.
First, you have to setup the remote of the repository you want push into.
Actually, you want make changes in your fork only, so go in the root directory of the package (e.g. vendor/package/name/) and run :
Then, just make changes and push when you are done.
When you want make your PR, just go in your repository (or in the original) and hit "Create a pull request".
It will automatically propose you to compare your own branch with one of the original repository.
Select the good branches and submit the PR.
Try to be as clear as possible with the reason of your PR, and if there is issues related to, just reference them in the message of your PR.
Note 2: Commit only the changes you make on the files corresponding to the bug or feature you are working on. All other files should be intact, even if test suites doesn't pass, you don't have to fix them.
If you got an error like origin remote already exists , run the following :