Skip to content

Commit

Permalink
[TASK] Move method csvValues (#1578)
Browse files Browse the repository at this point in the history
Resolves: #756
  • Loading branch information
sabbelasichon authored Nov 8, 2020
1 parent 389d1f6 commit 61c7303
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
14 changes: 14 additions & 0 deletions config/v8/typo3-87.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
declare(strict_types=1);

use Rector\Renaming\Rector\Name\RenameClassRector;
use Rector\Renaming\Rector\StaticCall\RenameStaticMethodRector;
use Rector\Renaming\ValueObject\RenameStaticMethod;
use function Rector\SymfonyPhpConfig\inline_value_objects;
use Ssch\TYPO3Rector\Rector\Migrations\RenameClassMapAliasRector;
use Ssch\TYPO3Rector\Rector\v8\v7\BackendUtilityGetRecordRawRector;
use Ssch\TYPO3Rector\Rector\v8\v7\ChangeAttemptsParameterConsoleOutputRector;
Expand All @@ -11,6 +14,8 @@
use Ssch\TYPO3Rector\Rector\v8\v7\TemplateServiceSplitConfArrayRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use TYPO3\CMS\Core\TypoScript\TypoScriptService as CoreTypoScriptService;
use TYPO3\CMS\Core\Utility\CsvUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Service\TypoScriptService;

return static function (ContainerConfigurator $containerConfigurator): void {
Expand Down Expand Up @@ -45,4 +50,13 @@
],
],
]);

$services->set(RenameStaticMethodRector::class)
->call('configure', [
[
RenameStaticMethodRector::OLD_TO_NEW_METHODS_BY_CLASSES => inline_value_objects([
new RenameStaticMethod(GeneralUtility::class, 'csvValues', CsvUtility::class, 'csvValues'),
]),
],
]);
};
17 changes: 17 additions & 0 deletions stubs/Core/Utility/CsvUtility.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);


namespace TYPO3\CMS\Core\Utility;

if (class_exists(CsvUtility::class)) {
return;
}

final class CsvUtility
{
public static function csvValues(array $row, $delim = ',', $quote = '"'): void
{

}
}
5 changes: 5 additions & 0 deletions stubs/Core/Utility/GeneralUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,9 @@ public static function array2xml(array $array, $NSprefix = '', $level = 0, $docT
{
return 'xml';
}

public static function csvValues(array $row, $delim = ',', $quote = '"'): void
{

}
}

0 comments on commit 61c7303

Please sign in to comment.