Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #9 from jaylinski/dev/psr12
Browse files Browse the repository at this point in the history
Change default coding style to PSR-12
  • Loading branch information
jaylinski authored Nov 18, 2019
2 parents ebc12d8 + 8559df3 commit 029268d
Show file tree
Hide file tree
Showing 11 changed files with 606 additions and 1,177 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/vendor
/coverage
/vendor
coverage.xml
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: php
php:
- '7.1'
- '7.2'
- '7.3'

before_install:
- travis_retry composer self-update
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Changelog
All notable changes to this project will be documented in this file.

## [v5.0.0] - 2019-11-18
### Changed
- Default coding style is now PSR-12
- Default code style fixer is now `squizlabs/php_codesniffer`
### Added
- Support for phpspec v5 and v6
### Removed
- Support for phpspec v4

## [v4.2.0] - 2019-11-04
### Changed
- Replaced package `leanphp/phpspec-code-coverage` with `friends-of-phpspec/phpspec-code-coverage`
Expand Down
46 changes: 20 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,11 @@ Must be configured with a `phpspec.yml` file in your root folder.
We are using the `leanphp/phpspec-code-coverage` extension for generating coverage reports.
This extension requires a `phpspec-coverage.yml` file in your root folder and Xdebug enabled.

### [FriendsOfPHP/PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)

Currently used for fixing the code.
Fixes all files in `src` directory.

This package is not used for checking (linting), because PHP_Codesniffer prints a
more readable output.

### [squizlabs/PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)

Currently used for checking (linting) the code.
Currently used for checking (linting) and fixing the code.
Sniffs all files in `src` directory.

This package could also be used for fixing, but PHP-CS-Fixer does it better.

### [phpmd/phpmd](https://github.com/phpmd/phpmd)

Used for mess detection.
Expand Down Expand Up @@ -84,6 +74,7 @@ Usage:
Options:
--fail Exit with 1 if tests fail.
--notty Disable TTY.
--ptimeout Set process timeout (defaults to 60 seconds).
-v --verbose Increase the verbosity of messages.
```

Expand All @@ -94,11 +85,11 @@ Usage:
coverage [--] [options]
Options:
--env Specifiy the environment. Possible values:
'local': prints output on command-line.
'jenkins': generates a JUnit report file.
--notty Disable TTY.
--env Specifiy the environment. Possible values:
'local': prints output on command-line.
'jenkins': generates a JUnit report file.
--notty Disable TTY.
--ptimeout Set process timeout (defaults to 60 seconds).
```

#### `lint`
Expand All @@ -108,11 +99,12 @@ Usage:
lint [--] [options]
Options:
--env Specifiy the environment. Possible values:
'local': prints output on command-line.
'jenkins': generates a checkstyle report file.
--fail Exit with 1 if linting fails.
--notty Disable TTY.
--env Specifiy the environment. Possible values:
'local': prints output on command-line.
'jenkins': generates a checkstyle report file.
--fail Exit with 1 if linting fails.
--notty Disable TTY.
--ptimeout Set process timeout (defaults to 60 seconds).
```

#### `md`
Expand All @@ -122,10 +114,11 @@ Usage:
lint [--] [options]
Options:
--env Specifiy the environment. Possible values:
'local': prints output on command-line.
'jenkins': generates a xml report file.
--notty Disable TTY.
--env Specifiy the environment. Possible values:
'local': prints output on command-line.
'jenkins': generates a xml report file.
--notty Disable TTY.
--ptimeout Set process timeout (defaults to 60 seconds).
```

#### `fix`
Expand All @@ -135,7 +128,8 @@ Usage:
fix [--] [options]
Options:
--notty Disable TTY.
--notty Disable TTY.
--ptimeout Set process timeout (defaults to 60 seconds).
```

## Using custom matchers
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
},
"require": {
"php": ">=7.1",
"friendsofphp/php-cs-fixer": "^2.13",
"karriere/phpspec-matchers": "^2.0",
"friends-of-phpspec/phpspec-code-coverage": "^4.3",
"karriere/phpspec-matchers": "^3.0",
"phpmd/phpmd": "^2.6",
"phpspec/phpspec": "^4.3",
"phpspec/phpspec": "^5.1 || ^6.0",
"squizlabs/php_codesniffer": "^3.3",
"symfony/console": "^3.2 || ^4.0",
"symfony/process": "^3.2 || ^4.0"
Expand Down
Loading

0 comments on commit 029268d

Please sign in to comment.