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.
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’sfilterPackageMap()
method to simply return the package map without altering it.