Skip to content

Commit

Permalink
[TASK] Upgrade to version 0.8.48 (#1555)
Browse files Browse the repository at this point in the history
Resolves: #1554
  • Loading branch information
sabbelasichon authored Nov 5, 2020
1 parent c669ee5 commit 5fb6947
Show file tree
Hide file tree
Showing 108 changed files with 101 additions and 224 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"php": "^7.2",
"nette/utils": "^3.1",
"phpstan/phpstan": "^0.12.42",
"rector/rector": "0.8.14",
"rector/rector": "0.8.48",
"typo3fluid/fluid": "^2.6"
},
"require-dev": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,6 @@ public function getNodeTypes(): array
return [Assign::class];
}

public function isPropertyForceTemplateParsing(Node $node): bool
{
return (
$this->isObjectType($node, TypoScriptFrontendController::class)
|| $this->isObjectType($node, TemplateService::class)
|| $this->typo3NodeResolver->isPropertyFetchOnAnyPropertyOfGlobals($node,
Typo3NodeResolver::TYPO_SCRIPT_FRONTEND_CONTROLLER
)
|| (property_exists($node,
'var') && $this->typo3NodeResolver->isPropertyFetchOnAnyPropertyOfGlobals($node->var,
Typo3NodeResolver::TYPO_SCRIPT_FRONTEND_CONTROLLER)
)
) &&
(property_exists($node, 'name') && $this->isName($node, 'forceTemplateParsing'));
}

/**
* @param Assign $node
*/
Expand Down Expand Up @@ -154,4 +138,20 @@ public function createCallForSettingProperty(): MethodCall
$contextCall->args = $this->createArgs([self::TYPOSCRIPT, $staticCallAspect]);
return $contextCall;
}

private function isPropertyForceTemplateParsing(Node $node): bool
{
return (
$this->isObjectType($node, TypoScriptFrontendController::class)
|| $this->isObjectType($node, TemplateService::class)
|| $this->typo3NodeResolver->isPropertyFetchOnAnyPropertyOfGlobals($node,
Typo3NodeResolver::TYPO_SCRIPT_FRONTEND_CONTROLLER
)
|| (property_exists($node,
'var') && $this->typo3NodeResolver->isPropertyFetchOnAnyPropertyOfGlobals($node->var,
Typo3NodeResolver::TYPO_SCRIPT_FRONTEND_CONTROLLER)
)
) &&
(property_exists($node, 'name') && $this->isName($node, 'forceTemplateParsing'));
}
}
3 changes: 3 additions & 0 deletions stubs/Extbase/DomainObject/AbstractDomainObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@

