Skip to content

Commit 0bead4c

Browse files
authored
Merge pull request #1 from CodelyTV/update-dependencies
Update PHP and project dependencies
2 parents 2e27a7e + 941594f commit 0bead4c

File tree

7 files changed

+533
-361
lines changed

7 files changed

+533
-361
lines changed

.scrutinizer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build:
22
environment:
33
php:
4-
version: '7.0'
4+
version: '7.2'

.semver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
:major: 1
3-
:minor: 1
3+
:minor: 2
44
:patch: 0
55
:special: ''

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ language: php
33
sudo: false
44

55
php:
6-
- '7.0'
6+
- '7.2'
77

88
cache:
99
directories:

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2016 CodelyTV. http://codely.tv
3+
Copyright (c) 2018 CodelyTV. https://codely.tv
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
## Introduction
1010

11-
This is a repository intended to serve as a starting point if you want to bootstrap a project in PHP.
11+
This is a repository intended to serve as a starting point if you want to bootstrap a project in PHP. This repository has been explained in the [CodelyTV video "Introducción a PHP: Cómo configurar tu entorno de desarrollo 🐘" (Spanish)](https://www.youtube.com/watch?v=v2IjMrpZog4).
1212

13-
It could be useful if you want to start from scratch a kata or a little exercise or project. The idea is that you don't have to worry about the boilerplate, just run `composer create-project codelytv/php-bootstrap your-kata-name` and there you go:
14-
* Latest versions of PHP and PHPUnit in order to practice with them
13+
It could be useful if you want to start from scratch a kata or a little exercise or project. The idea is that you don't have to worry about the boilerplate, just run `composer create-project codelytv/php-bootstrap your-project-name` and there you go:
14+
* Latest versions of PHP and PHPUnit
1515
* Best practices applied:
1616
* [`README.md`][link-readme] (badges included)
1717
* [`LICENSE`][link-license]
@@ -25,13 +25,47 @@ It could be useful if you want to start from scratch a kata or a little exercise
2525

2626
## How To Start
2727

28+
You have 2 different alternatives: Using our [Packagist project](https://packagist.org/packages/codelytv/php-bootstrap) with Composer, or manually cloning [this repo](https://github.com/CodelyTV/php-bootstrap/):
29+
30+
### Using Composer
31+
32+
Start completely from scratch without having to delete this bootstrap project Git history:
33+
2834
1. If you don't have it already, [install Composer](https://getcomposer.org/download/).
29-
2. Create your project based on this bootstrap repo: `composer create-project codelytv/php-bootstrap your-kata-name`.
30-
3. Run all the checks: `composer test`. This will do some checks that you can perform with isolated commands:
35+
2. Create your project based on the [Packagist project](https://packagist.org/packages/codelytv/php-bootstrap). This will also download the project dependencies: `composer create-project codelytv/php-bootstrap your-project-name`.
36+
3. Move to the project directory: `cd your-project-name`
37+
4. Run all the checks: `composer test`. This will do some checks that you can perform with isolated commands:
38+
1. [PHP Parallel Lint](https://github.com/JakubOnderka/PHP-Parallel-Lint): `composer lint`.
39+
2. [PHP Style Check](https://github.com/squizlabs/PHP_CodeSniffer): `composer style`. If you want to fix style issues automatically: `composer fix-style`.
40+
3. [PHP Unit](https://phpunit.de/): `composer phpunit`.
41+
5. Create your own repository:
42+
1. Initialize your own Git repository: `git init`
43+
2. Add the bootstrap files: `git add .`
44+
3. Commit: `git commit -m "Initial commit with project boilerplate based on https://github.com/CodelyTV/php-bootstrap"`
45+
4. Add your remote repository: `git remote add origin [email protected]:your-username/your-project-name`
46+
5. Upload your local commits to the new remote repo: `git push -u origin master`
47+
6. Start coding!
48+
49+
### Cloning the repository
50+
51+
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:
52+
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:
3158
1. [PHP Parallel Lint](https://github.com/JakubOnderka/PHP-Parallel-Lint): `composer lint`.
3259
2. [PHP Style Check](https://github.com/squizlabs/PHP_CodeSniffer): `composer style`. If you want to fix style issues automatically: `composer fix-style`.
3360
3. [PHP Unit](https://phpunit.de/): `composer phpunit`.
34-
4. Start coding!
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 [email protected]:your-username/your-project-name`
67+
6. Upload your local commits to the new remote repo: `git push -u origin master`
68+
7. Start coding!
3569

3670
## Helpful resources
3771

@@ -41,7 +75,7 @@ It could be useful if you want to start from scratch a kata or a little exercise
4175
* [Scalar type declarations example](https://github.com/tpunt/PHP7-Reference#scalar-type-declarations)
4276
* [Return type declarations example](https://github.com/tpunt/PHP7-Reference#return-type-declarations)
4377

44-
### PHPUnit 5.5
78+
### PHPUnit
4579

4680
* [Introduction to writing tests for PHPUnit](https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html)
4781
* [Testing exceptions with PHPUnit](https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.exceptions)

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
}
2828
],
2929
"require": {
30-
"php": "^7.0"
30+
"php": "^7.2"
3131
},
3232
"require-dev": {
33-
"jakub-onderka/php-parallel-lint": "^0.9",
33+
"jakub-onderka/php-parallel-lint": "^1.0",
3434
"jakub-onderka/php-console-highlighter": "^0.3",
35-
"squizlabs/php_codesniffer": "^2.7",
36-
"phpunit/phpunit": "^5.7",
37-
"symfony/var-dumper": "^3.2"
35+
"squizlabs/php_codesniffer": "^3.3",
36+
"phpunit/phpunit": "^7.2",
37+
"symfony/var-dumper": "^4.1"
3838
},
3939
"autoload": {
4040
"psr-4": {

0 commit comments

Comments
 (0)