phpstan / extension-installer

Composer plugin for automatic installation of PHPStan extensions.
MIT License
399 stars 27 forks source link

composer.json's `extra` section must be honored also for root-package #36

Closed mvorisek closed 1 year ago

mvorisek commented 2 years ago

Currently state

composer root package requires manual include.

Expected state

all extentions exported using composer.json's extra section must be used for the current/root repo too

mvorisek commented 2 years ago

I am very confident this is a bug, as currently, exported phpstan config using extra section must be declared for the root project manually like: https://github.com/mvorisek/atk4-hintable-mirror/blob/1.7.2/phpstan.neon.dist#L3

But then when this project x/y is included in another project (/w phpstan/extension-installer dep), phpstan cannot be run over vendor/x/y (/w phpstan installed in the root project) as the phpstan config is included this time by phpstan/extension-installer dep already, error:

This file is included multiple times:
- ...\vendor\x\y\phpstan-ext.neon

I belive we need to generate one config for the root project like in https://github.com/phpstan/extension-installer/blob/1.1.0/src/Plugin.php#L118

@ondrejmirtes does this makes sense for you?

mvorisek commented 2 years ago

steps to reproduce: https://github.com/phpstan/extension-installer/pull/39#issuecomment-994892208

ondrejmirtes commented 1 year ago

I feel like there isn't any demand for this, and I feel against it too. So closing. Thanks for understanding.

github-actions[bot] commented 1 year ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.