You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you require a package of the type "metapackage", a scan always gives the error:
Found 1 unused dependency!
(those are listed in composer.json, but no usage was found in scanned paths)
Metapackages don't come with any files and will not appear to be used by code in most cases.
It can be used to include other dependencies or make sure some packages or versions of packages are not installed. I mainly use it to trigger conflicts with packages that have a bug in specific versions. https://getcomposer.org/doc/04-schema.md#type
Bug
A package with type "metapackage" should not trigger an unused dependency error.
Usage of code that is installed because it is required by a metapackage should obviously still trigger a shadow-dependency error.
Workaround
You can add configuration to not trigger the error like so:
Description
When you require a package of the type "metapackage", a scan always gives the error:
Metapackages don't come with any files and will not appear to be used by code in most cases.
It can be used to include other dependencies or make sure some packages or versions of packages are not installed. I mainly use it to trigger conflicts with packages that have a bug in specific versions.
https://getcomposer.org/doc/04-schema.md#type
Bug
A package with type "metapackage" should not trigger an unused dependency error.
Usage of code that is installed because it is required by a metapackage should obviously still trigger a shadow-dependency error.
Workaround
You can add configuration to not trigger the error like so:
But it doesn't really make sense to always have to do this for a metapackage.
The text was updated successfully, but these errors were encountered: