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

Commit

Permalink
Merge branch 'hotfix/124', Close #124
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-mabe committed Dec 16, 2016
2 parents 9a10b43 + b622ec4 commit 7a6a96f
Show file tree
Hide file tree
Showing 87 changed files with 1,169 additions and 923 deletions.
46 changes: 0 additions & 46 deletions .php_cs

This file was deleted.

3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ All notable changes to this project will be documented in this file, in reverse

### Added

- Nothing.
- [#124](https://github.com/zendframework/zend-cache/pull/124)
New coding standard

### Deprecated

Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,24 @@ To do so:

## Running Coding Standards Checks

This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding
This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding
standards checks, and provides configuration for our selected checks.
`php-cs-fixer` is installed by default via Composer.
`phpcs` is installed by default via Composer.

To run checks only:

```console
$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs
$ composer cs-check
```

To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run`
flag:
`phpcs` also includes a tool for fixing most CS violations, `phpcbf`:


```console
$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs
$ composer cs-fix
```

If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure
they pass, and make sure you add and commit the changes after verification.

## Recommended Workflow for Contributions
Expand Down
6 changes: 3 additions & 3 deletions benchmark/FilesystemStorageAdapterBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ class FilesystemStorageAdapterBench extends CommonStorageAdapterBench
public function __construct()
{
$this->tmpCacheDir = @tempnam(sys_get_temp_dir(), 'zend_cache_test_');
if (!$this->tmpCacheDir) {
if (! $this->tmpCacheDir) {
$err = error_get_last();
$this->fail("Can't create temporary cache directory-file: {$err['message']}");
} elseif (!@unlink($this->tmpCacheDir)) {
} elseif (! @unlink($this->tmpCacheDir)) {
$err = error_get_last();
$this->fail("Can't remove temporary cache directory-file: {$err['message']}");
} elseif (!@mkdir($this->tmpCacheDir, 0777)) {
} elseif (! @mkdir($this->tmpCacheDir, 0777)) {
$err = error_get_last();
$this->fail("Can't create temporary cache directory: {$err['message']}");
}
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"require-dev": {
"zendframework/zend-serializer": "^2.6",
"zendframework/zend-session": "^2.6.2",
"fabpot/php-cs-fixer": "1.7.*",
"phpunit/phpunit": "^4.8",
"phpbench/phpbench": "^0.10.0"
"phpbench/phpbench": "^0.10.0",
"zendframework/zend-coding-standard": "~1.0.0"
},
"suggest": {
"zendframework/zend-serializer": "Zend\\Serializer component",
Expand Down Expand Up @@ -62,10 +62,10 @@
"@cs-check",
"@test"
],
"upload-coverage": "coveralls -v",
"cs-check": "php-cs-fixer --version && php-cs-fixer fix -v --diff --dry-run",
"cs-fix": "php-cs-fixer fix -v",
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
"upload-coverage": "coveralls -v"
}
}
Loading

0 comments on commit 7a6a96f

Please sign in to comment.