Skip to content

Commit

Permalink
Merge pull request #36 from openeuropa/EWPP-3122
Browse files Browse the repository at this point in the history
EWPP-3122: Make component compatible with Drupal 10.
  • Loading branch information
brummbar authored Feb 16, 2023
2 parents 3d0641a + c1fd779 commit 8c7df70
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
12 changes: 8 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ services:
web:
image: registry.fpfis.eu/fpfis/httpd-php:${PHP_VERSION}-ci
environment:
- COMPOSERVER=--2
- DOCUMENT_ROOT=/test/ecl-twig-loader

pipeline:
Expand All @@ -25,15 +26,18 @@ pipeline:
volumes:
- /cache:/cache
commands:
- composer install --ansi --no-suggest --no-progress
- composer install --ansi --no-progress
when:
matrix:
COMPOSER_BOUNDARY: highest

composer-update-lowest:
group: post-prepare
image: registry.fpfis.eu/fpfis/httpd-php:${PHP_VERSION}-ci
volumes:
- /cache:/cache
commands:
- composer update --prefer-lowest --ansi --no-suggest --no-progress
- composer update --prefer-lowest --ansi --no-progress
when:
matrix:
COMPOSER_BOUNDARY: lowest
Expand All @@ -52,8 +56,8 @@ pipeline:

matrix:
PHP_VERSION:
- 7.2
- 7.3
- 8.0
- 8.1
COMPOSER_BOUNDARY:
- lowest
- highest
15 changes: 10 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=7.2",
"twig/twig": "^1.38 || ^2.7"
"php": ">=8.0",
"twig/twig": "^2.14.7 || ^3.4.3"
},
"require-dev": {
"cweagans/composer-patches": "~1.6",
"openeuropa/code-review": "^1.6",
"phpunit/phpunit": "^6.5 || ^7 || ^8 || ^9"
"openeuropa/code-review": "^2.0.0-alpha6",
"phpunit/phpunit": "^9"
},
"autoload": {
"psr-4": {
Expand All @@ -25,5 +24,11 @@
},
"scripts": {
"changelog": "docker run --rm -v \"$(pwd):$(pwd)\" -w $(pwd) muccg/github-changelog-generator openeuropa/ecl-twig-loader -t $CHANGELOG_GITHUB_TOKEN --future-release=$CHANGELOG_FUTURE_RELEASE --release-branch=3.x"
},
"config": {
"allow-plugins": {
"phpro/grumphp": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2'
services:
web:
image: fpfis/httpd-php-dev:7.3
image: fpfis/httpd-php-dev:8.1
working_dir: /var/www/html
ports:
- 8080:8080
Expand Down
2 changes: 1 addition & 1 deletion tests/EuropaComponentLibraryLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function testLoader($name, $expected, $prefix, $templatePrefix)
$paths = ['tests/fixtures/components'];
$loader = new EuropaComponentLibraryLoader($namespaces, $paths, null, $prefix, $templatePrefix);
$twig = new Twig_Environment($loader);
$actual = $twig->loadTemplate($name)->render([]);
$actual = $twig->load($name)->render([]);
$actual = str_replace("\n", ' ', trim($actual));
$this->assertEquals($expected, $actual);
}
Expand Down

0 comments on commit 8c7df70

Please sign in to comment.