Overly cautious HelloWorld class. See the repo for details.
This package is auto-updated.
Last update: 2022-06-29 01:49:40 UTC
This repo is an overly-cautious Hello-World PHP script for fun. It includes the following tests and CIs to just say "Hello-World!".
- Supported PHP Version to test
- PHP v7.1, 7.2, 7.3, 7.4, 8.0 (, nightly)
- Details see: .travis.yml
- Note: The nightly build version (PHP8-dev) might fail in TravisCI.
- Unit Test & Code Coverage
- Coding Standard Compliance
- PHP Static Analysis
- Docker for Local Testing
- Details see: docker-compose.yml
This repo uses the following CIs. On your use, register your repo first.
- TravisCI: Used for running tests.
- COVERALLS: Used for code coverage.
- Scrutinizer CI: Used for code quality.
Copy, initialize the project, smoke test, add CI's ACCESS TOKEN then you're redy-to-go!
Create a new copy.
Choose one of the below commands that suits you.
- Note that you need to specify your project's name. This will be your "package name" as well.
# For composer user with NO Docker composer create-project keinos/hello-world-tpl MyNewProject cd MyNewProject
# For Docker and docker-compose user (No PHP nor composer user) git clone https://github.com/KEINOS/TPL-PHP-HelloWorld.git MyNewProject cd MyNewProject
Run the command below to initialize your project. This will re-write the package and vendor names to the provided name. (Ex. MyVendorName)
rm -rf .git git init ./.devcontainer/initialize_package.php MyVendorName
Before anything, run the tests to check it's basic test functionality.
composer test -- --all --verbose
Commit your first change.
git add . git commit -m 'initial commit'
Push the repo to GitHub then register it to the following CIs.
Get your access token from COVERALLS' settings and place/replace the token value in
Run tests again to see COVERALLS' function-ability.
If the local test passes then commit changes and push.
If the tests passes on CIs then start building your project.
This repo can be developed via Docker. Run:
Or, if you use Visual Studio Code (a.k.a. VS Code) and have Docker, then "Remote - Containers" extension is available.
In this case, you don't need to install the packages or even PHP on your local env.
- Install Microsoft's "Remote - Containers" extension to your VS Code.
git clonethis repo to your local.
- Remove the
.gitdirectory and initialize as a new one by
- Open folder in a Container by: F1 -> "Remote-Containers: Reopen in Container".
This repo was very much inspired by:
- このPHPがテンプレートエンジンのくせに慎重すぎる @ Qiita