Someone advised the following:
First do composer install
, then rm
the packages you want to be working on, then do composer install --prefer-source
to get complete git repos for the rest of the packages inside your vendors folder.
Then just cd into a vendor/whatever folder, edit, commit, push.
Sounds like a plan to me.
I'd just clone it straight to the workbench
directory, then run composer install
wherever it was cloned to (workbench/your/package
). Laravel will pick it up and you can both use and work on it at the same time.
Okay, but I'd first have to set up my main repo, so it would actually be:
composer install (main repo)
delete subpackage from vendors
cd to workbench/whatever
git clone subpackage
composer install again
Sounds about right? If so, it seems to be similar in complexity to what I was suggested earlier.
Nothing complex about it. Don't add the package to your requires
section in Composer yet. Develop the package locally with the workbench and by cloning it from your repository.
Thanks Jason, I would click "solution" on your answer now if I could, but I already marked that other reply as a solution and I can't change it…
How would this workflow look for a non-Laravel-specific package? For example, just some general PHP class that is a Composer package?
jasonlewis said:
I'd just clone it straight to the
workbench
directory, then runcomposer install
wherever it was cloned to (workbench/your/package
). Laravel will pick it up and you can both use and work on it at the same time.
But wouldn't this result in two different versions of your code? Which one do you edit then?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community