From 7d5e570a6ebcc3b6919bd51893d51befa800e9d5 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 12 Feb 2021 09:49:34 +0100 Subject: [PATCH] [Testing] Make use of config new Community config-based test case (#1962) * inherit from AbstractCommunityTestCase * show example of upgrade * make use autowired array * use native PostRector ignore * use native Post import rector * make use of configs in tests * fix cs * static fixes * make use of configurable phpstan for rector path * add configs * remove unused DependencyInjection * run Rector on code base to import FQN and add see annotatoins * use tagged rector Closes rectorphp/rector#5478 --- composer.json | 2 +- config/database-connection-to-dbal.php | 11 +- config/services.php | 65 ++---- config/v8/typo3-85.php | 2 + config/v8/typo3-86.php | 2 + docs/all_rectors_overview.md | 6 +- docs/configuration_and_processing.md | 8 +- phpstan.neon | 4 - rector.php | 8 +- src/Configuration/Typo3Option.php | 5 - .../PHPStanServicesFactory.php | 166 ------------- src/Helper/DependencyInjection.php | 26 --- src/PostRector/NameImportingPostRector.php | 219 ------------------ .../Migrations/RenameClassMapAliasRector.php | 3 + ...angeDefaultCachingFrameworkNamesRector.php | 6 +- ...eParsingInTsfeAndTemplateServiceRector.php | 1 + .../v10/v1/SendNotifyEmailToMailApiRector.php | 2 +- ...ityMethodsWithNativePhpFunctionsRector.php | 1 + .../v10/v4/UnifiedFileNameValidatorRector.php | 1 + ...tionsMustReturnResponseInterfaceRector.php | 16 +- .../v9/v0/DatabaseConnectionToDbalRector.php | 17 +- ...ingBuiltSqlExpectedSchemaServiceRector.php | 5 +- .../Database/DatabaseConnectionToDbalTest.php | 8 +- .../Fixture/exec_insert_query.php.inc | 6 +- .../Fixture/exec_truncate_query.php.inc | 6 +- ...ConstructorToHardRequirementRectorTest.php | 9 +- .../config/configured_rule.php | 12 + ...lrDocumentToSolariumDocumentRectorTest.php | 8 +- .../ConvertTypo3ConfVarsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RenameClassMapAliasRectorTest.php | 8 +- .../AutoImportNamesParameterTest.php | 12 +- .../SkipAutoImportNamesParameterTest.php | 12 +- .../config/autoimport_rename.php | 3 - .../config/autoimport_with_skip.php | 7 +- ...ngFrameworkToTYPO3TestingFrameworkTest.php | 8 +- ...ityGetViewDomainToPageRouterRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...DefaultCachingFrameworkNamesRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ontrollerConfigurationMethodRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...singInTsfeAndTemplateServiceRectorTest.php | 9 +- ...EncodeMethodToNativeFunctionRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RemovePropertyExtensionNameRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RemoveSeliconFieldPathRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...eTcaOptionSetToDefaultOnCopyRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...SystemLocaleFromSiteLanguageRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...esInExtbasePluginsAndModulesRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../UseMetaDataAspectRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../UseNativePhpHex2binMethodRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...etterIsoCodeFromSiteLanguageRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../Rector/v10/v0/config/configured_rule.php | 13 ++ .../BackendUtilityEditOnClickRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ctorInternalPropertiesOfTSFERectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...RegisterPluginWithVendorNameRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../SendNotifyEmailToMailApiRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../ExcludeServiceKeysToArrayRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...entServiceIfNeededInResponseRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ationContextToEnvironmentApiRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../UseActionControllerRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...nformationForCopyRightNoticeRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...cludeOnTransOrigPointerFieldRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ldListInsideInterfaceSectionRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../SubstituteResourceFactoryRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../UseClassTypo3InformationRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../UseClassTypo3VersionRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...c_temp => remove_format_constants.php.inc} | 0 ...FormatConstantsEmailFinisherRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ethodsWithNativePhpFunctionsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../UnifiedFileNameValidatorRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../UseFileGetContentsForGetUrlRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...pectInsteadOfGlobalsExecTimeRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...sMustReturnResponseInterfaceRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...sponseInsteadOfForwardMethodRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ClickMenuOnIconTagParametersRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RemoveAddQueryStringMethodRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...eConstantsModeAndRequestTypeRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../UniqueListFromStringUtilityRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...oveDivider2TabsConfigurationRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RemoveMethodCallConnectDbRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RemoveMethodCallLoadTcaRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ServiceToTypeHandlingUtilityRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../GetTemporaryImageWithTextRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../DropAdditionalPaletteRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ntiatePageRendererExplicitlyRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...dLLFileToLocalizationFactoryRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...FilesFromRemovedCmsExtensionRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RemoveIconsInOptionTagsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../UseExtPrefixForTcaIconFileRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../AddRenderTypeToSelectFieldRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...orWizardToRenderTypeT3editorRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...conOptionForRenderTypeSelectRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RenamePiListBrowserResultsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../WrapClickMenuOnIconRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...MethodCallsForStandaloneViewRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ed_marker_methods_from_html_parser.php.inc | 20 +- ...dMarkerMethodsFromHtmlParserRectorTest.php | 9 +- ...veRteHtmlParserEvalWriteFileRectorTest.php | 9 +- .../v0/Core/Html/config/configured_rule.php | 13 ++ ...ameRemoveDeprecatedArgumentsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../GetPreferredClientLanguageRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...lutePathToGetFileAbsFileNameRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RandomMethodsToRandomClassRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...odsFromContentObjectRendererRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...vedMethodsFromGeneralUtilityRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...veCharsetConverterParametersRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...angCsConvObjAndParserFactoryRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...vePropertyUserAuthenticationRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RemoveWakeupCallFromEntityRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...uireMethodsToNativeFunctionsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../v8/v0/RteHtmlParser/RteHtmlParserTest.php | 9 +- .../RteHtmlParser/config/configured_rule.php | 13 ++ ...imeTrackerGlobalsToSingletonRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ckerInsteadOfNullTimeTrackerRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../Array2XmlCsToArray2XmlRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...eneralUtilityToUpperAndLowerRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RefactorDbConstantsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...VariousGeneralUtilityMethodsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ndControllerCharsetConverterRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...lCharsDirectlyForTranslationRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RefactorMethodFileContentRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RefactorQueryViewTableWrapRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RemovedTcaSelectTreeOptionsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ferencesFunctionalityRemovedRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RemoveOptionShowIfRteRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../SubstituteOldWizardIconsRectorTest.php | 8 +- .../config/configured_rule.php | 2 + ...onverterToMultiByteFunctionsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ntObjectRendererFileResourceRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ilesFromLocallangToResourcesRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...eOptionVersioningFollowPagesRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...eSupportForTransForeignTableRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../AddTypeToColumnConfigRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...yUtilityInArrayToFuncInArrayRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../MigrateOptionsOfTypeGroupRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../MigrateSelectShowIconTableRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...teOptionFromControlToColumnsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../v6/RefactorTCA/RefactorTCARectorTest.php | 9 +- .../v6/RefactorTCA/config/configured_rule.php | 13 ++ .../RemoveL10nModeNoCopyRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...efaultExtrasToEnableRichtextRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../BackendUtilityGetRecordRawRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...RecordsByFieldToQueryBuilderRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...temptsParameterConsoleOutputRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../DataHandlerRmCommaRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ousMethodsAndMethodArgumentsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...reignTypesToOverrideChildTcaRectorTest.php | 11 +- .../config/configured_rule.php | 13 ++ ...efactorArrayBrowserWrapValueRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...nsTempPathAndCreateTemSubDirRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RefactorPrintContentMethodsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...odsFromContentObjectRendererRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...igMaxFromInputDateTimeFieldsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...LocalizationModeKeepIfNeededRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...emplateServiceSplitConfArrayRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...meworkInsteadGetAndStoreHashRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../CheckForExtensionInfoRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../CheckForExtensionVersionRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../FindByPidsAndAuthorIdRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../GeneratePageTitleRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../IgnoreValidationAnnotationRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../InjectAnnotationRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../MetaTagManagementRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...sToInitializeArgumentsMethodRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ckendUtilityGetPagesTSconfigRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RefactorDeprecationLogRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...omExtensionManagementUtilityRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RemoveMethodInitTCARectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ChildrenAtParentLocalizationRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...mSimpleDataHandlerControllerRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...umentGeneralUtilityMkdirDeepRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../ReplaceAnnotationRectorTest.php | 8 +- .../config/configured_rule.php | 3 +- ...eplaceExtKeyWithExtensionKeyRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ubstituteCacheWrapperMethodsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...tituteConstantParsetimeStartRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...UseExtensionConfigurationApiRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...UseLogMethodInsteadOfNewLog2RectorTest.php | 9 +- .../UseLogMethod/config/configured_rule.php | 13 ++ ...UseNewComponentIdForPageTreeRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...gContextGetControllerContextRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...lUtilityGetUrlRequestHeadersRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...PageNotFoundAndErrorHandlingRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...hodCallsToEnvironmentApiCallRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...dUserAuthenticationSimplelogRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../BackendUtilityGetModuleUrlRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...pyMethodGetPidForModTSconfigRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...nguageFilesFromExtensionLangRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../PhpOptionsUtilityRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...gOfBackendUserAuthenticationRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...factorTsConfigRelatedMethodsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../LocalizationRepositoryTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...eShortcutDirectlyFromSysPageRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../ValidateAnnotationRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...BackendUtilityShortcutExistsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ableFieldsFromPageRepositoryRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...onstantsToEnvironmentApiCallRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ocumentTemplateAddStyleSheetRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ncatenateMethodsPageRendererRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...eUrl2ArrayFromGeneralUtilityRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...InitMethodGraphicalFunctionsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...oveInitMethodTemplateServiceRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...RemoveInitTemplateMethodCallRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...mEnvironmentBuilderConstantsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...tFileNameToFilePathSanitizerRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...leInsteadOfLoadJavascriptLibRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...teadReflectionServiceMethodsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../UseContextApi/UseContextApiRectorTest.php | 9 +- .../UseContextApi/config/configured_rule.php | 13 ++ ...tApiForVersioningWorkspaceIdRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...MenuInsteadOfGetFirstWebPageRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...ectForTsfeLanguagePropertiesRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...tyInsteadOfGetRootlineMethodRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...teadOfHasInstalledExtensionsRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...uiltSqlExpectedSchemaServiceRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RefactorProcessOutputRectorTest.php | 9 +- .../ProcessOutput/config/configured_rule.php | 13 ++ ...TypoScriptFrontendControllerRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RemoveFlushCachesRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...InitMethodFromPageRepositoryRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ .../RemoveInternalAnnotationRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ ...PackageManagerActivePackagesRectorTest.php | 9 +- .../config/configured_rule.php | 13 ++ utils/generator/config/config.php | 3 +- utils/phpstan/config/extension.neon | 1 + 383 files changed, 3046 insertions(+), 1425 deletions(-) delete mode 100644 src/DependencyInjection/PHPStanServicesFactory.php delete mode 100644 src/Helper/DependencyInjection.php delete mode 100644 src/PostRector/NameImportingPostRector.php create mode 100644 tests/Rector/Experimental/OptionalConstructorToHardRequirement/config/configured_rule.php create mode 100644 tests/Rector/General/ConvertTypo3ConfVars/config/configured_rule.php create mode 100644 tests/Rector/v10/v0/BackendUtilityViewDomainToPageRouter/config/configured_rule.php create mode 100644 tests/Rector/v10/v0/ChangeDefaultCachingFrameworkNames/config/configured_rule.php create mode 100644 tests/Rector/v10/v0/ConfigurationManagerAddControllerConfigurationMethod/config/configured_rule.php create mode 100644 tests/Rector/v10/v0/RefactorIdnaEncodeMethodToNativeFunction/config/configured_rule.php create mode 100644 tests/Rector/v10/v0/RemovePropertyExtensionName/config/configured_rule.php create mode 100644 tests/Rector/v10/v0/RemoveSeliconFieldPath/config/configured_rule.php create mode 100644 tests/Rector/v10/v0/RemoveTcaOptionSetToDefaultOnCopy/config/configured_rule.php create mode 100644 tests/Rector/v10/v0/SetSystemLocaleFromSiteLanguage/config/configured_rule.php create mode 100644 tests/Rector/v10/v0/UseControllerClassesInExtbasePluginsAndModules/config/configured_rule.php create mode 100644 tests/Rector/v10/v0/UseMetaDataAspect/config/configured_rule.php create mode 100644 tests/Rector/v10/v0/UseNativePhpHex2binMethod/config/configured_rule.php create mode 100644 tests/Rector/v10/v0/UseTwoLetterIsoCodeFromSiteLanguage/config/configured_rule.php create mode 100644 tests/Rector/v10/v0/config/configured_rule.php create mode 100644 tests/Rector/v10/v1/BackendUtilityEditOnClick/config/configured_rule.php create mode 100644 tests/Rector/v10/v1/RefactorInternalPropertiesOfTSFE/config/configured_rule.php create mode 100644 tests/Rector/v10/v1/RegisterPluginWithVendorName/config/configured_rule.php create mode 100644 tests/Rector/v10/v1/SendNotifyEmailToMailApi/config/configured_rule.php create mode 100644 tests/Rector/v10/v2/ExcludeServiceKeysToArray/config/configured_rule.php create mode 100644 tests/Rector/v10/v2/InjectEnvironmentServiceIfNeededInResponse/config/configured_rule.php create mode 100644 tests/Rector/v10/v2/MoveApplicationContextToEnvironmentApi/config/configured_rule.php create mode 100644 tests/Rector/v10/v2/UseActionController/config/configured_rule.php create mode 100644 tests/Rector/v10/v2/UseTypo3InformationForCopyRightNotice/config/configured_rule.php create mode 100644 tests/Rector/v10/v3/RemoveExcludeOnTransOrigPointerField/config/configured_rule.php create mode 100644 tests/Rector/v10/v3/RemoveShowRecordFieldListInsideInterfaceSection/config/configured_rule.php create mode 100644 tests/Rector/v10/v3/SubstituteResourceFactory/config/configured_rule.php create mode 100644 tests/Rector/v10/v3/UseClassTypo3Information/config/configured_rule.php create mode 100644 tests/Rector/v10/v3/UseClassTypo3Version/config/configured_rule.php rename tests/Rector/v10/v4/RemoveFormatConstantsEmailFinisher/Fixture/{remove_format_constants.php.inc_temp => remove_format_constants.php.inc} (100%) create mode 100644 tests/Rector/v10/v4/RemoveFormatConstantsEmailFinisher/config/configured_rule.php create mode 100644 tests/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector/config/configured_rule.php create mode 100644 tests/Rector/v10/v4/UnifiedFileNameValidatorRector/config/configured_rule.php create mode 100644 tests/Rector/v10/v4/UseFileGetContentsForGetUrl/config/configured_rule.php create mode 100644 tests/Rector/v11/v0/DateTimeAspectInsteadOfGlobalsExecTime/config/configured_rule.php create mode 100644 tests/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterface/config/configured_rule.php create mode 100644 tests/Rector/v11/v0/ForwardResponseInsteadOfForwardMethod/config/configured_rule.php create mode 100644 tests/Rector/v11/v0/GetClickMenuOnIconTagParameters/config/configured_rule.php create mode 100644 tests/Rector/v11/v0/RemoveAddQueryStringMethod/config/configured_rule.php create mode 100644 tests/Rector/v11/v0/SubstituteConstantsModeAndRequestType/config/configured_rule.php create mode 100644 tests/Rector/v11/v0/UniqueListFromStringUtility/config/configured_rule.php create mode 100644 tests/Rector/v7/v0/RemoveDivider2TabsConfiguration/config/configured_rule.php create mode 100644 tests/Rector/v7/v0/RemoveMethodCallConnectDb/config/configured_rule.php create mode 100644 tests/Rector/v7/v0/RemoveMethodCallLoadTca/config/configured_rule.php create mode 100644 tests/Rector/v7/v0/TypeHandlingServiceToTypeHandlingUtility/config/configured_rule.php create mode 100644 tests/Rector/v7/v1/GetTemporaryImageWithText/config/configured_rule.php create mode 100644 tests/Rector/v7/v4/DropAdditionalPalette/config/configured_rule.php create mode 100644 tests/Rector/v7/v4/InstantiatePageRendererExplicitly/config/configured_rule.php create mode 100644 tests/Rector/v7/v4/MethodReadLLFileToLocalizationFactory/config/configured_rule.php create mode 100644 tests/Rector/v7/v4/MoveLanguageFilesFromRemovedCmsExtension/config/configured_rule.php create mode 100644 tests/Rector/v7/v5/RemoveIconsInOptionTags/config/configured_rule.php create mode 100644 tests/Rector/v7/v5/UseExtPrefixForTcaIconFile/config/configured_rule.php create mode 100644 tests/Rector/v7/v6/AddRenderTypeToSelectField/config/configured_rule.php create mode 100644 tests/Rector/v7/v6/MigrateT3editorWizardToRenderTypeT3editor/config/configured_rule.php create mode 100644 tests/Rector/v7/v6/RemoveIconOptionForRenderTypeSelect/config/configured_rule.php create mode 100644 tests/Rector/v7/v6/RenamePiListBrowserResults/config/configured_rule.php create mode 100644 tests/Rector/v7/v6/WrapClickMenuOnIcon/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/ChangeMethodCallsForStandaloneView/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/Core/Html/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/GetFileAbsFileNameRemoveDeprecatedArguments/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/GetPreferredClientLanguage/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/PrependAbsolutePathToGetFileAbsFileName/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/RandomMethodsToRandomClass/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/RefactorRemovedMethodsFromContentObjectRenderer/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/RefactorRemovedMethodsFromGeneralUtility/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/RemoveCharsetConverterParameters/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/RemoveLangCsConvObjAndParserFactory/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/RemovePropertyUserAuthentication/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/RemoveWakeupCallFromEntity/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/RequireMethodsToNativeFunctions/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/RteHtmlParser/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/TimeTrackerGlobalsToSingleton/config/configured_rule.php create mode 100644 tests/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTracker/config/configured_rule.php create mode 100644 tests/Rector/v8/v1/Array2XmlCsToArray2Xml/config/configured_rule.php create mode 100644 tests/Rector/v8/v1/GeneralUtilityToUpperAndLower/config/configured_rule.php create mode 100644 tests/Rector/v8/v1/RefactorDbConstants/config/configured_rule.php create mode 100644 tests/Rector/v8/v1/RefactorVariousGeneralUtilityMethods/config/configured_rule.php create mode 100644 tests/Rector/v8/v1/TypoScriptFrontendControllerCharsetConverter/config/configured_rule.php create mode 100644 tests/Rector/v8/v2/UseHtmlSpecialCharsDirectlyForTranslation/config/configured_rule.php create mode 100644 tests/Rector/v8/v3/RefactorMethodFileContent/config/configured_rule.php create mode 100644 tests/Rector/v8/v3/RefactorQueryViewTableWrap/config/configured_rule.php create mode 100644 tests/Rector/v8/v3/RemovedTcaSelectTreeOptions/config/configured_rule.php create mode 100644 tests/Rector/v8/v3/SoftReferencesFunctionalityRemoved/config/configured_rule.php create mode 100644 tests/Rector/v8/v4/RemoveOptionShowIfRte/config/configured_rule.php create mode 100644 tests/Rector/v8/v5/CharsetConverterToMultiByteFunctions/config/configured_rule.php create mode 100644 tests/Rector/v8/v5/ContentObjectRendererFileResource/config/configured_rule.php create mode 100644 tests/Rector/v8/v5/MoveLanguageFilesFromLocallangToResources/config/configured_rule.php create mode 100644 tests/Rector/v8/v5/RemoveOptionVersioningFollowPages/config/configured_rule.php create mode 100644 tests/Rector/v8/v5/RemoveSupportForTransForeignTable/config/configured_rule.php create mode 100644 tests/Rector/v8/v6/AddTypeToColumnConfig/config/configured_rule.php create mode 100644 tests/Rector/v8/v6/ArrayUtilityInArrayToFuncInArray/config/configured_rule.php create mode 100644 tests/Rector/v8/v6/MigrateOptionsOfTypeGroup/config/configured_rule.php create mode 100644 tests/Rector/v8/v6/MigrateSelectShowIconTable/config/configured_rule.php create mode 100644 tests/Rector/v8/v6/MoveRequestUpdateOptionFromControlToColumns/config/configured_rule.php create mode 100644 tests/Rector/v8/v6/RefactorTCA/config/configured_rule.php create mode 100644 tests/Rector/v8/v6/RemoveL10nModeNoCopy/config/configured_rule.php create mode 100644 tests/Rector/v8/v6/RichtextFromDefaultExtrasToEnableRichtext/config/configured_rule.php create mode 100644 tests/Rector/v8/v7/BackendUtilityGetRecordRaw/config/configured_rule.php create mode 100644 tests/Rector/v8/v7/BackendUtilityGetRecordsByFieldToQueryBuilder/config/configured_rule.php create mode 100644 tests/Rector/v8/v7/ChangeAttemptsParameterConsoleOutput/config/configured_rule.php create mode 100644 tests/Rector/v8/v7/DataHandlerRmComma/config/configured_rule.php create mode 100644 tests/Rector/v8/v7/DataHandlerVariousMethodsAndMethodArguments/config/configured_rule.php create mode 100644 tests/Rector/v8/v7/MoveForeignTypesToOverrideChildTca/config/configured_rule.php create mode 100644 tests/Rector/v8/v7/RefactorArrayBrowserWrapValue/config/configured_rule.php create mode 100644 tests/Rector/v8/v7/RefactorGraphicalFunctionsTempPathAndCreateTemSubDir/config/configured_rule.php create mode 100644 tests/Rector/v8/v7/RefactorPrintContentMethods/config/configured_rule.php create mode 100644 tests/Rector/v8/v7/RefactorRemovedMarkerMethodsFromContentObjectRenderer/config/configured_rule.php create mode 100644 tests/Rector/v8/v7/RemoveConfigMaxFromInputDateTimeFields/config/configured_rule.php create mode 100644 tests/Rector/v8/v7/RemoveLocalizationModeKeepIfNeeded/config/configured_rule.php create mode 100644 tests/Rector/v8/v7/TemplateServiceSplitConfArray/config/configured_rule.php create mode 100644 tests/Rector/v8/v7/UseCachingFrameworkInsteadGetAndStoreHash/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/CheckForExtensionInfo/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/CheckForExtensionVersion/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/FindByPidsAndAuthorId/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/GeneratePageTitle/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/IgnoreValidation/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/InjectAnnotation/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/MetaTagManagement/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/MoveRenderArgumentsToInitializeArgumentsMethod/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/RefactorBackendUtilityGetPagesTSconfig/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/RefactorDeprecationLog/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/RefactorMethodsFromExtensionManagementUtility/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/RemoveMethodInitTCA/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/RemoveOptionLocalizeChildrenAtParentLocalization/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/RemovePropertiesFromSimpleDataHandlerController/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/RemoveSecondArgumentGeneralUtilityMkdirDeep/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/ReplaceExtKeyWithExtensionKey/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/SubstituteCacheMethods/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/SubstituteConstantParsetimeStart/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/UseExtensionConfigurationApi/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/UseLogMethod/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/UseNewComponentIdForPageTree/config/configured_rule.php create mode 100644 tests/Rector/v9/v0/UseRenderingContextGetControllerContext/config/configured_rule.php create mode 100644 tests/Rector/v9/v2/GeneralUtilityGetUrlRequestHeaders/config/configured_rule.php create mode 100644 tests/Rector/v9/v2/PageNotFoundAndErrorHandling/config/configured_rule.php create mode 100644 tests/Rector/v9/v2/RenameMethodCallToEnvironmentMethodCall/config/configured_rule.php create mode 100644 tests/Rector/v9/v3/BackendUserAuthenticationSimplelog/config/configured_rule.php create mode 100644 tests/Rector/v9/v3/BackendUtilityGetModuleUrl/config/configured_rule.php create mode 100644 tests/Rector/v9/v3/CopyMethodGetPidForModTSconfig/config/configured_rule.php create mode 100644 tests/Rector/v9/v3/MoveLanguageFilesFromExtensionLang/config/configured_rule.php create mode 100644 tests/Rector/v9/v3/PhpOptionsUtility/config/configured_rule.php create mode 100644 tests/Rector/v9/v3/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthentication/config/configured_rule.php create mode 100644 tests/Rector/v9/v3/RefactorTsConfigRelatedMethods/config/configured_rule.php create mode 100644 tests/Rector/v9/v3/RemoveColPosParameter/config/configured_rule.php create mode 100644 tests/Rector/v9/v3/UseMethodGetPageShortcutDirectlyFromSysPage/config/configured_rule.php create mode 100644 tests/Rector/v9/v3/ValidateAnnotation/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/BackendUtilityShortcutExists/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/CallEnableFieldsFromPageRepository/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/ConstantToEnvironmentCall/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/DocumentTemplateAddStyleSheet/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/RefactorDeprecatedConcatenateMethodsPageRenderer/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/RefactorExplodeUrl2ArrayFromGeneralUtility/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/RemoveInitMethodGraphicalFunctions/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/RemoveInitMethodTemplateService/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/RemoveInitTemplateMethodCall/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/SystemEnvironmentBuilderConstants/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/TemplateGetFileNameToFilePathSanitizer/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/UseAddJsFileInsteadOfLoadJavascriptLib/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/UseClassSchemaInsteadReflectionServiceMethods/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/UseContextApi/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/UseContextApiForVersioningWorkspaceId/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/UseGetMenuInsteadOfGetFirstWebPage/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/UseLanguageAspectForTsfeLanguageProperties/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/UseRootlineUtilityInsteadOfGetRootlineMethod/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensions/config/configured_rule.php create mode 100644 tests/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaService/config/configured_rule.php create mode 100644 tests/Rector/v9/v5/ProcessOutput/config/configured_rule.php create mode 100644 tests/Rector/v9/v5/RefactorPropertiesOfTypoScriptFrontendController/config/configured_rule.php create mode 100644 tests/Rector/v9/v5/RemoveFlushCaches/config/configured_rule.php create mode 100644 tests/Rector/v9/v5/RemoveInitMethodFromPageRepository/config/configured_rule.php create mode 100644 tests/Rector/v9/v5/RemoveInternalAnnotation/config/configured_rule.php create mode 100644 tests/Rector/v9/v5/UsePackageManagerActivePackages/config/configured_rule.php diff --git a/composer.json b/composer.json index c9b8b60c1..fc49697e1 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "require": { "php": "^7.3|^8.0", "phpstan/phpstan": "^0.12.69, <0.12.70", - "rector/rector": "0.9.20" + "rector/rector": "^0.9.23" }, "require-dev": { "captainhook/captainhook": "^5.4", diff --git a/config/database-connection-to-dbal.php b/config/database-connection-to-dbal.php index c7fc07251..624c9d0f8 100644 --- a/config/database-connection-to-dbal.php +++ b/config/database-connection-to-dbal.php @@ -2,19 +2,12 @@ declare(strict_types=1); -use Ssch\TYPO3Rector\Helper\Typo3NodeResolver; use Ssch\TYPO3Rector\Rector\v9\v0\DatabaseConnectionToDbalRector; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; -use function Symfony\Component\DependencyInjection\Loader\Configurator\tagged_iterator; return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->import(__DIR__ . '/services.php'); - $services = $containerConfigurator->services(); - $services->set(DatabaseConnectionToDbalRector::class)->args( - [ - Ssch\TYPO3Rector\Helper\DependencyInjection::service(Typo3NodeResolver::class), - tagged_iterator('database.dbal.refactoring'), - ] - ); + $services = $containerConfigurator->services(); + $services->set(DatabaseConnectionToDbalRector::class); }; diff --git a/config/services.php b/config/services.php index 32bd6fb70..dcee348e1 100644 --- a/config/services.php +++ b/config/services.php @@ -2,70 +2,37 @@ declare(strict_types=1); -use PHPStan\Analyser\NodeScopeResolver; -use PHPStan\Analyser\ScopeFactory; -use PHPStan\PhpDoc\TypeNodeResolver; -use PHPStan\Reflection\ReflectionProvider; use Rector\ChangesReporting\Output\ConsoleOutputFormatter; +use Rector\Core\Configuration\Option; use Ssch\TYPO3Rector\Console\Application; use Ssch\TYPO3Rector\Console\Output\DecoratedConsoleOutputFormatter; -use Ssch\TYPO3Rector\DependencyInjection\PHPStanServicesFactory; -use Ssch\TYPO3Rector\Helper\Database\Refactorings\DatabaseConnectionToDbalRefactoring; use Symfony\Component\Console\Application as SymfonyApplication; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->import(__DIR__ . '/../utils/**/config/config.php', null, true); + $parameters = $containerConfigurator->parameters(); + $parameters->set(Option::AUTO_IMPORT_NAMES, true); + $parameters->set(Option::PHPSTAN_FOR_RECTOR_PATH, __DIR__ . '/../phpstan.neon'); + $services = $containerConfigurator->services(); $services->defaults() ->public() ->autowire(); - $services - ->instanceof(DatabaseConnectionToDbalRefactoring::class) - ->tag('database.dbal.refactoring') - ->share(false); - $services->alias(SymfonyApplication::class, Application::class); - $services->set(ReflectionProvider::class) - ->factory( - [\Ssch\TYPO3Rector\Helper\DependencyInjection::service( - PHPStanServicesFactory::class - ), 'createReflectionProvider'] - ); - - $services->set(NodeScopeResolver::class) - ->factory( - [\Ssch\TYPO3Rector\Helper\DependencyInjection::service( - PHPStanServicesFactory::class - ), 'createNodeScopeResolver'] - ); - - $services->set(ScopeFactory::class) - ->factory( - [\Ssch\TYPO3Rector\Helper\DependencyInjection::service(PHPStanServicesFactory::class), 'createScopeFactory'] - ); - - $services->set(TypeNodeResolver::class) - ->factory( - [\Ssch\TYPO3Rector\Helper\DependencyInjection::service( - PHPStanServicesFactory::class - ), 'createTypeNodeResolver'] - ); - $services->load('Ssch\\TYPO3Rector\\', __DIR__ . '/../src') - ->exclude( - [ - __DIR__ . '/../src/Rector', - __DIR__ . '/../src/Set', - __DIR__ . '/../src/Bootstrap', - __DIR__ . '/../src/HttpKernel', - __DIR__ . '/../src/Compiler', - __DIR__ . '/../src/ValueObject', - ] - ); - - $services->set(DecoratedConsoleOutputFormatter::class)->decorate(ConsoleOutputFormatter::class); + ->exclude([ + __DIR__ . '/../src/Rector', + __DIR__ . '/../src/Set', + __DIR__ . '/../src/Bootstrap', + __DIR__ . '/../src/HttpKernel', + __DIR__ . '/../src/Compiler', + __DIR__ . '/../src/ValueObject', + ]); + + $services->set(DecoratedConsoleOutputFormatter::class) + ->decorate(ConsoleOutputFormatter::class); }; diff --git a/config/v8/typo3-85.php b/config/v8/typo3-85.php index 4284411f3..a8900fd77 100644 --- a/config/v8/typo3-85.php +++ b/config/v8/typo3-85.php @@ -15,6 +15,8 @@ use TYPO3\CMS\Extbase\Utility\ArrayUtility; return static function (ContainerConfigurator $containerConfigurator): void { + $containerConfigurator->import(__DIR__ . '/../../../../../../config/services.php'); + $services = $containerConfigurator->services(); $services->set(RenameMethodRector::class)->call('configure', [[ RenameMethodRector::METHOD_CALL_RENAMES => ValueObjectInliner::inline([ diff --git a/config/v8/typo3-86.php b/config/v8/typo3-86.php index 86c4b5abc..a69ed7558 100644 --- a/config/v8/typo3-86.php +++ b/config/v8/typo3-86.php @@ -6,6 +6,8 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; return static function (ContainerConfigurator $containerConfigurator): void { + $containerConfigurator->import(__DIR__ . '/../../../../../../config/services.php'); + $services = $containerConfigurator->services(); $services->set(RenameNamespaceRector::class)->call('configure', [ RenameNamespaceRector::OLD_TO_NEW_NAMESPACES => [ diff --git a/docs/all_rectors_overview.md b/docs/all_rectors_overview.md index 94ee82899..34f8c086c 100644 --- a/docs/all_rectors_overview.md +++ b/docs/all_rectors_overview.md @@ -2340,8 +2340,9 @@ use Ssch\TYPO3Rector\Rector\Migrations\RenameClassMapAliasRector; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; return static function (ContainerConfigurator $containerConfigurator): void { - $services = $containerConfigurator->services(); + $containerConfigurator->import(__DIR__ . '/../../../../../../config/services.php'); + $services = $containerConfigurator->services(); $services->set(RenameClassMapAliasRector::class) ->call('configure', [[RenameClassMapAliasRector::CLASS_ALIAS_MAPS => 'config/Migrations/Code/ClassAliasMap.php']]); }; @@ -2411,8 +2412,9 @@ use Ssch\TYPO3Rector\Rector\v9\v0\ReplaceAnnotationRector; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; return static function (ContainerConfigurator $containerConfigurator): void { - $services = $containerConfigurator->services(); + $containerConfigurator->import(__DIR__ . '/../../../../../../config/services.php'); + $services = $containerConfigurator->services(); $services->set(ReplaceAnnotationRector::class) ->call('configure', [[ReplaceAnnotationRector::OLD_TO_NEW_ANNOTATIONS => ['transient' => 'TYPO3\CMS\Extbase\Annotation\ORM\Transient']]]); }; diff --git a/docs/configuration_and_processing.md b/docs/configuration_and_processing.md index 9519d94a8..c160ebb63 100644 --- a/docs/configuration_and_processing.md +++ b/docs/configuration_and_processing.md @@ -23,8 +23,9 @@ Let´s say you want to migrate the TCA from a TYPO3 7 project to a TYPO3 9 proje declare(strict_types=1); use Rector\Core\Configuration\Option; +use Rector\Core\ValueObject\PhpVersion; +use Rector\PostRector\Rector\NameImportingPostRector; use Ssch\TYPO3Rector\Configuration\Typo3Option; -use Ssch\TYPO3Rector\PostRector\NameImportingPostRector; use Ssch\TYPO3Rector\Set\Typo3SetList; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; @@ -34,11 +35,10 @@ return static function (ContainerConfigurator $containerConfigurator): void { Typo3SetList::TCA_76, Typo3SetList::TCA_87, Typo3SetList::TCA_95, - ] - ); + ]); // FQN classes are not imported by default. If you don't do it manually after every Rector run, enable it by: - $parameters->set(Typo3Option::AUTO_IMPORT_NAMES, true); + $parameters->set(Option::AUTO_IMPORT_NAMES, true); // this will not import root namespace classes, like \DateTime or \Exception $parameters->set(Option::IMPORT_SHORT_CLASSES, false); diff --git a/phpstan.neon b/phpstan.neon index e10dc073b..bf18f5c66 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -20,8 +20,4 @@ parameters: checkGenericClassInNonGenericObjectType: false ignoreErrors: - - '#Function Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ref not found#' - - '#Function Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\service not found#' - - '#Used function Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ref not found#' - - '#Used function Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\service not found#' - '#Parameter \#2 \$stmt of method Rector\\Core\\NodeManipulator\\ClassInsertManipulator\:\:addAsFirstMethod\(\) expects PhpParser\\Node\\Stmt\\ClassConst\|PhpParser\\Node\\Stmt\\ClassMethod\|PhpParser\\Node\\Stmt\\Property, PhpParser\\Node\\Stmt\\Nop given#' diff --git a/rector.php b/rector.php index 5e359f2e8..62a1a2c83 100644 --- a/rector.php +++ b/rector.php @@ -4,6 +4,7 @@ use Rector\Core\Configuration\Option; use Rector\Core\ValueObject\PhpVersion; +use Rector\PHPUnit\Rector\Class_\AddSeeTestAnnotationRector; use Rector\Set\ValueObject\SetList; use Ssch\TYPO3Rector\Rules\Rector\Misc\AddCodeCoverageIgnoreToMethodRectorDefinitionRector; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; @@ -13,16 +14,19 @@ $parameters = $containerConfigurator->parameters(); $parameters->set(Option::AUTO_IMPORT_NAMES, true); + $parameters->set(Option::PHPSTAN_FOR_RECTOR_PATH, __DIR__ . '/phpstan.neon'); + $parameters->set(Option::SETS, [ SetList::PRIVATIZATION, SetList::DEAD_CODE, SetList::CODING_STYLE, SetList::CODE_QUALITY, - ] - ); + ]); + $services = $containerConfigurator->services(); $services->set(AddCodeCoverageIgnoreToMethodRectorDefinitionRector::class); + $services->set(AddSeeTestAnnotationRector::class); $parameters->set(Option::PATHS, [__DIR__ . '/src', __DIR__ . '/tests']); $parameters->set(Option::SKIP, [__DIR__ . '/src/Bootstrap', __DIR__ . '/src/Set', __DIR__ . '/src/Compiler']); diff --git a/src/Configuration/Typo3Option.php b/src/Configuration/Typo3Option.php index 87c14c82b..127a9d062 100644 --- a/src/Configuration/Typo3Option.php +++ b/src/Configuration/Typo3Option.php @@ -6,11 +6,6 @@ final class Typo3Option { - /** - * @var string - */ - public const AUTO_IMPORT_NAMES = 'typo3_auto_import_names'; - /** * @var string */ diff --git a/src/DependencyInjection/PHPStanServicesFactory.php b/src/DependencyInjection/PHPStanServicesFactory.php deleted file mode 100644 index f826803dd..000000000 --- a/src/DependencyInjection/PHPStanServicesFactory.php +++ /dev/null @@ -1,166 +0,0 @@ -appendPhpstanPHPUnitExtensionIfExists( - $currentWorkingDirectory, - $additionalConfigFiles - ); - - $temporaryPHPStanNeon = null; - - $currentProjectConfigFile = $currentWorkingDirectory . '/phpstan.neon'; - - if (file_exists($currentProjectConfigFile)) { - $phpstanNeonContent = $smartFileSystem->readFile($currentProjectConfigFile); - - // bleeding edge clean out, see https://github.com/rectorphp/rector/issues/2431 - if (Strings::match($phpstanNeonContent, self::BLEEDING_EDGE_REGEX)) { - // Note: We need a unique file per process if rector runs in parallel - $pid = getmypid(); - $temporaryPHPStanNeon = $currentWorkingDirectory . '/rector-temp-phpstan' . $pid . '.neon'; - $clearedPhpstanNeonContent = Strings::replace($phpstanNeonContent, self::BLEEDING_EDGE_REGEX); - $smartFileSystem->dumpFile($temporaryPHPStanNeon, $clearedPhpstanNeonContent); - - $additionalConfigFiles[] = $temporaryPHPStanNeon; - } else { - $additionalConfigFiles[] = $currentProjectConfigFile; - } - } - - $additionalConfigFiles[] = __DIR__ . '/../../utils/phpstan/config/extension.neon'; - - $this->container = $containerFactory->create(sys_get_temp_dir(), $additionalConfigFiles, []); - - // clear bleeding edge fallback - if (null !== $temporaryPHPStanNeon) { - $smartFileSystem->remove($temporaryPHPStanNeon); - } - } - - /** - * @api - */ - public function createReflectionProvider(): ReflectionProvider - { - return $this->container->getByType(ReflectionProvider::class); - } - - /** - * @api - */ - public function createNodeScopeResolver(): NodeScopeResolver - { - return $this->container->getByType(NodeScopeResolver::class); - } - - /** - * @api - */ - public function createTypeSpecifier(): TypeSpecifier - { - return $this->container->getByType(TypeSpecifier::class); - } - - /** - * @api - */ - public function createScopeFactory(): ScopeFactory - { - return $this->container->getByType(ScopeFactory::class); - } - - /** - * @api - */ - public function createDynamicReturnTypeExtensionRegistryProvider(): DynamicReturnTypeExtensionRegistryProvider - { - return $this->container->getByType(DynamicReturnTypeExtensionRegistryProvider::class); - } - - /** - * @api - */ - public function createDependencyResolver(): DependencyResolver - { - return $this->container->getByType(DependencyResolver::class); - } - - /** - * @api - */ - public function createFileHelper(): FileHelper - { - return $this->container->getByType(FileHelper::class); - } - - /** - * @api - */ - public function createOperatorTypeSpecifyingExtensionRegistryProvider(): OperatorTypeSpecifyingExtensionRegistryProvider - { - return $this->container->getByType(OperatorTypeSpecifyingExtensionRegistryProvider::class); - } - - /** - * @api - */ - public function createTypeNodeResolver(): TypeNodeResolver - { - return $this->container->getByType(TypeNodeResolver::class); - } - - private function appendPhpstanPHPUnitExtensionIfExists( - string $currentWorkingDirectory, - array $additionalConfigFiles - ): array { - $phpstanPhpunitExtensionConfig = $currentWorkingDirectory . '/vendor/phpstan/phpstan-phpunit/extension.neon'; - if (file_exists($phpstanPhpunitExtensionConfig) && class_exists(TestCase::class)) { - $additionalConfigFiles[] = $phpstanPhpunitExtensionConfig; - } - return $additionalConfigFiles; - } -} diff --git a/src/Helper/DependencyInjection.php b/src/Helper/DependencyInjection.php deleted file mode 100644 index dfd2b99ac..000000000 --- a/src/Helper/DependencyInjection.php +++ /dev/null @@ -1,26 +0,0 @@ -parameterProvider = $parameterProvider; - $this->nameImporter = $nameImporter; - $this->docBlockNameImporter = $docBlockNameImporter; - $this->classNameImportSkipper = $classNameImportSkipper; - $this->currentFileInfoProvider = $currentFileInfoProvider; - $this->phpDocInfoFactory = $phpDocInfoFactory; - $this->nodeNameResolver = $nodeNameResolver; - } - - public function enterNode(Node $node): ?Node - { - $autoImportNames = (bool) $this->parameterProvider->provideParameter(Typo3Option::AUTO_IMPORT_NAMES); - if (! $autoImportNames) { - return null; - } - - if ($this->shouldSkip($this)) { - return null; - } - - if ($node instanceof Name) { - return $this->processNodeName($node); - } - - $importDocBlocks = (bool) $this->parameterProvider->provideParameter(Option::IMPORT_DOC_BLOCKS); - if (! $importDocBlocks) { - return null; - } - - $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); - $this->docBlockNameImporter->importNames($phpDocInfo, $node); - - return $node; - } - - public function getPriority(): int - { - // The \Rector\PostRector\Rector\NameImportingPostRector::class from Rector itself uses 600, so we go one level up - return 601; - } - - public function getRuleDefinition(): RuleDefinition - { - return new RuleDefinition( - 'Imports fully qualified class names in parameter types, return types, extended classes, implemented, interfaces and even docblocks', - [ - new CodeSample( - <<<'CODE_SAMPLE' -$someClass = new \Some\FullyQualified\SomeClass(); -CODE_SAMPLE - , - <<<'CODE_SAMPLE' -use Some\FullyQualified\SomeClass; - -$someClass = new SomeClass(); -CODE_SAMPLE - ), - ] - ); - } - - private function shouldSkip(PostRectorInterface $postRector): bool - { - $smartFileInfo = $this->currentFileInfoProvider->getSmartFileInfo(); - - if (! $smartFileInfo instanceof SmartFileInfo) { - return false; - } - - $skip = $this->parameterProvider->provideArrayParameter(Option::SKIP); - if ([] === $skip) { - return false; - } - - $rectorClass = get_class($postRector); - if (! array_key_exists($rectorClass, $skip)) { - return false; - } - - $locations = $skip[$rectorClass]; - $filePathName = $smartFileInfo->getPathName(); - if (in_array($filePathName, $locations, true)) { - return true; - } - - $fileName = $smartFileInfo->getFileName(); - foreach ($locations as $location) { - $ignoredPath = $this->normalizeForFnmatch($location); - - if ($smartFileInfo->endsWith($ignoredPath) || $smartFileInfo->doesFnmatch($ignoredPath)) { - return true; - } - - if (rtrim($ignoredPath, '\/') . DIRECTORY_SEPARATOR . $fileName === $filePathName) { - return true; - } - } - - return false; - } - - private function processNodeName(Name $name): ?Node - { - $importName = $this->nodeNameResolver->getName($name); - - if (! is_callable($importName)) { - return $this->nameImporter->importName($name); - } - - if (substr_count($name->toCodeString(), '\\') > 1 - && $this->classNameImportSkipper->isFoundInUse($name) - && ! function_exists($name->getLast())) { - return null; - } - - return $this->nameImporter->importName($name); - } - - /** - * "value*" → "*value*" - * "*value" → "*value*" - */ - private function normalizeForFnmatch(string $path): string - { - // ends with * - if (Strings::match($path, self::ONLY_ENDS_WITH_ASTERISK_REGEX)) { - return '*' . $path; - } - - // starts with * - if (Strings::match($path, self::ONLY_STARTS_WITH_ASTERISK_REGEX)) { - return $path . '*'; - } - - return $path; - } -} diff --git a/src/Rector/Migrations/RenameClassMapAliasRector.php b/src/Rector/Migrations/RenameClassMapAliasRector.php index b2456482a..5840d3cc2 100644 --- a/src/Rector/Migrations/RenameClassMapAliasRector.php +++ b/src/Rector/Migrations/RenameClassMapAliasRector.php @@ -19,6 +19,9 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; use Symplify\SmartFileSystem\SmartFileInfo; +/** + * @see \Ssch\TYPO3Rector\Tests\Rector\Migrations\RenameClassMapAliasRectorTest + */ final class RenameClassMapAliasRector extends AbstractRector implements ConfigurableRectorInterface { /** diff --git a/src/Rector/v10/v0/ChangeDefaultCachingFrameworkNamesRector.php b/src/Rector/v10/v0/ChangeDefaultCachingFrameworkNamesRector.php index 39402c144..e86f58333 100644 --- a/src/Rector/v10/v0/ChangeDefaultCachingFrameworkNamesRector.php +++ b/src/Rector/v10/v0/ChangeDefaultCachingFrameworkNamesRector.php @@ -29,7 +29,7 @@ public function getNodeTypes(): array */ public function refactor(Node $node): ?Node { - if (! $this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, CacheManager::class)) { + if (! $this->nodeTypeResolver->isObjectType($node->var, CacheManager::class)) { return null; } @@ -37,8 +37,8 @@ public function refactor(Node $node): ?Node return null; } - $argument = $this->valueResolver->getValue($node->args[0]->value); - + $argValue = $node->args[0]->value; + $argument = $this->valueResolver->getValue($argValue); if (null === $argument) { return null; } diff --git a/src/Rector/v10/v0/ForceTemplateParsingInTsfeAndTemplateServiceRector.php b/src/Rector/v10/v0/ForceTemplateParsingInTsfeAndTemplateServiceRector.php index 5716a1824..b560843af 100644 --- a/src/Rector/v10/v0/ForceTemplateParsingInTsfeAndTemplateServiceRector.php +++ b/src/Rector/v10/v0/ForceTemplateParsingInTsfeAndTemplateServiceRector.php @@ -23,6 +23,7 @@ /** * @see https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.0/Deprecation-88792-ForceTemplateParsingInTSFEAndTemplateService.html + * @see \Ssch\TYPO3Rector\Tests\Rector\v10\v0\ForceTemplateParsingInTsfeAndTemplateServiceRectorTest */ final class ForceTemplateParsingInTsfeAndTemplateServiceRector extends AbstractRector { diff --git a/src/Rector/v10/v1/SendNotifyEmailToMailApiRector.php b/src/Rector/v10/v1/SendNotifyEmailToMailApiRector.php index 926802ecd..13e51e759 100644 --- a/src/Rector/v10/v1/SendNotifyEmailToMailApiRector.php +++ b/src/Rector/v10/v1/SendNotifyEmailToMailApiRector.php @@ -195,7 +195,7 @@ private function trimSenderName(MethodCall $methodCall): Node { return new Expression(new Assign(new Variable('senderName'), $this->nodeFactory->createFuncCall( self::TRIM, - [$methodCall->args[4] ?? new Expr\ConstFetch(new Name('null'))] + [$methodCall->args[4] ?? new ConstFetch(new Name('null'))] ))); } diff --git a/src/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector.php b/src/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector.php index fb479db7b..65131d086 100644 --- a/src/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector.php +++ b/src/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector.php @@ -15,6 +15,7 @@ /** * @see https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.4/Deprecation-91001-VariousMethodsWithinGeneralUtility.html + * @see \Ssch\TYPO3Rector\Tests\Rector\v10\v4\SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector\SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRectorTest */ final class SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector extends AbstractRector { diff --git a/src/Rector/v10/v4/UnifiedFileNameValidatorRector.php b/src/Rector/v10/v4/UnifiedFileNameValidatorRector.php index dea918179..1041b8bd6 100644 --- a/src/Rector/v10/v4/UnifiedFileNameValidatorRector.php +++ b/src/Rector/v10/v4/UnifiedFileNameValidatorRector.php @@ -15,6 +15,7 @@ /** * @see https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.4/Deprecation-90147-UnifiedFileNameValidator.html + * @see \Ssch\TYPO3Rector\Tests\Rector\v10\v4\UnifiedFileNameValidatorRector\UnifiedFileNameValidatorRectorTest */ final class UnifiedFileNameValidatorRector extends AbstractRector { diff --git a/src/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterfaceRector.php b/src/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterfaceRector.php index 4a272f9f5..4c664cd61 100644 --- a/src/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterfaceRector.php +++ b/src/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterfaceRector.php @@ -31,6 +31,11 @@ final class ExtbaseControllerActionsMustReturnResponseInterfaceRector extends Ab */ private const THIS = 'this'; + /** + * @var string + */ + private const HTML_RESPONSE = 'htmlResponse'; + /** * @return string[] */ @@ -66,13 +71,16 @@ public function refactor(Node $node): ?Node ); } else { // avoid duplication - if ($returnCall->expr instanceof MethodCall && $this->isName($returnCall->expr->name, 'htmlResponse')) { + if ($returnCall->expr instanceof MethodCall && $this->isName( + $returnCall->expr->name, + self::HTML_RESPONSE + )) { $args = []; } else { $args = [$returnCall->expr]; } - $returnCall->expr = $this->nodeFactory->createMethodCall(self::THIS, 'htmlResponse', $args); + $returnCall->expr = $this->nodeFactory->createMethodCall(self::THIS, self::HTML_RESPONSE, $args); } } @@ -86,7 +94,7 @@ public function refactor(Node $node): ?Node } if (! $lastStatement instanceof Return_) { - $returnResponse = $this->nodeFactory->createMethodCall(self::THIS, 'htmlResponse'); + $returnResponse = $this->nodeFactory->createMethodCall(self::THIS, self::HTML_RESPONSE); $node->stmts[] = new Return_($returnResponse); } @@ -206,7 +214,7 @@ private function alreadyResponseReturnType(ClassMethod $node): bool continue; } - if (is_a($returnType->getClassName(), ResponseInterface::class)) { + if (is_a($returnType->getClassName(), ResponseInterface::class, true)) { return true; } } diff --git a/src/Rector/v9/v0/DatabaseConnectionToDbalRector.php b/src/Rector/v9/v0/DatabaseConnectionToDbalRector.php index 0c464b9fd..688193166 100644 --- a/src/Rector/v9/v0/DatabaseConnectionToDbalRector.php +++ b/src/Rector/v9/v0/DatabaseConnectionToDbalRector.php @@ -7,12 +7,15 @@ use PhpParser\Node; use PhpParser\Node\Expr\MethodCall; use Rector\Core\Rector\AbstractRector; +use Ssch\TYPO3Rector\Helper\Database\Refactorings\DatabaseConnectionToDbalRefactoring; use Ssch\TYPO3Rector\Helper\Typo3NodeResolver; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @see https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.0/Breaking-80929-TYPO3_DBMovedToExtension.html + * + * @see \Ssch\TYPO3Rector\Tests\Rector\Core\Database\DatabaseConnectionToDbalTest */ final class DatabaseConnectionToDbalRector extends AbstractRector { @@ -22,11 +25,14 @@ final class DatabaseConnectionToDbalRector extends AbstractRector private $typo3NodeResolver; /** - * @noRector + * @var DatabaseConnectionToDbalRefactoring[] */ - private $databaseConnectionRefactorings; + private $databaseConnectionRefactorings = []; - public function __construct(Typo3NodeResolver $typo3NodeResolver, iterable $databaseConnectionRefactorings) + /** + * @param DatabaseConnectionToDbalRefactoring[] $databaseConnectionRefactorings + */ + public function __construct(Typo3NodeResolver $typo3NodeResolver, array $databaseConnectionRefactorings) { $this->typo3NodeResolver = $typo3NodeResolver; $this->databaseConnectionRefactorings = $databaseConnectionRefactorings; @@ -45,7 +51,12 @@ public function refactor(Node $node): ?Node if ($this->shouldSkip($node)) { return null; } + $methodName = $this->getName($node->name); + if (null === $methodName) { + return null; + } + foreach ($this->databaseConnectionRefactorings as $databaseConnectionRefactoring) { if ($databaseConnectionRefactoring->canHandle($methodName)) { $nodes = $databaseConnectionRefactoring->refactor($node); diff --git a/src/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRector.php b/src/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRector.php index 7d4b76aea..dd80fe24c 100644 --- a/src/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRector.php +++ b/src/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRector.php @@ -7,6 +7,7 @@ use PhpParser\Node; use PhpParser\Node\Expr\MethodCall; use Rector\Core\Rector\AbstractRector; +use Ssch\TYPO3Rector\NodeAnalyzer\ClassConstAnalyzer; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; use TYPO3\CMS\Extbase\SignalSlot\Dispatcher; @@ -19,11 +20,11 @@ final class UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRector extends AbstractRector { /** - * @var \Ssch\TYPO3Rector\NodeAnalyzer\ClassConstAnalyzer + * @var ClassConstAnalyzer */ private $classConstAnalyzer; - public function __construct(\Ssch\TYPO3Rector\NodeAnalyzer\ClassConstAnalyzer $classConstAnalyzer) + public function __construct(ClassConstAnalyzer $classConstAnalyzer) { $this->classConstAnalyzer = $classConstAnalyzer; } diff --git a/tests/Rector/Core/Database/DatabaseConnectionToDbalTest.php b/tests/Rector/Core/Database/DatabaseConnectionToDbalTest.php index f0d0271d7..a46cc38f6 100644 --- a/tests/Rector/Core/Database/DatabaseConnectionToDbalTest.php +++ b/tests/Rector/Core/Database/DatabaseConnectionToDbalTest.php @@ -5,10 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\Core\Database; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class DatabaseConnectionToDbalTest extends AbstractRectorTestCase +final class DatabaseConnectionToDbalTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -23,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function provideConfigFileInfo(): ?SmartFileInfo + public function provideConfigFilePath(): string { - return new SmartFileInfo(__DIR__ . '/../../../../config/database-connection-to-dbal.php'); + return __DIR__ . '/../../../../config/database-connection-to-dbal.php'; } } diff --git a/tests/Rector/Core/Database/Fixture/exec_insert_query.php.inc b/tests/Rector/Core/Database/Fixture/exec_insert_query.php.inc index f0e6ad613..613f4e5ac 100644 --- a/tests/Rector/Core/Database/Fixture/exec_insert_query.php.inc +++ b/tests/Rector/Core/Database/Fixture/exec_insert_query.php.inc @@ -18,16 +18,16 @@ class LegacyDatabaseConnectionUsage ----- getConnectionForTable('pages'); + $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('pages'); $connection->insert('pages', [ 'pid' => 0, 'title' => 'Home', ]); } } - -?> diff --git a/tests/Rector/Core/Database/Fixture/exec_truncate_query.php.inc b/tests/Rector/Core/Database/Fixture/exec_truncate_query.php.inc index f39453c1b..2214411f3 100644 --- a/tests/Rector/Core/Database/Fixture/exec_truncate_query.php.inc +++ b/tests/Rector/Core/Database/Fixture/exec_truncate_query.php.inc @@ -12,13 +12,13 @@ class LegacyDatabaseConnectionTruncateQueryUsage ----- getConnectionForTable('pages'); + $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('pages'); $connection->truncate('pages'); } } - -?> diff --git a/tests/Rector/Experimental/OptionalConstructorToHardRequirement/OptionalConstructorToHardRequirementRectorTest.php b/tests/Rector/Experimental/OptionalConstructorToHardRequirement/OptionalConstructorToHardRequirementRectorTest.php index d033a754a..4d134c4cf 100644 --- a/tests/Rector/Experimental/OptionalConstructorToHardRequirement/OptionalConstructorToHardRequirementRectorTest.php +++ b/tests/Rector/Experimental/OptionalConstructorToHardRequirement/OptionalConstructorToHardRequirementRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\Experimental\OptionalConstructorToHardRequirement; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\Experimental\OptionalConstructorToHardRequirementRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class OptionalConstructorToHardRequirementRectorTest extends AbstractRectorTestCase +final class OptionalConstructorToHardRequirementRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return OptionalConstructorToHardRequirementRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/Experimental/OptionalConstructorToHardRequirement/config/configured_rule.php b/tests/Rector/Experimental/OptionalConstructorToHardRequirement/config/configured_rule.php new file mode 100644 index 000000000..ec876db2b --- /dev/null +++ b/tests/Rector/Experimental/OptionalConstructorToHardRequirement/config/configured_rule.php @@ -0,0 +1,12 @@ +import(__DIR__ . '/../../../../../config/services.php'); + $services = $containerConfigurator->services(); + $services->set(OptionalConstructorToHardRequirementRector::class); +}; diff --git a/tests/Rector/Extensions/solr/ApacheSolrDocumentToSolariumDocument/ApacheSolrDocumentToSolariumDocumentRectorTest.php b/tests/Rector/Extensions/solr/ApacheSolrDocumentToSolariumDocument/ApacheSolrDocumentToSolariumDocumentRectorTest.php index 1c313a622..42123cd62 100644 --- a/tests/Rector/Extensions/solr/ApacheSolrDocumentToSolariumDocument/ApacheSolrDocumentToSolariumDocumentRectorTest.php +++ b/tests/Rector/Extensions/solr/ApacheSolrDocumentToSolariumDocument/ApacheSolrDocumentToSolariumDocumentRectorTest.php @@ -5,10 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\Extensions\solr\ApacheSolrDocumentToSolariumDocument; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ApacheSolrDocumentToSolariumDocumentRectorTest extends AbstractRectorTestCase +final class ApacheSolrDocumentToSolariumDocumentRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -23,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function provideConfigFileInfo(): ?SmartFileInfo + public function provideConfigFilePath(): string { - return new SmartFileInfo(__DIR__ . '/config/configured_rule.php'); + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/General/ConvertTypo3ConfVars/ConvertTypo3ConfVarsRectorTest.php b/tests/Rector/General/ConvertTypo3ConfVars/ConvertTypo3ConfVarsRectorTest.php index 3e9b102b0..7e01b0c13 100644 --- a/tests/Rector/General/ConvertTypo3ConfVars/ConvertTypo3ConfVarsRectorTest.php +++ b/tests/Rector/General/ConvertTypo3ConfVars/ConvertTypo3ConfVarsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\General\ConvertTypo3ConfVars; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\General\ConvertTypo3ConfVarsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ConvertTypo3ConfVarsRectorTest extends AbstractRectorTestCase +final class ConvertTypo3ConfVarsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return ConvertTypo3ConfVarsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/General/ConvertTypo3ConfVars/config/configured_rule.php b/tests/Rector/General/ConvertTypo3ConfVars/config/configured_rule.php new file mode 100644 index 000000000..bf3209e64 --- /dev/null +++ b/tests/Rector/General/ConvertTypo3ConfVars/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../config/services.php'); + $services = $containerConfigurator->services(); + + $services->set(ConvertTypo3ConfVarsRector::class); +}; diff --git a/tests/Rector/Migrations/RenameClassMapAliasRectorTest.php b/tests/Rector/Migrations/RenameClassMapAliasRectorTest.php index ef83e624c..9ef823af0 100644 --- a/tests/Rector/Migrations/RenameClassMapAliasRectorTest.php +++ b/tests/Rector/Migrations/RenameClassMapAliasRectorTest.php @@ -5,10 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\Migrations; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RenameClassMapAliasRectorTest extends AbstractRectorTestCase +final class RenameClassMapAliasRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -23,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function provideConfigFileInfo(): ?SmartFileInfo + public function provideConfigFilePath(): string { - return new SmartFileInfo(__DIR__ . '/config/configured_rule.php'); + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/Name/RenameClassRector/AutoImportNamesParameterTest.php b/tests/Rector/Name/RenameClassRector/AutoImportNamesParameterTest.php index 4a19afa96..ed1a52ba8 100644 --- a/tests/Rector/Name/RenameClassRector/AutoImportNamesParameterTest.php +++ b/tests/Rector/Name/RenameClassRector/AutoImportNamesParameterTest.php @@ -5,14 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\Name\RenameClassRector; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\PostRector\NameImportingPostRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -/** - * @see NameImportingPostRector - */ -final class AutoImportNamesParameterTest extends AbstractRectorTestCase +final class AutoImportNamesParameterTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -27,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/FixtureAutoImportNames'); } - protected function provideConfigFileInfo(): ?SmartFileInfo + public function provideConfigFilePath(): string { - return new SmartFileInfo(__DIR__ . '/config/autoimport_rename.php'); + return __DIR__ . '/config/autoimport_rename.php'; } } diff --git a/tests/Rector/Name/RenameClassRector/SkipAutoImportNamesParameterTest.php b/tests/Rector/Name/RenameClassRector/SkipAutoImportNamesParameterTest.php index e9d0b68a8..412c49c2b 100644 --- a/tests/Rector/Name/RenameClassRector/SkipAutoImportNamesParameterTest.php +++ b/tests/Rector/Name/RenameClassRector/SkipAutoImportNamesParameterTest.php @@ -5,14 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\Name\RenameClassRector; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\PostRector\NameImportingPostRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -/** - * @see NameImportingPostRector - */ -final class SkipAutoImportNamesParameterTest extends AbstractRectorTestCase +final class SkipAutoImportNamesParameterTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -27,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/SkipAutoImportNames'); } - protected function provideConfigFileInfo(): ?SmartFileInfo + public function provideConfigFilePath(): string { - return new SmartFileInfo(__DIR__ . '/config/autoimport_with_skip.php'); + return __DIR__ . '/config/autoimport_with_skip.php'; } } diff --git a/tests/Rector/Name/RenameClassRector/config/autoimport_rename.php b/tests/Rector/Name/RenameClassRector/config/autoimport_rename.php index 3de70454f..99b268269 100644 --- a/tests/Rector/Name/RenameClassRector/config/autoimport_rename.php +++ b/tests/Rector/Name/RenameClassRector/config/autoimport_rename.php @@ -4,16 +4,13 @@ use Rector\Core\Configuration\Option; use Rector\Renaming\Rector\Name\RenameClassRector; -use Ssch\TYPO3Rector\Configuration\Typo3Option; use Ssch\TYPO3Rector\Tests\Rector\Name\RenameClassRector\Source\NewClass; use Ssch\TYPO3Rector\Tests\Rector\Name\RenameClassRector\Source\OldClass; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); - $parameters->set(Option::AUTO_IMPORT_NAMES, true); - $parameters->set(Typo3Option::AUTO_IMPORT_NAMES, true); $services = $containerConfigurator->services(); diff --git a/tests/Rector/Name/RenameClassRector/config/autoimport_with_skip.php b/tests/Rector/Name/RenameClassRector/config/autoimport_with_skip.php index 8fe5a5fb1..a468690d2 100644 --- a/tests/Rector/Name/RenameClassRector/config/autoimport_with_skip.php +++ b/tests/Rector/Name/RenameClassRector/config/autoimport_with_skip.php @@ -3,9 +3,8 @@ declare(strict_types=1); use Rector\Core\Configuration\Option; +use Rector\PostRector\Rector\NameImportingPostRector; use Rector\Renaming\Rector\Name\RenameClassRector; -use Ssch\TYPO3Rector\Configuration\Typo3Option; -use Ssch\TYPO3Rector\PostRector\NameImportingPostRector; use Ssch\TYPO3Rector\Tests\Rector\Name\RenameClassRector\Source\FirstOriginalClass; use Ssch\TYPO3Rector\Tests\Rector\Name\RenameClassRector\Source\SecondOriginalClass; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; @@ -13,8 +12,8 @@ return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); - $parameters->set(Option::AUTO_IMPORT_NAMES, false); - $parameters->set(Typo3Option::AUTO_IMPORT_NAMES, true); + $parameters->set(Option::AUTO_IMPORT_NAMES, true); + $parameters->set(Option::SKIP, [ NameImportingPostRector::class => ['*_skip_import_names.php'], ]); diff --git a/tests/Rector/Nimut/TestingFramework/NimutTestingFrameworkToTYPO3TestingFrameworkTest.php b/tests/Rector/Nimut/TestingFramework/NimutTestingFrameworkToTYPO3TestingFrameworkTest.php index 1cbb854bd..776790ad2 100644 --- a/tests/Rector/Nimut/TestingFramework/NimutTestingFrameworkToTYPO3TestingFrameworkTest.php +++ b/tests/Rector/Nimut/TestingFramework/NimutTestingFrameworkToTYPO3TestingFrameworkTest.php @@ -5,10 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\Nimut\TestingFramework; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class NimutTestingFrameworkToTYPO3TestingFrameworkTest extends AbstractRectorTestCase +final class NimutTestingFrameworkToTYPO3TestingFrameworkTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -23,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function provideConfigFileInfo(): ?SmartFileInfo + public function provideConfigFilePath(): string { - return new SmartFileInfo(__DIR__ . '/config/configured_rule.php'); + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v0/BackendUtilityViewDomainToPageRouter/BackendUtilityGetViewDomainToPageRouterRectorTest.php b/tests/Rector/v10/v0/BackendUtilityViewDomainToPageRouter/BackendUtilityGetViewDomainToPageRouterRectorTest.php index e97d2a912..45f72a79b 100644 --- a/tests/Rector/v10/v0/BackendUtilityViewDomainToPageRouter/BackendUtilityGetViewDomainToPageRouterRectorTest.php +++ b/tests/Rector/v10/v0/BackendUtilityViewDomainToPageRouter/BackendUtilityGetViewDomainToPageRouterRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\BackendUtilityViewDomainToPageRouter; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v0\BackendUtilityGetViewDomainToPageRouterRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class BackendUtilityGetViewDomainToPageRouterRectorTest extends AbstractRectorTestCase +final class BackendUtilityGetViewDomainToPageRouterRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return BackendUtilityGetViewDomainToPageRouterRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v0/BackendUtilityViewDomainToPageRouter/config/configured_rule.php b/tests/Rector/v10/v0/BackendUtilityViewDomainToPageRouter/config/configured_rule.php new file mode 100644 index 000000000..65f5d8492 --- /dev/null +++ b/tests/Rector/v10/v0/BackendUtilityViewDomainToPageRouter/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(BackendUtilityGetViewDomainToPageRouterRector::class); +}; diff --git a/tests/Rector/v10/v0/ChangeDefaultCachingFrameworkNames/ChangeDefaultCachingFrameworkNamesRectorTest.php b/tests/Rector/v10/v0/ChangeDefaultCachingFrameworkNames/ChangeDefaultCachingFrameworkNamesRectorTest.php index 4ceba3e96..7cc140a60 100644 --- a/tests/Rector/v10/v0/ChangeDefaultCachingFrameworkNames/ChangeDefaultCachingFrameworkNamesRectorTest.php +++ b/tests/Rector/v10/v0/ChangeDefaultCachingFrameworkNames/ChangeDefaultCachingFrameworkNamesRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\ChangeDefaultCachingFrameworkNames; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v0\ChangeDefaultCachingFrameworkNamesRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ChangeDefaultCachingFrameworkNamesRectorTest extends AbstractRectorTestCase +final class ChangeDefaultCachingFrameworkNamesRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return ChangeDefaultCachingFrameworkNamesRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v0/ChangeDefaultCachingFrameworkNames/config/configured_rule.php b/tests/Rector/v10/v0/ChangeDefaultCachingFrameworkNames/config/configured_rule.php new file mode 100644 index 000000000..eae7d6da9 --- /dev/null +++ b/tests/Rector/v10/v0/ChangeDefaultCachingFrameworkNames/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(ChangeDefaultCachingFrameworkNamesRector::class); +}; diff --git a/tests/Rector/v10/v0/ConfigurationManagerAddControllerConfigurationMethod/ConfigurationManagerAddControllerConfigurationMethodRectorTest.php b/tests/Rector/v10/v0/ConfigurationManagerAddControllerConfigurationMethod/ConfigurationManagerAddControllerConfigurationMethodRectorTest.php index 59d2cc78b..61772e850 100644 --- a/tests/Rector/v10/v0/ConfigurationManagerAddControllerConfigurationMethod/ConfigurationManagerAddControllerConfigurationMethodRectorTest.php +++ b/tests/Rector/v10/v0/ConfigurationManagerAddControllerConfigurationMethod/ConfigurationManagerAddControllerConfigurationMethodRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\ConfigurationManagerAddControllerConfigurationMethod; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v0\ConfigurationManagerAddControllerConfigurationMethodRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ConfigurationManagerAddControllerConfigurationMethodRectorTest extends AbstractRectorTestCase +final class ConfigurationManagerAddControllerConfigurationMethodRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return ConfigurationManagerAddControllerConfigurationMethodRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v0/ConfigurationManagerAddControllerConfigurationMethod/config/configured_rule.php b/tests/Rector/v10/v0/ConfigurationManagerAddControllerConfigurationMethod/config/configured_rule.php new file mode 100644 index 000000000..578ac8dfa --- /dev/null +++ b/tests/Rector/v10/v0/ConfigurationManagerAddControllerConfigurationMethod/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(ConfigurationManagerAddControllerConfigurationMethodRector::class); +}; diff --git a/tests/Rector/v10/v0/ForceTemplateParsingInTsfeAndTemplateServiceRectorTest.php b/tests/Rector/v10/v0/ForceTemplateParsingInTsfeAndTemplateServiceRectorTest.php index dd380013b..dfd4c2561 100644 --- a/tests/Rector/v10/v0/ForceTemplateParsingInTsfeAndTemplateServiceRectorTest.php +++ b/tests/Rector/v10/v0/ForceTemplateParsingInTsfeAndTemplateServiceRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v0\ForceTemplateParsingInTsfeAndTemplateServiceRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ForceTemplateParsingInTsfeAndTemplateServiceRectorTest extends AbstractRectorTestCase +final class ForceTemplateParsingInTsfeAndTemplateServiceRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return ForceTemplateParsingInTsfeAndTemplateServiceRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v0/RefactorIdnaEncodeMethodToNativeFunction/RefactorIdnaEncodeMethodToNativeFunctionRectorTest.php b/tests/Rector/v10/v0/RefactorIdnaEncodeMethodToNativeFunction/RefactorIdnaEncodeMethodToNativeFunctionRectorTest.php index d880e4428..05f6dbd21 100644 --- a/tests/Rector/v10/v0/RefactorIdnaEncodeMethodToNativeFunction/RefactorIdnaEncodeMethodToNativeFunctionRectorTest.php +++ b/tests/Rector/v10/v0/RefactorIdnaEncodeMethodToNativeFunction/RefactorIdnaEncodeMethodToNativeFunctionRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\RefactorIdnaEncodeMethodToNativeFunction; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v0\RefactorIdnaEncodeMethodToNativeFunctionRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorIdnaEncodeMethodToNativeFunctionRectorTest extends AbstractRectorTestCase +final class RefactorIdnaEncodeMethodToNativeFunctionRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorIdnaEncodeMethodToNativeFunctionRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v0/RefactorIdnaEncodeMethodToNativeFunction/config/configured_rule.php b/tests/Rector/v10/v0/RefactorIdnaEncodeMethodToNativeFunction/config/configured_rule.php new file mode 100644 index 000000000..60e0385ba --- /dev/null +++ b/tests/Rector/v10/v0/RefactorIdnaEncodeMethodToNativeFunction/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorIdnaEncodeMethodToNativeFunctionRector::class); +}; diff --git a/tests/Rector/v10/v0/RemovePropertyExtensionName/RemovePropertyExtensionNameRectorTest.php b/tests/Rector/v10/v0/RemovePropertyExtensionName/RemovePropertyExtensionNameRectorTest.php index a6812a731..f8d0c4825 100644 --- a/tests/Rector/v10/v0/RemovePropertyExtensionName/RemovePropertyExtensionNameRectorTest.php +++ b/tests/Rector/v10/v0/RemovePropertyExtensionName/RemovePropertyExtensionNameRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\RemovePropertyExtensionName; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v0\RemovePropertyExtensionNameRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemovePropertyExtensionNameRectorTest extends AbstractRectorTestCase +final class RemovePropertyExtensionNameRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemovePropertyExtensionNameRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v0/RemovePropertyExtensionName/config/configured_rule.php b/tests/Rector/v10/v0/RemovePropertyExtensionName/config/configured_rule.php new file mode 100644 index 000000000..ba1ff0581 --- /dev/null +++ b/tests/Rector/v10/v0/RemovePropertyExtensionName/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemovePropertyExtensionNameRector::class); +}; diff --git a/tests/Rector/v10/v0/RemoveSeliconFieldPath/RemoveSeliconFieldPathRectorTest.php b/tests/Rector/v10/v0/RemoveSeliconFieldPath/RemoveSeliconFieldPathRectorTest.php index f15360e0c..6583e0970 100644 --- a/tests/Rector/v10/v0/RemoveSeliconFieldPath/RemoveSeliconFieldPathRectorTest.php +++ b/tests/Rector/v10/v0/RemoveSeliconFieldPath/RemoveSeliconFieldPathRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\RemoveSeliconFieldPath; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v0\RemoveSeliconFieldPathRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveSeliconFieldPathRectorTest extends AbstractRectorTestCase +final class RemoveSeliconFieldPathRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveSeliconFieldPathRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v0/RemoveSeliconFieldPath/config/configured_rule.php b/tests/Rector/v10/v0/RemoveSeliconFieldPath/config/configured_rule.php new file mode 100644 index 000000000..bc6d17c7c --- /dev/null +++ b/tests/Rector/v10/v0/RemoveSeliconFieldPath/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveSeliconFieldPathRector::class); +}; diff --git a/tests/Rector/v10/v0/RemoveTcaOptionSetToDefaultOnCopy/RemoveTcaOptionSetToDefaultOnCopyRectorTest.php b/tests/Rector/v10/v0/RemoveTcaOptionSetToDefaultOnCopy/RemoveTcaOptionSetToDefaultOnCopyRectorTest.php index 76e0fb023..6efd9c091 100644 --- a/tests/Rector/v10/v0/RemoveTcaOptionSetToDefaultOnCopy/RemoveTcaOptionSetToDefaultOnCopyRectorTest.php +++ b/tests/Rector/v10/v0/RemoveTcaOptionSetToDefaultOnCopy/RemoveTcaOptionSetToDefaultOnCopyRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\RemoveTcaOptionSetToDefaultOnCopy; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v0\RemoveTcaOptionSetToDefaultOnCopyRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveTcaOptionSetToDefaultOnCopyRectorTest extends AbstractRectorTestCase +final class RemoveTcaOptionSetToDefaultOnCopyRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveTcaOptionSetToDefaultOnCopyRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v0/RemoveTcaOptionSetToDefaultOnCopy/config/configured_rule.php b/tests/Rector/v10/v0/RemoveTcaOptionSetToDefaultOnCopy/config/configured_rule.php new file mode 100644 index 000000000..774f0d75f --- /dev/null +++ b/tests/Rector/v10/v0/RemoveTcaOptionSetToDefaultOnCopy/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveTcaOptionSetToDefaultOnCopyRector::class); +}; diff --git a/tests/Rector/v10/v0/SetSystemLocaleFromSiteLanguage/SetSystemLocaleFromSiteLanguageRectorTest.php b/tests/Rector/v10/v0/SetSystemLocaleFromSiteLanguage/SetSystemLocaleFromSiteLanguageRectorTest.php index 3b3ee866b..19a067247 100644 --- a/tests/Rector/v10/v0/SetSystemLocaleFromSiteLanguage/SetSystemLocaleFromSiteLanguageRectorTest.php +++ b/tests/Rector/v10/v0/SetSystemLocaleFromSiteLanguage/SetSystemLocaleFromSiteLanguageRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\SetSystemLocaleFromSiteLanguage; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v0\SetSystemLocaleFromSiteLanguageRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class SetSystemLocaleFromSiteLanguageRectorTest extends AbstractRectorTestCase +final class SetSystemLocaleFromSiteLanguageRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return SetSystemLocaleFromSiteLanguageRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v0/SetSystemLocaleFromSiteLanguage/config/configured_rule.php b/tests/Rector/v10/v0/SetSystemLocaleFromSiteLanguage/config/configured_rule.php new file mode 100644 index 000000000..07d24f965 --- /dev/null +++ b/tests/Rector/v10/v0/SetSystemLocaleFromSiteLanguage/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(SetSystemLocaleFromSiteLanguageRector::class); +}; diff --git a/tests/Rector/v10/v0/UseControllerClassesInExtbasePluginsAndModules/UseControllerClassesInExtbasePluginsAndModulesRectorTest.php b/tests/Rector/v10/v0/UseControllerClassesInExtbasePluginsAndModules/UseControllerClassesInExtbasePluginsAndModulesRectorTest.php index 0ea8d29cf..889ed073a 100644 --- a/tests/Rector/v10/v0/UseControllerClassesInExtbasePluginsAndModules/UseControllerClassesInExtbasePluginsAndModulesRectorTest.php +++ b/tests/Rector/v10/v0/UseControllerClassesInExtbasePluginsAndModules/UseControllerClassesInExtbasePluginsAndModulesRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\UseControllerClassesInExtbasePluginsAndModules; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v0\UseControllerClassesInExtbasePluginsAndModulesRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseControllerClassesInExtbasePluginsAndModulesRectorTest extends AbstractRectorTestCase +final class UseControllerClassesInExtbasePluginsAndModulesRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseControllerClassesInExtbasePluginsAndModulesRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v0/UseControllerClassesInExtbasePluginsAndModules/config/configured_rule.php b/tests/Rector/v10/v0/UseControllerClassesInExtbasePluginsAndModules/config/configured_rule.php new file mode 100644 index 000000000..c256a8360 --- /dev/null +++ b/tests/Rector/v10/v0/UseControllerClassesInExtbasePluginsAndModules/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseControllerClassesInExtbasePluginsAndModulesRector::class); +}; diff --git a/tests/Rector/v10/v0/UseMetaDataAspect/UseMetaDataAspectRectorTest.php b/tests/Rector/v10/v0/UseMetaDataAspect/UseMetaDataAspectRectorTest.php index b186e1b41..1bb49a790 100644 --- a/tests/Rector/v10/v0/UseMetaDataAspect/UseMetaDataAspectRectorTest.php +++ b/tests/Rector/v10/v0/UseMetaDataAspect/UseMetaDataAspectRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\UseMetaDataAspect; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v0\UseMetaDataAspectRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseMetaDataAspectRectorTest extends AbstractRectorTestCase +final class UseMetaDataAspectRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseMetaDataAspectRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v0/UseMetaDataAspect/config/configured_rule.php b/tests/Rector/v10/v0/UseMetaDataAspect/config/configured_rule.php new file mode 100644 index 000000000..5e9a81e8c --- /dev/null +++ b/tests/Rector/v10/v0/UseMetaDataAspect/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseMetaDataAspectRector::class); +}; diff --git a/tests/Rector/v10/v0/UseNativePhpHex2binMethod/UseNativePhpHex2binMethodRectorTest.php b/tests/Rector/v10/v0/UseNativePhpHex2binMethod/UseNativePhpHex2binMethodRectorTest.php index 32f8b91af..81a641a94 100644 --- a/tests/Rector/v10/v0/UseNativePhpHex2binMethod/UseNativePhpHex2binMethodRectorTest.php +++ b/tests/Rector/v10/v0/UseNativePhpHex2binMethod/UseNativePhpHex2binMethodRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\UseNativePhpHex2binMethod; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v0\UseNativePhpHex2binMethodRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseNativePhpHex2binMethodRectorTest extends AbstractRectorTestCase +final class UseNativePhpHex2binMethodRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseNativePhpHex2binMethodRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v0/UseNativePhpHex2binMethod/config/configured_rule.php b/tests/Rector/v10/v0/UseNativePhpHex2binMethod/config/configured_rule.php new file mode 100644 index 000000000..6cd022424 --- /dev/null +++ b/tests/Rector/v10/v0/UseNativePhpHex2binMethod/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseNativePhpHex2binMethodRector::class); +}; diff --git a/tests/Rector/v10/v0/UseTwoLetterIsoCodeFromSiteLanguage/UseTwoLetterIsoCodeFromSiteLanguageRectorTest.php b/tests/Rector/v10/v0/UseTwoLetterIsoCodeFromSiteLanguage/UseTwoLetterIsoCodeFromSiteLanguageRectorTest.php index e2b47c82c..3df62d59b 100644 --- a/tests/Rector/v10/v0/UseTwoLetterIsoCodeFromSiteLanguage/UseTwoLetterIsoCodeFromSiteLanguageRectorTest.php +++ b/tests/Rector/v10/v0/UseTwoLetterIsoCodeFromSiteLanguage/UseTwoLetterIsoCodeFromSiteLanguageRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v0\UseTwoLetterIsoCodeFromSiteLanguage; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v0\UseTwoLetterIsoCodeFromSiteLanguageRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseTwoLetterIsoCodeFromSiteLanguageRectorTest extends AbstractRectorTestCase +final class UseTwoLetterIsoCodeFromSiteLanguageRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseTwoLetterIsoCodeFromSiteLanguageRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v0/UseTwoLetterIsoCodeFromSiteLanguage/config/configured_rule.php b/tests/Rector/v10/v0/UseTwoLetterIsoCodeFromSiteLanguage/config/configured_rule.php new file mode 100644 index 000000000..cad88dbc7 --- /dev/null +++ b/tests/Rector/v10/v0/UseTwoLetterIsoCodeFromSiteLanguage/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseTwoLetterIsoCodeFromSiteLanguageRector::class); +}; diff --git a/tests/Rector/v10/v0/config/configured_rule.php b/tests/Rector/v10/v0/config/configured_rule.php new file mode 100644 index 000000000..3ef029f2b --- /dev/null +++ b/tests/Rector/v10/v0/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../config/services.php'); + $services = $containerConfigurator->services(); + + $services->set(ForceTemplateParsingInTsfeAndTemplateServiceRector::class); +}; diff --git a/tests/Rector/v10/v1/BackendUtilityEditOnClick/BackendUtilityEditOnClickRectorTest.php b/tests/Rector/v10/v1/BackendUtilityEditOnClick/BackendUtilityEditOnClickRectorTest.php index 270cf9f61..46d294d19 100644 --- a/tests/Rector/v10/v1/BackendUtilityEditOnClick/BackendUtilityEditOnClickRectorTest.php +++ b/tests/Rector/v10/v1/BackendUtilityEditOnClick/BackendUtilityEditOnClickRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v1\BackendUtilityEditOnClick; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v1\BackendUtilityEditOnClickRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class BackendUtilityEditOnClickRectorTest extends AbstractRectorTestCase +final class BackendUtilityEditOnClickRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return BackendUtilityEditOnClickRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v1/BackendUtilityEditOnClick/config/configured_rule.php b/tests/Rector/v10/v1/BackendUtilityEditOnClick/config/configured_rule.php new file mode 100644 index 000000000..ea1c4d30d --- /dev/null +++ b/tests/Rector/v10/v1/BackendUtilityEditOnClick/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(BackendUtilityEditOnClickRector::class); +}; diff --git a/tests/Rector/v10/v1/RefactorInternalPropertiesOfTSFE/RefactorInternalPropertiesOfTSFERectorTest.php b/tests/Rector/v10/v1/RefactorInternalPropertiesOfTSFE/RefactorInternalPropertiesOfTSFERectorTest.php index d3897cd9c..8f20fcec6 100644 --- a/tests/Rector/v10/v1/RefactorInternalPropertiesOfTSFE/RefactorInternalPropertiesOfTSFERectorTest.php +++ b/tests/Rector/v10/v1/RefactorInternalPropertiesOfTSFE/RefactorInternalPropertiesOfTSFERectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v1\RefactorInternalPropertiesOfTSFE; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v1\RefactorInternalPropertiesOfTSFERector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorInternalPropertiesOfTSFERectorTest extends AbstractRectorTestCase +final class RefactorInternalPropertiesOfTSFERectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorInternalPropertiesOfTSFERector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v1/RefactorInternalPropertiesOfTSFE/config/configured_rule.php b/tests/Rector/v10/v1/RefactorInternalPropertiesOfTSFE/config/configured_rule.php new file mode 100644 index 000000000..e2b25ff47 --- /dev/null +++ b/tests/Rector/v10/v1/RefactorInternalPropertiesOfTSFE/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorInternalPropertiesOfTSFERector::class); +}; diff --git a/tests/Rector/v10/v1/RegisterPluginWithVendorName/RegisterPluginWithVendorNameRectorTest.php b/tests/Rector/v10/v1/RegisterPluginWithVendorName/RegisterPluginWithVendorNameRectorTest.php index 4f1db10be..15255e19d 100644 --- a/tests/Rector/v10/v1/RegisterPluginWithVendorName/RegisterPluginWithVendorNameRectorTest.php +++ b/tests/Rector/v10/v1/RegisterPluginWithVendorName/RegisterPluginWithVendorNameRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v1\RegisterPluginWithVendorName; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v1\RegisterPluginWithVendorNameRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RegisterPluginWithVendorNameRectorTest extends AbstractRectorTestCase +final class RegisterPluginWithVendorNameRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RegisterPluginWithVendorNameRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v1/RegisterPluginWithVendorName/config/configured_rule.php b/tests/Rector/v10/v1/RegisterPluginWithVendorName/config/configured_rule.php new file mode 100644 index 000000000..2da2fb287 --- /dev/null +++ b/tests/Rector/v10/v1/RegisterPluginWithVendorName/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RegisterPluginWithVendorNameRector::class); +}; diff --git a/tests/Rector/v10/v1/SendNotifyEmailToMailApi/SendNotifyEmailToMailApiRectorTest.php b/tests/Rector/v10/v1/SendNotifyEmailToMailApi/SendNotifyEmailToMailApiRectorTest.php index abee8597f..e8c84b9c4 100644 --- a/tests/Rector/v10/v1/SendNotifyEmailToMailApi/SendNotifyEmailToMailApiRectorTest.php +++ b/tests/Rector/v10/v1/SendNotifyEmailToMailApi/SendNotifyEmailToMailApiRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v1\SendNotifyEmailToMailApi; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v1\SendNotifyEmailToMailApiRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class SendNotifyEmailToMailApiRectorTest extends AbstractRectorTestCase +final class SendNotifyEmailToMailApiRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return SendNotifyEmailToMailApiRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v1/SendNotifyEmailToMailApi/config/configured_rule.php b/tests/Rector/v10/v1/SendNotifyEmailToMailApi/config/configured_rule.php new file mode 100644 index 000000000..cf416c490 --- /dev/null +++ b/tests/Rector/v10/v1/SendNotifyEmailToMailApi/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(SendNotifyEmailToMailApiRector::class); +}; diff --git a/tests/Rector/v10/v2/ExcludeServiceKeysToArray/ExcludeServiceKeysToArrayRectorTest.php b/tests/Rector/v10/v2/ExcludeServiceKeysToArray/ExcludeServiceKeysToArrayRectorTest.php index 2be50fcdc..045359594 100644 --- a/tests/Rector/v10/v2/ExcludeServiceKeysToArray/ExcludeServiceKeysToArrayRectorTest.php +++ b/tests/Rector/v10/v2/ExcludeServiceKeysToArray/ExcludeServiceKeysToArrayRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v2\ExcludeServiceKeysToArray; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v2\ExcludeServiceKeysToArrayRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ExcludeServiceKeysToArrayRectorTest extends AbstractRectorTestCase +final class ExcludeServiceKeysToArrayRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return ExcludeServiceKeysToArrayRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v2/ExcludeServiceKeysToArray/config/configured_rule.php b/tests/Rector/v10/v2/ExcludeServiceKeysToArray/config/configured_rule.php new file mode 100644 index 000000000..b92cfc305 --- /dev/null +++ b/tests/Rector/v10/v2/ExcludeServiceKeysToArray/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(ExcludeServiceKeysToArrayRector::class); +}; diff --git a/tests/Rector/v10/v2/InjectEnvironmentServiceIfNeededInResponse/InjectEnvironmentServiceIfNeededInResponseRectorTest.php b/tests/Rector/v10/v2/InjectEnvironmentServiceIfNeededInResponse/InjectEnvironmentServiceIfNeededInResponseRectorTest.php index a8af32de0..2070364a8 100644 --- a/tests/Rector/v10/v2/InjectEnvironmentServiceIfNeededInResponse/InjectEnvironmentServiceIfNeededInResponseRectorTest.php +++ b/tests/Rector/v10/v2/InjectEnvironmentServiceIfNeededInResponse/InjectEnvironmentServiceIfNeededInResponseRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v2\InjectEnvironmentServiceIfNeededInResponse; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v2\InjectEnvironmentServiceIfNeededInResponseRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class InjectEnvironmentServiceIfNeededInResponseRectorTest extends AbstractRectorTestCase +final class InjectEnvironmentServiceIfNeededInResponseRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return InjectEnvironmentServiceIfNeededInResponseRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v2/InjectEnvironmentServiceIfNeededInResponse/config/configured_rule.php b/tests/Rector/v10/v2/InjectEnvironmentServiceIfNeededInResponse/config/configured_rule.php new file mode 100644 index 000000000..edaf7d54f --- /dev/null +++ b/tests/Rector/v10/v2/InjectEnvironmentServiceIfNeededInResponse/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(InjectEnvironmentServiceIfNeededInResponseRector::class); +}; diff --git a/tests/Rector/v10/v2/MoveApplicationContextToEnvironmentApi/MoveApplicationContextToEnvironmentApiRectorTest.php b/tests/Rector/v10/v2/MoveApplicationContextToEnvironmentApi/MoveApplicationContextToEnvironmentApiRectorTest.php index 643354701..79cf64b6d 100644 --- a/tests/Rector/v10/v2/MoveApplicationContextToEnvironmentApi/MoveApplicationContextToEnvironmentApiRectorTest.php +++ b/tests/Rector/v10/v2/MoveApplicationContextToEnvironmentApi/MoveApplicationContextToEnvironmentApiRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v2\MoveApplicationContextToEnvironmentApi; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v2\MoveApplicationContextToEnvironmentApiRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class MoveApplicationContextToEnvironmentApiRectorTest extends AbstractRectorTestCase +final class MoveApplicationContextToEnvironmentApiRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return MoveApplicationContextToEnvironmentApiRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v2/MoveApplicationContextToEnvironmentApi/config/configured_rule.php b/tests/Rector/v10/v2/MoveApplicationContextToEnvironmentApi/config/configured_rule.php new file mode 100644 index 000000000..a14990a85 --- /dev/null +++ b/tests/Rector/v10/v2/MoveApplicationContextToEnvironmentApi/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(MoveApplicationContextToEnvironmentApiRector::class); +}; diff --git a/tests/Rector/v10/v2/UseActionController/UseActionControllerRectorTest.php b/tests/Rector/v10/v2/UseActionController/UseActionControllerRectorTest.php index 1df102dfa..e08e7e061 100644 --- a/tests/Rector/v10/v2/UseActionController/UseActionControllerRectorTest.php +++ b/tests/Rector/v10/v2/UseActionController/UseActionControllerRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v2\UseActionController; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v2\UseActionControllerRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseActionControllerRectorTest extends AbstractRectorTestCase +final class UseActionControllerRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseActionControllerRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v2/UseActionController/config/configured_rule.php b/tests/Rector/v10/v2/UseActionController/config/configured_rule.php new file mode 100644 index 000000000..7d8e1edb0 --- /dev/null +++ b/tests/Rector/v10/v2/UseActionController/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseActionControllerRector::class); +}; diff --git a/tests/Rector/v10/v2/UseTypo3InformationForCopyRightNotice/UseTypo3InformationForCopyRightNoticeRectorTest.php b/tests/Rector/v10/v2/UseTypo3InformationForCopyRightNotice/UseTypo3InformationForCopyRightNoticeRectorTest.php index 0934c908d..f10e5d42c 100644 --- a/tests/Rector/v10/v2/UseTypo3InformationForCopyRightNotice/UseTypo3InformationForCopyRightNoticeRectorTest.php +++ b/tests/Rector/v10/v2/UseTypo3InformationForCopyRightNotice/UseTypo3InformationForCopyRightNoticeRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v2\UseTypo3InformationForCopyRightNotice; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v2\UseTypo3InformationForCopyRightNoticeRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseTypo3InformationForCopyRightNoticeRectorTest extends AbstractRectorTestCase +final class UseTypo3InformationForCopyRightNoticeRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseTypo3InformationForCopyRightNoticeRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v2/UseTypo3InformationForCopyRightNotice/config/configured_rule.php b/tests/Rector/v10/v2/UseTypo3InformationForCopyRightNotice/config/configured_rule.php new file mode 100644 index 000000000..a4b397758 --- /dev/null +++ b/tests/Rector/v10/v2/UseTypo3InformationForCopyRightNotice/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseTypo3InformationForCopyRightNoticeRector::class); +}; diff --git a/tests/Rector/v10/v3/RemoveExcludeOnTransOrigPointerField/RemoveExcludeOnTransOrigPointerFieldRectorTest.php b/tests/Rector/v10/v3/RemoveExcludeOnTransOrigPointerField/RemoveExcludeOnTransOrigPointerFieldRectorTest.php index 461ce8158..d8e32b131 100644 --- a/tests/Rector/v10/v3/RemoveExcludeOnTransOrigPointerField/RemoveExcludeOnTransOrigPointerFieldRectorTest.php +++ b/tests/Rector/v10/v3/RemoveExcludeOnTransOrigPointerField/RemoveExcludeOnTransOrigPointerFieldRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v3\RemoveExcludeOnTransOrigPointerField; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v3\RemoveExcludeOnTransOrigPointerFieldRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveExcludeOnTransOrigPointerFieldRectorTest extends AbstractRectorTestCase +final class RemoveExcludeOnTransOrigPointerFieldRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveExcludeOnTransOrigPointerFieldRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v3/RemoveExcludeOnTransOrigPointerField/config/configured_rule.php b/tests/Rector/v10/v3/RemoveExcludeOnTransOrigPointerField/config/configured_rule.php new file mode 100644 index 000000000..b5ed9bc45 --- /dev/null +++ b/tests/Rector/v10/v3/RemoveExcludeOnTransOrigPointerField/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveExcludeOnTransOrigPointerFieldRector::class); +}; diff --git a/tests/Rector/v10/v3/RemoveShowRecordFieldListInsideInterfaceSection/RemoveShowRecordFieldListInsideInterfaceSectionRectorTest.php b/tests/Rector/v10/v3/RemoveShowRecordFieldListInsideInterfaceSection/RemoveShowRecordFieldListInsideInterfaceSectionRectorTest.php index ae32e9f05..9243bcfa2 100644 --- a/tests/Rector/v10/v3/RemoveShowRecordFieldListInsideInterfaceSection/RemoveShowRecordFieldListInsideInterfaceSectionRectorTest.php +++ b/tests/Rector/v10/v3/RemoveShowRecordFieldListInsideInterfaceSection/RemoveShowRecordFieldListInsideInterfaceSectionRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v3\RemoveShowRecordFieldListInsideInterfaceSection; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v3\RemoveShowRecordFieldListInsideInterfaceSectionRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveShowRecordFieldListInsideInterfaceSectionRectorTest extends AbstractRectorTestCase +final class RemoveShowRecordFieldListInsideInterfaceSectionRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveShowRecordFieldListInsideInterfaceSectionRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v3/RemoveShowRecordFieldListInsideInterfaceSection/config/configured_rule.php b/tests/Rector/v10/v3/RemoveShowRecordFieldListInsideInterfaceSection/config/configured_rule.php new file mode 100644 index 000000000..67a7f04a0 --- /dev/null +++ b/tests/Rector/v10/v3/RemoveShowRecordFieldListInsideInterfaceSection/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveShowRecordFieldListInsideInterfaceSectionRector::class); +}; diff --git a/tests/Rector/v10/v3/SubstituteResourceFactory/SubstituteResourceFactoryRectorTest.php b/tests/Rector/v10/v3/SubstituteResourceFactory/SubstituteResourceFactoryRectorTest.php index 3941662c2..ebcab7fb9 100644 --- a/tests/Rector/v10/v3/SubstituteResourceFactory/SubstituteResourceFactoryRectorTest.php +++ b/tests/Rector/v10/v3/SubstituteResourceFactory/SubstituteResourceFactoryRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v3\SubstituteResourceFactory; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v3\SubstituteResourceFactoryRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class SubstituteResourceFactoryRectorTest extends AbstractRectorTestCase +final class SubstituteResourceFactoryRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return SubstituteResourceFactoryRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v3/SubstituteResourceFactory/config/configured_rule.php b/tests/Rector/v10/v3/SubstituteResourceFactory/config/configured_rule.php new file mode 100644 index 000000000..1f01e12b1 --- /dev/null +++ b/tests/Rector/v10/v3/SubstituteResourceFactory/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(SubstituteResourceFactoryRector::class); +}; diff --git a/tests/Rector/v10/v3/UseClassTypo3Information/UseClassTypo3InformationRectorTest.php b/tests/Rector/v10/v3/UseClassTypo3Information/UseClassTypo3InformationRectorTest.php index 5e3c04d97..65fb62db2 100644 --- a/tests/Rector/v10/v3/UseClassTypo3Information/UseClassTypo3InformationRectorTest.php +++ b/tests/Rector/v10/v3/UseClassTypo3Information/UseClassTypo3InformationRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v3\UseClassTypo3Information; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v3\UseClassTypo3InformationRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseClassTypo3InformationRectorTest extends AbstractRectorTestCase +final class UseClassTypo3InformationRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseClassTypo3InformationRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v3/UseClassTypo3Information/config/configured_rule.php b/tests/Rector/v10/v3/UseClassTypo3Information/config/configured_rule.php new file mode 100644 index 000000000..6038bd0b6 --- /dev/null +++ b/tests/Rector/v10/v3/UseClassTypo3Information/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseClassTypo3InformationRector::class); +}; diff --git a/tests/Rector/v10/v3/UseClassTypo3Version/UseClassTypo3VersionRectorTest.php b/tests/Rector/v10/v3/UseClassTypo3Version/UseClassTypo3VersionRectorTest.php index f94f3b9da..bc3bc5673 100644 --- a/tests/Rector/v10/v3/UseClassTypo3Version/UseClassTypo3VersionRectorTest.php +++ b/tests/Rector/v10/v3/UseClassTypo3Version/UseClassTypo3VersionRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v3\UseClassTypo3Version; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v3\UseClassTypo3VersionRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseClassTypo3VersionRectorTest extends AbstractRectorTestCase +final class UseClassTypo3VersionRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseClassTypo3VersionRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v3/UseClassTypo3Version/config/configured_rule.php b/tests/Rector/v10/v3/UseClassTypo3Version/config/configured_rule.php new file mode 100644 index 000000000..463a3b736 --- /dev/null +++ b/tests/Rector/v10/v3/UseClassTypo3Version/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseClassTypo3VersionRector::class); +}; diff --git a/tests/Rector/v10/v4/RemoveFormatConstantsEmailFinisher/Fixture/remove_format_constants.php.inc_temp b/tests/Rector/v10/v4/RemoveFormatConstantsEmailFinisher/Fixture/remove_format_constants.php.inc similarity index 100% rename from tests/Rector/v10/v4/RemoveFormatConstantsEmailFinisher/Fixture/remove_format_constants.php.inc_temp rename to tests/Rector/v10/v4/RemoveFormatConstantsEmailFinisher/Fixture/remove_format_constants.php.inc diff --git a/tests/Rector/v10/v4/RemoveFormatConstantsEmailFinisher/RemoveFormatConstantsEmailFinisherRectorTest.php b/tests/Rector/v10/v4/RemoveFormatConstantsEmailFinisher/RemoveFormatConstantsEmailFinisherRectorTest.php index afb1210f2..b970ea9c9 100644 --- a/tests/Rector/v10/v4/RemoveFormatConstantsEmailFinisher/RemoveFormatConstantsEmailFinisherRectorTest.php +++ b/tests/Rector/v10/v4/RemoveFormatConstantsEmailFinisher/RemoveFormatConstantsEmailFinisherRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v4\RemoveFormatConstantsEmailFinisher; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v0\RemoveFormatConstantsEmailFinisherRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveFormatConstantsEmailFinisherRectorTest extends AbstractRectorTestCase +final class RemoveFormatConstantsEmailFinisherRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveFormatConstantsEmailFinisherRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v4/RemoveFormatConstantsEmailFinisher/config/configured_rule.php b/tests/Rector/v10/v4/RemoveFormatConstantsEmailFinisher/config/configured_rule.php new file mode 100644 index 000000000..8c47a3208 --- /dev/null +++ b/tests/Rector/v10/v4/RemoveFormatConstantsEmailFinisher/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveFormatConstantsEmailFinisherRector::class); +}; diff --git a/tests/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRectorTest.php b/tests/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRectorTest.php index fa6de79bf..313d199e5 100644 --- a/tests/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRectorTest.php +++ b/tests/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v4\SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v4\SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRectorTest extends AbstractRectorTestCase +final class SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector/config/configured_rule.php b/tests/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector/config/configured_rule.php new file mode 100644 index 000000000..9b39c3f39 --- /dev/null +++ b/tests/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector::class); +}; diff --git a/tests/Rector/v10/v4/UnifiedFileNameValidatorRector/UnifiedFileNameValidatorRectorTest.php b/tests/Rector/v10/v4/UnifiedFileNameValidatorRector/UnifiedFileNameValidatorRectorTest.php index 2f2ee5f64..3b7c25754 100644 --- a/tests/Rector/v10/v4/UnifiedFileNameValidatorRector/UnifiedFileNameValidatorRectorTest.php +++ b/tests/Rector/v10/v4/UnifiedFileNameValidatorRector/UnifiedFileNameValidatorRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v4\UnifiedFileNameValidatorRector; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v4\UnifiedFileNameValidatorRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UnifiedFileNameValidatorRectorTest extends AbstractRectorTestCase +final class UnifiedFileNameValidatorRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UnifiedFileNameValidatorRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v4/UnifiedFileNameValidatorRector/config/configured_rule.php b/tests/Rector/v10/v4/UnifiedFileNameValidatorRector/config/configured_rule.php new file mode 100644 index 000000000..ecc2bcb3e --- /dev/null +++ b/tests/Rector/v10/v4/UnifiedFileNameValidatorRector/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UnifiedFileNameValidatorRector::class); +}; diff --git a/tests/Rector/v10/v4/UseFileGetContentsForGetUrl/UseFileGetContentsForGetUrlRectorTest.php b/tests/Rector/v10/v4/UseFileGetContentsForGetUrl/UseFileGetContentsForGetUrlRectorTest.php index a0633265d..ef12455e1 100644 --- a/tests/Rector/v10/v4/UseFileGetContentsForGetUrl/UseFileGetContentsForGetUrlRectorTest.php +++ b/tests/Rector/v10/v4/UseFileGetContentsForGetUrl/UseFileGetContentsForGetUrlRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v10\v4\UseFileGetContentsForGetUrl; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v10\v4\UseFileGetContentsForGetUrlRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseFileGetContentsForGetUrlRectorTest extends AbstractRectorTestCase +final class UseFileGetContentsForGetUrlRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseFileGetContentsForGetUrlRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v10/v4/UseFileGetContentsForGetUrl/config/configured_rule.php b/tests/Rector/v10/v4/UseFileGetContentsForGetUrl/config/configured_rule.php new file mode 100644 index 000000000..8a76dac12 --- /dev/null +++ b/tests/Rector/v10/v4/UseFileGetContentsForGetUrl/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseFileGetContentsForGetUrlRector::class); +}; diff --git a/tests/Rector/v11/v0/DateTimeAspectInsteadOfGlobalsExecTime/DateTimeAspectInsteadOfGlobalsExecTimeRectorTest.php b/tests/Rector/v11/v0/DateTimeAspectInsteadOfGlobalsExecTime/DateTimeAspectInsteadOfGlobalsExecTimeRectorTest.php index f7338a09a..399a58e8c 100644 --- a/tests/Rector/v11/v0/DateTimeAspectInsteadOfGlobalsExecTime/DateTimeAspectInsteadOfGlobalsExecTimeRectorTest.php +++ b/tests/Rector/v11/v0/DateTimeAspectInsteadOfGlobalsExecTime/DateTimeAspectInsteadOfGlobalsExecTimeRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v11\v0\DateTimeAspectInsteadOfGlobalsExecTime; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v11\v0\DateTimeAspectInsteadOfGlobalsExecTimeRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class DateTimeAspectInsteadOfGlobalsExecTimeRectorTest extends AbstractRectorTestCase +final class DateTimeAspectInsteadOfGlobalsExecTimeRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return DateTimeAspectInsteadOfGlobalsExecTimeRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v11/v0/DateTimeAspectInsteadOfGlobalsExecTime/config/configured_rule.php b/tests/Rector/v11/v0/DateTimeAspectInsteadOfGlobalsExecTime/config/configured_rule.php new file mode 100644 index 000000000..47ec5a181 --- /dev/null +++ b/tests/Rector/v11/v0/DateTimeAspectInsteadOfGlobalsExecTime/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(DateTimeAspectInsteadOfGlobalsExecTimeRector::class); +}; diff --git a/tests/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterface/ExtbaseControllerActionsMustReturnResponseInterfaceRectorTest.php b/tests/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterface/ExtbaseControllerActionsMustReturnResponseInterfaceRectorTest.php index 3bc002d24..1af2a1db8 100644 --- a/tests/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterface/ExtbaseControllerActionsMustReturnResponseInterfaceRectorTest.php +++ b/tests/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterface/ExtbaseControllerActionsMustReturnResponseInterfaceRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v11\v0\ExtbaseControllerActionsMustReturnResponseInterface; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v11\v0\ExtbaseControllerActionsMustReturnResponseInterfaceRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ExtbaseControllerActionsMustReturnResponseInterfaceRectorTest extends AbstractRectorTestCase +final class ExtbaseControllerActionsMustReturnResponseInterfaceRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return ExtbaseControllerActionsMustReturnResponseInterfaceRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterface/config/configured_rule.php b/tests/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterface/config/configured_rule.php new file mode 100644 index 000000000..37c21ea8d --- /dev/null +++ b/tests/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterface/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(ExtbaseControllerActionsMustReturnResponseInterfaceRector::class); +}; diff --git a/tests/Rector/v11/v0/ForwardResponseInsteadOfForwardMethod/ForwardResponseInsteadOfForwardMethodRectorTest.php b/tests/Rector/v11/v0/ForwardResponseInsteadOfForwardMethod/ForwardResponseInsteadOfForwardMethodRectorTest.php index fd246e17e..d43df4632 100644 --- a/tests/Rector/v11/v0/ForwardResponseInsteadOfForwardMethod/ForwardResponseInsteadOfForwardMethodRectorTest.php +++ b/tests/Rector/v11/v0/ForwardResponseInsteadOfForwardMethod/ForwardResponseInsteadOfForwardMethodRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v11\v0\ForwardResponseInsteadOfForwardMethod; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v11\v0\ForwardResponseInsteadOfForwardMethodRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ForwardResponseInsteadOfForwardMethodRectorTest extends AbstractRectorTestCase +final class ForwardResponseInsteadOfForwardMethodRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return ForwardResponseInsteadOfForwardMethodRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v11/v0/ForwardResponseInsteadOfForwardMethod/config/configured_rule.php b/tests/Rector/v11/v0/ForwardResponseInsteadOfForwardMethod/config/configured_rule.php new file mode 100644 index 000000000..8f27d63ab --- /dev/null +++ b/tests/Rector/v11/v0/ForwardResponseInsteadOfForwardMethod/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(ForwardResponseInsteadOfForwardMethodRector::class); +}; diff --git a/tests/Rector/v11/v0/GetClickMenuOnIconTagParameters/GetClickMenuOnIconTagParametersRectorTest.php b/tests/Rector/v11/v0/GetClickMenuOnIconTagParameters/GetClickMenuOnIconTagParametersRectorTest.php index 101ce1635..9d0151412 100644 --- a/tests/Rector/v11/v0/GetClickMenuOnIconTagParameters/GetClickMenuOnIconTagParametersRectorTest.php +++ b/tests/Rector/v11/v0/GetClickMenuOnIconTagParameters/GetClickMenuOnIconTagParametersRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v11\v0\GetClickMenuOnIconTagParameters; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v11\v0\GetClickMenuOnIconTagParametersRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class GetClickMenuOnIconTagParametersRectorTest extends AbstractRectorTestCase +final class GetClickMenuOnIconTagParametersRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return GetClickMenuOnIconTagParametersRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v11/v0/GetClickMenuOnIconTagParameters/config/configured_rule.php b/tests/Rector/v11/v0/GetClickMenuOnIconTagParameters/config/configured_rule.php new file mode 100644 index 000000000..af195c9ee --- /dev/null +++ b/tests/Rector/v11/v0/GetClickMenuOnIconTagParameters/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(GetClickMenuOnIconTagParametersRector::class); +}; diff --git a/tests/Rector/v11/v0/RemoveAddQueryStringMethod/RemoveAddQueryStringMethodRectorTest.php b/tests/Rector/v11/v0/RemoveAddQueryStringMethod/RemoveAddQueryStringMethodRectorTest.php index 36c86f52e..ee1fd15b9 100644 --- a/tests/Rector/v11/v0/RemoveAddQueryStringMethod/RemoveAddQueryStringMethodRectorTest.php +++ b/tests/Rector/v11/v0/RemoveAddQueryStringMethod/RemoveAddQueryStringMethodRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v11\v0\RemoveAddQueryStringMethod; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v11\v0\RemoveAddQueryStringMethodRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveAddQueryStringMethodRectorTest extends AbstractRectorTestCase +final class RemoveAddQueryStringMethodRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveAddQueryStringMethodRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v11/v0/RemoveAddQueryStringMethod/config/configured_rule.php b/tests/Rector/v11/v0/RemoveAddQueryStringMethod/config/configured_rule.php new file mode 100644 index 000000000..175d16287 --- /dev/null +++ b/tests/Rector/v11/v0/RemoveAddQueryStringMethod/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveAddQueryStringMethodRector::class); +}; diff --git a/tests/Rector/v11/v0/SubstituteConstantsModeAndRequestType/SubstituteConstantsModeAndRequestTypeRectorTest.php b/tests/Rector/v11/v0/SubstituteConstantsModeAndRequestType/SubstituteConstantsModeAndRequestTypeRectorTest.php index 3609e4cd8..e62461794 100644 --- a/tests/Rector/v11/v0/SubstituteConstantsModeAndRequestType/SubstituteConstantsModeAndRequestTypeRectorTest.php +++ b/tests/Rector/v11/v0/SubstituteConstantsModeAndRequestType/SubstituteConstantsModeAndRequestTypeRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v11\v0\SubstituteConstantsModeAndRequestType; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v11\v0\SubstituteConstantsModeAndRequestTypeRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class SubstituteConstantsModeAndRequestTypeRectorTest extends AbstractRectorTestCase +final class SubstituteConstantsModeAndRequestTypeRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return SubstituteConstantsModeAndRequestTypeRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v11/v0/SubstituteConstantsModeAndRequestType/config/configured_rule.php b/tests/Rector/v11/v0/SubstituteConstantsModeAndRequestType/config/configured_rule.php new file mode 100644 index 000000000..97b44d18c --- /dev/null +++ b/tests/Rector/v11/v0/SubstituteConstantsModeAndRequestType/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(SubstituteConstantsModeAndRequestTypeRector::class); +}; diff --git a/tests/Rector/v11/v0/UniqueListFromStringUtility/UniqueListFromStringUtilityRectorTest.php b/tests/Rector/v11/v0/UniqueListFromStringUtility/UniqueListFromStringUtilityRectorTest.php index 1f80453e1..aaf6a431d 100644 --- a/tests/Rector/v11/v0/UniqueListFromStringUtility/UniqueListFromStringUtilityRectorTest.php +++ b/tests/Rector/v11/v0/UniqueListFromStringUtility/UniqueListFromStringUtilityRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v11\v0\UniqueListFromStringUtility; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v11\v0\UniqueListFromStringUtilityRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UniqueListFromStringUtilityRectorTest extends AbstractRectorTestCase +final class UniqueListFromStringUtilityRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UniqueListFromStringUtilityRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v11/v0/UniqueListFromStringUtility/config/configured_rule.php b/tests/Rector/v11/v0/UniqueListFromStringUtility/config/configured_rule.php new file mode 100644 index 000000000..eef22fd82 --- /dev/null +++ b/tests/Rector/v11/v0/UniqueListFromStringUtility/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UniqueListFromStringUtilityRector::class); +}; diff --git a/tests/Rector/v7/v0/RemoveDivider2TabsConfiguration/RemoveDivider2TabsConfigurationRectorTest.php b/tests/Rector/v7/v0/RemoveDivider2TabsConfiguration/RemoveDivider2TabsConfigurationRectorTest.php index d18266043..fda131cea 100644 --- a/tests/Rector/v7/v0/RemoveDivider2TabsConfiguration/RemoveDivider2TabsConfigurationRectorTest.php +++ b/tests/Rector/v7/v0/RemoveDivider2TabsConfiguration/RemoveDivider2TabsConfigurationRectorTest.php @@ -5,12 +5,11 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v0\RemoveDivider2TabsConfiguration; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v0\RemoveDivider2TabsConfigurationRector; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveDivider2TabsConfigurationRectorTest extends AbstractRectorTestCase +final class RemoveDivider2TabsConfigurationRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -25,8 +24,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveDivider2TabsConfigurationRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v0/RemoveDivider2TabsConfiguration/config/configured_rule.php b/tests/Rector/v7/v0/RemoveDivider2TabsConfiguration/config/configured_rule.php new file mode 100644 index 000000000..69b6c4a70 --- /dev/null +++ b/tests/Rector/v7/v0/RemoveDivider2TabsConfiguration/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveDivider2TabsConfigurationRector::class); +}; diff --git a/tests/Rector/v7/v0/RemoveMethodCallConnectDb/RemoveMethodCallConnectDbRectorTest.php b/tests/Rector/v7/v0/RemoveMethodCallConnectDb/RemoveMethodCallConnectDbRectorTest.php index 019cb24a4..091c01672 100644 --- a/tests/Rector/v7/v0/RemoveMethodCallConnectDb/RemoveMethodCallConnectDbRectorTest.php +++ b/tests/Rector/v7/v0/RemoveMethodCallConnectDb/RemoveMethodCallConnectDbRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v0\RemoveMethodCallConnectDb; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v0\RemoveMethodCallConnectDbRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveMethodCallConnectDbRectorTest extends AbstractRectorTestCase +final class RemoveMethodCallConnectDbRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveMethodCallConnectDbRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v0/RemoveMethodCallConnectDb/config/configured_rule.php b/tests/Rector/v7/v0/RemoveMethodCallConnectDb/config/configured_rule.php new file mode 100644 index 000000000..5e1e1fbd6 --- /dev/null +++ b/tests/Rector/v7/v0/RemoveMethodCallConnectDb/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveMethodCallConnectDbRector::class); +}; diff --git a/tests/Rector/v7/v0/RemoveMethodCallLoadTca/RemoveMethodCallLoadTcaRectorTest.php b/tests/Rector/v7/v0/RemoveMethodCallLoadTca/RemoveMethodCallLoadTcaRectorTest.php index 3e41585fe..c5d386a00 100644 --- a/tests/Rector/v7/v0/RemoveMethodCallLoadTca/RemoveMethodCallLoadTcaRectorTest.php +++ b/tests/Rector/v7/v0/RemoveMethodCallLoadTca/RemoveMethodCallLoadTcaRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v0\RemoveMethodCallLoadTca; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v0\RemoveMethodCallLoadTcaRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveMethodCallLoadTcaRectorTest extends AbstractRectorTestCase +final class RemoveMethodCallLoadTcaRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveMethodCallLoadTcaRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v0/RemoveMethodCallLoadTca/config/configured_rule.php b/tests/Rector/v7/v0/RemoveMethodCallLoadTca/config/configured_rule.php new file mode 100644 index 000000000..37fd07294 --- /dev/null +++ b/tests/Rector/v7/v0/RemoveMethodCallLoadTca/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveMethodCallLoadTcaRector::class); +}; diff --git a/tests/Rector/v7/v0/TypeHandlingServiceToTypeHandlingUtility/TypeHandlingServiceToTypeHandlingUtilityRectorTest.php b/tests/Rector/v7/v0/TypeHandlingServiceToTypeHandlingUtility/TypeHandlingServiceToTypeHandlingUtilityRectorTest.php index 8cecbb710..6f8ba1b60 100644 --- a/tests/Rector/v7/v0/TypeHandlingServiceToTypeHandlingUtility/TypeHandlingServiceToTypeHandlingUtilityRectorTest.php +++ b/tests/Rector/v7/v0/TypeHandlingServiceToTypeHandlingUtility/TypeHandlingServiceToTypeHandlingUtilityRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v0\TypeHandlingServiceToTypeHandlingUtility; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v0\TypeHandlingServiceToTypeHandlingUtilityRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class TypeHandlingServiceToTypeHandlingUtilityRectorTest extends AbstractRectorTestCase +final class TypeHandlingServiceToTypeHandlingUtilityRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return TypeHandlingServiceToTypeHandlingUtilityRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v0/TypeHandlingServiceToTypeHandlingUtility/config/configured_rule.php b/tests/Rector/v7/v0/TypeHandlingServiceToTypeHandlingUtility/config/configured_rule.php new file mode 100644 index 000000000..5e714f0a0 --- /dev/null +++ b/tests/Rector/v7/v0/TypeHandlingServiceToTypeHandlingUtility/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(TypeHandlingServiceToTypeHandlingUtilityRector::class); +}; diff --git a/tests/Rector/v7/v1/GetTemporaryImageWithText/GetTemporaryImageWithTextRectorTest.php b/tests/Rector/v7/v1/GetTemporaryImageWithText/GetTemporaryImageWithTextRectorTest.php index e9255e4b2..6623a8c46 100644 --- a/tests/Rector/v7/v1/GetTemporaryImageWithText/GetTemporaryImageWithTextRectorTest.php +++ b/tests/Rector/v7/v1/GetTemporaryImageWithText/GetTemporaryImageWithTextRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v1\GetTemporaryImageWithText; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v1\GetTemporaryImageWithTextRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class GetTemporaryImageWithTextRectorTest extends AbstractRectorTestCase +final class GetTemporaryImageWithTextRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return GetTemporaryImageWithTextRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v1/GetTemporaryImageWithText/config/configured_rule.php b/tests/Rector/v7/v1/GetTemporaryImageWithText/config/configured_rule.php new file mode 100644 index 000000000..354a9bcdc --- /dev/null +++ b/tests/Rector/v7/v1/GetTemporaryImageWithText/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(GetTemporaryImageWithTextRector::class); +}; diff --git a/tests/Rector/v7/v4/DropAdditionalPalette/DropAdditionalPaletteRectorTest.php b/tests/Rector/v7/v4/DropAdditionalPalette/DropAdditionalPaletteRectorTest.php index 77a7c5ee3..5d362a474 100644 --- a/tests/Rector/v7/v4/DropAdditionalPalette/DropAdditionalPaletteRectorTest.php +++ b/tests/Rector/v7/v4/DropAdditionalPalette/DropAdditionalPaletteRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v4\DropAdditionalPalette; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v4\DropAdditionalPaletteRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class DropAdditionalPaletteRectorTest extends AbstractRectorTestCase +final class DropAdditionalPaletteRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return DropAdditionalPaletteRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v4/DropAdditionalPalette/config/configured_rule.php b/tests/Rector/v7/v4/DropAdditionalPalette/config/configured_rule.php new file mode 100644 index 000000000..c10ad7e5d --- /dev/null +++ b/tests/Rector/v7/v4/DropAdditionalPalette/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(DropAdditionalPaletteRector::class); +}; diff --git a/tests/Rector/v7/v4/InstantiatePageRendererExplicitly/InstantiatePageRendererExplicitlyRectorTest.php b/tests/Rector/v7/v4/InstantiatePageRendererExplicitly/InstantiatePageRendererExplicitlyRectorTest.php index e9bc191e6..24fc9b0ec 100644 --- a/tests/Rector/v7/v4/InstantiatePageRendererExplicitly/InstantiatePageRendererExplicitlyRectorTest.php +++ b/tests/Rector/v7/v4/InstantiatePageRendererExplicitly/InstantiatePageRendererExplicitlyRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v4\InstantiatePageRendererExplicitly; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v4\InstantiatePageRendererExplicitlyRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class InstantiatePageRendererExplicitlyRectorTest extends AbstractRectorTestCase +final class InstantiatePageRendererExplicitlyRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return InstantiatePageRendererExplicitlyRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v4/InstantiatePageRendererExplicitly/config/configured_rule.php b/tests/Rector/v7/v4/InstantiatePageRendererExplicitly/config/configured_rule.php new file mode 100644 index 000000000..bf6c44097 --- /dev/null +++ b/tests/Rector/v7/v4/InstantiatePageRendererExplicitly/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(InstantiatePageRendererExplicitlyRector::class); +}; diff --git a/tests/Rector/v7/v4/MethodReadLLFileToLocalizationFactory/MethodReadLLFileToLocalizationFactoryRectorTest.php b/tests/Rector/v7/v4/MethodReadLLFileToLocalizationFactory/MethodReadLLFileToLocalizationFactoryRectorTest.php index 104be730e..778ca735a 100644 --- a/tests/Rector/v7/v4/MethodReadLLFileToLocalizationFactory/MethodReadLLFileToLocalizationFactoryRectorTest.php +++ b/tests/Rector/v7/v4/MethodReadLLFileToLocalizationFactory/MethodReadLLFileToLocalizationFactoryRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v4\MethodReadLLFileToLocalizationFactory; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v4\MethodReadLLFileToLocalizationFactoryRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class MethodReadLLFileToLocalizationFactoryRectorTest extends AbstractRectorTestCase +final class MethodReadLLFileToLocalizationFactoryRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return MethodReadLLFileToLocalizationFactoryRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v4/MethodReadLLFileToLocalizationFactory/config/configured_rule.php b/tests/Rector/v7/v4/MethodReadLLFileToLocalizationFactory/config/configured_rule.php new file mode 100644 index 000000000..d4a6a9d80 --- /dev/null +++ b/tests/Rector/v7/v4/MethodReadLLFileToLocalizationFactory/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(MethodReadLLFileToLocalizationFactoryRector::class); +}; diff --git a/tests/Rector/v7/v4/MoveLanguageFilesFromRemovedCmsExtension/MoveLanguageFilesFromRemovedCmsExtensionRectorTest.php b/tests/Rector/v7/v4/MoveLanguageFilesFromRemovedCmsExtension/MoveLanguageFilesFromRemovedCmsExtensionRectorTest.php index a5ae70db6..1b8c84923 100644 --- a/tests/Rector/v7/v4/MoveLanguageFilesFromRemovedCmsExtension/MoveLanguageFilesFromRemovedCmsExtensionRectorTest.php +++ b/tests/Rector/v7/v4/MoveLanguageFilesFromRemovedCmsExtension/MoveLanguageFilesFromRemovedCmsExtensionRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v4\MoveLanguageFilesFromRemovedCmsExtension; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v4\MoveLanguageFilesFromRemovedCmsExtensionRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class MoveLanguageFilesFromRemovedCmsExtensionRectorTest extends AbstractRectorTestCase +final class MoveLanguageFilesFromRemovedCmsExtensionRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return MoveLanguageFilesFromRemovedCmsExtensionRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v4/MoveLanguageFilesFromRemovedCmsExtension/config/configured_rule.php b/tests/Rector/v7/v4/MoveLanguageFilesFromRemovedCmsExtension/config/configured_rule.php new file mode 100644 index 000000000..8a4933ef0 --- /dev/null +++ b/tests/Rector/v7/v4/MoveLanguageFilesFromRemovedCmsExtension/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(MoveLanguageFilesFromRemovedCmsExtensionRector::class); +}; diff --git a/tests/Rector/v7/v5/RemoveIconsInOptionTags/RemoveIconsInOptionTagsRectorTest.php b/tests/Rector/v7/v5/RemoveIconsInOptionTags/RemoveIconsInOptionTagsRectorTest.php index 12b3946b9..29da4dcc1 100644 --- a/tests/Rector/v7/v5/RemoveIconsInOptionTags/RemoveIconsInOptionTagsRectorTest.php +++ b/tests/Rector/v7/v5/RemoveIconsInOptionTags/RemoveIconsInOptionTagsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v5\RemoveIconsInOptionTags; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v5\RemoveIconsInOptionTagsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveIconsInOptionTagsRectorTest extends AbstractRectorTestCase +final class RemoveIconsInOptionTagsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveIconsInOptionTagsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v5/RemoveIconsInOptionTags/config/configured_rule.php b/tests/Rector/v7/v5/RemoveIconsInOptionTags/config/configured_rule.php new file mode 100644 index 000000000..73e4bbe46 --- /dev/null +++ b/tests/Rector/v7/v5/RemoveIconsInOptionTags/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveIconsInOptionTagsRector::class); +}; diff --git a/tests/Rector/v7/v5/UseExtPrefixForTcaIconFile/UseExtPrefixForTcaIconFileRectorTest.php b/tests/Rector/v7/v5/UseExtPrefixForTcaIconFile/UseExtPrefixForTcaIconFileRectorTest.php index ad9ebe9dc..433b17e21 100644 --- a/tests/Rector/v7/v5/UseExtPrefixForTcaIconFile/UseExtPrefixForTcaIconFileRectorTest.php +++ b/tests/Rector/v7/v5/UseExtPrefixForTcaIconFile/UseExtPrefixForTcaIconFileRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v5\UseExtPrefixForTcaIconFile; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v5\UseExtPrefixForTcaIconFileRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseExtPrefixForTcaIconFileRectorTest extends AbstractRectorTestCase +final class UseExtPrefixForTcaIconFileRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseExtPrefixForTcaIconFileRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v5/UseExtPrefixForTcaIconFile/config/configured_rule.php b/tests/Rector/v7/v5/UseExtPrefixForTcaIconFile/config/configured_rule.php new file mode 100644 index 000000000..62b9ceb23 --- /dev/null +++ b/tests/Rector/v7/v5/UseExtPrefixForTcaIconFile/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseExtPrefixForTcaIconFileRector::class); +}; diff --git a/tests/Rector/v7/v6/AddRenderTypeToSelectField/AddRenderTypeToSelectFieldRectorTest.php b/tests/Rector/v7/v6/AddRenderTypeToSelectField/AddRenderTypeToSelectFieldRectorTest.php index 0c96ebff4..55100bdaa 100644 --- a/tests/Rector/v7/v6/AddRenderTypeToSelectField/AddRenderTypeToSelectFieldRectorTest.php +++ b/tests/Rector/v7/v6/AddRenderTypeToSelectField/AddRenderTypeToSelectFieldRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v6\AddRenderTypeToSelectField; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v6\AddRenderTypeToSelectFieldRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class AddRenderTypeToSelectFieldRectorTest extends AbstractRectorTestCase +final class AddRenderTypeToSelectFieldRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return AddRenderTypeToSelectFieldRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v6/AddRenderTypeToSelectField/config/configured_rule.php b/tests/Rector/v7/v6/AddRenderTypeToSelectField/config/configured_rule.php new file mode 100644 index 000000000..e57a106ac --- /dev/null +++ b/tests/Rector/v7/v6/AddRenderTypeToSelectField/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(AddRenderTypeToSelectFieldRector::class); +}; diff --git a/tests/Rector/v7/v6/MigrateT3editorWizardToRenderTypeT3editor/MigrateT3editorWizardToRenderTypeT3editorRectorTest.php b/tests/Rector/v7/v6/MigrateT3editorWizardToRenderTypeT3editor/MigrateT3editorWizardToRenderTypeT3editorRectorTest.php index de08f105b..f77d98196 100644 --- a/tests/Rector/v7/v6/MigrateT3editorWizardToRenderTypeT3editor/MigrateT3editorWizardToRenderTypeT3editorRectorTest.php +++ b/tests/Rector/v7/v6/MigrateT3editorWizardToRenderTypeT3editor/MigrateT3editorWizardToRenderTypeT3editorRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v6\MigrateT3editorWizardToRenderTypeT3editor; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v6\MigrateT3editorWizardToRenderTypeT3editorRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class MigrateT3editorWizardToRenderTypeT3editorRectorTest extends AbstractRectorTestCase +final class MigrateT3editorWizardToRenderTypeT3editorRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return MigrateT3editorWizardToRenderTypeT3editorRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v6/MigrateT3editorWizardToRenderTypeT3editor/config/configured_rule.php b/tests/Rector/v7/v6/MigrateT3editorWizardToRenderTypeT3editor/config/configured_rule.php new file mode 100644 index 000000000..d199d0f8d --- /dev/null +++ b/tests/Rector/v7/v6/MigrateT3editorWizardToRenderTypeT3editor/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(MigrateT3editorWizardToRenderTypeT3editorRector::class); +}; diff --git a/tests/Rector/v7/v6/RemoveIconOptionForRenderTypeSelect/RemoveIconOptionForRenderTypeSelectRectorTest.php b/tests/Rector/v7/v6/RemoveIconOptionForRenderTypeSelect/RemoveIconOptionForRenderTypeSelectRectorTest.php index 7b1da9ed3..0e4f06dd1 100644 --- a/tests/Rector/v7/v6/RemoveIconOptionForRenderTypeSelect/RemoveIconOptionForRenderTypeSelectRectorTest.php +++ b/tests/Rector/v7/v6/RemoveIconOptionForRenderTypeSelect/RemoveIconOptionForRenderTypeSelectRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v6\RemoveIconOptionForRenderTypeSelect; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v6\RemoveIconOptionForRenderTypeSelectRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveIconOptionForRenderTypeSelectRectorTest extends AbstractRectorTestCase +final class RemoveIconOptionForRenderTypeSelectRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveIconOptionForRenderTypeSelectRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v6/RemoveIconOptionForRenderTypeSelect/config/configured_rule.php b/tests/Rector/v7/v6/RemoveIconOptionForRenderTypeSelect/config/configured_rule.php new file mode 100644 index 000000000..3492dcf3a --- /dev/null +++ b/tests/Rector/v7/v6/RemoveIconOptionForRenderTypeSelect/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveIconOptionForRenderTypeSelectRector::class); +}; diff --git a/tests/Rector/v7/v6/RenamePiListBrowserResults/RenamePiListBrowserResultsRectorTest.php b/tests/Rector/v7/v6/RenamePiListBrowserResults/RenamePiListBrowserResultsRectorTest.php index 4ab9c44bb..2bb402cce 100644 --- a/tests/Rector/v7/v6/RenamePiListBrowserResults/RenamePiListBrowserResultsRectorTest.php +++ b/tests/Rector/v7/v6/RenamePiListBrowserResults/RenamePiListBrowserResultsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v6\RenamePiListBrowserResults; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v6\RenamePiListBrowserResultsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RenamePiListBrowserResultsRectorTest extends AbstractRectorTestCase +final class RenamePiListBrowserResultsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RenamePiListBrowserResultsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v6/RenamePiListBrowserResults/config/configured_rule.php b/tests/Rector/v7/v6/RenamePiListBrowserResults/config/configured_rule.php new file mode 100644 index 000000000..31f2e2780 --- /dev/null +++ b/tests/Rector/v7/v6/RenamePiListBrowserResults/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RenamePiListBrowserResultsRector::class); +}; diff --git a/tests/Rector/v7/v6/WrapClickMenuOnIcon/WrapClickMenuOnIconRectorTest.php b/tests/Rector/v7/v6/WrapClickMenuOnIcon/WrapClickMenuOnIconRectorTest.php index 8a3055eda..c3669949f 100644 --- a/tests/Rector/v7/v6/WrapClickMenuOnIcon/WrapClickMenuOnIconRectorTest.php +++ b/tests/Rector/v7/v6/WrapClickMenuOnIcon/WrapClickMenuOnIconRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v7\v6\WrapClickMenuOnIcon; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v7\v6\WrapClickMenuOnIconRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class WrapClickMenuOnIconRectorTest extends AbstractRectorTestCase +final class WrapClickMenuOnIconRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return WrapClickMenuOnIconRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v7/v6/WrapClickMenuOnIcon/config/configured_rule.php b/tests/Rector/v7/v6/WrapClickMenuOnIcon/config/configured_rule.php new file mode 100644 index 000000000..505a31108 --- /dev/null +++ b/tests/Rector/v7/v6/WrapClickMenuOnIcon/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(WrapClickMenuOnIconRector::class); +}; diff --git a/tests/Rector/v8/v0/ChangeMethodCallsForStandaloneView/ChangeMethodCallsForStandaloneViewRectorTest.php b/tests/Rector/v8/v0/ChangeMethodCallsForStandaloneView/ChangeMethodCallsForStandaloneViewRectorTest.php index 6c598c1f8..794530be8 100644 --- a/tests/Rector/v8/v0/ChangeMethodCallsForStandaloneView/ChangeMethodCallsForStandaloneViewRectorTest.php +++ b/tests/Rector/v8/v0/ChangeMethodCallsForStandaloneView/ChangeMethodCallsForStandaloneViewRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\ChangeMethodCallsForStandaloneView; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\ChangeMethodCallsForStandaloneViewRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ChangeMethodCallsForStandaloneViewRectorTest extends AbstractRectorTestCase +final class ChangeMethodCallsForStandaloneViewRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return ChangeMethodCallsForStandaloneViewRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/ChangeMethodCallsForStandaloneView/config/configured_rule.php b/tests/Rector/v8/v0/ChangeMethodCallsForStandaloneView/config/configured_rule.php new file mode 100644 index 000000000..793b6334a --- /dev/null +++ b/tests/Rector/v8/v0/ChangeMethodCallsForStandaloneView/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(ChangeMethodCallsForStandaloneViewRector::class); +}; diff --git a/tests/Rector/v8/v0/Core/Html/Fixture/refactor_removed_marker_methods_from_html_parser.php.inc b/tests/Rector/v8/v0/Core/Html/Fixture/refactor_removed_marker_methods_from_html_parser.php.inc index 9c28e5eb5..11b3cb793 100644 --- a/tests/Rector/v8/v0/Core/Html/Fixture/refactor_removed_marker_methods_from_html_parser.php.inc +++ b/tests/Rector/v8/v0/Core/Html/Fixture/refactor_removed_marker_methods_from_html_parser.php.inc @@ -38,7 +38,6 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\Core\Html\Fixture; use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Core\Service\MarkerBasedTemplateService; use TYPO3\CMS\Core\Html\HtmlParser; final class HtmlParserMarkerRendererMethods @@ -50,14 +49,17 @@ final class HtmlParserMarkerRendererMethods $markerArray = []; $subpartArray = []; $htmlparser = GeneralUtility::makeInstance(HtmlParser::class); - $template = GeneralUtility::makeInstance(MarkerBasedTemplateService::class)->getSubpart($this->config['templateFile'], '###TEMPLATE###'); - $html = GeneralUtility::makeInstance(MarkerBasedTemplateService::class)->substituteSubpart($html, '###ADDITONAL_KEYWORD###', ''); - $html2 = GeneralUtility::makeInstance(MarkerBasedTemplateService::class)->substituteSubpartArray($html2, []); - - $content = GeneralUtility::makeInstance(MarkerBasedTemplateService::class)->substituteMarker($content, $marker, $markContent); - $content .= GeneralUtility::makeInstance(MarkerBasedTemplateService::class)->substituteMarkerArray($content, $markContentArray, $wrap, $uppercase, $deleteUnused); - $content .= GeneralUtility::makeInstance(MarkerBasedTemplateService::class)->substituteMarkerAndSubpartArrayRecursive($content, $markersAndSubparts, $wrap, $uppercase, $deleteUnused); - $content = $htmlparser->HTMLcleaner($content); + $template = $htmlparser->getSubpart($this->config['templateFile'], '###TEMPLATE###'); + $html = $htmlparser->substituteSubpart($html, '###ADDITONAL_KEYWORD###', ''); + $html2 = $htmlparser->substituteSubpartArray($html2, []); + + $html3 = $htmlparser->processTag($value, $conf, $endTag, $protected = 0); + $html4 = $htmlparser->processContent($value, $dir, $conf); + + $content = $htmlparser->substituteMarker($content, $marker, $markContent); + $content .= $htmlparser->substituteMarkerArray($content, $markContentArray, $wrap, $uppercase, $deleteUnused); + $content .= $htmlparser->substituteMarkerAndSubpartArrayRecursive($content, $markersAndSubparts, $wrap, $uppercase, $deleteUnused); + $content = $htmlparser->XHTML_clean($content); } diff --git a/tests/Rector/v8/v0/Core/Html/RefactorRemovedMarkerMethodsFromHtmlParserRectorTest.php b/tests/Rector/v8/v0/Core/Html/RefactorRemovedMarkerMethodsFromHtmlParserRectorTest.php index 0bda2a356..3bd240c5c 100644 --- a/tests/Rector/v8/v0/Core/Html/RefactorRemovedMarkerMethodsFromHtmlParserRectorTest.php +++ b/tests/Rector/v8/v0/Core/Html/RefactorRemovedMarkerMethodsFromHtmlParserRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\Core\Html; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\RefactorRemovedMarkerMethodsFromHtmlParserRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorRemovedMarkerMethodsFromHtmlParserRectorTest extends AbstractRectorTestCase +final class RefactorRemovedMarkerMethodsFromHtmlParserRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator yield [new SmartFileInfo(__DIR__ . '/Fixture/refactor_removed_marker_methods_from_html_parser.php.inc')]; } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorRemovedMarkerMethodsFromHtmlParserRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/Core/Html/RemoveRteHtmlParserEvalWriteFileRectorTest.php b/tests/Rector/v8/v0/Core/Html/RemoveRteHtmlParserEvalWriteFileRectorTest.php index 349aab29d..6088e25ed 100644 --- a/tests/Rector/v8/v0/Core/Html/RemoveRteHtmlParserEvalWriteFileRectorTest.php +++ b/tests/Rector/v8/v0/Core/Html/RemoveRteHtmlParserEvalWriteFileRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\Core\Html; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\RemoveRteHtmlParserEvalWriteFileRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveRteHtmlParserEvalWriteFileRectorTest extends AbstractRectorTestCase +final class RemoveRteHtmlParserEvalWriteFileRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator yield [new SmartFileInfo(__DIR__ . '/Fixture/remove_rte_html_parser_eval_write_file.php.inc')]; } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveRteHtmlParserEvalWriteFileRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/Core/Html/config/configured_rule.php b/tests/Rector/v8/v0/Core/Html/config/configured_rule.php new file mode 100644 index 000000000..3fdd6d3f9 --- /dev/null +++ b/tests/Rector/v8/v0/Core/Html/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveRteHtmlParserEvalWriteFileRector::class); +}; diff --git a/tests/Rector/v8/v0/GetFileAbsFileNameRemoveDeprecatedArguments/GetFileAbsFileNameRemoveDeprecatedArgumentsRectorTest.php b/tests/Rector/v8/v0/GetFileAbsFileNameRemoveDeprecatedArguments/GetFileAbsFileNameRemoveDeprecatedArgumentsRectorTest.php index 72d8a8e48..0c3229538 100644 --- a/tests/Rector/v8/v0/GetFileAbsFileNameRemoveDeprecatedArguments/GetFileAbsFileNameRemoveDeprecatedArgumentsRectorTest.php +++ b/tests/Rector/v8/v0/GetFileAbsFileNameRemoveDeprecatedArguments/GetFileAbsFileNameRemoveDeprecatedArgumentsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\GetFileAbsFileNameRemoveDeprecatedArguments; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\GetFileAbsFileNameRemoveDeprecatedArgumentsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class GetFileAbsFileNameRemoveDeprecatedArgumentsRectorTest extends AbstractRectorTestCase +final class GetFileAbsFileNameRemoveDeprecatedArgumentsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return GetFileAbsFileNameRemoveDeprecatedArgumentsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/GetFileAbsFileNameRemoveDeprecatedArguments/config/configured_rule.php b/tests/Rector/v8/v0/GetFileAbsFileNameRemoveDeprecatedArguments/config/configured_rule.php new file mode 100644 index 000000000..a4b2add25 --- /dev/null +++ b/tests/Rector/v8/v0/GetFileAbsFileNameRemoveDeprecatedArguments/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(GetFileAbsFileNameRemoveDeprecatedArgumentsRector::class); +}; diff --git a/tests/Rector/v8/v0/GetPreferredClientLanguage/GetPreferredClientLanguageRectorTest.php b/tests/Rector/v8/v0/GetPreferredClientLanguage/GetPreferredClientLanguageRectorTest.php index 7b9fb6704..18bfad2fb 100644 --- a/tests/Rector/v8/v0/GetPreferredClientLanguage/GetPreferredClientLanguageRectorTest.php +++ b/tests/Rector/v8/v0/GetPreferredClientLanguage/GetPreferredClientLanguageRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\GetPreferredClientLanguage; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\GetPreferredClientLanguageRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class GetPreferredClientLanguageRectorTest extends AbstractRectorTestCase +final class GetPreferredClientLanguageRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return GetPreferredClientLanguageRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/GetPreferredClientLanguage/config/configured_rule.php b/tests/Rector/v8/v0/GetPreferredClientLanguage/config/configured_rule.php new file mode 100644 index 000000000..06c3e7319 --- /dev/null +++ b/tests/Rector/v8/v0/GetPreferredClientLanguage/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(GetPreferredClientLanguageRector::class); +}; diff --git a/tests/Rector/v8/v0/PrependAbsolutePathToGetFileAbsFileName/PrependAbsolutePathToGetFileAbsFileNameRectorTest.php b/tests/Rector/v8/v0/PrependAbsolutePathToGetFileAbsFileName/PrependAbsolutePathToGetFileAbsFileNameRectorTest.php index 4bb86efd9..7e954eca6 100644 --- a/tests/Rector/v8/v0/PrependAbsolutePathToGetFileAbsFileName/PrependAbsolutePathToGetFileAbsFileNameRectorTest.php +++ b/tests/Rector/v8/v0/PrependAbsolutePathToGetFileAbsFileName/PrependAbsolutePathToGetFileAbsFileNameRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\PrependAbsolutePathToGetFileAbsFileName; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\PrependAbsolutePathToGetFileAbsFileNameRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class PrependAbsolutePathToGetFileAbsFileNameRectorTest extends AbstractRectorTestCase +final class PrependAbsolutePathToGetFileAbsFileNameRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return PrependAbsolutePathToGetFileAbsFileNameRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/PrependAbsolutePathToGetFileAbsFileName/config/configured_rule.php b/tests/Rector/v8/v0/PrependAbsolutePathToGetFileAbsFileName/config/configured_rule.php new file mode 100644 index 000000000..6bb7eb50d --- /dev/null +++ b/tests/Rector/v8/v0/PrependAbsolutePathToGetFileAbsFileName/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(PrependAbsolutePathToGetFileAbsFileNameRector::class); +}; diff --git a/tests/Rector/v8/v0/RandomMethodsToRandomClass/RandomMethodsToRandomClassRectorTest.php b/tests/Rector/v8/v0/RandomMethodsToRandomClass/RandomMethodsToRandomClassRectorTest.php index eaa55e8d3..e153c35a4 100644 --- a/tests/Rector/v8/v0/RandomMethodsToRandomClass/RandomMethodsToRandomClassRectorTest.php +++ b/tests/Rector/v8/v0/RandomMethodsToRandomClass/RandomMethodsToRandomClassRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\RandomMethodsToRandomClass; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\RandomMethodsToRandomClassRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RandomMethodsToRandomClassRectorTest extends AbstractRectorTestCase +final class RandomMethodsToRandomClassRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RandomMethodsToRandomClassRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/RandomMethodsToRandomClass/config/configured_rule.php b/tests/Rector/v8/v0/RandomMethodsToRandomClass/config/configured_rule.php new file mode 100644 index 000000000..2486384d4 --- /dev/null +++ b/tests/Rector/v8/v0/RandomMethodsToRandomClass/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RandomMethodsToRandomClassRector::class); +}; diff --git a/tests/Rector/v8/v0/RefactorRemovedMethodsFromContentObjectRenderer/RefactorRemovedMethodsFromContentObjectRendererRectorTest.php b/tests/Rector/v8/v0/RefactorRemovedMethodsFromContentObjectRenderer/RefactorRemovedMethodsFromContentObjectRendererRectorTest.php index f04ad8b9a..2f955ede8 100644 --- a/tests/Rector/v8/v0/RefactorRemovedMethodsFromContentObjectRenderer/RefactorRemovedMethodsFromContentObjectRendererRectorTest.php +++ b/tests/Rector/v8/v0/RefactorRemovedMethodsFromContentObjectRenderer/RefactorRemovedMethodsFromContentObjectRendererRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\RefactorRemovedMethodsFromContentObjectRenderer; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\RefactorRemovedMethodsFromContentObjectRendererRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorRemovedMethodsFromContentObjectRendererRectorTest extends AbstractRectorTestCase +final class RefactorRemovedMethodsFromContentObjectRendererRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorRemovedMethodsFromContentObjectRendererRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/RefactorRemovedMethodsFromContentObjectRenderer/config/configured_rule.php b/tests/Rector/v8/v0/RefactorRemovedMethodsFromContentObjectRenderer/config/configured_rule.php new file mode 100644 index 000000000..9901fa4b9 --- /dev/null +++ b/tests/Rector/v8/v0/RefactorRemovedMethodsFromContentObjectRenderer/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorRemovedMethodsFromContentObjectRendererRector::class); +}; diff --git a/tests/Rector/v8/v0/RefactorRemovedMethodsFromGeneralUtility/RefactorRemovedMethodsFromGeneralUtilityRectorTest.php b/tests/Rector/v8/v0/RefactorRemovedMethodsFromGeneralUtility/RefactorRemovedMethodsFromGeneralUtilityRectorTest.php index fe0b01e83..4997ba3ae 100644 --- a/tests/Rector/v8/v0/RefactorRemovedMethodsFromGeneralUtility/RefactorRemovedMethodsFromGeneralUtilityRectorTest.php +++ b/tests/Rector/v8/v0/RefactorRemovedMethodsFromGeneralUtility/RefactorRemovedMethodsFromGeneralUtilityRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\RefactorRemovedMethodsFromGeneralUtility; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\RefactorRemovedMethodsFromGeneralUtilityRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorRemovedMethodsFromGeneralUtilityRectorTest extends AbstractRectorTestCase +final class RefactorRemovedMethodsFromGeneralUtilityRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorRemovedMethodsFromGeneralUtilityRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/RefactorRemovedMethodsFromGeneralUtility/config/configured_rule.php b/tests/Rector/v8/v0/RefactorRemovedMethodsFromGeneralUtility/config/configured_rule.php new file mode 100644 index 000000000..bf3b22939 --- /dev/null +++ b/tests/Rector/v8/v0/RefactorRemovedMethodsFromGeneralUtility/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorRemovedMethodsFromGeneralUtilityRector::class); +}; diff --git a/tests/Rector/v8/v0/RemoveCharsetConverterParameters/RemoveCharsetConverterParametersRectorTest.php b/tests/Rector/v8/v0/RemoveCharsetConverterParameters/RemoveCharsetConverterParametersRectorTest.php index 7c19ece07..e6424b823 100644 --- a/tests/Rector/v8/v0/RemoveCharsetConverterParameters/RemoveCharsetConverterParametersRectorTest.php +++ b/tests/Rector/v8/v0/RemoveCharsetConverterParameters/RemoveCharsetConverterParametersRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\RemoveCharsetConverterParameters; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\RemoveCharsetConverterParametersRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveCharsetConverterParametersRectorTest extends AbstractRectorTestCase +final class RemoveCharsetConverterParametersRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveCharsetConverterParametersRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/RemoveCharsetConverterParameters/config/configured_rule.php b/tests/Rector/v8/v0/RemoveCharsetConverterParameters/config/configured_rule.php new file mode 100644 index 000000000..a35e63e17 --- /dev/null +++ b/tests/Rector/v8/v0/RemoveCharsetConverterParameters/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveCharsetConverterParametersRector::class); +}; diff --git a/tests/Rector/v8/v0/RemoveLangCsConvObjAndParserFactory/RemoveLangCsConvObjAndParserFactoryRectorTest.php b/tests/Rector/v8/v0/RemoveLangCsConvObjAndParserFactory/RemoveLangCsConvObjAndParserFactoryRectorTest.php index 089fb043e..a90c597b9 100644 --- a/tests/Rector/v8/v0/RemoveLangCsConvObjAndParserFactory/RemoveLangCsConvObjAndParserFactoryRectorTest.php +++ b/tests/Rector/v8/v0/RemoveLangCsConvObjAndParserFactory/RemoveLangCsConvObjAndParserFactoryRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\RemoveLangCsConvObjAndParserFactory; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\RemoveLangCsConvObjAndParserFactoryRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveLangCsConvObjAndParserFactoryRectorTest extends AbstractRectorTestCase +final class RemoveLangCsConvObjAndParserFactoryRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveLangCsConvObjAndParserFactoryRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/RemoveLangCsConvObjAndParserFactory/config/configured_rule.php b/tests/Rector/v8/v0/RemoveLangCsConvObjAndParserFactory/config/configured_rule.php new file mode 100644 index 000000000..9fbc087e7 --- /dev/null +++ b/tests/Rector/v8/v0/RemoveLangCsConvObjAndParserFactory/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveLangCsConvObjAndParserFactoryRector::class); +}; diff --git a/tests/Rector/v8/v0/RemovePropertyUserAuthentication/RemovePropertyUserAuthenticationRectorTest.php b/tests/Rector/v8/v0/RemovePropertyUserAuthentication/RemovePropertyUserAuthenticationRectorTest.php index dca894da1..0b7ebaf0d 100644 --- a/tests/Rector/v8/v0/RemovePropertyUserAuthentication/RemovePropertyUserAuthenticationRectorTest.php +++ b/tests/Rector/v8/v0/RemovePropertyUserAuthentication/RemovePropertyUserAuthenticationRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\RemovePropertyUserAuthentication; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\RemovePropertyUserAuthenticationRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemovePropertyUserAuthenticationRectorTest extends AbstractRectorTestCase +final class RemovePropertyUserAuthenticationRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemovePropertyUserAuthenticationRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/RemovePropertyUserAuthentication/config/configured_rule.php b/tests/Rector/v8/v0/RemovePropertyUserAuthentication/config/configured_rule.php new file mode 100644 index 000000000..69bce940e --- /dev/null +++ b/tests/Rector/v8/v0/RemovePropertyUserAuthentication/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemovePropertyUserAuthenticationRector::class); +}; diff --git a/tests/Rector/v8/v0/RemoveWakeupCallFromEntity/RemoveWakeupCallFromEntityRectorTest.php b/tests/Rector/v8/v0/RemoveWakeupCallFromEntity/RemoveWakeupCallFromEntityRectorTest.php index 528aee2bc..318d2986d 100644 --- a/tests/Rector/v8/v0/RemoveWakeupCallFromEntity/RemoveWakeupCallFromEntityRectorTest.php +++ b/tests/Rector/v8/v0/RemoveWakeupCallFromEntity/RemoveWakeupCallFromEntityRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\RemoveWakeupCallFromEntity; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\RemoveWakeupCallFromEntityRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveWakeupCallFromEntityRectorTest extends AbstractRectorTestCase +final class RemoveWakeupCallFromEntityRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveWakeupCallFromEntityRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/RemoveWakeupCallFromEntity/config/configured_rule.php b/tests/Rector/v8/v0/RemoveWakeupCallFromEntity/config/configured_rule.php new file mode 100644 index 000000000..17e4955ac --- /dev/null +++ b/tests/Rector/v8/v0/RemoveWakeupCallFromEntity/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveWakeupCallFromEntityRector::class); +}; diff --git a/tests/Rector/v8/v0/RequireMethodsToNativeFunctions/RequireMethodsToNativeFunctionsRectorTest.php b/tests/Rector/v8/v0/RequireMethodsToNativeFunctions/RequireMethodsToNativeFunctionsRectorTest.php index c4277819d..85a905fa8 100644 --- a/tests/Rector/v8/v0/RequireMethodsToNativeFunctions/RequireMethodsToNativeFunctionsRectorTest.php +++ b/tests/Rector/v8/v0/RequireMethodsToNativeFunctions/RequireMethodsToNativeFunctionsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\RequireMethodsToNativeFunctions; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\RequireMethodsToNativeFunctionsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RequireMethodsToNativeFunctionsRectorTest extends AbstractRectorTestCase +final class RequireMethodsToNativeFunctionsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RequireMethodsToNativeFunctionsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/RequireMethodsToNativeFunctions/config/configured_rule.php b/tests/Rector/v8/v0/RequireMethodsToNativeFunctions/config/configured_rule.php new file mode 100644 index 000000000..55e724cdb --- /dev/null +++ b/tests/Rector/v8/v0/RequireMethodsToNativeFunctions/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RequireMethodsToNativeFunctionsRector::class); +}; diff --git a/tests/Rector/v8/v0/RteHtmlParser/RteHtmlParserTest.php b/tests/Rector/v8/v0/RteHtmlParser/RteHtmlParserTest.php index ac1eb245d..6c5541f56 100644 --- a/tests/Rector/v8/v0/RteHtmlParser/RteHtmlParserTest.php +++ b/tests/Rector/v8/v0/RteHtmlParser/RteHtmlParserTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\RteHtmlParser; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\RteHtmlParserRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RteHtmlParserTest extends AbstractRectorTestCase +final class RteHtmlParserTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RteHtmlParserRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/RteHtmlParser/config/configured_rule.php b/tests/Rector/v8/v0/RteHtmlParser/config/configured_rule.php new file mode 100644 index 000000000..2014a15d6 --- /dev/null +++ b/tests/Rector/v8/v0/RteHtmlParser/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RteHtmlParserRector::class); +}; diff --git a/tests/Rector/v8/v0/TimeTrackerGlobalsToSingleton/TimeTrackerGlobalsToSingletonRectorTest.php b/tests/Rector/v8/v0/TimeTrackerGlobalsToSingleton/TimeTrackerGlobalsToSingletonRectorTest.php index 4923ac18b..d10161ed2 100644 --- a/tests/Rector/v8/v0/TimeTrackerGlobalsToSingleton/TimeTrackerGlobalsToSingletonRectorTest.php +++ b/tests/Rector/v8/v0/TimeTrackerGlobalsToSingleton/TimeTrackerGlobalsToSingletonRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\TimeTrackerGlobalsToSingleton; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\TimeTrackerGlobalsToSingletonRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class TimeTrackerGlobalsToSingletonRectorTest extends AbstractRectorTestCase +final class TimeTrackerGlobalsToSingletonRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return TimeTrackerGlobalsToSingletonRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/TimeTrackerGlobalsToSingleton/config/configured_rule.php b/tests/Rector/v8/v0/TimeTrackerGlobalsToSingleton/config/configured_rule.php new file mode 100644 index 000000000..c59567de8 --- /dev/null +++ b/tests/Rector/v8/v0/TimeTrackerGlobalsToSingleton/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(TimeTrackerGlobalsToSingletonRector::class); +}; diff --git a/tests/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTracker/TimeTrackerInsteadOfNullTimeTrackerRectorTest.php b/tests/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTracker/TimeTrackerInsteadOfNullTimeTrackerRectorTest.php index dc102d642..b8f7c6955 100644 --- a/tests/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTracker/TimeTrackerInsteadOfNullTimeTrackerRectorTest.php +++ b/tests/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTracker/TimeTrackerInsteadOfNullTimeTrackerRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v0\TimeTrackerInsteadOfNullTimeTracker; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v0\TimeTrackerInsteadOfNullTimeTrackerRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class TimeTrackerInsteadOfNullTimeTrackerRectorTest extends AbstractRectorTestCase +final class TimeTrackerInsteadOfNullTimeTrackerRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return TimeTrackerInsteadOfNullTimeTrackerRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTracker/config/configured_rule.php b/tests/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTracker/config/configured_rule.php new file mode 100644 index 000000000..666368b99 --- /dev/null +++ b/tests/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTracker/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(TimeTrackerInsteadOfNullTimeTrackerRector::class); +}; diff --git a/tests/Rector/v8/v1/Array2XmlCsToArray2Xml/Array2XmlCsToArray2XmlRectorTest.php b/tests/Rector/v8/v1/Array2XmlCsToArray2Xml/Array2XmlCsToArray2XmlRectorTest.php index b4e0145dc..b30234887 100644 --- a/tests/Rector/v8/v1/Array2XmlCsToArray2Xml/Array2XmlCsToArray2XmlRectorTest.php +++ b/tests/Rector/v8/v1/Array2XmlCsToArray2Xml/Array2XmlCsToArray2XmlRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v1\Array2XmlCsToArray2Xml; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v1\Array2XmlCsToArray2XmlRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class Array2XmlCsToArray2XmlRectorTest extends AbstractRectorTestCase +final class Array2XmlCsToArray2XmlRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return Array2XmlCsToArray2XmlRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v1/Array2XmlCsToArray2Xml/config/configured_rule.php b/tests/Rector/v8/v1/Array2XmlCsToArray2Xml/config/configured_rule.php new file mode 100644 index 000000000..862a5f0d5 --- /dev/null +++ b/tests/Rector/v8/v1/Array2XmlCsToArray2Xml/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(Array2XmlCsToArray2XmlRector::class); +}; diff --git a/tests/Rector/v8/v1/GeneralUtilityToUpperAndLower/GeneralUtilityToUpperAndLowerRectorTest.php b/tests/Rector/v8/v1/GeneralUtilityToUpperAndLower/GeneralUtilityToUpperAndLowerRectorTest.php index 27b7984be..74415c86d 100644 --- a/tests/Rector/v8/v1/GeneralUtilityToUpperAndLower/GeneralUtilityToUpperAndLowerRectorTest.php +++ b/tests/Rector/v8/v1/GeneralUtilityToUpperAndLower/GeneralUtilityToUpperAndLowerRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v1\GeneralUtilityToUpperAndLower; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v1\GeneralUtilityToUpperAndLowerRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class GeneralUtilityToUpperAndLowerRectorTest extends AbstractRectorTestCase +final class GeneralUtilityToUpperAndLowerRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return GeneralUtilityToUpperAndLowerRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v1/GeneralUtilityToUpperAndLower/config/configured_rule.php b/tests/Rector/v8/v1/GeneralUtilityToUpperAndLower/config/configured_rule.php new file mode 100644 index 000000000..a39976e4e --- /dev/null +++ b/tests/Rector/v8/v1/GeneralUtilityToUpperAndLower/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(GeneralUtilityToUpperAndLowerRector::class); +}; diff --git a/tests/Rector/v8/v1/RefactorDbConstants/RefactorDbConstantsRectorTest.php b/tests/Rector/v8/v1/RefactorDbConstants/RefactorDbConstantsRectorTest.php index e2020ae35..201b548ec 100644 --- a/tests/Rector/v8/v1/RefactorDbConstants/RefactorDbConstantsRectorTest.php +++ b/tests/Rector/v8/v1/RefactorDbConstants/RefactorDbConstantsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v1\RefactorDbConstants; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v1\RefactorDbConstantsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorDbConstantsRectorTest extends AbstractRectorTestCase +final class RefactorDbConstantsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorDbConstantsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v1/RefactorDbConstants/config/configured_rule.php b/tests/Rector/v8/v1/RefactorDbConstants/config/configured_rule.php new file mode 100644 index 000000000..a52ee5d1a --- /dev/null +++ b/tests/Rector/v8/v1/RefactorDbConstants/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorDbConstantsRector::class); +}; diff --git a/tests/Rector/v8/v1/RefactorVariousGeneralUtilityMethods/RefactorVariousGeneralUtilityMethodsRectorTest.php b/tests/Rector/v8/v1/RefactorVariousGeneralUtilityMethods/RefactorVariousGeneralUtilityMethodsRectorTest.php index 3c1949e84..11b95c97c 100644 --- a/tests/Rector/v8/v1/RefactorVariousGeneralUtilityMethods/RefactorVariousGeneralUtilityMethodsRectorTest.php +++ b/tests/Rector/v8/v1/RefactorVariousGeneralUtilityMethods/RefactorVariousGeneralUtilityMethodsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v1\RefactorVariousGeneralUtilityMethods; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v1\RefactorVariousGeneralUtilityMethodsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorVariousGeneralUtilityMethodsRectorTest extends AbstractRectorTestCase +final class RefactorVariousGeneralUtilityMethodsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorVariousGeneralUtilityMethodsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v1/RefactorVariousGeneralUtilityMethods/config/configured_rule.php b/tests/Rector/v8/v1/RefactorVariousGeneralUtilityMethods/config/configured_rule.php new file mode 100644 index 000000000..94de57def --- /dev/null +++ b/tests/Rector/v8/v1/RefactorVariousGeneralUtilityMethods/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorVariousGeneralUtilityMethodsRector::class); +}; diff --git a/tests/Rector/v8/v1/TypoScriptFrontendControllerCharsetConverter/TypoScriptFrontendControllerCharsetConverterRectorTest.php b/tests/Rector/v8/v1/TypoScriptFrontendControllerCharsetConverter/TypoScriptFrontendControllerCharsetConverterRectorTest.php index 88bdc6175..6ee33e434 100644 --- a/tests/Rector/v8/v1/TypoScriptFrontendControllerCharsetConverter/TypoScriptFrontendControllerCharsetConverterRectorTest.php +++ b/tests/Rector/v8/v1/TypoScriptFrontendControllerCharsetConverter/TypoScriptFrontendControllerCharsetConverterRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v1\TypoScriptFrontendControllerCharsetConverter; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v1\TypoScriptFrontendControllerCharsetConverterRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class TypoScriptFrontendControllerCharsetConverterRectorTest extends AbstractRectorTestCase +final class TypoScriptFrontendControllerCharsetConverterRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return TypoScriptFrontendControllerCharsetConverterRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v1/TypoScriptFrontendControllerCharsetConverter/config/configured_rule.php b/tests/Rector/v8/v1/TypoScriptFrontendControllerCharsetConverter/config/configured_rule.php new file mode 100644 index 000000000..fd24bd8a6 --- /dev/null +++ b/tests/Rector/v8/v1/TypoScriptFrontendControllerCharsetConverter/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(TypoScriptFrontendControllerCharsetConverterRector::class); +}; diff --git a/tests/Rector/v8/v2/UseHtmlSpecialCharsDirectlyForTranslation/UseHtmlSpecialCharsDirectlyForTranslationRectorTest.php b/tests/Rector/v8/v2/UseHtmlSpecialCharsDirectlyForTranslation/UseHtmlSpecialCharsDirectlyForTranslationRectorTest.php index 4653bc747..e041f39de 100644 --- a/tests/Rector/v8/v2/UseHtmlSpecialCharsDirectlyForTranslation/UseHtmlSpecialCharsDirectlyForTranslationRectorTest.php +++ b/tests/Rector/v8/v2/UseHtmlSpecialCharsDirectlyForTranslation/UseHtmlSpecialCharsDirectlyForTranslationRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v2\UseHtmlSpecialCharsDirectlyForTranslation; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v2\UseHtmlSpecialCharsDirectlyForTranslationRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseHtmlSpecialCharsDirectlyForTranslationRectorTest extends AbstractRectorTestCase +final class UseHtmlSpecialCharsDirectlyForTranslationRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseHtmlSpecialCharsDirectlyForTranslationRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v2/UseHtmlSpecialCharsDirectlyForTranslation/config/configured_rule.php b/tests/Rector/v8/v2/UseHtmlSpecialCharsDirectlyForTranslation/config/configured_rule.php new file mode 100644 index 000000000..545b940a4 --- /dev/null +++ b/tests/Rector/v8/v2/UseHtmlSpecialCharsDirectlyForTranslation/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseHtmlSpecialCharsDirectlyForTranslationRector::class); +}; diff --git a/tests/Rector/v8/v3/RefactorMethodFileContent/RefactorMethodFileContentRectorTest.php b/tests/Rector/v8/v3/RefactorMethodFileContent/RefactorMethodFileContentRectorTest.php index ae58a549d..d7154952f 100644 --- a/tests/Rector/v8/v3/RefactorMethodFileContent/RefactorMethodFileContentRectorTest.php +++ b/tests/Rector/v8/v3/RefactorMethodFileContent/RefactorMethodFileContentRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v3\RefactorMethodFileContent; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v3\RefactorMethodFileContentRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorMethodFileContentRectorTest extends AbstractRectorTestCase +final class RefactorMethodFileContentRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorMethodFileContentRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v3/RefactorMethodFileContent/config/configured_rule.php b/tests/Rector/v8/v3/RefactorMethodFileContent/config/configured_rule.php new file mode 100644 index 000000000..b43675a44 --- /dev/null +++ b/tests/Rector/v8/v3/RefactorMethodFileContent/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorMethodFileContentRector::class); +}; diff --git a/tests/Rector/v8/v3/RefactorQueryViewTableWrap/RefactorQueryViewTableWrapRectorTest.php b/tests/Rector/v8/v3/RefactorQueryViewTableWrap/RefactorQueryViewTableWrapRectorTest.php index e60dd2de0..7e492a060 100644 --- a/tests/Rector/v8/v3/RefactorQueryViewTableWrap/RefactorQueryViewTableWrapRectorTest.php +++ b/tests/Rector/v8/v3/RefactorQueryViewTableWrap/RefactorQueryViewTableWrapRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v3\RefactorQueryViewTableWrap; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v3\RefactorQueryViewTableWrapRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorQueryViewTableWrapRectorTest extends AbstractRectorTestCase +final class RefactorQueryViewTableWrapRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorQueryViewTableWrapRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v3/RefactorQueryViewTableWrap/config/configured_rule.php b/tests/Rector/v8/v3/RefactorQueryViewTableWrap/config/configured_rule.php new file mode 100644 index 000000000..b2b3936e3 --- /dev/null +++ b/tests/Rector/v8/v3/RefactorQueryViewTableWrap/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorQueryViewTableWrapRector::class); +}; diff --git a/tests/Rector/v8/v3/RemovedTcaSelectTreeOptions/RemovedTcaSelectTreeOptionsRectorTest.php b/tests/Rector/v8/v3/RemovedTcaSelectTreeOptions/RemovedTcaSelectTreeOptionsRectorTest.php index e625411db..06166c986 100644 --- a/tests/Rector/v8/v3/RemovedTcaSelectTreeOptions/RemovedTcaSelectTreeOptionsRectorTest.php +++ b/tests/Rector/v8/v3/RemovedTcaSelectTreeOptions/RemovedTcaSelectTreeOptionsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v3\RemovedTcaSelectTreeOptions; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v3\RemovedTcaSelectTreeOptionsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemovedTcaSelectTreeOptionsRectorTest extends AbstractRectorTestCase +final class RemovedTcaSelectTreeOptionsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemovedTcaSelectTreeOptionsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v3/RemovedTcaSelectTreeOptions/config/configured_rule.php b/tests/Rector/v8/v3/RemovedTcaSelectTreeOptions/config/configured_rule.php new file mode 100644 index 000000000..fa5529b4b --- /dev/null +++ b/tests/Rector/v8/v3/RemovedTcaSelectTreeOptions/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemovedTcaSelectTreeOptionsRector::class); +}; diff --git a/tests/Rector/v8/v3/SoftReferencesFunctionalityRemoved/SoftReferencesFunctionalityRemovedRectorTest.php b/tests/Rector/v8/v3/SoftReferencesFunctionalityRemoved/SoftReferencesFunctionalityRemovedRectorTest.php index 913f6dcc5..3a24cbfbf 100644 --- a/tests/Rector/v8/v3/SoftReferencesFunctionalityRemoved/SoftReferencesFunctionalityRemovedRectorTest.php +++ b/tests/Rector/v8/v3/SoftReferencesFunctionalityRemoved/SoftReferencesFunctionalityRemovedRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v3\SoftReferencesFunctionalityRemoved; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v3\SoftReferencesFunctionalityRemovedRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class SoftReferencesFunctionalityRemovedRectorTest extends AbstractRectorTestCase +final class SoftReferencesFunctionalityRemovedRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return SoftReferencesFunctionalityRemovedRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v3/SoftReferencesFunctionalityRemoved/config/configured_rule.php b/tests/Rector/v8/v3/SoftReferencesFunctionalityRemoved/config/configured_rule.php new file mode 100644 index 000000000..d5c7bed9e --- /dev/null +++ b/tests/Rector/v8/v3/SoftReferencesFunctionalityRemoved/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(SoftReferencesFunctionalityRemovedRector::class); +}; diff --git a/tests/Rector/v8/v4/RemoveOptionShowIfRte/RemoveOptionShowIfRteRectorTest.php b/tests/Rector/v8/v4/RemoveOptionShowIfRte/RemoveOptionShowIfRteRectorTest.php index d85c2d586..70ec9a205 100644 --- a/tests/Rector/v8/v4/RemoveOptionShowIfRte/RemoveOptionShowIfRteRectorTest.php +++ b/tests/Rector/v8/v4/RemoveOptionShowIfRte/RemoveOptionShowIfRteRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v4\RemoveOptionShowIfRte; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v4\RemoveOptionShowIfRteRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveOptionShowIfRteRectorTest extends AbstractRectorTestCase +final class RemoveOptionShowIfRteRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveOptionShowIfRteRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v4/RemoveOptionShowIfRte/config/configured_rule.php b/tests/Rector/v8/v4/RemoveOptionShowIfRte/config/configured_rule.php new file mode 100644 index 000000000..2427ce825 --- /dev/null +++ b/tests/Rector/v8/v4/RemoveOptionShowIfRte/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveOptionShowIfRteRector::class); +}; diff --git a/tests/Rector/v8/v4/SubstituteOldWizardIcons/SubstituteOldWizardIconsRectorTest.php b/tests/Rector/v8/v4/SubstituteOldWizardIcons/SubstituteOldWizardIconsRectorTest.php index a4384fa2d..d5168f406 100644 --- a/tests/Rector/v8/v4/SubstituteOldWizardIcons/SubstituteOldWizardIconsRectorTest.php +++ b/tests/Rector/v8/v4/SubstituteOldWizardIcons/SubstituteOldWizardIconsRectorTest.php @@ -5,10 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v4\SubstituteOldWizardIcons; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class SubstituteOldWizardIconsRectorTest extends AbstractRectorTestCase +final class SubstituteOldWizardIconsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -23,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function provideConfigFileInfo(): ?SmartFileInfo + public function provideConfigFilePath(): string { - return new SmartFileInfo(__DIR__ . '/config/configured_rule.php'); + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v4/SubstituteOldWizardIcons/config/configured_rule.php b/tests/Rector/v8/v4/SubstituteOldWizardIcons/config/configured_rule.php index 5ea9859af..0c5a65bf3 100644 --- a/tests/Rector/v8/v4/SubstituteOldWizardIcons/config/configured_rule.php +++ b/tests/Rector/v8/v4/SubstituteOldWizardIcons/config/configured_rule.php @@ -6,6 +6,8 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; return static function (ContainerConfigurator $containerConfigurator): void { + $containerConfigurator->import(__DIR__ . '/../../../../../../config/services.php'); + $services = $containerConfigurator->services(); $services->set(SubstituteOldWizardIconsRector::class) ->call('configure', [[ diff --git a/tests/Rector/v8/v5/CharsetConverterToMultiByteFunctions/CharsetConverterToMultiByteFunctionsRectorTest.php b/tests/Rector/v8/v5/CharsetConverterToMultiByteFunctions/CharsetConverterToMultiByteFunctionsRectorTest.php index f47964796..528b6672f 100644 --- a/tests/Rector/v8/v5/CharsetConverterToMultiByteFunctions/CharsetConverterToMultiByteFunctionsRectorTest.php +++ b/tests/Rector/v8/v5/CharsetConverterToMultiByteFunctions/CharsetConverterToMultiByteFunctionsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v5\CharsetConverterToMultiByteFunctions; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v5\CharsetConverterToMultiByteFunctionsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class CharsetConverterToMultiByteFunctionsRectorTest extends AbstractRectorTestCase +final class CharsetConverterToMultiByteFunctionsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return CharsetConverterToMultiByteFunctionsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v5/CharsetConverterToMultiByteFunctions/config/configured_rule.php b/tests/Rector/v8/v5/CharsetConverterToMultiByteFunctions/config/configured_rule.php new file mode 100644 index 000000000..bbdd7582d --- /dev/null +++ b/tests/Rector/v8/v5/CharsetConverterToMultiByteFunctions/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(CharsetConverterToMultiByteFunctionsRector::class); +}; diff --git a/tests/Rector/v8/v5/ContentObjectRendererFileResource/ContentObjectRendererFileResourceRectorTest.php b/tests/Rector/v8/v5/ContentObjectRendererFileResource/ContentObjectRendererFileResourceRectorTest.php index 9cf2cb4f1..b6637c36b 100644 --- a/tests/Rector/v8/v5/ContentObjectRendererFileResource/ContentObjectRendererFileResourceRectorTest.php +++ b/tests/Rector/v8/v5/ContentObjectRendererFileResource/ContentObjectRendererFileResourceRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v5\ContentObjectRendererFileResource; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v5\ContentObjectRendererFileResourceRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ContentObjectRendererFileResourceRectorTest extends AbstractRectorTestCase +final class ContentObjectRendererFileResourceRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return ContentObjectRendererFileResourceRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v5/ContentObjectRendererFileResource/config/configured_rule.php b/tests/Rector/v8/v5/ContentObjectRendererFileResource/config/configured_rule.php new file mode 100644 index 000000000..c44425a63 --- /dev/null +++ b/tests/Rector/v8/v5/ContentObjectRendererFileResource/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(ContentObjectRendererFileResourceRector::class); +}; diff --git a/tests/Rector/v8/v5/MoveLanguageFilesFromLocallangToResources/MoveLanguageFilesFromLocallangToResourcesRectorTest.php b/tests/Rector/v8/v5/MoveLanguageFilesFromLocallangToResources/MoveLanguageFilesFromLocallangToResourcesRectorTest.php index 0bb372362..378bf6f12 100644 --- a/tests/Rector/v8/v5/MoveLanguageFilesFromLocallangToResources/MoveLanguageFilesFromLocallangToResourcesRectorTest.php +++ b/tests/Rector/v8/v5/MoveLanguageFilesFromLocallangToResources/MoveLanguageFilesFromLocallangToResourcesRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v5\MoveLanguageFilesFromLocallangToResources; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v5\MoveLanguageFilesFromLocallangToResourcesRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class MoveLanguageFilesFromLocallangToResourcesRectorTest extends AbstractRectorTestCase +final class MoveLanguageFilesFromLocallangToResourcesRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return MoveLanguageFilesFromLocallangToResourcesRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v5/MoveLanguageFilesFromLocallangToResources/config/configured_rule.php b/tests/Rector/v8/v5/MoveLanguageFilesFromLocallangToResources/config/configured_rule.php new file mode 100644 index 000000000..ece292f92 --- /dev/null +++ b/tests/Rector/v8/v5/MoveLanguageFilesFromLocallangToResources/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(MoveLanguageFilesFromLocallangToResourcesRector::class); +}; diff --git a/tests/Rector/v8/v5/RemoveOptionVersioningFollowPages/RemoveOptionVersioningFollowPagesRectorTest.php b/tests/Rector/v8/v5/RemoveOptionVersioningFollowPages/RemoveOptionVersioningFollowPagesRectorTest.php index 42c418b6a..9539b779a 100644 --- a/tests/Rector/v8/v5/RemoveOptionVersioningFollowPages/RemoveOptionVersioningFollowPagesRectorTest.php +++ b/tests/Rector/v8/v5/RemoveOptionVersioningFollowPages/RemoveOptionVersioningFollowPagesRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v5\RemoveOptionVersioningFollowPages; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v5\RemoveOptionVersioningFollowPagesRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveOptionVersioningFollowPagesRectorTest extends AbstractRectorTestCase +final class RemoveOptionVersioningFollowPagesRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveOptionVersioningFollowPagesRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v5/RemoveOptionVersioningFollowPages/config/configured_rule.php b/tests/Rector/v8/v5/RemoveOptionVersioningFollowPages/config/configured_rule.php new file mode 100644 index 000000000..9bd562508 --- /dev/null +++ b/tests/Rector/v8/v5/RemoveOptionVersioningFollowPages/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveOptionVersioningFollowPagesRector::class); +}; diff --git a/tests/Rector/v8/v5/RemoveSupportForTransForeignTable/RemoveSupportForTransForeignTableRectorTest.php b/tests/Rector/v8/v5/RemoveSupportForTransForeignTable/RemoveSupportForTransForeignTableRectorTest.php index 654d232c8..745f16b5e 100644 --- a/tests/Rector/v8/v5/RemoveSupportForTransForeignTable/RemoveSupportForTransForeignTableRectorTest.php +++ b/tests/Rector/v8/v5/RemoveSupportForTransForeignTable/RemoveSupportForTransForeignTableRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v5\RemoveSupportForTransForeignTable; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v5\RemoveSupportForTransForeignTableRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveSupportForTransForeignTableRectorTest extends AbstractRectorTestCase +final class RemoveSupportForTransForeignTableRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveSupportForTransForeignTableRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v5/RemoveSupportForTransForeignTable/config/configured_rule.php b/tests/Rector/v8/v5/RemoveSupportForTransForeignTable/config/configured_rule.php new file mode 100644 index 000000000..4be33cc08 --- /dev/null +++ b/tests/Rector/v8/v5/RemoveSupportForTransForeignTable/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveSupportForTransForeignTableRector::class); +}; diff --git a/tests/Rector/v8/v6/AddTypeToColumnConfig/AddTypeToColumnConfigRectorTest.php b/tests/Rector/v8/v6/AddTypeToColumnConfig/AddTypeToColumnConfigRectorTest.php index 827437024..fff35b3c2 100644 --- a/tests/Rector/v8/v6/AddTypeToColumnConfig/AddTypeToColumnConfigRectorTest.php +++ b/tests/Rector/v8/v6/AddTypeToColumnConfig/AddTypeToColumnConfigRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v6\AddTypeToColumnConfig; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v6\AddTypeToColumnConfigRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class AddTypeToColumnConfigRectorTest extends AbstractRectorTestCase +final class AddTypeToColumnConfigRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return AddTypeToColumnConfigRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v6/AddTypeToColumnConfig/config/configured_rule.php b/tests/Rector/v8/v6/AddTypeToColumnConfig/config/configured_rule.php new file mode 100644 index 000000000..ec805f335 --- /dev/null +++ b/tests/Rector/v8/v6/AddTypeToColumnConfig/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(AddTypeToColumnConfigRector::class); +}; diff --git a/tests/Rector/v8/v6/ArrayUtilityInArrayToFuncInArray/ArrayUtilityInArrayToFuncInArrayRectorTest.php b/tests/Rector/v8/v6/ArrayUtilityInArrayToFuncInArray/ArrayUtilityInArrayToFuncInArrayRectorTest.php index 460fc2060..b1b15d1a7 100644 --- a/tests/Rector/v8/v6/ArrayUtilityInArrayToFuncInArray/ArrayUtilityInArrayToFuncInArrayRectorTest.php +++ b/tests/Rector/v8/v6/ArrayUtilityInArrayToFuncInArray/ArrayUtilityInArrayToFuncInArrayRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v6\ArrayUtilityInArrayToFuncInArray; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v6\ArrayUtilityInArrayToFuncInArrayRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ArrayUtilityInArrayToFuncInArrayRectorTest extends AbstractRectorTestCase +final class ArrayUtilityInArrayToFuncInArrayRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return ArrayUtilityInArrayToFuncInArrayRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v6/ArrayUtilityInArrayToFuncInArray/config/configured_rule.php b/tests/Rector/v8/v6/ArrayUtilityInArrayToFuncInArray/config/configured_rule.php new file mode 100644 index 000000000..b88c50233 --- /dev/null +++ b/tests/Rector/v8/v6/ArrayUtilityInArrayToFuncInArray/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(ArrayUtilityInArrayToFuncInArrayRector::class); +}; diff --git a/tests/Rector/v8/v6/MigrateOptionsOfTypeGroup/MigrateOptionsOfTypeGroupRectorTest.php b/tests/Rector/v8/v6/MigrateOptionsOfTypeGroup/MigrateOptionsOfTypeGroupRectorTest.php index cf4731550..cd0d608df 100644 --- a/tests/Rector/v8/v6/MigrateOptionsOfTypeGroup/MigrateOptionsOfTypeGroupRectorTest.php +++ b/tests/Rector/v8/v6/MigrateOptionsOfTypeGroup/MigrateOptionsOfTypeGroupRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v6\MigrateOptionsOfTypeGroup; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v6\MigrateOptionsOfTypeGroupRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class MigrateOptionsOfTypeGroupRectorTest extends AbstractRectorTestCase +final class MigrateOptionsOfTypeGroupRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return MigrateOptionsOfTypeGroupRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v6/MigrateOptionsOfTypeGroup/config/configured_rule.php b/tests/Rector/v8/v6/MigrateOptionsOfTypeGroup/config/configured_rule.php new file mode 100644 index 000000000..dc9b8c039 --- /dev/null +++ b/tests/Rector/v8/v6/MigrateOptionsOfTypeGroup/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(MigrateOptionsOfTypeGroupRector::class); +}; diff --git a/tests/Rector/v8/v6/MigrateSelectShowIconTable/MigrateSelectShowIconTableRectorTest.php b/tests/Rector/v8/v6/MigrateSelectShowIconTable/MigrateSelectShowIconTableRectorTest.php index 330e27a0b..37a555b80 100644 --- a/tests/Rector/v8/v6/MigrateSelectShowIconTable/MigrateSelectShowIconTableRectorTest.php +++ b/tests/Rector/v8/v6/MigrateSelectShowIconTable/MigrateSelectShowIconTableRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v6\MigrateSelectShowIconTable; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v6\MigrateSelectShowIconTableRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class MigrateSelectShowIconTableRectorTest extends AbstractRectorTestCase +final class MigrateSelectShowIconTableRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return MigrateSelectShowIconTableRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v6/MigrateSelectShowIconTable/config/configured_rule.php b/tests/Rector/v8/v6/MigrateSelectShowIconTable/config/configured_rule.php new file mode 100644 index 000000000..d1300458c --- /dev/null +++ b/tests/Rector/v8/v6/MigrateSelectShowIconTable/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(MigrateSelectShowIconTableRector::class); +}; diff --git a/tests/Rector/v8/v6/MoveRequestUpdateOptionFromControlToColumns/MoveRequestUpdateOptionFromControlToColumnsRectorTest.php b/tests/Rector/v8/v6/MoveRequestUpdateOptionFromControlToColumns/MoveRequestUpdateOptionFromControlToColumnsRectorTest.php index 58e0b32f3..05e98ce0f 100644 --- a/tests/Rector/v8/v6/MoveRequestUpdateOptionFromControlToColumns/MoveRequestUpdateOptionFromControlToColumnsRectorTest.php +++ b/tests/Rector/v8/v6/MoveRequestUpdateOptionFromControlToColumns/MoveRequestUpdateOptionFromControlToColumnsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v6\MoveRequestUpdateOptionFromControlToColumns; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v6\MoveRequestUpdateOptionFromControlToColumnsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class MoveRequestUpdateOptionFromControlToColumnsRectorTest extends AbstractRectorTestCase +final class MoveRequestUpdateOptionFromControlToColumnsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return MoveRequestUpdateOptionFromControlToColumnsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v6/MoveRequestUpdateOptionFromControlToColumns/config/configured_rule.php b/tests/Rector/v8/v6/MoveRequestUpdateOptionFromControlToColumns/config/configured_rule.php new file mode 100644 index 000000000..34ccca1ce --- /dev/null +++ b/tests/Rector/v8/v6/MoveRequestUpdateOptionFromControlToColumns/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(MoveRequestUpdateOptionFromControlToColumnsRector::class); +}; diff --git a/tests/Rector/v8/v6/RefactorTCA/RefactorTCARectorTest.php b/tests/Rector/v8/v6/RefactorTCA/RefactorTCARectorTest.php index 2b4826576..8f18023e8 100644 --- a/tests/Rector/v8/v6/RefactorTCA/RefactorTCARectorTest.php +++ b/tests/Rector/v8/v6/RefactorTCA/RefactorTCARectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v6\RefactorTCA; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v6\RefactorTCARector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorTCARectorTest extends AbstractRectorTestCase +final class RefactorTCARectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorTCARector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v6/RefactorTCA/config/configured_rule.php b/tests/Rector/v8/v6/RefactorTCA/config/configured_rule.php new file mode 100644 index 000000000..f70cd9754 --- /dev/null +++ b/tests/Rector/v8/v6/RefactorTCA/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorTCARector::class); +}; diff --git a/tests/Rector/v8/v6/RemoveL10nModeNoCopy/RemoveL10nModeNoCopyRectorTest.php b/tests/Rector/v8/v6/RemoveL10nModeNoCopy/RemoveL10nModeNoCopyRectorTest.php index 88f818b54..ff1e8639c 100644 --- a/tests/Rector/v8/v6/RemoveL10nModeNoCopy/RemoveL10nModeNoCopyRectorTest.php +++ b/tests/Rector/v8/v6/RemoveL10nModeNoCopy/RemoveL10nModeNoCopyRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v6\RemoveL10nModeNoCopy; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v6\RemoveL10nModeNoCopyRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveL10nModeNoCopyRectorTest extends AbstractRectorTestCase +final class RemoveL10nModeNoCopyRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveL10nModeNoCopyRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v6/RemoveL10nModeNoCopy/config/configured_rule.php b/tests/Rector/v8/v6/RemoveL10nModeNoCopy/config/configured_rule.php new file mode 100644 index 000000000..8e6655378 --- /dev/null +++ b/tests/Rector/v8/v6/RemoveL10nModeNoCopy/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveL10nModeNoCopyRector::class); +}; diff --git a/tests/Rector/v8/v6/RichtextFromDefaultExtrasToEnableRichtext/RichtextFromDefaultExtrasToEnableRichtextRectorTest.php b/tests/Rector/v8/v6/RichtextFromDefaultExtrasToEnableRichtext/RichtextFromDefaultExtrasToEnableRichtextRectorTest.php index 4184e2ac9..9c630fd04 100644 --- a/tests/Rector/v8/v6/RichtextFromDefaultExtrasToEnableRichtext/RichtextFromDefaultExtrasToEnableRichtextRectorTest.php +++ b/tests/Rector/v8/v6/RichtextFromDefaultExtrasToEnableRichtext/RichtextFromDefaultExtrasToEnableRichtextRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v6\RichtextFromDefaultExtrasToEnableRichtext; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v6\RichtextFromDefaultExtrasToEnableRichtextRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RichtextFromDefaultExtrasToEnableRichtextRectorTest extends AbstractRectorTestCase +final class RichtextFromDefaultExtrasToEnableRichtextRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RichtextFromDefaultExtrasToEnableRichtextRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v6/RichtextFromDefaultExtrasToEnableRichtext/config/configured_rule.php b/tests/Rector/v8/v6/RichtextFromDefaultExtrasToEnableRichtext/config/configured_rule.php new file mode 100644 index 000000000..f0dc319f5 --- /dev/null +++ b/tests/Rector/v8/v6/RichtextFromDefaultExtrasToEnableRichtext/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RichtextFromDefaultExtrasToEnableRichtextRector::class); +}; diff --git a/tests/Rector/v8/v7/BackendUtilityGetRecordRaw/BackendUtilityGetRecordRawRectorTest.php b/tests/Rector/v8/v7/BackendUtilityGetRecordRaw/BackendUtilityGetRecordRawRectorTest.php index 3cc25a076..e791cf1de 100644 --- a/tests/Rector/v8/v7/BackendUtilityGetRecordRaw/BackendUtilityGetRecordRawRectorTest.php +++ b/tests/Rector/v8/v7/BackendUtilityGetRecordRaw/BackendUtilityGetRecordRawRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v7\BackendUtilityGetRecordRaw; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v7\BackendUtilityGetRecordRawRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class BackendUtilityGetRecordRawRectorTest extends AbstractRectorTestCase +final class BackendUtilityGetRecordRawRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return BackendUtilityGetRecordRawRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v7/BackendUtilityGetRecordRaw/config/configured_rule.php b/tests/Rector/v8/v7/BackendUtilityGetRecordRaw/config/configured_rule.php new file mode 100644 index 000000000..f146d1fa6 --- /dev/null +++ b/tests/Rector/v8/v7/BackendUtilityGetRecordRaw/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(BackendUtilityGetRecordRawRector::class); +}; diff --git a/tests/Rector/v8/v7/BackendUtilityGetRecordsByFieldToQueryBuilder/BackendUtilityGetRecordsByFieldToQueryBuilderRectorTest.php b/tests/Rector/v8/v7/BackendUtilityGetRecordsByFieldToQueryBuilder/BackendUtilityGetRecordsByFieldToQueryBuilderRectorTest.php index 8559ce518..261e345b9 100644 --- a/tests/Rector/v8/v7/BackendUtilityGetRecordsByFieldToQueryBuilder/BackendUtilityGetRecordsByFieldToQueryBuilderRectorTest.php +++ b/tests/Rector/v8/v7/BackendUtilityGetRecordsByFieldToQueryBuilder/BackendUtilityGetRecordsByFieldToQueryBuilderRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v7\BackendUtilityGetRecordsByFieldToQueryBuilder; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v7\BackendUtilityGetRecordsByFieldToQueryBuilderRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class BackendUtilityGetRecordsByFieldToQueryBuilderRectorTest extends AbstractRectorTestCase +final class BackendUtilityGetRecordsByFieldToQueryBuilderRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return BackendUtilityGetRecordsByFieldToQueryBuilderRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v7/BackendUtilityGetRecordsByFieldToQueryBuilder/config/configured_rule.php b/tests/Rector/v8/v7/BackendUtilityGetRecordsByFieldToQueryBuilder/config/configured_rule.php new file mode 100644 index 000000000..555e6d21f --- /dev/null +++ b/tests/Rector/v8/v7/BackendUtilityGetRecordsByFieldToQueryBuilder/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(BackendUtilityGetRecordsByFieldToQueryBuilderRector::class); +}; diff --git a/tests/Rector/v8/v7/ChangeAttemptsParameterConsoleOutput/ChangeAttemptsParameterConsoleOutputRectorTest.php b/tests/Rector/v8/v7/ChangeAttemptsParameterConsoleOutput/ChangeAttemptsParameterConsoleOutputRectorTest.php index 13efa7240..bb1e705a6 100644 --- a/tests/Rector/v8/v7/ChangeAttemptsParameterConsoleOutput/ChangeAttemptsParameterConsoleOutputRectorTest.php +++ b/tests/Rector/v8/v7/ChangeAttemptsParameterConsoleOutput/ChangeAttemptsParameterConsoleOutputRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v7\ChangeAttemptsParameterConsoleOutput; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v7\ChangeAttemptsParameterConsoleOutputRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ChangeAttemptsParameterConsoleOutputRectorTest extends AbstractRectorTestCase +final class ChangeAttemptsParameterConsoleOutputRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return ChangeAttemptsParameterConsoleOutputRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v7/ChangeAttemptsParameterConsoleOutput/config/configured_rule.php b/tests/Rector/v8/v7/ChangeAttemptsParameterConsoleOutput/config/configured_rule.php new file mode 100644 index 000000000..3047df667 --- /dev/null +++ b/tests/Rector/v8/v7/ChangeAttemptsParameterConsoleOutput/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(ChangeAttemptsParameterConsoleOutputRector::class); +}; diff --git a/tests/Rector/v8/v7/DataHandlerRmComma/DataHandlerRmCommaRectorTest.php b/tests/Rector/v8/v7/DataHandlerRmComma/DataHandlerRmCommaRectorTest.php index 4bd423a05..1b3c0e304 100644 --- a/tests/Rector/v8/v7/DataHandlerRmComma/DataHandlerRmCommaRectorTest.php +++ b/tests/Rector/v8/v7/DataHandlerRmComma/DataHandlerRmCommaRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v7\DataHandlerRmComma; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v7\DataHandlerRmCommaRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class DataHandlerRmCommaRectorTest extends AbstractRectorTestCase +final class DataHandlerRmCommaRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return DataHandlerRmCommaRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v7/DataHandlerRmComma/config/configured_rule.php b/tests/Rector/v8/v7/DataHandlerRmComma/config/configured_rule.php new file mode 100644 index 000000000..9a1c3d0d0 --- /dev/null +++ b/tests/Rector/v8/v7/DataHandlerRmComma/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(DataHandlerRmCommaRector::class); +}; diff --git a/tests/Rector/v8/v7/DataHandlerVariousMethodsAndMethodArguments/DataHandlerVariousMethodsAndMethodArgumentsRectorTest.php b/tests/Rector/v8/v7/DataHandlerVariousMethodsAndMethodArguments/DataHandlerVariousMethodsAndMethodArgumentsRectorTest.php index f024e5440..351784da2 100644 --- a/tests/Rector/v8/v7/DataHandlerVariousMethodsAndMethodArguments/DataHandlerVariousMethodsAndMethodArgumentsRectorTest.php +++ b/tests/Rector/v8/v7/DataHandlerVariousMethodsAndMethodArguments/DataHandlerVariousMethodsAndMethodArgumentsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v7\DataHandlerVariousMethodsAndMethodArguments; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v7\DataHandlerVariousMethodsAndMethodArgumentsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class DataHandlerVariousMethodsAndMethodArgumentsRectorTest extends AbstractRectorTestCase +final class DataHandlerVariousMethodsAndMethodArgumentsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return DataHandlerVariousMethodsAndMethodArgumentsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v7/DataHandlerVariousMethodsAndMethodArguments/config/configured_rule.php b/tests/Rector/v8/v7/DataHandlerVariousMethodsAndMethodArguments/config/configured_rule.php new file mode 100644 index 000000000..38635f8b0 --- /dev/null +++ b/tests/Rector/v8/v7/DataHandlerVariousMethodsAndMethodArguments/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(DataHandlerVariousMethodsAndMethodArgumentsRector::class); +}; diff --git a/tests/Rector/v8/v7/MoveForeignTypesToOverrideChildTca/MoveForeignTypesToOverrideChildTcaRectorTest.php b/tests/Rector/v8/v7/MoveForeignTypesToOverrideChildTca/MoveForeignTypesToOverrideChildTcaRectorTest.php index 98235891b..152b4e2cd 100644 --- a/tests/Rector/v8/v7/MoveForeignTypesToOverrideChildTca/MoveForeignTypesToOverrideChildTcaRectorTest.php +++ b/tests/Rector/v8/v7/MoveForeignTypesToOverrideChildTca/MoveForeignTypesToOverrideChildTcaRectorTest.php @@ -5,18 +5,17 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v7\MoveForeignTypesToOverrideChildTca; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v7\MoveForeignTypesToOverrideChildTcaRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class MoveForeignTypesToOverrideChildTcaRectorTest extends AbstractRectorTestCase +final class MoveForeignTypesToOverrideChildTcaRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() */ public function test(SmartFileInfo $fileInfo): void { - $this->doTestFileInfoWithoutAutoload($fileInfo); + $this->doTestFileInfo($fileInfo, false); } public function provideData(): Iterator @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return MoveForeignTypesToOverrideChildTcaRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v7/MoveForeignTypesToOverrideChildTca/config/configured_rule.php b/tests/Rector/v8/v7/MoveForeignTypesToOverrideChildTca/config/configured_rule.php new file mode 100644 index 000000000..0660a0586 --- /dev/null +++ b/tests/Rector/v8/v7/MoveForeignTypesToOverrideChildTca/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(MoveForeignTypesToOverrideChildTcaRector::class); +}; diff --git a/tests/Rector/v8/v7/RefactorArrayBrowserWrapValue/RefactorArrayBrowserWrapValueRectorTest.php b/tests/Rector/v8/v7/RefactorArrayBrowserWrapValue/RefactorArrayBrowserWrapValueRectorTest.php index a3bd530f9..eaea30f3b 100644 --- a/tests/Rector/v8/v7/RefactorArrayBrowserWrapValue/RefactorArrayBrowserWrapValueRectorTest.php +++ b/tests/Rector/v8/v7/RefactorArrayBrowserWrapValue/RefactorArrayBrowserWrapValueRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v7\RefactorArrayBrowserWrapValue; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v7\RefactorArrayBrowserWrapValueRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorArrayBrowserWrapValueRectorTest extends AbstractRectorTestCase +final class RefactorArrayBrowserWrapValueRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorArrayBrowserWrapValueRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v7/RefactorArrayBrowserWrapValue/config/configured_rule.php b/tests/Rector/v8/v7/RefactorArrayBrowserWrapValue/config/configured_rule.php new file mode 100644 index 000000000..b32490edb --- /dev/null +++ b/tests/Rector/v8/v7/RefactorArrayBrowserWrapValue/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorArrayBrowserWrapValueRector::class); +}; diff --git a/tests/Rector/v8/v7/RefactorGraphicalFunctionsTempPathAndCreateTemSubDir/RefactorGraphicalFunctionsTempPathAndCreateTemSubDirRectorTest.php b/tests/Rector/v8/v7/RefactorGraphicalFunctionsTempPathAndCreateTemSubDir/RefactorGraphicalFunctionsTempPathAndCreateTemSubDirRectorTest.php index 3bfe54abb..92d7d6ed9 100644 --- a/tests/Rector/v8/v7/RefactorGraphicalFunctionsTempPathAndCreateTemSubDir/RefactorGraphicalFunctionsTempPathAndCreateTemSubDirRectorTest.php +++ b/tests/Rector/v8/v7/RefactorGraphicalFunctionsTempPathAndCreateTemSubDir/RefactorGraphicalFunctionsTempPathAndCreateTemSubDirRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v7\RefactorGraphicalFunctionsTempPathAndCreateTemSubDir; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v7\RefactorGraphicalFunctionsTempPathAndCreateTemSubDirRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorGraphicalFunctionsTempPathAndCreateTemSubDirRectorTest extends AbstractRectorTestCase +final class RefactorGraphicalFunctionsTempPathAndCreateTemSubDirRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorGraphicalFunctionsTempPathAndCreateTemSubDirRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v7/RefactorGraphicalFunctionsTempPathAndCreateTemSubDir/config/configured_rule.php b/tests/Rector/v8/v7/RefactorGraphicalFunctionsTempPathAndCreateTemSubDir/config/configured_rule.php new file mode 100644 index 000000000..c12ed5b63 --- /dev/null +++ b/tests/Rector/v8/v7/RefactorGraphicalFunctionsTempPathAndCreateTemSubDir/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorGraphicalFunctionsTempPathAndCreateTemSubDirRector::class); +}; diff --git a/tests/Rector/v8/v7/RefactorPrintContentMethods/RefactorPrintContentMethodsRectorTest.php b/tests/Rector/v8/v7/RefactorPrintContentMethods/RefactorPrintContentMethodsRectorTest.php index 7ecfb2b2a..b28fe13ac 100644 --- a/tests/Rector/v8/v7/RefactorPrintContentMethods/RefactorPrintContentMethodsRectorTest.php +++ b/tests/Rector/v8/v7/RefactorPrintContentMethods/RefactorPrintContentMethodsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v7\RefactorPrintContentMethods; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v7\RefactorPrintContentMethodsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorPrintContentMethodsRectorTest extends AbstractRectorTestCase +final class RefactorPrintContentMethodsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorPrintContentMethodsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v7/RefactorPrintContentMethods/config/configured_rule.php b/tests/Rector/v8/v7/RefactorPrintContentMethods/config/configured_rule.php new file mode 100644 index 000000000..9aed1b3e8 --- /dev/null +++ b/tests/Rector/v8/v7/RefactorPrintContentMethods/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorPrintContentMethodsRector::class); +}; diff --git a/tests/Rector/v8/v7/RefactorRemovedMarkerMethodsFromContentObjectRenderer/RefactorRemovedMarkerMethodsFromContentObjectRendererRectorTest.php b/tests/Rector/v8/v7/RefactorRemovedMarkerMethodsFromContentObjectRenderer/RefactorRemovedMarkerMethodsFromContentObjectRendererRectorTest.php index a0301577c..02c5376ab 100644 --- a/tests/Rector/v8/v7/RefactorRemovedMarkerMethodsFromContentObjectRenderer/RefactorRemovedMarkerMethodsFromContentObjectRendererRectorTest.php +++ b/tests/Rector/v8/v7/RefactorRemovedMarkerMethodsFromContentObjectRenderer/RefactorRemovedMarkerMethodsFromContentObjectRendererRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v7\RefactorRemovedMarkerMethodsFromContentObjectRenderer; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v7\RefactorRemovedMarkerMethodsFromContentObjectRendererRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorRemovedMarkerMethodsFromContentObjectRendererRectorTest extends AbstractRectorTestCase +final class RefactorRemovedMarkerMethodsFromContentObjectRendererRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorRemovedMarkerMethodsFromContentObjectRendererRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v7/RefactorRemovedMarkerMethodsFromContentObjectRenderer/config/configured_rule.php b/tests/Rector/v8/v7/RefactorRemovedMarkerMethodsFromContentObjectRenderer/config/configured_rule.php new file mode 100644 index 000000000..4681fb643 --- /dev/null +++ b/tests/Rector/v8/v7/RefactorRemovedMarkerMethodsFromContentObjectRenderer/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorRemovedMarkerMethodsFromContentObjectRendererRector::class); +}; diff --git a/tests/Rector/v8/v7/RemoveConfigMaxFromInputDateTimeFields/RemoveConfigMaxFromInputDateTimeFieldsRectorTest.php b/tests/Rector/v8/v7/RemoveConfigMaxFromInputDateTimeFields/RemoveConfigMaxFromInputDateTimeFieldsRectorTest.php index 4041fcdf0..7eae011b7 100644 --- a/tests/Rector/v8/v7/RemoveConfigMaxFromInputDateTimeFields/RemoveConfigMaxFromInputDateTimeFieldsRectorTest.php +++ b/tests/Rector/v8/v7/RemoveConfigMaxFromInputDateTimeFields/RemoveConfigMaxFromInputDateTimeFieldsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v7\RemoveConfigMaxFromInputDateTimeFields; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v7\RemoveConfigMaxFromInputDateTimeFieldsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveConfigMaxFromInputDateTimeFieldsRectorTest extends AbstractRectorTestCase +final class RemoveConfigMaxFromInputDateTimeFieldsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveConfigMaxFromInputDateTimeFieldsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v7/RemoveConfigMaxFromInputDateTimeFields/config/configured_rule.php b/tests/Rector/v8/v7/RemoveConfigMaxFromInputDateTimeFields/config/configured_rule.php new file mode 100644 index 000000000..cdd4c9418 --- /dev/null +++ b/tests/Rector/v8/v7/RemoveConfigMaxFromInputDateTimeFields/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveConfigMaxFromInputDateTimeFieldsRector::class); +}; diff --git a/tests/Rector/v8/v7/RemoveLocalizationModeKeepIfNeeded/RemoveLocalizationModeKeepIfNeededRectorTest.php b/tests/Rector/v8/v7/RemoveLocalizationModeKeepIfNeeded/RemoveLocalizationModeKeepIfNeededRectorTest.php index 55bb5a6e3..3943843ef 100644 --- a/tests/Rector/v8/v7/RemoveLocalizationModeKeepIfNeeded/RemoveLocalizationModeKeepIfNeededRectorTest.php +++ b/tests/Rector/v8/v7/RemoveLocalizationModeKeepIfNeeded/RemoveLocalizationModeKeepIfNeededRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v7\RemoveLocalizationModeKeepIfNeeded; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v7\RemoveLocalizationModeKeepIfNeededRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveLocalizationModeKeepIfNeededRectorTest extends AbstractRectorTestCase +final class RemoveLocalizationModeKeepIfNeededRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveLocalizationModeKeepIfNeededRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v7/RemoveLocalizationModeKeepIfNeeded/config/configured_rule.php b/tests/Rector/v8/v7/RemoveLocalizationModeKeepIfNeeded/config/configured_rule.php new file mode 100644 index 000000000..3db33cf55 --- /dev/null +++ b/tests/Rector/v8/v7/RemoveLocalizationModeKeepIfNeeded/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveLocalizationModeKeepIfNeededRector::class); +}; diff --git a/tests/Rector/v8/v7/TemplateServiceSplitConfArray/TemplateServiceSplitConfArrayRectorTest.php b/tests/Rector/v8/v7/TemplateServiceSplitConfArray/TemplateServiceSplitConfArrayRectorTest.php index 6d993f839..4ec79f141 100644 --- a/tests/Rector/v8/v7/TemplateServiceSplitConfArray/TemplateServiceSplitConfArrayRectorTest.php +++ b/tests/Rector/v8/v7/TemplateServiceSplitConfArray/TemplateServiceSplitConfArrayRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v7\TemplateServiceSplitConfArray; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v7\TemplateServiceSplitConfArrayRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class TemplateServiceSplitConfArrayRectorTest extends AbstractRectorTestCase +final class TemplateServiceSplitConfArrayRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return TemplateServiceSplitConfArrayRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v7/TemplateServiceSplitConfArray/config/configured_rule.php b/tests/Rector/v8/v7/TemplateServiceSplitConfArray/config/configured_rule.php new file mode 100644 index 000000000..d5b35286e --- /dev/null +++ b/tests/Rector/v8/v7/TemplateServiceSplitConfArray/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(TemplateServiceSplitConfArrayRector::class); +}; diff --git a/tests/Rector/v8/v7/UseCachingFrameworkInsteadGetAndStoreHash/UseCachingFrameworkInsteadGetAndStoreHashRectorTest.php b/tests/Rector/v8/v7/UseCachingFrameworkInsteadGetAndStoreHash/UseCachingFrameworkInsteadGetAndStoreHashRectorTest.php index a66e03a88..ba93c7f9e 100644 --- a/tests/Rector/v8/v7/UseCachingFrameworkInsteadGetAndStoreHash/UseCachingFrameworkInsteadGetAndStoreHashRectorTest.php +++ b/tests/Rector/v8/v7/UseCachingFrameworkInsteadGetAndStoreHash/UseCachingFrameworkInsteadGetAndStoreHashRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v8\v7\UseCachingFrameworkInsteadGetAndStoreHash; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v8\v7\UseCachingFrameworkInsteadGetAndStoreHashRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseCachingFrameworkInsteadGetAndStoreHashRectorTest extends AbstractRectorTestCase +final class UseCachingFrameworkInsteadGetAndStoreHashRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseCachingFrameworkInsteadGetAndStoreHashRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v8/v7/UseCachingFrameworkInsteadGetAndStoreHash/config/configured_rule.php b/tests/Rector/v8/v7/UseCachingFrameworkInsteadGetAndStoreHash/config/configured_rule.php new file mode 100644 index 000000000..3b582ac23 --- /dev/null +++ b/tests/Rector/v8/v7/UseCachingFrameworkInsteadGetAndStoreHash/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseCachingFrameworkInsteadGetAndStoreHashRector::class); +}; diff --git a/tests/Rector/v9/v0/CheckForExtensionInfo/CheckForExtensionInfoRectorTest.php b/tests/Rector/v9/v0/CheckForExtensionInfo/CheckForExtensionInfoRectorTest.php index 21f3e67f2..184f3ddf4 100644 --- a/tests/Rector/v9/v0/CheckForExtensionInfo/CheckForExtensionInfoRectorTest.php +++ b/tests/Rector/v9/v0/CheckForExtensionInfo/CheckForExtensionInfoRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\CheckForExtensionInfo; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\CheckForExtensionInfoRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class CheckForExtensionInfoRectorTest extends AbstractRectorTestCase +final class CheckForExtensionInfoRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return CheckForExtensionInfoRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/CheckForExtensionInfo/config/configured_rule.php b/tests/Rector/v9/v0/CheckForExtensionInfo/config/configured_rule.php new file mode 100644 index 000000000..8f9b8bb3c --- /dev/null +++ b/tests/Rector/v9/v0/CheckForExtensionInfo/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(CheckForExtensionInfoRector::class); +}; diff --git a/tests/Rector/v9/v0/CheckForExtensionVersion/CheckForExtensionVersionRectorTest.php b/tests/Rector/v9/v0/CheckForExtensionVersion/CheckForExtensionVersionRectorTest.php index fba3c0e02..352463d88 100644 --- a/tests/Rector/v9/v0/CheckForExtensionVersion/CheckForExtensionVersionRectorTest.php +++ b/tests/Rector/v9/v0/CheckForExtensionVersion/CheckForExtensionVersionRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\CheckForExtensionVersion; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\CheckForExtensionVersionRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class CheckForExtensionVersionRectorTest extends AbstractRectorTestCase +final class CheckForExtensionVersionRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return CheckForExtensionVersionRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/CheckForExtensionVersion/config/configured_rule.php b/tests/Rector/v9/v0/CheckForExtensionVersion/config/configured_rule.php new file mode 100644 index 000000000..16dfa162e --- /dev/null +++ b/tests/Rector/v9/v0/CheckForExtensionVersion/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(CheckForExtensionVersionRector::class); +}; diff --git a/tests/Rector/v9/v0/FindByPidsAndAuthorId/FindByPidsAndAuthorIdRectorTest.php b/tests/Rector/v9/v0/FindByPidsAndAuthorId/FindByPidsAndAuthorIdRectorTest.php index 15862d328..2c320a2f5 100644 --- a/tests/Rector/v9/v0/FindByPidsAndAuthorId/FindByPidsAndAuthorIdRectorTest.php +++ b/tests/Rector/v9/v0/FindByPidsAndAuthorId/FindByPidsAndAuthorIdRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\FindByPidsAndAuthorId; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\FindByPidsAndAuthorIdRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class FindByPidsAndAuthorIdRectorTest extends AbstractRectorTestCase +final class FindByPidsAndAuthorIdRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return FindByPidsAndAuthorIdRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/FindByPidsAndAuthorId/config/configured_rule.php b/tests/Rector/v9/v0/FindByPidsAndAuthorId/config/configured_rule.php new file mode 100644 index 000000000..e57cff9aa --- /dev/null +++ b/tests/Rector/v9/v0/FindByPidsAndAuthorId/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(FindByPidsAndAuthorIdRector::class); +}; diff --git a/tests/Rector/v9/v0/GeneratePageTitle/GeneratePageTitleRectorTest.php b/tests/Rector/v9/v0/GeneratePageTitle/GeneratePageTitleRectorTest.php index 6a7b02086..54fc2cf0c 100644 --- a/tests/Rector/v9/v0/GeneratePageTitle/GeneratePageTitleRectorTest.php +++ b/tests/Rector/v9/v0/GeneratePageTitle/GeneratePageTitleRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\GeneratePageTitle; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\GeneratePageTitleRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class GeneratePageTitleRectorTest extends AbstractRectorTestCase +final class GeneratePageTitleRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return GeneratePageTitleRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/GeneratePageTitle/config/configured_rule.php b/tests/Rector/v9/v0/GeneratePageTitle/config/configured_rule.php new file mode 100644 index 000000000..2b957eb54 --- /dev/null +++ b/tests/Rector/v9/v0/GeneratePageTitle/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(GeneratePageTitleRector::class); +}; diff --git a/tests/Rector/v9/v0/IgnoreValidation/IgnoreValidationAnnotationRectorTest.php b/tests/Rector/v9/v0/IgnoreValidation/IgnoreValidationAnnotationRectorTest.php index 283d21683..9a1afc0ca 100644 --- a/tests/Rector/v9/v0/IgnoreValidation/IgnoreValidationAnnotationRectorTest.php +++ b/tests/Rector/v9/v0/IgnoreValidation/IgnoreValidationAnnotationRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\IgnoreValidation; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\IgnoreValidationAnnotationRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class IgnoreValidationAnnotationRectorTest extends AbstractRectorTestCase +final class IgnoreValidationAnnotationRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return IgnoreValidationAnnotationRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/IgnoreValidation/config/configured_rule.php b/tests/Rector/v9/v0/IgnoreValidation/config/configured_rule.php new file mode 100644 index 000000000..0b1d038c4 --- /dev/null +++ b/tests/Rector/v9/v0/IgnoreValidation/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(IgnoreValidationAnnotationRector::class); +}; diff --git a/tests/Rector/v9/v0/InjectAnnotation/InjectAnnotationRectorTest.php b/tests/Rector/v9/v0/InjectAnnotation/InjectAnnotationRectorTest.php index 7b2483608..acddc4a50 100644 --- a/tests/Rector/v9/v0/InjectAnnotation/InjectAnnotationRectorTest.php +++ b/tests/Rector/v9/v0/InjectAnnotation/InjectAnnotationRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\InjectAnnotation; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\InjectAnnotationRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class InjectAnnotationRectorTest extends AbstractRectorTestCase +final class InjectAnnotationRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return InjectAnnotationRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/InjectAnnotation/config/configured_rule.php b/tests/Rector/v9/v0/InjectAnnotation/config/configured_rule.php new file mode 100644 index 000000000..74aedf1b3 --- /dev/null +++ b/tests/Rector/v9/v0/InjectAnnotation/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(InjectAnnotationRector::class); +}; diff --git a/tests/Rector/v9/v0/MetaTagManagement/MetaTagManagementRectorTest.php b/tests/Rector/v9/v0/MetaTagManagement/MetaTagManagementRectorTest.php index b6467a675..52c785a90 100644 --- a/tests/Rector/v9/v0/MetaTagManagement/MetaTagManagementRectorTest.php +++ b/tests/Rector/v9/v0/MetaTagManagement/MetaTagManagementRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\MetaTagManagement; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\MetaTagManagementRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class MetaTagManagementRectorTest extends AbstractRectorTestCase +final class MetaTagManagementRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return MetaTagManagementRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/MetaTagManagement/config/configured_rule.php b/tests/Rector/v9/v0/MetaTagManagement/config/configured_rule.php new file mode 100644 index 000000000..06783de28 --- /dev/null +++ b/tests/Rector/v9/v0/MetaTagManagement/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(MetaTagManagementRector::class); +}; diff --git a/tests/Rector/v9/v0/MoveRenderArgumentsToInitializeArgumentsMethod/MoveRenderArgumentsToInitializeArgumentsMethodRectorTest.php b/tests/Rector/v9/v0/MoveRenderArgumentsToInitializeArgumentsMethod/MoveRenderArgumentsToInitializeArgumentsMethodRectorTest.php index 8be6d1783..f49c65025 100644 --- a/tests/Rector/v9/v0/MoveRenderArgumentsToInitializeArgumentsMethod/MoveRenderArgumentsToInitializeArgumentsMethodRectorTest.php +++ b/tests/Rector/v9/v0/MoveRenderArgumentsToInitializeArgumentsMethod/MoveRenderArgumentsToInitializeArgumentsMethodRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\MoveRenderArgumentsToInitializeArgumentsMethod; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\MoveRenderArgumentsToInitializeArgumentsMethodRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class MoveRenderArgumentsToInitializeArgumentsMethodRectorTest extends AbstractRectorTestCase +final class MoveRenderArgumentsToInitializeArgumentsMethodRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return MoveRenderArgumentsToInitializeArgumentsMethodRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/MoveRenderArgumentsToInitializeArgumentsMethod/config/configured_rule.php b/tests/Rector/v9/v0/MoveRenderArgumentsToInitializeArgumentsMethod/config/configured_rule.php new file mode 100644 index 000000000..4897b87b6 --- /dev/null +++ b/tests/Rector/v9/v0/MoveRenderArgumentsToInitializeArgumentsMethod/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(MoveRenderArgumentsToInitializeArgumentsMethodRector::class); +}; diff --git a/tests/Rector/v9/v0/RefactorBackendUtilityGetPagesTSconfig/RefactorBackendUtilityGetPagesTSconfigRectorTest.php b/tests/Rector/v9/v0/RefactorBackendUtilityGetPagesTSconfig/RefactorBackendUtilityGetPagesTSconfigRectorTest.php index ea3cdf49c..f71852929 100644 --- a/tests/Rector/v9/v0/RefactorBackendUtilityGetPagesTSconfig/RefactorBackendUtilityGetPagesTSconfigRectorTest.php +++ b/tests/Rector/v9/v0/RefactorBackendUtilityGetPagesTSconfig/RefactorBackendUtilityGetPagesTSconfigRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\RefactorBackendUtilityGetPagesTSconfig; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\RefactorBackendUtilityGetPagesTSconfigRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorBackendUtilityGetPagesTSconfigRectorTest extends AbstractRectorTestCase +final class RefactorBackendUtilityGetPagesTSconfigRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorBackendUtilityGetPagesTSconfigRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/RefactorBackendUtilityGetPagesTSconfig/config/configured_rule.php b/tests/Rector/v9/v0/RefactorBackendUtilityGetPagesTSconfig/config/configured_rule.php new file mode 100644 index 000000000..d67065aa8 --- /dev/null +++ b/tests/Rector/v9/v0/RefactorBackendUtilityGetPagesTSconfig/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorBackendUtilityGetPagesTSconfigRector::class); +}; diff --git a/tests/Rector/v9/v0/RefactorDeprecationLog/RefactorDeprecationLogRectorTest.php b/tests/Rector/v9/v0/RefactorDeprecationLog/RefactorDeprecationLogRectorTest.php index e44e4fd0b..80b8840c1 100644 --- a/tests/Rector/v9/v0/RefactorDeprecationLog/RefactorDeprecationLogRectorTest.php +++ b/tests/Rector/v9/v0/RefactorDeprecationLog/RefactorDeprecationLogRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\RefactorDeprecationLog; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\RefactorDeprecationLogRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorDeprecationLogRectorTest extends AbstractRectorTestCase +final class RefactorDeprecationLogRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorDeprecationLogRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/RefactorDeprecationLog/config/configured_rule.php b/tests/Rector/v9/v0/RefactorDeprecationLog/config/configured_rule.php new file mode 100644 index 000000000..00c736c6a --- /dev/null +++ b/tests/Rector/v9/v0/RefactorDeprecationLog/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorDeprecationLogRector::class); +}; diff --git a/tests/Rector/v9/v0/RefactorMethodsFromExtensionManagementUtility/RefactorMethodsFromExtensionManagementUtilityRectorTest.php b/tests/Rector/v9/v0/RefactorMethodsFromExtensionManagementUtility/RefactorMethodsFromExtensionManagementUtilityRectorTest.php index c904a6017..bdd19d38b 100644 --- a/tests/Rector/v9/v0/RefactorMethodsFromExtensionManagementUtility/RefactorMethodsFromExtensionManagementUtilityRectorTest.php +++ b/tests/Rector/v9/v0/RefactorMethodsFromExtensionManagementUtility/RefactorMethodsFromExtensionManagementUtilityRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\RefactorMethodsFromExtensionManagementUtility; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\RefactorMethodsFromExtensionManagementUtilityRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorMethodsFromExtensionManagementUtilityRectorTest extends AbstractRectorTestCase +final class RefactorMethodsFromExtensionManagementUtilityRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorMethodsFromExtensionManagementUtilityRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/RefactorMethodsFromExtensionManagementUtility/config/configured_rule.php b/tests/Rector/v9/v0/RefactorMethodsFromExtensionManagementUtility/config/configured_rule.php new file mode 100644 index 000000000..79aac6257 --- /dev/null +++ b/tests/Rector/v9/v0/RefactorMethodsFromExtensionManagementUtility/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorMethodsFromExtensionManagementUtilityRector::class); +}; diff --git a/tests/Rector/v9/v0/RemoveMethodInitTCA/RemoveMethodInitTCARectorTest.php b/tests/Rector/v9/v0/RemoveMethodInitTCA/RemoveMethodInitTCARectorTest.php index c4f02015c..ffdc86614 100644 --- a/tests/Rector/v9/v0/RemoveMethodInitTCA/RemoveMethodInitTCARectorTest.php +++ b/tests/Rector/v9/v0/RemoveMethodInitTCA/RemoveMethodInitTCARectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\RemoveMethodInitTCA; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\RemoveMethodInitTCARector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveMethodInitTCARectorTest extends AbstractRectorTestCase +final class RemoveMethodInitTCARectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveMethodInitTCARector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/RemoveMethodInitTCA/config/configured_rule.php b/tests/Rector/v9/v0/RemoveMethodInitTCA/config/configured_rule.php new file mode 100644 index 000000000..5b0c49611 --- /dev/null +++ b/tests/Rector/v9/v0/RemoveMethodInitTCA/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveMethodInitTCARector::class); +}; diff --git a/tests/Rector/v9/v0/RemoveOptionLocalizeChildrenAtParentLocalization/RemoveOptionLocalizeChildrenAtParentLocalizationRectorTest.php b/tests/Rector/v9/v0/RemoveOptionLocalizeChildrenAtParentLocalization/RemoveOptionLocalizeChildrenAtParentLocalizationRectorTest.php index 13f711091..1d45ae76b 100644 --- a/tests/Rector/v9/v0/RemoveOptionLocalizeChildrenAtParentLocalization/RemoveOptionLocalizeChildrenAtParentLocalizationRectorTest.php +++ b/tests/Rector/v9/v0/RemoveOptionLocalizeChildrenAtParentLocalization/RemoveOptionLocalizeChildrenAtParentLocalizationRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\RemoveOptionLocalizeChildrenAtParentLocalization; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\RemoveOptionLocalizeChildrenAtParentLocalizationRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveOptionLocalizeChildrenAtParentLocalizationRectorTest extends AbstractRectorTestCase +final class RemoveOptionLocalizeChildrenAtParentLocalizationRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveOptionLocalizeChildrenAtParentLocalizationRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/RemoveOptionLocalizeChildrenAtParentLocalization/config/configured_rule.php b/tests/Rector/v9/v0/RemoveOptionLocalizeChildrenAtParentLocalization/config/configured_rule.php new file mode 100644 index 000000000..5b82a65f4 --- /dev/null +++ b/tests/Rector/v9/v0/RemoveOptionLocalizeChildrenAtParentLocalization/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveOptionLocalizeChildrenAtParentLocalizationRector::class); +}; diff --git a/tests/Rector/v9/v0/RemovePropertiesFromSimpleDataHandlerController/RemovePropertiesFromSimpleDataHandlerControllerRectorTest.php b/tests/Rector/v9/v0/RemovePropertiesFromSimpleDataHandlerController/RemovePropertiesFromSimpleDataHandlerControllerRectorTest.php index 9e5e08536..e3653e3d1 100644 --- a/tests/Rector/v9/v0/RemovePropertiesFromSimpleDataHandlerController/RemovePropertiesFromSimpleDataHandlerControllerRectorTest.php +++ b/tests/Rector/v9/v0/RemovePropertiesFromSimpleDataHandlerController/RemovePropertiesFromSimpleDataHandlerControllerRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\RemovePropertiesFromSimpleDataHandlerController; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\RemovePropertiesFromSimpleDataHandlerControllerRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemovePropertiesFromSimpleDataHandlerControllerRectorTest extends AbstractRectorTestCase +final class RemovePropertiesFromSimpleDataHandlerControllerRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemovePropertiesFromSimpleDataHandlerControllerRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/RemovePropertiesFromSimpleDataHandlerController/config/configured_rule.php b/tests/Rector/v9/v0/RemovePropertiesFromSimpleDataHandlerController/config/configured_rule.php new file mode 100644 index 000000000..eb1ec540d --- /dev/null +++ b/tests/Rector/v9/v0/RemovePropertiesFromSimpleDataHandlerController/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemovePropertiesFromSimpleDataHandlerControllerRector::class); +}; diff --git a/tests/Rector/v9/v0/RemoveSecondArgumentGeneralUtilityMkdirDeep/RemoveSecondArgumentGeneralUtilityMkdirDeepRectorTest.php b/tests/Rector/v9/v0/RemoveSecondArgumentGeneralUtilityMkdirDeep/RemoveSecondArgumentGeneralUtilityMkdirDeepRectorTest.php index 4a6558d4f..e5f3ec645 100644 --- a/tests/Rector/v9/v0/RemoveSecondArgumentGeneralUtilityMkdirDeep/RemoveSecondArgumentGeneralUtilityMkdirDeepRectorTest.php +++ b/tests/Rector/v9/v0/RemoveSecondArgumentGeneralUtilityMkdirDeep/RemoveSecondArgumentGeneralUtilityMkdirDeepRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\RemoveSecondArgumentGeneralUtilityMkdirDeep; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\RemoveSecondArgumentGeneralUtilityMkdirDeepRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveSecondArgumentGeneralUtilityMkdirDeepRectorTest extends AbstractRectorTestCase +final class RemoveSecondArgumentGeneralUtilityMkdirDeepRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveSecondArgumentGeneralUtilityMkdirDeepRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/RemoveSecondArgumentGeneralUtilityMkdirDeep/config/configured_rule.php b/tests/Rector/v9/v0/RemoveSecondArgumentGeneralUtilityMkdirDeep/config/configured_rule.php new file mode 100644 index 000000000..2ea6737bd --- /dev/null +++ b/tests/Rector/v9/v0/RemoveSecondArgumentGeneralUtilityMkdirDeep/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveSecondArgumentGeneralUtilityMkdirDeepRector::class); +}; diff --git a/tests/Rector/v9/v0/ReplaceAnnotation/ReplaceAnnotationRectorTest.php b/tests/Rector/v9/v0/ReplaceAnnotation/ReplaceAnnotationRectorTest.php index a01498b6e..f7f589c79 100644 --- a/tests/Rector/v9/v0/ReplaceAnnotation/ReplaceAnnotationRectorTest.php +++ b/tests/Rector/v9/v0/ReplaceAnnotation/ReplaceAnnotationRectorTest.php @@ -5,10 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\ReplaceAnnotation; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ReplaceAnnotationRectorTest extends AbstractRectorTestCase +final class ReplaceAnnotationRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -23,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function provideConfigFileInfo(): ?SmartFileInfo + public function provideConfigFilePath(): string { - return new SmartFileInfo(__DIR__ . '/config/configured_rule.php'); + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/ReplaceAnnotation/config/configured_rule.php b/tests/Rector/v9/v0/ReplaceAnnotation/config/configured_rule.php index e3464ac23..d14790282 100644 --- a/tests/Rector/v9/v0/ReplaceAnnotation/config/configured_rule.php +++ b/tests/Rector/v9/v0/ReplaceAnnotation/config/configured_rule.php @@ -6,8 +6,9 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; return static function (ContainerConfigurator $containerConfigurator): void { - $services = $containerConfigurator->services(); + $containerConfigurator->import(__DIR__ . '/../../../../../../config/services.php'); + $services = $containerConfigurator->services(); $services->set(ReplaceAnnotationRector::class) ->call('configure', [[ ReplaceAnnotationRector::OLD_TO_NEW_ANNOTATIONS => [ diff --git a/tests/Rector/v9/v0/ReplaceExtKeyWithExtensionKey/ReplaceExtKeyWithExtensionKeyRectorTest.php b/tests/Rector/v9/v0/ReplaceExtKeyWithExtensionKey/ReplaceExtKeyWithExtensionKeyRectorTest.php index 029d946bf..1b48cd5e0 100644 --- a/tests/Rector/v9/v0/ReplaceExtKeyWithExtensionKey/ReplaceExtKeyWithExtensionKeyRectorTest.php +++ b/tests/Rector/v9/v0/ReplaceExtKeyWithExtensionKey/ReplaceExtKeyWithExtensionKeyRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\ReplaceExtKeyWithExtensionKey; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\ReplaceExtKeyWithExtensionKeyRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ReplaceExtKeyWithExtensionKeyRectorTest extends AbstractRectorTestCase +final class ReplaceExtKeyWithExtensionKeyRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return ReplaceExtKeyWithExtensionKeyRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/ReplaceExtKeyWithExtensionKey/config/configured_rule.php b/tests/Rector/v9/v0/ReplaceExtKeyWithExtensionKey/config/configured_rule.php new file mode 100644 index 000000000..2af67d63d --- /dev/null +++ b/tests/Rector/v9/v0/ReplaceExtKeyWithExtensionKey/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(ReplaceExtKeyWithExtensionKeyRector::class); +}; diff --git a/tests/Rector/v9/v0/SubstituteCacheMethods/SubstituteCacheWrapperMethodsRectorTest.php b/tests/Rector/v9/v0/SubstituteCacheMethods/SubstituteCacheWrapperMethodsRectorTest.php index 2344783b9..d333f1063 100644 --- a/tests/Rector/v9/v0/SubstituteCacheMethods/SubstituteCacheWrapperMethodsRectorTest.php +++ b/tests/Rector/v9/v0/SubstituteCacheMethods/SubstituteCacheWrapperMethodsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\SubstituteCacheMethods; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\SubstituteCacheWrapperMethodsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class SubstituteCacheWrapperMethodsRectorTest extends AbstractRectorTestCase +final class SubstituteCacheWrapperMethodsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return SubstituteCacheWrapperMethodsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/SubstituteCacheMethods/config/configured_rule.php b/tests/Rector/v9/v0/SubstituteCacheMethods/config/configured_rule.php new file mode 100644 index 000000000..de66e3583 --- /dev/null +++ b/tests/Rector/v9/v0/SubstituteCacheMethods/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(SubstituteCacheWrapperMethodsRector::class); +}; diff --git a/tests/Rector/v9/v0/SubstituteConstantParsetimeStart/SubstituteConstantParsetimeStartRectorTest.php b/tests/Rector/v9/v0/SubstituteConstantParsetimeStart/SubstituteConstantParsetimeStartRectorTest.php index 1d005e1fc..94ed3e8b8 100644 --- a/tests/Rector/v9/v0/SubstituteConstantParsetimeStart/SubstituteConstantParsetimeStartRectorTest.php +++ b/tests/Rector/v9/v0/SubstituteConstantParsetimeStart/SubstituteConstantParsetimeStartRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\SubstituteConstantParsetimeStart; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\SubstituteConstantParsetimeStartRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class SubstituteConstantParsetimeStartRectorTest extends AbstractRectorTestCase +final class SubstituteConstantParsetimeStartRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return SubstituteConstantParsetimeStartRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/SubstituteConstantParsetimeStart/config/configured_rule.php b/tests/Rector/v9/v0/SubstituteConstantParsetimeStart/config/configured_rule.php new file mode 100644 index 000000000..a0eeb5217 --- /dev/null +++ b/tests/Rector/v9/v0/SubstituteConstantParsetimeStart/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(SubstituteConstantParsetimeStartRector::class); +}; diff --git a/tests/Rector/v9/v0/UseExtensionConfigurationApi/UseExtensionConfigurationApiRectorTest.php b/tests/Rector/v9/v0/UseExtensionConfigurationApi/UseExtensionConfigurationApiRectorTest.php index 106ba8c1e..d7a8b99e0 100644 --- a/tests/Rector/v9/v0/UseExtensionConfigurationApi/UseExtensionConfigurationApiRectorTest.php +++ b/tests/Rector/v9/v0/UseExtensionConfigurationApi/UseExtensionConfigurationApiRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\UseExtensionConfigurationApi; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\UseExtensionConfigurationApiRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseExtensionConfigurationApiRectorTest extends AbstractRectorTestCase +final class UseExtensionConfigurationApiRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseExtensionConfigurationApiRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/UseExtensionConfigurationApi/config/configured_rule.php b/tests/Rector/v9/v0/UseExtensionConfigurationApi/config/configured_rule.php new file mode 100644 index 000000000..56c829770 --- /dev/null +++ b/tests/Rector/v9/v0/UseExtensionConfigurationApi/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseExtensionConfigurationApiRector::class); +}; diff --git a/tests/Rector/v9/v0/UseLogMethod/UseLogMethodInsteadOfNewLog2RectorTest.php b/tests/Rector/v9/v0/UseLogMethod/UseLogMethodInsteadOfNewLog2RectorTest.php index acec84860..1bcc34c10 100644 --- a/tests/Rector/v9/v0/UseLogMethod/UseLogMethodInsteadOfNewLog2RectorTest.php +++ b/tests/Rector/v9/v0/UseLogMethod/UseLogMethodInsteadOfNewLog2RectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\UseLogMethod; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\UseLogMethodInsteadOfNewLog2Rector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseLogMethodInsteadOfNewLog2RectorTest extends AbstractRectorTestCase +final class UseLogMethodInsteadOfNewLog2RectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseLogMethodInsteadOfNewLog2Rector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/UseLogMethod/config/configured_rule.php b/tests/Rector/v9/v0/UseLogMethod/config/configured_rule.php new file mode 100644 index 000000000..0d6fd4e66 --- /dev/null +++ b/tests/Rector/v9/v0/UseLogMethod/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseLogMethodInsteadOfNewLog2Rector::class); +}; diff --git a/tests/Rector/v9/v0/UseNewComponentIdForPageTree/UseNewComponentIdForPageTreeRectorTest.php b/tests/Rector/v9/v0/UseNewComponentIdForPageTree/UseNewComponentIdForPageTreeRectorTest.php index e747f8e15..8fab4aab0 100644 --- a/tests/Rector/v9/v0/UseNewComponentIdForPageTree/UseNewComponentIdForPageTreeRectorTest.php +++ b/tests/Rector/v9/v0/UseNewComponentIdForPageTree/UseNewComponentIdForPageTreeRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\UseNewComponentIdForPageTree; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\UseNewComponentIdForPageTreeRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseNewComponentIdForPageTreeRectorTest extends AbstractRectorTestCase +final class UseNewComponentIdForPageTreeRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseNewComponentIdForPageTreeRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/UseNewComponentIdForPageTree/config/configured_rule.php b/tests/Rector/v9/v0/UseNewComponentIdForPageTree/config/configured_rule.php new file mode 100644 index 000000000..17302964c --- /dev/null +++ b/tests/Rector/v9/v0/UseNewComponentIdForPageTree/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseNewComponentIdForPageTreeRector::class); +}; diff --git a/tests/Rector/v9/v0/UseRenderingContextGetControllerContext/UseRenderingContextGetControllerContextRectorTest.php b/tests/Rector/v9/v0/UseRenderingContextGetControllerContext/UseRenderingContextGetControllerContextRectorTest.php index 9771f2e84..c655cc763 100644 --- a/tests/Rector/v9/v0/UseRenderingContextGetControllerContext/UseRenderingContextGetControllerContextRectorTest.php +++ b/tests/Rector/v9/v0/UseRenderingContextGetControllerContext/UseRenderingContextGetControllerContextRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v0\UseRenderingContextGetControllerContext; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v0\UseRenderingContextGetControllerContextRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseRenderingContextGetControllerContextRectorTest extends AbstractRectorTestCase +final class UseRenderingContextGetControllerContextRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseRenderingContextGetControllerContextRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v0/UseRenderingContextGetControllerContext/config/configured_rule.php b/tests/Rector/v9/v0/UseRenderingContextGetControllerContext/config/configured_rule.php new file mode 100644 index 000000000..9f3b12218 --- /dev/null +++ b/tests/Rector/v9/v0/UseRenderingContextGetControllerContext/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseRenderingContextGetControllerContextRector::class); +}; diff --git a/tests/Rector/v9/v2/GeneralUtilityGetUrlRequestHeaders/GeneralUtilityGetUrlRequestHeadersRectorTest.php b/tests/Rector/v9/v2/GeneralUtilityGetUrlRequestHeaders/GeneralUtilityGetUrlRequestHeadersRectorTest.php index 9523b05b4..2a57d4226 100644 --- a/tests/Rector/v9/v2/GeneralUtilityGetUrlRequestHeaders/GeneralUtilityGetUrlRequestHeadersRectorTest.php +++ b/tests/Rector/v9/v2/GeneralUtilityGetUrlRequestHeaders/GeneralUtilityGetUrlRequestHeadersRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v2\GeneralUtilityGetUrlRequestHeaders; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v2\GeneralUtilityGetUrlRequestHeadersRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class GeneralUtilityGetUrlRequestHeadersRectorTest extends AbstractRectorTestCase +final class GeneralUtilityGetUrlRequestHeadersRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return GeneralUtilityGetUrlRequestHeadersRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v2/GeneralUtilityGetUrlRequestHeaders/config/configured_rule.php b/tests/Rector/v9/v2/GeneralUtilityGetUrlRequestHeaders/config/configured_rule.php new file mode 100644 index 000000000..5e928681c --- /dev/null +++ b/tests/Rector/v9/v2/GeneralUtilityGetUrlRequestHeaders/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(GeneralUtilityGetUrlRequestHeadersRector::class); +}; diff --git a/tests/Rector/v9/v2/PageNotFoundAndErrorHandling/PageNotFoundAndErrorHandlingRectorTest.php b/tests/Rector/v9/v2/PageNotFoundAndErrorHandling/PageNotFoundAndErrorHandlingRectorTest.php index 22ea65af8..bd5a40c93 100644 --- a/tests/Rector/v9/v2/PageNotFoundAndErrorHandling/PageNotFoundAndErrorHandlingRectorTest.php +++ b/tests/Rector/v9/v2/PageNotFoundAndErrorHandling/PageNotFoundAndErrorHandlingRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v2\PageNotFoundAndErrorHandling; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v2\PageNotFoundAndErrorHandlingRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class PageNotFoundAndErrorHandlingRectorTest extends AbstractRectorTestCase +final class PageNotFoundAndErrorHandlingRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return PageNotFoundAndErrorHandlingRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v2/PageNotFoundAndErrorHandling/config/configured_rule.php b/tests/Rector/v9/v2/PageNotFoundAndErrorHandling/config/configured_rule.php new file mode 100644 index 000000000..9d96e741f --- /dev/null +++ b/tests/Rector/v9/v2/PageNotFoundAndErrorHandling/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(PageNotFoundAndErrorHandlingRector::class); +}; diff --git a/tests/Rector/v9/v2/RenameMethodCallToEnvironmentMethodCall/MethodCallsToEnvironmentApiCallRectorTest.php b/tests/Rector/v9/v2/RenameMethodCallToEnvironmentMethodCall/MethodCallsToEnvironmentApiCallRectorTest.php index c7fc1dbc5..ee82882f6 100644 --- a/tests/Rector/v9/v2/RenameMethodCallToEnvironmentMethodCall/MethodCallsToEnvironmentApiCallRectorTest.php +++ b/tests/Rector/v9/v2/RenameMethodCallToEnvironmentMethodCall/MethodCallsToEnvironmentApiCallRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v2\RenameMethodCallToEnvironmentMethodCall; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v2\RenameMethodCallToEnvironmentMethodCallRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class MethodCallsToEnvironmentApiCallRectorTest extends AbstractRectorTestCase +final class MethodCallsToEnvironmentApiCallRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RenameMethodCallToEnvironmentMethodCallRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v2/RenameMethodCallToEnvironmentMethodCall/config/configured_rule.php b/tests/Rector/v9/v2/RenameMethodCallToEnvironmentMethodCall/config/configured_rule.php new file mode 100644 index 000000000..022a85992 --- /dev/null +++ b/tests/Rector/v9/v2/RenameMethodCallToEnvironmentMethodCall/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RenameMethodCallToEnvironmentMethodCallRector::class); +}; diff --git a/tests/Rector/v9/v3/BackendUserAuthenticationSimplelog/BackendUserAuthenticationSimplelogRectorTest.php b/tests/Rector/v9/v3/BackendUserAuthenticationSimplelog/BackendUserAuthenticationSimplelogRectorTest.php index ef6c06a00..3acf1829c 100644 --- a/tests/Rector/v9/v3/BackendUserAuthenticationSimplelog/BackendUserAuthenticationSimplelogRectorTest.php +++ b/tests/Rector/v9/v3/BackendUserAuthenticationSimplelog/BackendUserAuthenticationSimplelogRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v3\BackendUserAuthenticationSimplelog; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v3\BackendUserAuthenticationSimplelogRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class BackendUserAuthenticationSimplelogRectorTest extends AbstractRectorTestCase +final class BackendUserAuthenticationSimplelogRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return BackendUserAuthenticationSimplelogRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v3/BackendUserAuthenticationSimplelog/config/configured_rule.php b/tests/Rector/v9/v3/BackendUserAuthenticationSimplelog/config/configured_rule.php new file mode 100644 index 000000000..6d87ca1e6 --- /dev/null +++ b/tests/Rector/v9/v3/BackendUserAuthenticationSimplelog/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(BackendUserAuthenticationSimplelogRector::class); +}; diff --git a/tests/Rector/v9/v3/BackendUtilityGetModuleUrl/BackendUtilityGetModuleUrlRectorTest.php b/tests/Rector/v9/v3/BackendUtilityGetModuleUrl/BackendUtilityGetModuleUrlRectorTest.php index aeac4de9c..02ac03b01 100644 --- a/tests/Rector/v9/v3/BackendUtilityGetModuleUrl/BackendUtilityGetModuleUrlRectorTest.php +++ b/tests/Rector/v9/v3/BackendUtilityGetModuleUrl/BackendUtilityGetModuleUrlRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v3\BackendUtilityGetModuleUrl; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v3\BackendUtilityGetModuleUrlRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class BackendUtilityGetModuleUrlRectorTest extends AbstractRectorTestCase +final class BackendUtilityGetModuleUrlRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return BackendUtilityGetModuleUrlRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v3/BackendUtilityGetModuleUrl/config/configured_rule.php b/tests/Rector/v9/v3/BackendUtilityGetModuleUrl/config/configured_rule.php new file mode 100644 index 000000000..16775624e --- /dev/null +++ b/tests/Rector/v9/v3/BackendUtilityGetModuleUrl/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(BackendUtilityGetModuleUrlRector::class); +}; diff --git a/tests/Rector/v9/v3/CopyMethodGetPidForModTSconfig/CopyMethodGetPidForModTSconfigRectorTest.php b/tests/Rector/v9/v3/CopyMethodGetPidForModTSconfig/CopyMethodGetPidForModTSconfigRectorTest.php index 70bb42a8a..190a2d579 100644 --- a/tests/Rector/v9/v3/CopyMethodGetPidForModTSconfig/CopyMethodGetPidForModTSconfigRectorTest.php +++ b/tests/Rector/v9/v3/CopyMethodGetPidForModTSconfig/CopyMethodGetPidForModTSconfigRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v3\CopyMethodGetPidForModTSconfig; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v3\CopyMethodGetPidForModTSconfigRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class CopyMethodGetPidForModTSconfigRectorTest extends AbstractRectorTestCase +final class CopyMethodGetPidForModTSconfigRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return CopyMethodGetPidForModTSconfigRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v3/CopyMethodGetPidForModTSconfig/config/configured_rule.php b/tests/Rector/v9/v3/CopyMethodGetPidForModTSconfig/config/configured_rule.php new file mode 100644 index 000000000..a44e713b4 --- /dev/null +++ b/tests/Rector/v9/v3/CopyMethodGetPidForModTSconfig/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(CopyMethodGetPidForModTSconfigRector::class); +}; diff --git a/tests/Rector/v9/v3/MoveLanguageFilesFromExtensionLang/MoveLanguageFilesFromExtensionLangRectorTest.php b/tests/Rector/v9/v3/MoveLanguageFilesFromExtensionLang/MoveLanguageFilesFromExtensionLangRectorTest.php index 8c4c2fe3b..95d5bb087 100644 --- a/tests/Rector/v9/v3/MoveLanguageFilesFromExtensionLang/MoveLanguageFilesFromExtensionLangRectorTest.php +++ b/tests/Rector/v9/v3/MoveLanguageFilesFromExtensionLang/MoveLanguageFilesFromExtensionLangRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v3\MoveLanguageFilesFromExtensionLang; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v3\MoveLanguageFilesFromExtensionLangRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class MoveLanguageFilesFromExtensionLangRectorTest extends AbstractRectorTestCase +final class MoveLanguageFilesFromExtensionLangRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return MoveLanguageFilesFromExtensionLangRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v3/MoveLanguageFilesFromExtensionLang/config/configured_rule.php b/tests/Rector/v9/v3/MoveLanguageFilesFromExtensionLang/config/configured_rule.php new file mode 100644 index 000000000..a5565d17e --- /dev/null +++ b/tests/Rector/v9/v3/MoveLanguageFilesFromExtensionLang/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(MoveLanguageFilesFromExtensionLangRector::class); +}; diff --git a/tests/Rector/v9/v3/PhpOptionsUtility/PhpOptionsUtilityRectorTest.php b/tests/Rector/v9/v3/PhpOptionsUtility/PhpOptionsUtilityRectorTest.php index 3e4bfea96..6d4bffab3 100644 --- a/tests/Rector/v9/v3/PhpOptionsUtility/PhpOptionsUtilityRectorTest.php +++ b/tests/Rector/v9/v3/PhpOptionsUtility/PhpOptionsUtilityRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v3\PhpOptionsUtility; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v3\PhpOptionsUtilityRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class PhpOptionsUtilityRectorTest extends AbstractRectorTestCase +final class PhpOptionsUtilityRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return PhpOptionsUtilityRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v3/PhpOptionsUtility/config/configured_rule.php b/tests/Rector/v9/v3/PhpOptionsUtility/config/configured_rule.php new file mode 100644 index 000000000..65d5c7178 --- /dev/null +++ b/tests/Rector/v9/v3/PhpOptionsUtility/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(PhpOptionsUtilityRector::class); +}; diff --git a/tests/Rector/v9/v3/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthentication/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthenticationRectorTest.php b/tests/Rector/v9/v3/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthentication/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthenticationRectorTest.php index 63e6c6a01..ae6b67a82 100644 --- a/tests/Rector/v9/v3/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthentication/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthenticationRectorTest.php +++ b/tests/Rector/v9/v3/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthentication/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthenticationRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v3\PropertyUserTsToMethodGetTsConfigOfBackendUserAuthentication; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v3\PropertyUserTsToMethodGetTsConfigOfBackendUserAuthenticationRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class PropertyUserTsToMethodGetTsConfigOfBackendUserAuthenticationRectorTest extends AbstractRectorTestCase +final class PropertyUserTsToMethodGetTsConfigOfBackendUserAuthenticationRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return PropertyUserTsToMethodGetTsConfigOfBackendUserAuthenticationRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v3/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthentication/config/configured_rule.php b/tests/Rector/v9/v3/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthentication/config/configured_rule.php new file mode 100644 index 000000000..2a5b158ad --- /dev/null +++ b/tests/Rector/v9/v3/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthentication/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(PropertyUserTsToMethodGetTsConfigOfBackendUserAuthenticationRector::class); +}; diff --git a/tests/Rector/v9/v3/RefactorTsConfigRelatedMethods/RefactorTsConfigRelatedMethodsRectorTest.php b/tests/Rector/v9/v3/RefactorTsConfigRelatedMethods/RefactorTsConfigRelatedMethodsRectorTest.php index e55817369..154a54e8b 100644 --- a/tests/Rector/v9/v3/RefactorTsConfigRelatedMethods/RefactorTsConfigRelatedMethodsRectorTest.php +++ b/tests/Rector/v9/v3/RefactorTsConfigRelatedMethods/RefactorTsConfigRelatedMethodsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v3\RefactorTsConfigRelatedMethods; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v3\RefactorTsConfigRelatedMethodsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorTsConfigRelatedMethodsRectorTest extends AbstractRectorTestCase +final class RefactorTsConfigRelatedMethodsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorTsConfigRelatedMethodsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v3/RefactorTsConfigRelatedMethods/config/configured_rule.php b/tests/Rector/v9/v3/RefactorTsConfigRelatedMethods/config/configured_rule.php new file mode 100644 index 000000000..d8ea0fcc9 --- /dev/null +++ b/tests/Rector/v9/v3/RefactorTsConfigRelatedMethods/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorTsConfigRelatedMethodsRector::class); +}; diff --git a/tests/Rector/v9/v3/RemoveColPosParameter/LocalizationRepositoryTest.php b/tests/Rector/v9/v3/RemoveColPosParameter/LocalizationRepositoryTest.php index a2ae9833a..c67dc3e91 100644 --- a/tests/Rector/v9/v3/RemoveColPosParameter/LocalizationRepositoryTest.php +++ b/tests/Rector/v9/v3/RemoveColPosParameter/LocalizationRepositoryTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v3\RemoveColPosParameter; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v3\RemoveColPosParameterRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class LocalizationRepositoryTest extends AbstractRectorTestCase +final class LocalizationRepositoryTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveColPosParameterRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v3/RemoveColPosParameter/config/configured_rule.php b/tests/Rector/v9/v3/RemoveColPosParameter/config/configured_rule.php new file mode 100644 index 000000000..b8094a1e8 --- /dev/null +++ b/tests/Rector/v9/v3/RemoveColPosParameter/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveColPosParameterRector::class); +}; diff --git a/tests/Rector/v9/v3/UseMethodGetPageShortcutDirectlyFromSysPage/UseMethodGetPageShortcutDirectlyFromSysPageRectorTest.php b/tests/Rector/v9/v3/UseMethodGetPageShortcutDirectlyFromSysPage/UseMethodGetPageShortcutDirectlyFromSysPageRectorTest.php index 7aedac566..ea2ced0ee 100644 --- a/tests/Rector/v9/v3/UseMethodGetPageShortcutDirectlyFromSysPage/UseMethodGetPageShortcutDirectlyFromSysPageRectorTest.php +++ b/tests/Rector/v9/v3/UseMethodGetPageShortcutDirectlyFromSysPage/UseMethodGetPageShortcutDirectlyFromSysPageRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v3\UseMethodGetPageShortcutDirectlyFromSysPage; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v3\UseMethodGetPageShortcutDirectlyFromSysPageRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseMethodGetPageShortcutDirectlyFromSysPageRectorTest extends AbstractRectorTestCase +final class UseMethodGetPageShortcutDirectlyFromSysPageRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseMethodGetPageShortcutDirectlyFromSysPageRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v3/UseMethodGetPageShortcutDirectlyFromSysPage/config/configured_rule.php b/tests/Rector/v9/v3/UseMethodGetPageShortcutDirectlyFromSysPage/config/configured_rule.php new file mode 100644 index 000000000..b33590e21 --- /dev/null +++ b/tests/Rector/v9/v3/UseMethodGetPageShortcutDirectlyFromSysPage/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseMethodGetPageShortcutDirectlyFromSysPageRector::class); +}; diff --git a/tests/Rector/v9/v3/ValidateAnnotation/ValidateAnnotationRectorTest.php b/tests/Rector/v9/v3/ValidateAnnotation/ValidateAnnotationRectorTest.php index 4aea2a11b..46a2cdaca 100644 --- a/tests/Rector/v9/v3/ValidateAnnotation/ValidateAnnotationRectorTest.php +++ b/tests/Rector/v9/v3/ValidateAnnotation/ValidateAnnotationRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v3\ValidateAnnotation; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v3\ValidateAnnotationRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ValidateAnnotationRectorTest extends AbstractRectorTestCase +final class ValidateAnnotationRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return ValidateAnnotationRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v3/ValidateAnnotation/config/configured_rule.php b/tests/Rector/v9/v3/ValidateAnnotation/config/configured_rule.php new file mode 100644 index 000000000..c9165db89 --- /dev/null +++ b/tests/Rector/v9/v3/ValidateAnnotation/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(ValidateAnnotationRector::class); +}; diff --git a/tests/Rector/v9/v4/BackendUtilityShortcutExists/BackendUtilityShortcutExistsRectorTest.php b/tests/Rector/v9/v4/BackendUtilityShortcutExists/BackendUtilityShortcutExistsRectorTest.php index d517025cc..84b48afc6 100644 --- a/tests/Rector/v9/v4/BackendUtilityShortcutExists/BackendUtilityShortcutExistsRectorTest.php +++ b/tests/Rector/v9/v4/BackendUtilityShortcutExists/BackendUtilityShortcutExistsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\BackendUtilityShortcutExists; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\BackendUtilityShortcutExistsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class BackendUtilityShortcutExistsRectorTest extends AbstractRectorTestCase +final class BackendUtilityShortcutExistsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return BackendUtilityShortcutExistsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/BackendUtilityShortcutExists/config/configured_rule.php b/tests/Rector/v9/v4/BackendUtilityShortcutExists/config/configured_rule.php new file mode 100644 index 000000000..3e88eb44b --- /dev/null +++ b/tests/Rector/v9/v4/BackendUtilityShortcutExists/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(BackendUtilityShortcutExistsRector::class); +}; diff --git a/tests/Rector/v9/v4/CallEnableFieldsFromPageRepository/CallEnableFieldsFromPageRepositoryRectorTest.php b/tests/Rector/v9/v4/CallEnableFieldsFromPageRepository/CallEnableFieldsFromPageRepositoryRectorTest.php index 8744b1215..a3b651f0f 100644 --- a/tests/Rector/v9/v4/CallEnableFieldsFromPageRepository/CallEnableFieldsFromPageRepositoryRectorTest.php +++ b/tests/Rector/v9/v4/CallEnableFieldsFromPageRepository/CallEnableFieldsFromPageRepositoryRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\CallEnableFieldsFromPageRepository; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\CallEnableFieldsFromPageRepositoryRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class CallEnableFieldsFromPageRepositoryRectorTest extends AbstractRectorTestCase +final class CallEnableFieldsFromPageRepositoryRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return CallEnableFieldsFromPageRepositoryRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/CallEnableFieldsFromPageRepository/config/configured_rule.php b/tests/Rector/v9/v4/CallEnableFieldsFromPageRepository/config/configured_rule.php new file mode 100644 index 000000000..2ea6902be --- /dev/null +++ b/tests/Rector/v9/v4/CallEnableFieldsFromPageRepository/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(CallEnableFieldsFromPageRepositoryRector::class); +}; diff --git a/tests/Rector/v9/v4/ConstantToEnvironmentCall/ConstantsToEnvironmentApiCallRectorTest.php b/tests/Rector/v9/v4/ConstantToEnvironmentCall/ConstantsToEnvironmentApiCallRectorTest.php index 8aa2c74ba..08664efec 100644 --- a/tests/Rector/v9/v4/ConstantToEnvironmentCall/ConstantsToEnvironmentApiCallRectorTest.php +++ b/tests/Rector/v9/v4/ConstantToEnvironmentCall/ConstantsToEnvironmentApiCallRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\ConstantToEnvironmentCall; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\ConstantToEnvironmentCallRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class ConstantsToEnvironmentApiCallRectorTest extends AbstractRectorTestCase +final class ConstantsToEnvironmentApiCallRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return ConstantToEnvironmentCallRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/ConstantToEnvironmentCall/config/configured_rule.php b/tests/Rector/v9/v4/ConstantToEnvironmentCall/config/configured_rule.php new file mode 100644 index 000000000..a2bb19c54 --- /dev/null +++ b/tests/Rector/v9/v4/ConstantToEnvironmentCall/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(ConstantToEnvironmentCallRector::class); +}; diff --git a/tests/Rector/v9/v4/DocumentTemplateAddStyleSheet/DocumentTemplateAddStyleSheetRectorTest.php b/tests/Rector/v9/v4/DocumentTemplateAddStyleSheet/DocumentTemplateAddStyleSheetRectorTest.php index 56444efe8..301ff51b4 100644 --- a/tests/Rector/v9/v4/DocumentTemplateAddStyleSheet/DocumentTemplateAddStyleSheetRectorTest.php +++ b/tests/Rector/v9/v4/DocumentTemplateAddStyleSheet/DocumentTemplateAddStyleSheetRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\DocumentTemplateAddStyleSheet; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\DocumentTemplateAddStyleSheetRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class DocumentTemplateAddStyleSheetRectorTest extends AbstractRectorTestCase +final class DocumentTemplateAddStyleSheetRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return DocumentTemplateAddStyleSheetRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/DocumentTemplateAddStyleSheet/config/configured_rule.php b/tests/Rector/v9/v4/DocumentTemplateAddStyleSheet/config/configured_rule.php new file mode 100644 index 000000000..e47e8ce98 --- /dev/null +++ b/tests/Rector/v9/v4/DocumentTemplateAddStyleSheet/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(DocumentTemplateAddStyleSheetRector::class); +}; diff --git a/tests/Rector/v9/v4/RefactorDeprecatedConcatenateMethodsPageRenderer/RefactorDeprecatedConcatenateMethodsPageRendererRectorTest.php b/tests/Rector/v9/v4/RefactorDeprecatedConcatenateMethodsPageRenderer/RefactorDeprecatedConcatenateMethodsPageRendererRectorTest.php index 1cc11f503..9caea5ee5 100644 --- a/tests/Rector/v9/v4/RefactorDeprecatedConcatenateMethodsPageRenderer/RefactorDeprecatedConcatenateMethodsPageRendererRectorTest.php +++ b/tests/Rector/v9/v4/RefactorDeprecatedConcatenateMethodsPageRenderer/RefactorDeprecatedConcatenateMethodsPageRendererRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\RefactorDeprecatedConcatenateMethodsPageRenderer; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\RefactorDeprecatedConcatenateMethodsPageRendererRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorDeprecatedConcatenateMethodsPageRendererRectorTest extends AbstractRectorTestCase +final class RefactorDeprecatedConcatenateMethodsPageRendererRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorDeprecatedConcatenateMethodsPageRendererRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/RefactorDeprecatedConcatenateMethodsPageRenderer/config/configured_rule.php b/tests/Rector/v9/v4/RefactorDeprecatedConcatenateMethodsPageRenderer/config/configured_rule.php new file mode 100644 index 000000000..ec6be691b --- /dev/null +++ b/tests/Rector/v9/v4/RefactorDeprecatedConcatenateMethodsPageRenderer/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorDeprecatedConcatenateMethodsPageRendererRector::class); +}; diff --git a/tests/Rector/v9/v4/RefactorExplodeUrl2ArrayFromGeneralUtility/RefactorExplodeUrl2ArrayFromGeneralUtilityRectorTest.php b/tests/Rector/v9/v4/RefactorExplodeUrl2ArrayFromGeneralUtility/RefactorExplodeUrl2ArrayFromGeneralUtilityRectorTest.php index 1f55afaa5..dc58d6000 100644 --- a/tests/Rector/v9/v4/RefactorExplodeUrl2ArrayFromGeneralUtility/RefactorExplodeUrl2ArrayFromGeneralUtilityRectorTest.php +++ b/tests/Rector/v9/v4/RefactorExplodeUrl2ArrayFromGeneralUtility/RefactorExplodeUrl2ArrayFromGeneralUtilityRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\RefactorExplodeUrl2ArrayFromGeneralUtility; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\RefactorExplodeUrl2ArrayFromGeneralUtilityRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorExplodeUrl2ArrayFromGeneralUtilityRectorTest extends AbstractRectorTestCase +final class RefactorExplodeUrl2ArrayFromGeneralUtilityRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorExplodeUrl2ArrayFromGeneralUtilityRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/RefactorExplodeUrl2ArrayFromGeneralUtility/config/configured_rule.php b/tests/Rector/v9/v4/RefactorExplodeUrl2ArrayFromGeneralUtility/config/configured_rule.php new file mode 100644 index 000000000..64ec73cab --- /dev/null +++ b/tests/Rector/v9/v4/RefactorExplodeUrl2ArrayFromGeneralUtility/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorExplodeUrl2ArrayFromGeneralUtilityRector::class); +}; diff --git a/tests/Rector/v9/v4/RemoveInitMethodGraphicalFunctions/RemoveInitMethodGraphicalFunctionsRectorTest.php b/tests/Rector/v9/v4/RemoveInitMethodGraphicalFunctions/RemoveInitMethodGraphicalFunctionsRectorTest.php index db2b5b0e9..4c9dc790b 100644 --- a/tests/Rector/v9/v4/RemoveInitMethodGraphicalFunctions/RemoveInitMethodGraphicalFunctionsRectorTest.php +++ b/tests/Rector/v9/v4/RemoveInitMethodGraphicalFunctions/RemoveInitMethodGraphicalFunctionsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\RemoveInitMethodGraphicalFunctions; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\RemoveInitMethodGraphicalFunctionsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveInitMethodGraphicalFunctionsRectorTest extends AbstractRectorTestCase +final class RemoveInitMethodGraphicalFunctionsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveInitMethodGraphicalFunctionsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/RemoveInitMethodGraphicalFunctions/config/configured_rule.php b/tests/Rector/v9/v4/RemoveInitMethodGraphicalFunctions/config/configured_rule.php new file mode 100644 index 000000000..16d863e2b --- /dev/null +++ b/tests/Rector/v9/v4/RemoveInitMethodGraphicalFunctions/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveInitMethodGraphicalFunctionsRector::class); +}; diff --git a/tests/Rector/v9/v4/RemoveInitMethodTemplateService/RemoveInitMethodTemplateServiceRectorTest.php b/tests/Rector/v9/v4/RemoveInitMethodTemplateService/RemoveInitMethodTemplateServiceRectorTest.php index 438aa4d55..20dd3ca7e 100644 --- a/tests/Rector/v9/v4/RemoveInitMethodTemplateService/RemoveInitMethodTemplateServiceRectorTest.php +++ b/tests/Rector/v9/v4/RemoveInitMethodTemplateService/RemoveInitMethodTemplateServiceRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\RemoveInitMethodTemplateService; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\RemoveInitMethodTemplateServiceRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveInitMethodTemplateServiceRectorTest extends AbstractRectorTestCase +final class RemoveInitMethodTemplateServiceRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveInitMethodTemplateServiceRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/RemoveInitMethodTemplateService/config/configured_rule.php b/tests/Rector/v9/v4/RemoveInitMethodTemplateService/config/configured_rule.php new file mode 100644 index 000000000..567544b0d --- /dev/null +++ b/tests/Rector/v9/v4/RemoveInitMethodTemplateService/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveInitMethodTemplateServiceRector::class); +}; diff --git a/tests/Rector/v9/v4/RemoveInitTemplateMethodCall/RemoveInitTemplateMethodCallRectorTest.php b/tests/Rector/v9/v4/RemoveInitTemplateMethodCall/RemoveInitTemplateMethodCallRectorTest.php index 643555ce6..4282bcd19 100644 --- a/tests/Rector/v9/v4/RemoveInitTemplateMethodCall/RemoveInitTemplateMethodCallRectorTest.php +++ b/tests/Rector/v9/v4/RemoveInitTemplateMethodCall/RemoveInitTemplateMethodCallRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\RemoveInitTemplateMethodCall; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\RemoveInitTemplateMethodCallRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveInitTemplateMethodCallRectorTest extends AbstractRectorTestCase +final class RemoveInitTemplateMethodCallRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveInitTemplateMethodCallRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/RemoveInitTemplateMethodCall/config/configured_rule.php b/tests/Rector/v9/v4/RemoveInitTemplateMethodCall/config/configured_rule.php new file mode 100644 index 000000000..92701761f --- /dev/null +++ b/tests/Rector/v9/v4/RemoveInitTemplateMethodCall/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveInitTemplateMethodCallRector::class); +}; diff --git a/tests/Rector/v9/v4/SystemEnvironmentBuilderConstants/SystemEnvironmentBuilderConstantsRectorTest.php b/tests/Rector/v9/v4/SystemEnvironmentBuilderConstants/SystemEnvironmentBuilderConstantsRectorTest.php index ed005a03c..a9aec9dd5 100644 --- a/tests/Rector/v9/v4/SystemEnvironmentBuilderConstants/SystemEnvironmentBuilderConstantsRectorTest.php +++ b/tests/Rector/v9/v4/SystemEnvironmentBuilderConstants/SystemEnvironmentBuilderConstantsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\SystemEnvironmentBuilderConstants; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\SystemEnvironmentBuilderConstantsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class SystemEnvironmentBuilderConstantsRectorTest extends AbstractRectorTestCase +final class SystemEnvironmentBuilderConstantsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return SystemEnvironmentBuilderConstantsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/SystemEnvironmentBuilderConstants/config/configured_rule.php b/tests/Rector/v9/v4/SystemEnvironmentBuilderConstants/config/configured_rule.php new file mode 100644 index 000000000..0c85f722e --- /dev/null +++ b/tests/Rector/v9/v4/SystemEnvironmentBuilderConstants/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(SystemEnvironmentBuilderConstantsRector::class); +}; diff --git a/tests/Rector/v9/v4/TemplateGetFileNameToFilePathSanitizer/TemplateGetFileNameToFilePathSanitizerRectorTest.php b/tests/Rector/v9/v4/TemplateGetFileNameToFilePathSanitizer/TemplateGetFileNameToFilePathSanitizerRectorTest.php index d9fa9f3f2..ef9015be3 100644 --- a/tests/Rector/v9/v4/TemplateGetFileNameToFilePathSanitizer/TemplateGetFileNameToFilePathSanitizerRectorTest.php +++ b/tests/Rector/v9/v4/TemplateGetFileNameToFilePathSanitizer/TemplateGetFileNameToFilePathSanitizerRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\TemplateGetFileNameToFilePathSanitizer; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\TemplateGetFileNameToFilePathSanitizerRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class TemplateGetFileNameToFilePathSanitizerRectorTest extends AbstractRectorTestCase +final class TemplateGetFileNameToFilePathSanitizerRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return TemplateGetFileNameToFilePathSanitizerRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/TemplateGetFileNameToFilePathSanitizer/config/configured_rule.php b/tests/Rector/v9/v4/TemplateGetFileNameToFilePathSanitizer/config/configured_rule.php new file mode 100644 index 000000000..ee9cd98a3 --- /dev/null +++ b/tests/Rector/v9/v4/TemplateGetFileNameToFilePathSanitizer/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(TemplateGetFileNameToFilePathSanitizerRector::class); +}; diff --git a/tests/Rector/v9/v4/UseAddJsFileInsteadOfLoadJavascriptLib/UseAddJsFileInsteadOfLoadJavascriptLibRectorTest.php b/tests/Rector/v9/v4/UseAddJsFileInsteadOfLoadJavascriptLib/UseAddJsFileInsteadOfLoadJavascriptLibRectorTest.php index 327b24363..8a1bb8555 100644 --- a/tests/Rector/v9/v4/UseAddJsFileInsteadOfLoadJavascriptLib/UseAddJsFileInsteadOfLoadJavascriptLibRectorTest.php +++ b/tests/Rector/v9/v4/UseAddJsFileInsteadOfLoadJavascriptLib/UseAddJsFileInsteadOfLoadJavascriptLibRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\UseAddJsFileInsteadOfLoadJavascriptLib; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\UseAddJsFileInsteadOfLoadJavascriptLibRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseAddJsFileInsteadOfLoadJavascriptLibRectorTest extends AbstractRectorTestCase +final class UseAddJsFileInsteadOfLoadJavascriptLibRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseAddJsFileInsteadOfLoadJavascriptLibRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/UseAddJsFileInsteadOfLoadJavascriptLib/config/configured_rule.php b/tests/Rector/v9/v4/UseAddJsFileInsteadOfLoadJavascriptLib/config/configured_rule.php new file mode 100644 index 000000000..24c8f9e49 --- /dev/null +++ b/tests/Rector/v9/v4/UseAddJsFileInsteadOfLoadJavascriptLib/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseAddJsFileInsteadOfLoadJavascriptLibRector::class); +}; diff --git a/tests/Rector/v9/v4/UseClassSchemaInsteadReflectionServiceMethods/UseClassSchemaInsteadReflectionServiceMethodsRectorTest.php b/tests/Rector/v9/v4/UseClassSchemaInsteadReflectionServiceMethods/UseClassSchemaInsteadReflectionServiceMethodsRectorTest.php index 36262f8e5..8642299bd 100644 --- a/tests/Rector/v9/v4/UseClassSchemaInsteadReflectionServiceMethods/UseClassSchemaInsteadReflectionServiceMethodsRectorTest.php +++ b/tests/Rector/v9/v4/UseClassSchemaInsteadReflectionServiceMethods/UseClassSchemaInsteadReflectionServiceMethodsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\UseClassSchemaInsteadReflectionServiceMethods; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\UseClassSchemaInsteadReflectionServiceMethodsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseClassSchemaInsteadReflectionServiceMethodsRectorTest extends AbstractRectorTestCase +final class UseClassSchemaInsteadReflectionServiceMethodsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideData() @@ -24,8 +23,8 @@ public function provideData(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseClassSchemaInsteadReflectionServiceMethodsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/UseClassSchemaInsteadReflectionServiceMethods/config/configured_rule.php b/tests/Rector/v9/v4/UseClassSchemaInsteadReflectionServiceMethods/config/configured_rule.php new file mode 100644 index 000000000..8111fe1d0 --- /dev/null +++ b/tests/Rector/v9/v4/UseClassSchemaInsteadReflectionServiceMethods/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseClassSchemaInsteadReflectionServiceMethodsRector::class); +}; diff --git a/tests/Rector/v9/v4/UseContextApi/UseContextApiRectorTest.php b/tests/Rector/v9/v4/UseContextApi/UseContextApiRectorTest.php index 7cc9876c5..8ea5ddb7c 100644 --- a/tests/Rector/v9/v4/UseContextApi/UseContextApiRectorTest.php +++ b/tests/Rector/v9/v4/UseContextApi/UseContextApiRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\UseContextApi; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\UseContextApiRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseContextApiRectorTest extends AbstractRectorTestCase +final class UseContextApiRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseContextApiRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/UseContextApi/config/configured_rule.php b/tests/Rector/v9/v4/UseContextApi/config/configured_rule.php new file mode 100644 index 000000000..bf63dfc7a --- /dev/null +++ b/tests/Rector/v9/v4/UseContextApi/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseContextApiRector::class); +}; diff --git a/tests/Rector/v9/v4/UseContextApiForVersioningWorkspaceId/UseContextApiForVersioningWorkspaceIdRectorTest.php b/tests/Rector/v9/v4/UseContextApiForVersioningWorkspaceId/UseContextApiForVersioningWorkspaceIdRectorTest.php index 7893e45e4..34eb479a7 100644 --- a/tests/Rector/v9/v4/UseContextApiForVersioningWorkspaceId/UseContextApiForVersioningWorkspaceIdRectorTest.php +++ b/tests/Rector/v9/v4/UseContextApiForVersioningWorkspaceId/UseContextApiForVersioningWorkspaceIdRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\UseContextApiForVersioningWorkspaceId; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\UseContextApiForVersioningWorkspaceIdRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseContextApiForVersioningWorkspaceIdRectorTest extends AbstractRectorTestCase +final class UseContextApiForVersioningWorkspaceIdRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseContextApiForVersioningWorkspaceIdRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/UseContextApiForVersioningWorkspaceId/config/configured_rule.php b/tests/Rector/v9/v4/UseContextApiForVersioningWorkspaceId/config/configured_rule.php new file mode 100644 index 000000000..a8794d46d --- /dev/null +++ b/tests/Rector/v9/v4/UseContextApiForVersioningWorkspaceId/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseContextApiForVersioningWorkspaceIdRector::class); +}; diff --git a/tests/Rector/v9/v4/UseGetMenuInsteadOfGetFirstWebPage/UseGetMenuInsteadOfGetFirstWebPageRectorTest.php b/tests/Rector/v9/v4/UseGetMenuInsteadOfGetFirstWebPage/UseGetMenuInsteadOfGetFirstWebPageRectorTest.php index f7c4b3e04..dd8f23821 100644 --- a/tests/Rector/v9/v4/UseGetMenuInsteadOfGetFirstWebPage/UseGetMenuInsteadOfGetFirstWebPageRectorTest.php +++ b/tests/Rector/v9/v4/UseGetMenuInsteadOfGetFirstWebPage/UseGetMenuInsteadOfGetFirstWebPageRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\UseGetMenuInsteadOfGetFirstWebPage; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\UseGetMenuInsteadOfGetFirstWebPageRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseGetMenuInsteadOfGetFirstWebPageRectorTest extends AbstractRectorTestCase +final class UseGetMenuInsteadOfGetFirstWebPageRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseGetMenuInsteadOfGetFirstWebPageRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/UseGetMenuInsteadOfGetFirstWebPage/config/configured_rule.php b/tests/Rector/v9/v4/UseGetMenuInsteadOfGetFirstWebPage/config/configured_rule.php new file mode 100644 index 000000000..fd9aeceed --- /dev/null +++ b/tests/Rector/v9/v4/UseGetMenuInsteadOfGetFirstWebPage/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseGetMenuInsteadOfGetFirstWebPageRector::class); +}; diff --git a/tests/Rector/v9/v4/UseLanguageAspectForTsfeLanguageProperties/UseLanguageAspectForTsfeLanguagePropertiesRectorTest.php b/tests/Rector/v9/v4/UseLanguageAspectForTsfeLanguageProperties/UseLanguageAspectForTsfeLanguagePropertiesRectorTest.php index 7b7c2f881..51ab1a43e 100644 --- a/tests/Rector/v9/v4/UseLanguageAspectForTsfeLanguageProperties/UseLanguageAspectForTsfeLanguagePropertiesRectorTest.php +++ b/tests/Rector/v9/v4/UseLanguageAspectForTsfeLanguageProperties/UseLanguageAspectForTsfeLanguagePropertiesRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\UseLanguageAspectForTsfeLanguageProperties; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\UseLanguageAspectForTsfeLanguagePropertiesRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseLanguageAspectForTsfeLanguagePropertiesRectorTest extends AbstractRectorTestCase +final class UseLanguageAspectForTsfeLanguagePropertiesRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseLanguageAspectForTsfeLanguagePropertiesRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/UseLanguageAspectForTsfeLanguageProperties/config/configured_rule.php b/tests/Rector/v9/v4/UseLanguageAspectForTsfeLanguageProperties/config/configured_rule.php new file mode 100644 index 000000000..a3b8e720b --- /dev/null +++ b/tests/Rector/v9/v4/UseLanguageAspectForTsfeLanguageProperties/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseLanguageAspectForTsfeLanguagePropertiesRector::class); +}; diff --git a/tests/Rector/v9/v4/UseRootlineUtilityInsteadOfGetRootlineMethod/UseRootlineUtilityInsteadOfGetRootlineMethodRectorTest.php b/tests/Rector/v9/v4/UseRootlineUtilityInsteadOfGetRootlineMethod/UseRootlineUtilityInsteadOfGetRootlineMethodRectorTest.php index 62020d144..213f0b43c 100644 --- a/tests/Rector/v9/v4/UseRootlineUtilityInsteadOfGetRootlineMethod/UseRootlineUtilityInsteadOfGetRootlineMethodRectorTest.php +++ b/tests/Rector/v9/v4/UseRootlineUtilityInsteadOfGetRootlineMethod/UseRootlineUtilityInsteadOfGetRootlineMethodRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\UseRootlineUtilityInsteadOfGetRootlineMethod; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\UseRootlineUtilityInsteadOfGetRootlineMethodRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseRootlineUtilityInsteadOfGetRootlineMethodRectorTest extends AbstractRectorTestCase +final class UseRootlineUtilityInsteadOfGetRootlineMethodRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseRootlineUtilityInsteadOfGetRootlineMethodRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/UseRootlineUtilityInsteadOfGetRootlineMethod/config/configured_rule.php b/tests/Rector/v9/v4/UseRootlineUtilityInsteadOfGetRootlineMethod/config/configured_rule.php new file mode 100644 index 000000000..60d182b15 --- /dev/null +++ b/tests/Rector/v9/v4/UseRootlineUtilityInsteadOfGetRootlineMethod/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseRootlineUtilityInsteadOfGetRootlineMethodRector::class); +}; diff --git a/tests/Rector/v9/v4/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensions/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensionsRectorTest.php b/tests/Rector/v9/v4/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensions/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensionsRectorTest.php index 22304125a..6af7d63c0 100644 --- a/tests/Rector/v9/v4/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensions/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensionsRectorTest.php +++ b/tests/Rector/v9/v4/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensions/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensionsRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensions; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensionsRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensionsRectorTest extends AbstractRectorTestCase +final class UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensionsRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensionsRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensions/config/configured_rule.php b/tests/Rector/v9/v4/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensions/config/configured_rule.php new file mode 100644 index 000000000..028a7a7bc --- /dev/null +++ b/tests/Rector/v9/v4/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensions/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensionsRector::class); +}; diff --git a/tests/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaService/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRectorTest.php b/tests/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaService/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRectorTest.php index c51b8f4a7..2fb7506db 100644 --- a/tests/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaService/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRectorTest.php +++ b/tests/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaService/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v4\UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaService; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v4\UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRectorTest extends AbstractRectorTestCase +final class UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaService/config/configured_rule.php b/tests/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaService/config/configured_rule.php new file mode 100644 index 000000000..8f00a147d --- /dev/null +++ b/tests/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaService/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRector::class); +}; diff --git a/tests/Rector/v9/v5/ProcessOutput/RefactorProcessOutputRectorTest.php b/tests/Rector/v9/v5/ProcessOutput/RefactorProcessOutputRectorTest.php index 2728652e3..3f9343f8a 100644 --- a/tests/Rector/v9/v5/ProcessOutput/RefactorProcessOutputRectorTest.php +++ b/tests/Rector/v9/v5/ProcessOutput/RefactorProcessOutputRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v5\ProcessOutput; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v5\RefactorProcessOutputRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorProcessOutputRectorTest extends AbstractRectorTestCase +final class RefactorProcessOutputRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorProcessOutputRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v5/ProcessOutput/config/configured_rule.php b/tests/Rector/v9/v5/ProcessOutput/config/configured_rule.php new file mode 100644 index 000000000..153013bd9 --- /dev/null +++ b/tests/Rector/v9/v5/ProcessOutput/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorProcessOutputRector::class); +}; diff --git a/tests/Rector/v9/v5/RefactorPropertiesOfTypoScriptFrontendController/RefactorPropertiesOfTypoScriptFrontendControllerRectorTest.php b/tests/Rector/v9/v5/RefactorPropertiesOfTypoScriptFrontendController/RefactorPropertiesOfTypoScriptFrontendControllerRectorTest.php index 6764a31ce..029ad9884 100644 --- a/tests/Rector/v9/v5/RefactorPropertiesOfTypoScriptFrontendController/RefactorPropertiesOfTypoScriptFrontendControllerRectorTest.php +++ b/tests/Rector/v9/v5/RefactorPropertiesOfTypoScriptFrontendController/RefactorPropertiesOfTypoScriptFrontendControllerRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v5\RefactorPropertiesOfTypoScriptFrontendController; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v5\RefactorPropertiesOfTypoScriptFrontendControllerRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RefactorPropertiesOfTypoScriptFrontendControllerRectorTest extends AbstractRectorTestCase +final class RefactorPropertiesOfTypoScriptFrontendControllerRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RefactorPropertiesOfTypoScriptFrontendControllerRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v5/RefactorPropertiesOfTypoScriptFrontendController/config/configured_rule.php b/tests/Rector/v9/v5/RefactorPropertiesOfTypoScriptFrontendController/config/configured_rule.php new file mode 100644 index 000000000..43e574d6b --- /dev/null +++ b/tests/Rector/v9/v5/RefactorPropertiesOfTypoScriptFrontendController/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RefactorPropertiesOfTypoScriptFrontendControllerRector::class); +}; diff --git a/tests/Rector/v9/v5/RemoveFlushCaches/RemoveFlushCachesRectorTest.php b/tests/Rector/v9/v5/RemoveFlushCaches/RemoveFlushCachesRectorTest.php index c4a4d92f5..5094cee0a 100644 --- a/tests/Rector/v9/v5/RemoveFlushCaches/RemoveFlushCachesRectorTest.php +++ b/tests/Rector/v9/v5/RemoveFlushCaches/RemoveFlushCachesRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v5\RemoveFlushCaches; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v5\RemoveFlushCachesRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveFlushCachesRectorTest extends AbstractRectorTestCase +final class RemoveFlushCachesRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveFlushCachesRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v5/RemoveFlushCaches/config/configured_rule.php b/tests/Rector/v9/v5/RemoveFlushCaches/config/configured_rule.php new file mode 100644 index 000000000..cf63fe33d --- /dev/null +++ b/tests/Rector/v9/v5/RemoveFlushCaches/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveFlushCachesRector::class); +}; diff --git a/tests/Rector/v9/v5/RemoveInitMethodFromPageRepository/RemoveInitMethodFromPageRepositoryRectorTest.php b/tests/Rector/v9/v5/RemoveInitMethodFromPageRepository/RemoveInitMethodFromPageRepositoryRectorTest.php index 4e78615d9..04424c787 100644 --- a/tests/Rector/v9/v5/RemoveInitMethodFromPageRepository/RemoveInitMethodFromPageRepositoryRectorTest.php +++ b/tests/Rector/v9/v5/RemoveInitMethodFromPageRepository/RemoveInitMethodFromPageRepositoryRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v5\RemoveInitMethodFromPageRepository; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v5\RemoveInitMethodFromPageRepositoryRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveInitMethodFromPageRepositoryRectorTest extends AbstractRectorTestCase +final class RemoveInitMethodFromPageRepositoryRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveInitMethodFromPageRepositoryRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v5/RemoveInitMethodFromPageRepository/config/configured_rule.php b/tests/Rector/v9/v5/RemoveInitMethodFromPageRepository/config/configured_rule.php new file mode 100644 index 000000000..6dae54a3c --- /dev/null +++ b/tests/Rector/v9/v5/RemoveInitMethodFromPageRepository/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveInitMethodFromPageRepositoryRector::class); +}; diff --git a/tests/Rector/v9/v5/RemoveInternalAnnotation/RemoveInternalAnnotationRectorTest.php b/tests/Rector/v9/v5/RemoveInternalAnnotation/RemoveInternalAnnotationRectorTest.php index 0686d38e1..5c9450f04 100644 --- a/tests/Rector/v9/v5/RemoveInternalAnnotation/RemoveInternalAnnotationRectorTest.php +++ b/tests/Rector/v9/v5/RemoveInternalAnnotation/RemoveInternalAnnotationRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v5\RemoveInternalAnnotation; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v5\RemoveInternalAnnotationRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class RemoveInternalAnnotationRectorTest extends AbstractRectorTestCase +final class RemoveInternalAnnotationRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return RemoveInternalAnnotationRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v5/RemoveInternalAnnotation/config/configured_rule.php b/tests/Rector/v9/v5/RemoveInternalAnnotation/config/configured_rule.php new file mode 100644 index 000000000..6e6150400 --- /dev/null +++ b/tests/Rector/v9/v5/RemoveInternalAnnotation/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(RemoveInternalAnnotationRector::class); +}; diff --git a/tests/Rector/v9/v5/UsePackageManagerActivePackages/UsePackageManagerActivePackagesRectorTest.php b/tests/Rector/v9/v5/UsePackageManagerActivePackages/UsePackageManagerActivePackagesRectorTest.php index 5a82ad986..89318b048 100644 --- a/tests/Rector/v9/v5/UsePackageManagerActivePackages/UsePackageManagerActivePackagesRectorTest.php +++ b/tests/Rector/v9/v5/UsePackageManagerActivePackages/UsePackageManagerActivePackagesRectorTest.php @@ -5,11 +5,10 @@ namespace Ssch\TYPO3Rector\Tests\Rector\v9\v5\UsePackageManagerActivePackages; use Iterator; -use Rector\Testing\PHPUnit\AbstractRectorTestCase; -use Ssch\TYPO3Rector\Rector\v9\v5\UsePackageManagerActivePackagesRector; +use Rector\Testing\PHPUnit\AbstractCommunityRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; -final class UsePackageManagerActivePackagesRectorTest extends AbstractRectorTestCase +final class UsePackageManagerActivePackagesRectorTest extends AbstractCommunityRectorTestCase { /** * @dataProvider provideDataForTest() @@ -24,8 +23,8 @@ public function provideDataForTest(): Iterator return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } - protected function getRectorClass(): string + public function provideConfigFilePath(): string { - return UsePackageManagerActivePackagesRector::class; + return __DIR__ . '/config/configured_rule.php'; } } diff --git a/tests/Rector/v9/v5/UsePackageManagerActivePackages/config/configured_rule.php b/tests/Rector/v9/v5/UsePackageManagerActivePackages/config/configured_rule.php new file mode 100644 index 000000000..41c3c499f --- /dev/null +++ b/tests/Rector/v9/v5/UsePackageManagerActivePackages/config/configured_rule.php @@ -0,0 +1,13 @@ +import(__DIR__ . '/../../../../../../config/services.php'); + + $services = $containerConfigurator->services(); + $services->set(UsePackageManagerActivePackagesRector::class); +}; diff --git a/utils/generator/config/config.php b/utils/generator/config/config.php index c31a09f88..c2297313d 100644 --- a/utils/generator/config/config.php +++ b/utils/generator/config/config.php @@ -5,8 +5,9 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; return static function (ContainerConfigurator $containerConfigurator): void { - $services = $containerConfigurator->services(); + $containerConfigurator->import(__DIR__ . '/../../../../../../config/services.php'); + $services = $containerConfigurator->services(); $services->defaults() ->public() ->autowire() diff --git a/utils/phpstan/config/extension.neon b/utils/phpstan/config/extension.neon index fcf5fe89a..031891d35 100644 --- a/utils/phpstan/config/extension.neon +++ b/utils/phpstan/config/extension.neon @@ -1,5 +1,6 @@ parameters: inferPrivatePropertyTypeFromConstructor: true + services: - class: Ssch\TYPO3Rector\PHPStan\Type\GeneralUtilityDynamicReturnTypeExtension