Skip to content

Commit fc14914

Browse files
committed
Added meta files
1 parent 20e87bd commit fc14914

14 files changed

+161
-12
lines changed

Diff for: .editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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

Diff for: .gitattributes

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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

Diff for: .gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/php_cs.cache
2+
/composer.lock
3+
/phpunit.xml
4+
/vendor/

Diff for: .php_cs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
;

Diff for: .scrutinizer.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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.

Diff for: .styleci.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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

Diff for: .travis.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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+

Diff for: Api/WordpressClient.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ class WordpressClient
1616

1717
public function getPage($idOrSlug): Page
1818
{
19-
2019
}
2120

2221
public function getMenu($idOrSlug): Menu
2322
{
24-
2523
}
26-
}
24+
}

Diff for: DependencyInjection/Configuration.php

-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,5 @@ public function getConfigTreeBuilder()
2222
$rootNode->children()
2323
->scalarNode('url')->cannotBeEmpty()->end()
2424
->end();
25-
26-
2725
}
28-
2926
}

Diff for: Model/Menu.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66

77
class Menu
88
{
9-
10-
}
9+
}

Diff for: Model/Page.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66

77
class Page
88
{
9-
10-
}
9+
}

Diff for: Tests/.gitignore

Whitespace-only changes.

Diff for: Twig/WordpressExtension.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66

77
class WordpressExtension
88
{
9-
10-
}
9+
}

Diff for: phpunit.xml.dist

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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>

0 commit comments

Comments
 (0)