Skip to content
This repository was archived by the owner on Feb 21, 2022. It is now read-only.

Commit b5bc558

Browse files
authored
Merge pull request #34 from jakzal/php-7.2
Build against PHP 7.2 with lowest dependencies
2 parents 874eb60 + 9a48733 commit b5bc558

File tree

5 files changed

+36
-23
lines changed

5 files changed

+36
-23
lines changed

.php_cs

+17-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
<?php
22

3-
return Symfony\CS\Config\Config::create()
4-
// use SYMFONY_LEVEL:
5-
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
6-
// and extra fixers:
7-
->fixers(array(
8-
'concat_with_spaces',
9-
'multiline_spaces_before_semicolon',
10-
'short_array_syntax',
11-
'-remove_lines_between_uses'
12-
))
13-
->finder(
14-
Symfony\CS\Finder\DefaultFinder::create()
15-
->in('src/')
16-
->in('tests/')
17-
)
3+
$finder = PhpCsFixer\Finder::create()
4+
->in(__DIR__.'/src')
5+
->in(__DIR__.'/tests')
6+
;
7+
8+
return PhpCsFixer\Config::create()
9+
->setRules([
10+
'@Symfony' => true,
11+
'concat_space' => ['spacing' => 'one'],
12+
'no_multiline_whitespace_before_semicolons' => false,
13+
'array_syntax' => ['syntax' => 'short'],
14+
'yoda_style' => false,
15+
'return_type_declaration' => ['space_before' => 'one'],
16+
'self_accessor' => false,
17+
'no_extra_consecutive_blank_lines' => false,
18+
])
19+
->setFinder($finder)
1820
;

.travis.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@ language: php
22

33
sudo: false
44

5-
php:
6-
- 7.0
7-
- 7.1
5+
matrix:
6+
include:
7+
- php: 7.0
8+
- php: 7.1
9+
- php: 7.2
10+
env: deps=low
11+
fast_finish: true
812

913
install:
10-
- composer update --prefer-source --no-interaction
14+
- phpenv config-rm xdebug.ini
15+
- if [[ $deps = low ]]; then composer update --prefer-lowest --prefer-stable; else composer install; fi
1116

1217
script:
13-
- vendor/bin/phpunit --coverage-text
18+
- phpdbg -qrr vendor/bin/phpunit --coverage-text
1419

1520
notifications:
1621
email: false

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ need the [box-project/box2](https://github.com/box-project/box2) library.
4848
``` bash
4949
$ git clone [email protected]:mmoreram/php-formatter.git
5050
$ cd php-formatter
51-
$ composer update
51+
$ composer update --no-dev
5252
$ box build -v
5353
$ build/php-formatter.phar
5454
```

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"symfony/property-access": "^3.2||^4.0"
2424
},
2525
"require-dev": {
26-
"friendsofphp/php-cs-fixer": "^1.12.4",
26+
"friendsofphp/php-cs-fixer": "^2.8.3",
2727
"phpunit/phpunit": "^5.6.4"
2828
},
2929
"bin": [

phpunit.xml.dist

+7-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,10 @@
2121
<directory>./tests/</directory>
2222
</testsuite>
2323
</testsuites>
24-
</phpunit>
24+
25+
<filter>
26+
<whitelist>
27+
<directory suffix=".php">src</directory>
28+
</whitelist>
29+
</filter>
30+
</phpunit>

0 commit comments

Comments
 (0)