We're putting together a package in Symfony 2 that we plan on using in various places. We're developing it locally, but also want to use it in production. To accomplish this, we're developing it in a workbench
folder, similar to how Laravel does it. In other words, we have our usual bundles in src/
, but also have separate code in workbench/
, and it's being included through PSR-0 autoload.
That's all well and good. To use our package in production, then, we've added a line into composer.json to require the package. That works in production, but when we run composer update
locally, it downloads another copy of the package and adds it into vendor
, so we end up with duplicate classes: one in vendor, and one in workbench. And the copy in vendor overrides the one in workbench. Deleting the folder out of vendor locally fixes things, but that seems really inefficient. Editing our package directly in vendor
also seems incredibly risky. Is there a better way to accomplish what we're looking to do? Is our whole setup wrong?