navarr/attribute-dependency

Adds the #[Dependency] attribute

Fund package maintenance!
navarr

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

This package is auto-updated.

Last update: 2024-12-11 08:00:11 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.