Tag

PSR-4

0 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
May 8, 2024 · Backend Development

Understanding Composer Autoload and PHP Class Loading in Laravel

This article explains how Laravel’s convenient architecture can hide PHP’s file‑loading requirements, demonstrates the fatal error caused by missing requires, and shows how Composer’s PSR‑4 autoloading automatically resolves class loading through proper configuration and the vendor/autoload.php entry point.

AutoloadComposerLaravel
0 likes · 7 min read
Understanding Composer Autoload and PHP Class Loading in Laravel
php中文网 Courses
php中文网 Courses
Apr 10, 2023 · Backend Development

How to Create and Publish a PHP Composer Package to GitHub and Packagist

This guide walks you through preparing a GitHub and Packagist account, creating a repository, initializing a Composer package (both automatically and manually), configuring PSR‑4 autoload, writing source code, and finally publishing the package by pushing to GitHub and submitting it to Packagist.

AutoloadComposerGitHub
0 likes · 6 min read
How to Create and Publish a PHP Composer Package to GitHub and Packagist
php中文网 Courses
php中文网 Courses
Oct 30, 2020 · Backend Development

Understanding Composer Autoloading: PSR-0, PSR-4, Class‑Map, and Files

This article explains how Composer, the PHP dependency manager, supports four autoloading mechanisms—PSR‑0, PSR‑4, class‑map, and files—detailing their differences, configuration in composer.json, and practical code examples for loading classes.

AutoloadingComposerPHP
0 likes · 3 min read
Understanding Composer Autoloading: PSR-0, PSR-4, Class‑Map, and Files