Skip to content

Commit 71819dd

Browse files
authored
[Tests] Fixed failing CI
For more details see ezsystems/ezplatform-admin-ui#2123 Key changes: * [Tests] Dropped relying on internal Twig\Environment property * [GHA] Updated CI workflow to use Ubuntu 24.04 and latest dependencies
1 parent 7a9f991 commit 71819dd

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ env:
1313
jobs:
1414
cs-fix:
1515
name: Run code style check
16-
runs-on: "ubuntu-20.04"
16+
runs-on: "ubuntu-24.04"
1717
strategy:
1818
matrix:
1919
php:
2020
- '8.0'
2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
2323

2424
- name: Setup PHP Action
2525
uses: shivammathur/setup-php@v2
@@ -29,7 +29,7 @@ jobs:
2929
extensions: 'pdo_sqlite, gd'
3030
tools: cs2pr
3131

32-
- uses: "ramsey/composer-install@v1"
32+
- uses: "ramsey/composer-install@v3"
3333
with:
3434
dependency-versions: "highest"
3535

@@ -38,7 +38,7 @@ jobs:
3838

3939
tests:
4040
name: Tests
41-
runs-on: "ubuntu-20.04"
41+
runs-on: "ubuntu-24.04"
4242
timeout-minutes: 10
4343

4444
strategy:
@@ -51,7 +51,7 @@ jobs:
5151
- '8.1'
5252

5353
steps:
54-
- uses: actions/checkout@v2
54+
- uses: actions/checkout@v4
5555

5656
- name: Setup PHP Action
5757
uses: shivammathur/setup-php@v2
@@ -61,7 +61,7 @@ jobs:
6161
extensions: pdo_sqlite, gd
6262
tools: cs2pr
6363

64-
- uses: "ramsey/composer-install@v1"
64+
- uses: "ramsey/composer-install@v3"
6565
with:
6666
dependency-versions: "highest"
6767
composer-options: "--prefer-dist --no-progress"

src/bundle/Tests/Templating/Twig/LimitationValueRenderingExtensionTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use EzSystems\EzPlatformAdminUi\Limitation\Templating\LimitationBlockRenderer;
1616
use EzSystems\EzPlatformAdminUiBundle\Templating\Twig\LimitationValueRenderingExtension;
1717
use PHPUnit\Framework\MockObject\MockObject;
18-
use ReflectionProperty;
1918
use Twig\Environment;
2019
use Twig\Error\Error;
2120
use Twig\Loader\ArrayLoader;
@@ -107,11 +106,6 @@ protected function doIntegrationTest($file, $message, $condition, $templates, $e
107106
$twig->addFunction($function);
108107
}
109108

110-
// avoid using the same PHP class name for different cases
111-
$p = new ReflectionProperty($twig, 'templateClassPrefix');
112-
$p->setAccessible(true);
113-
$p->setValue($twig, '__TwigTemplate_' . hash('sha256', uniqid(mt_rand(), true), false) . '_');
114-
115109
try {
116110
$template = $twig->load('index.twig');
117111
} catch (Exception $e) {

0 commit comments

Comments
 (0)