0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【PHP】PSRについて

Last updated at Posted at 2021-02-05

はじめに

以前の記事でオートロードについて触れたのですが、その際にpsr-4という単語を初めて目にし、その理解を後回しにしていたので、今回軽く調べて記事にすることにしました。
知識を整理するための個人的な備忘録です。

PSRとは

PSRとは、PHP-FIG(PHP Framework Interop Group)が策定しているPHPコーディング規約の事で、PHP Standards Recommendationsの略です。

PHP Standards Recommendations

PHP Standards Recommendations

上記のページに規約が一覧で表示されています。

PSRワークフロー付属定款によれば、羅列された各PSRはステータスを保持しています。提案が参加投票に合格すると、Draftとしてリストされます。 PSRが Acceptedとマークされていなければ、変更の対象となります。Draft中は大幅に変更される可能性がありますが、Reviewにはわずかな変更しかありません。

PSR一覧(2021年2月時点)

NUM TITLE STATUS
0 Autoloading Standard Deprecated
1 Basic Coding Standard Accepted
2 Coding Style Guide Deprecated
3 Logger Interface Accepted
4 Autoloading Standard Accepted
5 PHPDoc Standard Draft
6 Caching Interface Accepted
7 HTTP Message Interface Accepted
8 Huggable Interface Abandoned
9 Security Advisories Abandoned
10 Security Reporting Process Abandoned
11 Container Interface Accepted
12 Extended Coding Style Guide Accepted
13 Hypermedia Links Accepted
14 Event Dispatcher Accepted
15 HTTP Handlers Accepted
16 Simple Cache Accepted
17 HTTP Factories Accepted
18 HTTP Client Accepted
19 PHPDoc tags Draft

認証フロー

PSRのワークフローには、以下のステータスがあります。

1.Pre-Draft — 参加投票に合格するとDraftに進む

2.Draft — 準備投票に合格するとReviewに進む

3.Review — 承認投票に合格するとAcceptedに進む

4.Accepted — 正式承認され提案(PSR勧告となる)

上記以外に、2つのステータスがあります。

Deprecated — 承認されたが不要になった提案(通常、新バージョンに変わった提案)

Abandoned — 積極的な議論がなく放棄された提案

参考

PSR - Ground Sunlight

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?