https://github.com/devdungeon/php-composer-package-example
An example library with a namespaced class packed as a composer package.
https://github.com/devdungeon/php-composer-package-example
Last synced: 2 months ago
JSON representation
An example library with a namespaced class packed as a composer package.
- Host: GitHub
- URL: https://github.com/devdungeon/php-composer-package-example
- Owner: DevDungeon
- Created: 2020-03-21T20:47:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-21T21:06:00.000Z (over 6 years ago)
- Last Synced: 2026-01-01T09:10:09.709Z (6 months ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```bash
composer install
php main.php
```
## Learn more
To learn more about Composer basics, check out my
tutorial [PHP Composer Basics](https://www.devdungeon.com/content/php-composer-basics)
## Author
John Leon