Skip to content

Commit 34d3bec

Browse files
committed
refactor: adapt CI
1 parent 6910b8f commit 34d3bec

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ jobs:
4040
coverage: "pcov"
4141
ini-values: "zend.assertions=1"
4242

43+
- name: Remove sensio/framework-extra-bundle
44+
uses: php-actions/composer@v6
45+
if: matrix.symfony-version == '^7.2'
46+
with:
47+
command: remove
48+
args: --dev sensio/framework-extra-bundle --no-update
49+
4350
- name: Configure symfony version
4451
uses: php-actions/composer@v6
4552
with:

Tests/Functional/AppKernel.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,18 @@ public function __construct(string $fwConfig, ?string $config)
6060

6161
public function registerBundles(): iterable
6262
{
63-
return [
63+
$bundles = [
6464
new TestBundle(),
6565
new FrameworkBundle(),
6666
new TwigBundle(),
6767
new JMSTranslationBundle(),
68-
new SensioFrameworkExtraBundle(),
6968
];
69+
70+
if (class_exists(SensioFrameworkExtraBundle::class)) {
71+
$bundles[] = new SensioFrameworkExtraBundle();
72+
}
73+
74+
return $bundles;
7075
}
7176

7277
public function registerContainerConfiguration(LoaderInterface $loader): void

Tests/Functional/BaseTestCase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ protected static function createKernel(array $options = []): KernelInterface
3232

3333
$default = $isSf5 ? 'default_sf5.yml' : 'default.yml';
3434

35-
if (version_compare(Kernel::VERSION, '6.0.0') >= 0) {
35+
if (version_compare(Kernel::VERSION, '7.0.0') >= 0) {
36+
$conf = 'framework_sf7.yaml';
37+
} elseif (version_compare(Kernel::VERSION, '6.0.0') >= 0) {
3638
$conf = 'framework_sf6.yml';
3739
} elseif (version_compare(Kernel::VERSION, '5.0.0') >= 0) {
3840
$conf = 'framework.yml';
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
framework:
2+
secret: test
3+
test: ~
4+
assets: ~
5+
session:
6+
storage_factory_id: session.storage.factory.mock_file
7+
form: true
8+
csrf_protection: true
9+
annotations: false
10+
property_access: true
11+
validation:
12+
enabled: true
13+
translator:
14+
enabled: true
15+
router:
16+
resource: "%kernel.project_dir%/config/routing_sf6.yaml"

0 commit comments

Comments
 (0)