Skip to content

Commit edff5f4

Browse files
committed
refactor: adapt CI
1 parent 689aa7a commit edff5f4

File tree

7 files changed

+37
-7
lines changed

7 files changed

+37
-7
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';

Tests/Functional/Controller/ApiControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ApiControllerTest extends BaseTestCase
1616
public function testUpdateAction(): void
1717
{
1818
// Start application
19-
$client = static::createClient(['config' => 'test_updating_translations.yml']);
19+
$client = static::createClient();
2020
$outputDir = $client->getContainer()->getParameter('translation_output_dir');
2121

2222
$isSf4 = version_compare(Kernel::VERSION, '4.0.0') >= 0;
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
framework:
2+
secret: test
3+
http_method_override: true
4+
test: ~
5+
assets: ~
6+
session:
7+
storage_factory_id: session.storage.factory.mock_file
8+
form: true
9+
csrf_protection: true
10+
annotations: false
11+
property_access: true
12+
validation:
13+
enabled: true
14+
translator:
15+
enabled: true
16+
router:
17+
resource: "%kernel.project_dir%/config/routing_sf6.yaml"

Tests/Translation/Extractor/File/Fixture/MyFormModel.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ class MyFormModel implements TranslationContainerInterface
3232
'bar' => 'form.label.choice.bar',
3333
];
3434

35-
/**
36-
* @Assert\NotBlank(message = "form.error.name_required")
37-
*/
35+
#[Assert\NotBlank(message: "form.error.name_required")]
3836
public $name;
3937

4038
public static function getTranslationMessages()

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"doctrine/coding-standard": "^9.0",
3939
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
4040
"nyholm/nsa": "^1.0.1",
41+
"phpunit/phpunit": "^10.5 || ^11.5",
4142
"symfony/phpunit-bridge": "^5.4 || ^6.4 || ^7.1",
4243
"sensio/framework-extra-bundle": "^6.2.4",
4344
"symfony/asset": "^5.4 || ^6.4 || ^7.1",

0 commit comments

Comments
 (0)