Skip to content

Commit 0659a46

Browse files
Bump requirements to PHP 8.0 and Drupal 9.1 (#57)
* Fix "Required argument $strippedHeaders after optional argument" Deprecated in php8 * Remove deprecation warnings when dispatching Events See https://www.drupal.org/node/3159012 and https://www.drupal.org/node/3154407 * Update changelog * Bump required php version to 8.0
1 parent 8412376 commit 0659a46

13 files changed

Lines changed: 35 additions & 33 deletions

.php_cs.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

33
use Wieni\wmcodestyle\PhpCsFixer\Config\Factory;
4-
use Wieni\wmcodestyle\PhpCsFixer\Config\RuleSet\Php71;
4+
use Wieni\wmcodestyle\PhpCsFixer\Config\RuleSet\Php80;
55

6-
$config = Factory::fromRuleSet(new Php71);
6+
$config = Factory::fromRuleSet(new Php80);
77

88
$config->getFinder()
99
->ignoreVCSIgnored(true)

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
7+
## Unreleased
8+
9+
## [1.0.0] - 2021-08-24
810
### Added
911
- Add support for all entities with canonical routes
1012
- Add issue & pull request templates
1113
- Add coding standard fixers
1214
- Add Drupal 9 support
1315

1416
### Changed
15-
- Increase PHP dependency to 7.1
17+
- Increase PHP dependency to 8.0
1618
- Update module name & description
1719
- Make bundle-specific controllers optional, falling back to the default
1820
controller

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "wieni/wmcontroller",
33
"type": "drupal-module",
4-
"description": "Adds support for bundle-specific controllers for Drupal 8 entities.",
4+
"description": "Adds support for bundle-specific controllers for Drupal 9 entities.",
55
"license": "MIT",
66
"authors": [
77
{
@@ -10,12 +10,12 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=7.1.0",
14-
"drupal/core": "^8.6 || ^9.0"
13+
"php": "^8.0",
14+
"drupal/core": "^9.1"
1515
},
1616
"require-dev": {
1717
"ergebnis/composer-normalize": "^2.0",
18-
"wieni/wmcodestyle": "^1.0"
18+
"wieni/wmcodestyle": "^1.7"
1919
},
2020
"extra": {
2121
"drush": {

src/Event/CacheInsertEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Drupal\wmcontroller\Event;
44

55
use Drupal\wmcontroller\Entity\Cache;
6-
use Symfony\Component\EventDispatcher\Event;
6+
use Drupal\Component\EventDispatcher\Event;
77
use Symfony\Component\HttpFoundation\Request;
88
use Symfony\Component\HttpFoundation\Response;
99

src/Event/CacheTagsEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Drupal\wmcontroller\Event;
44

5-
use Symfony\Component\EventDispatcher\Event;
5+
use Drupal\Component\EventDispatcher\Event;
66

77
class CacheTagsEvent extends Event
88
{

src/Event/EntityPresentedEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Drupal\wmcontroller\Event;
44

55
use Drupal\Core\Entity\EntityInterface;
6-
use Symfony\Component\EventDispatcher\Event;
6+
use Drupal\Component\EventDispatcher\Event;
77

88
class EntityPresentedEvent extends Event
99
{

src/Event/MainEntityEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Drupal\wmcontroller\Event;
44

5+
use Drupal\Component\EventDispatcher\Event;
56
use Drupal\Core\Entity\EntityInterface;
6-
use Symfony\Component\EventDispatcher\Event;
77

88
class MainEntityEvent extends Event
99
{

src/Event/PresentedEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Drupal\wmcontroller\Event;
44

5-
use Symfony\Component\EventDispatcher\Event;
5+
use Drupal\Component\EventDispatcher\Event;
66

77
class PresentedEvent extends Event
88
{

src/Event/ValidationEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Drupal\Core\Access\AccessResult;
66
use Drupal\wmcontroller\Service\Cache\Validation\ValidationResult;
7-
use Symfony\Component\EventDispatcher\Event;
7+
use Drupal\Component\EventDispatcher\Event;
88
use Symfony\Component\HttpFoundation\Request;
99
use Symfony\Component\HttpFoundation\Response;
1010

src/EventSubscriber/CacheSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function __construct(
4747
Validation $validation,
4848
EnrichRequest $enrichRequest,
4949
MaxAgeInterface $maxAgeStrategy,
50-
$addHeader = false,
50+
bool $addHeader,
5151
array $strippedHeaders
5252
) {
5353
$this->manager = $manager;

0 commit comments

Comments
 (0)