beberlei / composer-monorepo-plugin

Integrates Composer into monolithic repositories with many packages.
MIT License
305 stars 41 forks source link

Alternate fix for #52 (--no-dev breaks non-dev dependencies) #56

Closed timroberson closed 4 years ago

timroberson commented 4 years ago

While #53 does fix the issue with non-dev dependencies, it introduces a new side effect where autoload-dev requirements are included even when --no-dev is specified. I believe non-dev dependencies break when --no-dev is specified because Composer's AutoloadGenerator is filtering packages based on $mainPackage->getRequires(), which is not set by the plugin. Since the plugin does its own filtering, I think we can override Composer’s filterPackageMap() method to simply return the package map without altering it.

beberlei commented 4 years ago

That is a much better change! Thank you