Skip to content

An example library with a namespaced class packed as a composer package.

Notifications You must be signed in to change notification settings

DevDungeon/PHP-Composer-Package-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

PHP Composer Package Example

The library

The library directory contains a custom package. The composer.json defines the name of the package, the version number, and how to autoload the classes from the src/ directory.

The application

The application/ directory contains a sample application that uses the class from the library/ directory. There is a composer.json that loads the library locally and then creates an instance of the class for use.

From this directory, run:

composer install
php main.php

Learn more

To learn more about Composer basics, check out my tutorial PHP Composer Basics

Author

John Leon [email protected]

About

An example library with a namespaced class packed as a composer package.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages