Support the ongoing development of Laravel.io →
posted 10 years ago
Packages
Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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…

Last updated 2 years ago.
0

How would this workflow look for a non-Laravel-specific package? For example, just some general PHP class that is a Composer package?

Last updated 2 years ago.
0

jasonlewis said:

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.

But wouldn't this result in two different versions of your code? Which one do you edit then?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.