Logo vun Php Modern Standards

Php Modern Standards

Communautéit
peterbamuhigire
php-modern-standards

Use when writing or reviewing PHP 8+ applications, object-oriented domain code, Laravel services, PSR-compliant packages, secure request handling, tests, or performance-sensitive PHP.

Iwwersiicht

Editeurpeterbamuhigire
Repositorychwezi-dev-engine
Skill-Nummphp-modern-standards
Stären
29
Forks
6
Matgeliwwert Fichieren
26
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 26 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum peterbamuhigire op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Php Modern Standards an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/peterbamuhigire/chwezi-dev-engine/tree/main/skills/languages/php-modern-standards
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/peterbamuhigire/chwezi-dev-engine.git /tmp/chwezi-dev-engine
mkdir -p .claude/skills
cp -r /tmp/chwezi-dev-engine/skills/languages/php-modern-standards .claude/skills/php-modern-standards
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Php Modern Standards an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Php Modern Standards automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Php Modern Standards net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

PHP Modern Standards

Acknowledgement: Shared by Peter Bamuhigire, techguypeter.com, +256 784 464178.

Use When

  • Modern PHP development standards for maintainable, testable, object-oriented code. Use when writing PHP 8+ applications, implementing OOP patterns, ensuring security, following PSR standards, optimizing performance, or building Laravel...

Workflow

  • For long-lived PHP application work, load references/world-class-php-oop-clean-architecture.md before designing controllers, services, repositories, or domain objects.
  • For containerized PHP work, pair with docker-development.
  • Pin a supported PHP branch before choosing language features. Check https://www.php.net/supported-versions.php at execution time; record the access date and branch support state rather than relying on a copied lifecycle table.
  • For a minor-branch upgrade, assess the application's PHP and extension constraints, run every intervening migration guide, validate the locked dependencies under the actual target runtime, and test the application before production cutover. Follow references/php-runtime-upgrades.md.

Evidence Produced

CategoryArtifactFormatExample
CorrectnessPHP test planMarkdown doc per skill-composition-standards/references/test-plan-template.md covering unit, integration, and contract testsdocs/php/test-plan-checkout.md
OperabilityPHP-FPM operations noteMarkdown doc covering opcache, request lifecycle, and OPcache reset proceduredocs/php/fpm-ops-note.md

References

  • Use the references/ directory for deep detail after reading the core workflow below.
  • Use the examples/ directory for concrete patterns when implementation shape matters.
  • Use references/php-runtime-upgrades.md for a staged PHP 8.5 compatibility and release procedure.

Production-grade PHP patterns for maintainable, testable, secure, high-performance applications.

Core Principle: Write type-safe, secure, performant PHP code following PSR standards with modern PHP 8+ features.

References:

  • references/performance-efficiency.md — generators, OPcache, profiling, Fibers deep dive

  • references/code-quality-tooling.md — PHPStan, Pint config, CI/CD patterns

  • references/rate-limiting.md — rate limiting patterns

  • references/message-queues.md — queue patterns

  • references/cache-invalidation.md — cache invalidation patterns

  • references/resilience-patterns.md — circuit breakers, retries

  • references/restful-api-patterns.md — cURL client, Attribute routing, JWT, API versioning, testing

  • references/database-orm-patterns.md — PDO, QueryBuilder, Active Record Model, soft delete, ORM concepts

  • references/attack-prevention.md — SQL injection, XSS, CSRF, CSP, brute force, least privilege

  • references/world-class-php-oop-clean-architecture.md — PHP 8 OOP, SOLID, clean architecture, repositories, adapters, and framework-independent domain rules

  • references/source-register-dev-engine.md — book sources (titles only) used for this development-engine upgrade

  • references/php-security.md - absorbed PHP-specific security hardening, sessions, validation, crypto, upload, and deployment guidance

  • references/php-vs-nextjs.md - absorbed PHP vs Next.js architecture decision guidance

  • references/javascript-php-integration.md - absorbed integration patterns for PHP-rendered pages and JavaScript modules Examples: examples/modern-php-patterns.php, examples/laravel-patterns.php Security: Load references/php-security.md for comprehensive security patterns.

  • Use for PHP 8+, OOP, security, testing, performance, and Laravel; do not use for legacy PHP below 7.4 or WordPress-specific work.


