navarr/attribute-dependency

Adds the #[Dependency] attribute

Maintainers

Package info

github.com/navarr/attribute-dependency

pkg:composer/navarr/attribute-dependency

Fund package maintenance!

navarr

Statistics

Installs: 279

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2021-07-11 00:57 UTC

This package is auto-updated.

Last update: 2026-03-11 10:54:04 UTC


README

This is a composer package to make your static analysis tools happy :)

Usage

use Navarr\Attribute\Dependency;
    
// ...
    
#[Dependency(package: 'psr/log', versionConstraint: '^1', reason: 'Use of LoggerInterface::error')]

PHP 7 support

While the Attribute only works in PHP8, so long as it does not span multiple lines, it may be included in PHP7 codebases

Tools

See navarr/dependency-annotation for tools to analyse usage.