Skip to content

Commit

Permalink
Merge pull request #593 from brotkrueml/avoid-php84-deprecations
Browse files Browse the repository at this point in the history
Avoid PHP 8.4 deprecations
  • Loading branch information
RinyVT authored Jan 28, 2025
2 parents 219be11 + 2ab9d22 commit bcf086b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
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

0 comments on commit bcf086b

Please sign in to comment.