Skip to content

Commit dc5379a

Browse files
authored
Update skeleton (#28)
* Update skeleton to latest technologies * Improve readme * Simplify test
1 parent 14e8f95 commit dc5379a

File tree

7 files changed

+864
-761
lines changed

7 files changed

+864
-761
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
os: [ubuntu-latest, windows-latest, macOS-latest]
11-
php-versions: ['7.2', '7.3', '7.4']
11+
php-versions: ['7.4']
1212

1313
name: Test on ${{ matrix.os }} with PHP ${{ matrix.php-versions }}
1414
steps:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
vendor/
2+
.phpunit.result.cache

README.md

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,14 @@ Start completely from scratch without having to delete this bootstrap project Gi
5050

5151
Just in case you prefer to avoid dealing with `composer create-project`, you can also clone this repository. We recommend to follow the next step by step process in order to avoid adding the bootstrap project commits to your project Git history:
5252

53-
1. Clone this repository: `git clone https://github.com/CodelyTV/php-bootstrap your-project-name`
54-
2. Move to the project directory: `cd your-project-name`
55-
3. If you don't have it already, [install Composer](https://getcomposer.org/download/).
56-
4. Install the project dependencies: `composer install`
57-
5. Run all the checks: `composer test`. This will do some checks that you can perform with isolated commands:
58-
1. [PHP Parallel Lint](https://github.com/JakubOnderka/PHP-Parallel-Lint): `composer lint`.
59-
2. [PHP Style Check](https://github.com/squizlabs/PHP_CodeSniffer): `composer style`. If you want to fix style issues automatically: `composer fix-style`.
60-
3. [PHP Unit](https://phpunit.de/): `composer phpunit`.
61-
6. Create your own repository cleaning the bootstrap project history:
62-
1. Remove previous Git history in order to do not add the bootstrap repo noise in your project: `rm -rf .git`
63-
2. Initialize your own Git repository: `git init`
64-
3. Add the bootstrap files: `git add .`
65-
4. Commit: `git commit -m "Initial commit with project boilerplate based on https://github.com/CodelyTV/php-bootstrap"`
66-
5. Add your remote repository: `git remote add origin git@github.com:your-username/your-project-name`
67-
6. Upload your local commits to the new remote repo: `git push -u origin master`
53+
1. [Use this repositoy template](https://github.com/CodelyTV/php-basic-skeleton/generate)
54+
2. Clone your project
55+
3. Move to the project directory: `cd your-project-name`
56+
4. If you don't have it already, [install Composer](https://getcomposer.org/download/).
57+
5. Install the project dependencies: `composer install`
58+
6. Run all the checks: `composer test`. This will do some checks that you can perform with isolated commands:
59+
1. [PHP Style Check](https://github.com/squizlabs/PHP_CodeSniffer): `composer style`. If you want to fix style issues automatically: `composer fix-style`.
60+
2. [PHP Unit](https://phpunit.de/): `composer phpunit`.
6861
7. Start coding!
6962

7063
## Helpful resources
@@ -120,7 +113,5 @@ The MIT License (MIT). Please see [License File][link-license] for more informat
120113
[link-phpunit]: phpunit.xml
121114
[link-gitignore]: .gitignore
122115
[link-editorconfig]: .editorconfig
123-
[link-travis-yml]: .travis.yml
124116
[link-scrutinizer]: .scrutinizer.yml
125117
[link-author]: https://github.com/CodelyTV
126-
[link-contributors]: ../../contributors

composer.json

Lines changed: 42 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,45 @@
11
{
2-
"name": "codelytv/php-bootstrap",
3-
"description": "Starting point if you want to bootstrap a project in PHP following best practices.",
4-
"type": "project",
5-
"keywords": [
6-
"bootstrap",
7-
"skeleton",
8-
"kata",
9-
"TDD",
10-
"boilerplate"
11-
],
12-
"homepage": "https://codely.tv",
13-
"license": "MIT",
14-
"authors": [
15-
{
16-
"name": "Javier Ferrer",
17-
"homepage": "https://codely.tv",
18-
"role": "Developer"
19-
},
20-
{
21-
"name": "Rafa Gómez",
22-
"homepage": "https://codely.tv",
23-
"role": "Developer"
24-
}
25-
],
26-
"require": {
27-
"php": ">=7.2"
28-
},
29-
"require-dev": {
30-
"jakub-onderka/php-parallel-lint": "^1.0",
31-
"jakub-onderka/php-console-highlighter": "^0.4",
32-
"squizlabs/php_codesniffer": "^3.5",
33-
"phpunit/phpunit": "^7.2",
34-
"symfony/var-dumper": "^4.4"
35-
},
36-
"autoload": {
37-
"psr-4": {
38-
"CodelyTv\\PhpBootstrap\\": "src/"
39-
}
40-
},
41-
"autoload-dev": {
42-
"psr-4": {
43-
"CodelyTv\\PhpBootstrapTest\\": "tests/"
44-
}
45-
},
46-
"minimum-stability": "stable",
47-
"config": {
48-
"optimize-autoloader": true
49-
},
50-
"prefer-stable": true,
51-
"scripts": {
52-
"lint": "parallel-lint . --exclude vendor",
53-
"style": "phpcs -p --standard=PSR2 src tests",
54-
"fix-style": "phpcbf -p --standard=PSR2 src tests",
55-
"phpunit": "phpunit --configuration phpunit.xml",
56-
"test": [
57-
"parallel-lint . --exclude vendor",
58-
"phpcs -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests",
59-
"phpunit --configuration phpunit.xml"
60-
]
2+
"name": "codelytv/php-bootstrap",
3+
"description": "Starting point if you want to bootstrap a project in PHP following best practices.",
4+
"type": "project",
5+
"keywords": ["bootstrap", "skeleton", "kata", "TDD", "boilerplate"],
6+
"homepage": "https://codely.tv",
7+
"license": "MIT",
8+
"authors": [
9+
{
10+
"name": "CodelyTV",
11+
"homepage": "https://codely.tv"
6112
}
13+
],
14+
"require": {
15+
"php": ">=7.4"
16+
},
17+
"require-dev": {
18+
"squizlabs/php_codesniffer": "^3.5",
19+
"phpunit/phpunit": "^9.4"
20+
},
21+
"autoload": {
22+
"psr-4": {
23+
"CodelyTv\\": "src/"
24+
}
25+
},
26+
"autoload-dev": {
27+
"psr-4": {
28+
"CodelyTv\\Tests\\": "tests/"
29+
}
30+
},
31+
"minimum-stability": "stable",
32+
"config": {
33+
"optimize-autoloader": true
34+
},
35+
"prefer-stable": true,
36+
"scripts": {
37+
"style": "phpcs -p --standard=PSR2 src tests",
38+
"fix-style": "phpcbf -p --standard=PSR2 src tests",
39+
"phpunit": "phpunit --configuration phpunit.xml",
40+
"test": [
41+
"phpcs -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests",
42+
"phpunit --configuration phpunit.xml"
43+
]
44+
}
6245
}

0 commit comments

Comments
 (0)