Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update skeleton #28

Merged
merged 3 commits into from
Oct 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['7.2', '7.3', '7.4']
php-versions: ['7.4']

name: Test on ${{ matrix.os }} with PHP ${{ matrix.php-versions }}
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
vendor/
.phpunit.result.cache
25 changes: 8 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,14 @@ Start completely from scratch without having to delete this bootstrap project Gi

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:

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

## Helpful resources
Expand Down Expand Up @@ -120,7 +113,5 @@ The MIT License (MIT). Please see [License File][link-license] for more informat
[link-phpunit]: phpunit.xml
[link-gitignore]: .gitignore
[link-editorconfig]: .editorconfig
[link-travis-yml]: .travis.yml
[link-scrutinizer]: .scrutinizer.yml
[link-author]: https://github.com/CodelyTV
[link-contributors]: ../../contributors
101 changes: 42 additions & 59 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,45 @@
{
"name": "codelytv/php-bootstrap",
"description": "Starting point if you want to bootstrap a project in PHP following best practices.",
"type": "project",
"keywords": [
"bootstrap",
"skeleton",
"kata",
"TDD",
"boilerplate"
],
"homepage": "https://codely.tv",
"license": "MIT",
"authors": [
{
"name": "Javier Ferrer",
"homepage": "https://codely.tv",
"role": "Developer"
},
{
"name": "Rafa Gómez",
"homepage": "https://codely.tv",
"role": "Developer"
}
],
"require": {
"php": ">=7.2"
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "^1.0",
"jakub-onderka/php-console-highlighter": "^0.4",
"squizlabs/php_codesniffer": "^3.5",
"phpunit/phpunit": "^7.2",
"symfony/var-dumper": "^4.4"
},
"autoload": {
"psr-4": {
"CodelyTv\\PhpBootstrap\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"CodelyTv\\PhpBootstrapTest\\": "tests/"
}
},
"minimum-stability": "stable",
"config": {
"optimize-autoloader": true
},
"prefer-stable": true,
"scripts": {
"lint": "parallel-lint . --exclude vendor",
"style": "phpcs -p --standard=PSR2 src tests",
"fix-style": "phpcbf -p --standard=PSR2 src tests",
"phpunit": "phpunit --configuration phpunit.xml",
"test": [
"parallel-lint . --exclude vendor",
"phpcs -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests",
"phpunit --configuration phpunit.xml"
]
"name": "codelytv/php-bootstrap",
"description": "Starting point if you want to bootstrap a project in PHP following best practices.",
"type": "project",
"keywords": ["bootstrap", "skeleton", "kata", "TDD", "boilerplate"],
"homepage": "https://codely.tv",
"license": "MIT",
"authors": [
{
"name": "CodelyTV",
"homepage": "https://codely.tv"
}
],
"require": {
"php": ">=7.4"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.5",
"phpunit/phpunit": "^9.4"
},
"autoload": {
"psr-4": {
"CodelyTv\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"CodelyTv\\Tests\\": "tests/"
}
},
"minimum-stability": "stable",
"config": {
"optimize-autoloader": true
},
"prefer-stable": true,
"scripts": {
"style": "phpcs -p --standard=PSR2 src tests",
"fix-style": "phpcbf -p --standard=PSR2 src tests",
"phpunit": "phpunit --configuration phpunit.xml",
"test": [
"phpcs -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests",
"phpunit --configuration phpunit.xml"
]
}
}
Loading