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

[FEATURE] Add RemoveModNewPageWizOverrideWithExtensionFractor #245

Merged
merged 1 commit into from
Nov 24, 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
15 changes: 15 additions & 0 deletions packages/typo3-fractor/config/typo3-8.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

use a9f\Typo3Fractor\TYPO3v8\TypoScript\RemoveModNewPageWizOverrideWithExtensionFractor;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->defaults()
->autoconfigure()
->autowire();

$services->set(RemoveModNewPageWizOverrideWithExtensionFractor::class);
};
15 changes: 14 additions & 1 deletion packages/typo3-fractor/docs/typo3-fractor-rules.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 26 Rules Overview
# 27 Rules Overview

## AbstractMessageGetSeverityFluidFractor

Expand Down Expand Up @@ -423,6 +423,19 @@ Remove config.spamProtectEmailAddresses with option ascii

<br>

## RemoveModNewPageWizOverrideWithExtensionFractor

Remove mod.web_list.newPageWiz.overrideWithExtension

- class: [`a9f\Typo3Fractor\TYPO3v8\TypoScript\RemoveModNewPageWizOverrideWithExtensionFractor`](../rules/TYPO3v8/TypoScript/RemoveModNewPageWizOverrideWithExtensionFractor.php)

```diff
-mod.web_list.newPageWiz.overrideWithExtension = 1
+-
```

<br>

## RemoveNewContentElementWizardOptionsFractor

Remove TSConfig mod.web_layout.disableNewContentElementWizard and mod.newContentElementWizard.override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mod {
dummy = 1
web_list.newPageWiz.overrideWithExtension = myextension
}
-----
mod {
dummy = 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace a9f\Typo3Fractor\Tests\TYPO3v8\TypoScript\RemoveModNewPageWizOverrideWithExtensionFractor;

use a9f\Fractor\Testing\PHPUnit\AbstractFractorTestCase;
use PHPUnit\Framework\Attributes\DataProvider;

final class RemoveModNewPageWizOverrideWithExtensionFractorTest extends AbstractFractorTestCase
{
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public static function provideData(): \Iterator
{
return self::yieldFilesFromDirectory(__DIR__ . '/Fixtures', '*.typoscript');
}

public function provideConfigFilePath(): ?string
{
return __DIR__ . '/config/fractor.php';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

use a9f\Fractor\Configuration\FractorConfiguration;
use a9f\Typo3Fractor\TYPO3v8\TypoScript\RemoveModNewPageWizOverrideWithExtensionFractor;

return FractorConfiguration::configure()
->withRules([RemoveModNewPageWizOverrideWithExtensionFractor::class]);
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

declare(strict_types=1);

namespace a9f\Typo3Fractor\TYPO3v8\TypoScript;

use a9f\Typo3Fractor\AbstractRemoveTypoScriptSettingFractor;

/**
* @changelog https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/8.5/Breaking-78549-OverridePagePositionMapWizardViaPageTSconfig.html
* @see \a9f\Typo3Fractor\Tests\TYPO3v8\TypoScript\RemoveModNewPageWizOverrideWithExtensionFractor\RemoveModNewPageWizOverrideWithExtensionFractorTest
*/
final class RemoveModNewPageWizOverrideWithExtensionFractor extends AbstractRemoveTypoScriptSettingFractor
{
protected function getFullOptionName(): string
{
return 'mod.web_list.newPageWiz.overrideWithExtension';
}
}