Skip to content

Commit f48129c

Browse files
committed
Clean up naming convention list for PERs and ARs.
1 parent 419c97c commit f48129c

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

bylaws/007-psr-naming-conventions.md

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,7 @@ Naming conventions for code released by PHP FIG
55
2. Abstract classes MUST be prefixed by `Abstract`: e.g. `Psr\Foo\AbstractBar`.
66
3. Traits MUST be suffixed by `Trait`: e.g. `Psr\Foo\BarTrait`.
77
4. PSR-1, 4, and 12 MUST be followed.
8-
5. The vendor namespace for code released as part of a PSR MUST be `Psr`.
9-
6. The vendor namespace for code released as part of a PER MUST be `Fig`.
10-
7. There MUST be a package/second-level namespace in relation with the PSR or PER that
11-
covers the code.
12-
8. Composer packages for PSRs MUST be named `psr/<package>` e.g. `psr/log`. Composer packages for PERs MUST be named `fig/<package>`. If they
13-
require an implementation as a virtual package it MUST be named
14-
`psr/<package>-implementation` and be required with a specific version like
15-
`1.0.0`. Implementors of that PSR can then provide
16-
`"psr/<package>-implementation": "1.0.0"` in their package to satisfy that
17-
requirement. Specification changes via further PSRs should only lead to a new
18-
tag of the `psr/<package>` package, and an equal version bump of the
19-
implementation being required.
20-
9. Special lightweight utility packages MAY be produced alongside PSRs and
21-
interfaces and be maintained and updated after the PSR has been accepted. These
22-
MUST be under the vendor namespace `Fig`.
8+
5. For code released as part of a PSR, the vendor namespace MUST be `Psr` and the Composer package name MUST be `psr/<package>` (e.g., `psr/log`).
9+
6. For code released as part of a PER or any other Auxiliary Resources, the vendor namespace MUST be `Fig` and the Composer package name MUST be `fig/<package>` (e.g., `fig/cache-util`).
10+
7. There MUST be a package/second-level namespace in relation with the PSR or PER that covers the code.
11+
8. Implementations of a given PSR or PER SHOULD declare a `provides` key in their `composer.json` file in the form `psr/<package>-implementation` with a version number that matches the PSR being implemented. For example, `"psr/<package>-implementation": "1.0.0"`.

0 commit comments

Comments
 (0)