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

[TASK] Set PHP level to 8.2 via Rector #238

Merged
merged 2 commits into from
Mar 6, 2024
Merged
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
6 changes: 3 additions & 3 deletions Classes/Controller/AdminModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
use TYPO3\CMS\Core\Localization\LanguageService;

#[Controller]
final class AdminModuleController
final readonly class AdminModuleController
{
public function __construct(
protected readonly ModuleTemplateFactory $moduleTemplateFactory,
protected readonly IconFactory $iconFactory,
protected ModuleTemplateFactory $moduleTemplateFactory,
protected IconFactory $iconFactory,
// ...
) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
#[AsEventListener(
identifier: 'txExampleCheckExternalLinksToLocalPages',
)]
final class CheckExternalLinksToLocalPagesEventListener
final readonly class CheckExternalLinksToLocalPagesEventListener
{
private const LOCAL_DOMAIN = 'example.org';
private const TABLE_NAME = 'tt_content';
private const FIELD_NAME = 'bodytext';

public function __construct(
private readonly BrokenLinkRepository $brokenLinkRepository,
private readonly SoftReferenceParserFactory $softReferenceParserFactory,
private BrokenLinkRepository $brokenLinkRepository,
private SoftReferenceParserFactory $softReferenceParserFactory,
) {}

public function __invoke(BeforeRecordIsAnalyzedEvent $event): void
Expand Down
4 changes: 2 additions & 2 deletions Classes/Http/MeowInformationRequester.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

use TYPO3\CMS\Core\Http\RequestFactory;

final class MeowInformationRequester
final readonly class MeowInformationRequester
{
private const API_URL = 'https://catfact.ninja/fact';

// We need the RequestFactory for creating and sending a request,
// so we inject it into the class using constructor injection.
public function __construct(
private readonly RequestFactory $requestFactory,
private RequestFactory $requestFactory,
) {}

/**
Expand Down
8 changes: 4 additions & 4 deletions Classes/Middleware/HaikuSeasonList.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@
* "/de/haiku-season-list.json" for German translation (if /de is the configured base path)
* If the base path is not available in the according site the default language will be used.
*/
final class HaikuSeasonList implements MiddlewareInterface
final readonly class HaikuSeasonList implements MiddlewareInterface
{
private const SEASONS = ['spring', 'summer', 'autumn', 'winter', 'theFifthSeason'];
private const TRANSLATION_PATH = 'LLL:EXT:examples/Resources/Private/Language/PluginHaiku/locallang.xlf:season.';
private const URL_SEGMENT = '/haiku-season-list.json';

public function __construct(
private readonly LanguageServiceFactory $languageServiceFactory,
private readonly ResponseFactoryInterface $responseFactory,
private readonly StreamFactoryInterface $streamFactory,
private LanguageServiceFactory $languageServiceFactory,
private ResponseFactoryInterface $responseFactory,
private StreamFactoryInterface $streamFactory,
) {}

public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
Expand Down
2 changes: 1 addition & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
]);

$rectorConfig->sets([
LevelSetList::UP_TO_PHP_81,
LevelSetList::UP_TO_PHP_82,
]);

$rectorConfig->skip([
Expand Down
Loading