File tree 14 files changed +161
-12
lines changed
14 files changed +161
-12
lines changed Original file line number Diff line number Diff line change
1
+ root = true
2
+
3
+ [* ]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ indent_size = 4
7
+ indent_style = space
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
Original file line number Diff line number Diff line change
1
+ .editorconfig export-ignore
2
+ .gitattributes export-ignore
3
+ .gitignore export-ignore
4
+ /.php_cs export-ignore
5
+ /.styleci.yml export-ignore
6
+ /.scrutinizer.yml export-ignore
7
+ /.travis.yml export-ignore
8
+ /phpunit.xml.dist export-ignore
9
+ /Tests / export-ignore
Original file line number Diff line number Diff line change
1
+ /php_cs.cache
2
+ /composer.lock
3
+ /phpunit.xml
4
+ /vendor /
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ $ finder = PhpCsFixer \Finder::create ()
4
+ ->exclude ('vendor ' )
5
+ ->in (__DIR__ )
6
+ ;
7
+
8
+ return PhpCsFixer \Config::create ()
9
+ ->setRules ([
10
+ '@Symfony ' => true ,
11
+ 'array_syntax ' => ['syntax ' => 'short ' ],
12
+ ])
13
+ ->setFinder ($ finder )
14
+ ;
Original file line number Diff line number Diff line change
1
+ filter :
2
+ excluded_paths : [vendor/*, Tests/*]
3
+ checks :
4
+ php :
5
+ code_rating : true
6
+ duplication : true
7
+ tools :
8
+ external_code_coverage :
9
+ timeout : 1800 # Timeout in seconds.
Original file line number Diff line number Diff line change
1
+ preset : symfony
2
+
3
+ finder :
4
+ exclude :
5
+ - " Resources"
6
+ - " vendor"
7
+
8
+ enabled :
9
+ - short_array_syntax
10
+
11
+ disabled :
12
+ - phpdoc_annotation_without_dot # This is still buggy: https://github.com/symfony/symfony/pull/19198
Original file line number Diff line number Diff line change
1
+ language : php
2
+
3
+ cache :
4
+ directories :
5
+ - $HOME/.composer/cache
6
+
7
+ branches :
8
+ except :
9
+ - /^analysis-.*$/
10
+ - /^patch-.*$/
11
+
12
+ env :
13
+ global :
14
+ - TEST_COMMAND="composer test"
15
+ - SYMFONY_PHPUNIT_VERSION="6.3"
16
+
17
+ matrix :
18
+ fast_finish : true
19
+ include :
20
+ # Run test with code coverage
21
+ - php : 7.2
22
+ env : COVERAGE=true TEST_COMMAND="composer test-ci"
23
+
24
+ # Test with lowest dependencies
25
+ - php : 7.1
26
+ env : COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak"
27
+
28
+ # Test the latest stable release
29
+ - php : 7.0
30
+ - php : 7.1
31
+
32
+ # Force some major versions of Symfony
33
+ - php : 7.2
34
+ env : DEPENDENCIES="dunglas/symfony-lock:^3"
35
+ - php : 7.2
36
+ env : DEPENDENCIES="dunglas/symfony-lock:^4"
37
+
38
+ # Latest commit to master
39
+ - php : 7.2
40
+ env : STABILITY="dev"
41
+
42
+ allow_failures :
43
+ # Dev-master is allowed to fail.
44
+ - env : STABILITY="dev"
45
+
46
+ before_install :
47
+ - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
48
+ - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
49
+ - if ! [ -z "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
50
+
51
+ install :
52
+ # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
53
+ - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
54
+ - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
55
+ - vendor/bin/simple-phpunit install
56
+
57
+ script :
58
+ - composer validate --strict --no-check-lock
59
+ - $TEST_COMMAND
60
+
61
+ after_success :
62
+ - if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
63
+ - if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi
64
+
Original file line number Diff line number Diff line change @@ -16,11 +16,9 @@ class WordpressClient
16
16
17
17
public function getPage ($ idOrSlug ): Page
18
18
{
19
-
20
19
}
21
20
22
21
public function getMenu ($ idOrSlug ): Menu
23
22
{
24
-
25
23
}
26
- }
24
+ }
Original file line number Diff line number Diff line change @@ -22,8 +22,5 @@ public function getConfigTreeBuilder()
22
22
$ rootNode ->children ()
23
23
->scalarNode ('url ' )->cannotBeEmpty ()->end ()
24
24
->end ();
25
-
26
-
27
25
}
28
-
29
26
}
Original file line number Diff line number Diff line change 6
6
7
7
class Menu
8
8
{
9
-
10
- }
9
+ }
Original file line number Diff line number Diff line change 6
6
7
7
class Page
8
8
{
9
-
10
- }
9
+ }
Original file line number Diff line number Diff line change 6
6
7
7
class WordpressExtension
8
8
{
9
-
10
- }
9
+ }
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+
3
+ <phpunit backupGlobals =" false"
4
+ backupStaticAttributes =" false"
5
+ colors =" false"
6
+ convertErrorsToExceptions =" true"
7
+ convertNoticesToExceptions =" true"
8
+ convertWarningsToExceptions =" true"
9
+ processIsolation =" false"
10
+ stopOnFailure =" false"
11
+ syntaxCheck =" false"
12
+ codecoverage =" true"
13
+ bootstrap =" ./vendor/autoload.php"
14
+ >
15
+
16
+ <php >
17
+ <env name =" ENV" value =" test" />
18
+ </php >
19
+
20
+ <formatter type =" clover" usefile =" false" />
21
+ <testsuites >
22
+ <testsuite name =" Test Suite" >
23
+ <directory >./Tests</directory >
24
+ </testsuite >
25
+ </testsuites >
26
+
27
+ <filter >
28
+ <whitelist >
29
+ <directory suffix =" .php" >./</directory >
30
+ <exclude >
31
+ <directory >vendor</directory >
32
+ <directory >Tests</directory >
33
+ </exclude >
34
+ </whitelist >
35
+ </filter >
36
+ </phpunit >
You can’t perform that action at this time.
0 commit comments