Closed weotch closed 8 years ago
Which version are you using?
0.9.5
Hey, sorry for not getting back earlier.
Why did you have duplicate classes in the first place?
By the way, I am revamping how this package works. In the next big release, when you load a package via Studio, the consuming package will symlink its location on disk into the vendor folder instead of messing with the generated autoloader files.
We do this by hooking into Composer's path repository mechanism (which you can use directly until I fix the remaining implementation issues with the new approach).
I end up with duplicate classes because I'm workbenching a package that is already being used by my app. For instance, say I am working on a project and I realize that there is a bug in a package it's using. What I want to do is use Studio to workbench the fork of that package where I work on the bug fix. For a time, I have a duplicate classes in /vendor and /workbench.
With the new approach you are talking about, does that mean that Studio will be touching the composer.json file?
Nope, everything will be contained in the studio.json file. When Studio discovers that, it will automatically set up the paths defined therein as path repositories. Great for your local development, but you won't have to change your composer.json file (which would mess with other contributors or dependants) or remember not to commit the changes to that file.
Perf! Looking forward to it.
As stated above, this is fixed in master. We're just waiting for a Composer PR to be merged, then this can take off. ;)
:beers:
In my use case, I want to workbench a package that is being consumed by a project already. My expectation is that, by loading it via Studio, the PSR-4 classes of the workbenched package will be get loaded instead of those in the composer vendor directory. This isn't what I'm observing, though. Is my expectation wrong here?