Skip to content

Commit 6f5a7c8

Browse files
committed
Base skeleton for a PHP project with test and code style checks :)
0 parents  commit 6f5a7c8

8 files changed

Lines changed: 1805 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2016 CodelyTV. http://codely.tv
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
13+
all 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
21+
THE SOFTWARE.

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# PHP Bootstrap (base / project skeleton)
2+
3+
[![Build Status](https://travis-ci.org/CodelyTV/php-bootstrap.svg?branch=master)](https://travis-ci.org/CodelyTV/php-bootstrap)
4+
[![Code Climate](https://codeclimate.com/github/CodelyTV/php-bootstrap/badges/gpa.svg)](https://codeclimate.com/github/CodelyTV/php-bootstrap)
5+
[![Test Coverage](https://codeclimate.com/github/CodelyTV/php-bootstrap/badges/coverage.svg)](https://codeclimate.com/github/CodelyTV/php-bootstrap/coverage)
6+
7+
## Introduction
8+
9+
This is a repository intended to serve as a starting point if you want to bootstrap a project in PHP.
10+
11+
It could be useful if you want to start from scratch a kata or a little exercise or project.
12+
13+
## How To Start
14+
15+
1. Clone this repository `git clone https://github.com/CodelyTV/php-bootstrap`.
16+
2. Install all the [Composer](https://getcomposer.org/) dependencies with `composer install`.
17+
3. Run the [PHP Paralel Lint](https://github.com/JakubOnderka/PHP-Parallel-Lint) with `composer lint`.
18+
4. Run the [PHP Unit](https://phpunit.de/) test with `composer phpunit` (you can also run both checks with the `composer test` command).
19+
5. Start your project!
20+
21+
## Helpful resources
22+
23+
### PHP 7
24+
25+
* [PHP 7 new features](http://php.net/manual/en/migration70.new-features.php)
26+
* [Scalar type declarations example](https://github.com/tpunt/PHP7-Reference#scalar-type-declarations)
27+
* [Return type declarations example](https://github.com/tpunt/PHP7-Reference#return-type-declarations)
28+
29+
### PHPUnit 5.5
30+
31+
* [Introduction to writing tests for PHPUnit](https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html)
32+
* [Testing exceptions with PHPUnit](https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.exceptions)
33+
* [PHPUnit assertions](https://phpunit.de/manual/current/en/appendixes.assertions.html)
34+
35+
### Refactoring
36+
37+
* [Refactoring.guru Code Smells catalog](https://refactoring.guru/smells/smells)
38+
* [Refactoring.guru Refactorings catalog](https://refactoring.guru/catalog)
39+
* [SourceMaking Refactorings catalog](https://sourcemaking.com/refactoring)
40+
* [Martin Fowler Refactorings catalog](http://refactoring.com/catalog/)
41+
* [CodelyTV Refactoring videos (Spanish)](http://codely.tv/tag/refactoring/)
42+
43+
# Other programming languages
44+
45+
* [PHP](https://github.com/CodelyTV/php-bootstrap)
46+
* [Scala](https://github.com/CodelyTV/scala_bootstrap)
47+
48+
## About
49+
50+
This hopefully helpful utility has been developed by [CodelyTV](http://codely.tv/).
51+
52+
We'll try to maintain this project as simple as possible, but Pull Requests are welcomed!

composer.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"name": "codelytv/php-bootstrap",
3+
"description": "Starting point if you want to bootstrap a project in PHP.",
4+
"version": "1.0.0",
5+
"type": "project",
6+
"keywords": [
7+
"bootstrap",
8+
"skeleton",
9+
"kata",
10+
"boilerplate"
11+
],
12+
"homepage": "http://codely.tv",
13+
"time": "2016-09-15",
14+
"license": "MIT",
15+
"authors": [
16+
{
17+
"name": "Javier Ferrer",
18+
"email": "javier.ferrer@codely.tv",
19+
"homepage": "http://codely.tv",
20+
"role": "Developer"
21+
},
22+
{
23+
"name": "Rafa Gómez",
24+
"email": "rafa.gomez@codely.tv",
25+
"homepage": "http://codely.tv",
26+
"role": "Developer"
27+
}
28+
],
29+
"require": {
30+
"php": "^7.0"
31+
},
32+
"require-dev": {
33+
"jakub-onderka/php-parallel-lint": "^0.9",
34+
"jakub-onderka/php-console-highlighter": "^0.3",
35+
"phpunit/phpunit": "^5.5",
36+
"symfony/var-dumper": "^3.1"
37+
},
38+
"autoload": {
39+
"psr-4": {
40+
"CodelyTv\\PhpBootstrap\\": "src/"
41+
}
42+
},
43+
"autoload-dev": {
44+
"psr-4": {
45+
"CodelyTv\\PhpBootstrapTest\\": "tests/"
46+
}
47+
},
48+
"minimum-stability": "stable",
49+
"config": {
50+
"optimize-autoloader": true
51+
},
52+
"prefer-stable": true,
53+
"scripts": {
54+
"lint": [
55+
"parallel-lint . --exclude vendor"
56+
],
57+
"phpunit": [
58+
"phpunit --configuration phpunit.xml"
59+
],
60+
"test": [
61+
"parallel-lint . --exclude vendor",
62+
"phpunit --configuration phpunit.xml"
63+
]
64+
}
65+
}

0 commit comments

Comments
 (0)