0

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?

greggilbert
  • 1,313
  • 2
  • 13
  • 26
  • Your question isn't a duplicate, but my answer from http://stackoverflow.com/a/18130386/778719 probably applies to your question. – Danack Dec 31 '13 at 12:06

1 Answers1

0

I've asked around a bit, and it seems the easiest thing to do is to just work out of the vendor folder. Just need to be careful and run composer status -v when we update or anything.

greggilbert
  • 1,313
  • 2
  • 13
  • 26