Skip to content
Draft
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: 2 additions & 0 deletions packages/typo3-fractor/config/typo3-13.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use a9f\Typo3Fractor\TYPO3v13\TypoScript\MigrateIncludeTypoScriptSyntaxFractor;
use a9f\Typo3Fractor\TYPO3v13\TypoScript\RemovePageDoktypeRecyclerFromUserTsConfigFractor;
use a9f\Typo3Fractor\TYPO3v13\TypoScript\MigratePluginContentElementAndPluginSubtypesFractor;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $containerConfigurator): void {
Expand All @@ -14,4 +15,5 @@

$services->set(MigrateIncludeTypoScriptSyntaxFractor::class);
$services->set(RemovePageDoktypeRecyclerFromUserTsConfigFractor::class);
$services->set(MigratePluginContentElementAndPluginSubtypesFractor::class);
};
116 changes: 116 additions & 0 deletions packages/typo3-fractor/docs/typo3-fractor-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,122 @@ Migrate password and salted password to password type

<br>

## MigratePluginContentElementAndPluginSubtypesFractorChatGPT

Migrate plugin content element and plugin subtypes (list_type)

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

```diff
-tt_content.list.20.examples_pi1 = USER
-tt_content.list.20.examples_pi1 {
- userFunc = MyVendor\Examples\Controller\ExampleController->example
+tt_content.examples_pi1 =< lib.contentElement
+tt_content.examples_pi1 {
+ 20 = USER
+ 20 {
+ userFunc = MyVendor\Examples\Controller\ExampleController->example
+ }
+ templateName = Generic
}

-tt_content.list.20.examples_pi1 < plugin.tx_examples_pi1
+tt_content.examples_pi1.20 < plugin.tx_examples_pi1
```

<br>

```diff
-tt_content.list.20.examples_pi1 < plugin.tx_examples_pi1
+tt_content.examples_pi1.20 < plugin.tx_examples_pi1
```

<br>

## MigratePluginContentElementAndPluginSubtypesFractorGeminiV1

Migrate plugin content element and plugin subtypes (list_type)

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

```diff
-tt_content.list.20.examples_pi1 = USER
-tt_content.list.20.examples_pi1 {
- userFunc = MyVendor\Examples\Controller\ExampleController->example
+tt_content.examples_pi1 =< lib.contentElement
+tt_content.examples_pi1 {
+ 20 = USER
+ 20 {
+ userFunc = MyVendor\Examples\Controller\ExampleController->example
+ }
+ templateName = Generic
}

-tt_content.list.20.examples_pi1 < plugin.tx_examples_pi1
+tt_content.examples_pi1.20 < plugin.tx_examples_pi1
```

<br>

```diff
-tt_content.list.20.examples_pi1 < plugin.tx_examples_pi1
+tt_content.examples_pi1.20 < plugin.tx_examples_pi1
```

<br>

## MigratePluginContentElementAndPluginSubtypesFractorGeminiV2

Migrate plugin content element and plugin subtypes (list_type)

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

```diff
-tt_content.list.20.examples_pi1 = USER
-tt_content.list.20.examples_pi1 {
- userFunc = MyVendor\Examples\Controller\ExampleController->example
+tt_content.examples_pi1 =< lib.contentElement
+tt_content.examples_pi1 {
+ 20 = USER
+ 20 {
+ userFunc = MyVendor\Examples\Controller\ExampleController->example
+ }
+ templateName = Generic
}

-tt_content.list.20.examples_pi1 < plugin.tx_examples_pi1
+tt_content.examples_pi1.20 < plugin.tx_examples_pi1
```

<br>

```diff
-tt_content.list.20.examples_pi1 < plugin.tx_examples_pi1
+tt_content.examples_pi1.20 < plugin.tx_examples_pi1
```

<br>

## MigratePluginContentElementAndPluginSubtypesFractor

Migrate plugin content element and plugin subtypes (list_type)

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

```diff
-tt_content.list.20.examples_pi1 = USER
-tt_content.list.20.examples_pi1 {
+tt_content.examples_pi1 = USER
+tt_content.examples_pi1 {
userFunc = MyVendor\Examples\Controller\ExampleController->example
}

-tt_content.list.20.examples_pi1 < plugin.tx_examples_pi1
+tt_content.examples_pi1 < plugin.tx_examples_pi1
```

<br>

## MigrateRenderTypeColorpickerToTypeColorFlexFormFractor

