Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old symfony <4.2 code #46

Merged
merged 2 commits into from
Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,18 @@ branches:
contexts:
- "Coding Standards (7.4)"
- "Static Code Analysis (7.4)"
- "Tests (7.2, lowest)"
- "Tests (7.2, highest)"
- "Tests (7.3, lowest)"
- "Tests (7.3, highest)"
- "Tests (7.4, lowest)"
- "Tests (7.4, highest)"
- "Tests (7.2, lowest, ~4.2)"
- "Tests (7.2, lowest, ~5.0)"
- "Tests (7.2, highest, ~4.2)"
- "Tests (7.2, highest, ~5.0)"
- "Tests (7.3, lowest, ~4.2)"
- "Tests (7.3, lowest, ~5.0)"
- "Tests (7.3, highest, ~4.2)"
- "Tests (7.3, highest, ~5.0)"
- "Tests (7.4, lowest, ~4.2)"
- "Tests (7.4, lowest, ~5.0)"
- "Tests (7.4, highest, ~4.2)"
- "Tests (7.4, highest, ~5.0)"
- "Code Coverage (7.4)"
strict: true

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ jobs:
- lowest
- highest

symfony:
- ~4.2
- ~5.0

steps:
- name: "Checkout"
uses: actions/checkout@v1
Expand All @@ -133,6 +137,9 @@ jobs:
restore-keys: |
php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-

- name: "Lock symfony version"
run: composer require "symfony/symfony:${{ matrix.symfony }}" --no-update

- name: "Install lowest dependencies with composer"
if: matrix.dependencies == 'lowest'
run: composer update --no-interaction --no-progress --no-suggest --prefer-lowest
Expand Down
6 changes: 0 additions & 6 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,8 @@ parameters:
ignoreErrors:
# Symfony DI
- '#Cannot call method defaultValue\(\) on Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface\|null.#'
- "/Call to function method_exists.. with 'Symfony.+' and 'getRootNode' will always evaluate to false./"

# PHPUnit
-
message: '#Property .*::\$.* has no typehint specified.#'
path: tests/

-
message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\TreeBuilder::root\\(\\)\\.$#"
count: 1
path: src/DependencyInjection/Configuration.php
8 changes: 2 additions & 6 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@ public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('core23_dompdf');

// Keep compatibility with symfony/config < 4.2
if (!method_exists(TreeBuilder::class, 'getRootNode')) {
$rootNode = $treeBuilder->root('core23_dompdf');
} else {
$rootNode = $treeBuilder->getRootNode();
}
$rootNode = $treeBuilder->getRootNode();

\assert($rootNode instanceof ArrayNodeDefinition);

$rootNode
Expand Down