# PHP Library Boilerplate

### How to Use the Boilerplate

This boilerplate defines the basic structure of PHP Libraries. You should customize this boilerplate in your new Github repository:

* Copy the contents of this directory into your new Github repository.
* Replace all instances of `libraryname` with the name of your library. Watch out for camel-cased instances of `LibraryName`, especially in `composer.json`.

  **Remove this line and the lines above. Customize with the name and description of your library.**

### Getting Started

This section describes how to get the orchard/libraryname installed into your application.

#### Installation

```bash
composer require orchard/libraryname
```

### Development

This section summarizes how further development should be done on this library.

#### Testing

Ensure ant is installed and available on your path.

```bash
cd build/
ant phpunit
```

or

```bash
vendor/bin/phpunit tests/
```

#### Linting

Ensure ant is installed and available on your path.

```bash
cd build
ant phpcs
```

or

```bash
vendor/bin/phpcs -p --standard=PSR2 src/
vendor/bin/phpcs -p --standard=PSR2 tests/
```

#### Releasing Versions

To release a new version of your library, create an atomic PR, consisting of one change to the composer.json file:

```javascript
"version": "NEW_VERSION_HERE"
```

Then, run a comparison between the last stable tag to master using this URL - `https://github.com/theorchard/php-libraryname/compare/{source_tag}...master`. All you need to change is the `{source_tag}`.

Please copy all commit messages from the comparison result and convert that into the release notes for the new version. Please use bullet points for each note.

Once you have the release notes, put them in the description field of the PR and send it for review. Upon approval and merge, create a new tag using Github.

