Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elliotjreed/php-cli-boilerplate
A vanilla PHP command-line application boilperplate / template.
https://github.com/elliotjreed/php-cli-boilerplate
Last synced: 2 days ago
JSON representation
A vanilla PHP command-line application boilperplate / template.
- Host: GitHub
- URL: https://github.com/elliotjreed/php-cli-boilerplate
- Owner: elliotjreed
- License: mit
- Created: 2017-08-11T08:38:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-15T11:58:23.000Z (13 days ago)
- Last Synced: 2024-12-15T12:29:36.887Z (13 days ago)
- Language: PHP
- Homepage: https://www.elliotjreed.com
- Size: 134 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP Command Line Boilerplate / Example Project
This repository shows a basic setup for a PHP package or application in PHP.
## Getting Started
PHP 8.2 or above and Composer is expected to be installed on our system.
### Installing Composer
For instructions on how to install Composer visit [getcomposer.org](https://getcomposer.org/download/).
### Installing
After cloning this repository, change into the newly created directory and run
```bash
composer install
```or if you have installed Composer locally in your current directory
```bash
php composer.phar install
```This will install all dependencies needed for the project.
## Running the Tests
All tests can be run by executing
```bash
vendor/bin/phpunit
````phpunit` will automatically find all tests inside the `test` directory and run them based on the configuration in the `phpunit.xml` file.
### Testing Approach
The test for the class `Greeting` verifies that the return value of the `sayHello` method returns the string "Hello {name}", where {name} is the value passed through to the constructor.
## Running the Application
To run the application execute `bin/hello.php` or `php bin/hello.php`.
You should see the text "Hello" being printed.
```bash
bin/hello.php
```## Built With
- [PHP](https://secure.php.net/)
- [Composer](https://getcomposer.org/)
- [PHPUnit](https://phpunit.de/)## License
This project is licensed under the MIT License - see the [LICENCE.md](LICENCE.md) file for details.