Cannot install yiisoft/yii2-apidoc

When I did composer require --prefer-dist yiisoft/yii2-apidoc, the terminal is telling me problem with phpdocumentor/reflection-docblock version.

When I did composer require --prefer-dist yiisoft/yii2-apidoc --update-with-dependencies, the terminal told me other relations error)

Please help me, I am not a master with composer packages management so confused.

Please, run this:

composer depends phpdocumentor/reflection-docblock

Two packages are trying to install this same lib with different versions. You have to discover which package are doing this and study some possible conciliation between them.

Usually you change the version of one of those packages, or abandon them, or contribute to the development fixing the dependency in one of them.

Thank you for your answer. I tried your way and got this:


does it mean, conflict package is required by yii2 itself?

They problem are depending on this package indirectly, could you re-run that command adding the --tree option to it?

composer depends --tree phpdocumentor/reflection-docblock

Result: