Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid PHP 8.4 deprecations #593

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Classes/Backend/PageLayoutHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(
/**
* @param array<string, string>|null $params
*/
public function render(array $params = null, PageLayoutController|ModuleTemplate|null $parentObj = null): string
public function render(?array $params = null, PageLayoutController|ModuleTemplate|null $parentObj = null): string
{
$languageId = $this->getLanguageId();
$pageId = (int)$_GET['id'];
Expand Down
2 changes: 1 addition & 1 deletion Classes/Controller/AbstractBackendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ abstract class AbstractBackendController extends ActionController
/**
* @param array<string, mixed> $data
*/
protected function returnResponse(string $template, array $data = [], ModuleTemplate $moduleTemplate = null): ResponseInterface
protected function returnResponse(string $template, array $data = [], ?ModuleTemplate $moduleTemplate = null): ResponseInterface
{
$data['layout'] = GeneralUtility::makeInstance(Typo3Version::class)
->getMajorVersion() < 13 ? 'Default' : 'Module';
Expand Down
2 changes: 1 addition & 1 deletion Classes/EventListener/RecordCanonicalListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class RecordCanonicalListener
{
protected RecordService $recordService;

public function __construct(RecordService $recordService = null)
public function __construct(?RecordService $recordService = null)
{
if ($recordService === null) {
$recordService = GeneralUtility::makeInstance(RecordService::class);
Expand Down
2 changes: 1 addition & 1 deletion Classes/MetaTag/Generator/AbstractGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ abstract class AbstractGenerator implements GeneratorInterface
{
protected MetaTagManagerRegistry $managerRegistry;

public function __construct(MetaTagManagerRegistry $managerRegistry = null)
public function __construct(?MetaTagManagerRegistry $managerRegistry = null)
{
if ($managerRegistry === null) {
$managerRegistry = GeneralUtility::makeInstance(MetaTagManagerRegistry::class);
Expand Down
2 changes: 1 addition & 1 deletion Classes/PageTitle/RecordPageTitleProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class RecordPageTitleProvider extends AbstractPageTitleProvider
{
protected RecordService $recordService;

public function __construct(RecordService $recordService = null)
public function __construct(?RecordService $recordService = null)
{
if ($recordService === null) {
$recordService = GeneralUtility::makeInstance(RecordService::class);
Expand Down
2 changes: 1 addition & 1 deletion Classes/Utility/JavascriptUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class JavascriptUtility
{
public static function loadJavascript(PageRenderer $pageRenderer = null): void
public static function loadJavascript(?PageRenderer $pageRenderer = null): void
{
if ($pageRenderer === null) {
$pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
Expand Down