From 006f60e24ce742bcf5312cd9192657cd47c5cdd8 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Tue, 22 Nov 2022 13:26:28 +0100 Subject: [PATCH 01/11] Use `static` data providers Refs #48281 --- .../DoctrineDataCollectorTest.php | 2 +- .../DoctrineExtensionTest.php | 2 +- .../ChoiceList/ORMQueryBuilderLoaderTest.php | 2 +- .../Tests/Form/DoctrineOrmTypeGuesserTest.php | 2 +- .../Tests/Form/Type/EntityTypeTest.php | 2 +- .../PropertyInfo/DoctrineExtractorTest.php | 2 +- .../Constraints/UniqueEntityValidatorTest.php | 2 +- .../Tests/Validator/DoctrineLoaderTest.php | 2 +- .../Tests/Formatter/ConsoleFormatterTest.php | 2 +- .../Tests/Handler/ConsoleHandlerTest.php | 2 +- .../HttpCodeActivationStrategyTest.php | 2 +- .../NotFoundActivationStrategyTest.php | 2 +- .../Tests/Processor/DebugProcessorTest.php | 2 +- .../DeprecationTest.php | 6 +-- .../Bridge/Twig/Tests/AppVariableTest.php | 2 +- .../Tests/Extension/CodeExtensionTest.php | 4 +- .../Extension/FormExtensionDivLayoutTest.php | 4 +- .../Tests/Translation/TwigExtractorTest.php | 4 +- .../Controller/RedirectControllerTest.php | 6 +-- .../DependencyInjection/ConfigurationTest.php | 6 +-- .../FrameworkExtensionTest.php | 4 +- .../ResolveControllerNameSubscriberTest.php | 2 +- .../Functional/ContainerDebugCommandTest.php | 2 +- .../Tests/Templating/GlobalVariablesTest.php | 2 +- .../Templating/TemplateFilenameParserTest.php | 2 +- .../Templating/TemplateNameParserTest.php | 2 +- .../Tests/Templating/TemplateTest.php | 2 +- .../Security/FirewallConfig.php | 2 +- .../SecurityDataCollectorTest.php | 4 +- .../CompleteConfigurationTest.php | 8 +-- .../MainConfigurationTest.php | 4 +- .../SecurityExtensionTest.php | 6 +-- .../Tests/Functional/SecurityTest.php | 2 +- .../DependencyInjection/TwigExtensionTest.php | 2 +- .../Controller/ProfilerControllerTest.php | 4 +- .../Csp/ContentSecurityPolicyHandlerTest.php | 4 +- .../WebDebugToolbarListenerTest.php | 2 +- .../Tests/Resources/IconTest.php | 2 +- .../BrowserKit/Tests/CookieJarTest.php | 2 +- .../BrowserKit/Tests/HttpBrowserTest.php | 2 +- .../Tests/Adapter/MemcachedAdapterTest.php | 6 +-- .../Cache/Tests/Adapter/PdoAdapterTest.php | 2 +- .../Cache/Tests/Adapter/RedisAdapterTest.php | 4 +- .../Tests/Adapter/RedisClusterAdapterTest.php | 2 +- ...TagAwareAndProxyAdapterIntegrationTest.php | 2 +- .../Component/Cache/Tests/CacheItemTest.php | 2 +- .../Cache/Tests/DoctrineProviderTest.php | 2 +- .../Cache/Tests/Simple/MemcachedCacheTest.php | 4 +- .../Cache/Tests/Simple/RedisCacheTest.php | 4 +- .../Config/Tests/Definition/ArrayNodeTest.php | 2 +- .../Config/Tests/Definition/BaseNodeTest.php | 2 +- .../Builder/ArrayNodeDefinitionTest.php | 4 +- .../Dumper/YamlReferenceDumperTest.php | 2 +- .../Config/Tests/Loader/FileLoaderTest.php | 2 +- .../Resource/ReflectionClassResourceTest.php | 2 +- .../Console/Tests/ApplicationTest.php | 18 +++---- .../Console/Tests/Command/CommandTest.php | 2 +- .../AddConsoleCommandPassTest.php | 2 +- .../Descriptor/ApplicationDescriptionTest.php | 2 +- .../Tests/Formatter/OutputFormatterTest.php | 6 +-- .../Tests/Helper/DumperNativeFallbackTest.php | 2 +- .../Console/Tests/Helper/DumperTest.php | 2 +- .../Console/Tests/Helper/HelperTest.php | 4 +- .../Tests/Helper/ProcessHelperTest.php | 2 +- .../Console/Tests/Helper/ProgressBarTest.php | 2 +- .../Tests/Helper/ProgressIndicatorTest.php | 2 +- .../Tests/Helper/QuestionHelperTest.php | 6 +-- .../Console/Tests/Helper/TableTest.php | 30 +++++------ .../Console/Tests/Input/ArgvInputTest.php | 6 +-- .../Console/Tests/Input/ArrayInputTest.php | 4 +- .../Tests/Logger/ConsoleLoggerTest.php | 4 +- .../Console/Tests/Output/OutputTest.php | 4 +- .../Console/Tests/Question/QuestionTest.php | 12 ++--- .../Console/Tests/Style/SymfonyStyleTest.php | 4 +- .../Debug/Tests/DebugClassLoaderTest.php | 2 +- .../Debug/Tests/ErrorHandlerTest.php | 2 +- .../Tests/Exception/FlattenExceptionTest.php | 2 +- .../ClassNotFoundFatalErrorHandlerTest.php | 2 +- ...UndefinedFunctionFatalErrorHandlerTest.php | 2 +- .../UndefinedMethodFatalErrorHandlerTest.php | 2 +- .../DependencyInjection/Tests/AliasTest.php | 2 +- .../Argument/TaggedIteratorArgumentTest.php | 4 +- .../Tests/Compiler/AutowirePassTest.php | 2 +- .../CheckArgumentsValidityPassTest.php | 2 +- .../PriorityTaggedServiceTraitTest.php | 2 +- .../Tests/Compiler/ResolveClassPassTest.php | 4 +- .../Compiler/ResolveFactoryClassPassTest.php | 2 +- ...ContainerParametersResourceCheckerTest.php | 2 +- .../Tests/ContainerBuilderTest.php | 4 +- .../Tests/DefinitionTest.php | 2 +- .../Tests/Dumper/PhpDumperTest.php | 4 +- .../Tests/Dumper/XmlDumperTest.php | 4 +- .../Tests/EnvVarProcessorTest.php | 2 +- .../InvalidParameterTypeExceptionTest.php | 2 +- .../Tests/Loader/FileLoaderTest.php | 2 +- .../Tests/Loader/LoaderResolverTest.php | 2 +- .../Tests/Loader/PhpFileLoaderTest.php | 2 +- .../Tests/Loader/YamlFileLoaderTest.php | 2 +- .../Tests/ParameterBag/ParameterBagTest.php | 4 +- .../DomCrawler/Tests/AbstractCrawlerTest.php | 2 +- .../Component/DomCrawler/Tests/FormTest.php | 6 +-- .../Tests/Html5ParserCrawlerTest.php | 4 +- .../Tests/DebugClassLoaderTest.php | 2 +- .../ClassNotFoundErrorEnhancerTest.php | 2 +- .../UndefinedFunctionErrorEnhancerTest.php | 2 +- .../UndefinedMethodErrorEnhancerTest.php | 2 +- .../ErrorHandler/Tests/ErrorHandlerTest.php | 4 +- .../Tests/Exception/FlattenExceptionTest.php | 4 +- .../Tests/Debug/WrappedListenerTest.php | 2 +- .../Filesystem/Tests/FilesystemTest.php | 4 +- .../Tests/Comparator/ComparatorTest.php | 4 +- .../Component/Finder/Tests/GitignoreTest.php | 4 +- .../Form/Tests/AbstractLayoutTest.php | 2 +- .../Form/Tests/AbstractRequestHandlerTest.php | 4 +- .../Factory/CachingFactoryDecoratorTest.php | 8 +-- .../Component/Form/Tests/CompoundFormTest.php | 2 +- .../DependencyInjection/FormPassTest.php | 6 +-- .../DataMapper/PropertyPathMapperTest.php | 2 +- .../ChoiceToValueTransformerTest.php | 6 +-- ...TimeImmutableToDateTimeTransformerTest.php | 2 +- ...imeToHtml5LocalDateTimeTransformerTest.php | 4 +- ...teTimeToLocalizedStringTransformerTest.php | 2 +- .../DateTimeToRfc3339TransformerTest.php | 8 +-- .../DateTimeToStringTransformerTest.php | 2 +- ...ntegerToLocalizedStringTransformerTest.php | 6 +-- ...NumberToLocalizedStringTransformerTest.php | 10 ++-- .../StringToFloatTransformerTest.php | 4 +- .../WeekToArrayTransformerTest.php | 4 +- .../FixUrlProtocolListenerTest.php | 4 +- .../Extension/Core/Type/CheckboxTypeTest.php | 4 +- .../Extension/Core/Type/ChoiceTypeTest.php | 4 +- .../Core/Type/DateIntervalTypeTest.php | 2 +- .../Extension/Core/Type/DateTimeTypeTest.php | 2 +- .../Extension/Core/Type/DateTypeTest.php | 6 +-- .../Core/Type/ExtendedChoiceTypeTest.php | 2 +- .../Extension/Core/Type/FileTypeTest.php | 2 +- .../Extension/Core/Type/TextTypeTest.php | 2 +- .../Extension/Core/Type/TimeTypeTest.php | 4 +- .../Extension/Core/Type/WeekTypeTest.php | 2 +- .../Csrf/Type/FormTypeCsrfExtensionTest.php | 2 +- .../Validator/ValidatorTypeGuesserTest.php | 6 +-- .../ViolationMapper/ViolationMapperTest.php | 8 +-- .../ViolationMapper/ViolationPathTest.php | 4 +- .../Form/Tests/FormErrorIteratorTest.php | 2 +- .../Form/Tests/ResolvedFormTypeTest.php | 2 +- .../Tests/Resources/TranslationFilesTest.php | 2 +- .../Component/Form/Tests/SimpleFormTest.php | 2 +- .../Form/Tests/Util/StringUtilTest.php | 6 +-- .../Exception/HttpExceptionTraitTest.php | 2 +- .../HttpClient/Tests/HttpClientTraitTest.php | 12 ++--- .../HttpClient/Tests/HttpOptionsTest.php | 2 +- .../HttpClient/Tests/MockHttpClientTest.php | 4 +- .../Tests/ScopingHttpClientTest.php | 2 +- .../Tests/AcceptHeaderItemTest.php | 4 +- .../HttpFoundation/Tests/AcceptHeaderTest.php | 10 ++-- .../Tests/ApacheRequestTest.php | 2 +- .../Tests/BinaryFileResponseTest.php | 8 +-- .../Tests/ExpressionRequestMatcherTest.php | 2 +- .../Tests/File/UploadedFileTest.php | 2 +- .../HttpFoundation/Tests/HeaderUtilsTest.php | 6 +-- .../HttpFoundation/Tests/RequestTest.php | 26 ++++----- .../Tests/ResponseFunctionalTest.php | 2 +- .../HttpFoundation/Tests/ResponseTest.php | 6 +-- .../Session/Attribute/AttributeBagTest.php | 2 +- .../Attribute/NamespacedAttributeBagTest.php | 2 +- .../Tests/Session/SessionTest.php | 2 +- .../Handler/AbstractSessionHandlerTest.php | 2 +- .../Handler/NativeFileSessionHandlerTest.php | 2 +- .../Storage/Handler/PdoSessionHandlerTest.php | 2 +- .../Handler/SessionHandlerFactoryTest.php | 2 +- .../Storage/Proxy/SessionHandlerProxyTest.php | 2 +- .../Tests/Controller/ErrorControllerTest.php | 2 +- .../RequestDataCollectorTest.php | 6 +-- ...sterControllerArgumentLocatorsPassTest.php | 4 +- .../DisallowRobotsIndexingListenerTest.php | 2 +- .../Tests/EventListener/ErrorListenerTest.php | 4 +- .../EventListener/ExceptionListenerTest.php | 2 +- .../EventListener/TestSessionListenerTest.php | 2 +- .../Tests/Exception/HttpExceptionTest.php | 2 +- .../HttpCache/ResponseCacheStrategyTest.php | 2 +- .../HttpKernel/Tests/Log/LoggerTest.php | 2 +- .../Inflector/Tests/InflectorTest.php | 4 +- .../Tests/Collator/AbstractCollatorTest.php | 2 +- .../Component/Intl/Tests/CurrenciesTest.php | 10 ++-- .../Bundle/Reader/BundleEntryReaderTest.php | 2 +- .../AbstractCurrencyDataProviderTest.php | 10 ++-- .../Provider/AbstractDataProviderTest.php | 6 +-- .../AbstractLanguageDataProviderTest.php | 4 +- .../AbstractIntlDateFormatterTest.php | 54 +++++++++---------- .../DateFormatter/IntlDateFormatterTest.php | 8 +-- .../Tests/Globals/AbstractIntlGlobalsTest.php | 2 +- .../Component/Intl/Tests/LanguagesTest.php | 8 +-- .../Component/Intl/Tests/LocaleTest.php | 2 +- .../AbstractNumberFormatterTest.php | 48 ++++++++--------- .../Intl/Tests/ResourceBundleTestCase.php | 6 +-- .../Component/Intl/Tests/TimezonesTest.php | 4 +- .../Intl/Tests/Util/IcuVersionTest.php | 4 +- .../Component/Intl/Tests/Util/VersionTest.php | 4 +- .../Adapter/ExtLdap/EntryManagerTest.php | 2 +- src/Symfony/Component/Lock/Tests/LockTest.php | 2 +- .../Lock/Tests/Store/PdoStoreTest.php | 2 +- .../Lock/Tests/Store/ZookeeperStoreTest.php | 2 +- .../Tests/Strategy/ConsensusStrategyTest.php | 4 +- .../Tests/Strategy/UnanimousStrategyTest.php | 4 +- .../Transport/SesTransportFactoryTest.php | 8 +-- .../Transport/GmailTransportFactoryTest.php | 8 +-- .../MandrillTransportFactoryTest.php | 8 +-- .../Transport/MailgunTransportFactoryTest.php | 8 +-- .../PostmarkTransportFactoryTest.php | 8 +-- .../SendgridTransportFactoryTest.php | 8 +-- .../Mailer/Test/TransportFactoryTestCase.php | 8 +-- .../Mailer/Tests/Transport/DsnTest.php | 4 +- .../Transport/NullTransportFactoryTest.php | 4 +- .../SendmailTransportFactoryTest.php | 6 +-- .../Smtp/EsmtpTransportFactoryTest.php | 4 +- .../Smtp/Stream/AbstractStreamTest.php | 2 +- .../Component/Mailer/Tests/TransportTest.php | 6 +-- .../StopWorkerOnMemoryLimitListenerTest.php | 2 +- .../StopWorkerOnMessageLimitListenerTest.php | 2 +- .../StopWorkerOnRestartSignalListenerTest.php | 2 +- .../Tests/Handler/HandleDescriptorTest.php | 2 +- .../Messenger/Tests/MessageBusTest.php | 2 +- .../HandleMessageMiddlewareTest.php | 2 +- .../Transport/AmqpExt/ConnectionTest.php | 2 +- .../Transport/Doctrine/ConnectionTest.php | 4 +- .../InMemoryTransportFactoryTest.php | 2 +- .../Transport/RedisExt/ConnectionTest.php | 2 +- .../Component/Mime/Tests/AddressTest.php | 4 +- .../Component/Mime/Tests/RawMessageTest.php | 2 +- .../Tests/OptionsResolverTest.php | 4 +- .../Component/Process/Tests/ProcessTest.php | 22 ++++---- .../Tests/PropertyPathBuilderTest.php | 2 +- .../PropertyAccess/Tests/PropertyPathTest.php | 2 +- .../PropertyInfoPassTest.php | 2 +- .../Tests/Extractor/PhpDocExtractorTest.php | 20 +++---- .../Extractor/ReflectionExtractorTest.php | 16 +++--- .../Tests/Generator/UrlGeneratorTest.php | 4 +- .../Loader/AnnotationClassLoaderTest.php | 2 +- .../Tests/Loader/ContainerLoaderTest.php | 2 +- .../Tests/Loader/XmlFileLoaderTest.php | 2 +- .../Tests/Loader/YamlFileLoaderTest.php | 2 +- .../Dumper/StaticPrefixCollectionTest.php | 2 +- .../Tests/RouteCollectionBuilderTest.php | 2 +- .../Routing/Tests/RouteCompilerTest.php | 8 +-- .../Component/Routing/Tests/RouteTest.php | 4 +- .../AuthenticationProviderManagerTest.php | 2 +- .../AuthorizationCheckerTest.php | 2 +- .../Authorization/ExpressionLanguageTest.php | 4 +- .../TraceableAccessDecisionManagerTest.php | 2 +- .../Tests/Resources/TranslationFilesTest.php | 2 +- .../Tests/Firewall/ContextListenerTest.php | 2 +- .../Tests/Firewall/ExceptionListenerTest.php | 4 +- .../Tests/Firewall/LogoutListenerTest.php | 2 +- ...PasswordFormAuthenticationListenerTest.php | 4 +- .../Security/Http/Tests/HttpUtilsTest.php | 2 +- .../AbstractRememberMeServicesTest.php | 2 +- .../TokenBasedRememberMeServicesTest.php | 2 +- .../Tests/Annotation/MaxDepthTest.php | 2 +- .../Tests/Annotation/SerializedNameTest.php | 2 +- .../DeserializeNestedArrayOfObjectsTest.php | 2 +- .../Tests/Encoder/JsonDecodeTest.php | 2 +- .../Tests/Encoder/JsonEncodeTest.php | 2 +- .../CamelCaseToSnakeCaseNameConverterTest.php | 2 +- .../MetadataAwareNameConverterTest.php | 6 +-- .../Normalizer/DataUriNormalizerTest.php | 4 +- .../Normalizer/DateTimeNormalizerTest.php | 6 +-- .../Features/CallbacksTestTrait.php | 8 +-- .../Features/CircularReferenceTestTrait.php | 2 +- .../Stopwatch/Tests/StopwatchPeriodTest.php | 4 +- .../Tests/TemplateNameParserTest.php | 2 +- .../Tests/Command/XliffLintCommandTest.php | 2 +- .../Tests/Extractor/PhpExtractorTest.php | 2 +- .../Tests/Formatter/IntlFormatterTest.php | 2 +- .../Validator/Mapping/ClassMetadata.php | 2 +- .../Mapping/ClassMetadataInterface.php | 2 +- .../Tests/ConstraintValidatorTest.php | 2 +- .../Tests/ConstraintViolationListTest.php | 2 +- .../AbstractComparisonValidatorTestCase.php | 16 +++--- .../Constraints/DivisibleByValidatorTest.php | 10 ++-- .../Tests/Constraints/EmailValidatorTest.php | 2 +- .../Constraints/EqualToValidatorTest.php | 8 +-- .../Validator/Tests/Constraints/FileTest.php | 6 +-- .../Tests/Constraints/FileValidatorTest.php | 8 +-- .../GreaterThanOrEqualValidatorTest.php | 8 +-- ...idatorWithPositiveOrZeroConstraintTest.php | 4 +- .../Constraints/GreaterThanValidatorTest.php | 8 +-- ...hanValidatorWithPositiveConstraintTest.php | 4 +- .../Constraints/IdenticalToValidatorTest.php | 10 ++-- .../LessThanOrEqualValidatorTest.php | 8 +-- ...idatorWithNegativeOrZeroConstraintTest.php | 4 +- .../Constraints/LessThanValidatorTest.php | 8 +-- ...hanValidatorWithNegativeConstraintTest.php | 4 +- .../Constraints/NotEqualToValidatorTest.php | 8 +-- .../NotIdenticalToValidatorTest.php | 10 ++-- .../Validator/Tests/Constraints/RangeTest.php | 4 +- .../Tests/Constraints/RangeValidatorTest.php | 4 +- .../Validator/Tests/Constraints/RegexTest.php | 2 +- .../Tests/Constraints/TimezoneTest.php | 2 +- .../AddAutoMappingConfigurationPassTest.php | 2 +- .../Tests/Mapping/ClassMetadataTest.php | 4 +- .../Mapping/Loader/PropertyInfoLoaderTest.php | 2 +- .../Mapping/Loader/XmlFileLoaderTest.php | 2 +- .../Mapping/Loader/YamlFileLoaderTest.php | 4 +- .../Tests/Resources/TranslationFilesTest.php | 2 +- .../Validator/Tests/Util/PropertyPathTest.php | 2 +- .../VarDumper/Tests/Caster/CasterTest.php | 2 +- .../VarDumper/Tests/Caster/DateCasterTest.php | 8 +-- .../VarDumper/Tests/Caster/SplCasterTest.php | 2 +- .../Tests/Caster/XmlReaderCasterTest.php | 8 +-- .../Command/Descriptor/CliDescriptorTest.php | 42 +++++++-------- .../Command/Descriptor/HtmlDescriptorTest.php | 10 ++-- .../VarDumper/Tests/Dumper/CliDumperTest.php | 10 ++-- .../VarDumper/Tests/Dumper/HtmlDumperTest.php | 2 +- .../VarDumper/Tests/Fixtures/Twig.php | 2 +- .../VarExporter/Tests/InstantiatorTest.php | 2 +- .../VarExporter/Tests/VarExporterTest.php | 4 +- .../Component/WebLink/Tests/LinkTest.php | 4 +- .../Tests/Dumper/GraphvizDumperTest.php | 8 +-- .../Tests/Dumper/PlantUmlDumperTest.php | 4 +- .../Component/Yaml/Tests/DumperTest.php | 2 +- .../Component/Yaml/Tests/InlineTest.php | 10 ++-- .../Component/Yaml/Tests/ParserTest.php | 10 ++-- 322 files changed, 713 insertions(+), 713 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php b/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php index 35fc48ff1536f..0d2863c096cb8 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php @@ -182,7 +182,7 @@ public function testSerialization($param, array $types, $expected, $explainable, $this->assertSame($runnable, $collectedQueries['default'][0]['runnable']); } - public function paramProvider(): array + public static function paramProvider(): array { return [ ['some value', [], 'some value', true], diff --git a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php index 4fb8a0a4437d6..b57767900f9e6 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php @@ -170,7 +170,7 @@ public function testFixManagersAutoMappings(array $originalEm1, array $originalE ], $expectedEm2)); } - public function providerBasicDrivers() + public static function providerBasicDrivers() { return [ ['doctrine.orm.cache.apc.class', ['type' => 'apc']], diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php index 8bb0f256977a5..eb2922b4e7200 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php @@ -169,7 +169,7 @@ public function testEmbeddedIdentifierName() $loader->getEntitiesByIds('id.value', [1, '', 2, 3, 'foo']); } - public function provideGuidEntityClasses() + public static function provideGuidEntityClasses() { return [ ['Symfony\Bridge\Doctrine\Tests\Fixtures\GuidIdEntity'], diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php index e003a20ee6b56..1adef122db0f4 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php @@ -29,7 +29,7 @@ public function testRequiredGuesser($classMetadata, $expected) $this->assertEquals($expected, $this->getGuesser($classMetadata)->guessRequired('TestEntity', 'field')); } - public function requiredProvider() + public static function requiredProvider() { $return = []; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php index f593618f9c8ff..f51c68c0bb72f 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php @@ -158,7 +158,7 @@ public function testChoiceTranslationDomainIsDisabledByDefault($expanded) } } - public function choiceTranslationDomainProvider() + public static function choiceTranslationDomainProvider() { return [ [false], diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php index bd1a26487a6b5..5b3b3ddc6594d 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php @@ -190,7 +190,7 @@ public function testExtractEnum() $this->assertNull($this->createExtractor()->getTypes(DoctrineEnum::class, 'enumCustom', [])); } - public function typesProvider() + public static function typesProvider() { $provider = [ ['id', [new Type(Type::BUILTIN_TYPE_INT)]], diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php index 3032e41f132ea..b44eaf3f3fd16 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php @@ -435,7 +435,7 @@ public function testValidateResultTypes($entity1, $result) $this->assertNoViolation(); } - public function resultTypesProvider() + public static function resultTypesProvider() { $entity = new SingleIntIdEntity(1, 'foo'); diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php index 0bdc2efc2a77a..598b6e4c4da5e 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php @@ -208,7 +208,7 @@ public function testClassValidator(bool $expected, string $classValidatorRegexp $this->assertSame($expected, $doctrineLoader->loadClassMetadata($classMetadata)); } - public function regexpProvider() + public static function regexpProvider() { return [ [false, null], diff --git a/src/Symfony/Bridge/Monolog/Tests/Formatter/ConsoleFormatterTest.php b/src/Symfony/Bridge/Monolog/Tests/Formatter/ConsoleFormatterTest.php index 89d5bee454548..36f0c5ce89216 100644 --- a/src/Symfony/Bridge/Monolog/Tests/Formatter/ConsoleFormatterTest.php +++ b/src/Symfony/Bridge/Monolog/Tests/Formatter/ConsoleFormatterTest.php @@ -26,7 +26,7 @@ public function testFormat(array $record, $expectedMessage) self::assertSame($expectedMessage, $formatter->format($record)); } - public function providerFormatTests(): array + public static function providerFormatTests(): array { $currentDateTime = new \DateTime(); diff --git a/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php b/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php index d61692ed76466..85cb1f8d74617 100644 --- a/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php +++ b/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php @@ -89,7 +89,7 @@ public function testVerbosityMapping($verbosity, $level, $isHandling, array $map $this->assertFalse($handler->handle($infoRecord), 'The handler finished handling the log.'); } - public function provideVerbosityMappingTests() + public static function provideVerbosityMappingTests() { return [ [OutputInterface::VERBOSITY_QUIET, Logger::ERROR, true], diff --git a/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php b/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php index 3d84cb3552c0d..0effa5b08c457 100644 --- a/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php +++ b/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php @@ -54,7 +54,7 @@ public function testIsActivated($url, $record, $expected) $this->assertEquals($expected, $strategy->isHandlerActivated($record)); } - public function isActivatedProvider() + public static function isActivatedProvider() { return [ ['/test', ['level' => Logger::ERROR], true], diff --git a/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php b/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php index b04678106c96e..6f6ec1ce05f26 100644 --- a/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php +++ b/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php @@ -33,7 +33,7 @@ public function testIsActivated($url, $record, $expected) $this->assertEquals($expected, $strategy->isHandlerActivated($record)); } - public function isActivatedProvider() + public static function isActivatedProvider() { return [ ['/test', ['level' => Logger::DEBUG], false], diff --git a/src/Symfony/Bridge/Monolog/Tests/Processor/DebugProcessorTest.php b/src/Symfony/Bridge/Monolog/Tests/Processor/DebugProcessorTest.php index 4ac41c978ec4e..ba0df20756be7 100644 --- a/src/Symfony/Bridge/Monolog/Tests/Processor/DebugProcessorTest.php +++ b/src/Symfony/Bridge/Monolog/Tests/Processor/DebugProcessorTest.php @@ -32,7 +32,7 @@ public function testDatetimeFormat(array $record, $expectedTimestamp) self::assertSame($expectedTimestamp, $records[0]['timestamp']); } - public function providerDatetimeFormatTests(): array + public static function providerDatetimeFormatTests(): array { $record = $this->getRecord(); diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php index 9cb0a0e32ce3a..7f7be6451896e 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php @@ -97,7 +97,7 @@ public function testItMutesOnlySpecificErrorMessagesWhenTheCallingCodeIsInPhpuni $this->assertSame($muted, $deprecation->isMuted()); } - public function mutedProvider() + public static function mutedProvider() { yield 'not from phpunit, and not a whitelisted message' => [ false, @@ -147,7 +147,7 @@ public function testItTakesMutesDeprecationFromPhpUnitFiles() $this->assertTrue($deprecation->isMuted()); } - public function providerGetTypeDetectsSelf() + public static function providerGetTypeDetectsSelf() { return [ 'not_from_vendors_file' => [Deprecation::TYPE_SELF, '', 'MyClass1', __FILE__], @@ -182,7 +182,7 @@ public function testGetTypeDetectsSelf(string $expectedType, string $message, st $this->assertSame($expectedType, $deprecation->getType()); } - public function providerGetTypeUsesRightTrace() + public static function providerGetTypeUsesRightTrace() { $vendorDir = self::getVendorDir(); $fakeTrace = [ diff --git a/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php b/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php index b496aa9679ad7..082c89a46781a 100644 --- a/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php +++ b/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php @@ -43,7 +43,7 @@ public function testDebug($debugFlag) $this->assertEquals($debugFlag, $this->appVariable->getDebug()); } - public function debugDataProvider() + public static function debugDataProvider() { return [ 'debug on' => [true], diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php index 874faeeb99955..2a301670250d3 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php @@ -44,7 +44,7 @@ public function testGettingMethodAbbreviation($method, $abbr) $this->assertEquals($this->getExtension()->abbrMethod($method), $abbr); } - public function getClassNameProvider() + public static function getClassNameProvider() { return [ ['F\Q\N\Foo', 'Foo'], @@ -52,7 +52,7 @@ public function getClassNameProvider() ]; } - public function getMethodNameProvider() + public static function getMethodNameProvider() { return [ ['F\Q\N\Foo::Method', 'Foo::Method()'], diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php index 99477a617229c..d63b6d0e10333 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php @@ -100,7 +100,7 @@ public function testThemeBlockInheritanceUsingDynamicExtend() ); } - public function isSelectedChoiceProvider() + public static function isSelectedChoiceProvider() { return [ [true, '0', '0'], @@ -150,7 +150,7 @@ public function testStartTagHasActionAttributeWhenActionIsZero() $this->assertSame('
', $html); } - public function isRootFormProvider() + public static function isRootFormProvider() { return [ [true, new FormView()], diff --git a/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php b/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php index 5dfc6ea450e0e..33161c41c2c41 100644 --- a/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php @@ -112,7 +112,7 @@ public function testExtractSyntaxError($resources, array $messages) $this->assertSame($messages, $catalogue->all()); } - public function resourcesWithSyntaxErrorsProvider(): array + public static function resourcesWithSyntaxErrorsProvider(): array { return [ [__DIR__.'/../Fixtures', ['messages' => ['Hi!' => 'Hi!']]], @@ -143,7 +143,7 @@ public function testExtractWithFiles($resource) $this->assertEquals('Hi!', $catalogue->get('Hi!', 'messages')); } - public function resourceProvider(): array + public static function resourceProvider(): array { $directory = __DIR__.'/../Fixtures/extractor/'; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php index 70ccf7c97cf5e..de72396df6ad5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php @@ -103,7 +103,7 @@ public function testRoute($permanent, $keepRequestMethod, $keepQueryParams, $ign $this->assertEquals($expectedCode, $returnResponse->getStatusCode()); } - public function provider() + public static function provider() { return [ [true, false, false, false, 301, ['additional-parameter' => 'value']], @@ -210,7 +210,7 @@ public function testUrlRedirectDefaultPorts() $this->assertRedirectUrl($returnValue, $expectedUrl); } - public function urlRedirectProvider() + public static function urlRedirectProvider() { return [ // Standard ports @@ -262,7 +262,7 @@ public function testUrlRedirect($scheme, $httpPort, $httpsPort, $requestScheme, $this->assertRedirectUrl($returnValue, $expectedUrl); } - public function pathQueryParamsProvider() + public static function pathQueryParamsProvider() { return [ ['http://www.example.com/base/redirect-path', '/redirect-path', ''], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php index 861e161f6792d..ece63e9bc7be2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -126,7 +126,7 @@ public function testValidAssetsPackageNameConfiguration($packageName) $this->assertArrayHasKey($packageName, $config['assets']['packages']); } - public function provideValidAssetsPackageNameConfigurationTests() + public static function provideValidAssetsPackageNameConfigurationTests() { return [ ['foobar'], @@ -152,7 +152,7 @@ public function testInvalidAssetsConfiguration(array $assetConfig, $expectedMess ]); } - public function provideInvalidAssetConfigurationTests() + public static function provideInvalidAssetConfigurationTests() { // helper to turn config into embedded package config $createPackageConfig = function (array $packageConfig) { @@ -205,7 +205,7 @@ public function testValidLockConfiguration($lockConfig, $processedConfig) $this->assertEquals($processedConfig, $config['lock']); } - public function provideValidLockConfigurationTests() + public static function provideValidLockConfigurationTests() { yield [null, ['enabled' => true, 'resources' => ['default' => [class_exists(SemaphoreStore::class) && SemaphoreStore::isSupported() ? 'semaphore' : 'flock']]]]; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index 38e502db56b46..20003f60aaedf 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -1468,7 +1468,7 @@ public function testEventDispatcherService() $this->assertInstanceOf(EventDispatcherInterface::class, $container->get('foo')->dispatcher); } - public function testCacheDefaultRedisProvider() + public static function testCacheDefaultRedisProvider() { $container = $this->createContainerFromFile('cache'); @@ -1672,7 +1672,7 @@ public function testHttpClientFullDefaultOptions() ], $defaultOptions['peer_fingerprint']); } - public function provideMailer(): array + public static function provideMailer(): array { return [ ['mailer_with_dsn', ['main' => 'smtp://example.com']], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/EventListener/ResolveControllerNameSubscriberTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/EventListener/ResolveControllerNameSubscriberTest.php index 2aa519acfb2b1..b666e0f5954cd 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/EventListener/ResolveControllerNameSubscriberTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/EventListener/ResolveControllerNameSubscriberTest.php @@ -63,7 +63,7 @@ public function testSkipsOtherControllerFormats($controller) $this->assertEquals($controller, $request->attributes->get('_controller')); } - public function provideSkippedControllers() + public static function provideSkippedControllers() { yield ['Other:format']; yield [function () {}]; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php index 70b7bfcaafc5d..f08d5606d7c17 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php @@ -136,7 +136,7 @@ public function testDescribeEnvVar() $this->assertStringContainsString(file_get_contents(__DIR__.'/Fixtures/describe_env_vars.txt'), $tester->getDisplay(true)); } - public function provideIgnoreBackslashWhenFindingService() + public static function provideIgnoreBackslashWhenFindingService() { return [ [BackslashClass::class], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php index 2e8162baf04f8..7fa5f3828a276 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php @@ -93,7 +93,7 @@ public function testGetUser($user, $expectedUser) $this->assertSame($expectedUser, $this->globals->getUser()); } - public function getUserProvider() + public static function getUserProvider() { $user = $this->createMock(UserInterface::class); $std = new \stdClass(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateFilenameParserTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateFilenameParserTest.php index 58e671ddf358b..b64aac836a3b3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateFilenameParserTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateFilenameParserTest.php @@ -46,7 +46,7 @@ public function testParseFromFilename($file, $ref) } } - public function getFilenameToTemplateProvider() + public static function getFilenameToTemplateProvider() { return [ ['/path/to/section/name.format.engine', new TemplateReference('', '/path/to/section', 'name', 'format', 'engine')], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateNameParserTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateNameParserTest.php index 4fe8aa3a4367e..6010b325acd61 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateNameParserTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateNameParserTest.php @@ -58,7 +58,7 @@ public function testParse($name, $logicalName, $path, $ref) $this->assertSame($path, $template->getPath()); } - public function parseProvider() + public static function parseProvider() { return [ ['FooBundle:Post:index.html.php', 'FooBundle:Post:index.html.php', '@FooBundle/Resources/views/Post/index.html.php', new TemplateReference('FooBundle', 'Post', 'index', 'html', 'php')], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateTest.php index 899740169f207..fddaae16f2e18 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TemplateTest.php @@ -27,7 +27,7 @@ public function testGetPathForTemplate($template, $path) $this->assertSame($template->getPath(), $path); } - public function getTemplateToPathProvider() + public static function getTemplateToPathProvider() { return [ [new TemplateReference('FooBundle', 'Post', 'index', 'html', 'php'), '@FooBundle/Resources/views/Post/index.html.php'], diff --git a/src/Symfony/Bundle/SecurityBundle/Security/FirewallConfig.php b/src/Symfony/Bundle/SecurityBundle/Security/FirewallConfig.php index dca8ccde565c1..1ce5973fc18d4 100644 --- a/src/Symfony/Bundle/SecurityBundle/Security/FirewallConfig.php +++ b/src/Symfony/Bundle/SecurityBundle/Security/FirewallConfig.php @@ -74,7 +74,7 @@ public function isStateless(): bool return $this->stateless; } - public function getProvider(): ?string + public static function getProvider(): ?string { return $this->provider; } diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php index 74bb0404a8e8a..eae78ed4c3cb1 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php @@ -251,7 +251,7 @@ public function testGetListeners() $this->assertSame(1, $listenerCalled); } - public function providerCollectDecisionLog(): \Generator + public static function providerCollectDecisionLog(): \Generator { $voter1 = $this->getMockBuilder(VoterInterface::class)->getMockForAbstractClass(); $voter2 = $this->getMockBuilder(VoterInterface::class)->getMockForAbstractClass(); @@ -381,7 +381,7 @@ public function testCollectDecisionLog(string $strategy, array $decisionLog, arr $this->assertSame($dataCollector->getVoterStrategy(), $strategy, 'Wrong value returned by getVoterStrategy'); } - public function provideRoles() + public static function provideRoles() { return [ // Basic roles diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php index b3cfbb9f88d71..ecb756d529fd8 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php @@ -627,27 +627,27 @@ public function testAccessDecisionManagerOptionsAreNotOverriddenByImplicitStrate $this->assertFalse($accessDecisionManagerDefinition->getArgument(3)); } - public function testFirewallUndefinedUserProvider() + public static function testFirewallUndefinedUserProvider() { $this->expectException(InvalidConfigurationException::class); $this->expectExceptionMessage('Invalid firewall "main": user provider "undefined" not found.'); $this->getContainer('firewall_undefined_provider'); } - public function testFirewallListenerUndefinedProvider() + public static function testFirewallListenerUndefinedProvider() { $this->expectException(InvalidConfigurationException::class); $this->expectExceptionMessage('Invalid firewall "main": user provider "undefined" not found.'); $this->getContainer('listener_undefined_provider'); } - public function testFirewallWithUserProvider() + public static function testFirewallWithUserProvider() { $this->getContainer('firewall_provider'); $this->addToAssertionCount(1); } - public function testFirewallListenerWithProvider() + public static function testFirewallListenerWithProvider() { $this->getContainer('listener_provider'); $this->addToAssertionCount(1); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php index ffefe42ccb8d9..e77be87703476 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php @@ -34,7 +34,7 @@ class MainConfigurationTest extends TestCase ], ]; - public function testNoConfigForProvider() + public static function testNoConfigForProvider() { $this->expectException(InvalidConfigurationException::class); $config = [ @@ -48,7 +48,7 @@ public function testNoConfigForProvider() $processor->processConfiguration($configuration, [$config]); } - public function testManyConfigForProvider() + public static function testManyConfigForProvider() { $this->expectException(InvalidConfigurationException::class); $config = [ diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php index 9d96cbe36b5b7..e9d70aead2fcd 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php @@ -70,7 +70,7 @@ public function testFirewallWithoutAuthenticationListener() $container->compile(); } - public function testFirewallWithInvalidUserProvider() + public static function testFirewallWithInvalidUserProvider() { $this->expectException(InvalidConfigurationException::class); $this->expectExceptionMessage('Unable to create definition for "security.user.provider.concrete.my_foo" user provider'); @@ -169,7 +169,7 @@ public function testSwitchUserNotStatelessOnStatelessFirewall() $this->assertTrue($container->getDefinition('security.authentication.switchuser_listener.some_firewall')->getArgument(9)); } - public function testPerListenerProvider() + public static function testPerListenerProvider() { $container = $this->getRawContainer(); $container->loadFromExtension('security', [ @@ -371,7 +371,7 @@ public function testRememberMeCookieInheritFrameworkSessionCookie($config, $same $this->assertEquals($secure, $definition->getArgument(3)['secure']); } - public function sessionConfigurationProvider() + public static function sessionConfigurationProvider() { return [ [ diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php index 1f41e2646d1af..6ed9563bbcfd1 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php @@ -34,7 +34,7 @@ public function testServiceIsFunctional() $this->assertSame($token, $security->getToken()); } - public function userWillBeMarkedAsChangedIfRolesHasChangedProvider() + public static function userWillBeMarkedAsChangedIfRolesHasChangedProvider() { return [ [ diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php index 84f08949c7248..159beed424a6e 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php @@ -275,7 +275,7 @@ public function testStopwatchExtensionAvailability($debug, $stopwatchEnabled, $e $this->assertSame($expected, $stopwatchIsAvailable->getValue($tokenParsers[0])); } - public function stopwatchExtensionAvailabilityProvider() + public static function stopwatchExtensionAvailabilityProvider() { return [ 'debug-and-stopwatch-enabled' => [true, true, true], diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php index 661717dfcad2b..a6e49f39b5b93 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php @@ -354,7 +354,7 @@ public function testPhpinfoAction() $this->assertStringContainsString('PHP License', $client->getResponse()->getContent()); } - public function provideCspVariants() + public static function provideCspVariants() { return [ [true], @@ -416,7 +416,7 @@ public function testDefaultPanel(string $expectedPanel, Profile $profile) ->panelAction(new Request(), $profile->getToken()); } - public function defaultPanelProvider(): \Generator + public static function defaultPanelProvider(): \Generator { // Test default behavior $profile = new Profile('xxxxxx'); diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php index fbaf2f7965d05..31c3aa2214c50 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php @@ -46,7 +46,7 @@ public function testOnKernelResponse($nonce, $expectedNonce, Request $request, R } } - public function provideRequestAndResponses() + public static function provideRequestAndResponses() { $nonce = bin2hex(random_bytes(16)); @@ -73,7 +73,7 @@ public function provideRequestAndResponses() ]; } - public function provideRequestAndResponsesForOnKernelResponse() + public static function provideRequestAndResponsesForOnKernelResponse() { $nonce = bin2hex(random_bytes(16)); diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php index 60c430f9b006f..dbc01749bfbb4 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php @@ -146,7 +146,7 @@ public function testToolbarIsNotInjectedOnRedirection($statusCode) $this->assertEquals('', $response->getContent()); } - public function provideRedirects() + public static function provideRedirects() { return [ [301], diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Resources/IconTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Resources/IconTest.php index a690721ebc018..afbd6edff0f06 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Resources/IconTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Resources/IconTest.php @@ -23,7 +23,7 @@ public function testIconFileContents($iconFilePath) $this->assertMatchesRegularExpression('~.*~s', file_get_contents($iconFilePath), sprintf('The SVG metadata of the %s icon is different than expected (use the same as the other icons).', $iconFilePath)); } - public function provideIconFilePaths() + public static function provideIconFilePaths() { return array_map(function ($filePath) { return (array) $filePath; }, glob(__DIR__.'/../../Resources/views/Icon/*.svg')); } diff --git a/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php b/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php index 414f5dc62c5f3..bf9333de9baa0 100644 --- a/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php +++ b/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php @@ -130,7 +130,7 @@ public function testAllValues($uri, $values) $this->assertEquals($values, array_keys($cookieJar->allValues($uri)), '->allValues() returns the cookie for a given URI'); } - public function provideAllValuesValues() + public static function provideAllValuesValues() { return [ ['http://www.example.com', ['foo_nothing', 'foo_domain']], diff --git a/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php b/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php index 522af77d843f2..7b7283bc9a5bb 100644 --- a/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php +++ b/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php @@ -191,7 +191,7 @@ public function testMultipleForwardSlashesRequestPath(string $requestPath) $browser->request('GET', $requestPath); } - public function forwardSlashesRequestPathProvider() + public static function forwardSlashesRequestPathProvider() { return [ 'one slash' => ['/'], diff --git a/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php index 210ef1689d819..1a1b4e8a11329 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php @@ -84,7 +84,7 @@ public function testBadOptions($name, $value) MemcachedAdapter::createConnection([], [$name => $value]); } - public function provideBadOptions(): array + public static function provideBadOptions(): array { return [ ['foo', 'bar'], @@ -136,7 +136,7 @@ public function testServersSetting(string $dsn, string $host, int $port) $this->assertSame([$expect], array_map($f, $client3->getServerList())); } - public function provideServersSetting(): iterable + public static function provideServersSetting(): iterable { yield [ 'memcached://127.0.0.1/50', @@ -186,7 +186,7 @@ public function testDsnWithOptions(string $dsn, array $options, array $expectedO } } - public function provideDsnWithOptions(): iterable + public static function provideDsnWithOptions(): iterable { if (!class_exists(\Memcached::class)) { self::markTestSkipped('Extension memcached required.'); diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php index 95c0fd6f8a596..ac272ca955eb4 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php @@ -91,7 +91,7 @@ public function testDsn(string $dsn, string $file = null) } } - public function provideDsn() + public static function provideDsn() { $dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache'); yield ['sqlite://localhost/'.$dbFile.'1', $dbFile.'1']; diff --git a/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php index aa2ce75a4555d..cc8e0f9869a7d 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php @@ -102,7 +102,7 @@ public function testFailedCreateConnection(string $dsn) RedisAdapter::createConnection($dsn); } - public function provideFailedCreateConnection(): array + public static function provideFailedCreateConnection(): array { return [ ['redis://localhost:1234'], @@ -122,7 +122,7 @@ public function testInvalidCreateConnection(string $dsn) RedisAdapter::createConnection($dsn); } - public function provideInvalidCreateConnection(): array + public static function provideInvalidCreateConnection(): array { return [ ['redis://localhost/foo'], diff --git a/src/Symfony/Component/Cache/Tests/Adapter/RedisClusterAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/RedisClusterAdapterTest.php index fca50690aef5e..157566884720b 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/RedisClusterAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/RedisClusterAdapterTest.php @@ -58,7 +58,7 @@ public function testFailedCreateConnection(string $dsn) RedisAdapter::createConnection($dsn); } - public function provideFailedCreateConnection(): array + public static function provideFailedCreateConnection(): array { return [ ['redis://localhost:1234?redis_cluster=1'], diff --git a/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php b/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php index bcb3c01532377..4af199dc417cd 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php @@ -58,7 +58,7 @@ public function testIntegrationUsingProxiedAdapterForTagsPool() $this->assertFalse($cache->getItem('foo')->isHit()); } - public function dataProvider(): array + public static function dataProvider(): array { return [ [new ArrayAdapter()], diff --git a/src/Symfony/Component/Cache/Tests/CacheItemTest.php b/src/Symfony/Component/Cache/Tests/CacheItemTest.php index bf9afc56c2702..e8f3ebb4939f9 100644 --- a/src/Symfony/Component/Cache/Tests/CacheItemTest.php +++ b/src/Symfony/Component/Cache/Tests/CacheItemTest.php @@ -34,7 +34,7 @@ public function testInvalidKey($key) CacheItem::validateKey($key); } - public function provideInvalidKey(): array + public static function provideInvalidKey(): array { return [ [''], diff --git a/src/Symfony/Component/Cache/Tests/DoctrineProviderTest.php b/src/Symfony/Component/Cache/Tests/DoctrineProviderTest.php index 91a5516ab7719..60e69184a3c42 100644 --- a/src/Symfony/Component/Cache/Tests/DoctrineProviderTest.php +++ b/src/Symfony/Component/Cache/Tests/DoctrineProviderTest.php @@ -18,7 +18,7 @@ class DoctrineProviderTest extends TestCase { - public function testProvider() + public static function testProvider() { $pool = new ArrayAdapter(); $cache = new DoctrineProvider($pool); diff --git a/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTest.php b/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTest.php index ee07594854c6c..a05354198869a 100644 --- a/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTest.php +++ b/src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTest.php @@ -94,7 +94,7 @@ public function testBadOptions(string $name, $value) MemcachedCache::createConnection([], [$name => $value]); } - public function provideBadOptions(): array + public static function provideBadOptions(): array { return [ ['foo', 'bar'], @@ -145,7 +145,7 @@ public function testServersSetting(string $dsn, string $host, int $port) $this->assertSame([$expect], array_map($f, $client3->getServerList())); } - public function provideServersSetting(): iterable + public static function provideServersSetting(): iterable { yield [ 'memcached://127.0.0.1/50', diff --git a/src/Symfony/Component/Cache/Tests/Simple/RedisCacheTest.php b/src/Symfony/Component/Cache/Tests/Simple/RedisCacheTest.php index 5e3361c97bb51..550b6e2492f8d 100644 --- a/src/Symfony/Component/Cache/Tests/Simple/RedisCacheTest.php +++ b/src/Symfony/Component/Cache/Tests/Simple/RedisCacheTest.php @@ -58,7 +58,7 @@ public function testFailedCreateConnection(string $dsn) RedisCache::createConnection($dsn); } - public function provideFailedCreateConnection(): array + public static function provideFailedCreateConnection(): array { return [ ['redis://localhost:1234'], @@ -77,7 +77,7 @@ public function testInvalidCreateConnection(string $dsn) RedisCache::createConnection($dsn); } - public function provideInvalidCreateConnection(): array + public static function provideInvalidCreateConnection(): array { return [ ['foo://localhost'], diff --git a/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php index 95f8480316b44..dc543cc3b80e8 100644 --- a/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php @@ -55,7 +55,7 @@ public function testNormalizeWithoutProposals() $node->normalize(['beta' => 'foo']); } - public function ignoreAndRemoveMatrixProvider(): array + public static function ignoreAndRemoveMatrixProvider(): array { $unrecognizedOptionException = new InvalidConfigurationException('Unrecognized option "foo" under "root"'); diff --git a/src/Symfony/Component/Config/Tests/Definition/BaseNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/BaseNodeTest.php index afe3cdf691a90..4ea8469ef3c14 100644 --- a/src/Symfony/Component/Config/Tests/Definition/BaseNodeTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/BaseNodeTest.php @@ -41,7 +41,7 @@ public function testGetPathForChildNode(string $expected, array $params) $this->assertSame($expected, $node->getPath()); } - public function providePath(): array + public static function providePath(): array { return [ 'name only' => ['root', ['root']], diff --git a/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php b/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php index 0f111826d35f6..4d1a399d61de4 100644 --- a/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php @@ -52,7 +52,7 @@ public function testPrototypeNodeSpecificOption(string $method, array $args) $node->getNode(); } - public function providePrototypeNodeSpecificCalls(): array + public static function providePrototypeNodeSpecificCalls(): array { return [ ['defaultValue', [[]]], @@ -134,7 +134,7 @@ public function testPrototypedArrayNodeDefault($args, bool $shouldThrowWhenUsing } } - public function providePrototypedArrayNodeDefaults(): array + public static function providePrototypedArrayNodeDefaults(): array { return [ [null, true, false, [[]]], diff --git a/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php b/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php index f1871d49725c8..648ba55448047 100644 --- a/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php @@ -26,7 +26,7 @@ public function testDumper() $this->assertEquals($this->getConfigurationAsString(), $dumper->dump($configuration)); } - public function provideDumpAtPath(): array + public static function provideDumpAtPath(): array { return [ 'Regular node' => ['scalar_true', <<assertNotContains('baz.txt', $loadedFiles); } - public function excludeTrailingSlashConsistencyProvider(): iterable + public static function excludeTrailingSlashConsistencyProvider(): iterable { yield [__DIR__.'/../Fixtures/Exclude/ExcludeToo/']; yield [__DIR__.'/../Fixtures/Exclude/ExcludeToo']; diff --git a/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php index 1f3425787c0e9..875baf9f7f370 100644 --- a/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php @@ -117,7 +117,7 @@ public function testHashedSignature(bool $changeExpected, int $changedLine, ?str } } - public function provideHashedSignature(): iterable + public static function provideHashedSignature(): iterable { yield [false, 0, "// line change\n\n"]; yield [true, 0, '/** class docblock */']; diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php index fae8d2dcf743b..8d159fd9fb81d 100644 --- a/src/Symfony/Component/Console/Tests/ApplicationTest.php +++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php @@ -423,7 +423,7 @@ public function testFindWithAmbiguousAbbreviations($abbreviation, $expectedExcep $application->find($abbreviation); } - public function provideAmbiguousAbbreviations() + public static function provideAmbiguousAbbreviations() { return [ ['f', 'Command "f" is not defined.'], @@ -501,12 +501,12 @@ public function testDontRunAlternativeNamespaceName() $tester = new ApplicationTester($application); $tester->run(['command' => 'foos:bar1'], ['decorated' => false]); $this->assertSame(' - - There are no commands defined in the "foos" namespace. - - Did you mean this? - foo - + + There are no commands defined in the "foos" namespace. + + Did you mean this? + foo + ', $tester->getDisplay(true)); } @@ -539,7 +539,7 @@ public function testDontRunAlternativeCommandName() $this->assertStringContainsString('Do you want to run "foo" instead? (yes/no) [no]:', $display); } - public function provideInvalidCommandNamesSingle() + public static function provideInvalidCommandNamesSingle() { return [ ['foo3:barr'], @@ -748,7 +748,7 @@ public function testFindHiddenWithAbbreviatedName($name) $application->find($name); } - public function provideAbbreviationsForHiddenCommands() + public static function provideAbbreviationsForHiddenCommands() { return [ ['foo:hidde'], diff --git a/src/Symfony/Component/Console/Tests/Command/CommandTest.php b/src/Symfony/Component/Console/Tests/Command/CommandTest.php index 7648b80ff0f08..271789e8e35ab 100644 --- a/src/Symfony/Component/Console/Tests/Command/CommandTest.php +++ b/src/Symfony/Component/Console/Tests/Command/CommandTest.php @@ -123,7 +123,7 @@ public function testInvalidCommandNames($name) $command->setName($name); } - public function provideInvalidCommandNames() + public static function provideInvalidCommandNames() { return [ [''], diff --git a/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php b/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php index 9c86fa98f298d..58b965aceed3c 100644 --- a/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php +++ b/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php @@ -110,7 +110,7 @@ public function testProcessFallsBackToDefaultName() $this->assertSame(['new-name' => 'with-default-name'], $container->getDefinition('console.command_loader')->getArgument(1)); } - public function visibilityProvider() + public static function visibilityProvider() { return [ [true], diff --git a/src/Symfony/Component/Console/Tests/Descriptor/ApplicationDescriptionTest.php b/src/Symfony/Component/Console/Tests/Descriptor/ApplicationDescriptionTest.php index f1408d087d5e7..9800e7e95a805 100644 --- a/src/Symfony/Component/Console/Tests/Descriptor/ApplicationDescriptionTest.php +++ b/src/Symfony/Component/Console/Tests/Descriptor/ApplicationDescriptionTest.php @@ -31,7 +31,7 @@ public function testGetNamespaces(array $expected, array $names) $this->assertSame($expected, array_keys((new ApplicationDescription($application))->getNamespaces())); } - public function getNamespacesProvider() + public static function getNamespacesProvider() { return [ [['_global'], ['foobar']], diff --git a/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php b/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php index b041a0db5abce..c2365fa13b726 100644 --- a/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php +++ b/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php @@ -181,7 +181,7 @@ public function testInlineStyleOptions(string $tag, string $expected = null, str } } - public function provideInlineStyleOptionsCases() + public static function provideInlineStyleOptionsCases() { return [ [''], @@ -195,7 +195,7 @@ public function provideInlineStyleOptionsCases() ]; } - public function provideInlineStyleTagsWithUnknownOptions() + public static function provideInlineStyleTagsWithUnknownOptions() { return [ ['', 'abc'], @@ -253,7 +253,7 @@ public function testNotDecoratedFormatter(string $input, string $expectedNonDeco } } - public function provideDecoratedAndNonDecoratedOutput() + public static function provideDecoratedAndNonDecoratedOutput() { return [ ['some error', 'some error', "\033[37;41msome error\033[39;49m"], diff --git a/src/Symfony/Component/Console/Tests/Helper/DumperNativeFallbackTest.php b/src/Symfony/Component/Console/Tests/Helper/DumperNativeFallbackTest.php index 906d322b665d2..1b37e4e9390c0 100644 --- a/src/Symfony/Component/Console/Tests/Helper/DumperNativeFallbackTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/DumperNativeFallbackTest.php @@ -42,7 +42,7 @@ public function testInvoke($variable, $primitiveString) $this->assertSame($primitiveString, $dumper($variable)); } - public function provideVariables() + public static function provideVariables() { return [ [null, 'null'], diff --git a/src/Symfony/Component/Console/Tests/Helper/DumperTest.php b/src/Symfony/Component/Console/Tests/Helper/DumperTest.php index e491422b0fbb8..0a30c6ec34642 100644 --- a/src/Symfony/Component/Console/Tests/Helper/DumperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/DumperTest.php @@ -45,7 +45,7 @@ public function testInvoke($variable) $this->assertDumpMatchesFormat($dumper($variable), $variable); } - public function provideVariables() + public static function provideVariables() { return [ [null], diff --git a/src/Symfony/Component/Console/Tests/Helper/HelperTest.php b/src/Symfony/Component/Console/Tests/Helper/HelperTest.php index b8c8910874ed8..9f59aa2ff1a76 100644 --- a/src/Symfony/Component/Console/Tests/Helper/HelperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/HelperTest.php @@ -17,7 +17,7 @@ class HelperTest extends TestCase { - public function formatTimeProvider() + public static function formatTimeProvider() { return [ [0, '< 1 sec'], @@ -43,7 +43,7 @@ public function formatTimeProvider() ]; } - public function decoratedTextProvider() + public static function decoratedTextProvider() { return [ ['abc', 'abc'], diff --git a/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php index e2880f22f4317..b4d7b0bbcd484 100644 --- a/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php @@ -49,7 +49,7 @@ public function testPassedCallbackIsExecuted() $this->assertTrue($executed); } - public function provideCommandsAndOutput() + public static function provideCommandsAndOutput() { $successOutputVerbose = <<<'EOT' RUN php -r "echo 42;" diff --git a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php index 0cf06353d20d4..794a44586c64e 100644 --- a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php @@ -915,7 +915,7 @@ public function testFormatsWithoutMax($format) /** * Provides each defined format. */ - public function provideFormat(): array + public static function provideFormat(): array { return [ ['normal'], diff --git a/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php b/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php index cd97d406eb1f5..ffb3472eca11c 100644 --- a/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php @@ -158,7 +158,7 @@ public function testFormats($format) /** * Provides each defined format. */ - public function provideFormat(): array + public static function provideFormat(): array { return [ ['normal'], diff --git a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php index 9088d917c7880..a96b481506926 100644 --- a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php @@ -533,7 +533,7 @@ public function testSelectChoiceFromSimpleChoices($providedAnswer, $expectedValu $this->assertSame($expectedValue, $answer); } - public function simpleAnswerProvider() + public static function simpleAnswerProvider() { return [ [0, 'My environment 1'], @@ -599,7 +599,7 @@ public function testChoiceFromChoicelistWithMixedKeys($providedAnswer, $expected $this->assertSame($expectedValue, $answer); } - public function mixedKeysChoiceListAnswerProvider() + public static function mixedKeysChoiceListAnswerProvider() { return [ ['0', '0'], @@ -653,7 +653,7 @@ public function testAmbiguousChoiceFromChoicelist() $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream("My environment\n")), $this->createOutputInterface(), $question); } - public function answerProvider() + public static function answerProvider() { return [ ['env_1', 'env_1'], diff --git a/src/Symfony/Component/Console/Tests/Helper/TableTest.php b/src/Symfony/Component/Console/Tests/Helper/TableTest.php index 0e3f30cdadadf..494a4171ec1bf 100644 --- a/src/Symfony/Component/Console/Tests/Helper/TableTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/TableTest.php @@ -87,7 +87,7 @@ public function testRenderAddRowsOneByOne($headers, $rows, $style, $expected, $d $this->assertEquals($expected, $this->getOutputContent($output)); } - public function renderProvider() + public static function renderProvider() { $books = [ ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'], @@ -118,11 +118,11 @@ public function renderProvider() $books, 'compact', <<<'TABLE' -ISBN Title Author -99921-58-10-7 Divine Comedy Dante Alighieri -9971-5-0210-0 A Tale of Two Cities Charles Dickens -960-425-059-0 The Lord of the Rings J. R. R. Tolkien -80-902734-1-6 And Then There Were None Agatha Christie +ISBN Title Author +99921-58-10-7 Divine Comedy Dante Alighieri +9971-5-0210-0 A Tale of Two Cities Charles Dickens +960-425-059-0 The Lord of the Rings J. R. R. Tolkien +80-902734-1-6 And Then There Were None Agatha Christie TABLE ], @@ -131,14 +131,14 @@ public function renderProvider() $books, 'borderless', <<<'TABLE' - =============== ========================== ================== - ISBN Title Author - =============== ========================== ================== - 99921-58-10-7 Divine Comedy Dante Alighieri - 9971-5-0210-0 A Tale of Two Cities Charles Dickens - 960-425-059-0 The Lord of the Rings J. R. R. Tolkien - 80-902734-1-6 And Then There Were None Agatha Christie - =============== ========================== ================== + =============== ========================== ================== + ISBN Title Author + =============== ========================== ================== + 99921-58-10-7 Divine Comedy Dante Alighieri + 9971-5-0210-0 A Tale of Two Cities Charles Dickens + 960-425-059-0 The Lord of the Rings J. R. R. Tolkien + 80-902734-1-6 And Then There Were None Agatha Christie + =============== ========================== ================== TABLE ], @@ -1274,7 +1274,7 @@ public function testBoxedStyleWithColspan() $this->assertSame($expected, $this->getOutputContent($output)); } - public function provideRenderHorizontalTests() + public static function provideRenderHorizontalTests() { $headers = ['foo', 'bar', 'baz']; $rows = [['one', 'two', 'tree'], ['1', '2', '3']]; diff --git a/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php b/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php index 4e39f5e93b926..49b08d617d763 100644 --- a/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php +++ b/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php @@ -51,7 +51,7 @@ public function testParseOptions($input, $options, $expectedOptions, $message) $this->assertSame($expectedOptions, $input->getOptions(), $message); } - public function provideOptions() + public static function provideOptions() { return [ [ @@ -189,7 +189,7 @@ public function testInvalidInput($argv, $definition, $expectedExceptionMessage) $input->bind($definition); } - public function provideInvalidInput() + public static function provideInvalidInput() { return [ [ @@ -410,7 +410,7 @@ public function testGetParameterOptionEqualSign($argv, $key, $default, $onlyPara $this->assertEquals($expected, $input->getParameterOption($key, $default, $onlyParams), '->getParameterOption() returns the expected value'); } - public function provideGetParameterOptionValues() + public static function provideGetParameterOptionValues() { return [ [['app/console', 'foo:bar'], '-e', 'default', false, 'default'], diff --git a/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php b/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php index 5777c44b7269a..733322490d00b 100644 --- a/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php +++ b/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php @@ -74,7 +74,7 @@ public function testParseOptions($input, $options, $expectedOptions, $message) $this->assertEquals($expectedOptions, $input->getOptions(), $message); } - public function provideOptions() + public static function provideOptions() { return [ [ @@ -133,7 +133,7 @@ public function testParseInvalidInput($parameters, $definition, $expectedExcepti new ArrayInput($parameters, $definition); } - public function provideInvalidInput() + public static function provideInvalidInput() { return [ [ diff --git a/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php b/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php index 3585bde63a123..4a96ddb154051 100644 --- a/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php +++ b/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php @@ -69,7 +69,7 @@ public function testOutputMapping($logLevel, $outputVerbosity, $isOutput, $addVe $this->assertEquals($isOutput ? "[$logLevel] foo bar".\PHP_EOL : '', $logs); } - public function provideOutputMappingParams() + public static function provideOutputMappingParams() { $quietMap = [LogLevel::EMERGENCY => OutputInterface::VERBOSITY_QUIET]; @@ -123,7 +123,7 @@ public function testLogsAtAllLevels($level, $message) $this->assertEquals($expected, $this->getLogs()); } - public function provideLevelsAndMessages() + public static function provideLevelsAndMessages() { return [ LogLevel::EMERGENCY => [LogLevel::EMERGENCY, 'message of level emergency with context: {user}'], diff --git a/src/Symfony/Component/Console/Tests/Output/OutputTest.php b/src/Symfony/Component/Console/Tests/Output/OutputTest.php index 7cfa6cdc0aab6..da1a43c976378 100644 --- a/src/Symfony/Component/Console/Tests/Output/OutputTest.php +++ b/src/Symfony/Component/Console/Tests/Output/OutputTest.php @@ -104,7 +104,7 @@ public function testWriteRawMessage($message, $type, $expectedOutput) $this->assertEquals($expectedOutput, $output->output); } - public function provideWriteArguments() + public static function provideWriteArguments() { return [ ['foo', Output::OUTPUT_RAW, "foo\n"], @@ -161,7 +161,7 @@ public function testWriteWithVerbosityOption($verbosity, $expected, $msg) $this->assertEquals($expected, $output->output, $msg); } - public function verbosityProvider() + public static function verbosityProvider() { return [ [Output::VERBOSITY_QUIET, '2', '->write() in QUIET mode only outputs when an explicit QUIET verbosity is passed'], diff --git a/src/Symfony/Component/Console/Tests/Question/QuestionTest.php b/src/Symfony/Component/Console/Tests/Question/QuestionTest.php index 5da76062c61ee..7b86220e69cd6 100644 --- a/src/Symfony/Component/Console/Tests/Question/QuestionTest.php +++ b/src/Symfony/Component/Console/Tests/Question/QuestionTest.php @@ -25,7 +25,7 @@ protected function setUp(): void $this->question = new Question('Test question'); } - public function providerTrueFalse() + public static function providerTrueFalse() { return [[true], [false]]; } @@ -105,7 +105,7 @@ public function testIsHiddenFallbackDefault() self::assertTrue($this->question->isHiddenFallback()); } - public function providerGetSetAutocompleterValues() + public static function providerGetSetAutocompleterValues() { return [ 'array' => [ @@ -136,7 +136,7 @@ public function testGetSetAutocompleterValues($values, $expectValues) ); } - public function providerSetAutocompleterValuesInvalid() + public static function providerSetAutocompleterValuesInvalid() { return [ ['Potato'], @@ -233,7 +233,7 @@ function (string $input): array { return []; } $this->assertNull($exception); } - public function providerGetSetValidator() + public static function providerGetSetValidator() { return [ [function ($input) { return $input; }], @@ -255,7 +255,7 @@ public function testGetValidatorDefault() self::assertNull($this->question->getValidator()); } - public function providerGetSetMaxAttempts() + public static function providerGetSetMaxAttempts() { return [[1], [5], [null]]; } @@ -269,7 +269,7 @@ public function testGetSetMaxAttempts($attempts) self::assertSame($attempts, $this->question->getMaxAttempts()); } - public function providerSetMaxAttemptsInvalid() + public static function providerSetMaxAttemptsInvalid() { return [['Potato'], [0], [-1]]; } diff --git a/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php b/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php index 201da64749953..d763ee479a5d6 100644 --- a/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php +++ b/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php @@ -67,14 +67,14 @@ public function testInteractiveOutputs($inputCommandFilepath, $outputFilepath) $this->assertStringEqualsFile($outputFilepath, $this->tester->getDisplay(true)); } - public function inputInteractiveCommandToOutputFilesProvider() + public static function inputInteractiveCommandToOutputFilesProvider() { $baseDir = __DIR__.'/../Fixtures/Style/SymfonyStyle'; return array_map(null, glob($baseDir.'/command/interactive_command_*.php'), glob($baseDir.'/output/interactive_output_*.txt')); } - public function inputCommandToOutputFilesProvider() + public static function inputCommandToOutputFilesProvider() { $baseDir = __DIR__.'/../Fixtures/Style/SymfonyStyle'; diff --git a/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php b/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php index 0e91ef0331c1f..00d0d705bdcc9 100644 --- a/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php +++ b/src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php @@ -144,7 +144,7 @@ class_exists('Test\\'.__NAMESPACE__.'\\'.$class, true); $this->assertSame($xError, $lastError); } - public function provideDeprecatedSuper() + public static function provideDeprecatedSuper() { return [ ['DeprecatedInterfaceClass', 'DeprecatedInterface', 'implements'], diff --git a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php index 1fa2ca18626f9..d6cf174e7361f 100644 --- a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php @@ -587,7 +587,7 @@ public function testErrorHandlerWhenLogging($previousHandlerWasDefined, $loggerS } } - public function errorHandlerWhenLoggingProvider() + public static function errorHandlerWhenLoggingProvider() { foreach ([false, true] as $previousHandlerWasDefined) { foreach ([false, true] as $loggerSetsAnotherHandler) { diff --git a/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php b/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php index ea441b3081f94..3f3cc45d6f265 100644 --- a/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php +++ b/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php @@ -230,7 +230,7 @@ public function testCreate() ); } - public function flattenDataProvider() + public static function flattenDataProvider() { return [ [new \Exception('test', 123), 'Exception'], diff --git a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php index 7e2406dda95f0..14ca5e4c57dc7 100644 --- a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php @@ -75,7 +75,7 @@ public function testHandleClassNotFound($error, $translatedMessage, $autoloader $this->assertSame($error['line'], $exception->getLine()); } - public function provideClassNotFoundData() + public static function provideClassNotFoundData() { $autoloader = new ComposerClassLoader(); $autoloader->add('Symfony\Component\Debug\Exception\\', realpath(__DIR__.'/../../Exception')); diff --git a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php index 7406d7f345cfe..c94bf53470d2f 100644 --- a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php @@ -37,7 +37,7 @@ public function testUndefinedFunction($error, $translatedMessage) $this->assertSame($error['line'], $exception->getLine()); } - public function provideUndefinedFunctionData() + public static function provideUndefinedFunctionData() { return [ [ diff --git a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php index 160dc7fa05015..1b4b34c4856af 100644 --- a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php @@ -36,7 +36,7 @@ public function testUndefinedMethod($error, $translatedMessage) $this->assertSame($error['line'], $exception->getLine()); } - public function provideUndefinedMethodData() + public static function provideUndefinedMethodData() { return [ [ diff --git a/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php b/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php index 19c152e7afae6..218fefb401964 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php @@ -96,7 +96,7 @@ public function testCannotDeprecateWithAnInvalidTemplate($message) $def->setDeprecated(true, $message); } - public function invalidDeprecationMessageProvider() + public static function invalidDeprecationMessageProvider() { return [ "With \rs" => ["invalid \r message %alias_id%"], diff --git a/src/Symfony/Component/DependencyInjection/Tests/Argument/TaggedIteratorArgumentTest.php b/src/Symfony/Component/DependencyInjection/Tests/Argument/TaggedIteratorArgumentTest.php index fbeb0238aa8a3..dcc38dde7fb19 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Argument/TaggedIteratorArgumentTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Argument/TaggedIteratorArgumentTest.php @@ -67,7 +67,7 @@ public function testDefaultIndexMethod(?string $indexAttribute, ?string $default $this->assertSame($expectedDefaultIndexMethod, $taggedIteratorArgument->getDefaultIndexMethod()); } - public function defaultIndexMethodProvider() + public static function defaultIndexMethodProvider() { yield 'No indexAttribute and no defaultIndexMethod' => [ null, @@ -116,7 +116,7 @@ public function testDefaultPriorityIndexMethod(?string $indexAttribute, ?string $this->assertSame($expectedDefaultPriorityMethod, $taggedIteratorArgument->getDefaultPriorityMethod()); } - public function defaultPriorityMethodProvider() + public static function defaultPriorityMethodProvider() { yield 'No indexAttribute and no defaultPriorityMethod' => [ null, diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php index 1cfc3f0889113..9f633a5cc1e61 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php @@ -884,7 +884,7 @@ public function testNotWireableCalls($method, $expectedMsg) } } - public function provideNotWireableCalls() + public static function provideNotWireableCalls() { return [ ['setNotAutowireable', 'Cannot autowire service "foo": argument "$n" of method "Symfony\Component\DependencyInjection\Tests\Compiler\NotWireable::setNotAutowireable()" has type "Symfony\Component\DependencyInjection\Tests\Compiler\NotARealClass" but this class was not found.'], diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php index 322dcd2583fbe..6d0a2edd083e5 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php @@ -56,7 +56,7 @@ public function testException(array $arguments, array $methodCalls) $pass->process($container); } - public function definitionProvider() + public static function definitionProvider() { return [ [['a' => 'a', null], []], diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php index 2674ea4dde24e..12471117fee3e 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php @@ -175,7 +175,7 @@ public function testTheIndexedTagsByDefaultIndexMethodFailure(string $defaultInd $priorityTaggedServiceTraitImplementation->test($tag, $container); } - public function provideInvalidDefaultMethods(): iterable + public static function provideInvalidDefaultMethods(): iterable { yield ['getMethodShouldBeStatic', null, sprintf('Method "%s::getMethodShouldBeStatic()" should be static.', FooTaggedForInvalidDefaultMethodClass::class)]; yield ['getMethodShouldBeStatic', 'foo', sprintf('Either method "%s::getMethodShouldBeStatic()" should be static or tag "my_custom_tag" on service "service1" is missing attribute "foo".', FooTaggedForInvalidDefaultMethodClass::class)]; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php index 89e5fa2ea2abd..6678b6c5d8972 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php @@ -33,7 +33,7 @@ public function testResolveClassFromId($serviceId) $this->assertSame($serviceId, $def->getClass()); } - public function provideValidClassId() + public static function provideValidClassId() { yield ['Acme\UnknownClass']; yield [CaseSensitiveClass::class]; @@ -52,7 +52,7 @@ public function testWontResolveClassFromId($serviceId) $this->assertNull($def->getClass()); } - public function provideInvalidClassId() + public static function provideInvalidClassId() { yield [\stdClass::class]; yield ['bar']; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveFactoryClassPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveFactoryClassPassTest.php index 6b69e0bf2151d..8d93eeb9cbff3 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveFactoryClassPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveFactoryClassPassTest.php @@ -46,7 +46,7 @@ public function testInlinedDefinitionFactoryIsProcessed() $this->assertSame(['Baz\Qux', 'getInstance'], $factory->getFactory()[0]->getFactory()); } - public function provideFulfilledFactories() + public static function provideFulfilledFactories() { return [ [['Foo\Bar', 'create']], diff --git a/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php b/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php index 08ff5c797e185..2b6faa4cbf172 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php @@ -51,7 +51,7 @@ public function testIsFresh(callable $mockContainer, $expected) $this->assertSame($expected, $this->resourceChecker->isFresh($this->resource, time())); } - public function isFreshProvider() + public static function isFreshProvider() { yield 'not fresh on missing parameter' => [function (MockObject $container) { $container->method('hasParameter')->with('locales')->willReturn(false); diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index 38f975deb4162..426a9653af91e 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -220,7 +220,7 @@ public function testBadDefinitionId($id) $builder->setDefinition($id, new Definition('Foo')); } - public function provideBadId() + public static function provideBadId() { return [ [''], @@ -1460,7 +1460,7 @@ public function testAlmostCircular($visibility) $this->assertInstanceOf(\stdClass::class, $listener4); } - public function provideAlmostCircular() + public static function provideAlmostCircular() { yield ['public']; yield ['private']; diff --git a/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php b/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php index d03233f5d259d..1d0da0fcc4997 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php @@ -227,7 +227,7 @@ public function testSetDeprecatedWithInvalidDeprecationTemplate($message) $def->setDeprecated(false, $message); } - public function invalidDeprecationMessageProvider() + public static function invalidDeprecationMessageProvider() { return [ "With \rs" => ["invalid \r message %service_id%"], diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index 059e83a71085b..04a56bfbf422c 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -371,7 +371,7 @@ public function testInvalidFactories($factory) $dumper->dump(); } - public function provideInvalidFactories() + public static function provideInvalidFactories() { return [ [['', 'method']], @@ -1085,7 +1085,7 @@ public function testAlmostCircular($visibility) $this->assertInstanceOf(\stdClass::class, $listener4); } - public function provideAlmostCircular() + public static function provideAlmostCircular() { yield ['public']; yield ['private']; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php index 91d0d7d90fe0f..90e6f419902bd 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php @@ -117,7 +117,7 @@ public function testDumpDecoratedServices($expectedXmlDump, $container) $this->assertEquals($expectedXmlDump, $dumper->dump()); } - public function provideDecoratedServicesData() + public static function provideDecoratedServicesData() { $fixturesPath = realpath(__DIR__.'/../Fixtures/'); @@ -169,7 +169,7 @@ public function testCompiledContainerCanBeDumped($containerFile) $this->addToAssertionCount(1); } - public function provideCompiledContainerData() + public static function provideCompiledContainerData() { return [ ['container8'], diff --git a/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php b/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php index a01bd4a16c286..0e9bb4f49a9ac 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php @@ -733,7 +733,7 @@ public function testGetEnvUrlPath(?string $expected, string $url) })['path']); } - public function provideGetEnvUrlPath() + public static function provideGetEnvUrlPath() { return [ ['', 'https://symfony.com'], diff --git a/src/Symfony/Component/DependencyInjection/Tests/Exception/InvalidParameterTypeExceptionTest.php b/src/Symfony/Component/DependencyInjection/Tests/Exception/InvalidParameterTypeExceptionTest.php index d61388ea2dd72..ef88c71cad9c7 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Exception/InvalidParameterTypeExceptionTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Exception/InvalidParameterTypeExceptionTest.php @@ -26,7 +26,7 @@ public function testExceptionMessage(\ReflectionParameter $parameter, string $ex self::assertSame($expectedMessage, $exception->getMessage()); } - public function provideReflectionParameters(): iterable + public static function provideReflectionParameters(): iterable { yield 'static method' => [ new \ReflectionParameter([MyClass::class, 'doSomething'], 0), diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php index 794753da2158e..e9d641409e67c 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php @@ -258,7 +258,7 @@ public function testExcludeTrailingSlashConsistency(string $exclude) $this->assertFalse($container->has(DeeperBaz::class)); } - public function excludeTrailingSlashConsistencyProvider(): iterable + public static function excludeTrailingSlashConsistencyProvider(): iterable { yield ['Prototype/OtherDir/AnotherSub/']; yield ['Prototype/OtherDir/AnotherSub']; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php index cfd8aa3cf69f4..5980a3c636393 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php @@ -42,7 +42,7 @@ protected function setUp(): void ]); } - public function provideResourcesToLoad() + public static function provideResourcesToLoad() { return [ ['ini_with_wrong_ext.xml', 'ini', IniFileLoader::class], diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php index afc42f2a93879..2643fe634bf8c 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php @@ -66,7 +66,7 @@ public function testConfig($file) $this->assertStringMatchesFormatFile($fixtures.'/config/'.$file.'.expected.yml', $dumper->dump()); } - public function provideConfig() + public static function provideConfig() { yield ['basic']; yield ['object']; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php index 910e7b2a243e5..9932e83b433c0 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php @@ -91,7 +91,7 @@ public function testLoadInvalidFile($file) $loader->load($file.'.yml'); } - public function provideInvalidFiles() + public static function provideInvalidFiles() { return [ ['bad_parameters'], diff --git a/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php b/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php index 8bdabb7bb8e8d..f8db1cd211682 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php @@ -84,7 +84,7 @@ public function testGetThrowParameterNotFoundException($parameterKey, $exception $bag->get($parameterKey); } - public function provideGetThrowParameterNotFoundExceptionData() + public static function provideGetThrowParameterNotFoundExceptionData() { return [ ['foo1', 'You have requested a non-existent parameter "foo1". Did you mean this: "foo"?'], @@ -244,7 +244,7 @@ public function testResolveStringWithSpacesReturnsString($expected, $test, $desc } } - public function stringsWithSpacesProvider() + public static function stringsWithSpacesProvider() { return [ ['bar', '%foo%', 'Parameters must be wrapped by %.'], diff --git a/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTest.php b/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTest.php index 1d75e18a49216..ac15d29940bf5 100644 --- a/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTest.php @@ -910,7 +910,7 @@ public function testSiblings() } } - public function provideMatchTests() + public static function provideMatchTests() { yield ['#foo', true, '#foo']; yield ['#foo', true, '.foo']; diff --git a/src/Symfony/Component/DomCrawler/Tests/FormTest.php b/src/Symfony/Component/DomCrawler/Tests/FormTest.php index 3b29b0f588ffe..7248a31a6be05 100644 --- a/src/Symfony/Component/DomCrawler/Tests/FormTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/FormTest.php @@ -78,7 +78,7 @@ public function testConstructorThrowsExceptionIfNoRelatedForm(\DOMElement $node) new Form($node, 'http://example.com'); } - public function constructorThrowsExceptionIfNoRelatedFormProvider() + public static function constructorThrowsExceptionIfNoRelatedFormProvider() { $dom = new \DOMDocument(); $dom->loadHTML(' @@ -217,7 +217,7 @@ function ($field) { ); } - public function provideInitializeValues() + public static function provideInitializeValues() { return [ [ @@ -585,7 +585,7 @@ public function testGetUriWithActionOverride() $this->assertEquals('http://localhost/bar', $form->getUri(), '->getUri() returns absolute URIs'); } - public function provideGetUriValues() + public static function provideGetUriValues() { return [ [ diff --git a/src/Symfony/Component/DomCrawler/Tests/Html5ParserCrawlerTest.php b/src/Symfony/Component/DomCrawler/Tests/Html5ParserCrawlerTest.php index 806bc2e181032..244c29ccfd5ca 100644 --- a/src/Symfony/Component/DomCrawler/Tests/Html5ParserCrawlerTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/Html5ParserCrawlerTest.php @@ -50,7 +50,7 @@ public function testHtml5ParserWithInvalidHeadedContent(string $content) self::assertEmpty($crawler->filterXPath('//h1')->text(), '->addHtmlContent failed as expected'); } - public function validHtml5Provider(): iterable + public static function validHtml5Provider(): iterable { $html = $this->getDoctype().'

