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
Copy file name to clipboardExpand all lines: bylaws/007-psr-naming-conventions.md
+4-15Lines changed: 4 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,18 +5,7 @@ Naming conventions for code released by PHP FIG
5
5
2. Abstract classes MUST be prefixed by `Abstract`: e.g. `Psr\Foo\AbstractBar`.
6
6
3. Traits MUST be suffixed by `Trait`: e.g. `Psr\Foo\BarTrait`.
7
7
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