Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/greg-1-anderson/starter-test-48


https://github.com/greg-1-anderson/starter-test-48

Last synced: 21 days ago
JSON representation

Awesome Lists containing this project

README

        

# Starter

A starter PHP project with many services and features pre-configured. Simply use `composer create-project`, and a new GitHub repository will be created and configured to be tested on Travis CI.

## Usage

To get started, export your [GitHub personal access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/) and then create a new project.
```
$ export GITHUB_TOKEN='...'
$ export APPVEYOR_TOKEN='...' # Optional
$ export SCRUTINIZER_TOKEN='...' # Optional
$ composer create-project g-1-a/starter my-new-project
```
The new project will be owned by the currently-authenticated user. If you would like to create a new project in an organization instead, then set the `GITHUB_ORG` environment variable.
```
$ export GITHUB_ORG='my-github-username-or-org'
```

Once the new project is created, automated scripts will customize it and set up a number of serivces. See the section [Description of Features](#description-of-features) below for more information. Once the scripts have finished running, you may customize your README file and start coding!

### Access Token Generation

Generating and exporting a personal access token for the services below is recommended, as doing this will allow the post-create-project scripts to configure and enable these services automatically.

| Export | Token Generation URL
| ------------------------------ | --------------------------
| exoirt GITHUB_TOKEN='...' | [Generate GitHub token](https://github.com/settings/tokens)
| export APPVEYOR_TOKEN='...' | [Generate Appveyor token](https://ci.appveyor.com/api-token)
| export SCRUTINIZER_TOKEN='...' | [Generate Scrutinizer token](https://scrutinizer-ci.com/profile/applications)

### Manual Service Configuration

If the personal access token for these services is not set up, then the service may be manually configured later. In addition, this project is also configured for use with Packagist, Dependencies.io and Coveralls; these services only need to be manually authorized through their web interface to enable them for projects created with this template.

Follow the links in the table below to configure the services you would like to use.

| Feature | Manual Setup URL
| ------------------------- | ----------------
| Collaborative repository | [Create GitHub repository](https://github.com/new)
| Linux permutation testing | [Enable Travis CI](https://travis-ci.org/profile)
| Windows testing | [Enable Appveyor CI](https://ci.appveyor.com/projects/new)
| Static analysis | [Enable Scrutinizer CI](https://scrutinizer-ci.com/g/new)
| Code coverage | [Enable Coveralls](https://coveralls.io/repos/new)
| Package manager | [Register with Packagist](https://packagist.org/packages/submit)
| Dependency updates | [Enable Dependencies.io](https://app.dependencies.io/add-project)

## Description of Features

This project comes with a number of configuration files already set up for a number of services. A Composer post-install hook makes further modifications, and, where possible, makes API calls to complete the setup for some services.

The following things are provided:

- Project information
- [composer.json](/composer.json): Automatically customized with project-specific information.
- Project name (taken from `create-project` project name argument)
- Author name and email address (from git configuration)
- [README.md](/customize/templates/README.md): Example template with badges to get you started.
- [CHANGELOG.md](/CHANGELOG.md): Blank slate provided in the hopes that releases may be recorded here.
- [LICENSE](/LICENSE): Defaults to MIT. Will automatically be updated with dependency licenses and copyright year every time 'composer update' is run.
- Project metadata
- [.editorconfig](/.editorconfig): Set up for PSR-2 conventions for compliant editors.
- [.gitattributes](/.gitattributes): Ensures that tests, build results and so on are not exported to Packagist.
- [.gitignore](/.gitignore): Ensures that vendor directory and so on is not committed to the repository.
- Repository
- **GitHub:** Automatically creates a new repository on GitHub and pushes up your new project. Starter GitHub contribution templates are provided:
- [CONTRIBUTING.md](/CONTRIBUTING.md)
- [issue_template.md](/.github/issue_template.md)
- [pull_request_template](/.github/pull_request_template.md)
- Testing
- **Travis:** Automatically enables testing for the new project in Travis.
- [phpunit.xml.dist](/phpunit.xml.dist): Test configuration with code coverage (html coverage report configuration is present, but commented out).
- [Example.php](/src/Example.php): A simple class that multiplies. Replace with your own code.
- [ExampleTest.php](/tests/ExampleTest.php): A simple data-driven test that pulls fixture data from a data provider. Replace with your own tests.
- **Coveralls:** Project must be manually configured on [coveralls.io](https://coveralls.io). PHPUnit and Travis are already configured to export coverage data to Coveralls automatically.
- **Appveyor:** An appveyor configuration file is provided. If an APPVEYOR_TOKEN environment variable is defined when the project is created, Appveyor testing will be automatically configured. Otherwise, it will need to be manually enabled on [appveyor](https://www.appveyor.com/) if Windows testing is desired.
- **Scrutinizer:** If a SCRUTINIZER_TOKEN environment variable is defined when the project is created, then Scrutinizer static code analysis is automatically enabled. Otherwise, the project must be manually enabled on [scrutinizer-ci.com](https://scrutinizer-ci.com).
- Provides handy composer scripts:
- `composer test`: Run all tests.
- `composer unit`: Run just the phpunit tests.
- `composer lint`: Run the php linter.
- `composer cs`: Run the code sniffer to check for PSR-2 compliance.
- `composer cbf`: Fix code style violations where possible.
- Composer
- **Packagist:** Project must be manually submitted to [packagist.org](https://packagist.org)
- **Dependencies:** A [dependencies.yml](/dependencies.yml) is provided; project must be enabled on [dependencies.io](https://www.dependencies.io/)
- [Composer test scenarios](https://github.com/g-1-a/composer-test-scenarios) are configured to allow tests to be written for PHPUnit 6, and still use PHPUnit 5 for testing on PHP 5.6. Highest/lowest testing is also configured by default.

## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for submitting pull requests to us.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.