Skip to content

Commit 134e68c

Browse files
authored
Merge pull request #225 from symfony-cmf/sf8
allow installation with symfony 8
2 parents fbcdd18 + e26ac98 commit 134e68c

File tree

14 files changed

+30
-28
lines changed

14 files changed

+30
-28
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ $ composer show --latest 'symfony-cmf/*'
3939
If it's an error message or piece of code, use code block tags,
4040
and make sure you provide the whole stack trace(s),
4141
not just the first error message you can see.
42-
More details here: https://github.com/symfony-cmf/Testing/blob/master/CONTRIBUTING.md#issues
42+
More details here: https://github.com/symfony-cmf/Testing/blob/5.x/CONTRIBUTING.md#issues
4343
-->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
| Q | A
22
| ------------- | ---
3-
| Branch? | "master" for new features / the branch of the current release for fixes
3+
| Branch? | branch of the next release for new features / the branch of the current release for fixes
44
| Bug fix? | yes/no
55
| New feature? | yes/no
66
| BC breaks? | yes/no

.github/workflows/test-application.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
test:
1313
name: 'PHP ${{ matrix.php-version }}, Symfony ${{ matrix.symfony-version }} ${{ matrix.dependencies}}'
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-latest
1515

1616
env:
1717
SYMFONY_DEPRECATIONS_HELPER: weak
@@ -27,6 +27,8 @@ jobs:
2727
- php-version: '8.1'
2828
- php-version: '8.2'
2929
- php-version: '8.3'
30+
- php-version: '8.4'
31+
- php-version: '8.5'
3032

3133
steps:
3234
- name: Checkout project

bootstrap/kernel_bootstrap.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,29 @@
1818
$phpUnitFile = $rootDir.'/phpunit.xml.dist';
1919

2020
if (!file_exists($phpUnitFile)) {
21-
throw new \Exception(sprintf(
21+
throw new Exception(sprintf(
2222
'Cannot find phpunit.xml.dist file in "%s"',
2323
$phpUnitFile
2424
));
2525
}
2626

27-
$xml = new \SimpleXMLElement(file_get_contents($phpUnitFile));
27+
$xml = new SimpleXMLElement(file_get_contents($phpUnitFile));
2828

2929
$envClass = $xml->xpath("//php/env[@name='KERNEL_CLASS']");
3030
if (count($envClass)) {
3131
$kernelClass = (string) $envClass[0]['value'];
3232
} else {
3333
$envDir = $xml->xpath("//php/server[@name='KERNEL_DIR']");
3434
if (!count($envDir)) {
35-
throw new \Exception(
35+
throw new Exception(
3636
'KERNEL_CLASS must be set via <env name"KERNEL_CLASS" value="..."/>'
3737
);
3838
}
3939
$kernelClass = 'AppKernel';
4040
$kernelFile = $rootDir.'/'.$envDir[0]['value'].'/'.$kernelClass.'.php';
4141

4242
if (!file_exists($kernelFile)) {
43-
throw new \Exception(sprintf(
43+
throw new Exception(sprintf(
4444
'Cannot find kernel file "%s"',
4545
$kernelFile
4646
));

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@
1111
"require": {
1212
"php": "^8.1",
1313
"doctrine/data-fixtures": "^1.2",
14-
"symfony/browser-kit": "^6.4 || ^7.0"
14+
"symfony/browser-kit": "^6.4 || ^7.0 || ^8.0"
1515
},
1616
"require-dev": {
1717
"ext-dom": "*",
1818
"doctrine/doctrine-bundle": "^1.8 || ^2.0",
1919
"doctrine/phpcr-odm": "^2.0",
2020
"doctrine/phpcr-bundle": "^3.0",
2121
"jackalope/jackalope-doctrine-dbal": "^2.0",
22-
"symfony/console": "^6.4 || ^7.0",
23-
"symfony/dependency-injection": "^6.4 || ^7.0",
24-
"symfony/doctrine-bridge": "^6.4 || ^7.0",
25-
"symfony/framework-bundle": "^6.4 || ^7.0",
26-
"symfony/http-kernel": "^6.4 || ^7.0",
22+
"symfony/console": "^6.4 || ^7.0 || ^8.0",
23+
"symfony/dependency-injection": "^6.4 || ^7.0 || ^8.0",
24+
"symfony/doctrine-bridge": "^6.4 || ^7.0 || ^8.0",
25+
"symfony/framework-bundle": "^6.4 || ^7.0 || ^8.0",
26+
"symfony/http-kernel": "^6.4 || ^7.0 || ^8.0",
2727
"symfony/monolog-bundle": "^3.5",
28-
"symfony/security-bundle": "^6.4 || ^7.0",
29-
"symfony/twig-bundle": "^6.4 || ^7.0",
28+
"symfony/security-bundle": "^6.4 || ^7.0 || ^8.0",
29+
"symfony/twig-bundle": "^6.4 || ^7.0 || ^8.0",
3030
"symfony/phpunit-bridge": "^7.0.3"
3131
},
3232
"conflict": {

resources/config/dist/security.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
],
4141
];
4242

43-
if (class_exists(\Symfony\Component\Security\Core\Security::class)) {
43+
if (class_exists(Symfony\Component\Security\Core\Security::class)) {
4444
// Symfony 6 but not 7
4545
$config['enable_authenticator_manager'] = true;
4646
}

src/Functional/BaseTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ protected function getDbManager(string $type): PhpcrDecorator|PHPCR|ORM
124124
return $this->dbManagers[$type];
125125
}
126126

127-
$className = sprintf(
127+
$className = \sprintf(
128128
'Symfony\Cmf\Component\Testing\Functional\DbManager\%s',
129129
$type
130130
);
@@ -134,7 +134,7 @@ protected function getDbManager(string $type): PhpcrDecorator|PHPCR|ORM
134134
}
135135

136136
if (!class_exists($className)) {
137-
throw new \InvalidArgumentException(sprintf(
137+
throw new \InvalidArgumentException(\sprintf(
138138
'Test DBManager "%s" does not exist.',
139139
$className
140140
));

src/Functional/DbManager/ORM.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function loadFixtures(array $classNames): void
7878
protected function loadFixtureClass(Loader $loader, string $className): void
7979
{
8080
if (!class_exists($className)) {
81-
throw new \InvalidArgumentException(sprintf(
81+
throw new \InvalidArgumentException(\sprintf(
8282
'Fixture class "%s" does not exist.',
8383
$className
8484
));

src/Functional/DbManager/PHPCR.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function loadFixtureClass(Loader $loader, $class): void
8181
$fixture = $class;
8282
} else {
8383
if (!class_exists($class)) {
84-
throw new \InvalidArgumentException(sprintf(
84+
throw new \InvalidArgumentException(\sprintf(
8585
'Fixture class "%s" does not exist.',
8686
$class
8787
));

src/Functional/DbManager/PhpcrDecorator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function __construct(ContainerInterface $container)
2626
parent::__construct($container->get('doctrine_phpcr'), $container->get('doctrine_phpcr.initializer_manager'));
2727
}
2828

29-
public function getOm(string $managerName = null): DocumentManagerInterface
29+
public function getOm(?string $managerName = null): DocumentManagerInterface
3030
{
3131
return $this->getDocumentManager($managerName);
3232
}

0 commit comments

Comments
 (0)