Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5/**
6 * Fast Forward Development Tools for PHP projects.
7 *
8 * This file is part of fast-forward/dev-tools project.
9 *
10 * @author   Felipe SayĆ£o Lobato Abreu <github@mentordosnerds.com>
11 * @license  https://opensource.org/licenses/MIT MIT License
12 *
13 * @see      https://github.com/php-fast-forward/
14 * @see      https://github.com/php-fast-forward/dev-tools
15 * @see      https://github.com/php-fast-forward/dev-tools/issues
16 * @see      https://php-fast-forward.github.io/dev-tools/
17 * @see      https://datatracker.ietf.org/doc/html/rfc2119
18 */
19
20namespace FastForward\DevTools\Composer;
21
22use Composer\Plugin\PluginInterface;
23
24/**
25 * Defines DevTools-specific Composer plugin conventions.
26 */
27interface DevToolsPluginInterface extends PluginInterface
28{
29    /**
30     * @var list<string> composer command names and aliases that DevTools MUST NOT override
31     */
32    public const array COMPOSER_COMMAND_NAMES = [
33        '_complete',
34        'about',
35        'archive',
36        'audit',
37        'browse',
38        'bump',
39        'cc',
40        'check-platform-reqs',
41        'clear-cache',
42        'clearcache',
43        'completion',
44        'config',
45        'create-project',
46        'depends',
47        'diagnose',
48        'dump-autoload',
49        'dumpautoload',
50        'exec',
51        'fund',
52        'global',
53        'help',
54        'home',
55        'i',
56        'info',
57        'init',
58        'install',
59        'licenses',
60        'list',
61        'outdated',
62        'prohibits',
63        'r',
64        'reinstall',
65        'remove',
66        'repo',
67        'repository',
68        'require',
69        'rm',
70        'run',
71        'run-script',
72        'search',
73        'self-update',
74        'selfupdate',
75        'show',
76        'status',
77        'suggests',
78        'u',
79        'uninstall',
80        'update',
81        'upgrade',
82        'validate',
83        'why',
84        'why-not',
85    ];
86
87    /**
88     * Detects whether a command name or alias is already registered in Composer's command surface.
89     *
90     * @param string|null $name the command name or alias being evaluated
91     */
92    public function isRegisteredCommand(?string $name): bool;
93}