class AbstractDomainObject
{
public function __wakeup()
{

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\Core\Database;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

final class DatabaseConnectionToDbalTest extends AbstractRectorTestCase
Expand Down
2 changes: 1 addition & 1 deletion tests/Rector/Migrations/RenameClassMapAliasRectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\Migrations;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\Migrations\RenameClassMapAliasRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\Misc;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\Misc\AddCodeCoverageIgnoreToMethodRectorDefinitionRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\BackendUtilityViewDomainToPageRouter;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v0\BackendUtilityGetViewDomainToPageRouterRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Site\SiteFinder;
use TYPO3\CMS\Backend\Utility\BackendUtility;
$site = GeneralUtility::makeInstance(SiteFinder::class)->getSiteByPageId(1);

$domain1 = $site->getRouter()->generateUri(1);
$rootline = [1, 2, 3];
$site = GeneralUtility::makeInstance(SiteFinder::class)->getSiteByPageId(1, $rootline);
$domain2 = $site->getRouter()->generateUri(1);

?>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\ConfigurationManagerAddControllerConfigurationMethod;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v0\ConfigurationManagerAddControllerConfigurationMethodRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ $GLOBALS['TSFE']->tmpl->forceTemplateParsing = true;

use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Context\Context;

use TYPO3\CMS\Core\Context\TypoScriptAspect;
$myvariable = GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('typoscript', 'forcedTemplateParsing');
$myvariable2 = GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('typoscript', 'forcedTemplateParsing');

GeneralUtility::makeInstance(Context::class)->setAspect('typoscript', GeneralUtility::makeInstance(TypoScriptAspect::class, true));
GeneralUtility::makeInstance(Context::class)->setAspect('typoscript', GeneralUtility::makeInstance(TypoScriptAspect::class, true));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v0\ForceTemplateParsingInTsfeAndTemplateServiceRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\RefactorIdnaEncodeMethodToNativeFunction;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v0\RefactorIdnaEncodeMethodToNativeFunctionRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\RemovePropertyExtensionName;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v0\RemovePropertyExtensionNameRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class ExtbaseBridge
use TYPO3\CMS\Core\Localization\Locales;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;

class ExtbaseBridge
{
public function __construct()
Expand Down Expand Up @@ -84,5 +83,3 @@ class ExtbaseBridge
return $GLOBALS['TSFE'];
}
}

?>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\SetSystemLocaleFromSiteLanguage;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v0\SetSystemLocaleFromSiteLanguageRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\UseMetaDataAspect;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v0\UseMetaDataAspectRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\UseNativePhpHex2binMethod;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v0\UseNativePhpHex2binMethodRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\UseTwoLetterIsoCodeFromSiteLanguage;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v0\UseTwoLetterIsoCodeFromSiteLanguageRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v1\BackendUtilityEditOnClick;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v1\BackendUtilityEditOnClickRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ $url = BackendUtility::editOnClick($params);
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Backend\Routing\UriBuilder;
use TYPO3\CMS\Backend\Utility\BackendUtility;

$pid = 2;
$params = '&edit[pages]['.$pid.']=new&returnNewPageId=1';
$url = GeneralUtility::makeInstance(UriBuilder::class)->buildUriFromRoute('record_edit') . $params . '&returnUrl=' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI'));

?>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v1\RegisterPluginWithVendorName;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v1\RegisterPluginWithVendorNameRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v2\ExcludeServiceKeysToArray;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v2\ExcludeServiceKeysToArrayRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class MyOtherResponse extends Response

use TYPO3\CMS\Extbase\Service\EnvironmentService;
use TYPO3\CMS\Extbase\Mvc\Web\Response;

class MyResponse extends Response
{
/**
Expand All @@ -46,13 +45,10 @@ class MyResponse extends Response
$this->environmentService = $environmentService;
}
}

class MyOtherResponse extends Response
{
public function myMethod()
{

}
}

?>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v2\InjectEnvironmentServiceIfNeededInResponse;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v2\InjectEnvironmentServiceIfNeededInResponseRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v2\MoveApplicationContextToEnvironmentApi;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v2\MoveApplicationContextToEnvironmentApiRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class MyCustomController extends AbstractController
<?php

use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Extbase\Mvc\Controller\AbstractController;

use TYPO3\CMS\Extbase\Mvc\Controller\AbstractController;
class MyCustomController extends ActionController
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v2\UseActionController;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v2\UseActionControllerRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@ $copyright = BackendUtility::TYPO3_copyRightNotice();
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Information\Typo3Information;
use TYPO3\CMS\Backend\Utility\BackendUtility;

$copyright = GeneralUtility::makeInstance(Typo3Information::class)->getCopyrightNotice();

?>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v2\UseTypo3InformationForCopyRightNotice;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v2\UseTypo3InformationForCopyRightNoticeRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v3\SubstituteResourceFactory;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v3\SubstituteResourceFactoryRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ $urlLicense = Typo3Information::URL_LICENSE;
$urlException = Typo3Information::URL_EXCEPTION;
$urlDonate = Typo3Information::URL_DONATE;
$urlOpcache = Typo3Information::URL_OPCACHE;

?>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v3\UseClassTypo3Information;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v3\UseClassTypo3InformationRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Information\Typo3Version;
$typo3Version = GeneralUtility::makeInstance(Typo3Version::class)->getVersion();
$typo3Branch = GeneralUtility::makeInstance(Typo3Version::class)->getBranch();

?>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v3\UseClassTypo3Version;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v3\UseClassTypo3VersionRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v4\RemoveFormatConstantsEmailFinisher;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v0\RemoveFormatConstantsEmailFinisherRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v4\SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v4\SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@ if ($GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern'] != FILE_DENY_PATTERN_DE

use TYPO3\CMS\Core\Resource\Security\FileNameValidator;
use TYPO3\CMS\Core\Utility\GeneralUtility;

$filename = 'somefile.php';
if(!GeneralUtility::makeInstance(FileNameValidator::class)->isValid($filename)) {
}

if ($GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern'] != FileNameValidator::DEFAULT_FILE_DENY_PATTERN)
{
}

?>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Ssch\TYPO3Rector\Tests\Rector\v10\v4\UnifiedFileNameValidatorRector;

use Iterator;
use Rector\Core\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Ssch\TYPO3Rector\Rector\v10\v4\UnifiedFileNameValidatorRector;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down
Loading

0 comments on commit 5fb6947

Please sign in to comment.