-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Naming conventions for code released by PHP-FIG | ||
----------------------------------------------- | ||
|
||
1. Interfaces MUST be suffixed by `Interface`: e.g. `Psr\Foo\BarInterface`. | ||
2. Abstract classes MUST be prefixed by `Abstract`: e.g. `Psr\Foo\AbstractBar`. | ||
3. Traits MUST be suffixed by `Trait`: e.g. `Psr\Foo\BarTrait`. | ||
4. PSR-0, 1 and 2 MUST be followed. | ||
5. The vendor namespace MUST be `Psr`. | ||
6. There MUST be a package/second-level namespace in relation with the PSR that | ||
covers the code. | ||
7. Composer package MUST be named `psr/<package>` e.g. `psr/log`. If they | ||
require an implementation as a virtual package it MUST be named | ||
`psr/<package>-implementation` and be required with a specific version like | ||
`1.0.0`. Implementors of that PSR can then provide | ||
`"psr/<package>-implementation": "1.0.0"` in their package to satisfy that | ||
requirement. Specification changes via further PSRs should only lead to a new | ||
tag of the `psr/<package>` package, and an equal version bump of the | ||
implementation being required. |