Closed RemiCollin closed 9 years ago
Hmm, not sure I understand. Let's assume the following directory structure:
- root
| - src
| - tests
| - vendor
You now run studio create
four times...
- root
| - src
| - tests
| - vendor
| - managed1
| - managed2
| - managed3
| - managed4
Now you want your four managed subprojects in one common directory, right? So you move them:
- root
| - src
| - tests
| - vendor
| - studio
| | - managed1
| | - managed2
| | - managed3
| | - managed4
All you need to do is update the paths in studio.json
and run composer dumpautoload
. Or am I misunderstanding something?
Yes it the way i made it works. Just thinking most user would probably want it this way, as it worked for example in L4's workbench, so automating this could be a nice addition.
I still don't understand, sorry. Can you point me to a place in Studio's code where I should check parent directories for a composer.json?
Ok, let's say I have a /studio subfolder where I develop my packages. I would do :
cd studio
studio create newpackage
Right now composer throw an error as running composer dump-autoload
after package creation won't find any composer.json file in the folder.
But forget it, there will be no need for that, I just found a simple way to do it, simply :
studio create studio/newpackage
Works... :facepalm
Yeah, exactly. Studio should always be run in the root of the package. I need to think whether that can be improved...
I think as long as it is clearly stated in the doc, it's perfectly fine that way.
I tested creating a /studio subfolder as I have 4 different packages I'm working on into the same project. This doesn't work as studio looks for the composer.json in the same folder he created the package into.
As a workaround I moved the studio.json in the root folder, and edited the package folder, which works perfectly.
Maybe it would be nice to look recursively into parent folder for the composer.json ?
(not PRing as I know you're about to release a new version ;) )