Foo

'; $BOM = \chr(0xEF).\chr(0xBB).\chr(0xBF); @@ -63,7 +63,7 @@ public function validHtml5Provider(): iterable yield 'All together' => [$BOM.' '.''.$html]; } - public function invalidHtml5Provider(): iterable + public static function invalidHtml5Provider(): iterable { $html = $this->getDoctype().'

Foo

'; diff --git a/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php b/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php index 84c930edb041b..ffb2b7cb64ebe 100644 --- a/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php +++ b/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php @@ -141,7 +141,7 @@ class_exists('Test\\'.__NAMESPACE__.'\\'.$class, true); $this->assertSame($xError, $lastError); } - public function provideDeprecatedSuper(): array + public static function provideDeprecatedSuper(): array { return [ ['DeprecatedInterfaceClass', 'DeprecatedInterface', 'implements'], diff --git a/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/ClassNotFoundErrorEnhancerTest.php b/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/ClassNotFoundErrorEnhancerTest.php index 1ca2f162b9eb1..72ee19985e00c 100644 --- a/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/ClassNotFoundErrorEnhancerTest.php +++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/ClassNotFoundErrorEnhancerTest.php @@ -72,7 +72,7 @@ public function testEnhance(string $originalMessage, string $enhancedMessage, $a $this->assertSame($expectedLine, $error->getLine()); } - public function provideClassNotFoundData() + public static function provideClassNotFoundData() { $autoloader = new ComposerClassLoader(); $autoloader->add('Symfony\Component\ErrorHandler\Error\\', realpath(__DIR__.'/../../Error')); diff --git a/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedFunctionErrorEnhancerTest.php b/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedFunctionErrorEnhancerTest.php index fe7d5371a11ae..547e33373720b 100644 --- a/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedFunctionErrorEnhancerTest.php +++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedFunctionErrorEnhancerTest.php @@ -34,7 +34,7 @@ public function testEnhance(string $originalMessage, string $enhancedMessage) $this->assertSame($expectedLine, $error->getLine()); } - public function provideUndefinedFunctionData() + public static function provideUndefinedFunctionData() { return [ [ diff --git a/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedMethodErrorEnhancerTest.php b/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedMethodErrorEnhancerTest.php index b31c6c292a8f4..f417200242608 100644 --- a/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedMethodErrorEnhancerTest.php +++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedMethodErrorEnhancerTest.php @@ -33,7 +33,7 @@ public function testEnhance(string $originalMessage, string $enhancedMessage) $this->assertSame($expectedLine, $error->getLine()); } - public function provideUndefinedMethodData() + public static function provideUndefinedMethodData() { return [ [ diff --git a/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php b/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php index 64dc3f7f31718..19fbf99bcad74 100644 --- a/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php +++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php @@ -448,7 +448,7 @@ public function testHandleException(string $expectedMessage, \Throwable $excepti } } - public function handleExceptionProvider(): array + public static function handleExceptionProvider(): array { return [ ['Uncaught Exception: foo', new \Exception('foo')], @@ -648,7 +648,7 @@ public function testErrorHandlerWhenLogging(bool $previousHandlerWasDefined, boo } } - public function errorHandlerWhenLoggingProvider(): iterable + public static function errorHandlerWhenLoggingProvider(): iterable { foreach ([false, true] as $previousHandlerWasDefined) { foreach ([false, true] as $loggerSetsAnotherHandler) { diff --git a/src/Symfony/Component/ErrorHandler/Tests/Exception/FlattenExceptionTest.php b/src/Symfony/Component/ErrorHandler/Tests/Exception/FlattenExceptionTest.php index 5dff13aaaa3ca..788d82eb1618e 100644 --- a/src/Symfony/Component/ErrorHandler/Tests/Exception/FlattenExceptionTest.php +++ b/src/Symfony/Component/ErrorHandler/Tests/Exception/FlattenExceptionTest.php @@ -240,7 +240,7 @@ public function testCreate() ); } - public function flattenDataProvider(): array + public static function flattenDataProvider(): array { return [ [new \Exception('test', 123), 'Exception'], @@ -248,7 +248,7 @@ public function flattenDataProvider(): array ]; } - public function stringAndIntDataProvider(): array + public static function stringAndIntDataProvider(): array { return [ [new \Exception('test1', 123)], diff --git a/src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php b/src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php index 6564d23f3220f..68db87db73bf7 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php @@ -28,7 +28,7 @@ public function testListenerDescription($listener, $expected) $this->assertStringMatchesFormat($expected, $wrappedListener->getPretty()); } - public function provideListenersToDescribe() + public static function provideListenersToDescribe() { return [ [new FooListener(), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::__invoke'], diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index cb7681498e2d4..fe5ca98a80f4f 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -1102,7 +1102,7 @@ public function testMakePathRelative($endPath, $startPath, $expectedPath) $this->assertEquals($expectedPath, $path); } - public function providePathsForMakePathRelative() + public static function providePathsForMakePathRelative() { $paths = [ ['/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component', '../'], @@ -1390,7 +1390,7 @@ public function testIsAbsolutePath($path, $expectedResult) $this->assertEquals($expectedResult, $result); } - public function providePathsForIsAbsolutePath() + public static function providePathsForIsAbsolutePath() { return [ ['/var/lib', true], diff --git a/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php b/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php index 34e7fef0933be..a0964925529a1 100644 --- a/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php +++ b/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php @@ -51,7 +51,7 @@ public function testTestSucceeds(string $operator, string $target, string $teste $this->assertTrue($c->test($testedValue)); } - public function provideMatches(): array + public static function provideMatches(): array { return [ ['<', '1000', '500'], @@ -79,7 +79,7 @@ public function testTestFails(string $operator, string $target, string $testedVa $this->assertFalse($c->test($testedValue)); } - public function provideNonMatches(): array + public static function provideNonMatches(): array { return [ ['>', '1000', '500'], diff --git a/src/Symfony/Component/Finder/Tests/GitignoreTest.php b/src/Symfony/Component/Finder/Tests/GitignoreTest.php index b05663c3e1bb0..37fcac2dc8c19 100644 --- a/src/Symfony/Component/Finder/Tests/GitignoreTest.php +++ b/src/Symfony/Component/Finder/Tests/GitignoreTest.php @@ -55,7 +55,7 @@ public function testToRegex(array $gitignoreLines, array $matchingCases, array $ } } - public function provider(): array + public static function provider(): array { $cases = [ [ @@ -392,7 +392,7 @@ public function provider(): array return $cases; } - public function providerExtended(): array + public static function providerExtended(): array { $basicCases = $this->provider(); diff --git a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php index 8c44c61eb0247..64e46a36fd634 100644 --- a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php @@ -2762,7 +2762,7 @@ public function testSubmitFormNoValidate(bool $validate) $this->assertMatchesXpath($html, $xpath); } - public function submitFormNoValidateProvider() + public static function submitFormNoValidateProvider() { return [ [false], diff --git a/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php b/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php index a1fd4285bda5c..9232829d0b483 100644 --- a/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php @@ -65,7 +65,7 @@ public function getNormalizedIniPostMaxSize(): string $this->request = null; } - public function methodExceptGetProvider() + public static function methodExceptGetProvider() { return [ ['POST'], @@ -75,7 +75,7 @@ public function methodExceptGetProvider() ]; } - public function methodProvider() + public static function methodProvider() { return array_merge([ ['GET'], diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php index de2a70efa8696..dcbe0971c634a 100644 --- a/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php +++ b/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php @@ -328,7 +328,7 @@ public function testCreateViewDifferentAttributesClosure() $this->assertEquals(new ChoiceListView(), $view2); } - public function provideSameChoices() + public static function provideSameChoices() { $object = (object) ['foo' => 'bar']; @@ -341,7 +341,7 @@ public function provideSameChoices() ]; } - public function provideDistinguishedChoices() + public static function provideDistinguishedChoices() { return [ [0, false], @@ -359,7 +359,7 @@ public function provideDistinguishedChoices() ]; } - public function provideSameKeyChoices() + public static function provideSameKeyChoices() { // Only test types here that can be used as array keys return [ @@ -370,7 +370,7 @@ public function provideSameKeyChoices() ]; } - public function provideDistinguishedKeyChoices() + public static function provideDistinguishedKeyChoices() { // Only test types here that can be used as array keys return [ diff --git a/src/Symfony/Component/Form/Tests/CompoundFormTest.php b/src/Symfony/Component/Form/Tests/CompoundFormTest.php index 5f6cc60654d62..ad16f38902057 100644 --- a/src/Symfony/Component/Form/Tests/CompoundFormTest.php +++ b/src/Symfony/Component/Form/Tests/CompoundFormTest.php @@ -572,7 +572,7 @@ public function testSubmitMapsSubmittedChildrenOntoEmptyData() $this->assertSame('Bernhard', $object['name']); } - public function requestMethodProvider() + public static function requestMethodProvider() { return [ ['POST'], diff --git a/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php b/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php index f750b420117a2..b1fc6d33ade3f 100644 --- a/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php +++ b/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php @@ -118,7 +118,7 @@ public function testAddTaggedTypeExtensions(array $extensions, array $expectedRe $this->assertEquals($expectedRegisteredExtensions, $extDefinition->getArgument(1)); } - public function addTaggedTypeExtensionsDataProvider() + public static function addTaggedTypeExtensionsDataProvider() { return [ [ @@ -240,7 +240,7 @@ public function testAddLegacyTaggedTypeExtensions(array $extensions, array $expe $this->assertEquals($expectedRegisteredExtensions, $extDefinition->getArgument(1)); } - public function addLegacyTaggedTypeExtensionsDataProvider(): array + public static function addLegacyTaggedTypeExtensionsDataProvider(): array { return [ [ @@ -351,7 +351,7 @@ public function testPrivateTaggedServices($id, $class, $tagName, callable $asser $assertion($container); } - public function privateTaggedServicesProvider() + public static function privateTaggedServicesProvider() { return [ [ diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php index 5d729eff971ec..02385d762182e 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php @@ -357,7 +357,7 @@ public function testMapFormsToDataDoesNotChangeEqualDateTimeInstance($date) $this->assertSame($publishedAtValue, $article['publishedAt']); } - public function provideDate() + public static function provideDate() { return [ [new \DateTime()], diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php index 7711fcb7f0592..5253058527516 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php @@ -36,7 +36,7 @@ protected function tearDown(): void $this->transformerWithNull = null; } - public function transformProvider() + public static function transformProvider() { return [ // more extensive test set can be found in FormUtilTest @@ -56,7 +56,7 @@ public function testTransform($in, $out, $inWithNull, $outWithNull) $this->assertSame($outWithNull, $this->transformerWithNull->transform($inWithNull)); } - public function reverseTransformProvider() + public static function reverseTransformProvider() { return [ // values are expected to be valid choice keys already and stay @@ -77,7 +77,7 @@ public function testReverseTransform($in, $out, $inWithNull, $outWithNull) $this->assertSame($outWithNull, $this->transformerWithNull->reverseTransform($inWithNull)); } - public function reverseTransformExpectsStringOrNullProvider() + public static function reverseTransformExpectsStringOrNullProvider() { return [ [0], diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformerTest.php index 7aa18d924e5d9..800120ae98daa 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformerTest.php @@ -30,7 +30,7 @@ public function testTransform(\DateTime $expectedOutput, \DateTimeImmutable $inp $this->assertEquals($expectedOutput->getTimezone(), $actualOutput->getTimezone()); } - public function provider() + public static function provider() { return [ [ diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php index 6e6e66afb1861..09ab82f34fdd8 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php @@ -20,7 +20,7 @@ class DateTimeToHtml5LocalDateTimeTransformerTest extends BaseDateTimeTransforme { use DateTimeEqualsTrait; - public function transformProvider() + public static function transformProvider() { return [ ['UTC', 'UTC', '2010-02-03 04:05:06 UTC', '2010-02-03T04:05:06'], @@ -32,7 +32,7 @@ public function transformProvider() ]; } - public function reverseTransformProvider() + public static function reverseTransformProvider() { return [ // format without seconds, as appears in some browsers diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php index 2212bcf99ef7e..3da9bc4083f63 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php @@ -52,7 +52,7 @@ protected function tearDown(): void \Locale::setDefault($this->defaultLocale); } - public function dataProvider() + public static function dataProvider() { return [ [\IntlDateFormatter::SHORT, null, null, '03.02.10, 04:05', '2010-02-03 04:05:00 UTC'], diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php index eccaa22a136f3..b89e078ba45d4 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php @@ -37,7 +37,7 @@ protected function tearDown(): void $this->dateTimeWithoutSeconds = null; } - public function allProvider() + public static function allProvider() { return [ ['UTC', 'UTC', '2010-02-03 04:05:06 UTC', '2010-02-03T04:05:06Z'], @@ -49,12 +49,12 @@ public function allProvider() ]; } - public function transformProvider() + public static function transformProvider() { return $this->allProvider(); } - public function reverseTransformProvider() + public static function reverseTransformProvider() { return array_merge($this->allProvider(), [ // format without seconds, as appears in some browsers @@ -132,7 +132,7 @@ public function testReverseTransformExpectsValidDateString($date) $transformer->reverseTransform($date); } - public function invalidDateStringProvider() + public static function invalidDateStringProvider() { return [ 'invalid month' => ['2010-2010-01'], diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php index 4bdfff1ed053b..e11d9489dc26f 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php @@ -17,7 +17,7 @@ class DateTimeToStringTransformerTest extends BaseDateTimeTransformerTest { - public function dataProvider(): array + public static function dataProvider(): array { return [ ['Y-m-d H:i:s', '2010-02-03 16:05:06', '2010-02-03 16:05:06 UTC'], diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php index 9a1774bc4bd01..b9ae392b9bd63 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php @@ -31,7 +31,7 @@ protected function tearDown(): void \Locale::setDefault($this->defaultLocale); } - public function transformWithRoundingProvider() + public static function transformWithRoundingProvider() { return [ // towards positive infinity (1.6 -> 2, -1.6 -> -1) @@ -158,7 +158,7 @@ public function testReverseTransformWithGroupingUsingLegacyConstructorSignature( $this->assertEquals(12345, $transformer->reverseTransform('12345')); } - public function reverseTransformWithRoundingProvider() + public static function reverseTransformWithRoundingProvider() { return [ // towards positive infinity (1.6 -> 2, -1.6 -> -1) @@ -262,7 +262,7 @@ public function testReverseTransformExpectsInteger($number, $locale) $transformer->reverseTransform($number); } - public function floatNumberProvider() + public static function floatNumberProvider() { return [ ['12345.912', 'en'], diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php index e4008e8d888fc..7379cac7c5697 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php @@ -31,7 +31,7 @@ protected function tearDown(): void \Locale::setDefault($this->defaultLocale); } - public function provideTransformations() + public static function provideTransformations() { return [ [null, '', 'de_AT'], @@ -59,7 +59,7 @@ public function testTransform($from, $to, $locale) $this->assertSame($to, $transformer->transform($from)); } - public function provideTransformationsWithGrouping() + public static function provideTransformationsWithGrouping() { return [ [1234.5, '1.234,5', 'de_DE'], @@ -98,7 +98,7 @@ public function testTransformWithScale() $this->assertEquals('678,92', $transformer->transform(678.916)); } - public function transformWithRoundingProvider() + public static function transformWithRoundingProvider() { return [ // towards positive infinity (1.6 -> 2, -1.6 -> -1) @@ -273,7 +273,7 @@ public function testReverseTransformWithGroupingButWithoutGroupSeparator() $this->assertEquals(12345.912, $transformer->reverseTransform('12345,912')); } - public function reverseTransformWithRoundingProvider() + public static function reverseTransformWithRoundingProvider() { return [ // towards positive infinity (1.6 -> 2, -1.6 -> -1) @@ -518,7 +518,7 @@ public function testReverseTransformDisallowsNaN($nan) $transformer->reverseTransform($nan); } - public function nanRepresentationProvider() + public static function nanRepresentationProvider() { return [ ['nan'], diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/StringToFloatTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/StringToFloatTransformerTest.php index 29b70c9bec4d8..0ffb0b0ea8941 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/StringToFloatTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/StringToFloatTransformerTest.php @@ -17,7 +17,7 @@ class StringToFloatTransformerTest extends TestCase { - public function provideTransformations(): array + public static function provideTransformations(): array { return [ [null, null], @@ -52,7 +52,7 @@ public function testFailIfTransformingANonNumericString() $transformer->transform('foobar'); } - public function provideReverseTransformations(): array + public static function provideReverseTransformations(): array { return [ [null, null], diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/WeekToArrayTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/WeekToArrayTransformerTest.php index 3f681622a8a1c..d93edcf904156 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/WeekToArrayTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/WeekToArrayTransformerTest.php @@ -43,7 +43,7 @@ public function testTransformationFailures($input, string $message) $transformer->transform($input); } - public function transformationFailuresProvider(): array + public static function transformationFailuresProvider(): array { return [ 'malformed string' => ['lorem', 'Given data does not follow the date format "Y-\WW".'], @@ -101,7 +101,7 @@ public function testReverseTransformFailures($input, string $message) $transformer->reverseTransform($input); } - public function reverseTransformationFailuresProvider(): array + public static function reverseTransformationFailuresProvider(): array { return [ 'missing year' => [['week' => 1], 'Key "year" is missing.'], diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php index 87f79439f94c7..038ca9c2ea3ab 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php @@ -34,7 +34,7 @@ public function testFixUrl($data) $this->assertSame('http://'.$data, $event->getData()); } - public function provideUrlToFix() + public static function provideUrlToFix() { return [ ['www.symfony.com'], @@ -60,7 +60,7 @@ public function testSkipUrl($url) $this->assertSame($url, $event->getData()); } - public function provideUrlToSkip() + public static function provideUrlToSkip() { return [ ['http://www.symfony.com'], diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php index 93ca921b7c650..3fb0f20709f93 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php @@ -166,7 +166,7 @@ function ($value) { $this->assertEquals($checked, $view->vars['checked']); } - public function provideCustomModelTransformerData() + public static function provideCustomModelTransformerData() { return [ ['checked', true], @@ -186,7 +186,7 @@ public function testCustomFalseValues($falseValue) $this->assertFalse($form->getData()); } - public function provideCustomFalseValues() + public static function provideCustomFalseValues() { return [ [''], diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php index ebd2dd61849bc..05e7e33e78ff1 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php @@ -2122,7 +2122,7 @@ public function testSubmitValueWithWhiteSpace($multiple, $expanded) $this->assertSame($multiple ? (array) $valueWhitWhiteSpace : $valueWhitWhiteSpace, $form->getData()); } - public function provideTrimCases() + public static function provideTrimCases() { return [ 'Simple' => [false, false], @@ -2157,7 +2157,7 @@ public function testExpandedIsEmptyWhenNoRealChoiceIsSelected($expected, $submit $this->assertSame($expected, $form->isEmpty()); } - public function expandedIsEmptyWhenNoRealChoiceIsSelectedProvider() + public static function expandedIsEmptyWhenNoRealChoiceIsSelectedProvider() { // Some invalid cases are voluntarily not tested: // - multiple with placeholder diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php index efbb47bea5014..3d2cc4247cc72 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php @@ -440,7 +440,7 @@ public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedDa $this->assertEquals($expectedData, $form->getData()); } - public function provideEmptyData() + public static function provideEmptyData() { $expectedData = new \DateInterval('P6Y4M'); diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php index db2623aac9412..c6baf70a5ed16 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php @@ -719,7 +719,7 @@ public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedDa $this->assertEquals($expectedData, $form->getData()); } - public function provideEmptyData() + public static function provideEmptyData() { $expectedData = \DateTime::createFromFormat('Y-m-d H:i', '2018-11-11 21:23'); $lazyEmptyData = static function (FormInterface $form) { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php index 74e0a8d35524f..6fc76e7100ddc 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php @@ -385,7 +385,7 @@ public function testDatePatternWithFormatOption($format, $pattern) $this->assertEquals($pattern, $view->vars['date_pattern']); } - public function provideDateFormats() + public static function provideDateFormats() { return [ ['dMy', '{{ day }}{{ month }}{{ year }}'], @@ -900,7 +900,7 @@ public function testDontPassHtml5TypeIfNotSingleText() $this->assertArrayNotHasKey('type', $view->vars); } - public function provideCompoundWidgets() + public static function provideCompoundWidgets() { return [ ['text'], @@ -1054,7 +1054,7 @@ public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedDa $this->assertEquals($expectedData, $form->getData()); } - public function provideEmptyData() + public static function provideEmptyData() { $expectedData = \DateTime::createFromFormat('Y-m-d H:i:s', '2018-11-11 00:00:00'); $lazyEmptyData = static function (FormInterface $form) { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php index 4d883908751c8..246864bdfde0d 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php @@ -58,7 +58,7 @@ public function testChoiceLoaderIsOverridden($type) $this->assertSame('lazy_b', $choices[1]->value); } - public function provideTestedTypes() + public static function provideTestedTypes() { yield [CountryTypeTest::TESTED_TYPE]; yield [CurrencyTypeTest::TESTED_TYPE]; diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php index 5ca5267430681..a8fe3f3a0425d 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php @@ -183,7 +183,7 @@ public function testSubmitNonArrayValueWhenMultiple(RequestHandlerInterface $req $this->assertSame([], $form->getViewData()); } - public function requestHandlerProvider() + public static function requestHandlerProvider() { return [ [new HttpFoundationRequestHandler()], diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php index 3f8fbe7725ffc..6a4c9de5dcf49 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php @@ -32,7 +32,7 @@ public function testSubmitNullReturnsNullWithEmptyDataAsString() $this->assertSame('', $form->getViewData()); } - public function provideZeros() + public static function provideZeros() { return [ [0, '0'], diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php index 8fa764f6f76f6..4ae3ef7bb496f 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php @@ -874,7 +874,7 @@ public function testPassPlaceholderAsPartialArrayAddNullIfRequired() $this->assertSame('Empty second', $view['second']->vars['placeholder']); } - public function provideCompoundWidgets() + public static function provideCompoundWidgets() { return [ ['text'], @@ -1101,7 +1101,7 @@ public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedDa $this->assertEquals($expectedData, $form->getData()); } - public function provideEmptyData() + public static function provideEmptyData() { $expectedData = \DateTime::createFromFormat('Y-m-d H:i', '1970-01-01 21:23'); $lazyEmptyData = static function (FormInterface $form) { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/WeekTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/WeekTypeTest.php index 7d0dc1958ba92..7993243170f1f 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/WeekTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/WeekTypeTest.php @@ -313,7 +313,7 @@ public function testSubmitNullUsesDateEmptyDataString($widget, $emptyData, $expe $this->assertSame($expectedData, $form->getData()); } - public function provideEmptyData() + public static function provideEmptyData() { return [ 'Compound text field' => ['text', ['year' => '2019', 'week' => '1'], ['year' => 2019, 'week' => 1]], diff --git a/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php b/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php index b8e2cf7bcacc6..7fcc80fee7de5 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php @@ -161,7 +161,7 @@ public function testGenerateCsrfTokenUsesTypeClassAsIntentionIfEmptyFormName() $this->assertEquals('token', $view['csrf']->vars['value']); } - public function provideBoolean() + public static function provideBoolean() { return [ [true], diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php index f6ac35517664b..257499406095e 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php @@ -78,7 +78,7 @@ public function testGuessType(Constraint $constraint, TypeGuess $guess) $this->assertEquals($guess, $this->guesser->guessType(self::TEST_CLASS, self::TEST_PROPERTY)); } - public function guessTypeProvider() + public static function guessTypeProvider() { return [ [new Type('array'), new TypeGuess(CollectionType::class, [], Guess::MEDIUM_CONFIDENCE)], @@ -97,7 +97,7 @@ public function guessTypeProvider() ]; } - public function guessRequiredProvider() + public static function guessRequiredProvider() { $allowEmptyString = property_exists(Length::class, 'allowEmptyString') ? ['allowEmptyString' => true] : []; @@ -186,7 +186,7 @@ public function testGuessMimeTypesForConstraintWithMimeTypesEmptyStringValue() $this->assertArrayNotHasKey('attr', $typeGuess->getOptions()); } - public function maxLengthTypeProvider() + public static function maxLengthTypeProvider() { return [ ['double'], diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php index 5e10aad7adc06..3b1f1763a616a 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php @@ -276,7 +276,7 @@ public function testDotRuleMappingIfNotSubmitted() $this->assertCount(1, $grandChild->getErrors(), $grandChild->getName().' should have one error'); } - public function provideDefaultTests() + public static function provideDefaultTests() { // The mapping must be deterministic! If a child has the property path "[street]", // "data[street]" should be mapped, but "data.street" should not! @@ -834,7 +834,7 @@ public function testDefaultErrorMapping($target, $childName, $childPath, $grandC } } - public function provideCustomDataErrorTests() + public static function provideCustomDataErrorTests() { return [ // mapping target, error mapping, child name, its property path, grand child name, its property path, violation path @@ -1308,7 +1308,7 @@ public function testCustomDataErrorMapping($target, $mapFrom, $mapTo, $childName } } - public function provideCustomFormErrorTests() + public static function provideCustomFormErrorTests() { // This case is different than the data errors, because here the // left side of the mapping refers to the property path of the actual @@ -1499,7 +1499,7 @@ public function testCustomFormErrorMapping($target, $mapFrom, $mapTo, $errorName } } - public function provideErrorTestsForFormInheritingParentData() + public static function provideErrorTestsForFormInheritingParentData() { return [ // mapping target, child name, its property path, grand child name, its property path, violation path diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php index 7b9dec34c28aa..eba3210abd3e5 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php @@ -19,7 +19,7 @@ */ class ViolationPathTest extends TestCase { - public function providePaths() + public static function providePaths() { return [ ['children[address]', [ @@ -107,7 +107,7 @@ public function testCreatePath($string, $entries, $slicedPath = null) } } - public function provideParents() + public static function provideParents() { return [ ['children[address]', null], diff --git a/src/Symfony/Component/Form/Tests/FormErrorIteratorTest.php b/src/Symfony/Component/Form/Tests/FormErrorIteratorTest.php index 44c304558b837..10f8766c52037 100644 --- a/src/Symfony/Component/Form/Tests/FormErrorIteratorTest.php +++ b/src/Symfony/Component/Form/Tests/FormErrorIteratorTest.php @@ -55,7 +55,7 @@ public function testFindByCodes($code, $violationsCount) $this->assertCount($violationsCount, $specificFormErrors); } - public function findByCodesProvider() + public static function findByCodesProvider() { return [ ['code1', 2], diff --git a/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php b/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php index c841f505ac0ac..ca943fed53a0b 100644 --- a/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php +++ b/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php @@ -192,7 +192,7 @@ public function testBlockPrefixDefaultsToFQCNIfNoName($typeClass, $blockPrefix) $this->assertSame($blockPrefix, $resolvedType->getBlockPrefix()); } - public function provideTypeClassBlockPrefixTuples() + public static function provideTypeClassBlockPrefixTuples() { return [ [Fixtures\FooType::class, 'foo'], diff --git a/src/Symfony/Component/Form/Tests/Resources/TranslationFilesTest.php b/src/Symfony/Component/Form/Tests/Resources/TranslationFilesTest.php index 4d59b7358321a..0859a46e4da81 100644 --- a/src/Symfony/Component/Form/Tests/Resources/TranslationFilesTest.php +++ b/src/Symfony/Component/Form/Tests/Resources/TranslationFilesTest.php @@ -46,7 +46,7 @@ public function testTranslationFileIsValidWithoutEntityLoader($filePath) $this->assertCount(0, $errors, sprintf('"%s" is invalid:%s', $filePath, \PHP_EOL.implode(\PHP_EOL, array_column($errors, 'message')))); } - public function provideTranslationFiles() + public static function provideTranslationFiles() { return array_map( function ($filePath) { return (array) $filePath; }, diff --git a/src/Symfony/Component/Form/Tests/SimpleFormTest.php b/src/Symfony/Component/Form/Tests/SimpleFormTest.php index 6d6b0a4d5ab42..579fac527c3c4 100644 --- a/src/Symfony/Component/Form/Tests/SimpleFormTest.php +++ b/src/Symfony/Component/Form/Tests/SimpleFormTest.php @@ -86,7 +86,7 @@ public function testGetPropertyPath($name, $propertyPath) $this->assertEquals($propertyPath, $form->getPropertyPath()); } - public function provideFormNames() + public static function provideFormNames() { yield [null, null]; yield ['', null]; diff --git a/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php b/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php index 3058a2e25d84d..353e3c9667285 100644 --- a/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php +++ b/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php @@ -16,7 +16,7 @@ class StringUtilTest extends TestCase { - public function trimProvider() + public static function trimProvider() { return [ [' Foo! ', 'Foo!'], @@ -49,7 +49,7 @@ public function testTrimUtf8Separators($hex) $this->assertSame("ab\ncd", StringUtil::trim($symbol)); } - public function spaceProvider() + public static function spaceProvider() { return [ // separators @@ -97,7 +97,7 @@ public function testFqcnToBlockPrefix($fqcn, $expectedBlockPrefix) $this->assertSame($expectedBlockPrefix, $blockPrefix); } - public function fqcnToBlockPrefixProvider() + public static function fqcnToBlockPrefixProvider() { return [ ['TYPE', 'type'], diff --git a/src/Symfony/Component/HttpClient/Tests/Exception/HttpExceptionTraitTest.php b/src/Symfony/Component/HttpClient/Tests/Exception/HttpExceptionTraitTest.php index f7b4ce59e9f9d..f2df403b32845 100644 --- a/src/Symfony/Component/HttpClient/Tests/Exception/HttpExceptionTraitTest.php +++ b/src/Symfony/Component/HttpClient/Tests/Exception/HttpExceptionTraitTest.php @@ -20,7 +20,7 @@ */ class HttpExceptionTraitTest extends TestCase { - public function provideParseError(): iterable + public static function provideParseError(): iterable { $errorWithoutMessage = 'HTTP/1.1 400 Bad Request returned for "http://example.com".'; diff --git a/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php b/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php index 40b099ce2cca3..6ac8e12434945 100644 --- a/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php +++ b/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php @@ -37,7 +37,7 @@ public function testPrepareRequestUrl(string $expected, string $url, array $quer $this->assertSame($expected, implode('', $url)); } - public function providePrepareRequestUrl(): iterable + public static function providePrepareRequestUrl(): iterable { yield ['http://example.com/', 'http://example.com/']; yield ['http://example.com/?a=1&b=b', '.']; @@ -57,7 +57,7 @@ public function testResolveUrl(string $base, string $url, string $expected) /** * From https://github.com/guzzle/psr7/blob/master/tests/UriResoverTest.php. */ - public function provideResolveUrl(): array + public static function provideResolveUrl(): array { return [ [self::RFC3986_BASE, 'http:h', 'http:h'], @@ -145,7 +145,7 @@ public function testParseUrl(array $expected, string $url, array $query = []) $this->assertSame($expected, self::parseUrl($url, $query)); } - public function provideParseUrl(): iterable + public static function provideParseUrl(): iterable { yield [['http:', '//example.com', null, null, null], 'http://Example.coM:80']; yield [['https:', '//xn--dj-kia8a.example.com:8000', '/', null, null], 'https://DÉjà.Example.com:8000/']; @@ -172,7 +172,7 @@ public function testRemoveDotSegments($expected, $url) $this->assertSame($expected, self::removeDotSegments($url)); } - public function provideRemoveDotSegments() + public static function provideRemoveDotSegments() { yield ['', '']; yield ['', '.']; @@ -221,7 +221,7 @@ public function testSetJSONAndBodyOptions() self::prepareRequest('POST', 'http://example.com', ['json' => ['foo' => 'bar'], 'body' => ''], HttpClientInterface::OPTIONS_DEFAULTS); } - public function providePrepareAuthBasic() + public static function providePrepareAuthBasic() { yield ['foo:bar', 'Zm9vOmJhcg==']; yield [['foo', 'bar'], 'Zm9vOmJhcg==']; @@ -238,7 +238,7 @@ public function testPrepareAuthBasic($arg, $result) $this->assertSame('Authorization: Basic '.$result, $options['normalized_headers']['authorization'][0]); } - public function provideFingerprints() + public static function provideFingerprints() { foreach (['md5', 'sha1', 'sha256'] as $algo) { $hash = hash($algo, $algo); diff --git a/src/Symfony/Component/HttpClient/Tests/HttpOptionsTest.php b/src/Symfony/Component/HttpClient/Tests/HttpOptionsTest.php index df5cb394dfec7..9dbbff7dd9364 100644 --- a/src/Symfony/Component/HttpClient/Tests/HttpOptionsTest.php +++ b/src/Symfony/Component/HttpClient/Tests/HttpOptionsTest.php @@ -19,7 +19,7 @@ */ class HttpOptionsTest extends TestCase { - public function provideSetAuthBasic(): iterable + public static function provideSetAuthBasic(): iterable { yield ['user:password', 'user', 'password']; yield ['user:password', 'user:password']; diff --git a/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php index 42accfdf7f713..3d6e51996e779 100644 --- a/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php @@ -35,7 +35,7 @@ public function testValidResponseFactory($responseFactory) $this->addToAssertionCount(1); } - public function validResponseFactoryProvider() + public static function validResponseFactoryProvider() { return [ [static function (): MockResponse { return new MockResponse(); }], @@ -58,7 +58,7 @@ public function testInvalidResponseFactory($responseFactory, string $expectedExc (new MockHttpClient($responseFactory))->request('GET', 'https://foo.bar'); } - public function invalidResponseFactoryProvider() + public static function invalidResponseFactoryProvider() { return [ [static function (): \Generator { yield new MockResponse(); }, 'The response factory passed to MockHttpClient must return/yield an instance of ResponseInterface, "Generator" given.'], diff --git a/src/Symfony/Component/HttpClient/Tests/ScopingHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/ScopingHttpClientTest.php index bfca02b3581aa..f4b7d33e3a699 100644 --- a/src/Symfony/Component/HttpClient/Tests/ScopingHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/ScopingHttpClientTest.php @@ -49,7 +49,7 @@ public function testMatchingUrls(string $regexp, string $url, array $options) $this->assertSame($options[$regexp]['case'], $requestedOptions['case']); } - public function provideMatchingUrls() + public static function provideMatchingUrls() { $defaultOptions = [ '.*/foo-bar' => ['case' => 1], diff --git a/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php b/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php index 516bd5551a0f3..7ec8c30fbc9be 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php @@ -26,7 +26,7 @@ public function testFromString($string, $value, array $attributes) $this->assertEquals($attributes, $item->getAttributes()); } - public function provideFromStringData() + public static function provideFromStringData() { return [ [ @@ -57,7 +57,7 @@ public function testToString($value, array $attributes, $string) $this->assertEquals($string, (string) $item); } - public function provideToStringData() + public static function provideToStringData() { return [ [ diff --git a/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php b/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php index 1987e97fb8bc7..bf4582430503e 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php @@ -37,7 +37,7 @@ public function testFromString($string, array $items) $this->assertEquals($items, $parsed); } - public function provideFromStringData() + public static function provideFromStringData() { return [ ['', []], @@ -57,7 +57,7 @@ public function testToString(array $items, $string) $this->assertEquals($string, (string) $header); } - public function provideToStringData() + public static function provideToStringData() { return [ [[], ''], @@ -76,7 +76,7 @@ public function testFilter($string, $filter, array $values) $this->assertEquals($values, array_keys($header->all())); } - public function provideFilterData() + public static function provideFilterData() { return [ ['fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4', '/fr.*/', ['fr-FR', 'fr']], @@ -92,7 +92,7 @@ public function testSorting($string, array $values) $this->assertEquals($values, array_keys($header->all())); } - public function provideSortingData() + public static function provideSortingData() { return [ 'quality has priority' => ['*;q=0.3,ISO-8859-1,utf-8;q=0.7', ['ISO-8859-1', 'utf-8', '*']], @@ -110,7 +110,7 @@ public function testDefaultValue($acceptHeader, $value, $expectedQuality) $this->assertSame($expectedQuality, $header->get($value)->getQuality()); } - public function provideDefaultValueData() + public static function provideDefaultValueData() { yield ['text/plain;q=0.5, text/html, text/x-dvi;q=0.8, *;q=0.3', 'text/xml', 0.3]; yield ['text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*;q=0.3', 'text/xml', 0.3]; diff --git a/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php index 7a5bd378a200c..d4b80345302e0 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php @@ -30,7 +30,7 @@ public function testUriMethods($server, $expectedRequestUri, $expectedBaseUrl, $ $this->assertEquals($expectedPathInfo, $request->getPathInfo(), '->getPathInfo() is correct'); } - public function provideServerVars() + public static function provideServerVars() { return [ [ diff --git a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php index 0539f74e9982c..56918c0f55a13 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php @@ -142,7 +142,7 @@ public function testRequestsWithoutEtag($requestRange, $offset, $length, $respon $this->assertEquals($responseRange, $response->headers->get('Content-Range')); } - public function provideRanges() + public static function provideRanges() { return [ ['bytes=1-4', 1, 4, 'bytes 1-4/35'], @@ -196,7 +196,7 @@ public function testFullFileRequests($requestRange) $this->assertEquals(200, $response->getStatusCode()); } - public function provideFullFileRanges() + public static function provideFullFileRanges() { return [ ['bytes=0-'], @@ -262,7 +262,7 @@ public function testInvalidRequests($requestRange) $this->assertEquals('bytes */35', $response->headers->get('Content-Range')); } - public function provideInvalidRanges() + public static function provideInvalidRanges() { return [ ['bytes=-40'], @@ -288,7 +288,7 @@ public function testXSendfile($file) $this->assertStringContainsString('README.md', $response->headers->get('X-Sendfile')); } - public function provideXSendfileFiles() + public static function provideXSendfileFiles() { return [ [__DIR__.'/../README.md'], diff --git a/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php index aab5f739cc06e..918ea08cca854 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php @@ -51,7 +51,7 @@ public function testMatchesWhenParentMatchesIsFalse($expression) $this->assertFalse($expressionRequestMatcher->matches($request)); } - public function provideExpressions() + public static function provideExpressions() { return [ ['request.getMethod() == method', true], diff --git a/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php b/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php index 17107b43406d0..e48505ca2701b 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php @@ -332,7 +332,7 @@ public function testIsInvalidOnUploadError($error) $this->assertFalse($file->isValid()); } - public function uploadedFileErrorProvider() + public static function uploadedFileErrorProvider() { return [ [\UPLOAD_ERR_INI_SIZE], diff --git a/src/Symfony/Component/HttpFoundation/Tests/HeaderUtilsTest.php b/src/Symfony/Component/HttpFoundation/Tests/HeaderUtilsTest.php index eb48c54464a42..bdea31e0ea527 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/HeaderUtilsTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/HeaderUtilsTest.php @@ -24,7 +24,7 @@ public function testSplit(array $expected, string $header, string $separator) $this->assertSame($expected, HeaderUtils::split($header, $separator)); } - public function provideHeaderToSplit(): array + public static function provideHeaderToSplit(): array { return [ [['foo=123', 'bar'], 'foo=123,bar', ','], @@ -111,7 +111,7 @@ public function testMakeDisposition($disposition, $filename, $filenameFallback, $this->assertEquals($expected, HeaderUtils::makeDisposition($disposition, $filename, $filenameFallback)); } - public function provideMakeDisposition() + public static function provideMakeDisposition() { return [ ['attachment', 'foo.html', 'foo.html', 'attachment; filename=foo.html'], @@ -132,7 +132,7 @@ public function testMakeDispositionFail($disposition, $filename) HeaderUtils::makeDisposition($disposition, $filename); } - public function provideMakeDispositionFail() + public static function provideMakeDispositionFail() { return [ ['attachment', 'foo%20bar.html'], diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index 060de405e58ae..f07d30412c99d 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -491,7 +491,7 @@ public function testGetFormatWithCustomMimeType() $this->assertEquals('custom', $request->getFormat('application/vnd.foo.api;myversion=2.3')); } - public function getFormatToMimeTypeMapProvider() + public static function getFormatToMimeTypeMapProvider() { return [ ['txt', ['text/plain']], @@ -1015,7 +1015,7 @@ public function testGetClientIpsForwarded($expected, $remoteAddr, $httpForwarded $this->assertEquals($expected, $request->getClientIps()); } - public function getClientIpsForwardedProvider() + public static function getClientIpsForwardedProvider() { // $expected $remoteAddr $httpForwarded $trustedProxies return [ @@ -1028,7 +1028,7 @@ public function getClientIpsForwardedProvider() ]; } - public function getClientIpsProvider() + public static function getClientIpsProvider() { // $expected $remoteAddr $httpForwardedFor $trustedProxies return [ @@ -1124,7 +1124,7 @@ public function testGetClientIpsOnlyXHttpForwardedForTrusted($httpForwarded, $ht $this->assertSame(array_reverse(explode(',', $httpXForwardedFor)), $request->getClientIps()); } - public function getClientIpsWithConflictingHeadersProvider() + public static function getClientIpsWithConflictingHeadersProvider() { // $httpForwarded $httpXForwardedFor return [ @@ -1158,7 +1158,7 @@ public function testGetClientIpsWithAgreeingHeaders($httpForwarded, $httpXForwar $this->assertSame($expectedIps, $clientIps); } - public function getClientIpsWithAgreeingHeadersProvider() + public static function getClientIpsWithAgreeingHeadersProvider() { // $httpForwarded $httpXForwardedFor return [ @@ -1207,7 +1207,7 @@ public function testContentAsResource() $this->assertEquals('My other content', $req->getContent()); } - public function getContentCantBeCalledTwiceWithResourcesProvider() + public static function getContentCantBeCalledTwiceWithResourcesProvider() { return [ 'Resource then fetch' => [true, false], @@ -1235,7 +1235,7 @@ public function testGetContentCanBeCalledTwiceWithResources($first, $second) $this->assertSame($a, $b); } - public function getContentCanBeCalledTwiceWithResourcesProvider() + public static function getContentCanBeCalledTwiceWithResourcesProvider() { return [ 'Fetch then fetch' => [false, false], @@ -1245,7 +1245,7 @@ public function getContentCanBeCalledTwiceWithResourcesProvider() ]; } - public function provideOverloadedMethods() + public static function provideOverloadedMethods() { return [ ['PUT'], @@ -2010,7 +2010,7 @@ public function testIISRequestUri($headers, $server, $expectedRequestUri) $this->assertEquals($subRequestUri, $subRequest->getRequestUri(), '->getRequestUri() is correct in sub request'); } - public function iisRequestUriProvider() + public static function iisRequestUriProvider() { return [ [ @@ -2164,7 +2164,7 @@ public function testMethodIdempotent($method, $idempotent) $this->assertEquals($idempotent, $request->isMethodIdempotent()); } - public function methodIdempotentProvider() + public static function methodIdempotentProvider() { return [ ['HEAD', true], @@ -2190,7 +2190,7 @@ public function testMethodSafe($method, $safe) $this->assertEquals($safe, $request->isMethodSafe()); } - public function methodSafeProvider() + public static function methodSafeProvider() { return [ ['HEAD', true], @@ -2216,7 +2216,7 @@ public function testMethodCacheable($method, $cacheable) $this->assertEquals($cacheable, $request->isMethodCacheable()); } - public function methodCacheableProvider() + public static function methodCacheableProvider() { return [ ['HEAD', true], @@ -2252,7 +2252,7 @@ public function testProtocolVersion($serverProtocol, $trustedProxy, $via, $expec $this->assertSame($expected, $request->getProtocolVersion()); } - public function protocolVersionProvider() + public static function protocolVersionProvider() { return [ 'untrusted with empty via' => ['HTTP/2.0', false, '', 'HTTP/2.0'], diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php index aa24291eda5dc..ed88ff5743524 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php @@ -52,7 +52,7 @@ public function testCookie($fixture) $this->assertStringMatchesFormatFile(__DIR__.sprintf('/Fixtures/response-functional/%s.expected', $fixture), $result); } - public function provideCookie() + public static function provideCookie() { foreach (glob(__DIR__.'/Fixtures/response-functional/*.php') as $file) { yield [pathinfo($file, \PATHINFO_FILENAME)]; diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php index 734961b80e88b..00a7efe033d86 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php @@ -1005,7 +1005,7 @@ public function testNoDeprecationsAreTriggered() $this->addToAssertionCount(1); } - public function validContentProvider() + public static function validContentProvider() { return [ 'obj' => [new StringableObject()], @@ -1014,7 +1014,7 @@ public function validContentProvider() ]; } - public function invalidContentProvider() + public static function invalidContentProvider() { return [ 'obj' => [new \stdClass()], @@ -1059,7 +1059,7 @@ protected function provideResponse() * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ - public function ianaCodesReasonPhrasesProvider() + public static function ianaCodesReasonPhrasesProvider() { // XML taken from https://www.iana.org/assignments/http-status-codes/http-status-codes.xml // (might not be up-to-date for older Symfony versions) diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php index 6313967afa405..273efddf16591 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php @@ -153,7 +153,7 @@ public function testClear() $this->assertEquals([], $this->bag->all()); } - public function attributesProvider() + public static function attributesProvider() { return [ ['hello', 'world', true], diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php index 3a3251d05b799..ec37d65966089 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php @@ -180,7 +180,7 @@ public function testClear() $this->assertEquals([], $this->bag->all()); } - public function attributesProvider() + public static function attributesProvider() { return [ ['hello', 'world', true], diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php index a2309508c9cd2..1e3802218c5e9 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php @@ -156,7 +156,7 @@ public function testClear($key, $value) $this->assertEquals([], $this->session->all()); } - public function setProvider() + public static function setProvider() { return [ ['foo', 'bar', ['foo' => 'bar']], diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php index aca2bfd882b20..8e42f84276e58 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php @@ -51,7 +51,7 @@ public function testSession($fixture) $this->assertStringEqualsFile(__DIR__.sprintf('/Fixtures/%s.expected', $fixture), $result); } - public function provideSession() + public static function provideSession() { foreach (glob(__DIR__.'/Fixtures/*.php') as $file) { yield [pathinfo($file, \PATHINFO_FILENAME)]; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php index ffb2e25bb8f28..fa3f838ce4c4f 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php @@ -47,7 +47,7 @@ public function testConstructSavePath($savePath, $expectedSavePath, $path) rmdir($path); } - public function savePathDataProvider() + public static function savePathDataProvider() { $base = sys_get_temp_dir(); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php index 21718c593a0f7..a9535081fb999 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php @@ -329,7 +329,7 @@ public function testUrlDsn($url, $expectedDsn, $expectedUser = null, $expectedPa } } - public function provideUrlDsnPairs() + public static function provideUrlDsnPairs() { yield ['mysql://localhost/test', 'mysql:host=localhost;dbname=test;']; yield ['mysql://localhost:56/test', 'mysql:host=localhost;port=56;dbname=test;']; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/SessionHandlerFactoryTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/SessionHandlerFactoryTest.php index dc9aee0be8fcf..d12e0752b77bf 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/SessionHandlerFactoryTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/SessionHandlerFactoryTest.php @@ -36,7 +36,7 @@ public function testCreateHandler(string $connectionDSN, string $expectedPath, s $this->assertEquals($expectedPath, \ini_get('session.save_path')); } - public function provideConnectionDSN(): array + public static function provideConnectionDSN(): array { $base = sys_get_temp_dir(); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php index a4f45fec68708..74cf9ec940431 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php @@ -170,7 +170,7 @@ public function testNativeSessionStorageSaveHandlerName($handler) $this->assertSame('files', (new NativeSessionStorage([], $handler))->getSaveHandler()->getSaveHandlerName()); } - public function provideNativeSessionStorageHandler() + public static function provideNativeSessionStorageHandler() { return [ [new \SessionHandler()], diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ErrorControllerTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ErrorControllerTest.php index 1b3a833578f4d..12b84aaf9f931 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ErrorControllerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ErrorControllerTest.php @@ -36,7 +36,7 @@ public function testInvokeController(Request $request, \Exception $exception, in self::assertStringContainsString($content, strtr($response->getContent(), ["\n" => '', ' ' => ''])); } - public function getInvokeControllerDataProvider() + public static function getInvokeControllerDataProvider() { yield 'default status code and HTML format' => [ new Request(), diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php index e81a6e5b57cb7..98672c76a453b 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php @@ -87,7 +87,7 @@ public function testControllerInspection($name, $callable, $expected) $this->assertSame($expected, $c->getController()->getValue(true), sprintf('Testing: %s', $name)); } - public function provideControllerCallables() + public static function provideControllerCallables() { // make sure we always match the line number $r1 = new \ReflectionMethod($this, 'testControllerInspection'); @@ -350,7 +350,7 @@ public function testIsJson($contentType, $expected) $this->assertSame($expected, $c->isJsonRequest()); } - public function provideJsonContentTypes() + public static function provideJsonContentTypes() { return [ ['text/csv', false], @@ -377,7 +377,7 @@ public function testGetPrettyJsonValidity($content, $expected) $this->assertSame($expected, $c->getPrettyJson()); } - public function providePrettyJson() + public static function providePrettyJson() { return [ ['null', 'null'], diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php index 0207703d94c88..83355480b7441 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php @@ -294,7 +294,7 @@ public function testBindings($bindingName) $this->assertEquals($expected, $locator->getArgument(0)); } - public function provideBindings() + public static function provideBindings() { return [ [ControllerDummy::class.'$bar'], @@ -329,7 +329,7 @@ public function testBindScalarValueToControllerArgument($bindingKey) $this->assertSame('foo_val', $locator->get('foo::fooAction')->get('someArg')); } - public function provideBindScalarValueToControllerArgument() + public static function provideBindScalarValueToControllerArgument() { yield ['$someArg']; yield ['string $someArg']; diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/DisallowRobotsIndexingListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/DisallowRobotsIndexingListenerTest.php index 4a05d65188be6..fce27facbdfde 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/DisallowRobotsIndexingListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/DisallowRobotsIndexingListenerTest.php @@ -36,7 +36,7 @@ public function testInvoke(?string $expected, array $responseArgs) $this->assertSame($expected, $response->headers->get('X-Robots-Tag'), 'Header doesn\'t match expectations'); } - public function provideResponses(): iterable + public static function provideResponses(): iterable { yield 'No header' => ['noindex', []]; diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php index 2cd1091a7f4a6..492d1c1dba785 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php @@ -97,7 +97,7 @@ public function testHandleWithLogger($event, $event2) $this->assertCount(3, $logger->getLogs('critical')); } - public function provider() + public static function provider() { if (!class_exists(Request::class)) { return [[null, null]]; @@ -181,7 +181,7 @@ public function testOnControllerArguments(callable $controller) $this->assertSame('OK: foo', $event->getResponse()->getContent()); } - public function controllerProvider() + public static function controllerProvider() { yield [function (FlattenException $exception) { return new Response('OK: '.$exception->getMessage()); diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php index 6163f5b56e4fa..ad405516a98c9 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php @@ -95,7 +95,7 @@ public function testHandleWithLogger($event, $event2) $this->assertCount(3, $logger->getLogs('critical')); } - public function provider() + public static function provider() { if (!class_exists(Request::class)) { return [[null, null]]; diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php index 70629a8fb8d8e..c8a300e6256d5 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php @@ -128,7 +128,7 @@ public function testSessionWithNewSessionIdAndNewCookieDoesNotSendAnotherCookie( $this->assertSame($expected, $response->headers->all()['set-cookie']); } - public function anotherCookieProvider() + public static function anotherCookieProvider() { return [ 'same' => ['MOCKSESSID=789; path=/', ['MOCKSESSID=789; path=/']], diff --git a/src/Symfony/Component/HttpKernel/Tests/Exception/HttpExceptionTest.php b/src/Symfony/Component/HttpKernel/Tests/Exception/HttpExceptionTest.php index feaec807fd95c..fad9e796f439b 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Exception/HttpExceptionTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Exception/HttpExceptionTest.php @@ -16,7 +16,7 @@ class HttpExceptionTest extends TestCase { - public function headerDataProvider() + public static function headerDataProvider() { return [ [['X-Test' => 'Test']], diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php index 4d56b2428583c..9a914d5866405 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php @@ -309,7 +309,7 @@ public function testCacheControlMerging(array $expects, array $master, array $su } } - public function cacheControlMergingProvider() + public static function cacheControlMergingProvider() { yield 'result is public if all responses are public' => [ ['private' => false, 'public' => true], diff --git a/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php b/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php index 5996e6e72ad35..d9b072822a352 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php @@ -82,7 +82,7 @@ public function testLogsAtAllLevels($level, $message) $this->assertLogsMatch($expected, $this->getLogs()); } - public function provideLevelsAndMessages() + public static function provideLevelsAndMessages() { return [ LogLevel::EMERGENCY => [LogLevel::EMERGENCY, 'message of level emergency with context: {user}'], diff --git a/src/Symfony/Component/Inflector/Tests/InflectorTest.php b/src/Symfony/Component/Inflector/Tests/InflectorTest.php index dec90a6ff64e1..0ae3ed29a94b7 100644 --- a/src/Symfony/Component/Inflector/Tests/InflectorTest.php +++ b/src/Symfony/Component/Inflector/Tests/InflectorTest.php @@ -16,7 +16,7 @@ class InflectorTest extends TestCase { - public function singularizeProvider() + public static function singularizeProvider() { // see http://english-zone.com/spelling/plurals.html // see http://www.scribd.com/doc/3271143/List-of-100-Irregular-Plural-Nouns-in-English @@ -165,7 +165,7 @@ public function singularizeProvider() ]; } - public function pluralizeProvider() + public static function pluralizeProvider() { // see http://english-zone.com/spelling/plurals.html // see http://www.scribd.com/doc/3271143/List-of-100-Irregular-Plural-Nouns-in-English diff --git a/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php b/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php index b2931f65e111d..d2640b12cc06f 100644 --- a/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php +++ b/src/Symfony/Component/Intl/Tests/Collator/AbstractCollatorTest.php @@ -31,7 +31,7 @@ public function testAsort($array, $sortFlag, $expected) $this->assertSame($expected, $array); } - public function asortProvider() + public static function asortProvider() { return [ /* array, sortFlag, expected */ diff --git a/src/Symfony/Component/Intl/Tests/CurrenciesTest.php b/src/Symfony/Component/Intl/Tests/CurrenciesTest.php index 7cbdeb1846c7d..b09a4717d8a7c 100644 --- a/src/Symfony/Component/Intl/Tests/CurrenciesTest.php +++ b/src/Symfony/Component/Intl/Tests/CurrenciesTest.php @@ -674,7 +674,7 @@ public function testGetSymbol($displayLocale) } } - public function provideCurrencies() + public static function provideCurrencies() { return array_map( function ($currency) { return [$currency]; }, @@ -701,7 +701,7 @@ public function testGetRoundingIncrement($currency) $this->assertIsNumeric(Currencies::getRoundingIncrement($currency)); } - public function provideCurrenciesWithNumericEquivalent() + public static function provideCurrenciesWithNumericEquivalent() { return array_map( function ($value) { return [$value]; }, @@ -717,7 +717,7 @@ public function testGetNumericCode($currency) $this->assertSame(self::ALPHA3_TO_NUMERIC[$currency], Currencies::getNumericCode($currency)); } - public function provideCurrenciesWithoutNumericEquivalent() + public static function provideCurrenciesWithoutNumericEquivalent() { return array_map( function ($value) { return [$value]; }, @@ -734,7 +734,7 @@ public function testGetNumericCodeFailsIfNoNumericEquivalent($currency) Currencies::getNumericCode($currency); } - public function provideValidNumericCodes() + public static function provideValidNumericCodes() { $numericToAlpha3 = $this->getNumericToAlpha3Mapping(); @@ -759,7 +759,7 @@ public function testForNumericCode($numeric, $expected) $this->assertSame($expected, $actual); } - public function provideInvalidNumericCodes() + public static function provideInvalidNumericCodes() { $validNumericCodes = array_keys($this->getNumericToAlpha3Mapping()); $invalidNumericCodes = array_diff(range(0, 1000), $validNumericCodes); diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php index bd1ba59f21937..267857bc78c0e 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php @@ -165,7 +165,7 @@ public function testDontFallbackIfLocaleDoesNotExistAndFallbackDisabled() $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Entries', 'Bam'], false); } - public function provideMergeableValues() + public static function provideMergeableValues() { return [ ['foo', null, 'foo'], diff --git a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php index 232e1e873c7df..257a1196bc46d 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php @@ -710,7 +710,7 @@ public function testGetSymbol($displayLocale) } } - public function provideCurrencies() + public static function provideCurrencies() { return array_map( function ($currency) { return [$currency]; }, @@ -734,7 +734,7 @@ public function testGetRoundingIncrement($currency) $this->assertIsNumeric($this->dataProvider->getRoundingIncrement($currency)); } - public function provideCurrenciesWithNumericEquivalent() + public static function provideCurrenciesWithNumericEquivalent() { return array_map( function ($value) { return [$value]; }, @@ -750,7 +750,7 @@ public function testGetNumericCode($currency) $this->assertSame(static::$alpha3ToNumeric[$currency], $this->dataProvider->getNumericCode($currency)); } - public function provideCurrenciesWithoutNumericEquivalent() + public static function provideCurrenciesWithoutNumericEquivalent() { return array_map( function ($value) { return [$value]; }, @@ -767,7 +767,7 @@ public function testGetNumericCodeFailsIfNoNumericEquivalent($currency) $this->dataProvider->getNumericCode($currency); } - public function provideValidNumericCodes() + public static function provideValidNumericCodes() { $numericToAlpha3 = $this->getNumericToAlpha3Mapping(); @@ -792,7 +792,7 @@ public function testForNumericCode($numeric, $expected) $this->assertEquals($expected, $actual); } - public function provideInvalidNumericCodes() + public static function provideInvalidNumericCodes() { $validNumericCodes = array_keys($this->getNumericToAlpha3Mapping()); $invalidNumericCodes = array_diff(range(0, 1000), $validNumericCodes); diff --git a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php index b2ff5cc986e1a..f9a39789f2a7a 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractDataProviderTest.php @@ -753,7 +753,7 @@ protected function tearDown(): void \Locale::setDefault($this->defaultLocale); } - public function provideLocales() + public static function provideLocales() { return array_map( function ($locale) { return [$locale]; }, @@ -761,7 +761,7 @@ function ($locale) { return [$locale]; }, ); } - public function provideLocaleAliases() + public static function provideLocaleAliases() { return array_map( function ($alias, $ofLocale) { return [$alias, $ofLocale]; }, @@ -770,7 +770,7 @@ function ($alias, $ofLocale) { return [$alias, $ofLocale]; }, ); } - public function provideRootLocales() + public static function provideRootLocales() { return array_map( function ($locale) { return [$locale]; }, diff --git a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php index e8685f13032af..a79b8ce7ba4d4 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php @@ -932,7 +932,7 @@ public function testGetNameDefaultLocale() } } - public function provideLanguagesWithAlpha3Equivalent() + public static function provideLanguagesWithAlpha3Equivalent() { return array_map( function ($value) { return [$value]; }, @@ -948,7 +948,7 @@ public function testGetAlpha3Code($language) $this->assertSame(static::$alpha2ToAlpha3[$language], $this->dataProvider->getAlpha3Code($language)); } - public function provideLanguagesWithoutAlpha3Equivalent() + public static function provideLanguagesWithoutAlpha3Equivalent() { return array_map( function ($value) { return [$value]; }, diff --git a/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php b/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php index d55d7efd824ae..11b9037f43ec9 100644 --- a/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php @@ -89,7 +89,7 @@ public function testFormat($pattern, $timestamp, $expected) $this->assertIsIntlSuccess($formatter, $errorMessage, $errorCode); } - public function formatProvider() + public static function formatProvider() { $dateTime = new \DateTime('@0'); $dateTimeImmutable = new \DateTimeImmutable('@0'); @@ -308,7 +308,7 @@ public function testFormatIllegalArgumentError($pattern, $timestamp, $errorMessa $this->assertIsIntlFailure($formatter, $errorMessage, $errorCode); } - public function formatErrorProvider() + public static function formatErrorProvider() { return [ ['y-M-d', 'foobar', 'datefmt_format: string \'foobar\' is not numeric, which would be required for it to be a valid date: U_ILLEGAL_ARGUMENT_ERROR'], @@ -325,7 +325,7 @@ public function testFormatWithTimezone($timestamp, $timezone, $expected) $this->assertSame($expected, $formatter->format($timestamp)); } - public function formatWithTimezoneProvider() + public static function formatWithTimezoneProvider() { $data = [ [0, 'UTC', '1970-01-01 00:00:00'], @@ -367,7 +367,7 @@ public function testFormatTimezone($pattern, $timezone, $expected) $this->assertEquals($expected, $formatter->format(0)); } - public function formatTimezoneProvider() + public static function formatTimezoneProvider() { return [ ['z', 'GMT', 'GMT'], @@ -508,7 +508,7 @@ public function testDateAndTimeType($timestamp, $datetype, $timetype, $expected) $this->assertSame($expected, $formatter->format($timestamp)); } - public function dateAndTimeTypeProvider() + public static function dateAndTimeTypeProvider() { return [ [0, IntlDateFormatter::FULL, IntlDateFormatter::NONE, 'Thursday, January 1, 1970'], @@ -565,7 +565,7 @@ public function testParse($pattern, $value, $expected) $this->assertIsIntlSuccess($formatter, $errorMessage, $errorCode); } - public function parseProvider() + public static function parseProvider() { return array_merge( $this->parseYearProvider(), @@ -590,7 +590,7 @@ public function parseProvider() ); } - public function parseYearProvider() + public static function parseYearProvider() { return [ ['y-M-d', '1970-1-1', 0], @@ -598,7 +598,7 @@ public function parseYearProvider() ]; } - public function parseQuarterProvider() + public static function parseQuarterProvider() { return [ ['Q', '1', 0], @@ -621,7 +621,7 @@ public function parseQuarterProvider() ]; } - public function parseMonthProvider() + public static function parseMonthProvider() { return [ ['y-M-d', '1970-1-1', 0], @@ -631,7 +631,7 @@ public function parseMonthProvider() ]; } - public function parseStandaloneMonthProvider() + public static function parseStandaloneMonthProvider() { return [ ['y-L-d', '1970-1-1', 0], @@ -640,7 +640,7 @@ public function parseStandaloneMonthProvider() ]; } - public function parseDayProvider() + public static function parseDayProvider() { return [ ['y-M-d', '1970-1-1', 0], @@ -650,7 +650,7 @@ public function parseDayProvider() ]; } - public function parseDayOfWeekProvider() + public static function parseDayOfWeekProvider() { return [ ['E', 'Thu', 0], @@ -662,7 +662,7 @@ public function parseDayOfWeekProvider() ]; } - public function parseDayOfYearProvider() + public static function parseDayOfYearProvider() { return [ ['D', '1', 0], @@ -670,7 +670,7 @@ public function parseDayOfYearProvider() ]; } - public function parseHour12ClockOneBasedProvider() + public static function parseHour12ClockOneBasedProvider() { return [ // 12 hours (1-12) @@ -695,7 +695,7 @@ public function parseHour12ClockOneBasedProvider() ]; } - public function parseHour12ClockZeroBasedProvider() + public static function parseHour12ClockZeroBasedProvider() { return [ // 12 hours (0-11) @@ -720,7 +720,7 @@ public function parseHour12ClockZeroBasedProvider() ]; } - public function parseHour24ClockOneBasedProvider() + public static function parseHour24ClockOneBasedProvider() { return [ // 24 hours (1-24) @@ -747,7 +747,7 @@ public function parseHour24ClockOneBasedProvider() ]; } - public function parseHour24ClockZeroBasedProvider() + public static function parseHour24ClockZeroBasedProvider() { return [ // 24 hours (0-23) @@ -774,7 +774,7 @@ public function parseHour24ClockZeroBasedProvider() ]; } - public function parseMinuteProvider() + public static function parseMinuteProvider() { return [ ['y-M-d HH:m', '1970-1-1 0:1', 60], @@ -782,7 +782,7 @@ public function parseMinuteProvider() ]; } - public function parseSecondProvider() + public static function parseSecondProvider() { return [ ['y-M-d HH:mm:s', '1970-1-1 00:01:1', 61], @@ -790,7 +790,7 @@ public function parseSecondProvider() ]; } - public function parseTimezoneProvider() + public static function parseTimezoneProvider() { return [ ['y-M-d HH:mm:ss zzzz', '1970-1-1 00:00:00 GMT-03:00', 10800], @@ -806,7 +806,7 @@ public function parseTimezoneProvider() ]; } - public function parseAmPmProvider() + public static function parseAmPmProvider() { return [ // AM/PM (already covered by hours tests) @@ -815,7 +815,7 @@ public function parseAmPmProvider() ]; } - public function parseStandaloneAmPmProvider() + public static function parseStandaloneAmPmProvider() { return [ ['a', 'AM', 0], @@ -823,7 +823,7 @@ public function parseStandaloneAmPmProvider() ]; } - public function parseRegexMetaCharsProvider() + public static function parseRegexMetaCharsProvider() { return [ // regexp meta chars in the pattern string @@ -832,7 +832,7 @@ public function parseRegexMetaCharsProvider() ]; } - public function parseQuoteCharsProvider() + public static function parseQuoteCharsProvider() { return [ ["'M'", 'M', 0], @@ -843,7 +843,7 @@ public function parseQuoteCharsProvider() ]; } - public function parseDashSlashProvider() + public static function parseDashSlashProvider() { return [ ['y-M-d', '1970/1/1', 0], @@ -866,7 +866,7 @@ public function testParseError($pattern, $value) $this->assertIsIntlFailure($formatter, $errorMessage, $errorCode); } - public function parseErrorProvider() + public static function parseErrorProvider() { return [ // 1 char month @@ -917,7 +917,7 @@ public function testSetTimeZoneId($timeZoneId, $expectedTimeZoneId) $this->assertEquals($expectedTimeZoneId, $formatter->getTimeZoneId()); } - public function setTimeZoneIdProvider() + public static function setTimeZoneIdProvider() { return [ ['UTC', 'UTC'], diff --git a/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php b/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php index fd562b4d48797..e17ea0e947f5d 100644 --- a/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php @@ -150,22 +150,22 @@ public function testFormatWithNonStandardTimezone() parent::testFormatWithNonStandardTimezone(); } - public function parseStandaloneAmPmProvider() + public static function parseStandaloneAmPmProvider() { return $this->notImplemented(parent::parseStandaloneAmPmProvider()); } - public function parseDayOfWeekProvider() + public static function parseDayOfWeekProvider() { return $this->notImplemented(parent::parseDayOfWeekProvider()); } - public function parseDayOfYearProvider() + public static function parseDayOfYearProvider() { return $this->notImplemented(parent::parseDayOfYearProvider()); } - public function parseQuarterProvider() + public static function parseQuarterProvider() { return $this->notImplemented(parent::parseQuarterProvider()); } diff --git a/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php b/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php index 2cb49ef8275b3..ca29b8c48e762 100644 --- a/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php +++ b/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php @@ -20,7 +20,7 @@ */ abstract class AbstractIntlGlobalsTest extends TestCase { - public function errorNameProvider() + public static function errorNameProvider() { return [ [-129, '[BOGUS UErrorCode]'], diff --git a/src/Symfony/Component/Intl/Tests/LanguagesTest.php b/src/Symfony/Component/Intl/Tests/LanguagesTest.php index a9e75edba9374..c3cce7c294011 100644 --- a/src/Symfony/Component/Intl/Tests/LanguagesTest.php +++ b/src/Symfony/Component/Intl/Tests/LanguagesTest.php @@ -1732,7 +1732,7 @@ public function testGetNameDefaultLocale() } } - public function provideLanguagesWithAlpha3Equivalent() + public static function provideLanguagesWithAlpha3Equivalent() { return array_map( function ($value) { return [$value]; }, @@ -1748,7 +1748,7 @@ public function testGetAlpha3Code($language) $this->assertSame(self::ALPHA2_TO_ALPHA3[$language], Languages::getAlpha3Code($language)); } - public function provideLanguagesWithoutAlpha3Equivalent() + public static function provideLanguagesWithoutAlpha3Equivalent() { return array_map( function ($value) { return [$value]; }, @@ -1782,7 +1782,7 @@ public function testGetAlpha3Codes() $this->assertSame(self::ALPHA3_CODES, Languages::getAlpha3Codes()); } - public function provideLanguagesWithAlpha2Equivalent() + public static function provideLanguagesWithAlpha2Equivalent() { return array_map( function ($value) { return [$value]; }, @@ -1798,7 +1798,7 @@ public function testGetAlpha2Code($language) $this->assertSame(self::ALPHA3_TO_ALPHA2[$language], Languages::getAlpha2Code($language)); } - public function provideLanguagesWithoutAlpha2Equivalent() + public static function provideLanguagesWithoutAlpha2Equivalent() { return array_map( function ($value) { return [$value]; }, diff --git a/src/Symfony/Component/Intl/Tests/LocaleTest.php b/src/Symfony/Component/Intl/Tests/LocaleTest.php index fce214242a47a..35db0a97a05ed 100644 --- a/src/Symfony/Component/Intl/Tests/LocaleTest.php +++ b/src/Symfony/Component/Intl/Tests/LocaleTest.php @@ -16,7 +16,7 @@ class LocaleTest extends TestCase { - public function provideGetFallbackTests() + public static function provideGetFallbackTests() { $tests = [ ['sl_Latn_IT', 'sl_Latn_IT_nedis'], diff --git a/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php b/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php index 7feb599fc5678..be27f3140e686 100644 --- a/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php @@ -32,7 +32,7 @@ public function testFormatCurrencyWithDecimalStyle($value, $currency, $expected) $this->assertEquals($expected, $formatter->formatCurrency($value, $currency)); } - public function formatCurrencyWithDecimalStyleProvider() + public static function formatCurrencyWithDecimalStyleProvider() { return [ [100, 'ALL', '100'], @@ -64,7 +64,7 @@ public function testFormatCurrencyWithCurrencyStyle($value, $currency, $expected $this->assertEquals($expected, $formatter->formatCurrency($value, $currency)); } - public function formatCurrencyWithCurrencyStyleProvider() + public static function formatCurrencyWithCurrencyStyleProvider() { return [ [100, 'ALL', "ALL\xc2\xa0100"], @@ -92,7 +92,7 @@ public function testFormatCurrencyWithCurrencyStyleCostaRicanColonsRounding($val $this->assertEquals(sprintf($expected, $symbol), $formatter->formatCurrency($value, $currency)); } - public function formatCurrencyWithCurrencyStyleCostaRicanColonsRoundingProvider() + public static function formatCurrencyWithCurrencyStyleCostaRicanColonsRoundingProvider() { return [ [100, 'CRC', 'CRC', "%s\xc2\xa0100.00"], @@ -110,7 +110,7 @@ public function testFormatCurrencyWithCurrencyStyleBrazilianRealRounding($value, $this->assertEquals(sprintf($expected, $symbol), $formatter->formatCurrency($value, $currency)); } - public function formatCurrencyWithCurrencyStyleBrazilianRealRoundingProvider() + public static function formatCurrencyWithCurrencyStyleBrazilianRealRoundingProvider() { return [ [100, 'BRL', 'R', '%s$100.00'], @@ -139,7 +139,7 @@ public function testFormatCurrencyWithCurrencyStyleSwissRounding($value, $curren $this->assertEquals(sprintf($expected, $symbol), $formatter->formatCurrency($value, $currency)); } - public function formatCurrencyWithCurrencyStyleSwissRoundingProvider() + public static function formatCurrencyWithCurrencyStyleSwissRoundingProvider() { return [ [100, 'CHF', 'CHF', "%s\xc2\xa0100.00"], @@ -194,7 +194,7 @@ public function testFormatTypeInt32($formatter, $value, $expected, $message = '' $this->assertEquals($expected, $formattedValue, $message); } - public function formatTypeInt32Provider() + public static function formatTypeInt32Provider() { $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); @@ -219,7 +219,7 @@ public function testFormatTypeInt32WithCurrencyStyle($formatter, $value, $expect $this->assertEquals($expected, $formattedValue, $message); } - public function formatTypeInt32WithCurrencyStyleProvider() + public static function formatTypeInt32WithCurrencyStyleProvider() { $formatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); @@ -244,7 +244,7 @@ public function testFormatTypeInt64($formatter, $value, $expected) $this->assertEquals($expected, $formattedValue); } - public function formatTypeInt64Provider() + public static function formatTypeInt64Provider() { $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); @@ -267,7 +267,7 @@ public function testFormatTypeInt64WithCurrencyStyle($formatter, $value, $expect $this->assertEquals($expected, $formattedValue); } - public function formatTypeInt64WithCurrencyStyleProvider() + public static function formatTypeInt64WithCurrencyStyleProvider() { $formatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); @@ -288,7 +288,7 @@ public function testFormatTypeDouble($formatter, $value, $expected) $this->assertEquals($expected, $formattedValue); } - public function formatTypeDoubleProvider() + public static function formatTypeDoubleProvider() { $formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); @@ -309,7 +309,7 @@ public function testFormatTypeDoubleWithCurrencyStyle($formatter, $value, $expec $this->assertEquals($expected, $formattedValue); } - public function formatTypeDoubleWithCurrencyStyleProvider() + public static function formatTypeDoubleWithCurrencyStyleProvider() { $formatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); @@ -347,7 +347,7 @@ public function testFormatTypeCurrencyReturn($formatter, $value) $this->assertFalse(@$formatter->format($value, NumberFormatter::TYPE_CURRENCY)); } - public function formatTypeCurrencyProvider() + public static function formatTypeCurrencyProvider() { $df = $this->getNumberFormatter('en', NumberFormatter::DECIMAL); $cf = $this->getNumberFormatter('en', NumberFormatter::CURRENCY); @@ -381,7 +381,7 @@ public function testFormatFractionDigits($value, $expected, $fractionDigits = nu } } - public function formatFractionDigitsProvider() + public static function formatFractionDigitsProvider() { yield [1.123, '1.123', null, 0]; yield [1.123, '1', 0, 0]; @@ -416,7 +416,7 @@ public function testFormatGroupingUsed($value, $expected, $groupingUsed = null, } } - public function formatGroupingUsedProvider() + public static function formatGroupingUsedProvider() { yield [1000, '1,000', null, 1]; yield [1000, '1000', 0, 0]; @@ -442,7 +442,7 @@ public function testFormatRoundingModeHalfUp($value, $expected) $this->assertSame($expected, $formatter->format($value), '->format() with ROUND_HALFUP rounding mode.'); } - public function formatRoundingModeRoundHalfUpProvider() + public static function formatRoundingModeRoundHalfUpProvider() { // The commented value is differently rounded by intl's NumberFormatter in 32 and 64 bit architectures return [ @@ -467,7 +467,7 @@ public function testFormatRoundingModeHalfDown($value, $expected) $this->assertSame($expected, $formatter->format($value), '->format() with ROUND_HALFDOWN rounding mode.'); } - public function formatRoundingModeRoundHalfDownProvider() + public static function formatRoundingModeRoundHalfDownProvider() { return [ [1.121, '1.12'], @@ -491,7 +491,7 @@ public function testFormatRoundingModeHalfEven($value, $expected) $this->assertSame($expected, $formatter->format($value), '->format() with ROUND_HALFEVEN rounding mode.'); } - public function formatRoundingModeRoundHalfEvenProvider() + public static function formatRoundingModeRoundHalfEvenProvider() { return [ [1.121, '1.12'], @@ -515,7 +515,7 @@ public function testFormatRoundingModeCeiling($value, $expected) $this->assertSame($expected, $formatter->format($value), '->format() with ROUND_CEILING rounding mode.'); } - public function formatRoundingModeRoundCeilingProvider() + public static function formatRoundingModeRoundCeilingProvider() { return [ [1.123, '1.13'], @@ -540,7 +540,7 @@ public function testFormatRoundingModeFloor($value, $expected) $this->assertSame($expected, $formatter->format($value), '->format() with ROUND_FLOOR rounding mode.'); } - public function formatRoundingModeRoundFloorProvider() + public static function formatRoundingModeRoundFloorProvider() { return [ [1.123, '1.12'], @@ -565,7 +565,7 @@ public function testFormatRoundingModeDown($value, $expected) $this->assertSame($expected, $formatter->format($value), '->format() with ROUND_DOWN rounding mode.'); } - public function formatRoundingModeRoundDownProvider() + public static function formatRoundingModeRoundDownProvider() { return [ [1.123, '1.12'], @@ -590,7 +590,7 @@ public function testFormatRoundingModeUp($value, $expected) $this->assertSame($expected, $formatter->format($value), '->format() with ROUND_UP rounding mode.'); } - public function formatRoundingModeRoundUpProvider() + public static function formatRoundingModeRoundUpProvider() { return [ [1.123, '1.13'], @@ -669,7 +669,7 @@ public function testParse($value, $expected, $message, $expectedPosition, $group $this->assertSame(0 !== $errorCode, $this->isIntlFailure($formatter->getErrorCode())); } - public function parseProvider() + public static function parseProvider() { return [ ['prefix1', false, '->parse() does not parse a number with a string prefix.', 0], @@ -735,7 +735,7 @@ public function testParseTypeInt32($value, $expected, $message = '') $this->assertSame($expected, $parsedValue, $message); } - public function parseTypeInt32Provider() + public static function parseTypeInt32Provider() { return [ ['1', 1], @@ -827,7 +827,7 @@ public function testParseTypeDouble($value, $expectedValue) $this->assertEqualsWithDelta($expectedValue, $parsedValue, 0.001); } - public function parseTypeDoubleProvider() + public static function parseTypeDoubleProvider() { return [ ['1', (float) 1], diff --git a/src/Symfony/Component/Intl/Tests/ResourceBundleTestCase.php b/src/Symfony/Component/Intl/Tests/ResourceBundleTestCase.php index 7f2ab1fb612f6..04172d8438a0a 100644 --- a/src/Symfony/Component/Intl/Tests/ResourceBundleTestCase.php +++ b/src/Symfony/Component/Intl/Tests/ResourceBundleTestCase.php @@ -745,7 +745,7 @@ protected function tearDown(): void \Locale::setDefault($this->defaultLocale); } - public function provideLocales() + public static function provideLocales() { return array_map( function ($locale) { return [$locale]; }, @@ -753,7 +753,7 @@ function ($locale) { return [$locale]; }, ); } - public function provideLocaleAliases() + public static function provideLocaleAliases() { return array_map( function ($alias, $ofLocale) { return [$alias, $ofLocale]; }, @@ -762,7 +762,7 @@ function ($alias, $ofLocale) { return [$alias, $ofLocale]; }, ); } - public function provideRootLocales() + public static function provideRootLocales() { return array_map( function ($locale) { return [$locale]; }, diff --git a/src/Symfony/Component/Intl/Tests/TimezonesTest.php b/src/Symfony/Component/Intl/Tests/TimezonesTest.php index f47af2105af12..6f0163895ffd2 100644 --- a/src/Symfony/Component/Intl/Tests/TimezonesTest.php +++ b/src/Symfony/Component/Intl/Tests/TimezonesTest.php @@ -639,7 +639,7 @@ public function testGetCountryCodeAvailability(string $timezone) } } - public function provideTimezones(): iterable + public static function provideTimezones(): iterable { return array_map(function ($timezone) { return [$timezone]; @@ -657,7 +657,7 @@ public function testForCountryCodeAvailability(string $country) $this->addToAssertionCount(1); } - public function provideCountries(): iterable + public static function provideCountries(): iterable { return array_map(function ($country) { return [$country]; diff --git a/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php b/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php index b037c33231ab5..7027874dfa368 100644 --- a/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php +++ b/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php @@ -19,7 +19,7 @@ */ class IcuVersionTest extends TestCase { - public function normalizeProvider() + public static function normalizeProvider() { return [ [null, '1', '10'], @@ -49,7 +49,7 @@ public function testNormalize($precision, $version, $result) $this->assertSame($result, IcuVersion::normalize($version, $precision)); } - public function compareProvider() + public static function compareProvider() { return [ [null, '1', '==', '1', true], diff --git a/src/Symfony/Component/Intl/Tests/Util/VersionTest.php b/src/Symfony/Component/Intl/Tests/Util/VersionTest.php index e3bb07ee5a802..b41edb0d11e02 100644 --- a/src/Symfony/Component/Intl/Tests/Util/VersionTest.php +++ b/src/Symfony/Component/Intl/Tests/Util/VersionTest.php @@ -19,7 +19,7 @@ */ class VersionTest extends TestCase { - public function normalizeProvider() + public static function normalizeProvider() { return [ [null, '1', '1'], @@ -53,7 +53,7 @@ public function testNormalize($precision, $version, $result) $this->assertSame($result, Version::normalize($version, $precision)); } - public function compareProvider() + public static function compareProvider() { return [ [null, '1', '==', '1', true], diff --git a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/EntryManagerTest.php b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/EntryManagerTest.php index 519fe9bd47337..f32daec2c5160 100644 --- a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/EntryManagerTest.php +++ b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/EntryManagerTest.php @@ -68,7 +68,7 @@ public function testMoveWithRFC4514DistinguishedName(string $dn, string $expecte $this->assertSame($expectedRdn, $cn); } - public function moveWithRFC4514DistinguishedNameProvider(): array + public static function moveWithRFC4514DistinguishedNameProvider(): array { return [ ['CN=Simple,DC=example,DC=net', 'CN=Simple'], diff --git a/src/Symfony/Component/Lock/Tests/LockTest.php b/src/Symfony/Component/Lock/Tests/LockTest.php index dd74f6d04ef43..2ee8c6b00cc8e 100644 --- a/src/Symfony/Component/Lock/Tests/LockTest.php +++ b/src/Symfony/Component/Lock/Tests/LockTest.php @@ -384,7 +384,7 @@ public function testExpirationStoreInterface($ttls, $expected) $this->assertSame($expected, $lock->isExpired()); } - public function provideExpiredDates() + public static function provideExpiredDates() { yield [[-0.1], true]; yield [[0.1, -0.1], true]; diff --git a/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php index 0562800f28cc2..a3d3bd65eab63 100644 --- a/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php @@ -96,7 +96,7 @@ public function testDsn(string $dsn, string $file = null) } } - public function provideDsn() + public static function provideDsn() { $dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache'); yield ['sqlite://localhost/'.$dbFile.'1', $dbFile.'1']; diff --git a/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php index 2e63b08eb5ad3..ffa4ef1a6e9b6 100644 --- a/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php @@ -44,7 +44,7 @@ public function testCreateConnection(string $connectionString) $this->assertInstanceOf(\Zookeeper::class, ZookeeperStore::createConnection($connectionString)); } - public function provideValidConnectionString(): iterable + public static function provideValidConnectionString(): iterable { yield 'single host' => ['zookeeper://localhost:2181']; yield 'single multiple host' => ['zookeeper://localhost:2181,localhost:2181']; diff --git a/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php b/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php index c9333e26d5055..36691b4680dee 100644 --- a/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php +++ b/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php @@ -27,7 +27,7 @@ protected function setUp(): void $this->strategy = new ConsensusStrategy(); } - public function provideMetResults() + public static function provideMetResults() { // success, failure, total, isMet yield [3, 0, 3, true]; @@ -49,7 +49,7 @@ public function provideMetResults() yield [0, 0, 2, false]; } - public function provideIndeterminate() + public static function provideIndeterminate() { // success, failure, total, canBeMet yield [3, 0, 3, true]; diff --git a/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php b/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php index 6953d3311c09e..69bb511add2ae 100644 --- a/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php +++ b/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php @@ -27,7 +27,7 @@ protected function setUp(): void $this->strategy = new UnanimousStrategy(); } - public function provideMetResults() + public static function provideMetResults() { // success, failure, total, isMet yield [3, 0, 3, true]; @@ -49,7 +49,7 @@ public function provideMetResults() yield [0, 0, 2, false]; } - public function provideIndeterminate() + public static function provideIndeterminate() { // success, failure, total, canBeMet yield [3, 0, 3, true]; diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesTransportFactoryTest.php b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesTransportFactoryTest.php index c5d61db11d5fe..cfefb618ce738 100644 --- a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesTransportFactoryTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesTransportFactoryTest.php @@ -26,7 +26,7 @@ public function getFactory(): TransportFactoryInterface return new SesTransportFactory($this->getDispatcher(), $this->getClient(), $this->getLogger()); } - public function supportsProvider(): iterable + public static function supportsProvider(): iterable { yield [ new Dsn('ses+api', 'default'), @@ -59,7 +59,7 @@ public function supportsProvider(): iterable ]; } - public function createProvider(): iterable + public static function createProvider(): iterable { $client = $this->getClient(); $dispatcher = $this->getDispatcher(); @@ -116,7 +116,7 @@ public function createProvider(): iterable ]; } - public function unsupportedSchemeProvider(): iterable + public static function unsupportedSchemeProvider(): iterable { yield [ new Dsn('ses+foo', 'default', self::USER, self::PASSWORD), @@ -124,7 +124,7 @@ public function unsupportedSchemeProvider(): iterable ]; } - public function incompleteDsnProvider(): iterable + public static function incompleteDsnProvider(): iterable { yield [new Dsn('ses+smtp', 'default', self::USER)]; diff --git a/src/Symfony/Component/Mailer/Bridge/Google/Tests/Transport/GmailTransportFactoryTest.php b/src/Symfony/Component/Mailer/Bridge/Google/Tests/Transport/GmailTransportFactoryTest.php index 33866373f405a..75e9626af70f4 100644 --- a/src/Symfony/Component/Mailer/Bridge/Google/Tests/Transport/GmailTransportFactoryTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Google/Tests/Transport/GmailTransportFactoryTest.php @@ -24,7 +24,7 @@ public function getFactory(): TransportFactoryInterface return new GmailTransportFactory($this->getDispatcher(), null, $this->getLogger()); } - public function supportsProvider(): iterable + public static function supportsProvider(): iterable { yield [ new Dsn('gmail', 'default'), @@ -47,7 +47,7 @@ public function supportsProvider(): iterable ]; } - public function createProvider(): iterable + public static function createProvider(): iterable { yield [ new Dsn('gmail', 'default', self::USER, self::PASSWORD), @@ -65,7 +65,7 @@ public function createProvider(): iterable ]; } - public function unsupportedSchemeProvider(): iterable + public static function unsupportedSchemeProvider(): iterable { yield [ new Dsn('gmail+foo', 'default', self::USER, self::PASSWORD), @@ -73,7 +73,7 @@ public function unsupportedSchemeProvider(): iterable ]; } - public function incompleteDsnProvider(): iterable + public static function incompleteDsnProvider(): iterable { yield [new Dsn('gmail+smtp', 'default', self::USER)]; diff --git a/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillTransportFactoryTest.php b/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillTransportFactoryTest.php index c905266756d52..4e8d4a9cbcde3 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillTransportFactoryTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillTransportFactoryTest.php @@ -26,7 +26,7 @@ public function getFactory(): TransportFactoryInterface return new MandrillTransportFactory($this->getDispatcher(), $this->getClient(), $this->getLogger()); } - public function supportsProvider(): iterable + public static function supportsProvider(): iterable { yield [ new Dsn('mandrill', 'default'), @@ -59,7 +59,7 @@ public function supportsProvider(): iterable ]; } - public function createProvider(): iterable + public static function createProvider(): iterable { $client = $this->getClient(); $dispatcher = $this->getDispatcher(); @@ -101,7 +101,7 @@ public function createProvider(): iterable ]; } - public function unsupportedSchemeProvider(): iterable + public static function unsupportedSchemeProvider(): iterable { yield [ new Dsn('mandrill+foo', 'default', self::USER), @@ -109,7 +109,7 @@ public function unsupportedSchemeProvider(): iterable ]; } - public function incompleteDsnProvider(): iterable + public static function incompleteDsnProvider(): iterable { yield [new Dsn('mandrill+api', 'default')]; diff --git a/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunTransportFactoryTest.php b/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunTransportFactoryTest.php index 118964995028a..c112f16a074ed 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunTransportFactoryTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunTransportFactoryTest.php @@ -26,7 +26,7 @@ public function getFactory(): TransportFactoryInterface return new MailgunTransportFactory($this->getDispatcher(), $this->getClient(), $this->getLogger()); } - public function supportsProvider(): iterable + public static function supportsProvider(): iterable { yield [ new Dsn('mailgun+api', 'default'), @@ -59,7 +59,7 @@ public function supportsProvider(): iterable ]; } - public function createProvider(): iterable + public static function createProvider(): iterable { $client = $this->getClient(); $dispatcher = $this->getDispatcher(); @@ -106,7 +106,7 @@ public function createProvider(): iterable ]; } - public function unsupportedSchemeProvider(): iterable + public static function unsupportedSchemeProvider(): iterable { yield [ new Dsn('mailgun+foo', 'default', self::USER, self::PASSWORD), @@ -114,7 +114,7 @@ public function unsupportedSchemeProvider(): iterable ]; } - public function incompleteDsnProvider(): iterable + public static function incompleteDsnProvider(): iterable { yield [new Dsn('mailgun+api', 'default', self::USER)]; diff --git a/src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkTransportFactoryTest.php b/src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkTransportFactoryTest.php index 2959cd3a4188f..cbcdff49089c7 100644 --- a/src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkTransportFactoryTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkTransportFactoryTest.php @@ -25,7 +25,7 @@ public function getFactory(): TransportFactoryInterface return new PostmarkTransportFactory($this->getDispatcher(), $this->getClient(), $this->getLogger()); } - public function supportsProvider(): iterable + public static function supportsProvider(): iterable { yield [ new Dsn('postmark+api', 'default'), @@ -53,7 +53,7 @@ public function supportsProvider(): iterable ]; } - public function createProvider(): iterable + public static function createProvider(): iterable { $dispatcher = $this->getDispatcher(); $logger = $this->getLogger(); @@ -84,7 +84,7 @@ public function createProvider(): iterable ]; } - public function unsupportedSchemeProvider(): iterable + public static function unsupportedSchemeProvider(): iterable { yield [ new Dsn('postmark+foo', 'default', self::USER), @@ -92,7 +92,7 @@ public function unsupportedSchemeProvider(): iterable ]; } - public function incompleteDsnProvider(): iterable + public static function incompleteDsnProvider(): iterable { yield [new Dsn('postmark+api', 'default')]; } diff --git a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridTransportFactoryTest.php b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridTransportFactoryTest.php index cb4f775e2a5b4..ac2b781ed3655 100644 --- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridTransportFactoryTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridTransportFactoryTest.php @@ -25,7 +25,7 @@ public function getFactory(): TransportFactoryInterface return new SendgridTransportFactory($this->getDispatcher(), $this->getClient(), $this->getLogger()); } - public function supportsProvider(): iterable + public static function supportsProvider(): iterable { yield [ new Dsn('sendgrid+api', 'default'), @@ -53,7 +53,7 @@ public function supportsProvider(): iterable ]; } - public function createProvider(): iterable + public static function createProvider(): iterable { $dispatcher = $this->getDispatcher(); $logger = $this->getLogger(); @@ -84,7 +84,7 @@ public function createProvider(): iterable ]; } - public function unsupportedSchemeProvider(): iterable + public static function unsupportedSchemeProvider(): iterable { yield [ new Dsn('sendgrid+foo', 'sendgrid', self::USER), @@ -92,7 +92,7 @@ public function unsupportedSchemeProvider(): iterable ]; } - public function incompleteDsnProvider(): iterable + public static function incompleteDsnProvider(): iterable { yield [new Dsn('sendgrid+api', 'default')]; } diff --git a/src/Symfony/Component/Mailer/Test/TransportFactoryTestCase.php b/src/Symfony/Component/Mailer/Test/TransportFactoryTestCase.php index c2426a0bf27db..460f0d185a08f 100644 --- a/src/Symfony/Component/Mailer/Test/TransportFactoryTestCase.php +++ b/src/Symfony/Component/Mailer/Test/TransportFactoryTestCase.php @@ -37,16 +37,16 @@ abstract class TransportFactoryTestCase extends TestCase abstract public function getFactory(): TransportFactoryInterface; - abstract public function supportsProvider(): iterable; + abstract public static function supportsProvider(): iterable; - abstract public function createProvider(): iterable; + abstract public static function createProvider(): iterable; - public function unsupportedSchemeProvider(): iterable + public static function unsupportedSchemeProvider(): iterable { return []; } - public function incompleteDsnProvider(): iterable + public static function incompleteDsnProvider(): iterable { return []; } diff --git a/src/Symfony/Component/Mailer/Tests/Transport/DsnTest.php b/src/Symfony/Component/Mailer/Tests/Transport/DsnTest.php index 2816333ff3981..f3c0a0bc7f804 100644 --- a/src/Symfony/Component/Mailer/Tests/Transport/DsnTest.php +++ b/src/Symfony/Component/Mailer/Tests/Transport/DsnTest.php @@ -45,7 +45,7 @@ public function testInvalidDsn(string $dsn, string $exceptionMessage) Dsn::fromString($dsn); } - public function fromStringProvider(): iterable + public static function fromStringProvider(): iterable { yield 'simple smtp without user and pass' => [ 'smtp://example.com', @@ -88,7 +88,7 @@ public function fromStringProvider(): iterable ]; } - public function invalidDsnProvider(): iterable + public static function invalidDsnProvider(): iterable { yield [ 'some://', diff --git a/src/Symfony/Component/Mailer/Tests/Transport/NullTransportFactoryTest.php b/src/Symfony/Component/Mailer/Tests/Transport/NullTransportFactoryTest.php index 9b39a6140b6c3..13a8a072e5328 100644 --- a/src/Symfony/Component/Mailer/Tests/Transport/NullTransportFactoryTest.php +++ b/src/Symfony/Component/Mailer/Tests/Transport/NullTransportFactoryTest.php @@ -24,7 +24,7 @@ public function getFactory(): TransportFactoryInterface return new NullTransportFactory($this->getDispatcher(), $this->getClient(), $this->getLogger()); } - public function supportsProvider(): iterable + public static function supportsProvider(): iterable { yield [ new Dsn('null', ''), @@ -32,7 +32,7 @@ public function supportsProvider(): iterable ]; } - public function createProvider(): iterable + public static function createProvider(): iterable { yield [ new Dsn('null', 'null'), diff --git a/src/Symfony/Component/Mailer/Tests/Transport/SendmailTransportFactoryTest.php b/src/Symfony/Component/Mailer/Tests/Transport/SendmailTransportFactoryTest.php index 1898e143d5d0e..2e230dad59c25 100644 --- a/src/Symfony/Component/Mailer/Tests/Transport/SendmailTransportFactoryTest.php +++ b/src/Symfony/Component/Mailer/Tests/Transport/SendmailTransportFactoryTest.php @@ -24,7 +24,7 @@ public function getFactory(): TransportFactoryInterface return new SendmailTransportFactory($this->getDispatcher(), $this->getClient(), $this->getLogger()); } - public function supportsProvider(): iterable + public static function supportsProvider(): iterable { yield [ new Dsn('sendmail+smtp', 'default'), @@ -32,7 +32,7 @@ public function supportsProvider(): iterable ]; } - public function createProvider(): iterable + public static function createProvider(): iterable { yield [ new Dsn('sendmail+smtp', 'default'), @@ -40,7 +40,7 @@ public function createProvider(): iterable ]; } - public function unsupportedSchemeProvider(): iterable + public static function unsupportedSchemeProvider(): iterable { yield [ new Dsn('sendmail+http', 'default'), diff --git a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/EsmtpTransportFactoryTest.php b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/EsmtpTransportFactoryTest.php index c07b0cc665924..d89646a0a348a 100644 --- a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/EsmtpTransportFactoryTest.php +++ b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/EsmtpTransportFactoryTest.php @@ -24,7 +24,7 @@ public function getFactory(): TransportFactoryInterface return new EsmtpTransportFactory($this->getDispatcher(), $this->getClient(), $this->getLogger()); } - public function supportsProvider(): iterable + public static function supportsProvider(): iterable { yield [ new Dsn('smtp', 'example.com'), @@ -42,7 +42,7 @@ public function supportsProvider(): iterable ]; } - public function createProvider(): iterable + public static function createProvider(): iterable { $eventDispatcher = $this->getDispatcher(); $logger = $this->getLogger(); diff --git a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/AbstractStreamTest.php b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/AbstractStreamTest.php index cc901ccb7ceab..aeb2834c01922 100644 --- a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/AbstractStreamTest.php +++ b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/AbstractStreamTest.php @@ -29,7 +29,7 @@ public function testReplace(string $expected, string $from, string $to, array $c $this->assertSame($expected, $result); } - public function provideReplace() + public static function provideReplace() { yield ['ca', 'ab', 'c', ['a', 'b', 'a']]; yield ['ac', 'ab', 'c', ['a', 'ab']]; diff --git a/src/Symfony/Component/Mailer/Tests/TransportTest.php b/src/Symfony/Component/Mailer/Tests/TransportTest.php index 690b0eed766fc..3ffd706cfaea0 100644 --- a/src/Symfony/Component/Mailer/Tests/TransportTest.php +++ b/src/Symfony/Component/Mailer/Tests/TransportTest.php @@ -34,7 +34,7 @@ public function testFromString(string $dsn, TransportInterface $transport) $this->assertEquals($transport, $transportFactory->fromString($dsn)); } - public function fromStringProvider(): iterable + public static function fromStringProvider(): iterable { $transportA = new DummyTransport('a'); $transportB = new DummyTransport('b'); @@ -68,7 +68,7 @@ public function testFromDsn(string $dsn, TransportInterface $transport) $this->assertEquals($transport, Transport::fromDsn($dsn)); } - public function fromDsnProvider(): iterable + public static function fromDsnProvider(): iterable { yield 'multiple transports' => [ 'failover(smtp://a smtp://b)', @@ -88,7 +88,7 @@ public function testFromWrongString(string $dsn, string $error) $transportFactory->fromString($dsn); } - public function fromWrongStringProvider(): iterable + public static function fromWrongStringProvider(): iterable { yield 'garbage at the end' => ['dummy://a some garbage here', 'The DSN has some garbage at the end: " some garbage here".']; diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMemoryLimitListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMemoryLimitListenerTest.php index 81c21a4faf95c..b39278b1be04a 100644 --- a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMemoryLimitListenerTest.php +++ b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMemoryLimitListenerTest.php @@ -36,7 +36,7 @@ public function testWorkerStopsWhenMemoryLimitExceeded(int $memoryUsage, int $me $memoryLimitListener->onWorkerRunning($event); } - public function memoryProvider(): iterable + public static function memoryProvider(): iterable { yield [2048, 1024, true]; yield [1024, 1024, false]; diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMessageLimitListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMessageLimitListenerTest.php index 7db3154f71efe..8ce9a198f08c1 100644 --- a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMessageLimitListenerTest.php +++ b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMessageLimitListenerTest.php @@ -35,7 +35,7 @@ public function testWorkerStopsWhenMaximumCountExceeded(int $max, bool $shouldSt $maximumCountListener->onWorkerRunning($event); } - public function countProvider(): iterable + public static function countProvider(): iterable { yield [1, true]; yield [2, true]; diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnRestartSignalListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnRestartSignalListenerTest.php index a9b01fbe9dddd..3b83f04268ce5 100644 --- a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnRestartSignalListenerTest.php +++ b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnRestartSignalListenerTest.php @@ -43,7 +43,7 @@ public function testWorkerStopsWhenMemoryLimitExceeded(?int $lastRestartTimeOffs $stopOnSignalListener->onWorkerRunning($event); } - public function restartTimeProvider() + public static function restartTimeProvider() { yield [null, false]; // no cached restart time, do not restart yield [+10, true]; // 10 seconds after starting, a restart was requested diff --git a/src/Symfony/Component/Messenger/Tests/Handler/HandleDescriptorTest.php b/src/Symfony/Component/Messenger/Tests/Handler/HandleDescriptorTest.php index 16ad906930c59..d2ca8126873de 100644 --- a/src/Symfony/Component/Messenger/Tests/Handler/HandleDescriptorTest.php +++ b/src/Symfony/Component/Messenger/Tests/Handler/HandleDescriptorTest.php @@ -27,7 +27,7 @@ public function testDescriptorNames(callable $handler, ?string $expectedHandlerS $this->assertStringMatchesFormat($expectedHandlerString, $descriptor->getName()); } - public function provideHandlers(): iterable + public static function provideHandlers(): iterable { yield [function () {}, 'Closure']; yield ['var_dump', 'var_dump']; diff --git a/src/Symfony/Component/Messenger/Tests/MessageBusTest.php b/src/Symfony/Component/Messenger/Tests/MessageBusTest.php index 703a47219a96f..29e5701961751 100644 --- a/src/Symfony/Component/Messenger/Tests/MessageBusTest.php +++ b/src/Symfony/Component/Messenger/Tests/MessageBusTest.php @@ -148,7 +148,7 @@ public function testItAddsTheStampsToEnvelope() $this->assertCount(2, $finalEnvelope->all()); } - public function provideConstructorDataStucture(): iterable + public static function provideConstructorDataStucture(): iterable { yield 'iterator' => [new \ArrayObject([ new SimpleMiddleware(), diff --git a/src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php b/src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php index f6e944199b947..12a902b64262e 100644 --- a/src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php +++ b/src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php @@ -61,7 +61,7 @@ public function testItAddsHandledStamps(array $handlers, array $expectedStamps, $this->assertEquals($expectedStamps, $envelope->all(HandledStamp::class)); } - public function itAddsHandledStampsProvider(): iterable + public static function itAddsHandledStampsProvider(): iterable { $first = $this->createPartialMock(HandleMessageMiddlewareTestCallable::class, ['__invoke']); $first->method('__invoke')->willReturn('first result'); diff --git a/src/Symfony/Component/Messenger/Tests/Transport/AmqpExt/ConnectionTest.php b/src/Symfony/Component/Messenger/Tests/Transport/AmqpExt/ConnectionTest.php index f75a3e7a3b243..f0176e5aceed4 100644 --- a/src/Symfony/Component/Messenger/Tests/Transport/AmqpExt/ConnectionTest.php +++ b/src/Symfony/Component/Messenger/Tests/Transport/AmqpExt/ConnectionTest.php @@ -150,7 +150,7 @@ public function testSetsParametersOnTheQueueAndExchange() $connection->publish('body'); } - public function invalidQueueArgumentsDataProvider(): iterable + public static function invalidQueueArgumentsDataProvider(): iterable { $baseDsn = 'amqp://localhost/%2f/messages'; diff --git a/src/Symfony/Component/Messenger/Tests/Transport/Doctrine/ConnectionTest.php b/src/Symfony/Component/Messenger/Tests/Transport/Doctrine/ConnectionTest.php index 98a7aec31bd66..5703619ff5ed4 100644 --- a/src/Symfony/Component/Messenger/Tests/Transport/Doctrine/ConnectionTest.php +++ b/src/Symfony/Component/Messenger/Tests/Transport/Doctrine/ConnectionTest.php @@ -188,7 +188,7 @@ public function testBuildConfiguration(string $dsn, array $options, string $expe $this->assertEquals($expectedAutoSetup, $config['auto_setup']); } - public function buildConfigurationProvider(): iterable + public static function buildConfigurationProvider(): iterable { yield 'no options' => [ 'dsn' => 'doctrine://default', @@ -395,7 +395,7 @@ public function testGeneratedSql(AbstractPlatform $platform, string $expectedSql $connection->get(); } - public function providePlatformSql(): iterable + public static function providePlatformSql(): iterable { yield 'MySQL' => [ new MySQL57Platform(), diff --git a/src/Symfony/Component/Messenger/Tests/Transport/InMemoryTransportFactoryTest.php b/src/Symfony/Component/Messenger/Tests/Transport/InMemoryTransportFactoryTest.php index 6fe95025cd583..81fcc2c984529 100644 --- a/src/Symfony/Component/Messenger/Tests/Transport/InMemoryTransportFactoryTest.php +++ b/src/Symfony/Component/Messenger/Tests/Transport/InMemoryTransportFactoryTest.php @@ -59,7 +59,7 @@ public function testResetCreatedTransports() $this->assertCount(0, $transport->get()); } - public function provideDSN(): array + public static function provideDSN(): array { return [ 'Supported' => ['in-memory://foo'], diff --git a/src/Symfony/Component/Messenger/Tests/Transport/RedisExt/ConnectionTest.php b/src/Symfony/Component/Messenger/Tests/Transport/RedisExt/ConnectionTest.php index 70b260ad63f80..2fc8bf004c2fc 100644 --- a/src/Symfony/Component/Messenger/Tests/Transport/RedisExt/ConnectionTest.php +++ b/src/Symfony/Component/Messenger/Tests/Transport/RedisExt/ConnectionTest.php @@ -129,7 +129,7 @@ public function testAuth($expected, string $dsn) Connection::fromDsn($dsn, [], $redis); } - public function provideAuthDsn(): \Generator + public static function provideAuthDsn(): \Generator { yield 'Password only' => ['password', 'redis://password@localhost/queue']; yield 'User and password' => [['user', 'password'], 'redis://user:password@localhost/queue']; diff --git a/src/Symfony/Component/Mime/Tests/AddressTest.php b/src/Symfony/Component/Mime/Tests/AddressTest.php index 476bb9c91acf4..d04586d48667b 100644 --- a/src/Symfony/Component/Mime/Tests/AddressTest.php +++ b/src/Symfony/Component/Mime/Tests/AddressTest.php @@ -74,7 +74,7 @@ public function testNameEmpty(string $name) $this->assertSame($mail, (new Address($mail, $name))->toString()); } - public function nameEmptyDataProvider(): array + public static function nameEmptyDataProvider(): array { return [[''], [' '], [" \r\n "]]; } @@ -98,7 +98,7 @@ public function testFromStringFailure() Address::fromString('Jane Doe assertEquals('some string', implode('', iterator_to_array($message->toIterable()))); } - public function provideMessages(): array + public static function provideMessages(): array { return [ 'string' => ['some string'], diff --git a/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php b/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php index b3de4ae5d54ce..d77fe8aae0796 100644 --- a/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php +++ b/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php @@ -546,7 +546,7 @@ public function testDeprecationMessages(\Closure $configureOptions, array $optio $this->assertSame($expectedCount, $count); } - public function provideDeprecationData() + public static function provideDeprecationData() { yield 'It deprecates an option with default message' => [ function (OptionsResolver $resolver) { @@ -844,7 +844,7 @@ public function testResolveFailsIfInvalidType($actualType, $allowedType, $except $this->resolver->resolve(['option' => $actualType]); } - public function provideInvalidTypes() + public static function provideInvalidTypes() { return [ [true, 'string', 'The option "option" with value true is expected to be of type "string", but is of type "boolean".'], diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php index 74c662fb9bb67..435559a2faa99 100644 --- a/src/Symfony/Component/Process/Tests/ProcessTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -301,7 +301,7 @@ public function testInvalidInput($value) $process->setInput($value); } - public function provideInvalidInputValues() + public static function provideInvalidInputValues() { return [ [[]], @@ -319,7 +319,7 @@ public function testValidInput($expected, $value) $this->assertSame($expected, $process->getInput()); } - public function provideInputValues() + public static function provideInputValues() { return [ [null, null], @@ -328,7 +328,7 @@ public function provideInputValues() ]; } - public function chainedCommandsOutputProvider() + public static function chainedCommandsOutputProvider() { if ('\\' === \DIRECTORY_SEPARATOR) { return [ @@ -422,7 +422,7 @@ public function testIncrementalOutput($getOutput, $getIncrementalOutput, $uri) fclose($h); } - public function provideIncrementalOutput() + public static function provideIncrementalOutput() { return [ ['getOutput', 'getIncrementalOutput', 'php://stdout'], @@ -957,7 +957,7 @@ public function testMethodsThatNeedARunningProcess($method) $process->{$method}(); } - public function provideMethodsThatNeedARunningProcess() + public static function provideMethodsThatNeedARunningProcess() { return [ ['getOutput'], @@ -988,7 +988,7 @@ public function testMethodsThatNeedATerminatedProcess($method) throw $e; } - public function provideMethodsThatNeedATerminatedProcess() + public static function provideMethodsThatNeedATerminatedProcess() { return [ ['hasBeenSignaled'], @@ -1093,7 +1093,7 @@ public function testGetOutputWhileDisabled($fetchMethod) $p->{$fetchMethod}(); } - public function provideOutputFetchingMethods() + public static function provideOutputFetchingMethods() { return [ ['getOutput'], @@ -1130,7 +1130,7 @@ public function testTermSignalTerminatesProcessCleanly() $this->assertTrue(true, 'A call to signal() is not expected to cause wait() to throw a RuntimeException'); } - public function responsesCodeProvider() + public static function responsesCodeProvider() { return [ // expected output / getter / code to execute @@ -1140,7 +1140,7 @@ public function responsesCodeProvider() ]; } - public function pipesCodeProvider() + public static function pipesCodeProvider() { $variations = [ 'fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);', @@ -1183,7 +1183,7 @@ public function testIncrementalOutputDoesNotRequireAnotherCall($stream, $method) $process->stop(); } - public function provideVariousIncrementals() + public static function provideVariousIncrementals() { return [ ['php://stdout', 'getIncrementalOutput'], @@ -1449,7 +1449,7 @@ public function testRawCommandLine() $this->assertSame($expected, str_replace('Standard input code', '-', $p->getOutput())); } - public function provideEscapeArgument() + public static function provideEscapeArgument() { yield ['a"b%c%']; yield ['a"b^c^']; diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php index e26ed62e7e498..5f4671294ee74 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php @@ -194,7 +194,7 @@ public function testReplaceDoesNotAllowInvalidOffsets($offset) $this->builder->replace($offset, 1, new PropertyPath('new1[new2].new3')); } - public function provideInvalidOffsets() + public static function provideInvalidOffsets() { return [ [6], diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php index 87967373e38ff..88464d23b0834 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php @@ -37,7 +37,7 @@ public function testDotCannotBePresentAtTheBeginning() new PropertyPath('.property'); } - public function providePathsContainingUnexpectedCharacters() + public static function providePathsContainingUnexpectedCharacters() { return [ ['property.'], diff --git a/src/Symfony/Component/PropertyInfo/Tests/DependencyInjection/PropertyInfoPassTest.php b/src/Symfony/Component/PropertyInfo/Tests/DependencyInjection/PropertyInfoPassTest.php index aea826e210065..a1db4822e045c 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/DependencyInjection/PropertyInfoPassTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/DependencyInjection/PropertyInfoPassTest.php @@ -42,7 +42,7 @@ public function testServicesAreOrderedAccordingToPriority($index, $tag) $this->assertEquals($expected, $definition->getArgument($index)); } - public function provideTags() + public static function provideTags() { return [ [0, 'property_info.list_extractor'], diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php index 5737fb02cd5ef..f5edd0b6676e4 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php @@ -53,7 +53,7 @@ public function testParamTagTypeIsOmitted() $this->assertNull($this->extractor->getTypes(OmittedParamTagTypeDocBlock::class, 'omittedType')); } - public function invalidTypesProvider() + public static function invalidTypesProvider() { return [ 'pub' => ['pub', null, null], @@ -83,7 +83,7 @@ public function testExtractTypesWithNoPrefixes($property, array $type = null) $this->assertEquals($type, $noPrefixExtractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property)); } - public function typesProvider() + public static function typesProvider() { return [ ['foo', null, 'Short description.', 'Long description.'], @@ -138,7 +138,7 @@ public function testExtractCollection($property, array $type = null, $shortDescr $this->testExtract($property, $type, $shortDescription, $longDescription); } - public function provideCollectionTypes() + public static function provideCollectionTypes() { return [ ['iteratorCollection', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'Iterator', true, null, new Type(Type::BUILTIN_TYPE_STRING))], null, null], @@ -169,7 +169,7 @@ public function testExtractTypesWithCustomPrefixes($property, array $type = null $this->assertEquals($type, $customExtractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property)); } - public function typesWithCustomPrefixesProvider() + public static function typesWithCustomPrefixesProvider() { return [ ['foo', null, 'Short description.', 'Long description.'], @@ -210,7 +210,7 @@ public function typesWithCustomPrefixesProvider() ]; } - public function typesWithNoPrefixesProvider() + public static function typesWithNoPrefixesProvider() { return [ ['foo', null, 'Short description.', 'Long description.'], @@ -256,7 +256,7 @@ public function testReturnNullOnEmptyDocBlock() $this->assertNull($this->extractor->getShortDescription(EmptyDocBlock::class, 'foo')); } - public function dockBlockFallbackTypesProvider() + public static function dockBlockFallbackTypesProvider() { return [ 'pub' => [ @@ -287,7 +287,7 @@ public function testPropertiesDefinedByTraits(string $property, Type $type) $this->assertEquals([$type], $this->extractor->getTypes(DummyUsingTrait::class, $property)); } - public function propertiesDefinedByTraitsProvider(): array + public static function propertiesDefinedByTraitsProvider(): array { return [ ['propertyInTraitPrimitiveType', new Type(Type::BUILTIN_TYPE_STRING)], @@ -307,7 +307,7 @@ public function testMethodsDefinedByTraits(string $property, Type $type) $this->assertEquals([$type], $this->extractor->getTypes(DummyUsingTrait::class, $property)); } - public function methodsDefinedByTraitsProvider(): array + public static function methodsDefinedByTraitsProvider(): array { return [ ['methodInTraitPrimitiveType', new Type(Type::BUILTIN_TYPE_STRING)], @@ -327,7 +327,7 @@ public function testPropertiesStaticType(string $class, string $property, Type $ $this->assertEquals([$type], $this->extractor->getTypes($class, $property)); } - public function propertiesStaticTypeProvider(): array + public static function propertiesStaticTypeProvider(): array { return [ [ParentDummy::class, 'propertyTypeStatic', new Type(Type::BUILTIN_TYPE_OBJECT, false, ParentDummy::class)], @@ -343,7 +343,7 @@ public function testPropertiesParentType(string $class, string $property, ?array $this->assertEquals($types, $this->extractor->getTypes($class, $property)); } - public function propertiesParentTypeProvider(): array + public static function propertiesParentTypeProvider(): array { return [ [ParentDummy::class, 'parentAnnotationNoParent', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'parent')]], diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php index 0d587a5f25a36..c4c9f06d3ac97 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php @@ -174,7 +174,7 @@ public function testExtractors($property, array $type = null) $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property, [])); } - public function typesProvider() + public static function typesProvider() { return [ ['a', null], @@ -201,7 +201,7 @@ public function testExtractPhp7Type(string $class, string $property, array $type $this->assertEquals($type, $this->extractor->getTypes($class, $property, [])); } - public function php7TypesProvider() + public static function php7TypesProvider() { return [ [Php7Dummy::class, 'foo', [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true)]], @@ -222,7 +222,7 @@ public function testExtractPhp71Type($property, array $type = null) $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php71Dummy', $property, [])); } - public function php71TypesProvider() + public static function php71TypesProvider() { return [ ['foo', [new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)]], @@ -243,7 +243,7 @@ public function testExtractPhp80Type($property, array $type = null) $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php80Dummy', $property, [])); } - public function php80TypesProvider() + public static function php80TypesProvider() { return [ ['foo', [new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)]], @@ -267,7 +267,7 @@ public function testExtractPhp81Type($property, array $type = null) $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php81Dummy', $property, [])); } - public function php81TypesProvider() + public static function php81TypesProvider() { return [ ['nothing', null], @@ -293,7 +293,7 @@ public function testExtractPhp82Type($property, array $type = null) $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php82Dummy', $property, [])); } - public function php82TypesProvider(): iterable + public static function php82TypesProvider(): iterable { yield ['nil', null]; yield ['false', [new Type(Type::BUILTIN_TYPE_FALSE)]]; @@ -311,7 +311,7 @@ public function testExtractWithDefaultValue($property, $type) $this->assertEquals($type, $this->extractor->getTypes(DefaultValue::class, $property, [])); } - public function defaultValueProvider() + public static function defaultValueProvider() { return [ ['defaultInt', [new Type(Type::BUILTIN_TYPE_INT, false)]], @@ -441,7 +441,7 @@ public function testExtractTypeConstructor(string $class, string $property, arra $this->assertNull($this->extractor->getTypes($class, $property, ['enable_constructor_extraction' => false])); } - public function constructorTypesProvider(): array + public static function constructorTypesProvider(): array { return [ // php71 dummy has following constructor: __construct(string $string, int $intPrivate) diff --git a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php index 8687968503af6..692fa684b7fc6 100644 --- a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php +++ b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php @@ -723,7 +723,7 @@ public function testGetRelativePath($sourcePath, $targetPath, $expectedPath) $this->assertSame($expectedPath, UrlGenerator::getRelativePath($sourcePath, $targetPath)); } - public function provideRelativePaths() + public static function provideRelativePaths() { return [ [ @@ -865,7 +865,7 @@ public function testLookRoundRequirementsInPath($expected, $path, $requirement) $this->assertSame($expected, $this->getGenerator($routes)->generate('test', ['foo' => 'a/b', 'baz' => 'c/d/e'])); } - public function provideLookAroundRequirementsInPath() + public static function provideLookAroundRequirementsInPath() { yield ['/app.php/a/b/b%28ar/c/d/e', '/{foo}/b(ar/{baz}', '.+(?=/b\\(ar/)']; yield ['/app.php/a/b/bar/c/d/e', '/{foo}/bar/{baz}', '.+(?!$)']; diff --git a/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php index c8794e10b6741..218e8179b6977 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php @@ -64,7 +64,7 @@ public function testSupportsChecksResource($resource, $expectedSupports) $this->assertSame($expectedSupports, $this->loader->supports($resource), '->supports() returns true if the resource is loadable'); } - public function provideTestSupportsChecksResource() + public static function provideTestSupportsChecksResource() { return [ ['class', true], diff --git a/src/Symfony/Component/Routing/Tests/Loader/ContainerLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/ContainerLoaderTest.php index 5f74111d1b092..6a3e4c516c6c4 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/ContainerLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/ContainerLoaderTest.php @@ -25,7 +25,7 @@ public function testSupports(bool $expected, string $type = null) $this->assertSame($expected, (new ContainerLoader(new Container()))->supports('foo', $type)); } - public function supportsProvider() + public static function supportsProvider() { return [ [true, 'service'], diff --git a/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php index 6a7284d8ff975..420ab8e8138e5 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php @@ -465,7 +465,7 @@ public function testImportRouteWithController($file) $this->assertSame('FrameworkBundle:Template:template', $route->getDefault('_controller')); } - public function provideFilesImportingRoutesWithControllers() + public static function provideFilesImportingRoutesWithControllers() { yield ['import_controller.xml']; yield ['import__controller.xml']; diff --git a/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php index 1efab54c6d209..f6ddbbd0572ff 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php @@ -167,7 +167,7 @@ public function testImportRouteWithController($file) $this->assertSame('FrameworkBundle:Template:template', $route->getDefault('_controller')); } - public function provideFilesImportingRoutesWithControllers() + public static function provideFilesImportingRoutesWithControllers() { yield ['import_controller.yml']; yield ['import__controller.yml']; diff --git a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/StaticPrefixCollectionTest.php b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/StaticPrefixCollectionTest.php index d3f4c4f0d517f..86e0d0e3e1970 100644 --- a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/StaticPrefixCollectionTest.php +++ b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/StaticPrefixCollectionTest.php @@ -34,7 +34,7 @@ public function testGrouping(array $routes, $expected) $this->assertEquals($expected, $dumped); } - public function routeProvider() + public static function routeProvider() { return [ 'Simple - not nested' => [ diff --git a/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php b/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php index de6a27a3454ec..cc01e1010820a 100644 --- a/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php +++ b/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php @@ -248,7 +248,7 @@ public function testFlushPrefixesPaths($collectionPrefix, $routePath, $expectedP $this->assertEquals($expectedPath, $collection->get('test_route')->getPath()); } - public function providePrefixTests() + public static function providePrefixTests() { $tests = []; // empty prefix is of course ok diff --git a/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php b/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php index 875c2f908a08d..6ef4390f29f7d 100644 --- a/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php +++ b/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php @@ -32,7 +32,7 @@ public function testCompile($name, $arguments, $prefix, $regex, $variables, $tok $this->assertEquals($tokens, $compiled->getTokens(), $name.' (tokens)'); } - public function provideCompileData() + public static function provideCompileData() { return [ [ @@ -199,7 +199,7 @@ public function testCompileImplicitUtf8Data($name, $arguments, $prefix, $regex, $this->assertEquals($tokens, $compiled->getTokens(), $name.' (tokens)'); } - public function provideCompileImplicitUtf8Data() + public static function provideCompileImplicitUtf8Data() { return [ [ @@ -312,7 +312,7 @@ public function testCompileWithHost($name, $arguments, $prefix, $regex, $variabl $this->assertEquals($hostTokens, $compiled->getHostTokens(), $name.' (host tokens)'); } - public function provideCompileWithHostData() + public static function provideCompileWithHostData() { return [ [ @@ -381,7 +381,7 @@ public function testRemoveCapturingGroup($regex, $requirement) $this->assertSame($regex, $route->compile()->getRegex()); } - public function provideRemoveCapturingGroup() + public static function provideRemoveCapturingGroup() { yield ['#^/(?Pa(?:b|c)(?:d|e)f)$#sD', 'a(b|c)(d|e)f']; yield ['#^/(?Pa\(b\)c)$#sD', 'a\(b\)c']; diff --git a/src/Symfony/Component/Routing/Tests/RouteTest.php b/src/Symfony/Component/Routing/Tests/RouteTest.php index 6bfbcea781837..a5955595495dd 100644 --- a/src/Symfony/Component/Routing/Tests/RouteTest.php +++ b/src/Symfony/Component/Routing/Tests/RouteTest.php @@ -331,7 +331,7 @@ public function testLocaleRequirementWithLocalizedRoutes(Route $route) $this->assertSame($expected, $route->getRequirement('_locale')); } - public function provideNonLocalizedRoutes() + public static function provideNonLocalizedRoutes() { return [ [new Route('/foo')], @@ -341,7 +341,7 @@ public function provideNonLocalizedRoutes() ]; } - public function provideLocalizedRoutes() + public static function provideLocalizedRoutes() { return [ [(new Route('/foo'))->setDefault('_locale', 'en')->setDefault('_canonical_route', 'foo')->setRequirement('_locale', 'en')], diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php index 6a997c462b45e..b880c854a097a 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php @@ -99,7 +99,7 @@ public function testAuthenticateWhenOneReturnsAuthenticationExceptionButNotAll() $this->assertSame($expected, $token); } - public function testAuthenticateReturnsTokenOfTheFirstMatchingProvider() + public static function testAuthenticateReturnsTokenOfTheFirstMatchingProvider() { $second = $this->createMock(AuthenticationProviderInterface::class); $second diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php index 05ac64f8fcbfd..926de9a1cd716 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php @@ -91,7 +91,7 @@ public function testIsGranted($decide) $this->assertSame($decide, $this->authorizationChecker->isGranted('ROLE_FOO')); } - public function isGrantedProvider() + public static function isGrantedProvider() { return [[true], [false]]; } diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php index c47e43a742ac6..f1aae933803d3 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php @@ -46,7 +46,7 @@ public function testIsAuthenticated($token, $expression, $result) $this->assertEquals($result, $expressionLanguage->evaluate($expression, $context)); } - public function provider() + public static function provider() { $roles = ['ROLE_USER', 'ROLE_ADMIN']; $user = new User('username', 'password', $roles); @@ -96,7 +96,7 @@ public function testLegacyHasRole($expression, $result, $roles = []) $this->assertEquals($result, $expressionLanguage->evaluate($expression, $context)); } - public function provideLegacyHasRole() + public static function provideLegacyHasRole() { $roles = ['ROLE_USER', 'ROLE_ADMIN']; diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php index 60b770f50a921..558254dffc3fb 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php @@ -53,7 +53,7 @@ public function testDecideLog(array $expectedLog, array $attributes, $object, ar $this->assertEquals($expectedLog, $adm->getDecisionLog()); } - public function provideObjectsAndLogs(): \Generator + public static function provideObjectsAndLogs(): \Generator { $voter1 = $this->getMockForAbstractClass(VoterInterface::class); $voter2 = $this->getMockForAbstractClass(VoterInterface::class); diff --git a/src/Symfony/Component/Security/Core/Tests/Resources/TranslationFilesTest.php b/src/Symfony/Component/Security/Core/Tests/Resources/TranslationFilesTest.php index c0607ed107930..a3fb755e39c2e 100644 --- a/src/Symfony/Component/Security/Core/Tests/Resources/TranslationFilesTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Resources/TranslationFilesTest.php @@ -45,7 +45,7 @@ public function testTranslationFileIsValidWithoutEntityLoader($filePath) $this->assertCount(0, $errors, sprintf('"%s" is invalid:%s', $filePath, \PHP_EOL.implode(\PHP_EOL, array_column($errors, 'message')))); } - public function provideTranslationFiles() + public static function provideTranslationFiles() { return array_map( function ($filePath) { return (array) $filePath; }, diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php index f3d9793c72de6..74bed8dc2d10b 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php @@ -167,7 +167,7 @@ public function testInvalidTokenInSession($token) $listener(new RequestEvent($this->createMock(HttpKernelInterface::class), $request, HttpKernelInterface::MASTER_REQUEST)); } - public function provideInvalidToken() + public static function provideInvalidToken() { return [ ['foo'], diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php index 4f1f729ac944d..315c273702545 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php @@ -64,7 +64,7 @@ public function testAuthenticationExceptionWithEntryPoint(\Exception $exception) $this->assertSame($exception, $event->getThrowable()); } - public function getAuthenticationExceptionProvider() + public static function getAuthenticationExceptionProvider() { return [ [$e = new AuthenticationException(), new HttpException(Response::HTTP_UNAUTHORIZED, '', $e, [], 0)], @@ -183,7 +183,7 @@ public function testUnregister() $this->assertEmpty($dispatcher->getListeners()); } - public function getAccessDeniedExceptionProvider() + public static function getAccessDeniedExceptionProvider() { return [ [new AccessDeniedException()], diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php index 4e86dccdd8c39..6871dd972f479 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php @@ -179,7 +179,7 @@ public function testCsrfValidationFails($invalidToken) $listener(new RequestEvent($this->createMock(HttpKernelInterface::class), $request, HttpKernelInterface::MASTER_REQUEST)); } - public function provideInvalidCsrfTokens(): array + public static function provideInvalidCsrfTokens(): array { return [ ['invalid'], diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordFormAuthenticationListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordFormAuthenticationListenerTest.php index f98551f36ad08..99a9e45aeb1e9 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordFormAuthenticationListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordFormAuthenticationListenerTest.php @@ -240,7 +240,7 @@ public function testInvalidCsrfToken($invalidToken) $listener(new RequestEvent($this->createMock(HttpKernelInterface::class), $request, HttpKernelInterface::MASTER_REQUEST)); } - public function postOnlyDataProvider(): array + public static function postOnlyDataProvider(): array { return [ [true], @@ -256,7 +256,7 @@ public function getUsernameForLength(): array ]; } - public function provideInvalidCsrfTokens(): array + public static function provideInvalidCsrfTokens(): array { return [ ['invalid'], diff --git a/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php b/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php index 4d07f0a100026..15eab12c16d85 100644 --- a/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php +++ b/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php @@ -175,7 +175,7 @@ public function testCreateRequestPassesSecurityContextAttributesToTheNewRequest( $this->assertSame('foo', $subRequest->attributes->get($attribute)); } - public function provideSecurityContextAttributes() + public static function provideSecurityContextAttributes() { return [ [Security::AUTHENTICATION_ERROR], diff --git a/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php b/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php index f517902125da0..ec00b737c0594 100644 --- a/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php +++ b/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php @@ -116,7 +116,7 @@ public function testLogout(array $options) $this->assertSame($options['httponly'], $cookie->isHttpOnly()); } - public function provideOptionsForLogout() + public static function provideOptionsForLogout() { return [ [['name' => 'foo', 'path' => '/', 'domain' => null, 'secure' => false, 'httponly' => true]], diff --git a/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php b/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php index 5ac9f300eb945..4fd4e0c9b8ea2 100644 --- a/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php +++ b/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php @@ -149,7 +149,7 @@ public function testAutoLogin($username) $this->assertEquals('foosecret', $returnedToken->getSecret()); } - public function provideUsernamesForAutoLogin() + public static function provideUsernamesForAutoLogin() { return [ ['foouser', 'Simple username'], diff --git a/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php b/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php index 95c6d2d12a3b0..a47f54c409e5c 100644 --- a/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php +++ b/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php @@ -27,7 +27,7 @@ public function testNotSetMaxDepthParameter() new MaxDepth([]); } - public function provideInvalidValues() + public static function provideInvalidValues() { return [ [''], diff --git a/src/Symfony/Component/Serializer/Tests/Annotation/SerializedNameTest.php b/src/Symfony/Component/Serializer/Tests/Annotation/SerializedNameTest.php index 8866d6ddb16db..31c8dddec3782 100644 --- a/src/Symfony/Component/Serializer/Tests/Annotation/SerializedNameTest.php +++ b/src/Symfony/Component/Serializer/Tests/Annotation/SerializedNameTest.php @@ -27,7 +27,7 @@ public function testNotSetSerializedNameParameter() new SerializedName([]); } - public function provideInvalidValues() + public static function provideInvalidValues() { return [ [''], diff --git a/src/Symfony/Component/Serializer/Tests/DeserializeNestedArrayOfObjectsTest.php b/src/Symfony/Component/Serializer/Tests/DeserializeNestedArrayOfObjectsTest.php index 1130c82de7b10..0be95e92121b1 100644 --- a/src/Symfony/Component/Serializer/Tests/DeserializeNestedArrayOfObjectsTest.php +++ b/src/Symfony/Component/Serializer/Tests/DeserializeNestedArrayOfObjectsTest.php @@ -20,7 +20,7 @@ class DeserializeNestedArrayOfObjectsTest extends TestCase { - public function provider() + public static function provider() { return [ // from property PhpDoc diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php index 9fd943211d610..200bf4e165d32 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php @@ -43,7 +43,7 @@ public function testDecode($toDecode, $expected, $context) ); } - public function decodeProvider() + public static function decodeProvider() { $stdClass = new \stdClass(); $stdClass->foo = 'bar'; diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php index 141ff43227a44..779cad6e37958 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php @@ -42,7 +42,7 @@ public function testEncode($toEncode, $expected, $context) ); } - public function encodeProvider() + public static function encodeProvider() { return [ [[], '[]', []], diff --git a/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php b/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php index d3bf3e12635a2..e4d419e454f16 100644 --- a/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php +++ b/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php @@ -44,7 +44,7 @@ public function testDenormalize($underscored, $camelCased, $useLowerCamelCase) $this->assertEquals($nameConverter->denormalize($underscored), $camelCased); } - public function attributeProvider() + public static function attributeProvider() { return [ ['coop_tilleuls', 'coopTilleuls', true], diff --git a/src/Symfony/Component/Serializer/Tests/NameConverter/MetadataAwareNameConverterTest.php b/src/Symfony/Component/Serializer/Tests/NameConverter/MetadataAwareNameConverterTest.php index 6a55f3142c11e..268ca2287f5d9 100644 --- a/src/Symfony/Component/Serializer/Tests/NameConverter/MetadataAwareNameConverterTest.php +++ b/src/Symfony/Component/Serializer/Tests/NameConverter/MetadataAwareNameConverterTest.php @@ -97,7 +97,7 @@ public function testDenormalizeWithFallback($expected, $propertyName) $this->assertEquals($expected, $nameConverter->denormalize($propertyName, SerializedNameDummy::class)); } - public function attributeProvider() + public static function attributeProvider() { return [ ['foo', 'baz'], @@ -107,7 +107,7 @@ public function attributeProvider() ]; } - public function fallbackAttributeProvider() + public static function fallbackAttributeProvider() { return [ ['foo', 'baz'], @@ -141,7 +141,7 @@ public function testDenormalizeWithGroups($expected, $propertyName, $context = [ $this->assertEquals($expected, $nameConverter->denormalize($propertyName, OtherSerializedNameDummy::class, null, $context)); } - public function attributeAndContextProvider() + public static function attributeAndContextProvider() { return [ ['buz', 'buz', ['groups' => ['a']]], diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php index 02bd050bd395b..8c55ac1ab2454 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php @@ -130,7 +130,7 @@ public function testInvalidData($uri) $this->normalizer->denormalize($uri, 'SplFileObject'); } - public function invalidUriProvider() + public static function invalidUriProvider() { return [ ['dataxbase64'], @@ -156,7 +156,7 @@ public function testValidData($uri) $this->assertInstanceOf(\SplFileObject::class, $this->normalizer->denormalize($uri, 'SplFileObject')); } - public function validUriProvider() + public static function validUriProvider() { return [ ['data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC'], diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php index ca740a4d7e89e..7a8cb924c7be5 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php @@ -97,7 +97,7 @@ public function testNormalizeUsingTimeZonePassedInContext($expected, $input, $ti ])); } - public function normalizeUsingTimeZonePassedInContextProvider() + public static function normalizeUsingTimeZonePassedInContextProvider() { yield ['2016-12-01T00:00:00+00:00', new \DateTime('2016/12/01', new \DateTimeZone('UTC')), null]; yield ['2016-12-01T00:00:00+09:00', new \DateTime('2016/12/01', new \DateTimeZone('Japan')), new \DateTimeZone('Japan')]; @@ -123,7 +123,7 @@ public function testNormalizeUsingTimeZonePassedInContextAndFormattedWithMicrose ); } - public function normalizeUsingTimeZonePassedInContextAndExpectedFormatWithMicrosecondsProvider() + public static function normalizeUsingTimeZonePassedInContextAndExpectedFormatWithMicrosecondsProvider() { yield [ '2018-12-01T18:03:06.067634', @@ -245,7 +245,7 @@ public function testDenormalizeUsingTimezonePassedInContext($input, $expected, $ $this->assertEquals($expected, $actual); } - public function denormalizeUsingTimezonePassedInContextProvider() + public static function denormalizeUsingTimezonePassedInContextProvider() { yield 'with timezone' => [ '2016/12/01 17:35:00', diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CallbacksTestTrait.php b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CallbacksTestTrait.php index db7b226c3e14b..9956c9fd1a0fe 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CallbacksTestTrait.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CallbacksTestTrait.php @@ -126,7 +126,7 @@ public function testUncallableCallbacks($callbacks) $normalizer->normalize($obj, null, ['callbacks' => $callbacks]); } - public function provideNormalizeCallbacks() + public static function provideNormalizeCallbacks() { return [ 'Change a string' => [ @@ -190,7 +190,7 @@ public function provideNormalizeCallbacks() ]; } - public function provideDenormalizeCallbacks(): array + public static function provideDenormalizeCallbacks(): array { return [ 'Change a string' => [ @@ -254,7 +254,7 @@ public function provideDenormalizeCallbacks(): array ]; } - public function providerDenormalizeCallbacksWithTypedProperty(): array + public static function providerDenormalizeCallbacksWithTypedProperty(): array { return [ 'Change a typed string' => [ @@ -284,7 +284,7 @@ public function providerDenormalizeCallbacksWithTypedProperty(): array ]; } - public function provideInvalidCallbacks() + public static function provideInvalidCallbacks() { return [ [['bar' => null]], diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CircularReferenceTestTrait.php b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CircularReferenceTestTrait.php index 1996e80e98a38..ffbddf2ab3f29 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CircularReferenceTestTrait.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/CircularReferenceTestTrait.php @@ -23,7 +23,7 @@ abstract protected function getNormalizerForCircularReference(array $defaultCont abstract protected function getSelfReferencingModel(); - public function provideUnableToNormalizeCircularReference(): array + public static function provideUnableToNormalizeCircularReference(): array { return [ [[], [], 1], diff --git a/src/Symfony/Component/Stopwatch/Tests/StopwatchPeriodTest.php b/src/Symfony/Component/Stopwatch/Tests/StopwatchPeriodTest.php index 81010a79413fd..37417ae439512 100644 --- a/src/Symfony/Component/Stopwatch/Tests/StopwatchPeriodTest.php +++ b/src/Symfony/Component/Stopwatch/Tests/StopwatchPeriodTest.php @@ -43,7 +43,7 @@ public function testGetDuration($start, $end, $useMorePrecision, $duration) $this->assertEqualsWithDelta($duration, $period->getDuration(), \PHP_FLOAT_EPSILON); } - public function provideTimeValues() + public static function provideTimeValues() { yield [0, false, 0]; yield [0, true, 0.0]; @@ -53,7 +53,7 @@ public function provideTimeValues() yield [2.71, true, 2.71]; } - public function provideDurationValues() + public static function provideDurationValues() { yield [0, 0, false, 0]; yield [0, 0, true, 0.0]; diff --git a/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php b/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php index 19a38dd236258..6c833f7342b72 100644 --- a/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php +++ b/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php @@ -40,7 +40,7 @@ public function testParse($name, $ref) $this->assertEquals($template->getLogicalName(), $name); } - public function getLogicalNameToTemplateProvider() + public static function getLogicalNameToTemplateProvider() { return [ ['/path/to/section/name.engine', new TemplateReference('/path/to/section/name.engine', 'engine')], diff --git a/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php b/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php index c1c545a67fb87..cea5f1d85b817 100644 --- a/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php +++ b/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php @@ -196,7 +196,7 @@ protected function tearDown(): void rmdir(sys_get_temp_dir().'/translation-xliff-lint-test'); } - public function provideStrictFilenames() + public static function provideStrictFilenames() { yield [false, 'messages.%locale%.xlf', 'en', false]; yield [false, 'messages.%locale%.xlf', 'es', true]; diff --git a/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php b/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php index 5a693977da6e4..ef98ccc14b575 100644 --- a/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php +++ b/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php @@ -96,7 +96,7 @@ public function testExtractionFromIndentedHeredocNowdoc() $this->assertEquals($expectedCatalogue, $catalogue->all()); } - public function resourcesProvider() + public static function resourcesProvider() { $directory = __DIR__.'/../fixtures/extractor/'; $splFiles = []; diff --git a/src/Symfony/Component/Translation/Tests/Formatter/IntlFormatterTest.php b/src/Symfony/Component/Translation/Tests/Formatter/IntlFormatterTest.php index b904c8fc76211..4bf8ed43e8389 100644 --- a/src/Symfony/Component/Translation/Tests/Formatter/IntlFormatterTest.php +++ b/src/Symfony/Component/Translation/Tests/Formatter/IntlFormatterTest.php @@ -69,7 +69,7 @@ public function testFormatWithNamedArguments() $this->assertEquals('Fabien invites Guilherme as one of the 9 people invited to his party.', $message); } - public function provideDataForFormat() + public static function provideDataForFormat() { return [ [ diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php index 482b892681b3c..35a0506fef5f6 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -461,7 +461,7 @@ public function setGroupSequenceProvider($active) /** * {@inheritdoc} */ - public function isGroupSequenceProvider() + public static function isGroupSequenceProvider() { return $this->groupSequenceProvider; } diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php b/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php index 1b6f07ac8eed8..21829221662b4 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php @@ -72,7 +72,7 @@ public function getGroupSequence(); * * @see \Symfony\Component\Validator\GroupSequenceProviderInterface */ - public function isGroupSequenceProvider(); + public static function isGroupSequenceProvider(); /** * Check if there's any metadata attached to the given named property. diff --git a/src/Symfony/Component/Validator/Tests/ConstraintValidatorTest.php b/src/Symfony/Component/Validator/Tests/ConstraintValidatorTest.php index aeaef472fb03d..128a41c067686 100644 --- a/src/Symfony/Component/Validator/Tests/ConstraintValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/ConstraintValidatorTest.php @@ -27,7 +27,7 @@ public function testFormatValue($expected, $value, $format = 0) $this->assertSame($expected, (new TestFormatValueConstraintValidator())->formatValueProxy($value, $format)); } - public function formatValueProvider() + public static function formatValueProvider() { $defaultTimezone = date_default_timezone_get(); date_default_timezone_set('Europe/Moscow'); // GMT+3 diff --git a/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php b/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php index ec57b07c8428d..8284e7eb1e5f4 100644 --- a/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php +++ b/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php @@ -146,7 +146,7 @@ public function testFindByCodes($code, $violationsCount) $this->assertCount($violationsCount, $specificErrors); } - public function findByCodesProvider() + public static function findByCodesProvider() { return [ ['code1', 2], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php b/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php index 54613f0b5f5dc..8889cad9dda90 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php @@ -69,7 +69,7 @@ protected static function addPhp5Dot5Comparisons(array $comparisons) return $result; } - public function provideInvalidConstraintOptions() + public static function provideInvalidConstraintOptions() { return [ [null], @@ -112,7 +112,7 @@ public function testValidComparisonToValue($dirtyValue, $comparisonValue) $this->assertNoViolation(); } - public function provideAllValidComparisons(): array + public static function provideAllValidComparisons(): array { // The provider runs before setUp(), so we need to manually fix // the default timezone @@ -166,9 +166,9 @@ public function testInvalidValuePath() $this->validator->validate(5, $constraint); } - abstract public function provideValidComparisons(): array; + abstract public static function provideValidComparisons(): array; - abstract public function provideValidComparisonsToPropertyPath(): array; + abstract public static function provideValidComparisonsToPropertyPath(): array; /** * @dataProvider provideAllInvalidComparisons @@ -233,7 +233,7 @@ public function testThrowsOnInvalidStringDates(AbstractComparison $constraint, $ $this->validator->validate($value, $constraint); } - public function throwsOnInvalidStringDatesProvider(): array + public static function throwsOnInvalidStringDatesProvider(): array { $constraint = $this->createConstraint([ 'value' => 'foo', @@ -273,7 +273,7 @@ public function testCompareWithNullValueAtPropertyAt($dirtyValue, $dirtyValueAsS } } - public function provideAllInvalidComparisons(): array + public static function provideAllInvalidComparisons(): array { // The provider runs before setUp(), so we need to manually fix // the default timezone @@ -286,9 +286,9 @@ public function provideAllInvalidComparisons(): array return $comparisons; } - abstract public function provideInvalidComparisons(): array; + abstract public static function provideInvalidComparisons(): array; - abstract public function provideComparisonsToNullValueAtPropertyPath(); + abstract public static function provideComparisonsToNullValueAtPropertyPath(); /** * @param array|null $options Options for the constraint diff --git a/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php index 7667ab57e108d..7e695a8ab1c13 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php @@ -39,7 +39,7 @@ protected function getErrorCode(): ?string /** * {@inheritdoc} */ - public function provideValidComparisons(): array + public static function provideValidComparisons(): array { return [ [-7, 1], @@ -56,7 +56,7 @@ public function provideValidComparisons(): array /** * {@inheritdoc} */ - public function provideValidComparisonsToPropertyPath(): array + public static function provideValidComparisonsToPropertyPath(): array { return [ [25], @@ -66,7 +66,7 @@ public function provideValidComparisonsToPropertyPath(): array /** * {@inheritdoc} */ - public function provideInvalidComparisons(): array + public static function provideInvalidComparisons(): array { return [ [1, '1', 2, '2', 'integer'], @@ -91,7 +91,7 @@ public function testThrowsOnNonNumericValues(string $expectedGivenType, $value, ])); } - public function throwsOnNonNumericValuesProvider() + public static function throwsOnNonNumericValuesProvider() { return [ [\stdClass::class, 2, new \stdClass()], @@ -99,7 +99,7 @@ public function throwsOnNonNumericValuesProvider() ]; } - public function provideComparisonsToNullValueAtPropertyPath() + public static function provideComparisonsToNullValueAtPropertyPath() { $this->markTestSkipped('DivisibleByValidator rejects null values.'); } diff --git a/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php index d21b400b0fc72..5a7a02861652a 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php @@ -411,7 +411,7 @@ public function testEmptyHostIsNotValid($checkType, $violation) ->assertRaised(); } - public function provideCheckTypes() + public static function provideCheckTypes() { return [ ['checkMX', Email::MX_CHECK_FAILED_ERROR], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php index 70832fc04b136..f80e1f0b86a5a 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php @@ -38,7 +38,7 @@ protected function getErrorCode(): ?string /** * {@inheritdoc} */ - public function provideValidComparisons(): array + public static function provideValidComparisons(): array { return [ [3, 3], @@ -55,7 +55,7 @@ public function provideValidComparisons(): array /** * {@inheritdoc} */ - public function provideValidComparisonsToPropertyPath(): array + public static function provideValidComparisonsToPropertyPath(): array { return [ [5], @@ -65,7 +65,7 @@ public function provideValidComparisonsToPropertyPath(): array /** * {@inheritdoc} */ - public function provideInvalidComparisons(): array + public static function provideInvalidComparisons(): array { return [ [1, '1', 2, '2', 'integer'], @@ -77,7 +77,7 @@ public function provideInvalidComparisons(): array ]; } - public function provideComparisonsToNullValueAtPropertyPath() + public static function provideComparisonsToNullValueAtPropertyPath() { return [ [5, '5', false], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php b/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php index 45b5ee6342348..6a3f1c9a71930 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php @@ -84,7 +84,7 @@ public function testInvalidMaxSize($maxSize) new File(['maxSize' => $maxSize]); } - public function provideValidSizes() + public static function provideValidSizes() { return [ ['500', 500, false], @@ -104,7 +104,7 @@ public function provideValidSizes() ]; } - public function provideInvalidSizes() + public static function provideInvalidSizes() { return [ ['+100'], @@ -124,7 +124,7 @@ public function testBinaryFormat($maxSize, $guessedFormat, $binaryFormat) $this->assertSame($binaryFormat, $file->binaryFormat); } - public function provideFormats() + public static function provideFormats() { return [ [100, null, false], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php index 5e98ef64313a4..df43b92b6866a 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php @@ -90,7 +90,7 @@ public function testValidUploadedfile() $this->assertNoViolation(); } - public function provideMaxSizeExceededTests() + public static function provideMaxSizeExceededTests() { // We have various interesting limit - size combinations to test. // Assume a limit of 1000 bytes (1 kB). Then the following table @@ -182,7 +182,7 @@ public function testMaxSizeExceeded($bytesWritten, $limit, $sizeAsString, $limit ->assertRaised(); } - public function provideMaxSizeNotExceededTests() + public static function provideMaxSizeNotExceededTests() { return [ // 0 has no effect @@ -237,7 +237,7 @@ public function testInvalidMaxSize() $this->validator->validate($this->path, $constraint); } - public function provideBinaryFormatTests() + public static function provideBinaryFormatTests() { return [ [11, 10, null, '11', '10', 'bytes'], @@ -433,7 +433,7 @@ public function testUploadedFileError($error, $message, array $params = [], $max ->assertRaised(); } - public function uploadedFileErrorProvider() + public static function uploadedFileErrorProvider() { $tests = [ [(string) \UPLOAD_ERR_FORM_SIZE, 'uploadFormSizeErrorMessage'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php index 44924c2767674..a96565eb008de 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php @@ -38,7 +38,7 @@ protected function getErrorCode(): ?string /** * {@inheritdoc} */ - public function provideValidComparisons(): array + public static function provideValidComparisons(): array { return [ [3, 2], @@ -58,7 +58,7 @@ public function provideValidComparisons(): array /** * {@inheritdoc} */ - public function provideValidComparisonsToPropertyPath(): array + public static function provideValidComparisonsToPropertyPath(): array { return [ [5], @@ -69,7 +69,7 @@ public function provideValidComparisonsToPropertyPath(): array /** * {@inheritdoc} */ - public function provideInvalidComparisons(): array + public static function provideInvalidComparisons(): array { return [ [1, '1', 2, '2', 'integer'], @@ -80,7 +80,7 @@ public function provideInvalidComparisons(): array ]; } - public function provideComparisonsToNullValueAtPropertyPath() + public static function provideComparisonsToNullValueAtPropertyPath() { return [ [5, '5', true], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php index 15f92b128b349..1f1c821d155c6 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php @@ -29,7 +29,7 @@ protected function createConstraint(array $options = null): Constraint /** * {@inheritdoc} */ - public function provideValidComparisons(): array + public static function provideValidComparisons(): array { return [ [0, 0], @@ -45,7 +45,7 @@ public function provideValidComparisons(): array /** * {@inheritdoc} */ - public function provideInvalidComparisons(): array + public static function provideInvalidComparisons(): array { return [ [-1, '-1', 0, '0', 'integer'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php index eef12d5570bd1..65bcae66573a6 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php @@ -38,7 +38,7 @@ protected function getErrorCode(): ?string /** * {@inheritdoc} */ - public function provideValidComparisons(): array + public static function provideValidComparisons(): array { return [ [2, 1], @@ -54,7 +54,7 @@ public function provideValidComparisons(): array /** * {@inheritdoc} */ - public function provideValidComparisonsToPropertyPath(): array + public static function provideValidComparisonsToPropertyPath(): array { return [ [6], @@ -64,7 +64,7 @@ public function provideValidComparisonsToPropertyPath(): array /** * {@inheritdoc} */ - public function provideInvalidComparisons(): array + public static function provideInvalidComparisons(): array { return [ [1, '1', 2, '2', 'integer'], @@ -82,7 +82,7 @@ public function provideInvalidComparisons(): array ]; } - public function provideComparisonsToNullValueAtPropertyPath() + public static function provideComparisonsToNullValueAtPropertyPath() { return [ [5, '5', true], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.php b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.php index f3855343a24e6..3b3020fce1ebe 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.php @@ -29,7 +29,7 @@ protected function createConstraint(array $options = null): Constraint /** * {@inheritdoc} */ - public function provideValidComparisons(): array + public static function provideValidComparisons(): array { return [ [2, 0], @@ -42,7 +42,7 @@ public function provideValidComparisons(): array /** * {@inheritdoc} */ - public function provideInvalidComparisons(): array + public static function provideInvalidComparisons(): array { return [ [0, '0', 0, '0', 'integer'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php index e7856a8b99af2..f96dd3e634c21 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php @@ -35,7 +35,7 @@ protected function getErrorCode(): ?string return IdenticalTo::NOT_IDENTICAL_ERROR; } - public function provideAllValidComparisons(): array + public static function provideAllValidComparisons(): array { $this->setDefaultTimezone('UTC'); @@ -51,7 +51,7 @@ public function provideAllValidComparisons(): array /** * {@inheritdoc} */ - public function provideValidComparisons(): array + public static function provideValidComparisons(): array { $date = new \DateTime('2000-01-01'); $object = new ComparisonTest_Class(2); @@ -73,7 +73,7 @@ public function provideValidComparisons(): array /** * {@inheritdoc} */ - public function provideValidComparisonsToPropertyPath(): array + public static function provideValidComparisonsToPropertyPath(): array { return [ [5], @@ -83,7 +83,7 @@ public function provideValidComparisonsToPropertyPath(): array /** * {@inheritdoc} */ - public function provideInvalidComparisons(): array + public static function provideInvalidComparisons(): array { return [ [1, '1', 2, '2', 'integer'], @@ -95,7 +95,7 @@ public function provideInvalidComparisons(): array ]; } - public function provideComparisonsToNullValueAtPropertyPath() + public static function provideComparisonsToNullValueAtPropertyPath() { return [ [5, '5', false], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php index ab05e3ca64c02..ae18728be323e 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php @@ -38,7 +38,7 @@ protected function getErrorCode(): ?string /** * {@inheritdoc} */ - public function provideValidComparisons(): array + public static function provideValidComparisons(): array { return [ [1, 2], @@ -60,7 +60,7 @@ public function provideValidComparisons(): array /** * {@inheritdoc} */ - public function provideValidComparisonsToPropertyPath(): array + public static function provideValidComparisonsToPropertyPath(): array { return [ [4], @@ -71,7 +71,7 @@ public function provideValidComparisonsToPropertyPath(): array /** * {@inheritdoc} */ - public function provideInvalidComparisons(): array + public static function provideInvalidComparisons(): array { return [ [2, '2', 1, '1', 'integer'], @@ -83,7 +83,7 @@ public function provideInvalidComparisons(): array ]; } - public function provideComparisonsToNullValueAtPropertyPath() + public static function provideComparisonsToNullValueAtPropertyPath() { return [ [5, '5', true], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest.php index a59f3a91b4d60..110e66e699a05 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest.php @@ -29,7 +29,7 @@ protected function createConstraint(array $options = null): Constraint /** * {@inheritdoc} */ - public function provideValidComparisons(): array + public static function provideValidComparisons(): array { return [ [0, 0], @@ -43,7 +43,7 @@ public function provideValidComparisons(): array /** * {@inheritdoc} */ - public function provideInvalidComparisons(): array + public static function provideInvalidComparisons(): array { return [ [2, '2', 0, '0', 'integer'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php index d8aaa99a982c9..3d0e9df285066 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php @@ -38,7 +38,7 @@ protected function getErrorCode(): ?string /** * {@inheritdoc} */ - public function provideValidComparisons(): array + public static function provideValidComparisons(): array { return [ [1, 2], @@ -54,7 +54,7 @@ public function provideValidComparisons(): array /** * {@inheritdoc} */ - public function provideValidComparisonsToPropertyPath(): array + public static function provideValidComparisonsToPropertyPath(): array { return [ [4], @@ -64,7 +64,7 @@ public function provideValidComparisonsToPropertyPath(): array /** * {@inheritdoc} */ - public function provideInvalidComparisons(): array + public static function provideInvalidComparisons(): array { return [ [3, '3', 2, '2', 'integer'], @@ -81,7 +81,7 @@ public function provideInvalidComparisons(): array ]; } - public function provideComparisonsToNullValueAtPropertyPath() + public static function provideComparisonsToNullValueAtPropertyPath() { return [ [5, '5', true], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php index 8bf8ea874e492..35d26858e4980 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php @@ -29,7 +29,7 @@ protected function createConstraint(array $options = null): Constraint /** * {@inheritdoc} */ - public function provideValidComparisons(): array + public static function provideValidComparisons(): array { return [ [-1, 0], @@ -42,7 +42,7 @@ public function provideValidComparisons(): array /** * {@inheritdoc} */ - public function provideInvalidComparisons(): array + public static function provideInvalidComparisons(): array { return [ [0, '0', 0, '0', 'integer'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php index 22f9b3b1107d3..f66bf3aca942d 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php @@ -38,7 +38,7 @@ protected function getErrorCode(): ?string /** * {@inheritdoc} */ - public function provideValidComparisons(): array + public static function provideValidComparisons(): array { return [ [1, 2], @@ -54,7 +54,7 @@ public function provideValidComparisons(): array /** * {@inheritdoc} */ - public function provideValidComparisonsToPropertyPath(): array + public static function provideValidComparisonsToPropertyPath(): array { return [ [0], @@ -64,7 +64,7 @@ public function provideValidComparisonsToPropertyPath(): array /** * {@inheritdoc} */ - public function provideInvalidComparisons(): array + public static function provideInvalidComparisons(): array { return [ [3, '3', 3, '3', 'integer'], @@ -77,7 +77,7 @@ public function provideInvalidComparisons(): array ]; } - public function provideComparisonsToNullValueAtPropertyPath() + public static function provideComparisonsToNullValueAtPropertyPath() { return [ [5, '5', true], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php index 8a36828f1eff0..a9edf2a5bd4df 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php @@ -38,7 +38,7 @@ protected function getErrorCode(): ?string /** * {@inheritdoc} */ - public function provideValidComparisons(): array + public static function provideValidComparisons(): array { return [ [1, 2], @@ -57,14 +57,14 @@ public function provideValidComparisons(): array /** * {@inheritdoc} */ - public function provideValidComparisonsToPropertyPath(): array + public static function provideValidComparisonsToPropertyPath(): array { return [ [0], ]; } - public function provideAllInvalidComparisons(): array + public static function provideAllInvalidComparisons(): array { $this->setDefaultTimezone('UTC'); @@ -80,7 +80,7 @@ public function provideAllInvalidComparisons(): array /** * {@inheritdoc} */ - public function provideInvalidComparisons(): array + public static function provideInvalidComparisons(): array { $date = new \DateTime('2000-01-01'); $object = new ComparisonTest_Class(2); @@ -95,7 +95,7 @@ public function provideInvalidComparisons(): array return $comparisons; } - public function provideComparisonsToNullValueAtPropertyPath() + public static function provideComparisonsToNullValueAtPropertyPath() { return [ [5, '5', true], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php index e44e32f265fb4..6892919864175 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php @@ -52,7 +52,7 @@ public function testThrowsNoDefaultOptionConfiguredException() new Range('value'); } - public function provideDeprecationTriggeredIfMinMaxAndMinMessageOrMaxMessageSet(): array + public static function provideDeprecationTriggeredIfMinMaxAndMinMessageOrMaxMessageSet(): array { return [ [['min' => 1, 'max' => 10, 'minMessage' => 'my_min_message'], true, false], @@ -73,7 +73,7 @@ public function testDeprecationTriggeredIfMinMaxAndMinMessageOrMaxMessageSet(arr $this->assertEquals($expectedDeprecatedMaxMessageSet, $sut->deprecatedMaxMessageSet); } - public function provideDeprecationNotTriggeredIfNotMinMaxOrNotMinMessageNorMaxMessageSet(): array + public static function provideDeprecationNotTriggeredIfNotMinMaxOrNotMinMessageNorMaxMessageSet(): array { return [ [['min' => 1, 'minMessage' => 'my_min_message', 'maxMessage' => 'my_max_message']], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php index ff1497c9238d8..2e1e0d5675af8 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php @@ -405,7 +405,7 @@ public function testThrowsOnInvalidStringDates($expectedMessage, $value, $min, $ ])); } - public function throwsOnInvalidStringDatesProvider(): array + public static function throwsOnInvalidStringDatesProvider(): array { return [ ['The min value "foo" could not be converted to a "DateTimeImmutable" instance in the "Symfony\Component\Validator\Constraints\Range" constraint.', new \DateTimeImmutable(), 'foo', null], @@ -755,7 +755,7 @@ public function testInvalidDatesCombinedMinPropertyPath($value, $dateTimeAsStrin ->assertRaised(); } - public function provideMessageIfMinAndMaxSet(): array + public static function provideMessageIfMinAndMaxSet(): array { $notInRangeMessage = (new Range(['min' => '']))->notInRangeMessage; diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php index 10e485c368fef..030af014bb062 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php @@ -27,7 +27,7 @@ public function testConstraintGetDefaultOption() $this->assertSame('/^[0-9]+$/', $constraint->pattern); } - public function provideHtmlPatterns() + public static function provideHtmlPatterns() { return [ // HTML5 wraps the pattern in ^(?:pattern)$ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/TimezoneTest.php b/src/Symfony/Component/Validator/Tests/Constraints/TimezoneTest.php index f7b111494a7cb..5a2189f5af274 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/TimezoneTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/TimezoneTest.php @@ -57,7 +57,7 @@ public function testExceptionForInvalidGroupedTimezones(int $zone) new Timezone(['zone' => $zone]); } - public function provideInvalidZones(): iterable + public static function provideInvalidZones(): iterable { yield [-1]; yield [0]; diff --git a/src/Symfony/Component/Validator/Tests/DependencyInjection/AddAutoMappingConfigurationPassTest.php b/src/Symfony/Component/Validator/Tests/DependencyInjection/AddAutoMappingConfigurationPassTest.php index 4571436c12f73..9a6817966d104 100644 --- a/src/Symfony/Component/Validator/Tests/DependencyInjection/AddAutoMappingConfigurationPassTest.php +++ b/src/Symfony/Component/Validator/Tests/DependencyInjection/AddAutoMappingConfigurationPassTest.php @@ -60,7 +60,7 @@ public function testProcess(string $namespace, array $services, string $expected $this->assertCount(\count($services), $container->getDefinition('validator.builder')->getMethodCalls()); } - public function mappingProvider(): array + public static function mappingProvider(): array { return [ ['Foo\\', ['foo', 'baz'], '{^App\\\\|^Foo\\\\}'], diff --git a/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php b/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php index d8aa66cc26720..d5b011cea04d2 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataTest.php @@ -304,14 +304,14 @@ public function testGroupSequenceProviderFailsIfDomainClassIsInvalid() $metadata->setGroupSequenceProvider(true); } - public function testGroupSequenceProvider() + public static function testGroupSequenceProvider() { $metadata = new ClassMetadata(self::PROVIDERCLASS); $metadata->setGroupSequenceProvider(true); $this->assertTrue($metadata->isGroupSequenceProvider()); } - public function testMergeConstraintsMergesGroupSequenceProvider() + public static function testMergeConstraintsMergesGroupSequenceProvider() { $parent = new ClassMetadata(self::PROVIDERCLASS); $parent->setGroupSequenceProvider(true); diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php index 9ae66ca980747..ab64f6b29bb4c 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php @@ -194,7 +194,7 @@ public function testClassValidator(bool $expected, string $classValidatorRegexp $this->assertSame($expected, $propertyInfoLoader->loadClassMetadata($classMetadata)); } - public function regexpProvider() + public static function regexpProvider() { return [ [false, null], diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php index aedf13ec39024..30026892bbb4d 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php @@ -96,7 +96,7 @@ public function testLoadClassMetadataWithNonStrings() $this->assertFalse($constraints[0]->match); } - public function testLoadGroupSequenceProvider() + public static function testLoadGroupSequenceProvider() { $loader = new XmlFileLoader(__DIR__.'/constraint-mapping.xml'); $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php index 60caadccff7d6..453be8e0afbd7 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php @@ -50,7 +50,7 @@ public function testInvalidYamlFiles($path) $loader->loadClassMetadata($metadata); } - public function provideInvalidYamlFiles() + public static function provideInvalidYamlFiles() { return [ ['nonvalid-mapping.yml'], @@ -137,7 +137,7 @@ public function testLoadClassMetadataWithConstants() $this->assertEquals($expected, $metadata); } - public function testLoadGroupSequenceProvider() + public static function testLoadGroupSequenceProvider() { $loader = new YamlFileLoader(__DIR__.'/constraint-mapping.yml'); $metadata = new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\GroupSequenceProviderEntity'); diff --git a/src/Symfony/Component/Validator/Tests/Resources/TranslationFilesTest.php b/src/Symfony/Component/Validator/Tests/Resources/TranslationFilesTest.php index 7fa81d9fe02be..68f7e9b11c6e1 100644 --- a/src/Symfony/Component/Validator/Tests/Resources/TranslationFilesTest.php +++ b/src/Symfony/Component/Validator/Tests/Resources/TranslationFilesTest.php @@ -45,7 +45,7 @@ public function testTranslationFileIsValidWithoutEntityLoader($filePath) $this->assertCount(0, $errors, sprintf('"%s" is invalid:%s', $filePath, \PHP_EOL.implode(\PHP_EOL, array_column($errors, 'message')))); } - public function provideTranslationFiles() + public static function provideTranslationFiles() { return array_map( function ($filePath) { return (array) $filePath; }, diff --git a/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php b/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php index 99bf9e6eb2ebe..f7f33d476988a 100644 --- a/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php +++ b/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php @@ -24,7 +24,7 @@ public function testAppend($basePath, $subPath, $expectedPath, $message) $this->assertSame($expectedPath, PropertyPath::append($basePath, $subPath), $message); } - public function provideAppendPaths() + public static function provideAppendPaths() { return [ ['foo', '', 'foo', 'It returns the basePath if subPath is empty'], diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php index a150475dc6744..2f8632cedeb5b 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php @@ -46,7 +46,7 @@ public function testFilter($filter, $expectedDiff, $listedProperties = null) $this->assertSame($expectedDiff, array_diff_assoc($this->referenceArray, $filteredArray)); } - public function provideFilter() + public static function provideFilter() { return [ [ diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php index ba3b5dea77f49..42c55008f30c0 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php @@ -74,7 +74,7 @@ public function testCastDateTime($time, $timezone, $xDate, $xTimestamp, $xInfos) $this->assertDumpMatchesFormat($xDump, $cast["\0~\0date"]); } - public function provideDateTimes() + public static function provideDateTimes() { return [ ['2017-04-30 00:00:00.000000', 'Europe/Zurich', '2017-04-30 00:00:00.0 Europe/Zurich (+02:00)', 1493503200, 'Sunday, April 30, 2017%Afrom now%ADST On'], @@ -206,7 +206,7 @@ public function testCastInterval($intervalSpec, $ms, $invert, $xInterval, $xSeco $this->assertDumpMatchesFormat($xDump, $cast["\0~\0interval"]); } - public function provideIntervals() + public static function provideIntervals() { return [ ['PT0S', 0, 0, '0s', '0s'], @@ -305,7 +305,7 @@ public function testCastTimeZone($timezone, $xTimezone, $xRegion) $this->assertDumpMatchesFormat($xDump, $cast["\0~\0timezone"]); } - public function provideTimeZones() + public static function provideTimeZones() { $xRegion = \extension_loaded('intl') ? '%s' : ''; @@ -382,7 +382,7 @@ public function testCastPeriod($start, $interval, $end, $options, $xPeriod, $xDa $this->assertDumpMatchesFormat($xDump, $cast["\0~\0period"]); } - public function providePeriods() + public static function providePeriods() { $periods = [ ['2017-01-01', 'P1D', '2017-01-03', 0, 'every + 1d, from [2017-01-01 00:00:00.0 to 2017-01-03 00:00:00.0[', '1) 2017-01-01%a2) 2017-01-02'], diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php index 5bba4e55fc8d7..4ee6455322a81 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php @@ -135,7 +135,7 @@ public function testCastSplDoublyLinkedList($modeValue, $modeDump) $this->assertDumpMatchesFormat($dump, $var); } - public function provideCastSplDoublyLinkedList() + public static function provideCastSplDoublyLinkedList() { return [ [\SplDoublyLinkedList::IT_MODE_FIFO, 'IT_MODE_FIFO | IT_MODE_KEEP'], diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php index cde1d7e91236e..e1da87447e8fd 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php @@ -64,7 +64,7 @@ public function testNodes($seek, $expectedDump) $this->assertDumpMatchesFormat($expectedDump, $this->reader); } - public function provideNodes() + public static function provideNodes() { return [ [0, <<<'EODUMP' @@ -90,7 +90,7 @@ public function provideNodes() +depth: 1 +value: """ \n - + """ +baseURI: "%sxml_reader.xml" …9 @@ -178,7 +178,7 @@ public function provideNodes() +depth: 2 +value: """ \n - + """ +baseURI: "%sxml_reader.xml" …9 @@ -216,7 +216,7 @@ public function provideNodes() +depth: 2 +value: """ \n - + """ +baseURI: "%sxml_reader.xml" …9 diff --git a/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php b/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php index 56fb218776259..be79b39268b8c 100644 --- a/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php @@ -54,7 +54,7 @@ public function testDescribe(array $context, string $expectedOutput, bool $decor $this->assertStringMatchesFormat(trim($expectedOutput), str_replace(\PHP_EOL, "\n", trim($output->fetch()))); } - public function provideContext() + public static function provideContext() { yield 'source' => [ [ @@ -68,10 +68,10 @@ public function provideContext() Received from client #1 ----------------------- - -------- --------------------------------------------------------------------------------------------------- - date Fri, 14 Dec 2018 16:17:48 +0000 - source CliDescriptorTest.php on line 30 - file /Users/ogi/symfony/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php + -------- --------------------------------------------------------------------------------------------------- + date Fri, 14 Dec 2018 16:17:48 +0000 + source CliDescriptorTest.php on line 30 + file /Users/ogi/symfony/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php -------- --------------------------------------------------------------------------------------------------- TXT ]; @@ -91,11 +91,11 @@ public function provideContext() Received from client #1 ----------------------- - -------- -------------------------------------------------------------------------------- - date Fri, 14 Dec 2018 16:17:48 +0000 - source CliDescriptorTest.php on line 30 - file src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php - -------- -------------------------------------------------------------------------------- + -------- -------------------------------------------------------------------------------- + date Fri, 14 Dec 2018 16:17:48 +0000 + source CliDescriptorTest.php on line 30 + file src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php + -------- -------------------------------------------------------------------------------- TXT : @@ -103,11 +103,11 @@ public function provideContext() Received from client #1 ----------------------- - -------- -------------------------------------------------------------------------------- - date Fri, 14 Dec 2018 16:17:48 +0000 - source CliDescriptorTest.php on line 30 - file src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php - -------- -------------------------------------------------------------------------------- + -------- -------------------------------------------------------------------------------- + date Fri, 14 Dec 2018 16:17:48 +0000 + source CliDescriptorTest.php on line 30 + file src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php + -------- -------------------------------------------------------------------------------- Open source in your IDE/browser: phpstorm://open?file=/Users/ogi/symfony/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php&line=30 @@ -144,8 +144,8 @@ public function provideContext() $ bin/phpunit ------------- - ------ --------------------------------- - date Fri, 14 Dec 2018 16:17:48 +0000 + ------ --------------------------------- + date Fri, 14 Dec 2018 16:17:48 +0000 ------ --------------------------------- TXT ]; @@ -163,10 +163,10 @@ public function provideContext() GET http://localhost/foo ------------------------ - ------------ --------------------------------- - date Fri, 14 Dec 2018 16:17:48 +0000 - controller "FooController.php" - ------------ --------------------------------- + ------------ --------------------------------- + date Fri, 14 Dec 2018 16:17:48 +0000 + controller "FooController.php" + ------------ --------------------------------- TXT ]; } diff --git a/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/HtmlDescriptorTest.php b/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/HtmlDescriptorTest.php index 426e99d360c3e..e83917bacff0d 100644 --- a/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/HtmlDescriptorTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/HtmlDescriptorTest.php @@ -63,7 +63,7 @@ public function testDescribe(array $context, string $expectedOutput) $this->assertStringMatchesFormat(trim($expectedOutput), trim(preg_replace('@@s', '', $output->fetch()))); } - public function provideContext() + public static function provideContext() { yield 'source' => [ [ @@ -82,7 +82,7 @@ public function provideContext() Fri, 14 Dec 2018 16:17:48 +0000 - +

@@ -146,11 +146,11 @@ public function provideContext() Fri, 14 Dec 2018 16:17:48 +0000 - +

- +

[DUMPED]
@@ -184,7 +184,7 @@ public function provideContext()

- +

[DUMPED]
diff --git a/src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php b/src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php index 43fb664a117fb..63899bf34ca5c 100644 --- a/src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php @@ -145,9 +145,9 @@ public function testDumpWithCommaFlagsAndExceptionCodeExcerpt() trace: { %ACliDumperTest.php:%d { Symfony\Component\VarDumper\Tests\Dumper\CliDumperTest->testDumpWithCommaFlagsAndExceptionCodeExcerpt() - › + › › $ex = new \RuntimeException('foo'); - › + › } %A } @@ -157,7 +157,7 @@ public function testDumpWithCommaFlagsAndExceptionCodeExcerpt() , $dump); } - public function provideDumpWithCommaFlagTests() + public static function provideDumpWithCommaFlagTests() { $expected = <<<'EOTXT' array:3 [ @@ -388,7 +388,7 @@ public function testThrowingCaster() __TwigTemplate_VarDumperFixture_u75a09->doDisplay(array \$context, array \$blocks = []) › foo bar › twig source - › + › } %s%eTemplate.php:%d { …} %s%eTemplate.php:%d { …} @@ -520,7 +520,7 @@ public function testIncompleteClass() ); } - public function provideDumpArrayWithColor() + public static function provideDumpArrayWithColor() { yield [ ['foo' => 'bar'], diff --git a/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php b/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php index e63ad156e4955..714cdb33beb1a 100644 --- a/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php @@ -180,7 +180,7 @@ public function testDumpString($var, $needle) $this->assertStringContainsString($needle, $out); } - public function varToDumpProvider() + public static function varToDumpProvider() { return [ [['dummy' => new ImgStub('dummy', 'img/png', '100em')], ''], diff --git a/src/Symfony/Component/VarDumper/Tests/Fixtures/Twig.php b/src/Symfony/Component/VarDumper/Tests/Fixtures/Twig.php index 5d1a73d424b4b..366b5851980fa 100644 --- a/src/Symfony/Component/VarDumper/Tests/Fixtures/Twig.php +++ b/src/Symfony/Component/VarDumper/Tests/Fixtures/Twig.php @@ -7,7 +7,7 @@ private function createError() return new \RuntimeException('Manually triggered error.'); } - public function provideError() + public static function provideError() { return $this->createError(); } diff --git a/src/Symfony/Component/VarExporter/Tests/InstantiatorTest.php b/src/Symfony/Component/VarExporter/Tests/InstantiatorTest.php index cbd223642320b..ec6fc98d2a2e5 100644 --- a/src/Symfony/Component/VarExporter/Tests/InstantiatorTest.php +++ b/src/Symfony/Component/VarExporter/Tests/InstantiatorTest.php @@ -35,7 +35,7 @@ public function testFailingInstantiation(string $class) Instantiator::instantiate($class); } - public function provideFailingInstantiation() + public static function provideFailingInstantiation() { yield ['ReflectionClass']; yield ['SplHeap']; diff --git a/src/Symfony/Component/VarExporter/Tests/VarExporterTest.php b/src/Symfony/Component/VarExporter/Tests/VarExporterTest.php index f90737da2e8cf..ac9a21b462485 100644 --- a/src/Symfony/Component/VarExporter/Tests/VarExporterTest.php +++ b/src/Symfony/Component/VarExporter/Tests/VarExporterTest.php @@ -53,7 +53,7 @@ public function testFailingSerialization($value) } } - public function provideFailingSerialization() + public static function provideFailingSerialization() { yield [hash_init('md5')]; yield [new \ReflectionClass(\stdClass::class)]; @@ -122,7 +122,7 @@ public function testExport(string $testName, $value, bool $staticValueExpected = } } - public function provideExport() + public static function provideExport() { yield ['multiline-string', ["\0\0\r\nA" => "B\rC\n\n"], true]; yield ['lf-ending-string', "'BOOM'\n.var_dump(123)//'", true]; diff --git a/src/Symfony/Component/WebLink/Tests/LinkTest.php b/src/Symfony/Component/WebLink/Tests/LinkTest.php index 979bbb8b4f67e..e1c03bae7c073 100644 --- a/src/Symfony/Component/WebLink/Tests/LinkTest.php +++ b/src/Symfony/Component/WebLink/Tests/LinkTest.php @@ -91,7 +91,7 @@ public function testNotTemplated(string $href) $this->assertFalse($link->isTemplated()); } - public function templatedHrefProvider() + public static function templatedHrefProvider() { return [ ['http://www.google.com/{param}/foo'], @@ -99,7 +99,7 @@ public function templatedHrefProvider() ]; } - public function notTemplatedHrefProvider() + public static function notTemplatedHrefProvider() { return [ ['http://www.google.com/foo'], diff --git a/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php b/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php index fcedde01577c8..357da84f5233b 100644 --- a/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php +++ b/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php @@ -47,7 +47,7 @@ public function testDumpWithMarking($definition, $marking, $expected) $this->assertEquals($expected, $dump); } - public function provideWorkflowDefinitionWithMarking() + public static function provideWorkflowDefinitionWithMarking() { yield [ $this->createComplexWorkflowDefinition(), @@ -62,7 +62,7 @@ public function provideWorkflowDefinitionWithMarking() ]; } - public function provideWorkflowDefinitionWithoutMarking() + public static function provideWorkflowDefinitionWithoutMarking() { yield [$this->createComplexWorkflowDefinition(), $this->provideComplexWorkflowDumpWithoutMarking()]; yield [$this->createSimpleWorkflowDefinition(), $this->provideSimpleWorkflowDumpWithoutMarking()]; @@ -126,7 +126,7 @@ public function createSimpleWorkflowDumpWithMarking() '; } - public function provideComplexWorkflowDumpWithoutMarking() + public static function provideComplexWorkflowDumpWithoutMarking() { return 'digraph workflow { ratio="compress" rankdir="LR" @@ -164,7 +164,7 @@ public function provideComplexWorkflowDumpWithoutMarking() '; } - public function provideSimpleWorkflowDumpWithoutMarking() + public static function provideSimpleWorkflowDumpWithoutMarking() { return 'digraph workflow { ratio="compress" rankdir="LR" diff --git a/src/Symfony/Component/Workflow/Tests/Dumper/PlantUmlDumperTest.php b/src/Symfony/Component/Workflow/Tests/Dumper/PlantUmlDumperTest.php index 85c67969b8488..d447c97a507ec 100644 --- a/src/Symfony/Component/Workflow/Tests/Dumper/PlantUmlDumperTest.php +++ b/src/Symfony/Component/Workflow/Tests/Dumper/PlantUmlDumperTest.php @@ -33,7 +33,7 @@ public function testDumpWorkflowWithoutMarking($definition, $marking, $expectedF $this->assertStringEqualsFile($file, $dump); } - public function provideWorkflowDefinitionWithoutMarking() + public static function provideWorkflowDefinitionWithoutMarking() { yield [$this->createSimpleWorkflowDefinition(), null, 'simple-workflow-nomarking', 'SimpleDiagram']; yield [$this->createComplexWorkflowDefinition(), null, 'complex-workflow-nomarking', 'ComplexDiagram']; @@ -56,7 +56,7 @@ public function testDumpStateMachineWithoutMarking($definition, $marking, $expec $this->assertStringEqualsFile($file, $dump); } - public function provideStateMachineDefinitionWithoutMarking() + public static function provideStateMachineDefinitionWithoutMarking() { yield [$this->createComplexStateMachineDefinition(), null, 'complex-state-machine-nomarking', 'SimpleDiagram']; $marking = new Marking(['c' => 1, 'e' => 1]); diff --git a/src/Symfony/Component/Yaml/Tests/DumperTest.php b/src/Symfony/Component/Yaml/Tests/DumperTest.php index 59a47a8130f31..f745ee944bbeb 100644 --- a/src/Symfony/Component/Yaml/Tests/DumperTest.php +++ b/src/Symfony/Component/Yaml/Tests/DumperTest.php @@ -275,7 +275,7 @@ public function testDumpObjectAsMap($object, $expected) $this->assertSameData($expected, $this->parser->parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP)); } - public function objectAsMapProvider() + public static function objectAsMapProvider() { $tests = []; diff --git a/src/Symfony/Component/Yaml/Tests/InlineTest.php b/src/Symfony/Component/Yaml/Tests/InlineTest.php index 852d498b1772b..a8c81f88eb5ae 100644 --- a/src/Symfony/Component/Yaml/Tests/InlineTest.php +++ b/src/Symfony/Component/Yaml/Tests/InlineTest.php @@ -769,7 +769,7 @@ public function testPhpObjectWithEmptyValue($expected, $value) $this->assertSame($expected, Inline::parse($value, Yaml::PARSE_OBJECT)); } - public function phpObjectTagWithEmptyValueProvider() + public static function phpObjectTagWithEmptyValueProvider() { return [ [false, '!php/object'], @@ -789,7 +789,7 @@ public function testPhpConstTagWithEmptyValue($expected, $value) $this->assertSame($expected, Inline::parse($value, Yaml::PARSE_CONSTANT)); } - public function phpConstTagWithEmptyValueProvider() + public static function phpConstTagWithEmptyValueProvider() { return [ ['', '!php/const'], @@ -835,7 +835,7 @@ public function testUnquotedExclamationMarkThrows(string $value) Inline::parse($value); } - public function unquotedExclamationMarkThrowsProvider() + public static function unquotedExclamationMarkThrowsProvider() { return [ ['!'], @@ -867,7 +867,7 @@ public function testQuotedExclamationMark($expected, string $value) } // This provider should stay consistent with unquotedExclamationMarkThrowsProvider - public function quotedExclamationMarkProvider() + public static function quotedExclamationMarkProvider() { return [ ['!', '"!"'], @@ -897,7 +897,7 @@ public function testParseIdeographicSpace(string $yaml, string $expected) $this->assertSame($expected, Inline::parse($yaml)); } - public function ideographicSpaceProvider(): array + public static function ideographicSpaceProvider(): array { return [ ["\u{3000}", ' '], diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php index 6bcc937d6f49e..532e98bb79b75 100644 --- a/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -1568,7 +1568,7 @@ public function testParserThrowsExceptionWithCorrectLineNumber($lineNumber, $yam $this->parser->parse($yaml); } - public function parserThrowsExceptionWithCorrectLineNumberProvider() + public static function parserThrowsExceptionWithCorrectLineNumberProvider() { return [ [ @@ -1783,7 +1783,7 @@ public function testParseMultiLineMappingValue($yaml, $expected, $parseError) $this->assertSame($expected, $this->parser->parse($yaml)); } - public function multiLineDataProvider() + public static function multiLineDataProvider() { $tests = []; @@ -1850,7 +1850,7 @@ public function testInlineNotationSpanningMultipleLines($expected, string $yaml) $this->assertSame($expected, $this->parser->parse($yaml)); } - public function inlineNotationSpanningMultipleLinesProvider(): array + public static function inlineNotationSpanningMultipleLinesProvider(): array { return [ 'mapping' => [ @@ -2239,7 +2239,7 @@ public function testCustomTagSupport($expected, $yaml) $this->assertSameData($expected, $this->parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS)); } - public function taggedValuesProvider() + public static function taggedValuesProvider() { return [ 'scalars' => [ @@ -2663,7 +2663,7 @@ public function testDetectCircularReferences($yaml) $this->parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS); } - public function circularReferenceProvider() + public static function circularReferenceProvider() { $tests = []; From 162191db734b6c8dfefdb3af72532e1c154897d5 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Tue, 22 Nov 2022 13:32:13 +0100 Subject: [PATCH 02/11] Revert --- src/Symfony/Bundle/SecurityBundle/Security/FirewallConfig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/SecurityBundle/Security/FirewallConfig.php b/src/Symfony/Bundle/SecurityBundle/Security/FirewallConfig.php index 1ce5973fc18d4..dca8ccde565c1 100644 --- a/src/Symfony/Bundle/SecurityBundle/Security/FirewallConfig.php +++ b/src/Symfony/Bundle/SecurityBundle/Security/FirewallConfig.php @@ -74,7 +74,7 @@ public function isStateless(): bool return $this->stateless; } - public static function getProvider(): ?string + public function getProvider(): ?string { return $this->provider; } From c7185c6bed13dd75c7c845f854c3c42682aeec62 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Tue, 22 Nov 2022 13:33:05 +0100 Subject: [PATCH 03/11] Revert --- .../Tests/Authentication/AuthenticationProviderManagerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php index b880c854a097a..6a997c462b45e 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php @@ -99,7 +99,7 @@ public function testAuthenticateWhenOneReturnsAuthenticationExceptionButNotAll() $this->assertSame($expected, $token); } - public static function testAuthenticateReturnsTokenOfTheFirstMatchingProvider() + public function testAuthenticateReturnsTokenOfTheFirstMatchingProvider() { $second = $this->createMock(AuthenticationProviderInterface::class); $second From 0291153de9862534a7093e00ecb822ec64c3434b Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Tue, 22 Nov 2022 13:33:41 +0100 Subject: [PATCH 04/11] Revert --- src/Symfony/Component/Cache/Tests/DoctrineProviderTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Cache/Tests/DoctrineProviderTest.php b/src/Symfony/Component/Cache/Tests/DoctrineProviderTest.php index 60e69184a3c42..91a5516ab7719 100644 --- a/src/Symfony/Component/Cache/Tests/DoctrineProviderTest.php +++ b/src/Symfony/Component/Cache/Tests/DoctrineProviderTest.php @@ -18,7 +18,7 @@ class DoctrineProviderTest extends TestCase { - public static function testProvider() + public function testProvider() { $pool = new ArrayAdapter(); $cache = new DoctrineProvider($pool); From 8cc8837d60b40e9055bfee863de33c872966bf5d Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Tue, 22 Nov 2022 13:47:29 +0100 Subject: [PATCH 05/11] Revert --- .../Tests/DependencyInjection/FrameworkExtensionTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index 20003f60aaedf..edce0ffe7f12b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -1468,7 +1468,7 @@ public function testEventDispatcherService() $this->assertInstanceOf(EventDispatcherInterface::class, $container->get('foo')->dispatcher); } - public static function testCacheDefaultRedisProvider() + public function testCacheDefaultRedisProvider() { $container = $this->createContainerFromFile('cache'); From 5d5158e9ee01c41a64bea78780715f027e85a575 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Tue, 22 Nov 2022 13:48:42 +0100 Subject: [PATCH 06/11] Revert --- .php-version | 1 + .../Tests/Templating/GlobalVariablesTest.php | 2 +- .../DependencyInjection/CompleteConfigurationTest.php | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 .php-version diff --git a/.php-version b/.php-version new file mode 100644 index 0000000000000..cc40bca69a0ca --- /dev/null +++ b/.php-version @@ -0,0 +1 @@ +8.0 diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php index 7fa5f3828a276..2e8162baf04f8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php @@ -93,7 +93,7 @@ public function testGetUser($user, $expectedUser) $this->assertSame($expectedUser, $this->globals->getUser()); } - public static function getUserProvider() + public function getUserProvider() { $user = $this->createMock(UserInterface::class); $std = new \stdClass(); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php index ecb756d529fd8..b3cfbb9f88d71 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php @@ -627,27 +627,27 @@ public function testAccessDecisionManagerOptionsAreNotOverriddenByImplicitStrate $this->assertFalse($accessDecisionManagerDefinition->getArgument(3)); } - public static function testFirewallUndefinedUserProvider() + public function testFirewallUndefinedUserProvider() { $this->expectException(InvalidConfigurationException::class); $this->expectExceptionMessage('Invalid firewall "main": user provider "undefined" not found.'); $this->getContainer('firewall_undefined_provider'); } - public static function testFirewallListenerUndefinedProvider() + public function testFirewallListenerUndefinedProvider() { $this->expectException(InvalidConfigurationException::class); $this->expectExceptionMessage('Invalid firewall "main": user provider "undefined" not found.'); $this->getContainer('listener_undefined_provider'); } - public static function testFirewallWithUserProvider() + public function testFirewallWithUserProvider() { $this->getContainer('firewall_provider'); $this->addToAssertionCount(1); } - public static function testFirewallListenerWithProvider() + public function testFirewallListenerWithProvider() { $this->getContainer('listener_provider'); $this->addToAssertionCount(1); From a0dd687075fc1d8c8ee9a1795ead66099b1fc191 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Tue, 22 Nov 2022 13:49:15 +0100 Subject: [PATCH 07/11] Revert --- .../Tests/Controller/ProfilerControllerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php index a6e49f39b5b93..fe4a896cf979f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php @@ -416,7 +416,7 @@ public function testDefaultPanel(string $expectedPanel, Profile $profile) ->panelAction(new Request(), $profile->getToken()); } - public static function defaultPanelProvider(): \Generator + public function defaultPanelProvider(): \Generator { // Test default behavior $profile = new Profile('xxxxxx'); From 04e2d4dbb4d320220605ace753667d85b1a70ce9 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Tue, 22 Nov 2022 13:49:34 +0100 Subject: [PATCH 08/11] Revert --- .../Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php index 1adef122db0f4..e003a20ee6b56 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php @@ -29,7 +29,7 @@ public function testRequiredGuesser($classMetadata, $expected) $this->assertEquals($expected, $this->getGuesser($classMetadata)->guessRequired('TestEntity', 'field')); } - public static function requiredProvider() + public function requiredProvider() { $return = []; From d3b72384aa83702c6e6260fa691428930bdaa440 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Tue, 22 Nov 2022 13:51:49 +0100 Subject: [PATCH 09/11] Fix --- .../HttpCodeActivationStrategyTest.php | 20 +++++++++---------- .../NotFoundActivationStrategyTest.php | 14 ++++++------- .../Tests/Processor/DebugProcessorTest.php | 4 ++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php b/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php index 0effa5b08c457..b331fcde22e78 100644 --- a/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php +++ b/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php @@ -58,19 +58,19 @@ public static function isActivatedProvider() { return [ ['/test', ['level' => Logger::ERROR], true], - ['/400', ['level' => Logger::ERROR, 'context' => $this->getContextException(400)], true], - ['/400/a', ['level' => Logger::ERROR, 'context' => $this->getContextException(400)], false], - ['/400/b', ['level' => Logger::ERROR, 'context' => $this->getContextException(400)], false], - ['/400/c', ['level' => Logger::ERROR, 'context' => $this->getContextException(400)], true], - ['/401', ['level' => Logger::ERROR, 'context' => $this->getContextException(401)], true], - ['/403', ['level' => Logger::ERROR, 'context' => $this->getContextException(403)], false], - ['/404', ['level' => Logger::ERROR, 'context' => $this->getContextException(404)], false], - ['/405', ['level' => Logger::ERROR, 'context' => $this->getContextException(405)], false], - ['/500', ['level' => Logger::ERROR, 'context' => $this->getContextException(500)], true], + ['/400', ['level' => Logger::ERROR, 'context' => self::getContextException(400)], true], + ['/400/a', ['level' => Logger::ERROR, 'context' => self::getContextException(400)], false], + ['/400/b', ['level' => Logger::ERROR, 'context' => self::getContextException(400)], false], + ['/400/c', ['level' => Logger::ERROR, 'context' => self::getContextException(400)], true], + ['/401', ['level' => Logger::ERROR, 'context' => self::getContextException(401)], true], + ['/403', ['level' => Logger::ERROR, 'context' => self::getContextException(403)], false], + ['/404', ['level' => Logger::ERROR, 'context' => self::getContextException(404)], false], + ['/405', ['level' => Logger::ERROR, 'context' => self::getContextException(405)], false], + ['/500', ['level' => Logger::ERROR, 'context' => self::getContextException(500)], true], ]; } - protected function getContextException($code) + protected static function getContextException($code) { return ['exception' => new HttpException($code)]; } diff --git a/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php b/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php index 6f6ec1ce05f26..e893b16e80f86 100644 --- a/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php +++ b/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php @@ -37,18 +37,18 @@ public static function isActivatedProvider() { return [ ['/test', ['level' => Logger::DEBUG], false], - ['/foo', ['level' => Logger::DEBUG, 'context' => $this->getContextException(404)], false], - ['/baz/bar', ['level' => Logger::ERROR, 'context' => $this->getContextException(404)], false], - ['/foo', ['level' => Logger::ERROR, 'context' => $this->getContextException(404)], false], - ['/foo', ['level' => Logger::ERROR, 'context' => $this->getContextException(500)], true], + ['/foo', ['level' => Logger::DEBUG, 'context' => self::getContextException(404)], false], + ['/baz/bar', ['level' => Logger::ERROR, 'context' => self::getContextException(404)], false], + ['/foo', ['level' => Logger::ERROR, 'context' => self::getContextException(404)], false], + ['/foo', ['level' => Logger::ERROR, 'context' => self::getContextException(500)], true], ['/test', ['level' => Logger::ERROR], true], - ['/baz', ['level' => Logger::ERROR, 'context' => $this->getContextException(404)], true], - ['/baz', ['level' => Logger::ERROR, 'context' => $this->getContextException(500)], true], + ['/baz', ['level' => Logger::ERROR, 'context' => self::getContextException(404)], true], + ['/baz', ['level' => Logger::ERROR, 'context' => self::getContextException(500)], true], ]; } - protected function getContextException($code) + protected static function getContextException($code) { return ['exception' => new HttpException($code)]; } diff --git a/src/Symfony/Bridge/Monolog/Tests/Processor/DebugProcessorTest.php b/src/Symfony/Bridge/Monolog/Tests/Processor/DebugProcessorTest.php index ba0df20756be7..969fbe854c1f9 100644 --- a/src/Symfony/Bridge/Monolog/Tests/Processor/DebugProcessorTest.php +++ b/src/Symfony/Bridge/Monolog/Tests/Processor/DebugProcessorTest.php @@ -34,7 +34,7 @@ public function testDatetimeFormat(array $record, $expectedTimestamp) public static function providerDatetimeFormatTests(): array { - $record = $this->getRecord(); + $record = self::getRecord(); return [ [array_merge($record, ['datetime' => new \DateTime('2019-01-01T00:01:00+00:00')]), 1546300860], @@ -99,7 +99,7 @@ public function testInheritedClassWithoutArgument() $debugProcessorChild->countErrors(); } - private function getRecord($level = Logger::WARNING, $message = 'test'): array + private static function getRecord($level = Logger::WARNING, $message = 'test'): array { return [ 'message' => $message, From e252e6563aa6f69afb572aaea8a0e57415d067e4 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Tue, 22 Nov 2022 13:53:17 +0100 Subject: [PATCH 10/11] Fix --- .../PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php index f5edd0b6676e4..ae4de08158dc4 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php @@ -58,8 +58,8 @@ public static function invalidTypesProvider() return [ 'pub' => ['pub', null, null], 'stat' => ['stat', null, null], - 'foo' => ['foo', $this->isPhpDocumentorV5() ? 'Foo.' : null, null], - 'bar' => ['bar', $this->isPhpDocumentorV5() ? 'Bar.' : null, null], + 'foo' => ['foo', self::isPhpDocumentorV5() ? 'Foo.' : null, null], + 'bar' => ['bar', self::isPhpDocumentorV5() ? 'Bar.' : null, null], ]; } @@ -356,7 +356,7 @@ public function testUnknownPseudoType() $this->assertEquals([new Type(Type::BUILTIN_TYPE_OBJECT, false, 'scalar')], $this->extractor->getTypes(PseudoTypeDummy::class, 'unknownPseudoType')); } - protected function isPhpDocumentorV5() + protected static function isPhpDocumentorV5() { if (class_exists(InvalidTag::class)) { return true; From cbb8b64b35459deffb307e0d5737d908c448d0eb Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Tue, 22 Nov 2022 13:54:33 +0100 Subject: [PATCH 11/11] Use static --- .../Csp/ContentSecurityPolicyHandlerTest.php | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php index 31c3aa2214c50..7d5c0761b1dcc 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php @@ -66,10 +66,10 @@ public static function provideRequestAndResponses() ]; return [ - [$nonce, ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], $this->createRequest(), $this->createResponse()], - [$nonce, ['csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce], $this->createRequest($requestNonceHeaders), $this->createResponse($responseNonceHeaders)], - [$nonce, ['csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce], $this->createRequest($requestNonceHeaders), $this->createResponse()], - [$nonce, ['csp_script_nonce' => $responseScriptNonce, 'csp_style_nonce' => $responseStyleNonce], $this->createRequest(), $this->createResponse($responseNonceHeaders)], + [$nonce, ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], self::createRequest(), self::createResponse()], + [$nonce, ['csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce], self::createRequest($requestNonceHeaders), self::createResponse($responseNonceHeaders)], + [$nonce, ['csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce], self::createRequest($requestNonceHeaders), self::createResponse()], + [$nonce, ['csp_script_nonce' => $responseScriptNonce, 'csp_style_nonce' => $responseStyleNonce], self::createRequest(), self::createResponse($responseNonceHeaders)], ]; } @@ -96,104 +96,104 @@ public static function provideRequestAndResponsesForOnKernelResponse() [ $nonce, ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], - $this->createRequest(), - $this->createResponse(), + self::createRequest(), + self::createResponse(), ['Content-Security-Policy' => null, 'Content-Security-Policy-Report-Only' => null, 'X-Content-Security-Policy' => null], ], [ $nonce, ['csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce], - $this->createRequest($requestNonceHeaders), - $this->createResponse($responseNonceHeaders), + self::createRequest($requestNonceHeaders), + self::createResponse($responseNonceHeaders), ['Content-Security-Policy' => null, 'Content-Security-Policy-Report-Only' => null, 'X-Content-Security-Policy' => null], ], [ $nonce, ['csp_script_nonce' => $requestScriptNonce, 'csp_style_nonce' => $requestStyleNonce], - $this->createRequest($requestNonceHeaders), - $this->createResponse(), + self::createRequest($requestNonceHeaders), + self::createResponse(), ['Content-Security-Policy' => null, 'Content-Security-Policy-Report-Only' => null, 'X-Content-Security-Policy' => null], ], [ $nonce, ['csp_script_nonce' => $responseScriptNonce, 'csp_style_nonce' => $responseStyleNonce], - $this->createRequest(), - $this->createResponse($responseNonceHeaders), + self::createRequest(), + self::createResponse($responseNonceHeaders), ['Content-Security-Policy' => null, 'Content-Security-Policy-Report-Only' => null, 'X-Content-Security-Policy' => null], ], [ $nonce, ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], - $this->createRequest(), - $this->createResponse(['Content-Security-Policy' => 'frame-ancestors https: ; form-action: https:', 'Content-Security-Policy-Report-Only' => 'frame-ancestors http: ; form-action: http:']), + self::createRequest(), + self::createResponse(['Content-Security-Policy' => 'frame-ancestors https: ; form-action: https:', 'Content-Security-Policy-Report-Only' => 'frame-ancestors http: ; form-action: http:']), ['Content-Security-Policy' => 'frame-ancestors https: ; form-action: https:', 'Content-Security-Policy-Report-Only' => 'frame-ancestors http: ; form-action: http:', 'X-Content-Security-Policy' => null], ], [ $nonce, ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], - $this->createRequest(), - $this->createResponse(['Content-Security-Policy' => 'default-src \'self\' domain.com; script-src \'self\' \'unsafe-inline\'', 'Content-Security-Policy-Report-Only' => 'default-src \'self\' domain-report-only.com; script-src \'self\' \'unsafe-inline\'']), + self::createRequest(), + self::createResponse(['Content-Security-Policy' => 'default-src \'self\' domain.com; script-src \'self\' \'unsafe-inline\'', 'Content-Security-Policy-Report-Only' => 'default-src \'self\' domain-report-only.com; script-src \'self\' \'unsafe-inline\'']), ['Content-Security-Policy' => 'default-src \'self\' domain.com; script-src \'self\' \'unsafe-inline\'; style-src \'self\' domain.com \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'Content-Security-Policy-Report-Only' => 'default-src \'self\' domain-report-only.com; script-src \'self\' \'unsafe-inline\'; style-src \'self\' domain-report-only.com \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'X-Content-Security-Policy' => null], ], [ $nonce, ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], - $this->createRequest(), - $this->createResponse(['Content-Security-Policy' => 'default-src \'self\' domain.com; script-src \'self\' \'unsafe-inline\'; script-src-elem \'self\'; style-src \'self\' \'unsafe-inline\'; style-src-elem \'self\'', 'Content-Security-Policy-Report-Only' => 'default-src \'self\' domain-report-only.com; script-src \'self\' \'unsafe-inline\'; script-src-elem \'self\'; style-src \'self\' \'unsafe-inline\'; style-src-elem \'self\'']), + self::createRequest(), + self::createResponse(['Content-Security-Policy' => 'default-src \'self\' domain.com; script-src \'self\' \'unsafe-inline\'; script-src-elem \'self\'; style-src \'self\' \'unsafe-inline\'; style-src-elem \'self\'', 'Content-Security-Policy-Report-Only' => 'default-src \'self\' domain-report-only.com; script-src \'self\' \'unsafe-inline\'; script-src-elem \'self\'; style-src \'self\' \'unsafe-inline\'; style-src-elem \'self\'']), ['Content-Security-Policy' => 'default-src \'self\' domain.com; script-src \'self\' \'unsafe-inline\'; script-src-elem \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'; style-src \'self\' \'unsafe-inline\'; style-src-elem \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'Content-Security-Policy-Report-Only' => 'default-src \'self\' domain-report-only.com; script-src \'self\' \'unsafe-inline\'; script-src-elem \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'; style-src \'self\' \'unsafe-inline\'; style-src-elem \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'X-Content-Security-Policy' => null], ], [ $nonce, ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], - $this->createRequest(), - $this->createResponse(['Content-Security-Policy' => 'default-src \'none\'', 'Content-Security-Policy-Report-Only' => 'default-src \'none\'']), + self::createRequest(), + self::createResponse(['Content-Security-Policy' => 'default-src \'none\'', 'Content-Security-Policy-Report-Only' => 'default-src \'none\'']), ['Content-Security-Policy' => 'default-src \'none\'; script-src \'unsafe-inline\' \'nonce-'.$nonce.'\'; style-src \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'Content-Security-Policy-Report-Only' => 'default-src \'none\'; script-src \'unsafe-inline\' \'nonce-'.$nonce.'\'; style-src \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'X-Content-Security-Policy' => null], ], [ $nonce, ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], - $this->createRequest(), - $this->createResponse(['Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'']), + self::createRequest(), + self::createResponse(['Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'']), ['Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'', 'X-Content-Security-Policy' => null], ], [ $nonce, ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], - $this->createRequest(), - $this->createResponse(['Content-Security-Policy' => 'script-src \'self\'; style-src \'self\'']), + self::createRequest(), + self::createResponse(['Content-Security-Policy' => 'script-src \'self\'; style-src \'self\'']), ['Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'; style-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'X-Content-Security-Policy' => null], ], [ $nonce, ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], - $this->createRequest(), - $this->createResponse(['X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'']), + self::createRequest(), + self::createResponse(['X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'']), ['X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'', 'Content-Security-Policy' => null], ], [ $nonce, ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], - $this->createRequest(), - $this->createResponse(['X-Content-Security-Policy' => 'script-src \'self\'']), + self::createRequest(), + self::createResponse(['X-Content-Security-Policy' => 'script-src \'self\'']), ['X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'Content-Security-Policy' => null], ], [ $nonce, ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], - $this->createRequest(), - $this->createResponse(['X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'sha384-LALALALALAAL\'']), + self::createRequest(), + self::createResponse(['X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'sha384-LALALALALAAL\'']), ['X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'sha384-LALALALALAAL\' \'nonce-'.$nonce.'\'', 'Content-Security-Policy' => null], ], [ $nonce, ['csp_script_nonce' => $nonce, 'csp_style_nonce' => $nonce], - $this->createRequest(), - $this->createResponse(['Content-Security-Policy' => 'script-src \'self\'; style-src \'self\'', 'X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'; style-src \'self\'']), + self::createRequest(), + self::createResponse(['Content-Security-Policy' => 'script-src \'self\'; style-src \'self\'', 'X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'; style-src \'self\'']), ['Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'; style-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\'', 'X-Content-Security-Policy' => 'script-src \'self\' \'unsafe-inline\'; style-src \'self\' \'unsafe-inline\' \'nonce-'.$nonce.'\''], ], ]; } - private function createRequest(array $headers = []) + private static function createRequest(array $headers = []) { $request = new Request(); $request->headers->add($headers); @@ -201,7 +201,7 @@ private function createRequest(array $headers = []) return $request; } - private function createResponse(array $headers = []) + private static function createResponse(array $headers = []) { $response = new Response(); $response->headers->add($headers);