Skip to content

Commit 9a5da07

Browse files
Add PHP 8 compatibility (#141)
* Add PHP 8 compatibility * Remove ignore platform reqs
1 parent bf4bb4e commit 9a5da07

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

.github/workflows/test-application.yaml

+9-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
test:
12-
name: 'PHP ${{ matrix.php-version }} (${{ matrix.dependency-versions }})'
12+
name: 'PHP ${{ matrix.php-version }} (${{ matrix.dependency-versions }}, Lint ${{ matrix.lint }})'
1313
runs-on: ubuntu-latest
1414

1515
env:
@@ -33,6 +33,13 @@ jobs:
3333
env:
3434
SYMFONY_DEPRECATIONS_HELPER: weak
3535

36+
- php-version: '8.0'
37+
lint: false
38+
dependency-versions: 'highest'
39+
tools: 'composer:v2'
40+
env:
41+
SYMFONY_DEPRECATIONS_HELPER: weak
42+
3643
services:
3744
mysql:
3845
image: mysql:5.7
@@ -57,6 +64,7 @@ jobs:
5764
uses: ramsey/composer-install@v1
5865
with:
5966
dependency-versions: ${{matrix.dependency-versions}}
67+
composer-options: ${{ matrix.composer-options }}
6068

6169
- name: Bootstrap test environment
6270
run: composer bootstrap-test-environment

DependencyInjection/CompilerPass/CommunityManagerCompilerPass.php

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class CommunityManagerCompilerPass implements CompilerPassInterface
2727
*/
2828
public function process(ContainerBuilder $container): void
2929
{
30+
/** @var mixed[] $webspacesConfig */
3031
$webspacesConfig = $container->getParameter('sulu_community.webspaces_config');
3132

3233
$references = [];

DependencyInjection/CompilerPass/CommunityValidatorCompilerPass.php

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function process(ContainerBuilder $container): void
3434
}
3535

3636
// Create Validator References
37+
/** @var mixed[] $webspacesConfig */
3738
$webspacesConfig = $container->getParameter('sulu_community.webspaces_config');
3839

3940
foreach ($webspacesConfig as $webspaceKey => $webspaceConfig) {

EventListener/BlacklistListener.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Sulu\Bundle\CommunityBundle\EventListener;
1313

14-
use Doctrine\Common\Persistence\ObjectManager;
14+
use Doctrine\Persistence\ObjectManager;
1515
use Sulu\Bundle\CommunityBundle\DependencyInjection\Configuration;
1616
use Sulu\Bundle\CommunityBundle\Entity\BlacklistItem;
1717
use Sulu\Bundle\CommunityBundle\Entity\BlacklistItemRepository;

composer.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
"type": "sulu-bundle",
55
"license": "MIT",
66
"require": {
7-
"php": "^7.2",
7+
"php": "^7.2 || ^8.0",
88
"beberlei/doctrineextensions": "^1.0",
99
"doctrine/doctrine-bundle": "^1.10 || ^2.0",
10+
"doctrine/persistence": "^1.3 || ^2.0",
11+
"doctrine/orm": "^2.5.3",
1012
"jms/serializer-bundle": "^3.3",
1113
"massive/build-bundle": "^0.3 || ^0.4 || ^0.5",
12-
"sulu/sulu": "^2.0.6 || ^2.1@dev",
14+
"sulu/sulu": "^2.0.6 || ^2.3@dev",
1315
"symfony/config": "^4.3 || ^5.0",
1416
"symfony/console": "^4.3 || ^5.0",
1517
"symfony/dependency-injection": "^4.3 || ^5.0",
@@ -24,6 +26,7 @@
2426
"symfony/swiftmailer-bundle": "^3.1.4"
2527
},
2628
"require-dev": {
29+
"doctrine/data-fixtures": "^1.3.3",
2730
"friendsofphp/php-cs-fixer": "^2.17",
2831
"handcraftedinthealps/zendsearch": "^2.0",
2932
"jackalope/jackalope-doctrine-dbal": "^1.3.4",

0 commit comments

Comments
 (0)