explaingit

php-fig/fig-standards

12,520Audience · developerComplexity · 1/5Setup · easy

TLDR

Official home of PHP Standard Recommendations (PSRs), shared coding and interface specifications created by major PHP framework representatives so that libraries and frameworks can work together without custom adapters.

Mindmap

mindmap
  root((fig-standards))
    What it does
      Defines PHP interfaces
      Covers autoloading
      HTTP messages
      Logging and caching
    How it works
      Draft proposals
      Mailing list review
      Member votes
    Audience
      PHP library authors
      Framework maintainers
    Resources
      Spec documents
      php-fig.org website
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Look up the PSR specification your framework requires before writing a compatible library interface.

USE CASE 2

Propose a new PHP interoperability standard by submitting a draft to the FIG mailing list.

USE CASE 3

Check which PSRs a library claims to implement before deciding whether it fits your project.

Getting it running

Difficulty · easy Time to first run · 5min
No license information is mentioned in the explanation.

In plain English

php-fig/fig-standards is the official repository for PHP Standard Recommendations, commonly called PSRs. The PHP Framework Interoperability Group (PHP-FIG) is a collection of PHP project representatives who create and vote on shared specifications so that different frameworks and libraries can work together without friction. PSRs cover practical interoperability concerns: how PHP source files should be formatted, how class autoloading should work, how HTTP request and response messages should be structured, and how common interfaces for logging, caching, and event dispatching should look. When a major framework adopts these standards, any library that also follows them can plug directly into that framework without needing custom adapters. This repository is where proposed and approved standards are stored and tracked. A new PSR starts as a draft placed in a proposed folder, then goes through a structured review process involving discussion on the group'''s mailing list and votes from the member representatives. Anyone can read and comment, but formal votes are reserved for representatives of member projects. Any PHP project can apply for membership by sending a request to the mailing list, current members then vote on the application. All discussion is expected to happen on the mailing list rather than through GitHub pull request comments or issues, which the README notes are frequently overlooked. GitHub serves primarily as a storage location for the specification documents. The repository contains no runnable code, only the specification documents written in English. The full list of accepted PSRs and current voting members is available on the project'''s main website at php-fig.org.

Copy-paste prompts

Prompt 1
I'm building a PHP library and need to follow PSR-7 HTTP message interfaces. Show me the required methods for a RequestInterface based on the PSR-7 spec.
Prompt 2
What does PSR-4 autoloading require, and how do I configure Composer to load my library's classes following that standard?
Prompt 3
I want to write a PSR-3-compatible logger in PHP. What methods must my class implement and what log levels must it support?
Open on GitHub → Explain another repo

← php-fig on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.