Migrate renderType colorpicker to type color
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
tt_content.list.20.examples_pi1 = USER
tt_content.list.20.examples_pi1 {
userFunc = MyVendor\Examples\Controller\ExampleController->example
}
-----
tt_content.examples_pi1 =< lib.contentElement
tt_content.examples_pi1 {
20 = USER
20 {
userFunc = MyVendor\Examples\Controller\ExampleController->example
}
templateName = Generic
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
temp.example < tt_content.list.20.examples_pi1
-----
temp.example < tt_content.examples_pi1.20
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
tt_content {
list.20 {
examples_pi1 {
userFunc = MyVendor\Examples\Controller\ExampleController->example
}
}
}
-----
tt_content {
examples_pi1 {
20 {
userFunc = MyVendor\Examples\Controller\ExampleController->example
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
tt_content {
list {
20 {
examples_pi1 {
userFunc = MyVendor\Examples\Controller\ExampleController->example
}
}
}
}
-----
tt_content {
examples_pi1 {
20 {
userFunc = MyVendor\Examples\Controller\ExampleController->example
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tt_content.list.20.examples_pi1 < plugin.tx_examples_pi1
-----
tt_content.examples_pi1 =< lib.contentElement
tt_content.examples_pi1.20 < plugin.tx_examples_pi1
tt_content.examples_pi1.templateName = Generic
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tt_content.list.20.examples_pi1 =< plugin.tx_examples_pi1
-----
tt_content.examples_pi1 =< lib.contentElement
tt_content.examples_pi1.20 =< plugin.tx_examples_pi1
tt_content.examples_pi1.templateName = Generic
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
temp.example =< tt_content.list.20.examples_pi1
-----
temp.example =< tt_content.examples_pi1.20
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace a9f\Typo3Fractor\Tests\TYPO3v13\TypoScript\MigratePluginContentElementAndPluginSubtypesFractor;

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

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

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

public function provideConfigFilePath(): ?string

Check failure on line 23 in packages/typo3-fractor/rules-tests/TYPO3v13/TypoScript/MigratePluginContentElementAndPluginSubtypesFractor/MigratePluginContentElementAndPluginSubtypesFractorTest.php

View workflow job for this annotation

GitHub Actions / PHPStan/Oldest deps/PHP 8.2

Method a9f\Typo3Fractor\Tests\TYPO3v13\TypoScript\MigratePluginContentElementAndPluginSubtypesFractor\MigratePluginContentElementAndPluginSubtypesFractorTest::provideConfigFilePath() never returns null so it can be removed from the return type.

Check failure on line 23 in packages/typo3-fractor/rules-tests/TYPO3v13/TypoScript/MigratePluginContentElementAndPluginSubtypesFractor/MigratePluginContentElementAndPluginSubtypesFractorTest.php

View workflow job for this annotation

GitHub Actions / PHPStan/Newest deps/PHP 8.4

Method a9f\Typo3Fractor\Tests\TYPO3v13\TypoScript\MigratePluginContentElementAndPluginSubtypesFractor\MigratePluginContentElementAndPluginSubtypesFractorTest::provideConfigFilePath() never returns null so it can be removed from the return type.

Check failure on line 23 in packages/typo3-fractor/rules-tests/TYPO3v13/TypoScript/MigratePluginContentElementAndPluginSubtypesFractor/MigratePluginContentElementAndPluginSubtypesFractorTest.php

View workflow job for this annotation

GitHub Actions / PHPStan/Newest deps/PHP 8.3

Method a9f\Typo3Fractor\Tests\TYPO3v13\TypoScript\MigratePluginContentElementAndPluginSubtypesFractor\MigratePluginContentElementAndPluginSubtypesFractorTest::provideConfigFilePath() never returns null so it can be removed from the return type.

Check failure on line 23 in packages/typo3-fractor/rules-tests/TYPO3v13/TypoScript/MigratePluginContentElementAndPluginSubtypesFractor/MigratePluginContentElementAndPluginSubtypesFractorTest.php

View workflow job for this annotation

GitHub Actions / PHPStan/Oldest deps/PHP 8.3

Method a9f\Typo3Fractor\Tests\TYPO3v13\TypoScript\MigratePluginContentElementAndPluginSubtypesFractor\MigratePluginContentElementAndPluginSubtypesFractorTest::provideConfigFilePath() never returns null so it can be removed from the return type.

Check failure on line 23 in packages/typo3-fractor/rules-tests/TYPO3v13/TypoScript/MigratePluginContentElementAndPluginSubtypesFractor/MigratePluginContentElementAndPluginSubtypesFractorTest.php

View workflow job for this annotation

GitHub Actions / PHPStan/Newest deps/PHP 8.2

Method a9f\Typo3Fractor\Tests\TYPO3v13\TypoScript\MigratePluginContentElementAndPluginSubtypesFractor\MigratePluginContentElementAndPluginSubtypesFractorTest::provideConfigFilePath() never returns null so it can be removed from the return type.

Check failure on line 23 in packages/typo3-fractor/rules-tests/TYPO3v13/TypoScript/MigratePluginContentElementAndPluginSubtypesFractor/MigratePluginContentElementAndPluginSubtypesFractorTest.php

View workflow job for this annotation

GitHub Actions / PHPStan/Oldest deps/PHP 8.4

Method a9f\Typo3Fractor\Tests\TYPO3v13\TypoScript\MigratePluginContentElementAndPluginSubtypesFractor\MigratePluginContentElementAndPluginSubtypesFractorTest::provideConfigFilePath() never returns null so it can be removed from the return type.
{
return __DIR__ . '/config/fractor.php';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

use a9f\Fractor\Configuration\FractorConfiguration;
use a9f\Fractor\ValueObject\Indent;
use a9f\FractorXml\Configuration\XmlProcessorOption;
use a9f\Typo3Fractor\TYPO3v13\TypoScript\MigratePluginContentElementAndPluginSubtypesFractor;

return FractorConfiguration::configure()
->withOptions([
XmlProcessorOption::INDENT_CHARACTER => Indent::STYLE_TAB,
XmlProcessorOption::INDENT_SIZE => 1,
])
->withRules([MigratePluginContentElementAndPluginSubtypesFractor::class]);
Loading
Loading