rector.php gets the codeQuality set: declare(strict_types=1) in the 85 files where Rector finds no call relying on scalar type juggling (mostly TCA and configuration, models, the content feed API and the import command), "or die" as "|| die", instanceof instead of null checks for object types, early returns and self:: in final classes. Hotel::setRooms() goes instead of getting the property Rector wanted to declare: nothing calls it, and there is no rooms column any more. Checked locally: cache warmup, the ep:* commands load, frontend crawl (~1,900 URLs) and the backchannel APIs render the same as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
21 lines
759 B
PHP
21 lines
759 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Directive;
|
|
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Mutation;
|
|
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationCollection;
|
|
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationMode;
|
|
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Scope;
|
|
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\UriValue;
|
|
use TYPO3\CMS\Core\Type\Map;
|
|
|
|
// The frontend references favicons and images on the CDN, and backend previews (yoast's snippet
|
|
// preview) show them as they are.
|
|
return Map::fromEntries([
|
|
Scope::backend(),
|
|
new MutationCollection(
|
|
new Mutation(MutationMode::Extend, Directive::ImgSrc, new UriValue('https://cdn.ep-reisen.de')),
|
|
),
|
|
]);
|