File Structure

php
<?php

declare(strict_types=1);

namespace App\Domain\User;

use App\Domain\Shared\ValueObject;

final readonly class User
{
    public function __construct(
        private int $id,
        private string $email,
    ) {
    }
}

Rules: Always declare(strict_types=1), one class per file, namespace = directory, import all dependencies.

Cross-Platform File Naming (MANDATORY)

Code runs on Windows (dev), Ubuntu (staging), and Debian (production). Linux is case-sensitive:

  • Class files: PascalCase matching class name (StaffService.php)
  • Config dirs: lowercase (src/config/, src/lang/)
  • Module dirs: PascalCase matching namespace (src/HR/Services/)
  • require/include: Must match EXACT case on disk
  • Paths: Use / (forward slash). Never hardcode C:\. Use sys_get_temp_dir() for temp files.

Additional Guidance

Extended guidance for php-modern-standards was moved to references/skill-deep-dive.md to keep this entrypoint compact and fast to load.

PHP DevOps Runtime Discipline

When PHP work affects deployment, Docker, or production operations, pair this skill with docker-development and deployment-release-engineering, then apply the PHP delivery notes in ../deployment-release-engineering/references/devops-book-patterns.md:

  • keep Composer lockfiles and dependency installation reproducible;
  • run static analysis, coding standards, and tests in CI before packaging;
  • manage .env and secrets outside version control;
  • document PHP-FPM pool settings, OPcache reset or warm-up, queue worker restart, cache clear/warm, and file-permission steps;
  • include database migration order, backup, verification queries, and rollback or compensating actions;
  • verify server updates, unattended security updates, web server config, and backup/restore for uploaded files.

Use that deep dive for:

  • Type System
  • Modern Features
  • Performance
  • SOLID Principles
  • Control Flow
  • Security (Essentials)
  • Testing
  • Laravel Conventions
  • Code Quality Tooling
  • PSR Standards
  • Anti-Patterns
  • Checklist

Decision Rules

ConditionAction
Boundary accepts external dataValidate into typed input before domain logic
Framework convention is secure and testablePrefer it over a custom abstraction
Change affects persistence or queuesDefine transaction, retry, and idempotency behaviour

Degraded Mode

Fallback: without execution, provide exact Composer, static-analysis, and test commands. Do not assume framework support without dependency metadata.

Domain Anti-Patterns

  • Concatenating user input into SQL.
  • Hiding domain behaviour in controllers.
  • Catching Throwable without recovery policy.
  • Adding mutable service-locator dependencies.
  • Claiming compatibility without checking Composer constraints.

Inputs

ArtefactRequired?Purpose
PHP version, framework, code, and repository standardsyesApply compatible typing, security, and tooling rules

Outputs

  • Produce PHP code or findings with static-analysis, test, security, and compatibility evidence.

Capability contract

Read/search and local static checks are allowed. Dependency changes, migrations, deployment, and production execution require explicit task authority.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Php Modern Standards?

Use when writing or reviewing PHP 8+ applications, object-oriented domain code, Laravel services, PSR-compliant packages, secure request handling, tests, or performance-sensitive PHP.

Firwat Php Modern Standards op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Php Modern Standards besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Php Modern Standards an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/peterbamuhigire/chwezi-dev-engine/tree/main/skills/languages/php-modern-standards an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Php Modern Standards benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Php Modern Standards benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Php Modern Standards domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Php Modern Standards gratis?

Jo. De Skill gëtt vum peterbamuhigire ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