Skip to content

Commit cfdd2d0

Browse files
committed
Create package template
0 parents  commit cfdd2d0

11 files changed

+229
-0
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
charset = utf-8
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.yml]
12+
indent_style = space
13+
indent_size = 2

.gitattributes

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
spec/ export-ignore
2+
tests/ export-ignore
3+
.editorconfig export-ignore
4+
.gitattributes export-ignore
5+
.gitignore export-ignore
6+
.scrutinizer.yml export-ignore
7+
.travis.yml export-ignore
8+
CONTRIBUTING.md export-ignore
9+
phpunit.xml.dist export-ignore

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
vendor/
2+
composer.phar
3+
composer.lock
4+
phpunit.xml

.scrutinizer.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tools:
2+
external_code_coverage: true

.travis.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
language: php
2+
3+
php:
4+
- 5.4
5+
- 5.5
6+
- 5.6
7+
- 7
8+
- hhvm
9+
10+
before_script:
11+
- travis_retry composer install --prefer-source --no-interaction --dev
12+
13+
script: phpunit

CONTRIBUTING.md

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
Contributing
2+
============
3+
4+
Thank you for contributing to this project!
5+
6+
Bug reports
7+
-----------
8+
9+
If you find a bug, please submit an issue. Try to be as detailed as possible
10+
in your problem description to help us fix the bug.
11+
12+
Feature requests
13+
----------------
14+
15+
If you wish to propose a feature, please submit an issue. Try to explain your
16+
use case as fully as possible to help us understand why you think the feature
17+
should be added.
18+
19+
Creating a pull request (PR)
20+
----------------------------
21+
22+
First [fork the repository](https://help.github.com/articles/fork-a-repo/) on
23+
GitHub.
24+
25+
Then clone your fork:
26+
27+
```bash
28+
$ git clone https://github.com/your-name/repo-name.git
29+
$ git checkout -b bug-or-feature-description
30+
```
31+
32+
Write your code, then add tests. Then run the tests:
33+
34+
```bash
35+
$ vendor/bin/phpunit
36+
```
37+
38+
Then commit your changes and push them to GitHub:
39+
40+
```bash
41+
$ git commit -m "Fix nasty bug"
42+
$ git push -u origin bug-or-feature-description
43+
```
44+
45+
Then [create a pull request](https://help.github.com/articles/creating-a-pull-request/)
46+
on GitHub.
47+
48+
If you need to make some changes, commit and push them as you like. When asked
49+
to squash your commits, do so as follows:
50+
51+
```bash
52+
git rebase -i
53+
git push origin bug-or-feature-description -f
54+
```
55+
56+
Coding standard
57+
---------------
58+
59+
This project follows the [PSR-2](http://www.php-fig.org/psr/psr-2/) coding style.
60+
Please make sure your pull requests adhere to this standard.

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 PortPHP
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
portphp/boilerplate
2+
===================
3+
4+
[![Latest Version](https://img.shields.io/github/release/portphp/boilerplate.svg?style=flat-square)](https://github.com/portphp/boilerplate/releases)
5+
[![Build Status](https://travis-ci.org/portphp/boilerplate?branch=master)](https://travis-ci.org/portphp/boilerplate)
6+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/portphp/boilerplate/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/portphp/boilerplate/?branch=master)
7+
[![Code Coverage](https://scrutinizer-ci.com/g/portphp/boilerplate/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/portphp/boilerplate/?branch=master)
8+
9+
Boilerplate is a package skeleton for PortPHP packages.
10+
11+
Installation
12+
------------
13+
14+
Open a command console, enter your project directory and execute the
15+
following command to download the latest stable version of this package:
16+
17+
```bash
18+
$ composer require boilerplate ~1
19+
```
20+
21+
This command requires you to have Composer installed globally, as explained
22+
in the [installation chapter](https://getcomposer.org/doc/00-intro.md)
23+
of the Composer documentation.
24+
25+
Documentation
26+
-------------
27+
28+
Documentation is available at https://portphp.readthedocs.org.
29+
30+
Contributing
31+
------------
32+
33+
Contributions are very welcome. Please see [CONTRIBUTING](CONTRIBUTING.md) for
34+
details. Thanks to [everyone who has contributed](https://github.com/portphp/boilerplate/graphs/contributors)
35+
already.
36+
37+
License
38+
-------
39+
40+
This package is licensed under the [MIT license](LICENSE).

composer.json

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "portphp/boilerplate",
3+
"description": "Boilerplate",
4+
"license": "MIT",
5+
"homepage": "https://github.com/portphp",
6+
"authors": [
7+
{
8+
"name": "David de Boer",
9+
"email": "[email protected]"
10+
},
11+
{
12+
"name": "Markus Bachmann",
13+
"email": "[email protected]"
14+
},
15+
{
16+
"name": "Community contributors",
17+
"homepage": "https://github.com/portphp/boilerplate/graphs/contributors"
18+
}
19+
],
20+
"support": {
21+
"issues": "https://github.com/portphp/boilerplate/issues",
22+
"source": "https://github.com/portphp/boilerplate",
23+
"docs": "https://portphp.readthedocs.org"
24+
},
25+
"require": {
26+
"php": ">=5.4.0"
27+
},
28+
"autoload": {
29+
"psr-4": {
30+
"Portphp\\Boilerplate\\": "src/"
31+
}
32+
},
33+
"require-dev": {
34+
"phpunit/phpunit": "^4.0",
35+
"phpspec/phpspec": "~2.1"
36+
},
37+
"autoload-dev": {
38+
"psr-4": {
39+
"Portphp\\Boilerplate\\Tests\\": "tests/"
40+
}
41+
}
42+
}

phpspec.yml.dist

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
suites:
2+
library_suite:
3+
namespace: Portphp\Boilerplate
4+
psr4_prefix: Portphp\Boilerplate
5+
formatter.name: pretty

phpunit.xml.dist

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit backupGlobals="false"
4+
backupStaticAttributes="false"
5+
bootstrap="vendor/autoload.php"
6+
colors="true"
7+
convertErrorsToExceptions="true"
8+
convertNoticesToExceptions="true"
9+
convertWarningsToExceptions="true"
10+
processIsolation="false"
11+
stopOnFailure="false"
12+
syntaxCheck="false"
13+
verbose="true"
14+
>
15+
<testsuites>
16+
<testsuite name="portphp/boilerplate">
17+
<directory suffix=".php">./tests/</directory>
18+
</testsuite>
19+
</testsuites>
20+
</phpunit>

0 commit comments

Comments
 (0)