From 2ec54e9f6343e2d7e46027f2877da5cd74350fc6 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Wed, 14 Dec 2022 15:42:16 +0100 Subject: [PATCH] Migrate to `static` data providers using `rector/rector` --- .../DoctrineDataCollectorTest.php | 2 +- ...octrineDataCollectorWithDebugStackTest.php | 2 +- .../DoctrineExtensionTest.php | 6 +-- .../ChoiceList/ORMQueryBuilderLoaderTest.php | 4 +- .../Tests/Form/Type/EntityTypeTest.php | 2 +- .../Doctrine/Tests/Logger/DbalLoggerTest.php | 2 +- .../Tests/Middleware/Debug/MiddlewareTest.php | 6 +-- .../PropertyInfo/DoctrineExtractorTest.php | 2 +- .../Doctrine/Tests/Types/UlidTypeTest.php | 2 +- .../Doctrine/Tests/Types/UuidTypeTest.php | 2 +- .../Constraints/UniqueEntityValidatorTest.php | 14 +++--- .../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 | 4 +- .../ConfigurationTest.php | 4 +- .../DeprecationTest.php | 6 +-- .../LazyProxy/PhpDumper/ProxyDumperTest.php | 4 +- .../Bridge/Twig/Tests/AppVariableTest.php | 2 +- .../Twig/Tests/Command/DebugCommandTest.php | 4 +- .../Twig/Tests/Command/LintCommandTest.php | 2 +- .../Tests/Extension/CodeExtensionTest.php | 4 +- .../Tests/Extension/DumpExtensionTest.php | 4 +- .../Extension/FormExtensionDivLayoutTest.php | 4 +- .../Extension/HttpFoundationExtensionTest.php | 6 +-- .../Tests/Extension/RoutingExtensionTest.php | 2 +- .../Extension/SerializerExtensionTest.php | 2 +- .../Extension/StopwatchExtensionTest.php | 2 +- .../Extension/TranslationExtensionTest.php | 2 +- ...ranslationDefaultDomainNodeVisitorTest.php | 2 +- .../TranslationNodeVisitorTest.php | 2 +- .../TokenParser/FormThemeTokenParserTest.php | 2 +- .../Tests/Translation/TwigExtractorTest.php | 6 +-- .../DebugExtensionTest.php | 2 +- .../CacheWarmer/SerializerCacheWarmerTest.php | 2 +- .../Command/CachePoolClearCommandTest.php | 2 +- .../Command/CachePoolDeleteCommandTest.php | 2 +- .../EventDispatcherDebugCommandTest.php | 2 +- .../Command/SecretsRemoveCommandTest.php | 2 +- .../Tests/Command/SecretsSetCommandTest.php | 2 +- .../Command/TranslationDebugCommandTest.php | 2 +- ...TranslationUpdateCommandCompletionTest.php | 2 +- .../Tests/Command/WorkflowDumpCommandTest.php | 2 +- .../Controller/RedirectControllerTest.php | 6 +-- .../DataCollectorTranslatorPassTest.php | 4 +- .../Compiler/ProfilerPassTest.php | 2 +- .../DependencyInjection/ConfigurationTest.php | 8 ++-- .../FrameworkExtensionTestCase.php | 4 +- .../Functional/AnnotatedControllerTest.php | 2 +- .../Functional/ConfigDebugCommandTest.php | 2 +- .../ConfigDumpReferenceCommandTest.php | 2 +- .../Functional/ContainerDebugCommandTest.php | 4 +- .../Functional/DebugAutowiringCommandTest.php | 2 +- .../Tests/Functional/FragmentTest.php | 2 +- .../Tests/Functional/ProfilerTest.php | 2 +- .../Functional/RouterDebugCommandTest.php | 2 +- .../Tests/Functional/SecurityTest.php | 2 +- .../Tests/Functional/SerializerTest.php | 2 +- .../Tests/Functional/SessionTest.php | 2 +- .../Tests/Routing/RouterTest.php | 4 +- .../Tests/Translation/TranslatorTest.php | 2 +- ...erGlobalSecurityEventListenersPassTest.php | 2 +- .../Security/Factory/AbstractFactoryTest.php | 4 +- .../GuardAuthenticationFactoryTest.php | 4 +- .../SecurityExtensionTest.php | 12 ++--- .../Tests/Functional/AuthenticatorTest.php | 4 +- .../Tests/Functional/CsrfFormLoginTest.php | 4 +- .../Tests/Functional/FormLoginTest.php | 4 +- .../Functional/LocalizedRoutesAsPathTest.php | 4 +- .../Tests/Functional/RememberMeCookieTest.php | 2 +- .../Tests/Functional/RememberMeTest.php | 4 +- .../SecurityRoutingIntegrationTest.php | 8 ++-- .../Tests/Functional/SecurityTest.php | 2 +- .../Tests/Functional/SwitchUserTest.php | 4 +- .../DependencyInjection/TwigExtensionTest.php | 4 +- .../Controller/ProfilerControllerTest.php | 6 +-- .../Csp/ContentSecurityPolicyHandlerTest.php | 4 +- .../DependencyInjection/ConfigurationTest.php | 4 +- .../WebProfilerExtensionTest.php | 6 +-- .../WebDebugToolbarListenerTest.php | 4 +- .../Tests/Resources/IconTest.php | 2 +- .../Tests/Twig/WebProfilerExtensionTest.php | 2 +- .../Component/Asset/Tests/PackageTest.php | 2 +- .../Component/Asset/Tests/PathPackageTest.php | 4 +- .../Component/Asset/Tests/UrlPackageTest.php | 6 +-- .../StaticVersionStrategyTest.php | 2 +- .../BrowserKit/Tests/AbstractBrowserTest.php | 2 +- .../BrowserKit/Tests/CookieJarTest.php | 2 +- .../Component/BrowserKit/Tests/CookieTest.php | 4 +- .../BrowserKit/Tests/HttpBrowserTest.php | 4 +- .../Tests/Adapter/DoctrineDbalAdapterTest.php | 2 +- .../Tests/Adapter/MemcachedAdapterTest.php | 6 +-- .../Cache/Tests/Adapter/PdoAdapterTest.php | 2 +- .../Tests/Adapter/PdoDbalAdapterTest.php | 2 +- .../Cache/Tests/Adapter/RedisAdapterTest.php | 4 +- .../Tests/Adapter/RedisClusterAdapterTest.php | 2 +- ...TagAwareAndProxyAdapterIntegrationTest.php | 2 +- .../Component/Cache/Tests/CacheItemTest.php | 2 +- .../Tests/Builder/GeneratedConfigTest.php | 2 +- .../Config/Tests/ConfigCacheTest.php | 2 +- .../Config/Tests/Definition/ArrayNodeTest.php | 10 ++--- .../Config/Tests/Definition/BaseNodeTest.php | 2 +- .../Tests/Definition/BooleanNodeTest.php | 4 +- .../Builder/ArrayNodeDefinitionTest.php | 6 +-- .../Definition/Builder/ExprBuilderTest.php | 2 +- .../Dumper/YamlReferenceDumperTest.php | 2 +- .../Config/Tests/Definition/FloatNodeTest.php | 4 +- .../Tests/Definition/IntegerNodeTest.php | 4 +- .../Tests/Definition/NormalizationTest.php | 6 +-- .../Definition/PrototypedArrayNodeTest.php | 4 +- .../Tests/Definition/ScalarNodeTest.php | 8 ++-- .../Config/Tests/FileLocatorTest.php | 2 +- .../Config/Tests/Loader/FileLoaderTest.php | 2 +- .../Resource/ReflectionClassResourceTest.php | 2 +- .../Config/Tests/Util/XmlUtilsTest.php | 4 +- .../Console/Tests/ApplicationTest.php | 6 +-- .../Tests/CI/GithubActionReporterTest.php | 2 +- .../Console/Tests/Command/CommandTest.php | 4 +- .../Tests/Command/CompleteCommandTest.php | 6 +-- .../Command/DumpCompletionCommandTest.php | 2 +- .../Console/Tests/Command/HelpCommandTest.php | 2 +- .../Console/Tests/Command/ListCommandTest.php | 2 +- .../Tests/Completion/CompletionInputTest.php | 6 +-- .../AddConsoleCommandPassTest.php | 2 +- .../Descriptor/ApplicationDescriptionTest.php | 2 +- .../Tests/Formatter/OutputFormatterTest.php | 4 +- .../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 | 10 ++--- .../Console/Tests/Helper/TableTest.php | 6 +-- .../Console/Tests/Input/ArgvInputTest.php | 10 ++--- .../Console/Tests/Input/ArrayInputTest.php | 4 +- .../Tests/Input/InputDefinitionTest.php | 2 +- .../Console/Tests/Input/StringInputTest.php | 2 +- .../Tests/Logger/ConsoleLoggerTest.php | 4 +- .../Console/Tests/Output/OutputTest.php | 4 +- .../Tests/Question/ChoiceQuestionTest.php | 4 +- .../Question/ConfirmationQuestionTest.php | 2 +- .../Console/Tests/Question/QuestionTest.php | 12 ++--- .../Console/Tests/Style/SymfonyStyleTest.php | 4 +- .../Constraint/CommandIsSuccessfulTest.php | 2 +- .../Tests/CssSelectorConverterTest.php | 2 +- .../Tests/Node/SpecificityTest.php | 4 +- .../Handler/AbstractHandlerTestCase.php | 4 +- .../Parser/Handler/CommentHandlerTest.php | 4 +- .../Tests/Parser/Handler/HashHandlerTest.php | 4 +- .../Parser/Handler/IdentifierHandlerTest.php | 4 +- .../Parser/Handler/NumberHandlerTest.php | 4 +- .../Parser/Handler/StringHandlerTest.php | 4 +- .../Parser/Handler/WhitespaceHandlerTest.php | 4 +- .../CssSelector/Tests/Parser/ParserTest.php | 12 ++--- .../Tests/Parser/Shortcut/ClassParserTest.php | 2 +- .../Parser/Shortcut/ElementParserTest.php | 2 +- .../Tests/Parser/Shortcut/HashParserTest.php | 2 +- .../Tests/XPath/TranslatorTest.php | 10 ++--- .../DependencyInjection/Tests/AliasTest.php | 2 +- .../Argument/TaggedIteratorArgumentTest.php | 4 +- .../Tests/ChildDefinitionTest.php | 2 +- .../AliasDeprecatedPublicServicesPassTest.php | 2 +- .../Tests/Compiler/AutowirePassTest.php | 2 +- .../CheckArgumentsValidityPassTest.php | 2 +- .../Tests/Compiler/IntegrationTest.php | 2 +- .../PriorityTaggedServiceTraitTest.php | 2 +- .../Tests/Compiler/ResolveClassPassTest.php | 4 +- .../Compiler/ResolveFactoryClassPassTest.php | 2 +- .../Tests/ContainerBuilderTest.php | 4 +- .../Tests/ContainerTest.php | 4 +- .../Tests/CrossCheckTest.php | 2 +- .../Tests/DefinitionTest.php | 2 +- .../Tests/Dumper/PhpDumperTest.php | 4 +- .../Tests/Dumper/XmlDumperTest.php | 4 +- .../Tests/EnvVarProcessorTest.php | 36 +++++++-------- .../InvalidParameterTypeExceptionTest.php | 2 +- .../Tests/Extension/ExtensionTest.php | 2 +- .../Configurator/EnvConfiguratorTest.php | 2 +- .../Tests/Loader/FileLoaderTest.php | 2 +- .../Tests/Loader/IniFileLoaderTest.php | 2 +- .../Tests/Loader/LoaderResolverTest.php | 2 +- .../Tests/Loader/PhpFileLoaderTest.php | 2 +- .../Tests/Loader/YamlFileLoaderTest.php | 2 +- .../Tests/ParameterBag/ParameterBagTest.php | 4 +- .../Tests/AbstractCrawlerTestCase.php | 6 +-- .../Tests/Field/FileFormFieldTest.php | 2 +- .../Component/DomCrawler/Tests/FormTest.php | 6 +-- .../Tests/Html5ParserCrawlerTest.php | 4 +- .../Component/DomCrawler/Tests/ImageTest.php | 2 +- .../Component/DomCrawler/Tests/LinkTest.php | 2 +- .../DomCrawler/Tests/UriResolverTest.php | 2 +- .../Component/Dotenv/Tests/DotenvTest.php | 4 +- .../Tests/DebugClassLoaderTest.php | 2 +- .../ClassNotFoundErrorEnhancerTest.php | 2 +- .../UndefinedFunctionErrorEnhancerTest.php | 2 +- .../UndefinedMethodErrorEnhancerTest.php | 2 +- .../ErrorHandler/Tests/ErrorHandlerTest.php | 4 +- .../ErrorRenderer/HtmlErrorRendererTest.php | 2 +- .../Tests/Exception/FlattenExceptionTest.php | 4 +- .../Tests/Debug/WrappedListenerTest.php | 2 +- .../Tests/ExpressionLanguageTest.php | 6 +-- .../ExpressionLanguage/Tests/LexerTest.php | 2 +- .../Filesystem/Tests/FilesystemTest.php | 4 +- .../Component/Filesystem/Tests/PathTest.php | 30 ++++++------- .../Tests/Comparator/ComparatorTest.php | 4 +- .../Tests/Comparator/DateComparatorTest.php | 2 +- .../Tests/Comparator/NumberComparatorTest.php | 4 +- .../Component/Finder/Tests/FinderTest.php | 6 +-- .../Component/Finder/Tests/GitignoreTest.php | 4 +- .../Iterator/CustomFilterIteratorTest.php | 2 +- .../Iterator/DateRangeFilterIteratorTest.php | 2 +- .../Iterator/DepthRangeFilterIteratorTest.php | 2 +- .../ExcludeDirectoryFilterIteratorTest.php | 2 +- .../Iterator/FileTypeFilterIteratorTest.php | 2 +- .../FilecontentFilterIteratorTest.php | 2 +- .../Iterator/FilenameFilterIteratorTest.php | 2 +- .../MultiplePcreFilterIteratorTest.php | 2 +- .../Tests/Iterator/PathFilterIteratorTest.php | 2 +- .../Iterator/SizeRangeFilterIteratorTest.php | 2 +- .../Tests/Iterator/SortableIteratorTest.php | 2 +- .../Iterator/VcsIgnoredFilterIteratorTest.php | 2 +- .../Form/Tests/AbstractLayoutTestCase.php | 2 +- .../Tests/AbstractRequestHandlerTestCase.php | 6 +-- .../Form/Tests/ButtonBuilderTest.php | 4 +- .../Component/Form/Tests/ButtonTest.php | 2 +- .../Factory/CachingFactoryDecoratorTest.php | 4 +- .../Form/Tests/Command/DebugCommandTest.php | 2 +- .../Component/Form/Tests/CompoundFormTest.php | 2 +- .../Descriptor/AbstractDescriptorTestCase.php | 6 +-- .../DependencyInjection/FormPassTest.php | 4 +- .../Core/DataMapper/DataMapperTest.php | 2 +- .../DataMapper/PropertyPathMapperTest.php | 2 +- .../ChoiceToValueTransformerTest.php | 6 +-- .../DateIntervalToStringTransformerTest.php | 4 +- ...TimeImmutableToDateTimeTransformerTest.php | 2 +- ...imeToHtml5LocalDateTimeTransformerTest.php | 4 +- ...teTimeToLocalizedStringTransformerTest.php | 2 +- .../DateTimeToRfc3339TransformerTest.php | 6 +-- .../DateTimeToStringTransformerTest.php | 2 +- ...ntegerToLocalizedStringTransformerTest.php | 6 +-- ...NumberToLocalizedStringTransformerTest.php | 10 ++--- ...ercentToLocalizedStringTransformerTest.php | 2 +- .../StringToFloatTransformerTest.php | 4 +- .../UlidToStringTransformerTest.php | 2 +- .../WeekToArrayTransformerTest.php | 4 +- .../FixUrlProtocolListenerTest.php | 4 +- .../MergeCollectionListenerTestCase.php | 4 +- .../Extension/Core/Type/CheckboxTypeTest.php | 4 +- .../Extension/Core/Type/ChoiceTypeTest.php | 8 ++-- .../Extension/Core/Type/ColorTypeTest.php | 4 +- .../Core/Type/DateIntervalTypeTest.php | 2 +- .../Extension/Core/Type/DateTimeTypeTest.php | 2 +- .../Extension/Core/Type/DateTypeTest.php | 6 +-- .../Extension/Core/Type/EnumTypeTest.php | 4 +- .../Core/Type/ExtendedChoiceTypeTest.php | 2 +- .../Extension/Core/Type/FileTypeTest.php | 4 +- .../Extension/Core/Type/RepeatedTypeTest.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 +- .../Component/Form/Tests/FormConfigTest.php | 2 +- .../Form/Tests/FormErrorIteratorTest.php | 2 +- .../Form/Tests/ResolvedFormTypeTest.php | 2 +- .../Tests/Resources/TranslationFilesTest.php | 2 +- .../Component/Form/Tests/SimpleFormTest.php | 4 +- .../Form/Tests/Util/ServerParamsTest.php | 2 +- .../Form/Tests/Util/StringUtilTest.php | 6 +-- .../Tests/EventSourceHttpClientTest.php | 2 +- .../Exception/HttpExceptionTraitTest.php | 2 +- .../HttpClient/Tests/HttpClientTraitTest.php | 12 ++--- .../HttpClient/Tests/HttpOptionsTest.php | 2 +- .../HttpClient/Tests/MockHttpClientTest.php | 8 ++-- .../Tests/NoPrivateNetworkHttpClientTest.php | 2 +- .../Tests/Response/MockResponseTest.php | 2 +- .../Tests/Retry/GenericRetryStrategyTest.php | 6 +-- .../Tests/ScopingHttpClientTest.php | 2 +- .../Tests/AcceptHeaderItemTest.php | 4 +- .../HttpFoundation/Tests/AcceptHeaderTest.php | 10 ++--- .../Tests/BinaryFileResponseTest.php | 10 ++--- .../HttpFoundation/Tests/CookieTest.php | 2 +- .../Tests/ExpressionRequestMatcherTest.php | 2 +- .../HttpFoundation/Tests/File/FileTest.php | 2 +- .../Tests/File/UploadedFileTest.php | 4 +- .../HttpFoundation/Tests/HeaderUtilsTest.php | 8 ++-- .../HttpFoundation/Tests/IpUtilsTest.php | 10 ++--- .../AbstractRequestRateLimiterTest.php | 2 +- .../Tests/RequestMatcherTest.php | 4 +- .../HttpFoundation/Tests/RequestTest.php | 44 +++++++++---------- .../Tests/ResponseFunctionalTest.php | 2 +- .../HttpFoundation/Tests/ResponseTest.php | 6 +-- .../Session/Attribute/AttributeBagTest.php | 2 +- .../Attribute/NamespacedAttributeBagTest.php | 2 +- .../Tests/Session/SessionTest.php | 2 +- .../AbstractRedisSessionHandlerTestCase.php | 4 +- .../Handler/AbstractSessionHandlerTest.php | 2 +- .../Handler/IdentityMarshallerTest.php | 2 +- .../Handler/MemcachedSessionHandlerTest.php | 2 +- .../Handler/NativeFileSessionHandlerTest.php | 2 +- .../Storage/Handler/PdoSessionHandlerTest.php | 2 +- .../Handler/SessionHandlerFactoryTest.php | 2 +- .../Storage/Proxy/SessionHandlerProxyTest.php | 2 +- .../HttpFoundation/Tests/UrlHelperTest.php | 6 +-- .../ContainerControllerResolverTest.php | 2 +- .../Controller/ControllerResolverTest.php | 2 +- .../Tests/Controller/ErrorControllerTest.php | 2 +- .../DataCollector/LoggerDataCollectorTest.php | 2 +- .../DataCollector/MemoryDataCollectorTest.php | 2 +- ...sterControllerArgumentLocatorsPassTest.php | 4 +- .../DebugHandlersListenerTest.php | 2 +- .../DisallowRobotsIndexingListenerTest.php | 2 +- .../Tests/EventListener/ErrorListenerTest.php | 4 +- .../EventListener/ProfilerListenerTest.php | 2 +- .../EventListener/RouterListenerTest.php | 4 +- .../EventListener/SessionListenerTest.php | 2 +- .../EventListener/TestSessionListenerTest.php | 2 +- .../Tests/Exception/HttpExceptionTest.php | 2 +- .../Fragment/RoutableFragmentRendererTest.php | 4 +- .../Tests/HttpCache/HttpCacheTest.php | 8 ++-- .../HttpCache/ResponseCacheStrategyTest.php | 2 +- .../HttpKernel/Tests/HttpKernelTest.php | 2 +- .../Component/HttpKernel/Tests/KernelTest.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 +- .../Tests/Globals/AbstractIntlGlobalsTest.php | 2 +- .../Component/Intl/Tests/LanguagesTest.php | 8 ++-- .../Component/Intl/Tests/LocaleTest.php | 2 +- .../Component/Intl/Tests/TimezonesTest.php | 4 +- .../Intl/Tests/Util/IcuVersionTest.php | 4 +- .../Component/Intl/Tests/Util/VersionTest.php | 4 +- .../Adapter/ExtLdap/EntryManagerTest.php | 2 +- .../CheckLdapCredentialsListenerTest.php | 8 ++-- src/Symfony/Component/Lock/Tests/LockTest.php | 2 +- .../Store/DoctrineDbalPostgreSqlStoreTest.php | 2 +- .../Tests/Store/DoctrineDbalStoreTest.php | 4 +- .../Lock/Tests/Store/MongoDbStoreTest.php | 6 +-- .../Lock/Tests/Store/PdoDbalStoreTest.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/SesApiAsyncAwsTransportTest.php | 2 +- .../Tests/Transport/SesApiTransportTest.php | 2 +- .../SesHttpAsyncAwsTransportTest.php | 2 +- .../Tests/Transport/SesHttpTransportTest.php | 2 +- .../Transport/MandrillApiTransportTest.php | 2 +- .../Transport/MandrillHttpTransportTest.php | 2 +- .../Transport/MailgunApiTransportTest.php | 2 +- .../Transport/MailgunHttpTransportTest.php | 2 +- .../Transport/MailjetApiTransportTest.php | 4 +- .../Transport/OhMySmtpApiTransportTest.php | 2 +- .../Transport/PostmarkApiTransportTest.php | 2 +- .../Transport/SendgridApiTransportTest.php | 2 +- .../Transport/SendinblueApiTransportTest.php | 2 +- .../EventListener/MessageListenerTest.php | 2 +- .../UnsupportedSchemeExceptionTest.php | 4 +- .../Mailer/Tests/Transport/DsnTest.php | 4 +- .../Transport/NativeTransportFactoryTest.php | 4 +- .../Smtp/Stream/AbstractStreamTest.php | 2 +- .../Component/Mailer/Tests/TransportTest.php | 6 +-- .../Tests/Transport/ConnectionTest.php | 4 +- .../Amqp/Tests/Transport/ConnectionTest.php | 2 +- .../Tests/Transport/ConnectionTest.php | 4 +- .../Redis/Tests/Transport/ConnectionTest.php | 2 +- .../Tests/Transport/RedisReceiverTest.php | 4 +- .../Command/ConsumeMessagesCommandTest.php | 6 +-- .../Tests/Command/DebugCommandTest.php | 2 +- .../Command/SetupTransportsCommandTest.php | 2 +- .../ResetServicesListenerTest.php | 2 +- ...orkerOnCustomStopExceptionListenerTest.php | 2 +- .../StopWorkerOnFailureLimitListenerTest.php | 2 +- .../StopWorkerOnMemoryLimitListenerTest.php | 2 +- .../StopWorkerOnMessageLimitListenerTest.php | 2 +- .../StopWorkerOnRestartSignalListenerTest.php | 2 +- .../Tests/Handler/HandleDescriptorTest.php | 2 +- .../Messenger/Tests/MessageBusTest.php | 2 +- .../HandleMessageMiddlewareTest.php | 2 +- .../Retry/MultiplierRetryStrategyTest.php | 2 +- .../InMemoryTransportFactoryTest.php | 2 +- .../FlattenExceptionNormalizerTest.php | 2 +- .../Serialization/SerializerTest.php | 2 +- .../Component/Mime/Tests/AddressTest.php | 4 +- .../Mime/Tests/Crypto/DkimSignerTest.php | 4 +- .../Component/Mime/Tests/RawMessageTest.php | 2 +- .../Tests/Action/ActionCardTest.php | 4 +- .../Action/Input/MultiChoiceInputTest.php | 2 +- .../Tests/Action/OpenUriActionTest.php | 2 +- .../Tests/MicrosoftTeamsOptionsTest.php | 4 +- .../Tests/Section/SectionTest.php | 2 +- .../Bridge/Mobyt/Tests/MobytOptionsTest.php | 4 +- .../Bridge/Slack/Tests/SlackOptionsTest.php | 10 ++--- .../Tests/Channel/ChannelPolicyTest.php | 2 +- .../Tests/Event/FailedMessageEventTest.php | 2 +- .../Tests/Event/SentMessageEventTest.php | 2 +- .../UnsupportedSchemeExceptionTest.php | 4 +- .../Tests/Message/NullMessageTest.php | 2 +- .../Tests/Recipient/RecipientTest.php | 2 +- .../Notifier/Tests/Transport/DsnTest.php | 10 ++--- .../Tests/OptionsResolverTest.php | 4 +- .../Command/UserPasswordHashCommandTest.php | 2 +- .../Tests/Hasher/NativePasswordHasherTest.php | 2 +- .../Component/Process/Tests/ProcessTest.php | 22 +++++----- .../Tests/PropertyAccessorTest.php | 12 ++--- .../Tests/PropertyPathBuilderTest.php | 2 +- .../PropertyAccess/Tests/PropertyPathTest.php | 2 +- .../PropertyInfoPassTest.php | 2 +- .../Tests/Extractor/PhpStanExtractorTest.php | 24 +++++----- .../Extractor/ReflectionExtractorTest.php | 28 ++++++------ .../Tests/Policy/FixedWindowLimiterTest.php | 2 +- .../RateLimiter/Tests/Policy/RateTest.php | 2 +- .../Tests/RateLimiterFactoryTest.php | 4 +- .../Routing/Tests/Annotation/RouteTest.php | 4 +- .../Tests/Generator/UrlGeneratorTest.php | 6 +-- .../Loader/AnnotationClassLoaderTestCase.php | 2 +- .../Tests/Loader/ContainerLoaderTest.php | 2 +- .../Routing/Tests/Loader/ObjectLoaderTest.php | 2 +- .../Tests/Loader/XmlFileLoaderTest.php | 4 +- .../Tests/Loader/YamlFileLoaderTest.php | 4 +- .../Dumper/CompiledUrlMatcherDumperTest.php | 2 +- .../Dumper/StaticPrefixCollectionTest.php | 2 +- .../ExpressionLanguageProviderTest.php | 4 +- .../Tests/RouteCollectionBuilderTest.php | 2 +- .../Routing/Tests/RouteCompilerTest.php | 10 ++--- .../Component/Routing/Tests/RouteTest.php | 6 +-- .../AccessDecisionManagerTest.php | 2 +- .../AuthorizationCheckerTest.php | 2 +- .../Authorization/ExpressionLanguageTest.php | 4 +- .../Voter/AuthenticatedVoterTest.php | 6 +-- .../Voter/RoleHierarchyVoterTest.php | 4 +- .../Authorization/Voter/RoleVoterTest.php | 4 +- .../Encoder/NativePasswordEncoderTest.php | 2 +- .../Tests/Resources/TranslationFilesTest.php | 2 +- .../Security/Core/Tests/SecurityTest.php | 4 +- .../Constraints/UserPasswordTest.php | 2 +- .../UserPasswordValidatorTestCase.php | 4 +- .../GuardBridgeAuthenticatorTest.php | 2 +- .../GuardAuthenticationListenerTest.php | 2 +- .../Tests/GuardAuthenticatorHandlerTest.php | 2 +- .../AuthenticatorManagerTest.php | 4 +- .../AbstractLoginFormAuthenticatorTest.php | 2 +- .../FormLoginAuthenticatorTest.php | 6 +-- .../HttpBasicAuthenticatorTest.php | 2 +- .../JsonLoginAuthenticatorTest.php | 6 +-- .../LoginLinkAuthenticatorTest.php | 2 +- .../RememberMeAuthenticatorTest.php | 2 +- .../RemoteUserAuthenticatorTest.php | 2 +- .../RetryAuthenticationEntryPointTest.php | 2 +- .../CheckCredentialsListenerTest.php | 4 +- .../CheckRememberMeConditionsListenerTest.php | 2 +- .../UserProviderListenerTest.php | 2 +- .../Tests/Firewall/ContextListenerTest.php | 2 +- .../Tests/Firewall/ExceptionListenerTest.php | 4 +- .../Tests/Firewall/LogoutListenerTest.php | 2 +- ...PasswordFormAuthenticationListenerTest.php | 6 +-- .../Security/Http/Tests/HttpUtilsTest.php | 4 +- .../Tests/LoginLink/LoginLinkHandlerTest.php | 2 +- .../AbstractRememberMeServicesTest.php | 4 +- .../TokenBasedRememberMeServicesTest.php | 2 +- .../Tests/Annotation/ContextTest.php | 8 ++-- .../Tests/Annotation/MaxDepthTest.php | 2 +- .../Tests/Annotation/SerializedNameTest.php | 2 +- .../DeserializeNestedArrayOfObjectsTest.php | 2 +- .../Tests/Encoder/JsonDecodeTest.php | 4 +- .../Tests/Encoder/JsonEncodeTest.php | 2 +- .../CompiledClassMetadataFactoryTest.php | 2 +- .../CamelCaseToSnakeCaseNameConverterTest.php | 2 +- .../MetadataAwareNameConverterTest.php | 6 +-- .../Normalizer/AbstractNormalizerTest.php | 2 +- .../ConstraintViolationListNormalizerTest.php | 2 +- .../Normalizer/DataUriNormalizerTest.php | 4 +- .../Normalizer/DateIntervalNormalizerTest.php | 2 +- .../Normalizer/DateTimeNormalizerTest.php | 6 +-- .../Tests/Normalizer/UidNormalizerTest.php | 4 +- .../Serializer/Tests/SerializerTest.php | 4 +- .../Stopwatch/Tests/StopwatchPeriodTest.php | 4 +- .../String/Tests/AbstractAsciiTestCase.php | 2 +- .../Component/String/Tests/FunctionsTest.php | 6 +-- .../Tests/Inflector/EnglishInflectorTest.php | 4 +- .../Tests/Inflector/FrenchInflectorTest.php | 2 +- .../String/Tests/Slugger/AsciiSluggerTest.php | 2 +- .../Templating/Tests/PhpEngineTest.php | 2 +- .../Tests/TemplateNameParserTest.php | 2 +- .../Command/TranslationPullCommandTest.php | 2 +- .../Command/TranslationPushCommandTest.php | 2 +- .../Tests/Command/XliffLintCommandTest.php | 4 +- .../UnsupportedSchemeExceptionTest.php | 4 +- .../Tests/Extractor/PhpExtractorTest.php | 2 +- .../Tests/Formatter/IntlFormatterTest.php | 2 +- .../Tests/Formatter/MessageFormatterTest.php | 2 +- .../Translation/Tests/Provider/DsnTest.php | 10 ++--- .../Translation/Tests/TranslatableTest.php | 4 +- .../Translation/Tests/TranslatorCacheTest.php | 2 +- .../Translation/Tests/TranslatorTest.php | 14 +++--- .../Tests/Util/ArrayConverterTest.php | 2 +- .../Tests/Command/GenerateUlidCommandTest.php | 2 +- .../Tests/Command/GenerateUuidCommandTest.php | 8 ++-- src/Symfony/Component/Uid/Tests/UlidTest.php | 8 ++-- src/Symfony/Component/Uid/Tests/UuidTest.php | 14 +++--- .../Tests/ConstraintValidatorTest.php | 2 +- .../Tests/ConstraintViolationListTest.php | 2 +- .../Tests/Constraints/AllValidatorTest.php | 2 +- .../Constraints/AtLeastOneOfValidatorTest.php | 4 +- .../Tests/Constraints/BicValidatorTest.php | 6 +-- .../Tests/Constraints/BlankValidatorTest.php | 2 +- .../Constraints/CardSchemeValidatorTest.php | 4 +- .../Tests/Constraints/ChoiceValidatorTest.php | 14 +++--- .../Validator/Tests/Constraints/CidrTest.php | 4 +- .../Tests/Constraints/CidrValidatorTest.php | 12 ++--- .../Constraints/CountryValidatorTest.php | 8 ++-- .../Constraints/CssColorValidatorTest.php | 38 ++++++++-------- .../Constraints/CurrencyValidatorTest.php | 4 +- .../Constraints/DateTimeValidatorTest.php | 4 +- .../Tests/Constraints/DateValidatorTest.php | 4 +- .../Constraints/DivisibleByValidatorTest.php | 2 +- .../Tests/Constraints/EmailValidatorTest.php | 12 ++--- .../ExpressionLanguageSyntaxTest.php | 2 +- .../Validator/Tests/Constraints/FileTest.php | 6 +-- .../Constraints/FileValidatorTestCase.php | 12 ++--- .../Constraints/HostnameValidatorTest.php | 8 ++-- .../Tests/Constraints/IbanValidatorTest.php | 10 ++--- .../Tests/Constraints/ImageValidatorTest.php | 26 +++++------ .../Constraints/IsFalseValidatorTest.php | 2 +- .../Tests/Constraints/IsNullValidatorTest.php | 2 +- .../Tests/Constraints/IsTrueValidatorTest.php | 2 +- .../Tests/Constraints/IsinValidatorTest.php | 8 ++-- .../Tests/Constraints/JsonValidatorTest.php | 4 +- .../Constraints/LanguageValidatorTest.php | 8 ++-- .../Tests/Constraints/LengthTest.php | 2 +- .../Tests/Constraints/LengthValidatorTest.php | 10 ++--- .../Tests/Constraints/LocaleValidatorTest.php | 6 +-- .../Tests/Constraints/LuhnValidatorTest.php | 6 +-- .../Constraints/NotBlankValidatorTest.php | 4 +- .../NotCompromisedPasswordValidatorTest.php | 4 +- .../Constraints/NotNullValidatorTest.php | 4 +- .../Validator/Tests/Constraints/RangeTest.php | 4 +- .../Tests/Constraints/RangeValidatorTest.php | 10 ++--- .../Validator/Tests/Constraints/RegexTest.php | 2 +- .../Tests/Constraints/RegexValidatorTest.php | 6 +-- .../Tests/Constraints/TimeValidatorTest.php | 4 +- .../Tests/Constraints/TimezoneTest.php | 2 +- .../Constraints/TimezoneValidatorTest.php | 14 +++--- .../Tests/Constraints/TypeValidatorTest.php | 4 +- .../Tests/Constraints/UlidValidatorTest.php | 2 +- .../Tests/Constraints/UniqueValidatorTest.php | 6 +-- .../Tests/Constraints/UrlValidatorTest.php | 12 ++--- .../Tests/Constraints/UuidValidatorTest.php | 10 ++--- .../AddAutoMappingConfigurationPassTest.php | 2 +- .../Mapping/Loader/AnnotationLoaderTest.php | 2 +- .../Mapping/Loader/PropertyInfoLoaderTest.php | 2 +- .../Mapping/Loader/YamlFileLoaderTest.php | 2 +- .../Tests/Resources/TranslationFilesTest.php | 2 +- .../Validator/Tests/Util/PropertyPathTest.php | 2 +- .../Validator/RecursiveValidatorTest.php | 4 +- .../VarDumper/Tests/Caster/CasterTest.php | 2 +- .../VarDumper/Tests/Caster/DateCasterTest.php | 8 ++-- .../VarDumper/Tests/Caster/SplCasterTest.php | 4 +- .../Tests/Caster/XmlReaderCasterTest.php | 2 +- .../Command/Descriptor/CliDescriptorTest.php | 2 +- .../Command/Descriptor/HtmlDescriptorTest.php | 2 +- .../Tests/Command/ServerDumpCommandTest.php | 2 +- .../VarDumper/Tests/Dumper/CliDumperTest.php | 4 +- .../VarDumper/Tests/Dumper/HtmlDumperTest.php | 2 +- .../VarExporter/Tests/InstantiatorTest.php | 2 +- .../VarExporter/Tests/VarExporterTest.php | 4 +- .../Component/WebLink/Tests/LinkTest.php | 4 +- .../Component/Workflow/Tests/WorkflowTest.php | 2 +- .../Yaml/Tests/Command/LintCommandTest.php | 2 +- .../Component/Yaml/Tests/DumperTest.php | 4 +- .../Component/Yaml/Tests/InlineTest.php | 42 +++++++++--------- .../Component/Yaml/Tests/ParserTest.php | 32 +++++++------- .../Translation/Test/TranslatorTest.php | 14 +++--- 580 files changed, 1184 insertions(+), 1184 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php b/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php index 25cc33fb4ae9f..8146adb9f8e87 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php @@ -134,7 +134,7 @@ public function testSerialization($param, array $types, $expected) $this->assertTrue($collectedQueries['default'][0]['runnable']); } - public function paramProvider(): array + public static function paramProvider(): array { return [ ['some value', [], 'some value'], diff --git a/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorWithDebugStackTest.php b/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorWithDebugStackTest.php index f0962eff3132d..64bee1203b781 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorWithDebugStackTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorWithDebugStackTest.php @@ -107,7 +107,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 b6f415e2145f5..97cec26cf7ed7 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php @@ -84,7 +84,7 @@ public function testFixManagersAutoMappingsWithTwoAutomappings() $method->invoke($this->extension, $emConfigs, $bundles); } - public function getAutomappingData() + public static function getAutomappingData() { return [ [ @@ -197,7 +197,7 @@ public function testMappingTypeDetection() $this->assertSame($mappingType, \PHP_VERSION_ID < 80000 ? 'annotation' : 'attribute'); } - public function providerBasicDrivers() + public static function providerBasicDrivers() { return [ ['doctrine.orm.cache.apc.class', ['type' => 'apc']], @@ -276,7 +276,7 @@ public function testUnrecognizedCacheDriverException() $this->invokeLoadCacheDriver($objectManager, $container, $cacheName); } - public function providerBundles() + public static function providerBundles() { yield ['AnnotationsBundle', 'annotation', '/Entity']; yield ['AnnotationsOneLineBundle', 'annotation', '/Entity']; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php index 7d253dc59b85d..50e083234d7cd 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php @@ -262,7 +262,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'], @@ -270,7 +270,7 @@ public function provideGuidEntityClasses() ]; } - public function provideUidEntityClasses() + public static function provideUidEntityClasses() { return [ ['Symfony\Bridge\Doctrine\Tests\Fixtures\UuidIdEntity'], diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php index 1e71bf68b4ee2..d8491588fe357 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/Logger/DbalLoggerTest.php b/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php index 710e87a15e0b8..91061632815d8 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php @@ -43,7 +43,7 @@ public function testLog($sql, $params, $logParams) $dbalLogger->startQuery($sql, $params); } - public function getLogFixtures() + public static function getLogFixtures() { return [ ['SQL', null, []], diff --git a/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php b/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php index 2b8a25b4ee588..3e24f83f690f2 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php @@ -79,7 +79,7 @@ private function getResourceFromString(string $str) return $res; } - public function provideExecuteMethod(): array + public static function provideExecuteMethod(): array { return [ 'executeStatement' => [ @@ -173,7 +173,7 @@ public function testWithParamBound(callable $executeMethod) $this->assertGreaterThan(0, $debug[1]['executionMS']); } - public function provideEndTransactionMethod(): array + public static function provideEndTransactionMethod(): array { return [ 'commit' => [ @@ -223,7 +223,7 @@ public function testTransaction(callable $endTransactionMethod, string $expected $this->assertGreaterThan(0, $debug[6]['executionMS']); } - public function provideExecuteAndEndTransactionMethods(): array + public static function provideExecuteAndEndTransactionMethods(): array { return [ 'commit and exec' => [ diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php index 42a8d6560eb08..bbe4b6ab10019 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php @@ -146,7 +146,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/Types/UlidTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Types/UlidTypeTest.php index 8fd4b8b0a04b6..06114aeea0050 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Types/UlidTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Types/UlidTypeTest.php @@ -140,7 +140,7 @@ public function testGetGuidTypeDeclarationSQL(AbstractPlatform $platform, string $this->assertEquals($expectedDeclaration, $this->type->getSqlDeclaration(['length' => 36], $platform)); } - public function provideSqlDeclarations(): array + public static function provideSqlDeclarations(): array { return [ [new PostgreSQLPlatform(), 'UUID'], diff --git a/src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php index 9b904b89d9d62..d49afc5f97ec4 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php @@ -152,7 +152,7 @@ public function testGetGuidTypeDeclarationSQL(AbstractPlatform $platform, string $this->assertEquals($expectedDeclaration, $this->type->getSqlDeclaration(['length' => 36], $platform)); } - public function provideSqlDeclarations(): array + public static function provideSqlDeclarations(): array { return [ [new PostgreSQLPlatform(), 'UUID'], diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php index 78d8ae01dc328..a4e928438cf0c 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php @@ -186,7 +186,7 @@ public function testValidateUniqueness(UniqueEntity $constraint) ->assertRaised(); } - public function provideUniquenessConstraints(): iterable + public static function provideUniquenessConstraints(): iterable { yield 'Doctrine style' => [new UniqueEntity([ 'message' => 'myMessage', @@ -221,7 +221,7 @@ public function testValidateCustomErrorPath(UniqueEntity $constraint) ->assertRaised(); } - public function provideConstraintsWithCustomErrorPath(): iterable + public static function provideConstraintsWithCustomErrorPath(): iterable { yield 'Doctrine style' => [new UniqueEntity([ 'message' => 'myMessage', @@ -282,7 +282,7 @@ public function testValidateUniquenessWithIgnoreNullDisabled(UniqueEntity $const ->assertRaised(); } - public function provideConstraintsWithIgnoreNullDisabled(): iterable + public static function provideConstraintsWithIgnoreNullDisabled(): iterable { yield 'Doctrine style' => [new UniqueEntity([ 'message' => 'myMessage', @@ -331,7 +331,7 @@ public function testNoValidationIfFirstFieldIsNullAndNullValuesAreIgnored(Unique $this->assertNoViolation(); } - public function provideConstraintsWithIgnoreNullEnabled(): iterable + public static function provideConstraintsWithIgnoreNullEnabled(): iterable { yield 'Doctrine style' => [new UniqueEntity([ 'message' => 'myMessage', @@ -432,7 +432,7 @@ function () use ($entity) { $this->assertNoViolation(); } - public function provideConstraintsWithCustomRepositoryMethod(): iterable + public static function provideConstraintsWithCustomRepositoryMethod(): iterable { yield 'Doctrine style' => [new UniqueEntity([ 'message' => 'myMessage', @@ -473,7 +473,7 @@ public function testValidateResultTypes($entity1, $result) $this->assertNoViolation(); } - public function resultTypesProvider() + public static function resultTypesProvider() { $entity = new SingleIntIdEntity(1, 'foo'); @@ -886,7 +886,7 @@ public function testValueCanBeNull() $this->assertNoViolation(); } - public function resultWithEmptyIterator(): array + public static function resultWithEmptyIterator(): array { $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 034cd001aaebb..a72e78f6433ac 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php @@ -209,7 +209,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 0afb8eb4cfbe8..00aa6117c09a9 100644 --- a/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php +++ b/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php @@ -97,7 +97,7 @@ public function testIsActivated($url, $record, $expected) self::assertEquals($expected, $strategy->isHandlerActivated($record)); } - public function isActivatedProvider(): array + public static function isActivatedProvider(): array { 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 09e71e0b332ef..cd37c9e7a8b0a 100644 --- a/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php +++ b/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php @@ -49,7 +49,7 @@ public function testIsActivated(string $url, array $record, bool $expected) self::assertEquals($expected, $strategy->isHandlerActivated($record)); } - public function isActivatedProvider(): array + public static function isActivatedProvider(): array { 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 d01ca9f83ea1d..044c7e6172e31 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 = self::getRecord(); @@ -56,7 +56,7 @@ public function testDatetimeRfc3339Format(array $record, $expectedTimestamp) self::assertSame($expectedTimestamp, $records[0]['timestamp_rfc3339']); } - public function providerDatetimeRfc3339FormatTests(): array + public static function providerDatetimeRfc3339FormatTests(): array { $record = self::getRecord(); diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/ConfigurationTest.php b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/ConfigurationTest.php index 3e3a831308a43..09a2a32054b69 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/ConfigurationTest.php +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/ConfigurationTest.php @@ -179,7 +179,7 @@ public function testItCanTellWhetherToDisplayAStackTrace() $this->assertTrue($configuration->shouldDisplayStackTrace('interesting')); } - public function provideItCanBeDisabled(): array + public static function provideItCanBeDisabled(): array { return [ ['disabled', false], @@ -248,7 +248,7 @@ public function testToleratesForIndividualGroups(string $deprecationsHelper, arr } } - public function provideDataForToleratesForGroup() { + public static function provideDataForToleratesForGroup() { yield 'total threshold not reached' => ['max[total]=1', [ 'unsilenced' => 0, diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php index a1d3c06ea668f..5c7cf991b3f2f 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/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php index e787da909bbb3..65c74c0ff7697 100644 --- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php +++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php @@ -93,7 +93,7 @@ public function testCorrectAssigning(Definition $definition, $access) $this->assertStringMatchesFormat('%A$this->'.$access.'[\'foo\'] = %A', $code); } - public function getPrivatePublicDefinitions() + public static function getPrivatePublicDefinitions() { return [ [ @@ -164,7 +164,7 @@ protected function createProxy(\$class, \Closure \$factory) $this->assertSame(123, @$foo->dynamicProp); } - public function getProxyCandidates(): array + public static function getProxyCandidates(): array { $definitions = [ [new Definition(__CLASS__), true], diff --git a/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php b/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php index 84e9ea8ce0696..ea3fbfda3a659 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/Command/DebugCommandTest.php b/src/Symfony/Bridge/Twig/Tests/Command/DebugCommandTest.php index 2488a27677af9..45591415e3312 100644 --- a/src/Symfony/Bridge/Twig/Tests/Command/DebugCommandTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Command/DebugCommandTest.php @@ -84,7 +84,7 @@ public function testDebugTemplateName(array $input, string $output, array $paths $this->assertStringMatchesFormat($output, $tester->getDisplay(true)); } - public function getDebugTemplateNameTestData() + public static function getDebugTemplateNameTestData() { $defaultPaths = [ 'templates/' => null, @@ -315,7 +315,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions(): iterable + public static function provideCompletionSuggestions(): iterable { yield 'name' => [['email'], []]; yield 'option --format' => [['--format', ''], ['text', 'json']]; diff --git a/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php b/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php index 6a3d640b2d5b2..a898680fdd3e3 100644 --- a/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php @@ -150,7 +150,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $tester->complete($input)); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'option' => [['--format', ''], ['txt', 'json', 'github']]; } diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php index 33bb266cb6a2f..38983cbd697f1 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(): array + public static function getClassNameProvider(): array { return [ ['F\Q\N\Foo', 'Foo'], @@ -52,7 +52,7 @@ public function getClassNameProvider(): array ]; } - public function getMethodNameProvider(): array + public static function getMethodNameProvider(): array { return [ ['F\Q\N\Foo::Method', 'Foo::Method()'], diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php index d0825221663ad..8fe455e5d5706 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php @@ -53,7 +53,7 @@ public function testDumpTag($template, $debug, $expectedOutput, $expectedDumped) $this->assertSame($expectedDumped, $dumped); } - public function getDumpTags() + public static function getDumpTags() { return [ ['A{% dump %}B', true, 'AB', []], @@ -88,7 +88,7 @@ public function testDump($context, $args, $expectedOutput, $debug = true) $this->assertEquals($expectedOutput, $dump); } - public function getDumpArgs() + public static function getDumpArgs() { return [ [[], [], '', false], diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php index 6a3ddfe361111..3809f3fa1f4cf 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/Extension/HttpFoundationExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/HttpFoundationExtensionTest.php index ea3bb17bb3038..28ddacd018e47 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/HttpFoundationExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/HttpFoundationExtensionTest.php @@ -32,7 +32,7 @@ public function testGenerateAbsoluteUrl($expected, $path, $pathinfo) $this->assertEquals($expected, $extension->generateAbsoluteUrl($path)); } - public function getGenerateAbsoluteUrlData() + public static function getGenerateAbsoluteUrlData() { return [ ['http://localhost/foo.png', '/foo.png', '/foo/bar.html'], @@ -84,7 +84,7 @@ public function testGenerateAbsoluteUrlWithoutRequestAndRequestContext($path) $this->assertEquals($path, $extension->generateAbsoluteUrl($path)); } - public function getGenerateAbsoluteUrlRequestContextData() + public static function getGenerateAbsoluteUrlRequestContextData() { return [ ['/foo.png', '/foo', 'localhost', 'http', 80, 443, 'http://localhost/foo.png'], @@ -129,7 +129,7 @@ public function testGenerateRelativePath($expected, $path, $pathinfo) $this->assertEquals($expected, $extension->generateRelativePath($path)); } - public function getGenerateRelativePathData() + public static function getGenerateRelativePathData() { return [ ['../foo.png', '/foo.png', '/foo/bar.html'], diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php index 5a995c8eeb76c..742a74f325b91 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php @@ -34,7 +34,7 @@ public function testEscaping($template, $mustBeEscaped) $this->assertSame($mustBeEscaped, $nodes->getNode('body')->getNode(0)->getNode('expr') instanceof FilterExpression); } - public function getEscapingTemplates() + public static function getEscapingTemplates() { return [ ['{{ path("foo") }}', false], diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/SerializerExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/SerializerExtensionTest.php index ef54ee2775f15..0c36c8c6b4b93 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/SerializerExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/SerializerExtensionTest.php @@ -41,7 +41,7 @@ public function testSerializeFilter(string $template, string $expectedResult) self::assertSame($expectedResult, $twig->render('template', ['object' => new SerializerModelFixture()])); } - public function serializerDataProvider(): \Generator + public static function serializerDataProvider(): \Generator { yield ['{{ object|serialize }}', '{"name":"howdy","title":"fixture"}']; yield ['{{ object|serialize(\'yaml\') }}', '{ name: howdy, title: fixture }']; diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php index 65f1bd69bff7c..59a393744a9e2 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php @@ -41,7 +41,7 @@ public function testTiming($template, $events) } } - public function getTimingTemplates() + public static function getTimingTemplates() { return [ ['{% stopwatch "foo" %}something{% endstopwatch %}', 'foo'], diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php index 86f50da0b7db8..8e7ab4fca5ae2 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php @@ -61,7 +61,7 @@ public function testTransComplexBody() $this->getTemplate("{% trans %}\n{{ 1 + 2 }}{% endtrans %}")->render(); } - public function getTransTests() + public static function getTransTests() { return [ // trans tag diff --git a/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationDefaultDomainNodeVisitorTest.php b/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationDefaultDomainNodeVisitorTest.php index cc2b6ef2ac39e..25b8166eae62a 100644 --- a/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationDefaultDomainNodeVisitorTest.php +++ b/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationDefaultDomainNodeVisitorTest.php @@ -76,7 +76,7 @@ public function testNewModuleWithoutDefaultDomainTag(Node $node) $this->assertEquals([[self::$message, null]], $visitor->getMessages()); } - public function getDefaultDomainAssignmentTestData() + public static function getDefaultDomainAssignmentTestData() { return [ [TwigNodeProvider::getTransFilter(self::$message)], diff --git a/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php b/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php index 069914a4fc066..bf073602583f7 100644 --- a/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php +++ b/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php @@ -51,7 +51,7 @@ public function testMessageExtractionWithInvalidDomainNode() $this->testMessagesExtraction($node, [[$message, TranslationNodeVisitor::UNDEFINED_DOMAIN]]); } - public function getMessagesExtractionTestData() + public static function getMessagesExtractionTestData() { $message = 'new key'; $domain = 'domain'; diff --git a/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php b/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php index d404060091f83..41504050f74f8 100644 --- a/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php +++ b/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php @@ -40,7 +40,7 @@ public function testCompile($source, $expected) $this->assertEquals($expected, $parser->parse($stream)->getNode('body')->getNode(0)); } - public function getTestsForFormTheme() + public static function getTestsForFormTheme() { return [ [ diff --git a/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php b/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php index 4a8b4d19c066e..060a0578f2044 100644 --- a/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php @@ -54,7 +54,7 @@ public function testExtract($template, $messages) } } - public function getExtractData() + public static function getExtractData() { return [ ['{{ "new key" | trans() }}', ['new key' => 'messages']], @@ -102,7 +102,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!']]], @@ -133,7 +133,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/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php b/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php index 31afae4d93acb..89dee3e889ee6 100644 --- a/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php +++ b/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php @@ -74,7 +74,7 @@ public function testUnsetClosureFileInfoShouldBeRegisteredInVarCloner() $this->assertTrue($called); } - public function provideServicesUsingDumpDestinationCreation(): array + public static function provideServicesUsingDumpDestinationCreation(): array { return [ ['tcp://localhost:1234', 'tcp://localhost:1234', null], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/SerializerCacheWarmerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/SerializerCacheWarmerTest.php index e64196f64d5c6..85dbd88104f57 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/SerializerCacheWarmerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/SerializerCacheWarmerTest.php @@ -40,7 +40,7 @@ public function testWarmUp(array $loaders) $this->assertTrue($arrayPool->getItem('Symfony_Bundle_FrameworkBundle_Tests_Fixtures_Serialization_Author')->isHit()); } - public function loaderProvider() + public static function loaderProvider() { return [ [ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolClearCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolClearCommandTest.php index 169fcd8c2d75d..cc4573fafdc62 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolClearCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolClearCommandTest.php @@ -44,7 +44,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'pool_name' => [ ['f'], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolDeleteCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolDeleteCommandTest.php index f643bc1259901..7cd2366703c3b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolDeleteCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolDeleteCommandTest.php @@ -98,7 +98,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'pool_name' => [ ['f'], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/EventDispatcherDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/EventDispatcherDebugCommandTest.php index a506ac2d2915f..9bc054f22a942 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/EventDispatcherDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/EventDispatcherDebugCommandTest.php @@ -31,7 +31,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'event' => [[''], ['Symfony\Component\Mailer\Event\MessageEvent', 'console.command']]; yield 'event for other dispatcher' => [['--dispatcher', 'other_event_dispatcher', ''], ['other_event', 'App\OtherEvent']]; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsRemoveCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsRemoveCommandTest.php index c02bc91761084..88c247ec61ebc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsRemoveCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsRemoveCommandTest.php @@ -37,7 +37,7 @@ public function testComplete(bool $withLocalVault, array $input, array $expected $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'name' => [true, [''], ['SECRET', 'OTHER_SECRET']]; yield '--local name (with local vault)' => [true, ['--local', ''], ['SECRET']]; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsSetCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsSetCommandTest.php index 135907b374d26..8e8e968c8f710 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsSetCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsSetCommandTest.php @@ -32,7 +32,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'name' => [[''], ['SECRET', 'OTHER_SECRET']]; yield '--local name (with local vault)' => [['--local', ''], ['SECRET', 'OTHER_SECRET']]; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php index 70f94d6a34d48..846abd44500e0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php @@ -269,7 +269,7 @@ function ($path, $catalogue) use ($extractedMessagesWithDomains) { $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'locale' => [ [''], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandCompletionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandCompletionTest.php index 49ba74caf6a1b..91999d288266e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandCompletionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandCompletionTest.php @@ -42,7 +42,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { $bundle = new ExtensionPresentBundle(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/WorkflowDumpCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/WorkflowDumpCommandTest.php index 13a63b40d97fa..d28f53261c0de 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/WorkflowDumpCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/WorkflowDumpCommandTest.php @@ -31,7 +31,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions(): iterable + public static function provideCompletionSuggestions(): iterable { yield 'option --dump-format' => [['--dump-format', ''], ['puml', 'mermaid', 'dot']]; } 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/Compiler/DataCollectorTranslatorPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php index 0167f55101b7b..a5d58edbb4226 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php @@ -65,7 +65,7 @@ public function testProcessKeepsDataCollectorIfTranslatorImplementsTranslatorBag $this->assertTrue($this->container->hasDefinition('data_collector.translation')); } - public function getImplementingTranslatorBagInterfaceTranslatorClassNames() + public static function getImplementingTranslatorBagInterfaceTranslatorClassNames() { return [ ['Symfony\Component\Translation\Translator'], @@ -97,7 +97,7 @@ public function testProcessRemovesDataCollectorIfTranslatorDoesNotImplementTrans $this->assertFalse($this->container->hasDefinition('data_collector.translation')); } - public function getNotImplementingTranslatorBagInterfaceTranslatorClassNames() + public static function getNotImplementingTranslatorBagInterfaceTranslatorClassNames() { return [ ['Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\TranslatorWithTranslatorBag'], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php index 65f047426ae44..9792d2266050c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php @@ -62,7 +62,7 @@ public function testValidCollector() $this->assertEquals('add', $methodCalls[0][0]); // grab the method part of the first call } - public function provideValidCollectorWithTemplateUsingAutoconfigure(): \Generator + public static function provideValidCollectorWithTemplateUsingAutoconfigure(): \Generator { yield [new class() implements TemplateAwareDataCollectorInterface { public function collect(Request $request, Response $response, \Throwable $exception = null) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php index d20f4e7b78554..47b66baf35861 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -60,7 +60,7 @@ public function testInvalidSessionName($sessionName) ); } - public function getTestInvalidSessionName() + public static function getTestInvalidSessionName() { return [ ['a.b'], @@ -113,7 +113,7 @@ public function testValidAssetsPackageNameConfiguration($packageName) $this->assertArrayHasKey($packageName, $config['assets']['packages']); } - public function provideValidAssetsPackageNameConfigurationTests() + public static function provideValidAssetsPackageNameConfigurationTests() { return [ ['foobar'], @@ -139,7 +139,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) { @@ -192,7 +192,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/FrameworkExtensionTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php index 9abcaf40eb9cd..a1c67eef1874c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php @@ -1751,7 +1751,7 @@ public function testAppRedisTagAwareAdapter(string $configFile) } } - public function appRedisTagAwareConfigProvider(): array + public static function appRedisTagAwareConfigProvider(): array { return [ ['cache_app_redis_tag_aware'], @@ -1930,7 +1930,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/Functional/AnnotatedControllerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php index 20d3609c16a84..e8641eac8bbfb 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AnnotatedControllerTest.php @@ -29,7 +29,7 @@ public function testAnnotatedController($path, $expectedValue) $this->assertSame('/annotated/create-transaction', $router->generate('symfony_framework_tests_functional_test_annotated_createtransaction')); } - public function getRoutes() + public static function getRoutes() { return [ ['/null_request', 'Symfony\Component\HttpFoundation\Request'], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php index 463318af39f47..11afd0d8a5fdc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php @@ -138,7 +138,7 @@ public function testComplete(array $input, array $expectedSuggestions) } } - public function provideCompletionSuggestions(): \Generator + public static function provideCompletionSuggestions(): \Generator { yield 'name' => [[''], ['default_config_test', 'extension_without_config_test', 'framework', 'test']]; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php index 4747b785f8149..e944960aea4e7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php @@ -103,7 +103,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions(): iterable + public static function provideCompletionSuggestions(): iterable { yield 'name' => [[''], ['DefaultConfigTestBundle', 'default_config_test', 'ExtensionWithoutConfigTestBundle', 'extension_without_config_test', 'FrameworkBundle', 'framework', 'TestBundle', 'test']]; yield 'option --format' => [['--format', ''], ['yaml', 'xml']]; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php index ee56012d307ca..63c717b7b41b6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php @@ -204,7 +204,7 @@ public function testGetDeprecationNoFile() $this->assertStringContainsString('[WARNING] The deprecation file does not exist', $tester->getDisplay()); } - public function provideIgnoreBackslashWhenFindingService() + public static function provideIgnoreBackslashWhenFindingService() { return [ [BackslashClass::class], @@ -232,7 +232,7 @@ public function testComplete(array $input, array $expectedSuggestions, array $no } } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { $serviceId = 'console.command.container_debug'; $hiddenServiceId = '.console.command.container_debug.lazy'; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php index c3110cc71dcbb..345589c1b6fc2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php @@ -129,7 +129,7 @@ public function testComplete(array $input, array $expectedSuggestions) } } - public function provideCompletionSuggestions(): \Generator + public static function provideCompletionSuggestions(): \Generator { yield 'search' => [[''], ['SessionHandlerInterface', 'Psr\\Log\\LoggerInterface', 'Psr\\Container\\ContainerInterface $parameterBag']]; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php index b514ed3b8e042..6d8966a171ba2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php @@ -37,7 +37,7 @@ public function testFragment($insulate) , $client->getResponse()->getContent()); } - public function getConfigs() + public static function getConfigs() { return [ [false], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php index 7b65ca5c276e8..d7825979536e5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php @@ -57,7 +57,7 @@ public function testProfilerCollectParameter($insulate) $this->assertNull($client->getProfile()); } - public function getConfigs() + public static function getConfigs() { return [ [false], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php index 82e6bf8bb1505..6b8eb6b7f0cbf 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php @@ -100,7 +100,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $tester->complete($input)); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'option --format' => [ ['--format', ''], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SecurityTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SecurityTest.php index d97039562119c..c26fa717d9176 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SecurityTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SecurityTest.php @@ -33,7 +33,7 @@ public function testLoginUser(string $username, array $roles, ?string $firewallC $this->assertEquals('Welcome '.$username.'!', $client->getResponse()->getContent()); } - public function getUsers() + public static function getUsers() { yield ['the-username', ['ROLE_FOO'], null]; yield ['the-username', ['ROLE_FOO'], 'main']; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php index aaf6ad49ccca1..9a6527b14dd62 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php @@ -52,7 +52,7 @@ public function testNormalizersAndEncodersUseDefaultContextConfigOption(string $ self::assertEquals('foo', $defaultContext['fake_context_option']); } - public function provideNormalizersAndEncodersWithDefaultContextOption(): array + public static function provideNormalizersAndEncodersWithDefaultContextOption(): array { return [ ['serializer.normalizer.constraint_violation_list.alias'], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php index 7d66ff1726657..dbac7e2f6d31f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php @@ -194,7 +194,7 @@ public function testCorrectCacheControlHeadersForCacheableAction($config, $insul $this->assertSame('public, s-maxage=100', $response->headers->get('cache-control')); } - public function getConfigs() + public static function getConfigs() { return [ // configfile, insulate diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php index cdcaa490ac423..d8ad6e2cf6b89 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php @@ -511,7 +511,7 @@ public function testBooleanContainerParametersWithinRouteCondition() $this->assertSame('1 or 0', $route->getCondition()); } - public function getNonStringValues() + public static function getNonStringValues() { return [[null], [false], [true], [new \stdClass()], [['foo', 'bar']], [[[]]]]; } @@ -591,7 +591,7 @@ public function testResolvingMethods() $this->assertEquals(['GET', 'POST'], $route->getMethods()); } - public function getContainerParameterForRoute() + public static function getContainerParameterForRoute() { yield 'String' => ['"foo"']; yield 'Integer' => [0]; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php index 8698de198fffc..583ebbb774666 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php @@ -177,7 +177,7 @@ public function testResourceFilesOptionLoadsBeforeOtherAddedResources($debug, $e $translator->trans('some_message', [], null, 'some_locale'); } - public function getDebugModeAndCacheDirCombinations() + public static function getDebugModeAndCacheDirCombinations() { return [ [false, false], diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPassTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPassTest.php index bd0ea68520abe..0e45e2c89132a 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPassTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPassTest.php @@ -70,7 +70,7 @@ public function testEventIsPropagated(string $configuredEvent, string $registere ]); } - public function providePropagatedEvents(): array + public static function providePropagatedEvents(): array { return [ [CheckPassportEvent::class, CheckPassportEvent::class], diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php index 8bb45f7cea2e2..e46a36a44fbe4 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php @@ -86,7 +86,7 @@ public function testDefaultFailureHandler($serviceId, $defaultHandlerInjection) } } - public function getFailureHandlers() + public static function getFailureHandlers() { return [ [null, true], @@ -135,7 +135,7 @@ public function testDefaultSuccessHandler($serviceId, $defaultHandlerInjection) } } - public function getSuccessHandlers() + public static function getSuccessHandlers() { return [ [null, true], diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/GuardAuthenticationFactoryTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/GuardAuthenticationFactoryTest.php index f13f5c35a90df..1a2f77079575b 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/GuardAuthenticationFactoryTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/GuardAuthenticationFactoryTest.php @@ -54,7 +54,7 @@ public function testAddInvalidConfiguration(array $inputConfig) $node->finalize($normalizedConfig); } - public function getValidConfigurationTests() + public static function getValidConfigurationTests() { $tests = []; @@ -86,7 +86,7 @@ public function getValidConfigurationTests() return $tests; } - public function getInvalidConfigurationTests() + public static function getInvalidConfigurationTests() { $tests = []; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php index 684e43e28a503..db0502d304ede 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php @@ -525,7 +525,7 @@ public function testSecretRememberMeHandler() $this->assertSame('very', $handler->getArgument(1)); } - public function sessionConfigurationProvider() + public static function sessionConfigurationProvider() { return [ [ @@ -546,7 +546,7 @@ public function sessionConfigurationProvider() ]; } - public function acceptableIpsProvider(): iterable + public static function acceptableIpsProvider(): iterable { yield [['127.0.0.1']]; yield ['127.0.0.1']; @@ -657,7 +657,7 @@ public function testAuthenticatorManagerEnabledEntryPoint(array $firewall, $entr $this->assertEquals($entryPointId, (string) $container->getDefinition('security.exception_listener.main')->getArgument(4)); } - public function provideEntryPointFirewalls() + public static function provideEntryPointFirewalls() { // only one entry point available yield [['http_basic' => true], 'security.authenticator.http_basic.main']; @@ -697,7 +697,7 @@ public function testEntryPointRequired(array $firewall, $messageRegex) $container->compile(); } - public function provideEntryPointRequiredData() + public static function provideEntryPointRequiredData() { // more than one entry point available and not explicitly set yield [ @@ -747,7 +747,7 @@ public function testConfigureCustomAuthenticator(array $firewall, array $expecte $this->assertEquals($expectedAuthenticators, array_map('strval', $container->getDefinition('security.authenticator.manager.main')->getArgument(0))); } - public function provideConfigureCustomAuthenticatorData() + public static function provideConfigureCustomAuthenticatorData() { yield [ ['custom_authenticator' => TestAuthenticator::class], @@ -827,7 +827,7 @@ public function testUserCheckerWithAuthenticatorManager(array $config, string $e $this->assertEquals($expectedUserCheckerClass, $container->findDefinition($userCheckerId)->getClass()); } - public function provideUserCheckerConfig() + public static function provideUserCheckerConfig() { yield [[], InMemoryUserChecker::class]; yield [['user_checker' => TestUserChecker::class], TestUserChecker::class]; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php index 970a9dc9ae746..ca99dbf3eadab 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php @@ -60,7 +60,7 @@ public function testWithoutUserProvider($email) $this->assertJsonStringEqualsJsonString('{"email":"'.$email.'"}', $client->getResponse()->getContent()); } - public function provideEmails() + public static function provideEmails() { yield ['jane@example.org', true]; yield ['john@example.org', false]; @@ -84,7 +84,7 @@ public function testLoginUsersWithMultipleFirewalls(string $username, string $fi $this->assertEquals('Welcome '.$username.'!', $client->getResponse()->getContent()); } - public function provideEmailsWithFirewalls() + public static function provideEmailsWithFirewalls() { yield ['jane@example.org', 'main']; yield ['john@example.org', 'custom']; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php index 56022240e32dc..f01aea3ff8318 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php @@ -213,13 +213,13 @@ public function testLegacyFormLoginRedirectsToProtectedResourceAfterLogin($optio $this->assertStringContainsString('You\'re browsing to path "/protected-resource".', $text); } - public function provideClientOptions() + public static function provideClientOptions() { yield [['test_case' => 'CsrfFormLogin', 'root_config' => 'config.yml', 'enable_authenticator_manager' => true]]; yield [['test_case' => 'CsrfFormLogin', 'root_config' => 'routes_as_path.yml', 'enable_authenticator_manager' => true]]; } - public function provideLegacyClientOptions() + public static function provideLegacyClientOptions() { yield [['test_case' => 'CsrfFormLogin', 'root_config' => 'legacy_config.yml', 'enable_authenticator_manager' => false]]; yield [['test_case' => 'CsrfFormLogin', 'root_config' => 'legacy_routes_as_path.yml', 'enable_authenticator_manager' => false]]; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php index b1d38f40ef1c8..9e1e38223e6a5 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php @@ -296,13 +296,13 @@ public function testLegacyLoginThrottling() } } - public function provideClientOptions() + public static function provideClientOptions() { yield [['test_case' => 'StandardFormLogin', 'root_config' => 'base_config.yml', 'enable_authenticator_manager' => true]]; yield [['test_case' => 'StandardFormLogin', 'root_config' => 'routes_as_path.yml', 'enable_authenticator_manager' => true]]; } - public function provideLegacyClientOptions() + public static function provideLegacyClientOptions() { yield [['test_case' => 'StandardFormLogin', 'root_config' => 'legacy_config.yml', 'enable_authenticator_manager' => false]]; yield [['test_case' => 'StandardFormLogin', 'root_config' => 'legacy_routes_as_path.yml', 'enable_authenticator_manager' => false]]; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php index a6efa746a372a..391e1dd603081 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php @@ -137,13 +137,13 @@ public function testLegacyAccessRestrictedResourceWithForward($locale, array $op $this->assertCount(1, $crawler->selectButton('login'), (string) $client->getResponse()); } - public function getLocalesAndClientConfig() + public static function getLocalesAndClientConfig() { yield ['en', ['root_config' => 'localized_routes.yml']]; yield ['de', ['root_config' => 'localized_routes.yml']]; } - public function getLegacyLocalesAndClientConfig() + public static function getLegacyLocalesAndClientConfig() { yield ['en', ['root_config' => 'legacy_localized_routes.yml']]; yield ['de', ['root_config' => 'legacy_localized_routes.yml']]; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php index d581238c7dab8..176b08cfb6dcf 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php @@ -50,7 +50,7 @@ public function testLegacySessionRememberMeSecureCookieFlagAuto($https, $expecte $this->assertSame($expectedSecureFlag, $cookies['']['/']['REMEMBERME']->isSecure()); } - public function getSessionRememberMeSecureCookieFlagAutoHttpsMap() + public static function getSessionRememberMeSecureCookieFlagAutoHttpsMap() { return [ [true, true], diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php index c1958c7dee3ff..dc739fd71dd44 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php @@ -174,13 +174,13 @@ public function testLegacySessionLessRememberMeLogout() $this->assertNull($cookieJar->get('REMEMBERME')); } - public function provideConfigs() + public static function provideConfigs() { yield [['root_config' => 'config_session.yml']]; yield [['root_config' => 'config_persistent.yml']]; } - public function provideLegacyConfigs() + public static function provideLegacyConfigs() { yield [['root_config' => 'legacy_config_session.yml']]; yield [['root_config' => 'legacy_config_persistent.yml']]; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php index 788599224e47e..8290e97f7f622 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php @@ -289,25 +289,25 @@ private function assertRestricted($client, $path) $this->assertEquals(302, $client->getResponse()->getStatusCode()); } - public function provideClientOptions() + public static function provideClientOptions() { yield [['test_case' => 'StandardFormLogin', 'root_config' => 'base_config.yml', 'enable_authenticator_manager' => true]]; yield [['test_case' => 'StandardFormLogin', 'root_config' => 'routes_as_path.yml', 'enable_authenticator_manager' => true]]; } - public function provideLegacyClientOptions() + public static function provideLegacyClientOptions() { yield [['test_case' => 'StandardFormLogin', 'root_config' => 'base_config.yml', 'enable_authenticator_manager' => true]]; yield [['test_case' => 'StandardFormLogin', 'root_config' => 'routes_as_path.yml', 'enable_authenticator_manager' => true]]; } - public function provideConfigs() + public static function provideConfigs() { yield [['test_case' => 'StandardFormLogin', 'root_config' => 'base_config.yml']]; yield [['test_case' => 'StandardFormLogin', 'root_config' => 'routes_as_path.yml']]; } - public function provideLegacyConfigs() + public static function provideLegacyConfigs() { yield [['test_case' => 'StandardFormLogin', 'root_config' => 'legacy_config.yml']]; yield [['test_case' => 'StandardFormLogin', 'root_config' => 'legacy_routes_as_path.yml']]; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php index 418bb55f14454..ad0ab638d3609 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php @@ -113,7 +113,7 @@ public function testLegacyServiceIsFunctional() $this->assertSame($token, $security->getToken()); } - public function userWillBeMarkedAsChangedIfRolesHasChangedProvider() + public static function userWillBeMarkedAsChangedIfRolesHasChangedProvider() { return [ [ diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php index ac86e4815f601..da257be3f9b03 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php @@ -85,7 +85,7 @@ public function testSwitchUserStateless(array $options) $this->assertSame('dunglas', $client->getProfile()->getCollector('security')->getUser()); } - public function getTestParameters() + public static function getTestParameters() { return [ 'unauthorized_user_cannot_switch' => ['user_cannot_switch_1', 'user_cannot_switch_1', 'user_cannot_switch_1', 403], @@ -95,7 +95,7 @@ public function getTestParameters() ]; } - public function getLegacyTestParameters() + public static function getLegacyTestParameters() { return [ 'legacy_unauthorized_user_cannot_switch' => ['user_cannot_switch_1', 'user_cannot_switch_1', 'user_cannot_switch_1', 403], diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php index 1cc9c0ebf3e5c..660c7fd07dcd1 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php @@ -199,7 +199,7 @@ public function testTwigLoaderPaths($format) ], $paths); } - public function getFormats() + public static function getFormats() { return [ ['php'], @@ -230,7 +230,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 5664b8b9acfde..67355d9030a15 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php @@ -136,7 +136,7 @@ public function testToolbarActionWithEmptyToken($token) $this->assertEquals(200, $response->getStatusCode()); } - public function getEmptyTokenCases() + public static function getEmptyTokenCases() { return [ [null], @@ -165,7 +165,7 @@ public function testOpeningDisallowedPaths($path, $isAllowed) } } - public function getOpenFileCases() + public static function getOpenFileCases() { return [ ['README.md', true], @@ -355,7 +355,7 @@ public function testPhpinfoAction() $this->assertStringContainsString('PHP License', $client->getResponse()->getContent()); } - public function provideCspVariants() + public static function provideCspVariants() { return [ [true], diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php index c345b5fbb89c8..7d5c0761b1dcc 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/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php index a0bc7f43c0668..d957cafc48616 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -29,7 +29,7 @@ public function testConfigTree(array $options, array $expectedResult) $this->assertEquals($expectedResult, $config); } - public function getDebugModes() + public static function getDebugModes() { return [ [ @@ -71,7 +71,7 @@ public function testConfigTreeUsingInterceptRedirects(bool $interceptRedirects, $this->assertEquals($expectedResult, $config); } - public function getInterceptRedirectsConfiguration() + public static function getInterceptRedirectsConfiguration() { return [ [ diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php index f4d0f7e037939..84558032b4ad9 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php @@ -103,7 +103,7 @@ public function testDefaultConfig($debug) self::assertSaneContainer($this->getCompiledContainer()); } - public function getDebugModes() + public static function getDebugModes() { return [ ['debug' => false], @@ -129,7 +129,7 @@ public function testToolbarConfig(bool $toolbarEnabled, bool $listenerInjected, } } - public function getToolbarConfig() + public static function getToolbarConfig() { return [ [ @@ -170,7 +170,7 @@ public function testToolbarConfigUsingInterceptRedirects( } } - public function getInterceptRedirectsToolbarConfig() + public static function getInterceptRedirectsToolbarConfig() { return [ [ diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php index dd2de44bc350f..fa085ffe01ff4 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php @@ -40,7 +40,7 @@ public function testInjectToolbar($content, $expected) $this->assertEquals($expected, $response->getContent()); } - public function getInjectToolbarTests() + public static function getInjectToolbarTests() { return [ ['', "\nWDT\n"], @@ -148,7 +148,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/Bundle/WebProfilerBundle/Tests/Twig/WebProfilerExtensionTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Twig/WebProfilerExtensionTest.php index 6b026bcc53385..1bb1296b09903 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Twig/WebProfilerExtensionTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Twig/WebProfilerExtensionTest.php @@ -42,7 +42,7 @@ class_exists(EscaperExtension::class); // Load twig_escape_filter() self::assertSame($dump2HasHeader, str_contains($dump2, $needle)); } - public function provideMessages(): iterable + public static function provideMessages(): iterable { yield ['Some message', ['foo' => 'foo', 'bar' => 'bar'], false, true]; yield ['Some message {@see some text}', ['foo' => 'foo', 'bar' => 'bar'], false, true]; diff --git a/src/Symfony/Component/Asset/Tests/PackageTest.php b/src/Symfony/Component/Asset/Tests/PackageTest.php index 8d7f7b8a26a71..45b0982182082 100644 --- a/src/Symfony/Component/Asset/Tests/PackageTest.php +++ b/src/Symfony/Component/Asset/Tests/PackageTest.php @@ -27,7 +27,7 @@ public function testGetUrl($version, $format, $path, $expected) $this->assertSame($expected, $package->getUrl($path)); } - public function getConfigs() + public static function getConfigs() { return [ ['v1', '', 'http://example.com/foo', 'http://example.com/foo'], diff --git a/src/Symfony/Component/Asset/Tests/PathPackageTest.php b/src/Symfony/Component/Asset/Tests/PathPackageTest.php index 57bb80bcccf06..0784ac6fa89c0 100644 --- a/src/Symfony/Component/Asset/Tests/PathPackageTest.php +++ b/src/Symfony/Component/Asset/Tests/PathPackageTest.php @@ -28,7 +28,7 @@ public function testGetUrl($basePath, $format, $path, $expected) $this->assertSame($expected, $package->getUrl($path)); } - public function getConfigs() + public static function getConfigs() { return [ ['/foo', '', 'http://example.com/foo', 'http://example.com/foo'], @@ -60,7 +60,7 @@ public function testGetUrlWithContext($basePathRequest, $basePath, $format, $pat $this->assertSame($expected, $package->getUrl($path)); } - public function getContextConfigs() + public static function getContextConfigs() { return [ ['', '/foo', '', '/baz', '/baz?v1'], diff --git a/src/Symfony/Component/Asset/Tests/UrlPackageTest.php b/src/Symfony/Component/Asset/Tests/UrlPackageTest.php index 717c0687c9875..b6525d35cfe5e 100644 --- a/src/Symfony/Component/Asset/Tests/UrlPackageTest.php +++ b/src/Symfony/Component/Asset/Tests/UrlPackageTest.php @@ -31,7 +31,7 @@ public function testGetUrl($baseUrls, $format, $path, $expected) $this->assertSame($expected, $package->getUrl($path)); } - public function getConfigs() + public static function getConfigs() { return [ ['http://example.net', '', 'http://example.com/foo', 'http://example.com/foo'], @@ -72,7 +72,7 @@ public function testGetUrlWithContext($secure, $baseUrls, $format, $path, $expec $this->assertSame($expected, $package->getUrl($path)); } - public function getContextConfigs() + public static function getContextConfigs() { return [ [false, 'http://example.com', '', 'foo', 'http://example.com/foo?v1'], @@ -114,7 +114,7 @@ public function testWrongBaseUrl($baseUrls) new UrlPackage($baseUrls, new EmptyVersionStrategy()); } - public function getWrongBaseUrlConfig() + public static function getWrongBaseUrlConfig() { return [ ['not-a-url'], diff --git a/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php b/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php index d054e842f2c55..ec06ba6554de1 100644 --- a/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php +++ b/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php @@ -34,7 +34,7 @@ public function testApplyVersion($path, $version, $format) $this->assertSame($formatted, $staticVersionStrategy->applyVersion($path)); } - public function getConfigs() + public static function getConfigs() { return [ ['test-path', 'v1', null], diff --git a/src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php b/src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php index c714a2560d224..6944a3371e323 100644 --- a/src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php +++ b/src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php @@ -623,7 +623,7 @@ public function testFollowMetaRefresh(string $content, string $expectedEndingUrl $this->assertSame($expectedEndingUrl, $client->getRequest()->getUri()); } - public function getTestsForMetaRefresh() + public static function getTestsForMetaRefresh() { return [ ['', 'http://www.example.com/redirected'], 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/CookieTest.php b/src/Symfony/Component/BrowserKit/Tests/CookieTest.php index a9b34139fbf0d..3fdb756019d4c 100644 --- a/src/Symfony/Component/BrowserKit/Tests/CookieTest.php +++ b/src/Symfony/Component/BrowserKit/Tests/CookieTest.php @@ -42,7 +42,7 @@ public function testToFromString($cookie, $url = null) $this->assertEquals($cookie, (string) Cookie::fromString($cookie, $url)); } - public function getTestsForToFromString() + public static function getTestsForToFromString() { return [ ['foo=bar; path=/'], @@ -71,7 +71,7 @@ public function testFromStringAcceptsSeveralExpiresDateFormats($cookie) $this->assertEquals(1596185377, Cookie::fromString($cookie)->getExpiresTime()); } - public function getExpireCookieStrings() + public static function getExpireCookieStrings() { return [ ['foo=bar; expires=Fri, 31-Jul-2020 08:49:37 GMT'], diff --git a/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php b/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php index c0254e7246689..44f61289d8d6a 100644 --- a/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php +++ b/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php @@ -40,7 +40,7 @@ public function testRequestHeaders(array $requestArguments, array $expectedArgum $browser->request(...$requestArguments); } - public function validContentTypes() + public static function validContentTypes() { $defaultHeaders = ['user-agent' => 'Symfony BrowserKit', 'host' => 'example.com']; yield 'GET/HEAD' => [ @@ -199,7 +199,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/DoctrineDbalAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php index cf8a60a598ae9..656b84ab63ba2 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php @@ -124,7 +124,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/MemcachedAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php index 29d692e3489ca..180ce6f3d0dab 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 [ ['hash', 'zyx'], @@ -135,7 +135,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', @@ -185,7 +185,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 27429f33c9022..6bed9285c59ac 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php @@ -89,7 +89,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:'.$dbFile.'2', $dbFile.'2']; diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php index 0c7a9fde07007..8c8f25ee60355 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php @@ -134,7 +134,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 c448b685454ac..71fa5b0a6d568 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php @@ -105,7 +105,7 @@ public function testFailedCreateConnection(string $dsn) RedisAdapter::createConnection($dsn); } - public function provideFailedCreateConnection(): array + public static function provideFailedCreateConnection(): array { return [ ['redis://localhost:1234'], @@ -125,7 +125,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 d054a5834fc5e..cdfa4f43e1a5a 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/Config/Tests/Builder/GeneratedConfigTest.php b/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php index 03f5cd43db87d..5f20ca6ac9f7f 100644 --- a/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php +++ b/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php @@ -53,7 +53,7 @@ protected function tearDown(): void parent::tearDown(); } - public function fixtureNames() + public static function fixtureNames() { $array = [ 'ScalarNormalizedTypes' => 'scalar_normalized_types', diff --git a/src/Symfony/Component/Config/Tests/ConfigCacheTest.php b/src/Symfony/Component/Config/Tests/ConfigCacheTest.php index 79de702224e0a..d7099fb970ca0 100644 --- a/src/Symfony/Component/Config/Tests/ConfigCacheTest.php +++ b/src/Symfony/Component/Config/Tests/ConfigCacheTest.php @@ -98,7 +98,7 @@ public function testStaleResourceInDebug() $this->assertFalse($cache->isFresh()); } - public function debugModes(): array + public static function debugModes(): array { return [ [true], diff --git a/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php index 469b12f87f6f1..264404dfb174d 100644 --- a/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php @@ -58,7 +58,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"'); @@ -100,7 +100,7 @@ public function testPreNormalize(array $denormalized, array $normalized) $this->assertSame($normalized, $r->invoke($node, $denormalized)); } - public function getPreNormalizationTests(): array + public static function getPreNormalizationTests(): array { return [ [ @@ -142,7 +142,7 @@ public function testNodeNameCanBeZero(array $denormalized, array $normalized) $this->assertSame($normalized, $r->invoke($rootNode, $denormalized)); } - public function getZeroNamedNodeExamplesData(): array + public static function getZeroNamedNodeExamplesData(): array { return [ [ @@ -189,7 +189,7 @@ public function testChildrenOrderIsMaintainedOnNormalizeValue(array $prenormaliz $this->assertSame($normalized, $r->invoke($node, $prenormalized)); } - public function getPreNormalizedNormalizedOrderedData(): array + public static function getPreNormalizedNormalizedOrderedData(): array { return [ [ @@ -353,7 +353,7 @@ public function testMergeWithIgnoringExtraKeys(array $prenormalizeds, array $mer $this->assertEquals($merged, $r->invoke($node, ...$prenormalizeds)); } - public function getDataWithIncludedExtraKeys(): array + public static function getDataWithIncludedExtraKeys(): array { return [ [ 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/BooleanNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php index bec3b5996dd08..e29e047ef0fb4 100644 --- a/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php @@ -37,7 +37,7 @@ public function testValidNonEmptyValues(bool $value) $this->assertSame($value, $node->finalize($value)); } - public function getValidValues(): array + public static function getValidValues(): array { return [ [false], @@ -55,7 +55,7 @@ public function testNormalizeThrowsExceptionOnInvalidValues($value) $node->normalize($value); } - public function getInvalidValues(): array + public static function getInvalidValues(): array { return [ [null], diff --git a/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php b/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php index 10b54aa143757..dd7b5e444afb2 100644 --- a/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php @@ -55,7 +55,7 @@ public function testPrototypeNodeSpecificOption(string $method, array $args) $node->getNode(); } - public function providePrototypeNodeSpecificCalls(): array + public static function providePrototypeNodeSpecificCalls(): array { return [ ['defaultValue', [[]]], @@ -137,7 +137,7 @@ public function testPrototypedArrayNodeDefault($args, bool $shouldThrowWhenUsing } } - public function providePrototypedArrayNodeDefaults(): array + public static function providePrototypedArrayNodeDefaults(): array { return [ [null, true, false, [[]]], @@ -298,7 +298,7 @@ public function testPrototypeEnum() $this->assertEquals($node->prototype('enum'), $node->enumPrototype()); } - public function getEnableableNodeFixtures(): array + public static function getEnableableNodeFixtures(): array { return [ [['enabled' => true, 'foo' => 'bar'], [true], 'true enables an enableable node'], diff --git a/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php b/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php index e96c57c409f8f..64b5d8d7456fa 100644 --- a/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php @@ -159,7 +159,7 @@ public function testCastToArrayExpression($configValue, array $expectedValue) $this->assertFinalizedValueIs($expectedValue, $test, ['key' => $configValue]); } - public function castToArrayValues(): iterable + public static function castToArrayValues(): iterable { yield ['value', ['value']]; yield [-3.14, [-3.14]]; diff --git a/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php b/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php index 7d8c2d951897f..3f198ca9d6607 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', <<assertSame($value, $node->finalize($value)); } - public function getValidValues(): array + public static function getValidValues(): array { return [ [1798.0], @@ -65,7 +65,7 @@ public function testNormalizeThrowsExceptionOnInvalidValues($value) $node->normalize($value); } - public function getInvalidValues(): array + public static function getInvalidValues(): array { return [ [null], diff --git a/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php index 7c843b38f3716..132b6b43b654d 100644 --- a/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php @@ -37,7 +37,7 @@ public function testValidNonEmptyValues(int $value) $this->assertSame($value, $node->finalize($value)); } - public function getValidValues(): array + public static function getValidValues(): array { return [ [1798], @@ -56,7 +56,7 @@ public function testNormalizeThrowsExceptionOnInvalidValues($value) $node->normalize($value); } - public function getInvalidValues(): array + public static function getInvalidValues(): array { return [ [null], diff --git a/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php b/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php index 0b497707e4604..5945b48e55189 100644 --- a/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php @@ -51,7 +51,7 @@ public function testNormalizeEncoders($denormalized) $this->assertNormalized($tree, $denormalized, $normalized); } - public function getEncoderTests(): array + public static function getEncoderTests(): array { $configs = []; @@ -120,7 +120,7 @@ public function testAnonymousKeysArray($denormalized) $this->assertNormalized($tree, $denormalized, $normalized); } - public function getAnonymousKeysTests(): array + public static function getAnonymousKeysTests(): array { $configs = []; @@ -151,7 +151,7 @@ public function testNumericKeysAsAttributes($denormalized) $this->assertNormalized($this->getNumericKeysTestTree(), $denormalized, $normalized); } - public function getNumericKeysTests(): array + public static function getNumericKeysTests(): array { $configs = []; diff --git a/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php index e68d9a68a8703..abf0de7771627 100644 --- a/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php @@ -280,7 +280,7 @@ public function testMappedAttributeKeyIsRemovedLeftValueOnly($value, array $chil $this->assertEquals($expected, $normalized); } - public function getDataForKeyRemovedLeftValueOnly(): array + public static function getDataForKeyRemovedLeftValueOnly(): array { $scalarValue = new ScalarNode('value'); @@ -354,7 +354,7 @@ public function testPrototypedArrayNodeMerge(array $left, array $right, array $e self::assertSame($result, $expected); } - public function getPrototypedArrayNodeDataToMerge(): array + public static function getPrototypedArrayNodeDataToMerge(): array { return [ // data to merged is a plain array diff --git a/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php index 84e76c46df79c..bd116b69593cd 100644 --- a/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php @@ -28,7 +28,7 @@ public function testNormalize($value) $this->assertSame($value, $node->normalize($value)); } - public function getValidValues(): array + public static function getValidValues(): array { return [ [false], @@ -93,7 +93,7 @@ public function testNormalizeThrowsExceptionOnInvalidValues($value) $node->normalize($value); } - public function getInvalidValues(): array + public static function getInvalidValues(): array { return [ [[]], @@ -136,7 +136,7 @@ public function testValidNonEmptyValues($value) $this->assertSame($value, $node->finalize($value)); } - public function getValidNonEmptyValues(): array + public static function getValidNonEmptyValues(): array { return [ [false], @@ -162,7 +162,7 @@ public function testNotAllowedEmptyValuesThrowException($value) $node->finalize($value); } - public function getEmptyValues(): array + public static function getEmptyValues(): array { return [ [null], diff --git a/src/Symfony/Component/Config/Tests/FileLocatorTest.php b/src/Symfony/Component/Config/Tests/FileLocatorTest.php index ced35690990b1..7a6ea6bf38470 100644 --- a/src/Symfony/Component/Config/Tests/FileLocatorTest.php +++ b/src/Symfony/Component/Config/Tests/FileLocatorTest.php @@ -30,7 +30,7 @@ public function testIsAbsolutePath(string $path) $this->assertTrue($m->invoke($loader, $path), '->isAbsolutePath() returns true for an absolute path'); } - public function getIsAbsolutePathTests(): array + public static function getIsAbsolutePathTests(): array { return [ ['/foo.xml'], diff --git a/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php b/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php index 5d18103f2ecd3..9aa991ecc5b5e 100644 --- a/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php +++ b/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php @@ -139,7 +139,7 @@ public function testExcludeTrailingSlashConsistency(string $exclude) $this->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/Config/Tests/Util/XmlUtilsTest.php b/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php index c622d606bc303..8c1cd8543be19 100644 --- a/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php +++ b/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php @@ -124,7 +124,7 @@ public function testConvertDomToArray($expected, string $xml, bool $root = false $this->assertSame($expected, XmlUtils::convertDomElementToArray($dom->documentElement, $checkPrefix)); } - public function getDataForConvertDomToArray(): array + public static function getDataForConvertDomToArray(): array { return [ [null, ''], @@ -155,7 +155,7 @@ public function testPhpize($expected, string $value) $this->assertSame($expected, XmlUtils::phpize($value)); } - public function getDataForPhpize(): array + public static function getDataForPhpize(): array { return [ ['', ''], diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php index d438c3fc95852..4e4c032b8a0ef 100644 --- a/src/Symfony/Component/Console/Tests/ApplicationTest.php +++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php @@ -431,7 +431,7 @@ public function testFindWithAmbiguousAbbreviations($abbreviation, $expectedExcep $application->find($abbreviation); } - public function provideAmbiguousAbbreviations() + public static function provideAmbiguousAbbreviations() { return [ ['f', 'Command "f" is not defined.'], @@ -547,7 +547,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'], @@ -1239,7 +1239,7 @@ public function testAddingAlreadySetDefinitionElementData($def) $application->run($input, $output); } - public function getAddingAlreadySetDefinitionElementData() + public static function getAddingAlreadySetDefinitionElementData() { return [ [new InputArgument('command', InputArgument::REQUIRED)], diff --git a/src/Symfony/Component/Console/Tests/CI/GithubActionReporterTest.php b/src/Symfony/Component/Console/Tests/CI/GithubActionReporterTest.php index 6ef190f162f09..23f7a3bd9ddbd 100644 --- a/src/Symfony/Component/Console/Tests/CI/GithubActionReporterTest.php +++ b/src/Symfony/Component/Console/Tests/CI/GithubActionReporterTest.php @@ -43,7 +43,7 @@ public function testAnnotationsFormat(string $type, string $message, string $fil self::assertSame($expected.\PHP_EOL, $buffer->fetch()); } - public function annotationsFormatProvider(): iterable + public static function annotationsFormatProvider(): iterable { yield 'warning' => ['warning', 'A warning', null, null, null, '::warning::A warning']; yield 'error' => ['error', 'An error', null, null, null, '::error::An error']; diff --git a/src/Symfony/Component/Console/Tests/Command/CommandTest.php b/src/Symfony/Component/Console/Tests/Command/CommandTest.php index 81d4b9bba95e3..63a5ea85321e8 100644 --- a/src/Symfony/Component/Console/Tests/Command/CommandTest.php +++ b/src/Symfony/Component/Console/Tests/Command/CommandTest.php @@ -124,7 +124,7 @@ public function testInvalidCommandNames($name) $command->setName($name); } - public function provideInvalidCommandNames() + public static function provideInvalidCommandNames() { return [ [''], @@ -338,7 +338,7 @@ public function testSetCode() $this->assertEquals('interact called'.\PHP_EOL.'from the code...'.\PHP_EOL, $tester->getDisplay()); } - public function getSetCodeBindToClosureTests() + public static function getSetCodeBindToClosureTests() { return [ [true, 'not bound to the command'], diff --git a/src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php b/src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php index e6c74a7361d08..30b22c967e7d8 100644 --- a/src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php +++ b/src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php @@ -81,7 +81,7 @@ public function testInputAndCurrentOptionValidation(array $input, ?string $excep } } - public function provideInputAndCurrentOptionValues() + public static function provideInputAndCurrentOptionValues() { yield [[], 'The "--current" option must be set and it must be an integer']; yield [['--current' => 'a'], 'The "--current" option must be set and it must be an integer']; @@ -100,7 +100,7 @@ public function testCompleteCommandName(array $input, array $suggestions) $this->assertEquals(implode("\n", $suggestions).\PHP_EOL, $this->tester->getDisplay()); } - public function provideCompleteCommandNameInputs() + public static function provideCompleteCommandNameInputs() { yield 'empty' => [['bin/console'], ['help', 'list', 'completion', 'hello', 'ahoy']]; yield 'partial' => [['bin/console', 'he'], ['help', 'list', 'completion', 'hello', 'ahoy']]; @@ -117,7 +117,7 @@ public function testCompleteCommandInputDefinition(array $input, array $suggesti $this->assertEquals(implode("\n", $suggestions).\PHP_EOL, $this->tester->getDisplay()); } - public function provideCompleteCommandInputDefinitionInputs() + public static function provideCompleteCommandInputDefinitionInputs() { yield 'definition' => [['bin/console', 'hello', '-'], ['--help', '--quiet', '--verbose', '--version', '--ansi', '--no-ansi', '--no-interaction']]; yield 'custom' => [['bin/console', 'hello'], ['Fabien', 'Robin', 'Wouter']]; diff --git a/src/Symfony/Component/Console/Tests/Command/DumpCompletionCommandTest.php b/src/Symfony/Component/Console/Tests/Command/DumpCompletionCommandTest.php index 21df4287312a0..8d0fb45537509 100644 --- a/src/Symfony/Component/Console/Tests/Command/DumpCompletionCommandTest.php +++ b/src/Symfony/Component/Console/Tests/Command/DumpCompletionCommandTest.php @@ -28,7 +28,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'shell' => [ [''], diff --git a/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php b/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php index 0e8a7f4f7fd1a..d61c912fcec44 100644 --- a/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php +++ b/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php @@ -83,7 +83,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'option --format' => [ ['--format', ''], diff --git a/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php b/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php index 0f78cf7ee3202..7ed9d3d5da25f 100644 --- a/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php +++ b/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php @@ -127,7 +127,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'option --format' => [ ['--format', ''], diff --git a/src/Symfony/Component/Console/Tests/Completion/CompletionInputTest.php b/src/Symfony/Component/Console/Tests/Completion/CompletionInputTest.php index ee370076c17ac..d98da682cd90d 100644 --- a/src/Symfony/Component/Console/Tests/Completion/CompletionInputTest.php +++ b/src/Symfony/Component/Console/Tests/Completion/CompletionInputTest.php @@ -39,7 +39,7 @@ public function testBind(CompletionInput $input, string $expectedType, ?string $ $this->assertEquals($expectedValue, $input->getCompletionValue(), 'Unexpected value'); } - public function provideBindData() + public static function provideBindData() { // option names yield 'optname-minimal-input' => [CompletionInput::fromTokens(['bin/console', '-'], 1), CompletionInput::TYPE_OPTION_NAME, null, '-']; @@ -90,7 +90,7 @@ public function testBindWithLastArrayArgument(CompletionInput $input, ?string $e $this->assertEquals($expectedValue, $input->getCompletionValue(), 'Unexpected value'); } - public function provideBindWithLastArrayArgumentData() + public static function provideBindWithLastArrayArgumentData() { yield [CompletionInput::fromTokens(['bin/console'], 1), null]; yield [CompletionInput::fromTokens(['bin/console', 'symfony', 'sensiolabs'], 3), null]; @@ -124,7 +124,7 @@ public function testFromString($inputStr, array $expectedTokens) $this->assertEquals($expectedTokens, $tokensProperty->getValue($input)); } - public function provideFromStringData() + public static function provideFromStringData() { yield ['bin/console cache:clear', ['bin/console', 'cache:clear']]; yield ['bin/console --env prod', ['bin/console', '--env', 'prod']]; diff --git a/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php b/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php index eec4eff438eef..1556617fb8a64 100644 --- a/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php +++ b/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php @@ -112,7 +112,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 da64dca00b949..989521ebb6aa6 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 c6d2184e974f1..84eb8d87f1fd9 100644 --- a/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php +++ b/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php @@ -185,7 +185,7 @@ public function testInlineStyleOptions(string $tag, string $expected = null, str } } - public function provideInlineStyleOptionsCases() + public static function provideInlineStyleOptionsCases() { return [ [''], @@ -258,7 +258,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 c9b9c9d535956..a0c6ee129fac2 100644 --- a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php @@ -954,7 +954,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 d9aef3365899a..9761e8f979345 100644 --- a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php @@ -340,7 +340,7 @@ public function testAskWithAutocompleteWithExactMatch() $this->assertSame('b', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); } - public function getInputs() + public static function getInputs() { return [ ['$'], // 1 byte character @@ -536,7 +536,7 @@ public function testAskConfirmation($question, $expected, $default = true) $this->assertEquals($expected, $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question), 'confirmation question should '.($expected ? 'pass' : 'cancel')); } - public function getAskConfirmationData() + public static function getAskConfirmationData() { return [ ['', true], @@ -612,7 +612,7 @@ public function testSelectChoiceFromSimpleChoices($providedAnswer, $expectedValu $this->assertSame($expectedValue, $answer); } - public function simpleAnswerProvider() + public static function simpleAnswerProvider() { return [ [0, 'My environment 1'], @@ -647,7 +647,7 @@ public function testSpecialCharacterChoiceFromMultipleChoiceList($providedAnswer $this->assertSame($expectedValue, $answer); } - public function specialCharacterInMultipleChoice() + public static function specialCharacterInMultipleChoice() { return [ ['.', ['.']], @@ -697,7 +697,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 2d70bd271f589..d10289c66a09b 100644 --- a/src/Symfony/Component/Console/Tests/Helper/TableTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/TableTest.php @@ -88,7 +88,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'], @@ -1268,7 +1268,7 @@ public function testSetTitle($headerTitle, $footerTitle, $style, $expected) $this->assertEquals($expected, $this->getOutputContent($output)); } - public function renderSetTitle() + public static function renderSetTitle() { return [ [ @@ -1481,7 +1481,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 23333327027dd..b5289fa0185d2 100644 --- a/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php +++ b/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php @@ -61,7 +61,7 @@ public function testParseOptionsNegatable($input, $options, $expectedOptions, $m $this->assertEquals($expectedOptions, $input->getOptions(), $message); } - public function provideOptions() + public static function provideOptions() { return [ [ @@ -187,7 +187,7 @@ public function provideOptions() ]; } - public function provideNegatableOptions() + public static function provideNegatableOptions() { return [ [ @@ -259,7 +259,7 @@ public function testInvalidInputNegatable($argv, $definition, $expectedException $input->bind($definition); } - public function provideInvalidInput() + public static function provideInvalidInput() { return [ [ @@ -330,7 +330,7 @@ public function provideInvalidInput() ]; } - public function provideInvalidNegatableInput() + public static function provideInvalidNegatableInput() { return [ [ @@ -516,7 +516,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/Input/InputDefinitionTest.php b/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php index 11c6ae165eb7c..39157af8f41d8 100644 --- a/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php +++ b/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php @@ -367,7 +367,7 @@ public function testGetSynopsis(InputDefinition $definition, $expectedSynopsis, $this->assertEquals($expectedSynopsis, $definition->getSynopsis(), $message ? '->getSynopsis() '.$message : ''); } - public function getGetSynopsisData() + public static function getGetSynopsisData() { return [ [new InputDefinition([new InputOption('foo')]), '[--foo]', 'puts optional options in square brackets'], diff --git a/src/Symfony/Component/Console/Tests/Input/StringInputTest.php b/src/Symfony/Component/Console/Tests/Input/StringInputTest.php index 2bd40dec9c365..c55256c037196 100644 --- a/src/Symfony/Component/Console/Tests/Input/StringInputTest.php +++ b/src/Symfony/Component/Console/Tests/Input/StringInputTest.php @@ -43,7 +43,7 @@ public function testInputOptionWithGivenString() $this->assertEquals('bar', $input->getOption('foo')); } - public function getTokenizeData() + public static function getTokenizeData() { return [ ['', [], '->tokenize() parses an empty string'], 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 330064973baa0..f337c4ddd5471 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/ChoiceQuestionTest.php b/src/Symfony/Component/Console/Tests/Question/ChoiceQuestionTest.php index a7a2dfba487a6..d8b1f10ec217d 100644 --- a/src/Symfony/Component/Console/Tests/Question/ChoiceQuestionTest.php +++ b/src/Symfony/Component/Console/Tests/Question/ChoiceQuestionTest.php @@ -39,7 +39,7 @@ public function testSelectUseCases($multiSelect, $answers, $expected, $message, } } - public function selectUseCases() + public static function selectUseCases() { return [ [ @@ -119,7 +119,7 @@ public function testSelectAssociativeChoices($providedAnswer, $expectedValue) $this->assertSame($expectedValue, $question->getValidator()($providedAnswer)); } - public function selectAssociativeChoicesProvider() + public static function selectAssociativeChoicesProvider() { return [ 'select "0" choice by key' => ['0', '0'], diff --git a/src/Symfony/Component/Console/Tests/Question/ConfirmationQuestionTest.php b/src/Symfony/Component/Console/Tests/Question/ConfirmationQuestionTest.php index 83899772a82db..44f4c870bb2e1 100644 --- a/src/Symfony/Component/Console/Tests/Question/ConfirmationQuestionTest.php +++ b/src/Symfony/Component/Console/Tests/Question/ConfirmationQuestionTest.php @@ -30,7 +30,7 @@ public function testDefaultRegexUsecases($default, $answers, $expected, $message } } - public function normalizerUsecases() + public static function normalizerUsecases() { return [ [ diff --git a/src/Symfony/Component/Console/Tests/Question/QuestionTest.php b/src/Symfony/Component/Console/Tests/Question/QuestionTest.php index 55e9d58d4a2c7..e6b6fbee0ed10 100644 --- a/src/Symfony/Component/Console/Tests/Question/QuestionTest.php +++ b/src/Symfony/Component/Console/Tests/Question/QuestionTest.php @@ -24,7 +24,7 @@ protected function setUp(): void $this->question = new Question('Test question'); } - public function providerTrueFalse() + public static function providerTrueFalse() { return [[true], [false]]; } @@ -104,7 +104,7 @@ public function testIsHiddenFallbackDefault() self::assertTrue($this->question->isHiddenFallback()); } - public function providerGetSetAutocompleterValues() + public static function providerGetSetAutocompleterValues() { return [ 'array' => [ @@ -135,7 +135,7 @@ public function testGetSetAutocompleterValues($values, $expectValues) ); } - public function providerSetAutocompleterValuesInvalid() + public static function providerSetAutocompleterValuesInvalid() { return [ ['Potato'], @@ -229,7 +229,7 @@ function (string $input): array { return []; } $this->assertNull($exception); } - public function providerGetSetValidator() + public static function providerGetSetValidator() { return [ [function ($input) { return $input; }], @@ -251,7 +251,7 @@ public function testGetValidatorDefault() self::assertNull($this->question->getValidator()); } - public function providerGetSetMaxAttempts() + public static function providerGetSetMaxAttempts() { return [[1], [5], [null]]; } @@ -265,7 +265,7 @@ public function testGetSetMaxAttempts($attempts) self::assertSame($attempts, $this->question->getMaxAttempts()); } - public function providerSetMaxAttemptsInvalid() + public static function providerSetMaxAttemptsInvalid() { return [[0], [-1]]; } diff --git a/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php b/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php index 74c24034095b1..2edbcdfabdc55 100644 --- a/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php +++ b/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php @@ -69,14 +69,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/Console/Tests/Tester/Constraint/CommandIsSuccessfulTest.php b/src/Symfony/Component/Console/Tests/Tester/Constraint/CommandIsSuccessfulTest.php index 2de8ac3458160..7a2b4c7193e1a 100644 --- a/src/Symfony/Component/Console/Tests/Tester/Constraint/CommandIsSuccessfulTest.php +++ b/src/Symfony/Component/Console/Tests/Tester/Constraint/CommandIsSuccessfulTest.php @@ -47,7 +47,7 @@ public function testUnsuccessfulCommand(string $expectedException, int $exitCode $this->fail(); } - public function providesUnsuccessful(): iterable + public static function providesUnsuccessful(): iterable { yield 'Failed' => ['Command failed.', Command::FAILURE]; yield 'Invalid' => ['Command was invalid.', Command::INVALID]; diff --git a/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php b/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php index 5fca6939daf0c..36d39f39d7cd5 100644 --- a/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php +++ b/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php @@ -60,7 +60,7 @@ public function testCssToXPathWithoutPrefix($css, $xpath) $this->assertEquals($xpath, $converter->toXPath($css, ''), '->parse() parses an input string and returns a node'); } - public function getCssToXPathWithoutPrefixTestData() + public static function getCssToXPathWithoutPrefixTestData() { return [ ['h1', 'h1'], diff --git a/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php b/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php index bf48d49ffdbd4..8802e0c40ee1b 100644 --- a/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php +++ b/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php @@ -28,7 +28,7 @@ public function testPlusValue(Specificity $specificity, $value) $this->assertEquals($value + 123, $specificity->plus(new Specificity(1, 2, 3))->getValue()); } - public function getValueTestData() + public static function getValueTestData() { return [ [new Specificity(0, 0, 0), 0], @@ -45,7 +45,7 @@ public function testCompareTo(Specificity $a, Specificity $b, $result) $this->assertEquals($result, $a->compareTo($b)); } - public function getCompareTestData() + public static function getCompareTestData() { return [ [new Specificity(0, 0, 0), new Specificity(0, 0, 0), 0], diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTestCase.php b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTestCase.php index 6bf810b67ab89..69291e5e18c14 100644 --- a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTestCase.php +++ b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTestCase.php @@ -43,9 +43,9 @@ public function testDontHandleValue($value) $this->assertRemainingContent($reader, $value); } - abstract public function getHandleValueTestData(); + abstract public static function getHandleValueTestData(); - abstract public function getDontHandleValueTestData(); + abstract public static function getDontHandleValueTestData(); abstract protected function generateHandler(); diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php index 59eaeba7f68ab..c3be7f486b0d3 100644 --- a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php +++ b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php @@ -30,7 +30,7 @@ public function testHandleValue($value, Token $unusedArgument, $remainingContent $this->assertRemainingContent($reader, $remainingContent); } - public function getHandleValueTestData() + public static function getHandleValueTestData() { return [ // 2nd argument only exists for inherited method compatibility @@ -39,7 +39,7 @@ public function getHandleValueTestData() ]; } - public function getDontHandleValueTestData() + public static function getDontHandleValueTestData() { return [ ['>'], diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/HashHandlerTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/HashHandlerTest.php index a156305ea8616..c2ad0319300bd 100644 --- a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/HashHandlerTest.php +++ b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/HashHandlerTest.php @@ -18,7 +18,7 @@ class HashHandlerTest extends AbstractHandlerTestCase { - public function getHandleValueTestData() + public static function getHandleValueTestData() { return [ ['#id', new Token(Token::TYPE_HASH, 'id', 0), ''], @@ -29,7 +29,7 @@ public function getHandleValueTestData() ]; } - public function getDontHandleValueTestData() + public static function getDontHandleValueTestData() { return [ ['id'], diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/IdentifierHandlerTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/IdentifierHandlerTest.php index 3bc35a9180861..a39abb67e4317 100644 --- a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/IdentifierHandlerTest.php +++ b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/IdentifierHandlerTest.php @@ -18,7 +18,7 @@ class IdentifierHandlerTest extends AbstractHandlerTestCase { - public function getHandleValueTestData() + public static function getHandleValueTestData() { return [ ['foo', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ''], @@ -29,7 +29,7 @@ public function getHandleValueTestData() ]; } - public function getDontHandleValueTestData() + public static function getDontHandleValueTestData() { return [ ['>'], diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/NumberHandlerTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/NumberHandlerTest.php index 07a601871b49f..7087a6be01a16 100644 --- a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/NumberHandlerTest.php +++ b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/NumberHandlerTest.php @@ -17,7 +17,7 @@ class NumberHandlerTest extends AbstractHandlerTestCase { - public function getHandleValueTestData() + public static function getHandleValueTestData() { return [ ['12', new Token(Token::TYPE_NUMBER, '12', 0), ''], @@ -30,7 +30,7 @@ public function getHandleValueTestData() ]; } - public function getDontHandleValueTestData() + public static function getDontHandleValueTestData() { return [ ['hello'], diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/StringHandlerTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/StringHandlerTest.php index 133ae38524355..9a984ed38790d 100644 --- a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/StringHandlerTest.php +++ b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/StringHandlerTest.php @@ -18,7 +18,7 @@ class StringHandlerTest extends AbstractHandlerTestCase { - public function getHandleValueTestData() + public static function getHandleValueTestData() { return [ ['"hello"', new Token(Token::TYPE_STRING, 'hello', 1), ''], @@ -31,7 +31,7 @@ public function getHandleValueTestData() ]; } - public function getDontHandleValueTestData() + public static function getDontHandleValueTestData() { return [ ['hello'], diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/WhitespaceHandlerTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/WhitespaceHandlerTest.php index 7a1b893af847a..81dd761b33bce 100644 --- a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/WhitespaceHandlerTest.php +++ b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/WhitespaceHandlerTest.php @@ -16,7 +16,7 @@ class WhitespaceHandlerTest extends AbstractHandlerTestCase { - public function getHandleValueTestData() + public static function getHandleValueTestData() { return [ [' ', new Token(Token::TYPE_WHITESPACE, ' ', 0), ''], @@ -28,7 +28,7 @@ public function getHandleValueTestData() ]; } - public function getDontHandleValueTestData() + public static function getDontHandleValueTestData() { return [ ['>'], diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php index 77ce5d58258a2..e36731b3fe542 100644 --- a/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php +++ b/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php @@ -93,7 +93,7 @@ public function testParseSeriesException($series) Parser::parseSeries($function->getArguments()); } - public function getParserTestData() + public static function getParserTestData() { return [ ['*', ['Element[*]']], @@ -151,7 +151,7 @@ public function getParserTestData() ]; } - public function getParserExceptionTestData() + public static function getParserExceptionTestData() { return [ ['attributes(href)/html/body/a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '(', 10))->getMessage()], @@ -181,7 +181,7 @@ public function getParserExceptionTestData() ]; } - public function getPseudoElementsTestData() + public static function getPseudoElementsTestData() { return [ ['foo', 'Element[foo]', ''], @@ -203,7 +203,7 @@ public function getPseudoElementsTestData() ]; } - public function getSpecificityTestData() + public static function getSpecificityTestData() { return [ ['*', 0], @@ -231,7 +231,7 @@ public function getSpecificityTestData() ]; } - public function getParseSeriesTestData() + public static function getParseSeriesTestData() { return [ ['1n+3', 1, 3], @@ -253,7 +253,7 @@ public function getParseSeriesTestData() ]; } - public function getParseSeriesExceptionTestData() + public static function getParseSeriesExceptionTestData() { return [ ['foo'], diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php index 29d9d5f16b240..ded92ea3c2d20 100644 --- a/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php +++ b/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php @@ -32,7 +32,7 @@ public function testParse($source, $representation) $this->assertEquals($representation, (string) $selector->getTree()); } - public function getParseTestData() + public static function getParseTestData() { return [ ['.testclass', 'Class[Element[*].testclass]'], diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php index 79cc2270324f6..4c1002959df1b 100644 --- a/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php +++ b/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php @@ -32,7 +32,7 @@ public function testParse($source, $representation) $this->assertEquals($representation, (string) $selector->getTree()); } - public function getParseTestData() + public static function getParseTestData() { return [ ['*', 'Element[*]'], diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php index a7c79d69a547a..c8bfdef9f7369 100644 --- a/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php +++ b/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php @@ -32,7 +32,7 @@ public function testParse($source, $representation) $this->assertEquals($representation, (string) $selector->getTree()); } - public function getParseTestData() + public static function getParseTestData() { return [ ['#testid', 'Hash[Element[*]#testid]'], diff --git a/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php b/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php index 0a1ba4dcdcc2c..d3306001352f3 100644 --- a/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php +++ b/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php @@ -165,7 +165,7 @@ public function testOnlyOfTypeFindsSingleChildrenOfGivenType() $this->assertSame('A', $nodeList->item(0)->textContent); } - public function getXpathLiteralTestData() + public static function getXpathLiteralTestData() { return [ ['foo', "'foo'"], @@ -175,7 +175,7 @@ public function getXpathLiteralTestData() ]; } - public function getCssToXPathTestData() + public static function getCssToXPathTestData() { return [ ['*', '*'], @@ -222,7 +222,7 @@ public function getCssToXPathTestData() ]; } - public function getXmlLangTestData() + public static function getXmlLangTestData() { return [ [':lang("EN")', ['first', 'second', 'third', 'fourth']], @@ -237,7 +237,7 @@ public function getXmlLangTestData() ]; } - public function getHtmlIdsTestData() + public static function getHtmlIdsTestData() { return [ ['div', ['outer-div', 'li-div', 'foobar-div']], @@ -362,7 +362,7 @@ public function getHtmlIdsTestData() ]; } - public function getHtmlShakespearTestData() + public static function getHtmlShakespearTestData() { return [ ['*', 246], diff --git a/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php b/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php index e2e6f0a0b67a2..7d5521ddb85db 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php @@ -128,7 +128,7 @@ public function testCannotDeprecateWithAnInvalidTemplate($message) $def->setDeprecated('package', '1.1', $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/ChildDefinitionTest.php b/src/Symfony/Component/DependencyInjection/Tests/ChildDefinitionTest.php index 5c7e187590b69..8340c3e63507d 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ChildDefinitionTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ChildDefinitionTest.php @@ -40,7 +40,7 @@ public function testSetProperty($property, $changeKey) $this->assertSame([$changeKey => true], $def->getChanges()); } - public function getPropertyTests() + public static function getPropertyTests() { return [ ['class', 'class'], diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AliasDeprecatedPublicServicesPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AliasDeprecatedPublicServicesPassTest.php index 406beebce9120..9baff5e6fe190 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AliasDeprecatedPublicServicesPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AliasDeprecatedPublicServicesPassTest.php @@ -58,7 +58,7 @@ public function testProcessWithMissingAttribute(string $attribute, array $attrib (new AliasDeprecatedPublicServicesPass())->process($container); } - public function processWithMissingAttributeProvider() + public static function processWithMissingAttributeProvider() { return [ ['package', ['version' => '1.2']], diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php index 6dcc9d220efde..e61e2d45fc41f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php @@ -954,7 +954,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/IntegrationTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php index 0c1fe4d141958..fae8772193b32 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php @@ -264,7 +264,7 @@ public function testYamlContainerCompiles($directory, $actualServiceId, $expecte $this->assertEquals($expectedService, $actualService); } - public function getYamlCompileTests() + public static function getYamlCompileTests() { $container = new ContainerBuilder(); $container->registerForAutoconfiguration(IntegrationTestStub::class); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php index 4f4b2a69468af..4d5ee1fb41b3d 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php @@ -182,7 +182,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/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index 5fa9c5dfbd813..bf35ba135dfd4 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -227,7 +227,7 @@ public function testBadDefinitionId($id) $builder->setDefinition($id, new Definition('Foo')); } - public function provideBadId() + public static function provideBadId() { return [ [''], @@ -1490,7 +1490,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/ContainerTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php index 497dc99385834..d9fa0f3790cf0 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php @@ -40,7 +40,7 @@ public function testCamelize($id, $expected) $this->assertEquals($expected, Container::camelize($id), sprintf('Container::camelize("%s")', $id)); } - public function dataForTestCamelize() + public static function dataForTestCamelize() { return [ ['foo_bar', 'FooBar'], @@ -64,7 +64,7 @@ public function testUnderscore($id, $expected) $this->assertEquals($expected, Container::underscore($id), sprintf('Container::underscore("%s")', $id)); } - public function dataForTestUnderscore() + public static function dataForTestUnderscore() { return [ ['FooBar', 'foo_bar'], diff --git a/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php b/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php index 2b0a1301697a9..699080d6bdb82 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php @@ -71,7 +71,7 @@ public function testCrossCheck($fixture, $type) $this->assertEquals($services2, $services1, 'Iterator on the containers returns the same services'); } - public function crossCheckLoadersDumpers() + public static function crossCheckLoadersDumpers() { return [ ['services1.xml', 'xml'], diff --git a/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php b/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php index ae6d5bd948c0a..73bae605917a7 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php @@ -213,7 +213,7 @@ public function testSetDeprecatedWithInvalidDeprecationTemplate($message) $def->setDeprecated('vendor/package', '1.1', $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 4c05bc49a2a62..9763d2c158731 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -398,7 +398,7 @@ public function testInvalidFactories($factory) $dumper->dump(); } - public function provideInvalidFactories() + public static function provideInvalidFactories() { return [ [['', 'method']], @@ -1105,7 +1105,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 4149198fabc13..9e2547cc244e6 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php @@ -127,7 +127,7 @@ public function testDumpDecoratedServices($expectedXmlDump, $container) $this->assertEquals($expectedXmlDump, $dumper->dump()); } - public function provideDecoratedServicesData() + public static function provideDecoratedServicesData() { $fixturesPath = realpath(__DIR__.'/../Fixtures/'); @@ -191,7 +191,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 248f6313b7588..e14fb6ae2449f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php @@ -43,7 +43,7 @@ public function testGetEnvString($value, $processed) $this->assertSame($processed, $result); } - public function validStrings() + public static function validStrings() { return [ ['hello', 'hello'], @@ -89,7 +89,7 @@ public function testGetEnvNot($value, $processed) $this->assertSame(!$processed, $result); } - public function validBools() + public static function validBools() { return [ ['true', true], @@ -118,7 +118,7 @@ public function testGetEnvInt($value, $processed) $this->assertSame($processed, $result); } - public function validInts() + public static function validInts() { return [ ['1', 1], @@ -143,7 +143,7 @@ public function testGetEnvIntInvalid($value) }); } - public function invalidInts() + public static function invalidInts() { return [ ['foo'], @@ -168,7 +168,7 @@ public function testGetEnvFloat($value, $processed) $this->assertSame($processed, $result); } - public function validFloats() + public static function validFloats() { return [ ['1', 1.0], @@ -193,7 +193,7 @@ public function testGetEnvFloatInvalid($value) }); } - public function invalidFloats() + public static function invalidFloats() { return [ ['foo'], @@ -218,7 +218,7 @@ public function testGetEnvConst($value, $processed) $this->assertSame($processed, $result); } - public function validConsts() + public static function validConsts() { return [ ['Symfony\Component\DependencyInjection\Tests\EnvVarProcessorTest::TEST_CONST', self::TEST_CONST], @@ -242,7 +242,7 @@ public function testGetEnvConstInvalid($value) }); } - public function invalidConsts() + public static function invalidConsts() { return [ ['Symfony\Component\DependencyInjection\Tests\EnvVarProcessorTest::UNDEFINED_CONST'], @@ -298,7 +298,7 @@ public function testGetEnvJson($value, $processed) $this->assertSame($processed, $result); } - public function validJson() + public static function validJson() { return [ ['[1]', [1]], @@ -336,7 +336,7 @@ public function testGetEnvJsonOther($value) }); } - public function otherJsonValues() + public static function otherJsonValues() { return [ [1], @@ -387,7 +387,7 @@ public function testGetEnvKeyNoArrayResult($value) }); } - public function noArrayValues() + public static function noArrayValues() { return [ [null], @@ -413,7 +413,7 @@ public function testGetEnvKeyArrayKeyNotFound($value) }); } - public function invalidArrayValues() + public static function invalidArrayValues() { return [ [[]], @@ -436,7 +436,7 @@ public function testGetEnvKey($value) })); } - public function arrayValues() + public static function arrayValues() { return [ [['index' => 'password']], @@ -478,7 +478,7 @@ public function testGetEnvNullable($value, $processed) $this->assertSame($processed, $result); } - public function validNullables() + public static function validNullables() { return [ ['hello', 'hello'], @@ -533,7 +533,7 @@ public function testGetEnvResolve($value, $processed) $this->assertSame($processed, $result); } - public function validResolve() + public static function validResolve() { return [ ['string', 'string'], @@ -574,7 +574,7 @@ public function testGetEnvResolveNotScalar($value) }); } - public function notScalarResolve() + public static function notScalarResolve() { return [ [null], @@ -634,7 +634,7 @@ public function testGetEnvCsv($value, $processed) $this->assertSame($processed, $result); } - public function validCsv() + public static function validCsv() { $complex = <<<'CSV' ,"""","foo""","\""",\,foo\ @@ -749,7 +749,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/Extension/ExtensionTest.php b/src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php index 37fa0ad9d9132..48d8b0078688e 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php @@ -32,7 +32,7 @@ public function testIsConfigEnabledReturnsTheResolvedValue($enabled) $this->assertSame($enabled, $extension->isConfigEnabled(new ContainerBuilder(), ['enabled' => $enabled])); } - public function getResolvedEnabledFixtures() + public static function getResolvedEnabledFixtures() { return [ [true], diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/Configurator/EnvConfiguratorTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/Configurator/EnvConfiguratorTest.php index 0b354e7615635..10f8e6f5af165 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/Configurator/EnvConfiguratorTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/Configurator/EnvConfiguratorTest.php @@ -24,7 +24,7 @@ public function test(string $expected, EnvConfigurator $envConfigurator) $this->assertSame($expected, (string) $envConfigurator); } - public function provide() + public static function provide() { yield ['%env(FOO)%', new EnvConfigurator('FOO')]; yield ['%env(string:FOO)%', new EnvConfigurator('string:FOO')]; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php index 6c2743e860344..02e34fc13e376 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php @@ -262,7 +262,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/IniFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php index 07f23f3137af5..e81f7fbb2d310 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php @@ -58,7 +58,7 @@ public function testTypeConversionsWithNativePhp($key, $value, $supported) $this->assertSame($value, $expected['parameters'][$key], '->load() converts values to PHP types'); } - public function getTypeConversions() + public static function getTypeConversions() { return [ ['true_comment', true, true], 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 c324e9c13308a..8b141d2577ee3 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php @@ -85,7 +85,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 67f389ddc4ffb..cffed2c4c3286 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php @@ -93,7 +93,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/AbstractCrawlerTestCase.php b/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php index 34282c1e4cfce..55178ca0e4538 100644 --- a/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php +++ b/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php @@ -912,7 +912,7 @@ public function testSiblings() } } - public function provideMatchTests() + public static function provideMatchTests() { yield ['#foo', true, '#foo']; yield ['#foo', true, '.foo']; @@ -1160,7 +1160,7 @@ public function testBaseTag($baseValue, $linkValue, $expectedUri, $currentUri = $this->assertEquals($expectedUri, $crawler->filterXPath('//a')->link()->getUri(), $description); } - public function getBaseTagData() + public static function getBaseTagData() { return [ ['http://base.com', 'link', 'http://base.com/link'], @@ -1180,7 +1180,7 @@ public function testBaseTagWithForm($baseValue, $actionValue, $expectedUri, $cur $this->assertEquals($expectedUri, $crawler->filterXPath('//button')->form()->getUri(), $description); } - public function getBaseTagWithFormData() + public static function getBaseTagWithFormData() { return [ ['https://base.com/', 'link/', 'https://base.com/link/', 'https://base.com/link/', ' tag does work with a path and relative form action'], diff --git a/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php b/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php index dc665f1546f9f..793440258c65d 100644 --- a/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php @@ -78,7 +78,7 @@ public function testSetValue($method) ); } - public function getSetValueMethods() + public static function getSetValueMethods() { return [ ['setValue'], 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 7907a3a3e2cac..2b1e6f3e776b2 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 = self::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 = self::getDoctype().'

Foo

'; diff --git a/src/Symfony/Component/DomCrawler/Tests/ImageTest.php b/src/Symfony/Component/DomCrawler/Tests/ImageTest.php index c8c3b0a72382c..4fdf7a9501ba2 100644 --- a/src/Symfony/Component/DomCrawler/Tests/ImageTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/ImageTest.php @@ -56,7 +56,7 @@ public function testGetUri($url, $currentUri, $expected) $this->assertEquals($expected, $image->getUri()); } - public function getGetUriTests() + public static function getGetUriTests() { return [ ['/foo.png', 'http://localhost/bar/foo/', 'http://localhost/foo.png'], diff --git a/src/Symfony/Component/DomCrawler/Tests/LinkTest.php b/src/Symfony/Component/DomCrawler/Tests/LinkTest.php index 084a6efd77c28..93490885a7bd2 100644 --- a/src/Symfony/Component/DomCrawler/Tests/LinkTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/LinkTest.php @@ -105,7 +105,7 @@ public function testGetUriOnLink($url, $currentUri, $expected) $this->assertEquals($expected, $link->getUri()); } - public function getGetUriTests() + public static function getGetUriTests() { return [ ['/foo', 'http://localhost/bar/foo/', 'http://localhost/foo'], diff --git a/src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php b/src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php index c62d7d3811338..06a4d30c06a46 100644 --- a/src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php @@ -24,7 +24,7 @@ public function testResolver(string $uri, string $baseUri, string $expected) $this->assertEquals($expected, UriResolver::resolve($uri, $baseUri)); } - public function provideResolverTests() + public static function provideResolverTests() { return [ ['/foo', 'http://localhost/bar/foo/', 'http://localhost/foo'], diff --git a/src/Symfony/Component/Dotenv/Tests/DotenvTest.php b/src/Symfony/Component/Dotenv/Tests/DotenvTest.php index 47c9bfba137ac..2089e4bca336c 100644 --- a/src/Symfony/Component/Dotenv/Tests/DotenvTest.php +++ b/src/Symfony/Component/Dotenv/Tests/DotenvTest.php @@ -33,7 +33,7 @@ public function testParseWithFormatError($data, $error) } } - public function getEnvDataWithFormatErrors() + public static function getEnvDataWithFormatErrors() { $tests = [ ['FOO=BAR BAZ', "A value containing spaces must be surrounded by quotes in \".env\" at line 1.\n...FOO=BAR BAZ...\n ^ line 1 offset 11"], @@ -71,7 +71,7 @@ public function testParse($data, $expected) $this->assertSame($expected, $dotenv->parse($data)); } - public function getEnvData() + public static function getEnvData() { putenv('LOCAL=local'); $_ENV['LOCAL'] = 'local'; diff --git a/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php b/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php index 83d7793d89592..66409ddc98efa 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 9688579d79a32..8f57bb53b8cb5 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/ErrorRenderer/HtmlErrorRendererTest.php b/src/Symfony/Component/ErrorHandler/Tests/ErrorRenderer/HtmlErrorRendererTest.php index 476905516da79..6680b95a0cc3d 100644 --- a/src/Symfony/Component/ErrorHandler/Tests/ErrorRenderer/HtmlErrorRendererTest.php +++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorRenderer/HtmlErrorRendererTest.php @@ -24,7 +24,7 @@ public function testRender(\Throwable $exception, HtmlErrorRenderer $errorRender $this->assertStringMatchesFormat($expected, $errorRenderer->render($exception)->getAsString()); } - public function getRenderData(): iterable + public static function getRenderData(): iterable { $expectedDebug = << diff --git a/src/Symfony/Component/ErrorHandler/Tests/Exception/FlattenExceptionTest.php b/src/Symfony/Component/ErrorHandler/Tests/Exception/FlattenExceptionTest.php index da4fba3b3d3d8..6262656fd839d 100644 --- a/src/Symfony/Component/ErrorHandler/Tests/Exception/FlattenExceptionTest.php +++ b/src/Symfony/Component/ErrorHandler/Tests/Exception/FlattenExceptionTest.php @@ -226,7 +226,7 @@ public function testCreate() ); } - public function flattenDataProvider(): array + public static function flattenDataProvider(): array { return [ [new \Exception('test', 123), 'Exception'], @@ -234,7 +234,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/ExpressionLanguage/Tests/ExpressionLanguageTest.php b/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php index c4c98dd88006b..309472c4321b0 100644 --- a/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php +++ b/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php @@ -119,7 +119,7 @@ public function testParseThrowsInsteadOfNotice() $expressionLanguage->parse('node.', ['node']); } - public function shortCircuitProviderEvaluate() + public static function shortCircuitProviderEvaluate() { $object = new class(\Closure::fromCallable([static::class, 'fail'])) { private $fail; @@ -143,7 +143,7 @@ public function foo() ]; } - public function shortCircuitProviderCompile() + public static function shortCircuitProviderCompile() { return [ ['false and foo', ['foo' => 'foo'], false], @@ -267,7 +267,7 @@ public function testRegisterAfterCompile($registerCallback) $registerCallback($el); } - public function getRegisterCallbacks() + public static function getRegisterCallbacks() { return [ [ diff --git a/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php b/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php index 67e551f587eb7..8441e52a230eb 100644 --- a/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php +++ b/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php @@ -54,7 +54,7 @@ public function testTokenizeThrowsErrorOnUnclosedBrace() $this->lexer->tokenize($expression); } - public function getTokenizeData() + public static function getTokenizeData() { return [ [ diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index 164c11b947850..768b9db6f97b5 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -1146,7 +1146,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', '../'], @@ -1434,7 +1434,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/Filesystem/Tests/PathTest.php b/src/Symfony/Component/Filesystem/Tests/PathTest.php index dd12c784539e2..77b9f2a2d0576 100644 --- a/src/Symfony/Component/Filesystem/Tests/PathTest.php +++ b/src/Symfony/Component/Filesystem/Tests/PathTest.php @@ -41,7 +41,7 @@ protected function tearDown(): void putenv('HOMEPATH='.$this->storedEnv['HOMEPATH']); } - public function provideCanonicalizationTests(): \Generator + public static function provideCanonicalizationTests(): \Generator { // relative paths (forward slash) yield ['css/./style.css', 'css/style.css']; @@ -172,7 +172,7 @@ public function testCanonicalize(string $path, string $canonicalized) $this->assertSame($canonicalized, Path::canonicalize($path)); } - public function provideGetDirectoryTests(): \Generator + public static function provideGetDirectoryTests(): \Generator { yield ['/webmozart/symfony/style.css', '/webmozart/symfony']; yield ['/webmozart/symfony', '/webmozart']; @@ -235,7 +235,7 @@ public function testGetDirectory(string $path, string $directory) $this->assertSame($directory, Path::getDirectory($path)); } - public function provideGetFilenameWithoutExtensionTests(): \Generator + public static function provideGetFilenameWithoutExtensionTests(): \Generator { yield ['/webmozart/symfony/style.css.twig', null, 'style.css']; yield ['/webmozart/symfony/style.css.', null, 'style.css']; @@ -266,7 +266,7 @@ public function testGetFilenameWithoutExtension(string $path, ?string $extension $this->assertSame($filename, Path::getFilenameWithoutExtension($path, $extension)); } - public function provideGetExtensionTests(): \Generator + public static function provideGetExtensionTests(): \Generator { yield ['/webmozart/symfony/style.css.twig', false, 'twig']; yield ['/webmozart/symfony/style.css', false, 'css']; @@ -291,7 +291,7 @@ public function testGetExtension(string $path, bool $forceLowerCase, string $ext $this->assertSame($extension, Path::getExtension($path, $forceLowerCase)); } - public function provideHasExtensionTests(): \Generator + public static function provideHasExtensionTests(): \Generator { yield [true, '/webmozart/symfony/style.css.twig', null, false]; yield [true, '/webmozart/symfony/style.css', null, false]; @@ -338,7 +338,7 @@ public function testHasExtension(bool $hasExtension, string $path, $extension, b $this->assertSame($hasExtension, Path::hasExtension($path, $extension, $ignoreCase)); } - public function provideChangeExtensionTests(): \Generator + public static function provideChangeExtensionTests(): \Generator { yield ['/webmozart/symfony/style.css.twig', 'html', '/webmozart/symfony/style.css.html']; yield ['/webmozart/symfony/style.css', 'sass', '/webmozart/symfony/style.sass']; @@ -362,7 +362,7 @@ public function testChangeExtension(string $path, string $extension, string $pat $this->assertSame($pathExpected, Path::changeExtension($path, $extension)); } - public function provideIsAbsolutePathTests(): \Generator + public static function provideIsAbsolutePathTests(): \Generator { yield ['/css/style.css', true]; yield ['/', true]; @@ -405,7 +405,7 @@ public function testIsRelative(string $path, bool $isAbsolute) $this->assertSame(!$isAbsolute, Path::isRelative($path)); } - public function provideGetRootTests(): \Generator + public static function provideGetRootTests(): \Generator { yield ['/css/style.css', '/']; yield ['/', '/']; @@ -460,7 +460,7 @@ private static function getPathTests(): \Generator ]; } - public function provideMakeAbsoluteTests(): \Generator + public static function provideMakeAbsoluteTests(): \Generator { yield from self::getPathTests(); @@ -551,7 +551,7 @@ public function testMakeAbsoluteFailsIfBasePathEmpty() Path::makeAbsolute('css/style.css', ''); } - public function provideAbsolutePathsWithDifferentRoots(): \Generator + public static function provideAbsolutePathsWithDifferentRoots(): \Generator { yield ['C:/css/style.css', '/webmozart/symfony']; yield ['C:/css/style.css', '\\webmozart\\symfony']; @@ -587,7 +587,7 @@ public function testMakeAbsoluteDoesNotFailIfDifferentRoot(string $basePath, str $this->assertSame(Path::canonicalize($absolutePath), Path::makeAbsolute($absolutePath, $basePath)); } - public function provideMakeRelativeTests(): \Generator + public static function provideMakeRelativeTests(): \Generator { foreach (self::getPathTests() as $set) { yield [$set[2], $set[1], $set[0]]; @@ -713,7 +713,7 @@ public function testMakeRelativeFailsIfDifferentRoot(string $absolutePath, strin Path::makeRelative($absolutePath, $basePath); } - public function provideIsLocalTests(): \Generator + public static function provideIsLocalTests(): \Generator { yield ['/bg.png', true]; yield ['bg.png', true]; @@ -730,7 +730,7 @@ public function testIsLocal(string $path, bool $isLocal) $this->assertSame($isLocal, Path::isLocal($path)); } - public function provideGetLongestCommonBasePathTests(): \Generator + public static function provideGetLongestCommonBasePathTests(): \Generator { // same paths yield [['/base/path', '/base/path'], '/base/path']; @@ -850,7 +850,7 @@ public function testGetLongestCommonBasePath(array $paths, ?string $basePath) $this->assertSame($basePath, Path::getLongestCommonBasePath(...$paths)); } - public function provideIsBasePathTests(): \Generator + public static function provideIsBasePathTests(): \Generator { // same paths yield ['/base/path', '/base/path', true]; @@ -939,7 +939,7 @@ public function testIsBasePath(string $path, string $ofPath, bool $result) $this->assertSame($result, Path::isBasePath($path, $ofPath)); } - public function provideJoinTests(): \Generator + public static function provideJoinTests(): \Generator { yield [['', ''], '']; yield [['/path/to/test', ''], '/path/to/test']; diff --git a/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php b/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php index a04cc62f34585..aee5925142be6 100644 --- a/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php +++ b/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php @@ -65,7 +65,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'], @@ -91,7 +91,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/Comparator/DateComparatorTest.php b/src/Symfony/Component/Finder/Tests/Comparator/DateComparatorTest.php index f89a1a283d8e0..47bcc4838bd26 100644 --- a/src/Symfony/Component/Finder/Tests/Comparator/DateComparatorTest.php +++ b/src/Symfony/Component/Finder/Tests/Comparator/DateComparatorTest.php @@ -49,7 +49,7 @@ public function testTest($test, $match, $noMatch) } } - public function getTestData() + public static function getTestData() { return [ ['< 2005-10-10', [strtotime('2005-10-09')], [strtotime('2005-10-15')]], diff --git a/src/Symfony/Component/Finder/Tests/Comparator/NumberComparatorTest.php b/src/Symfony/Component/Finder/Tests/Comparator/NumberComparatorTest.php index 6458133ebd80d..60c5f1c6cd355 100644 --- a/src/Symfony/Component/Finder/Tests/Comparator/NumberComparatorTest.php +++ b/src/Symfony/Component/Finder/Tests/Comparator/NumberComparatorTest.php @@ -51,7 +51,7 @@ public function testTest($test, $match, $noMatch) } } - public function getTestData() + public static function getTestData() { return [ ['< 1000', ['500', '999'], ['1000', '1500']], @@ -81,7 +81,7 @@ public function getTestData() ]; } - public function getConstructorTestData() + public static function getConstructorTestData() { return [ [ diff --git a/src/Symfony/Component/Finder/Tests/FinderTest.php b/src/Symfony/Component/Finder/Tests/FinderTest.php index 7a79c5e89274f..183a09cff190a 100644 --- a/src/Symfony/Component/Finder/Tests/FinderTest.php +++ b/src/Symfony/Component/Finder/Tests/FinderTest.php @@ -1274,7 +1274,7 @@ public function testRegexSpecialCharsLocationWithPathRestrictionContainingStartF $this->assertIterator($this->toAbsoluteFixtures($expected), $finder); } - public function getContainsTestData() + public static function getContainsTestData() { return [ ['', '', []], @@ -1292,7 +1292,7 @@ public function getContainsTestData() ]; } - public function getRegexNameTestData() + public static function getRegexNameTestData() { return [ ['~.*t\\.p.+~i'], @@ -1313,7 +1313,7 @@ public function testPath($matchPatterns, $noMatchPatterns, array $expected) $this->assertIterator($this->toAbsoluteFixtures($expected), $finder); } - public function getTestPathData() + public static function getTestPathData() { return [ ['', '', []], diff --git a/src/Symfony/Component/Finder/Tests/GitignoreTest.php b/src/Symfony/Component/Finder/Tests/GitignoreTest.php index 65b52057937b9..574e9f32d294a 100644 --- a/src/Symfony/Component/Finder/Tests/GitignoreTest.php +++ b/src/Symfony/Component/Finder/Tests/GitignoreTest.php @@ -392,7 +392,7 @@ public static function provider(): array return $cases; } - public function providerExtended(): array + public static function providerExtended(): array { $basicCases = self::provider(); @@ -479,7 +479,7 @@ public function testToRegexMatchingNegatedPatterns(array $gitignoreLines, array } } - public function provideNegatedPatternsCases(): iterable + public static function provideNegatedPatternsCases(): iterable { yield [ [''], diff --git a/src/Symfony/Component/Finder/Tests/Iterator/CustomFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/CustomFilterIteratorTest.php index 7c3c65ce5ee81..3b1f662e2fe05 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/CustomFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/CustomFilterIteratorTest.php @@ -33,7 +33,7 @@ public function testAccept($filters, $expected) $this->assertIterator($expected, $iterator); } - public function getAcceptData() + public static function getAcceptData() { return [ [[function (\SplFileInfo $fileinfo) { return false; }], []], diff --git a/src/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php index 5b237c9eb7621..b02d8f4f0d2b2 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php @@ -30,7 +30,7 @@ public function testAccept($size, $expected) $this->assertIterator($expected, $iterator); } - public function getAcceptData() + public static function getAcceptData() { $since20YearsAgo = [ '.git', diff --git a/src/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php index c971ee9bb63b5..c90df8ec53205 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php @@ -30,7 +30,7 @@ public function testAccept($minDepth, $maxDepth, $expected) $this->assertEquals($expected, $actual); } - public function getAcceptData() + public static function getAcceptData() { $lessThan1 = [ '.git', diff --git a/src/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php index 5299c93ed28c4..9b5ed98ad5a72 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php @@ -28,7 +28,7 @@ public function testAccept($directories, $expected) $this->assertIterator($expected, $iterator); } - public function getAcceptData() + public static function getAcceptData() { $foo = [ '.bar', diff --git a/src/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php index 5a16774a66343..3ed1cc062f5d1 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php @@ -27,7 +27,7 @@ public function testAccept($mode, $expected) $this->assertIterator($expected, $iterator); } - public function getAcceptData() + public static function getAcceptData() { $onlyFiles = [ 'test.py', diff --git a/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php index f4f70c8e8c738..34ba50ddcf0d0 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php @@ -45,7 +45,7 @@ public function testFilter(\Iterator $inner, array $matchPatterns, array $noMatc $this->assertIterator($resultArray, $iterator); } - public function getTestFilterData() + public static function getTestFilterData() { $inner = new MockFileListIterator(); diff --git a/src/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php index a12072c62720a..db4eb2b947198 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php @@ -27,7 +27,7 @@ public function testAccept($matchPatterns, $noMatchPatterns, $expected) $this->assertIterator($expected, $iterator); } - public function getAcceptData() + public static function getAcceptData() { return [ [['test.*'], [], ['test.php', 'test.py']], diff --git a/src/Symfony/Component/Finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php index e1bd835b4cdb8..e6abf94404543 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php @@ -25,7 +25,7 @@ public function testIsRegex($string, $isRegex, $message) $this->assertEquals($isRegex, $testIterator->isRegex($string), $message); } - public function getIsRegexFixtures() + public static function getIsRegexFixtures() { yield ['foo', false, 'string']; yield [' foo ', false, '" " is not a valid delimiter']; diff --git a/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php index e2c1325276d95..5c0663e530183 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php @@ -24,7 +24,7 @@ public function testFilter(\Iterator $inner, array $matchPatterns, array $noMatc $this->assertIterator($resultArray, $iterator); } - public function getTestFilterData() + public static function getTestFilterData() { $inner = new MockFileListIterator(); diff --git a/src/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php index 25a6b8a2d75a2..e5f3b6a1ddebb 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php @@ -28,7 +28,7 @@ public function testAccept($size, $expected) $this->assertIterator($expected, $iterator); } - public function getAcceptData() + public static function getAcceptData() { $lessThan1KGreaterThan05K = [ '.foo', diff --git a/src/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php index c6f8c30796103..a4f13feef69a8 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php @@ -68,7 +68,7 @@ public function testAccept($mode, $expected) } } - public function getAcceptData() + public static function getAcceptData() { $sortByName = [ '.bar', diff --git a/src/Symfony/Component/Finder/Tests/Iterator/VcsIgnoredFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/VcsIgnoredFilterIteratorTest.php index 14cb3c4443ff4..61da148dc9c40 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/VcsIgnoredFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/VcsIgnoredFilterIteratorTest.php @@ -59,7 +59,7 @@ public function testAccept(array $gitIgnoreFiles, array $otherFileNames, array $ $this->assertIterator($this->toAbsolute($expectedResult), $iterator); } - public function getAcceptData(): iterable + public static function getAcceptData(): iterable { yield 'simple file' => [ [ diff --git a/src/Symfony/Component/Form/Tests/AbstractLayoutTestCase.php b/src/Symfony/Component/Form/Tests/AbstractLayoutTestCase.php index dd32135ca2a87..9fd5df245b157 100644 --- a/src/Symfony/Component/Form/Tests/AbstractLayoutTestCase.php +++ b/src/Symfony/Component/Form/Tests/AbstractLayoutTestCase.php @@ -2770,7 +2770,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/AbstractRequestHandlerTestCase.php b/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTestCase.php index 15a0f0352270b..becf3504c3183 100644 --- a/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTestCase.php +++ b/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTestCase.php @@ -75,7 +75,7 @@ public static function methodExceptGetProvider() ]; } - public function methodProvider() + public static function methodProvider() { return array_merge([ ['GET'], @@ -348,7 +348,7 @@ public function testAddFormErrorIfPostMaxSizeExceeded(?int $contentLength, strin } } - public function getPostMaxSizeFixtures() + public static function getPostMaxSizeFixtures() { return [ [1024 ** 3 + 1, '1G', true, ['{{ max }}' => '1G']], @@ -381,7 +381,7 @@ public function testFailedFileUploadIsTurnedIntoFormError($errorCode, $expectedE $this->assertSame($expectedErrorCode, $this->requestHandler->getUploadFileError($this->getFailedUploadedFile($errorCode))); } - public function uploadFileErrorCodes() + public static function uploadFileErrorCodes() { return [ 'no error' => [\UPLOAD_ERR_OK, null], diff --git a/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php b/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php index c6f58a50a1840..71668dd028493 100644 --- a/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php +++ b/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php @@ -20,7 +20,7 @@ */ class ButtonBuilderTest extends TestCase { - public function getValidNames() + public static function getValidNames() { return [ ['reset'], @@ -47,7 +47,7 @@ public function testNameContainingIllegalCharacters() $this->assertInstanceOf(ButtonBuilder::class, new ButtonBuilder('button[]')); } - public function getInvalidNames() + public static function getInvalidNames() { return [ [''], diff --git a/src/Symfony/Component/Form/Tests/ButtonTest.php b/src/Symfony/Component/Form/Tests/ButtonTest.php index 0113acab24939..9431328e2f797 100644 --- a/src/Symfony/Component/Form/Tests/ButtonTest.php +++ b/src/Symfony/Component/Form/Tests/ButtonTest.php @@ -57,7 +57,7 @@ public function testDisabledIfParentIsDisabled($parentDisabled, $buttonDisabled, $this->assertSame($result, $button->isDisabled()); } - public function getDisabledStates() + public static function getDisabledStates() { return [ // parent, button, result diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php index 4f5c4eb0e342f..893af48593ebf 100644 --- a/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php +++ b/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php @@ -555,7 +555,7 @@ public function testCreateViewDifferentAttributesClosure() $this->assertEquals(new ChoiceListView(), $view2); } - public function provideSameChoices() + public static function provideSameChoices() { $object = (object) ['foo' => 'bar']; @@ -568,7 +568,7 @@ public function provideSameChoices() ]; } - public function provideDistinguishedChoices() + public static function provideDistinguishedChoices() { return [ [0, false], diff --git a/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php b/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php index 73750380385f8..b9b2ef03aca55 100644 --- a/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php +++ b/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php @@ -206,7 +206,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $tester->complete($input)); } - public function provideCompletionSuggestions(): iterable + public static function provideCompletionSuggestions(): iterable { yield 'option --format' => [ ['--format', ''], diff --git a/src/Symfony/Component/Form/Tests/CompoundFormTest.php b/src/Symfony/Component/Form/Tests/CompoundFormTest.php index f45c2617389b1..b23dab0c48801 100644 --- a/src/Symfony/Component/Form/Tests/CompoundFormTest.php +++ b/src/Symfony/Component/Form/Tests/CompoundFormTest.php @@ -574,7 +574,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/Console/Descriptor/AbstractDescriptorTestCase.php b/src/Symfony/Component/Form/Tests/Console/Descriptor/AbstractDescriptorTestCase.php index 7ba1b10ce11d8..f11cb8c5056a8 100644 --- a/src/Symfony/Component/Form/Tests/Console/Descriptor/AbstractDescriptorTestCase.php +++ b/src/Symfony/Component/Form/Tests/Console/Descriptor/AbstractDescriptorTestCase.php @@ -80,7 +80,7 @@ public function testDescribeOption(OptionsResolver $optionsResolver, array $opti } } - public function getDescribeDefaultsTestData() + public static function getDescribeDefaultsTestData() { $options['core_types'] = ['Symfony\Component\Form\Extension\Core\Type\FormType']; $options['service_types'] = ['Symfony\Bridge\Doctrine\Form\Type\EntityType']; @@ -96,7 +96,7 @@ public function getDescribeDefaultsTestData() yield [null, $options, 'types_with_deprecated_options']; } - public function getDescribeResolvedFormTypeTestData() + public static function getDescribeResolvedFormTypeTestData() { $typeExtensions = [new FormTypeCsrfExtension(new CsrfTokenManager())]; $parent = new ResolvedFormType(new FormType(), $typeExtensions); @@ -106,7 +106,7 @@ public function getDescribeResolvedFormTypeTestData() yield [new ResolvedFormType(new FooType(), [], $parent), ['decorated' => false, 'show_deprecated' => true], 'deprecated_options_of_type']; } - public function getDescribeOptionTestData() + public static function getDescribeOptionTestData() { $parent = new ResolvedFormType(new FormType()); $options['decorated'] = false; diff --git a/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php b/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php index 6c73abe370d7e..c2beee8747127 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 [ [ @@ -275,7 +275,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/DataMapperTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php index 0a9a73ca5ba81..c119d665b85f1 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php @@ -351,7 +351,7 @@ public function testMapFormsToDataDoesNotChangeEqualDateTimeInstance($date) self::assertSame($publishedAtValue, $article['publishedAt']); } - public function provideDate(): array + public static function provideDate(): array { return [ [new \DateTime()], 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 5db2a674821e5..3b2ce0015bbd3 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php @@ -360,7 +360,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/DateIntervalToStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.php index f3127349cb580..81e1885aa57fb 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.php @@ -20,7 +20,7 @@ */ class DateIntervalToStringTransformerTest extends DateIntervalTestCase { - public function dataProviderISO() + public static function dataProviderISO() { $data = [ ['P%YY%MM%DDT%HH%IM%SS', 'P00Y00M00DT00H00M00S', 'PT0S'], @@ -34,7 +34,7 @@ public function dataProviderISO() return $data; } - public function dataProviderDate() + public static function dataProviderDate() { $data = [ [ 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 6a3475dd3ee2b..8dffb13e2f927 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 fe829a4299901..098deb7065608 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 90d1c538f20a9..18005e0ed5559 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php @@ -49,12 +49,12 @@ public static function allProvider() ]; } - public function transformProvider() + public static function transformProvider() { return self::allProvider(); } - public function reverseTransformProvider() + public static function reverseTransformProvider() { return array_merge(self::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 1ca6078688599..56ff98117aee9 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 BaseDateTimeTransformerTestCase { - 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 fc8cce0cc242d..837717670a8cd 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) @@ -127,7 +127,7 @@ public function testReverseTransformWithGrouping() $this->assertEquals(12345, $transformer->reverseTransform('12345')); } - public function reverseTransformWithRoundingProvider() + public static function reverseTransformWithRoundingProvider() { return [ // towards positive infinity (1.6 -> 2, -1.6 -> -1) @@ -219,7 +219,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 8de48b745a049..9c2e3bcae3d13 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/PercentToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php index c9d89e8e27a2e..34fbd9571cfce 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php @@ -95,7 +95,7 @@ public function testReverseTransform() $this->assertEquals(2, $transformer->reverseTransform('200')); } - public function reverseTransformWithRoundingProvider() + public static function reverseTransformWithRoundingProvider() { return [ // towards positive infinity (1.6 -> 2, -1.6 -> -1) 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/UlidToStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/UlidToStringTransformerTest.php index 87a1592e25fc1..7978941b5d026 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/UlidToStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/UlidToStringTransformerTest.php @@ -18,7 +18,7 @@ class UlidToStringTransformerTest extends TestCase { - public function provideValidUlid() + public static function provideValidUlid() { return [ ['01D85PP1982GF6KTVFHQ7W78FB', new Ulid('01d85pp1982gf6ktvfhq7w78fb')], 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 5c855bb868b1a..67e7f7a360f45 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/EventListener/MergeCollectionListenerTestCase.php b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTestCase.php index 709327de4cbdf..039108f4eb7bc 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTestCase.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTestCase.php @@ -39,7 +39,7 @@ protected function getForm($name = 'name', $propertyPath = null) return $this->getBuilder($name)->setAttribute('property_path', $propertyPath)->getForm(); } - public function getBooleanMatrix1() + public static function getBooleanMatrix1() { return [ [true], @@ -47,7 +47,7 @@ public function getBooleanMatrix1() ]; } - public function getBooleanMatrix2() + public static function getBooleanMatrix2() { return [ [true, true], 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 8b46e9fd9eec7..2cb20e1cbb6c5 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 afdd662645c5f..ccb6b78222ecf 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php @@ -1707,7 +1707,7 @@ public function testDontPassPlaceholderIfContainedInChoices($multiple, $expanded $this->assertTrue($view->vars['placeholder_in_choices']); } - public function getOptionsWithPlaceholder() + public static function getOptionsWithPlaceholder() { return [ // single non-expanded @@ -1963,7 +1963,7 @@ public function testSubmitInvalidNestedValue($multiple, $expanded, $submissionDa } } - public function invalidNestedValueTestMatrix() + public static function invalidNestedValueTestMatrix() { return [ 'non-multiple, non-expanded' => [false, false, [[]]], @@ -2158,7 +2158,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], @@ -2193,7 +2193,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/ColorTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ColorTypeTest.php index cd514d152a4e7..dbbc1579ff521 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ColorTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ColorTypeTest.php @@ -33,7 +33,7 @@ public function testValidationShouldPass(bool $html5, ?string $submittedValue) $this->assertEmpty($form->getErrors()); } - public function validationShouldPassProvider() + public static function validationShouldPassProvider() { return [ [false, 'foo'], @@ -71,7 +71,7 @@ public function testValidationShouldFail(string $expectedValueParameterValue, ?s $this->assertEquals([$expectedFormError], iterator_to_array($form->getErrors())); } - public function validationShouldFailProvider() + public static function validationShouldFailProvider() { return [ ['foo', 'foo'], 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 3d8f87228735f..cabb5ea5f5f35 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 f9c9e1524826e..5a35abb453662 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php @@ -706,7 +706,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 46d1ca3cca5e8..32bf613037992 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/EnumTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/EnumTypeTest.php index ebd19e75b09b5..77c1c62b041a5 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/EnumTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/EnumTypeTest.php @@ -84,7 +84,7 @@ public function testSubmitSingleExpanded(string $class, string $submittedData, \ $this->assertTrue($form->isSynchronized()); } - public function provideSingleSubmitData(): iterable + public static function provideSingleSubmitData(): iterable { yield 'unbacked' => [ Answer::class, @@ -226,7 +226,7 @@ public function testSubmitMultipleExpanded(string $class, array $submittedValues $this->assertTrue($form->isSynchronized()); } - public function provideMultiSubmitData(): iterable + public static function provideMultiSubmitData(): iterable { yield 'unbacked' => [ Answer::class, 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 a893d6d622a8a..e39a96c25f5d7 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()], @@ -301,7 +301,7 @@ public function testMultipleSubmittedFailedFileUploadsAreTurnedIntoFormErrorUsin } } - public function uploadFileErrorCodes() + public static function uploadFileErrorCodes() { return [ 'no error' => [\UPLOAD_ERR_OK, null], diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php index 2d200ede19ec8..b2a295b276f48 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php @@ -107,7 +107,7 @@ public function testNotMappedInnerIsOverridden($configurationKey) $this->assertTrue($form['second']->getConfig()->getMapped()); } - public function notMappedConfigurationKeys() + public static function notMappedConfigurationKeys() { return [ ['first_options'], 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 7b30fe31a140e..7e565c7c9fcef 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 139ebe7e03154..9b3bbbfd00ee0 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'], @@ -1110,7 +1110,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 68cadba570c91..b093513b75f4c 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 760f8da14e51f..8648dc3d4906a 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() { return [ [new NotNull(), new ValueGuess(true, Guess::HIGH_CONFIDENCE)], @@ -182,7 +182,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 08b8caaedd5f5..5a9658a74cc2b 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php @@ -280,7 +280,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! @@ -838,7 +838,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 @@ -1312,7 +1312,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 @@ -1503,7 +1503,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/FormConfigTest.php b/src/Symfony/Component/Form/Tests/FormConfigTest.php index 239ffbc99a611..6de3e9416f493 100644 --- a/src/Symfony/Component/Form/Tests/FormConfigTest.php +++ b/src/Symfony/Component/Form/Tests/FormConfigTest.php @@ -21,7 +21,7 @@ */ class FormConfigTest extends TestCase { - public function getHtml4Ids() + public static function getHtml4Ids() { return [ ['z0'], 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 3d8b0b20d83f1..0f9556b1a572e 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]; @@ -243,7 +243,7 @@ public function testAlwaysDisabledIfParentDisabled($parentDisabled, $disabled, $ $this->assertSame($result, $child->isDisabled()); } - public function getDisabledStates() + public static function getDisabledStates() { return [ // parent, button, result diff --git a/src/Symfony/Component/Form/Tests/Util/ServerParamsTest.php b/src/Symfony/Component/Form/Tests/Util/ServerParamsTest.php index 56994760884d4..ebe680e71083b 100644 --- a/src/Symfony/Component/Form/Tests/Util/ServerParamsTest.php +++ b/src/Symfony/Component/Form/Tests/Util/ServerParamsTest.php @@ -48,7 +48,7 @@ public function testGetPostMaxSize($size, $bytes) $this->assertEquals($bytes, $serverParams->getPostMaxSize()); } - public function getGetPostMaxSizeTestData() + public static function getGetPostMaxSizeTestData() { return [ ['2k', 2048], 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/EventSourceHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php index b738c15a18399..72eb74fb9f289 100644 --- a/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php @@ -152,7 +152,7 @@ public function testContentType($contentType, $expected) } } - public function contentTypeProvider() + public static function contentTypeProvider() { return [ ['text/event-stream', true], 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 5a5a42ef036ba..baa97dd360236 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', '.']; @@ -60,7 +60,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'], @@ -148,7 +148,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/']; @@ -175,7 +175,7 @@ public function testRemoveDotSegments($expected, $url) $this->assertSame($expected, self::removeDotSegments($url)); } - public function provideRemoveDotSegments() + public static function provideRemoveDotSegments() { yield ['', '']; yield ['', '.']; @@ -224,7 +224,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==']; @@ -241,7 +241,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 e06575cfc763f..8c697b4ee22c2 100644 --- a/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php @@ -42,7 +42,7 @@ public function testMocking($factory, array $expectedResponses) $this->assertSame(2, $client->getRequestsCount()); } - public function mockingProvider(): iterable + public static function mockingProvider(): iterable { yield 'callable' => [ static function (string $method, string $url, array $options = []) { @@ -112,7 +112,7 @@ public function testValidResponseFactory($responseFactory) $this->addToAssertionCount(1); } - public function validResponseFactoryProvider() + public static function validResponseFactoryProvider() { return [ [static function (): MockResponse { return new MockResponse(); }], @@ -138,7 +138,7 @@ public function testTransportExceptionThrowsIfPerformedMoreRequestsThanConfigure $client->request('POST', '/foo'); } - public function transportExceptionProvider(): iterable + public static function transportExceptionProvider(): iterable { yield 'array of callable' => [ [ @@ -179,7 +179,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/NoPrivateNetworkHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/NoPrivateNetworkHttpClientTest.php index aabfe38c01692..8c51e9eaa891c 100755 --- a/src/Symfony/Component/HttpClient/Tests/NoPrivateNetworkHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/NoPrivateNetworkHttpClientTest.php @@ -22,7 +22,7 @@ class NoPrivateNetworkHttpClientTest extends TestCase { - public function getExcludeData(): array + public static function getExcludeData(): array { return [ // private diff --git a/src/Symfony/Component/HttpClient/Tests/Response/MockResponseTest.php b/src/Symfony/Component/HttpClient/Tests/Response/MockResponseTest.php index d6839fbcfeb86..6b172b1589ac1 100644 --- a/src/Symfony/Component/HttpClient/Tests/Response/MockResponseTest.php +++ b/src/Symfony/Component/HttpClient/Tests/Response/MockResponseTest.php @@ -74,7 +74,7 @@ public function testUrlHttpMethodMockResponse() $this->assertSame($url, $responseMock->getRequestUrl()); } - public function toArrayErrors() + public static function toArrayErrors() { yield [ 'content' => '', diff --git a/src/Symfony/Component/HttpClient/Tests/Retry/GenericRetryStrategyTest.php b/src/Symfony/Component/HttpClient/Tests/Retry/GenericRetryStrategyTest.php index 98b6578f0b62f..79fc37588bd0f 100644 --- a/src/Symfony/Component/HttpClient/Tests/Retry/GenericRetryStrategyTest.php +++ b/src/Symfony/Component/HttpClient/Tests/Retry/GenericRetryStrategyTest.php @@ -41,14 +41,14 @@ public function testShouldNotRetry(string $method, int $code, ?TransportExceptio self::assertFalse($strategy->shouldRetry($this->getContext(0, $method, 'http://example.com/', $code), null, $exception)); } - public function provideRetryable(): iterable + public static function provideRetryable(): iterable { yield ['GET', 200, new TransportException()]; yield ['GET', 500, null]; yield ['POST', 429, null]; } - public function provideNotRetryable(): iterable + public static function provideNotRetryable(): iterable { yield ['POST', 200, null]; yield ['POST', 200, new TransportException()]; @@ -65,7 +65,7 @@ public function testGetDelay(int $delay, int $multiplier, int $maxDelay, int $pr self::assertSame($expectedDelay, $strategy->getDelay($this->getContext($previousRetries, 'GET', 'http://example.com/', 200), null, null)); } - public function provideDelay(): iterable + public static function provideDelay(): iterable { // delay, multiplier, maxDelay, retries, expectedDelay yield [1000, 1, 5000, 0, 1000]; diff --git a/src/Symfony/Component/HttpClient/Tests/ScopingHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/ScopingHttpClientTest.php index 078475bf1010c..3e02111c32131 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/BinaryFileResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php index 65d6fe0854ab0..222b5f2987294 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php @@ -165,7 +165,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'], @@ -219,7 +219,7 @@ public function testFullFileRequests($requestRange) $this->assertEquals(200, $response->getStatusCode()); } - public function provideFullFileRanges() + public static function provideFullFileRanges() { return [ ['bytes=0-'], @@ -285,7 +285,7 @@ public function testInvalidRequests($requestRange) $this->assertEquals('bytes */35', $response->headers->get('Content-Range')); } - public function provideInvalidRanges() + public static function provideInvalidRanges() { return [ ['bytes=-40'], @@ -311,7 +311,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'], @@ -378,7 +378,7 @@ public function testAcceptRangeNotOverriden() $this->assertEquals('foo', $response->headers->get('Accept-Ranges')); } - public function getSampleXAccelMappings() + public static function getSampleXAccelMappings() { return [ ['/var/www/var/www/files/foo.txt', '/var/www/=/files/', '/files/var/www/files/foo.txt'], diff --git a/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php b/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php index cd65e0eaacc9d..ec5a4e28f406a 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php @@ -24,7 +24,7 @@ */ class CookieTest extends TestCase { - public function namesWithSpecialCharacters() + public static function namesWithSpecialCharacters() { return [ [',MyName'], 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/FileTest.php b/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php index 868c53af96845..fc806e95147c4 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php @@ -93,7 +93,7 @@ public function testGetContent() $this->assertStringEqualsFile(__FILE__, $file->getContent()); } - public function getFilenameFixtures() + public static function getFilenameFixtures() { return [ ['original.gif', 'original.gif'], diff --git a/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php b/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php index 9a48a424a986c..8c7fe45b56cd1 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php @@ -156,7 +156,7 @@ public function testMoveLocalFileIsNotAllowed() $file->move(__DIR__.'/Fixtures/directory'); } - public function failedUploadedFile() + public static function failedUploadedFile() { foreach ([\UPLOAD_ERR_INI_SIZE, \UPLOAD_ERR_FORM_SIZE, \UPLOAD_ERR_PARTIAL, \UPLOAD_ERR_NO_FILE, \UPLOAD_ERR_CANT_WRITE, \UPLOAD_ERR_NO_TMP_DIR, \UPLOAD_ERR_EXTENSION, -1] as $error) { yield [new UploadedFile( @@ -298,7 +298,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 2b585a95d488d..73d3f150c7a8e 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'], @@ -152,7 +152,7 @@ public function testParseQuery(string $query, string $expected = null) $this->assertSame($expected ?? $query, http_build_query(HeaderUtils::parseQuery($query), '', '&')); } - public function provideParseQuery() + public static function provideParseQuery() { return [ ['a=b&c=d'], diff --git a/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php b/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php index 33d67303a831d..085790cf606a8 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php @@ -27,7 +27,7 @@ public function testIpv4($matches, $remoteAddr, $cidr) $this->assertSame($matches, IpUtils::checkIp($remoteAddr, $cidr)); } - public function getIpv4Data() + public static function getIpv4Data() { return [ [true, '192.168.1.1', '192.168.1.1'], @@ -58,7 +58,7 @@ public function testIpv6($matches, $remoteAddr, $cidr) $this->assertSame($matches, IpUtils::checkIp($remoteAddr, $cidr)); } - public function getIpv6Data() + public static function getIpv6Data() { return [ [true, '2a01:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'], @@ -130,7 +130,7 @@ public function testInvalidIpAddressesDoNotMatch($requestIp, $proxyIp) $this->assertFalse(IpUtils::checkIp4($requestIp, $proxyIp)); } - public function invalidIpAddressData() + public static function invalidIpAddressData() { return [ 'invalid proxy wildcard' => ['192.168.20.13', '*'], @@ -147,7 +147,7 @@ public function testAnonymize($ip, $expected) $this->assertSame($expected, IpUtils::anonymize($ip)); } - public function anonymizedIpData() + public static function anonymizedIpData() { return [ ['192.168.1.1', '192.168.1.0'], @@ -173,7 +173,7 @@ public function testIp4SubnetMaskZero($matches, $remoteAddr, $cidr) $this->assertSame($matches, IpUtils::checkIp4($remoteAddr, $cidr)); } - public function getIp4SubnetMaskZeroData() + public static function getIp4SubnetMaskZeroData() { return [ [true, '1.2.3.4', '0.0.0.0/0'], diff --git a/src/Symfony/Component/HttpFoundation/Tests/RateLimiter/AbstractRequestRateLimiterTest.php b/src/Symfony/Component/HttpFoundation/Tests/RateLimiter/AbstractRequestRateLimiterTest.php index 4790eae183802..4e102777a45c6 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RateLimiter/AbstractRequestRateLimiterTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RateLimiter/AbstractRequestRateLimiterTest.php @@ -33,7 +33,7 @@ public function testConsume(array $rateLimits, ?RateLimit $expected) $this->assertSame($expected, $rateLimiter->consume(new Request())); } - public function provideRateLimits() + public static function provideRateLimits() { $now = new \DateTimeImmutable(); diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php index 18e269693e1a2..c0e640421e407 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php @@ -32,7 +32,7 @@ public function testMethod($requestMethod, $matcherMethod, $isMatch) $this->assertSame($isMatch, $matcher->matches($request)); } - public function getMethodData() + public static function getMethodData() { return [ ['get', 'get', true], @@ -93,7 +93,7 @@ public function testPort() $this->assertTrue($matcher->matches($request)); } - public function getHostData() + public static function getHostData() { return [ ['.*\.example\.com', true], diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index bf311044fa2d9..e5360807ba54d 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -309,7 +309,7 @@ public function testGetRequestUri($serverRequestUri, $expected, $message) $this->assertSame($expected, $request->server->get('REQUEST_URI'), 'Normalize the request URI.'); } - public function getRequestUriData() + public static function getRequestUriData() { $message = 'Do not modify the path.'; yield ['/foo', '/foo', $message]; @@ -490,7 +490,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']], @@ -735,7 +735,7 @@ public function testGetRelativeUriForPath($expected, $pathinfo, $path) $this->assertEquals($expected, Request::create($pathinfo)->getRelativeUriForPath($path)); } - public function getRelativeUriForPathData() + public static function getRelativeUriForPathData() { return [ ['me.png', '/foo', '/me.png'], @@ -798,7 +798,7 @@ public function testGetQueryString($query, $expectedQuery, $msg) $this->assertSame($expectedQuery, $request->getQueryString(), $msg); } - public function getQueryStringNormalizationData() + public static function getQueryStringNormalizationData() { return [ ['foo', 'foo=', 'works with valueless parameters'], @@ -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 [ @@ -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'], @@ -1734,7 +1734,7 @@ public function testGetBaseUrl($uri, $server, $expectedBaseUrl, $expectedPathInf $this->assertSame($expectedPathInfo, $request->getPathInfo(), 'pathInfo'); } - public function getBaseUrlData() + public static function getBaseUrlData() { return [ [ @@ -1863,7 +1863,7 @@ public function testUrlencodedStringPrefix($string, $prefix, $expect) $this->assertSame($expect, $me->invoke($request, $string, $prefix)); } - public function urlencodedStringPrefixData() + public static function urlencodedStringPrefixData() { return [ ['foo', 'foo', 'foo'], @@ -2039,7 +2039,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 [ [ @@ -2162,7 +2162,7 @@ public function testHostValidity($host, $isValid, $expectedHost = null, $expecte } } - public function getHostValidities() + public static function getHostValidities() { return [ ['.a', false], @@ -2175,7 +2175,7 @@ public function getHostValidities() ]; } - public function getLongHostNames() + public static function getLongHostNames() { return [ ['a'.str_repeat('.a', 40000)], @@ -2193,7 +2193,7 @@ public function testMethodIdempotent($method, $idempotent) $this->assertEquals($idempotent, $request->isMethodIdempotent()); } - public function methodIdempotentProvider() + public static function methodIdempotentProvider() { return [ ['HEAD', true], @@ -2219,7 +2219,7 @@ public function testMethodSafe($method, $safe) $this->assertEquals($safe, $request->isMethodSafe()); } - public function methodSafeProvider() + public static function methodSafeProvider() { return [ ['HEAD', true], @@ -2245,7 +2245,7 @@ public function testMethodCacheable($method, $cacheable) $this->assertEquals($cacheable, $request->isMethodCacheable()); } - public function methodCacheableProvider() + public static function methodCacheableProvider() { return [ ['HEAD', true], @@ -2281,7 +2281,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'], @@ -2296,7 +2296,7 @@ public function protocolVersionProvider() ]; } - public function nonstandardRequestsData() + public static function nonstandardRequestsData() { return [ ['', '', '/', 'http://host:8080/', ''], @@ -2467,7 +2467,7 @@ public function testTrustedProxiesRemoteAddr($serverRemoteAddr, $trustedProxies, $this->assertSame($result, Request::getTrustedProxies()); } - public function trustedProxiesRemoteAddr() + public static function trustedProxiesRemoteAddr() { return [ ['1.1.1.1', ['REMOTE_ADDR'], ['1.1.1.1']], @@ -2487,7 +2487,7 @@ public function testPreferSafeContent($server, bool $safePreferenceExpected) $this->assertEquals($safePreferenceExpected, $request->preferSafeContent()); } - public function preferSafeContentData() + public static function preferSafeContentData() { return [ [[], false], 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 48713e364c208..50198c2d7612b 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php @@ -847,7 +847,7 @@ public function testSetStatusCode($code, $text, $expectedText) $this->assertEquals($expectedText, $statusText->getValue($response)); } - public function getStatusCodeFixtures() + public static function getStatusCodeFixtures() { return [ ['200', null, 'OK'], @@ -1001,7 +1001,7 @@ public function testNoDeprecationsAreTriggered() $this->addToAssertionCount(1); } - public function validContentProvider() + public static function validContentProvider() { return [ 'obj' => [new StringableObject()], @@ -1046,7 +1046,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 fe7838408d941..4df76926b1039 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php @@ -182,7 +182,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 8efb535490b0d..56011ddb558fb 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/AbstractRedisSessionHandlerTestCase.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php index 2ac7a99eacd95..d961ed3bff02e 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php @@ -140,7 +140,7 @@ public function testSupportedParam(array $options, bool $supported) } } - public function getOptionFixtures(): array + public static function getOptionFixtures(): array { return [ [['prefix' => 'session'], true], @@ -169,7 +169,7 @@ public function testUseTtlOption(int $ttl) $this->assertGreaterThan($redisTtl, $ttl + 5); } - public function getTtlFixtures(): array + public static function getTtlFixtures(): array { return [ ['ttl' => 5000], 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/IdentityMarshallerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/IdentityMarshallerTest.php index b26bc7e60a6bb..8019bd2e989c4 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/IdentityMarshallerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/IdentityMarshallerTest.php @@ -49,7 +49,7 @@ public function testUnmarshall() $this->assertEquals('data', $marshaller->unmarshall('data')); } - public function invalidMarshallDataProvider(): iterable + public static function invalidMarshallDataProvider(): iterable { return [ [['object' => new \stdClass()]], diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php index 6abdf4eb05f5c..2e2ec3647656a 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php @@ -147,7 +147,7 @@ public function testSupportedOptions($options, $supported) } } - public function getOptionFixtures() + public static function getOptionFixtures() { return [ [['prefix' => 'session'], true], 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 867a6692eda84..5b663336fd6cb 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/test?charset=utf8mb4', 'mysql:charset=utf8mb4;host=localhost;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 4d2a7dd0c4b84..c0077871e26c6 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/SessionHandlerFactoryTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/SessionHandlerFactoryTest.php @@ -37,7 +37,7 @@ public function testCreateFileHandler(string $connectionDSN, string $expectedPat $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/HttpFoundation/Tests/UrlHelperTest.php b/src/Symfony/Component/HttpFoundation/Tests/UrlHelperTest.php index 7d96f730d7eae..2057dd7097cc8 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/UrlHelperTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/UrlHelperTest.php @@ -31,7 +31,7 @@ public function testGenerateAbsoluteUrl($expected, $path, $pathinfo) $this->assertEquals($expected, $helper->getAbsoluteUrl($path)); } - public function getGenerateAbsoluteUrlData() + public static function getGenerateAbsoluteUrlData() { return [ ['http://localhost/foo.png', '/foo.png', '/foo/bar.html'], @@ -83,7 +83,7 @@ public function testGenerateAbsoluteUrlWithoutRequestAndRequestContext($path) $this->assertEquals($path, $helper->getAbsoluteUrl($path)); } - public function getGenerateAbsoluteUrlRequestContextData() + public static function getGenerateAbsoluteUrlRequestContextData() { return [ ['/foo.png', '/foo', 'localhost', 'http', 80, 443, 'http://localhost/foo.png'], @@ -128,7 +128,7 @@ public function testGenerateRelativePath($expected, $path, $pathinfo) $this->assertEquals($expected, $urlHelper->getRelativePath($path)); } - public function getGenerateRelativePathData() + public static function getGenerateRelativePathData() { return [ ['../foo.png', '/foo.png', '/foo/bar.html'], diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php index 5f3b3a941a17a..9d127436cfe02 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php @@ -149,7 +149,7 @@ public function testInstantiateControllerWhenControllerStartsWithABackslash($con $this->assertSame('action', $controller[1]); } - public function getControllers() + public static function getControllers() { return [ ['\\'.ControllerTestService::class.'::action'], diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php index f78599b82e0c6..621d948197cb4 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php @@ -141,7 +141,7 @@ public function testGetControllerWithStaticController($staticController, $return $this->assertSame($returnValue, $controller()); } - public function getStaticControllers() + public static function getStaticControllers() { return [ [TestAbstractController::class.'::staticAction', 'foo'], 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/LoggerDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php index bf3fb6552299d..44b740c98b167 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php @@ -179,7 +179,7 @@ public function testReset() $c->reset(); } - public function getCollectTestData() + public static function getCollectTestData() { yield 'simple log' => [ 1, diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php index 63dd62ce70392..240f29a88f4f8 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php @@ -37,7 +37,7 @@ public function testBytesConversion($limit, $bytes) $this->assertEquals($bytes, $method->invoke($collector, $limit)); } - public function getBytesConversionTestData() + public static function getBytesConversionTestData() { return [ ['2k', 2048], diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php index a8fdd7975beba..69e1cc8cd6ce2 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php @@ -308,7 +308,7 @@ public function testBindings($bindingName) $this->assertEquals($expected, $locator->getArgument(0)); } - public function provideBindings() + public static function provideBindings() { return [ [ControllerDummy::class.'$bar'], @@ -343,7 +343,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/DebugHandlersListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php index c8581927a86a5..81a84e92f17ee 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php @@ -157,7 +157,7 @@ public function testReplaceExistingExceptionHandler() $this->assertSame($userHandler, $eHandler->setExceptionHandler('var_dump')); } - public function provideLevelsAssignedToLoggers(): array + public static function provideLevelsAssignedToLoggers(): array { return [ [false, false, '0', null, null], diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/DisallowRobotsIndexingListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/DisallowRobotsIndexingListenerTest.php index 8ceb910b5b372..b0263f8f29a0b 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 73cc19afc8c6b..b97737218c1b2 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php @@ -119,7 +119,7 @@ public function testHandleWithLoggerAndCustomConfiguration() $this->assertCount(1, $logger->getLogs('warning')); } - public function provider() + public static function provider() { if (!class_exists(Request::class)) { return [[null, null]]; @@ -202,7 +202,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/ProfilerListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php index 45272ceb026cd..57f8f53b1e9f7 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php @@ -87,7 +87,7 @@ public function testCollectParameter(Request $request, ?bool $enable) $listener->onKernelResponse(new ResponseEvent($kernel, $request, Kernel::MAIN_REQUEST, $response)); } - public function collectRequestProvider(): iterable + public static function collectRequestProvider(): iterable { yield [Request::create('/'), null]; yield [Request::create('/', 'GET', ['profile' => '1']), true]; diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php index e61414bd041f6..886fe497f3b63 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php @@ -67,7 +67,7 @@ public function testPort($defaultHttpPort, $defaultHttpsPort, $uri, $expectedHtt $this->assertEquals(str_starts_with($uri, 'https') ? 'https' : 'http', $context->getScheme()); } - public function getPortData() + public static function getPortData() { return [ [80, 443, 'http://localhost/', 80, 443], @@ -157,7 +157,7 @@ public function testLoggingParameter($parameter, $log, $parameters) $listener->onKernelRequest(new RequestEvent($kernel, $request, HttpKernelInterface::MAIN_REQUEST)); } - public function getLoggingParameterData() + public static function getLoggingParameterData() { return [ [['_route' => 'foo'], 'Matched route "{route}".', ['route' => 'foo', 'route_parameters' => ['_route' => 'foo'], 'request_uri' => 'http://localhost/', 'method' => 'GET']], diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php index 7503eabb28749..f3265823a5765 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php @@ -82,7 +82,7 @@ public function testSessionCookieOptions(array $phpSessionOptions, array $sessio } } - public function provideSessionOptions(): \Generator + public static function provideSessionOptions(): \Generator { if (\PHP_VERSION_ID > 70300) { yield 'set_samesite_by_php' => [ diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php index 3bb76970621c3..9bce97b854fe1 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php @@ -130,7 +130,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/Fragment/RoutableFragmentRendererTest.php b/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php index d17643c18675d..937c23d869d8c 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php @@ -34,7 +34,7 @@ public function testGenerateAbsoluteFragmentUri($uri, $controller) $this->assertEquals('http://localhost'.$uri, $this->callGenerateFragmentUriMethod($controller, Request::create('/'), true)); } - public function getGenerateFragmentUriData() + public static function getGenerateFragmentUriData() { return [ ['/_fragment?_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dcontroller', new ControllerReference('controller', [], [])], @@ -65,7 +65,7 @@ public function testGenerateFragmentUriWithNonScalar($controller) $this->callGenerateFragmentUriMethod($controller, Request::create('/')); } - public function getGenerateFragmentUriDataWithNonScalar() + public static function getGenerateFragmentUriDataWithNonScalar() { return [ [new ControllerReference('controller', ['foo' => new Foo(), 'bar' => 'bar'], [])], diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php index 7d8ef79187412..22cf88daa2b51 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php @@ -1378,7 +1378,7 @@ public function testHttpCacheIsSetAsATrustedProxy(array $existing) Request::setTrustedProxies([], -1); } - public function getTrustedProxyData() + public static function getTrustedProxyData() { return [ [[]], @@ -1407,7 +1407,7 @@ public function testForwarderHeaderForForwardedRequests($forwarded, $expected) Request::setTrustedProxies([], -1); } - public function getForwardedData() + public static function getForwardedData() { return [ [null, 'for="10.0.0.1";host="localhost";proto=http'], @@ -1599,7 +1599,7 @@ public function testResponsesThatMayBeUsedStaleIfError($responseHeaders, $sleepB $this->assertTraceContains('stale-if-error'); } - public function getResponseDataThatMayBeServedStaleIfError() + public static function getResponseDataThatMayBeServedStaleIfError() { // All data sets assume that a 10s stale-if-error grace period has been configured yield 'public, max-age expired' => [['Cache-Control' => 'public, max-age=60'], 65]; @@ -1641,7 +1641,7 @@ public function testResponsesThatMustNotBeUsedStaleIfError($responseHeaders, $sl $this->assertEquals(500, $this->response->getStatusCode()); } - public function getResponseDataThatMustNotBeServedStaleIfError() + public static function getResponseDataThatMustNotBeServedStaleIfError() { // All data sets assume that a 10s stale-if-error grace period has been configured yield 'public, no TTL but beyond grace period' => [['Cache-Control' => 'public'], 15]; diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php index fa0ad5d311ed5..4e6fe680b98c6 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/HttpKernelTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php index 38a09ef2d2f8b..0a1dc60e4a39d 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php @@ -175,7 +175,7 @@ public function testHandleWhenAnExceptionIsHandledWithASpecificStatusCode($expec $this->assertEquals($expectedStatusCode, $response->getStatusCode()); } - public function getSpecificStatusCodes() + public static function getSpecificStatusCodes() { return [ [200], diff --git a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php index 2dab2ec01d9f1..fa2074694ee99 100644 --- a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php @@ -256,7 +256,7 @@ public function testStripComments(string $source, string $expected) $this->assertEquals($expected, $output); } - public function getStripCommentsCodes(): array + public static function getStripCommentsCodes(): array { return [ ['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 1f8cf4467455c..0702c717e3495 100644 --- a/src/Symfony/Component/Inflector/Tests/InflectorTest.php +++ b/src/Symfony/Component/Inflector/Tests/InflectorTest.php @@ -19,7 +19,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 @@ -169,7 +169,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 94453f3278731..5cbf0aeb87c65 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/Globals/AbstractIntlGlobalsTest.php b/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php index 5c4731babd8d2..4455092aad3f4 100644 --- a/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php +++ b/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php @@ -22,7 +22,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 bc0641e40c97f..1bf86f86b6012 100644 --- a/src/Symfony/Component/Intl/Tests/LanguagesTest.php +++ b/src/Symfony/Component/Intl/Tests/LanguagesTest.php @@ -1742,7 +1742,7 @@ public function testGetNameDefaultLocale() } } - public function provideLanguagesWithAlpha3Equivalent() + public static function provideLanguagesWithAlpha3Equivalent() { return array_map( function ($value) { return [$value]; }, @@ -1758,7 +1758,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]; }, @@ -1792,7 +1792,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]; }, @@ -1808,7 +1808,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/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/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php b/src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php index 7de5e394c2660..b9a63138250a2 100644 --- a/src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php +++ b/src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php @@ -59,10 +59,10 @@ public function testShouldNotCheckPassport($authenticator, $passport) $listener->onCheckPassport(new CheckPassportEvent($authenticator, $passport)); } - public function provideShouldNotCheckPassport() + public static function provideShouldNotCheckPassport() { if (!interface_exists(AuthenticatorInterface::class)) { - $this->markTestSkipped('This test requires symfony/security-http:^5.1'); + self::markTestSkipped('This test requires symfony/security-http:^5.1'); } // no LdapBadge @@ -108,10 +108,10 @@ public function testWrongPassport($passport) $listener->onCheckPassport(new CheckPassportEvent(new TestAuthenticator(), $passport)); } - public function provideWrongPassportData() + public static function provideWrongPassportData() { if (!interface_exists(AuthenticatorInterface::class)) { - $this->markTestSkipped('This test requires symfony/security-http:^5.1'); + self::markTestSkipped('This test requires symfony/security-http:^5.1'); } // no password credentials diff --git a/src/Symfony/Component/Lock/Tests/LockTest.php b/src/Symfony/Component/Lock/Tests/LockTest.php index 565ef529a46ed..ee019a1d8db51 100644 --- a/src/Symfony/Component/Lock/Tests/LockTest.php +++ b/src/Symfony/Component/Lock/Tests/LockTest.php @@ -404,7 +404,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/DoctrineDbalPostgreSqlStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php index 6e9ed6c38669e..47444c850d188 100644 --- a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php @@ -63,7 +63,7 @@ public function testInvalidDriver($connOrDsn) $store->exists(new Key('foo')); } - public function getInvalidDrivers() + public static function getInvalidDrivers() { yield ['sqlite:///tmp/foo.db']; yield [DriverManager::getConnection(['url' => 'sqlite:///tmp/foo.db'])]; diff --git a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php index 0ac59edba1cf2..1bd70d5aa8d4d 100644 --- a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php @@ -85,7 +85,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']; @@ -133,7 +133,7 @@ public function testCreatesTableInTransaction(string $platform) $store->save($key); } - public function providePlatforms() + public static function providePlatforms() { yield [\Doctrine\DBAL\Platforms\PostgreSQLPlatform::class]; yield [\Doctrine\DBAL\Platforms\PostgreSQL94Platform::class]; diff --git a/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php index c3db8b1401040..e4000272a1389 100644 --- a/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php @@ -97,7 +97,7 @@ public function testConstructionMethods($mongo, array $options) $this->assertFalse($store->exists($key)); } - public function provideConstructorArgs() + public static function provideConstructorArgs() { $client = self::getMongoClient(); yield [$client, ['database' => 'test', 'collection' => 'lock']]; @@ -138,7 +138,7 @@ public function testInvalidConstructionMethods($mongo, array $options) new MongoDbStore($mongo, $options); } - public function provideInvalidConstructorArgs() + public static function provideInvalidConstructorArgs() { $client = self::getMongoClient(); yield [$client, ['collection' => 'lock']]; @@ -165,7 +165,7 @@ public function testUriCollectionStrip(string $uri, array $options, string $driv $this->assertSame($driverUri, $uri); } - public function provideUriCollectionStripArgs() + public static function provideUriCollectionStripArgs() { yield ['mongodb://localhost/?collection=lock', ['database' => 'test'], 'mongodb://localhost/']; yield ['mongodb://localhost/', ['database' => 'test', 'collection' => 'lock'], 'mongodb://localhost/']; diff --git a/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php index 733981669bff4..b988671438a62 100644 --- a/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php @@ -99,7 +99,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/PdoStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php index bd167c19773a3..de5fa9b0d822e 100644 --- a/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php @@ -95,7 +95,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:'.$dbFile.'2', $dbFile.'2']; diff --git a/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php index cf4c26844a6cd..48a48286ce239 100644 --- a/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php @@ -46,7 +46,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/SesApiAsyncAwsTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php index 517c112fa6193..3ad8603790236 100644 --- a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php @@ -33,7 +33,7 @@ public function testToString(SesApiAsyncAwsTransport $transport, string $expecte $this->assertSame($expected, (string) $transport); } - public function getTransportData() + public static function getTransportData() { return [ [ diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiTransportTest.php index 2df22ed67c644..f266a917629b9 100644 --- a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiTransportTest.php @@ -33,7 +33,7 @@ public function testToString(SesApiTransport $transport, string $expected) $this->assertSame($expected, (string) $transport); } - public function getTransportData() + public static function getTransportData() { return [ [ diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php index c64a5218eb673..b08e5daccdb2e 100644 --- a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php @@ -33,7 +33,7 @@ public function testToString(SesHttpAsyncAwsTransport $transport, string $expect $this->assertSame($expected, (string) $transport); } - public function getTransportData() + public static function getTransportData() { return [ [ diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpTransportTest.php index bd5babdadd0e3..7431ee3263b4c 100644 --- a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpTransportTest.php @@ -33,7 +33,7 @@ public function testToString(SesHttpTransport $transport, string $expected) $this->assertSame($expected, (string) $transport); } - public function getTransportData() + public static function getTransportData() { return [ [ diff --git a/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillApiTransportTest.php index 152e198309dc3..3747bd58acad4 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillApiTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillApiTransportTest.php @@ -33,7 +33,7 @@ public function testToString(MandrillApiTransport $transport, string $expected) $this->assertSame($expected, (string) $transport); } - public function getTransportData() + public static function getTransportData() { return [ [ diff --git a/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillHttpTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillHttpTransportTest.php index 8f5eeb1f02012..1436fcbcad3a5 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillHttpTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillHttpTransportTest.php @@ -32,7 +32,7 @@ public function testToString(MandrillHttpTransport $transport, string $expected) $this->assertSame($expected, (string) $transport); } - public function getTransportData() + public static function getTransportData() { return [ [ diff --git a/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunApiTransportTest.php index 5e15332f60779..42d16171102a1 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunApiTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunApiTransportTest.php @@ -33,7 +33,7 @@ public function testToString(MailgunApiTransport $transport, string $expected) $this->assertSame($expected, (string) $transport); } - public function getTransportData() + public static function getTransportData() { return [ [ diff --git a/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunHttpTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunHttpTransportTest.php index c5ec436315c65..0b0c11612425a 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunHttpTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunHttpTransportTest.php @@ -32,7 +32,7 @@ public function testToString(MailgunHttpTransport $transport, string $expected) $this->assertSame($expected, (string) $transport); } - public function getTransportData() + public static function getTransportData() { return [ [ diff --git a/src/Symfony/Component/Mailer/Bridge/Mailjet/Tests/Transport/MailjetApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Mailjet/Tests/Transport/MailjetApiTransportTest.php index e2fdaed75e38c..703b01dc34e31 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailjet/Tests/Transport/MailjetApiTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Mailjet/Tests/Transport/MailjetApiTransportTest.php @@ -34,7 +34,7 @@ public function testToString(MailjetApiTransport $transport, string $expected) $this->assertSame($expected, (string) $transport); } - public function getTransportData() + public static function getTransportData() { return [ [ @@ -254,7 +254,7 @@ public function testSendWithMalformedResponse(array $body) $transport->send($email); } - public function getMalformedResponse(): \Generator + public static function getMalformedResponse(): \Generator { yield 'Missing Messages key' => [ [ diff --git a/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpApiTransportTest.php index 941f288e6fd4e..20caf7491915c 100644 --- a/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpApiTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpApiTransportTest.php @@ -32,7 +32,7 @@ public function testToString(OhMySmtpApiTransport $transport, string $expected) $this->assertSame($expected, (string) $transport); } - public function getTransportData(): array + public static function getTransportData(): array { return [ [ diff --git a/src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkApiTransportTest.php index 4f89cc2fe94e8..7ffe6920099df 100644 --- a/src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkApiTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkApiTransportTest.php @@ -35,7 +35,7 @@ public function testToString(PostmarkApiTransport $transport, string $expected) $this->assertSame($expected, (string) $transport); } - public function getTransportData() + public static function getTransportData() { return [ [ diff --git a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridApiTransportTest.php index 6c4a48be3574d..99b0799ea5215 100644 --- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridApiTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridApiTransportTest.php @@ -31,7 +31,7 @@ public function testToString(SendgridApiTransport $transport, string $expected) $this->assertSame($expected, (string) $transport); } - public function getTransportData() + public static function getTransportData() { return [ [ diff --git a/src/Symfony/Component/Mailer/Bridge/Sendinblue/Tests/Transport/SendinblueApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Sendinblue/Tests/Transport/SendinblueApiTransportTest.php index 94228dbca47d2..18953db88c604 100644 --- a/src/Symfony/Component/Mailer/Bridge/Sendinblue/Tests/Transport/SendinblueApiTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Sendinblue/Tests/Transport/SendinblueApiTransportTest.php @@ -34,7 +34,7 @@ public function testToString(SendinblueApiTransport $transport, string $expected $this->assertSame($expected, (string) $transport); } - public function getTransportData() + public static function getTransportData() { yield [ new SendinblueApiTransport('ACCESS_KEY'), diff --git a/src/Symfony/Component/Mailer/Tests/EventListener/MessageListenerTest.php b/src/Symfony/Component/Mailer/Tests/EventListener/MessageListenerTest.php index 2b2e5dfe8e561..5f5def704bf33 100644 --- a/src/Symfony/Component/Mailer/Tests/EventListener/MessageListenerTest.php +++ b/src/Symfony/Component/Mailer/Tests/EventListener/MessageListenerTest.php @@ -36,7 +36,7 @@ public function testHeaders(Headers $initialHeaders, Headers $defaultHeaders, He $this->assertEquals($expectedHeaders, $event->getMessage()->getHeaders()); } - public function provideHeaders(): iterable + public static function provideHeaders(): iterable { $initialHeaders = new Headers(); $defaultHeaders = (new Headers()) diff --git a/src/Symfony/Component/Mailer/Tests/Exception/UnsupportedSchemeExceptionTest.php b/src/Symfony/Component/Mailer/Tests/Exception/UnsupportedSchemeExceptionTest.php index 54ce6dbe5a38c..9a7abadd00070 100644 --- a/src/Symfony/Component/Mailer/Tests/Exception/UnsupportedSchemeExceptionTest.php +++ b/src/Symfony/Component/Mailer/Tests/Exception/UnsupportedSchemeExceptionTest.php @@ -59,7 +59,7 @@ public function testMessageWhereSchemeIsPartOfSchemeToPackageMap(string $scheme, ); } - public function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \Generator + public static function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \Generator { yield ['gmail', 'symfony/google-mailer']; yield ['mailgun', 'symfony/mailgun-mailer']; @@ -83,7 +83,7 @@ public function testMessageWhereSchemeIsNotPartOfSchemeToPackageMap(string $expe ); } - public function messageWhereSchemeIsNotPartOfSchemeToPackageMapProvider(): \Generator + public static function messageWhereSchemeIsNotPartOfSchemeToPackageMapProvider(): \Generator { yield [ 'The "somethingElse" scheme is not supported.', 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/NativeTransportFactoryTest.php b/src/Symfony/Component/Mailer/Tests/Transport/NativeTransportFactoryTest.php index 556a01acf2338..495fd8c384955 100644 --- a/src/Symfony/Component/Mailer/Tests/Transport/NativeTransportFactoryTest.php +++ b/src/Symfony/Component/Mailer/Tests/Transport/NativeTransportFactoryTest.php @@ -66,7 +66,7 @@ public function testCreateSendmailWithNoSendmailPath() $sut->create(Dsn::fromString('native://default')); } - public function provideCreateSendmailWithNoHostOrNoPort(): \Generator + public static function provideCreateSendmailWithNoHostOrNoPort(): \Generator { yield ['native://default', '', '', '']; yield ['native://default', '', 'localhost', '']; @@ -95,7 +95,7 @@ public function testCreateSendmailWithNoHostOrNoPort(string $dsn, string $sendma $sut->create(Dsn::fromString($dsn)); } - public function provideCreate(): \Generator + public static function provideCreate(): \Generator { yield ['native://default', '/usr/sbin/sendmail -t -i', '', '', new SendmailTransport('/usr/sbin/sendmail -t -i')]; 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/Bridge/AmazonSqs/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/ConnectionTest.php index 6f3b906a5a188..b36f02a8850d0 100644 --- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/ConnectionTest.php +++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/ConnectionTest.php @@ -277,7 +277,7 @@ public function testInjectQueueUrl(string $dsn, string $queueUrl) $this->assertSame($queueUrl, $queueProperty->getValue($connection)); } - public function provideQueueUrl() + public static function provideQueueUrl() { yield ['https://sqs.us-east-2.amazonaws.com/123456/queue', 'https://sqs.us-east-2.amazonaws.com/123456/queue']; yield ['https://KEY:SECRET@sqs.us-east-2.amazonaws.com/123456/queue', 'https://sqs.us-east-2.amazonaws.com/123456/queue']; @@ -298,7 +298,7 @@ public function testNotInjectQueueUrl(string $dsn) $this->assertNull($queueProperty->getValue($connection)); } - public function provideNotQueueUrl() + public static function provideNotQueueUrl() { yield ['https://sqs.us-east-2.amazonaws.com/queue']; yield ['https://us-east-2/123456/ab1-MyQueue-A2BCDEF3GHI4']; diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php index f2f2ac0c06843..1f98b4a725a3b 100644 --- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php @@ -209,7 +209,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/Bridge/Doctrine/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php index 7e576a5580dff..57690b8b1c56d 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php @@ -178,7 +178,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', @@ -387,7 +387,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/Bridge/Redis/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php index 54fa7bfe7a946..c27931227eb26 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php @@ -179,7 +179,7 @@ public function testAuth($expected, string $dsn) Connection::fromDsn($dsn, ['delete_after_ack' => true], $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/Messenger/Bridge/Redis/Tests/Transport/RedisReceiverTest.php b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisReceiverTest.php index c1f39ea31f557..903428ab3772c 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisReceiverTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisReceiverTest.php @@ -59,7 +59,7 @@ public function testItRejectTheMessageIfThereIsAMessageDecodingFailedException(a $receiver->get(); } - public function redisEnvelopeProvider(): \Generator + public static function redisEnvelopeProvider(): \Generator { yield [ [ @@ -96,7 +96,7 @@ public function redisEnvelopeProvider(): \Generator ]; } - public function rejectedRedisEnvelopeProvider(): \Generator + public static function rejectedRedisEnvelopeProvider(): \Generator { yield [ [ diff --git a/src/Symfony/Component/Messenger/Tests/Command/ConsumeMessagesCommandTest.php b/src/Symfony/Component/Messenger/Tests/Command/ConsumeMessagesCommandTest.php index 91a191de31498..0173052290047 100644 --- a/src/Symfony/Component/Messenger/Tests/Command/ConsumeMessagesCommandTest.php +++ b/src/Symfony/Component/Messenger/Tests/Command/ConsumeMessagesCommandTest.php @@ -105,7 +105,7 @@ public function testRunWithBusOption() $this->assertStringContainsString('[OK] Consuming messages from transport "dummy-receiver"', $tester->getDisplay()); } - public function provideRunWithResetServicesOption(): iterable + public static function provideRunWithResetServicesOption(): iterable { yield [true]; yield [false]; @@ -174,7 +174,7 @@ public function testRunWithInvalidOption(string $option, string $value, string $ ]); } - public function getInvalidOptions() + public static function getInvalidOptions() { yield 'Zero message limit' => ['--limit', '0', 'Option "limit" must be a positive integer, "0" passed.']; yield 'Non-numeric message limit' => ['--limit', 'whatever', 'Option "limit" must be a positive integer, "whatever" passed.']; @@ -227,7 +227,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'receiver' => [[''], ['async', 'async_high', 'failed']]; yield 'receiver (value)' => [['async'], ['async', 'async_high', 'failed']]; diff --git a/src/Symfony/Component/Messenger/Tests/Command/DebugCommandTest.php b/src/Symfony/Component/Messenger/Tests/Command/DebugCommandTest.php index af2d0e3e9fa78..1aad6fcf714de 100644 --- a/src/Symfony/Component/Messenger/Tests/Command/DebugCommandTest.php +++ b/src/Symfony/Component/Messenger/Tests/Command/DebugCommandTest.php @@ -185,7 +185,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $tester->complete($input)); } - public function provideCompletionSuggestions(): iterable + public static function provideCompletionSuggestions(): iterable { yield 'bus' => [ [''], diff --git a/src/Symfony/Component/Messenger/Tests/Command/SetupTransportsCommandTest.php b/src/Symfony/Component/Messenger/Tests/Command/SetupTransportsCommandTest.php index cfe9eca20b40d..e0a57563915a4 100644 --- a/src/Symfony/Component/Messenger/Tests/Command/SetupTransportsCommandTest.php +++ b/src/Symfony/Component/Messenger/Tests/Command/SetupTransportsCommandTest.php @@ -101,7 +101,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'transport' => [[''], ['amqp', 'other_transport']]; } diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/ResetServicesListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/ResetServicesListenerTest.php index 12f86ec6c83cb..0e1273d6bd88b 100644 --- a/src/Symfony/Component/Messenger/Tests/EventListener/ResetServicesListenerTest.php +++ b/src/Symfony/Component/Messenger/Tests/EventListener/ResetServicesListenerTest.php @@ -20,7 +20,7 @@ class ResetServicesListenerTest extends TestCase { - public function provideResetServices(): iterable + public static function provideResetServices(): iterable { yield [true]; yield [false]; diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnCustomStopExceptionListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnCustomStopExceptionListenerTest.php index 9450567bedb7f..c9e6c6d5db887 100644 --- a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnCustomStopExceptionListenerTest.php +++ b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnCustomStopExceptionListenerTest.php @@ -23,7 +23,7 @@ class StopWorkerOnCustomStopExceptionListenerTest extends TestCase { - public function provideTests(): \Generator + public static function provideTests(): \Generator { yield 'it should not stop (1)' => [new \Exception(), false]; yield 'it should not stop (2)' => [new HandlerFailedException(new Envelope(new \stdClass()), [new \Exception()]), false]; diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnFailureLimitListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnFailureLimitListenerTest.php index a713a2820acb6..b52a7d05fe978 100644 --- a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnFailureLimitListenerTest.php +++ b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnFailureLimitListenerTest.php @@ -45,7 +45,7 @@ public function testWorkerStopsWhenMaximumCountReached(int $max, bool $shouldSto $failureLimitListener->onWorkerRunning($runningEvent); } - public function countProvider(): iterable + public static function countProvider(): iterable { yield [1, true]; yield [2, true]; 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 fc0d638bb1ca3..b0eb3ec12afcf 100644 --- a/src/Symfony/Component/Messenger/Tests/MessageBusTest.php +++ b/src/Symfony/Component/Messenger/Tests/MessageBusTest.php @@ -141,7 +141,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 eb0beaa8a5848..015ba74406b7a 100644 --- a/src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php +++ b/src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php @@ -67,7 +67,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 = new class() extends HandleMessageMiddlewareTestCallable { public function __invoke() diff --git a/src/Symfony/Component/Messenger/Tests/Retry/MultiplierRetryStrategyTest.php b/src/Symfony/Component/Messenger/Tests/Retry/MultiplierRetryStrategyTest.php index e2fdb4b2a82f3..5c37aa6bf547c 100644 --- a/src/Symfony/Component/Messenger/Tests/Retry/MultiplierRetryStrategyTest.php +++ b/src/Symfony/Component/Messenger/Tests/Retry/MultiplierRetryStrategyTest.php @@ -60,7 +60,7 @@ public function testGetWaitTime(int $delay, float $multiplier, int $maxDelay, in $this->assertSame($expectedDelay, $strategy->getWaitingTime($envelope)); } - public function getWaitTimeTests(): iterable + public static function getWaitTimeTests(): iterable { // delay, multiplier, maxDelay, retries, expectedDelay yield [1000, 1, 5000, 0, 1000]; diff --git a/src/Symfony/Component/Messenger/Tests/Transport/InMemoryTransportFactoryTest.php b/src/Symfony/Component/Messenger/Tests/Transport/InMemoryTransportFactoryTest.php index d29ab10639da2..51ebc2f0a27ff 100644 --- a/src/Symfony/Component/Messenger/Tests/Transport/InMemoryTransportFactoryTest.php +++ b/src/Symfony/Component/Messenger/Tests/Transport/InMemoryTransportFactoryTest.php @@ -89,7 +89,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/Serialization/Normalizer/FlattenExceptionNormalizerTest.php b/src/Symfony/Component/Messenger/Tests/Transport/Serialization/Normalizer/FlattenExceptionNormalizerTest.php index 971b0c487ee44..87967140b3c26 100644 --- a/src/Symfony/Component/Messenger/Tests/Transport/Serialization/Normalizer/FlattenExceptionNormalizerTest.php +++ b/src/Symfony/Component/Messenger/Tests/Transport/Serialization/Normalizer/FlattenExceptionNormalizerTest.php @@ -63,7 +63,7 @@ public function testNormalize(FlattenException $exception) $this->assertSame($exception->getStatusText(), $normalized['status_text']); } - public function provideFlattenException(): array + public static function provideFlattenException(): array { return [ 'instance from exception' => [FlattenException::createFromThrowable(new \RuntimeException('foo', 42))], diff --git a/src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php b/src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php index 6f4d3bad313d1..d749d2d17fb7f 100644 --- a/src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php +++ b/src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php @@ -164,7 +164,7 @@ public function testDecodingFailsWithMissingKeys(array $data, string $expectedMe $serializer->decode($data); } - public function getMissingKeyTests(): iterable + public static function getMissingKeyTests(): iterable { yield 'no_body' => [ ['headers' => ['type' => 'bar']], diff --git a/src/Symfony/Component/Mime/Tests/AddressTest.php b/src/Symfony/Component/Mime/Tests/AddressTest.php index a0f2164b5547b..7ea51038300a7 100644 --- a/src/Symfony/Component/Mime/Tests/AddressTest.php +++ b/src/Symfony/Component/Mime/Tests/AddressTest.php @@ -87,7 +87,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 "]]; } @@ -115,7 +115,7 @@ public function testFromStringFailure() Address::fromString('Jane Doe assertEquals($header, $signedMessage->getHeaders()->get('DKIM-Signature')->getBody()); } - public function getSignData() + public static function getSignData() { yield 'simple/simple' => [ 1591597074, DkimSigner::CANON_SIMPLE, DkimSigner::CANON_SIMPLE, @@ -132,7 +132,7 @@ public function testCanonicalizeHeader(string $bodyCanon, string $canonBody, str $this->assertEquals(\strlen($canonBody), $l); } - public function getCanonicalizeHeaderData() + public static function getCanonicalizeHeaderData() { yield 'simple_empty' => [ DkimSigner::CANON_SIMPLE, "\r\n", '', \PHP_INT_MAX, diff --git a/src/Symfony/Component/Mime/Tests/RawMessageTest.php b/src/Symfony/Component/Mime/Tests/RawMessageTest.php index 41503451bb1da..264e465dea666 100644 --- a/src/Symfony/Component/Mime/Tests/RawMessageTest.php +++ b/src/Symfony/Component/Mime/Tests/RawMessageTest.php @@ -29,7 +29,7 @@ public function testToString($messageParameter) $this->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/Notifier/Bridge/MicrosoftTeams/Tests/Action/ActionCardTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/ActionCardTest.php index 0d8d412e8ff3b..4fcc9c55d674a 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/ActionCardTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/ActionCardTest.php @@ -43,7 +43,7 @@ public function testInput(array $expected, InputInterface $input) $this->assertSame($expected, $action->toArray()['inputs']); } - public function availableInputs(): \Generator + public static function availableInputs(): \Generator { yield [[['@type' => 'DateInput']], new DateInput()]; yield [[['@type' => 'TextInput']], new TextInput()]; @@ -62,7 +62,7 @@ public function testAction(array $expected, ActionCardCompatibleActionInterface $this->assertSame($expected, $section->toArray()['actions']); } - public function compatibleActions(): \Generator + public static function compatibleActions(): \Generator { yield [[['@type' => 'HttpPOST']], new HttpPostAction()]; yield [[['@type' => 'OpenUri']], new OpenUriAction()]; diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/MultiChoiceInputTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/MultiChoiceInputTest.php index e8ce2327277cd..1da07be6a1c6e 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/MultiChoiceInputTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/MultiChoiceInputTest.php @@ -69,7 +69,7 @@ public function testStyle(string $value) /** * @return \Generator */ - public function styles(): \Generator + public static function styles(): \Generator { yield 'style-expanded' => ['expanded']; yield 'style-normal' => ['normal']; diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/OpenUriActionTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/OpenUriActionTest.php index a67eaf5e03a4b..63c2e45629927 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/OpenUriActionTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/OpenUriActionTest.php @@ -57,7 +57,7 @@ public function testTarget(string $os) /** * @return \Generator */ - public function operatingSystems(): \Generator + public static function operatingSystems(): \Generator { yield 'os-android' => ['android']; yield 'os-default' => ['default']; diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsOptionsTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsOptionsTest.php index ccd8064254b8a..1aaeffd7d333e 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsOptionsTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsOptionsTest.php @@ -146,7 +146,7 @@ public function testThemeColorViaSetter(string $themeColor) $this->assertSame($themeColor, $options->toArray()['themeColor']); } - public function validThemeColors(): \Generator + public static function validThemeColors(): \Generator { yield ['#333']; yield ['#333333']; @@ -181,7 +181,7 @@ public function testThemeColorViaSetterThrowsInvalidArgumentException(string $th ->themeColor($themeColor); } - public function invalidThemeColors(): \Generator + public static function invalidThemeColors(): \Generator { yield ['']; yield [' ']; diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Section/SectionTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Section/SectionTest.php index e037efea19d5f..fde246a54ec65 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Section/SectionTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Section/SectionTest.php @@ -52,7 +52,7 @@ public function testAction(array $expected, ActionInterface $action) $this->assertSame($expected, $section->toArray()['potentialAction']); } - public function allowedActions(): \Generator + public static function allowedActions(): \Generator { yield [[['@type' => 'ActionCard']], new ActionCard()]; yield [[['@type' => 'HttpPOST']], new HttpPostAction()]; diff --git a/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytOptionsTest.php b/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytOptionsTest.php index 23f1d0dfbf286..40af3e310fe62 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytOptionsTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytOptionsTest.php @@ -33,7 +33,7 @@ public function testFromNotification(string $importance, string $expectedMessage /** * @return \Generator */ - public function fromNotificationDataProvider(): \Generator + public static function fromNotificationDataProvider(): \Generator { yield [Notification::IMPORTANCE_URGENT, MobytOptions::MESSAGE_TYPE_QUALITY_HIGH]; yield [Notification::IMPORTANCE_HIGH, MobytOptions::MESSAGE_TYPE_QUALITY_HIGH]; @@ -85,7 +85,7 @@ public function testMessageType(string $type) $this->assertSame(['message_type' => $type], $mobytOptions->toArray()); } - public function validMessageTypes(): iterable + public static function validMessageTypes(): iterable { yield [MobytOptions::MESSAGE_TYPE_QUALITY_HIGH]; yield [MobytOptions::MESSAGE_TYPE_QUALITY_MEDIUM]; diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackOptionsTest.php b/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackOptionsTest.php index b162a2401500a..899f2cdbe440c 100644 --- a/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackOptionsTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackOptionsTest.php @@ -35,7 +35,7 @@ public function testToArray(array $options, array $expected = null) $this->assertSame($expected ?? $options, (new SlackOptions($options))->toArray()); } - public function toArrayProvider(): iterable + public static function toArrayProvider(): iterable { yield 'empty is allowed' => [ [], @@ -61,7 +61,7 @@ public function toArrayProvider(): iterable ]; } - public function toArraySimpleOptionsProvider(): iterable + public static function toArraySimpleOptionsProvider(): iterable { yield [['as_user' => true]]; yield [['icon_emoji' => 'foo']]; @@ -83,7 +83,7 @@ public function testGetRecipientId(?string $expected, SlackOptions $options) $this->assertSame($expected, $options->getRecipientId()); } - public function getRecipientIdProvider(): iterable + public static function getRecipientIdProvider(): iterable { yield [null, new SlackOptions()]; yield [null, new SlackOptions(['recipient_id' => null])]; @@ -103,7 +103,7 @@ public function testSet(string $method, string $optionsKey, $value) $this->assertSame($value, $options->toArray()[$optionsKey]); } - public function setProvider(): iterable + public static function setProvider(): iterable { yield ['asUser', 'as_user', true]; yield ['iconEmoji', 'icon_emoji', 'foo']; @@ -144,7 +144,7 @@ public function testFromNotification(array $expected, Notification $notification $this->assertSame($expected, $options->toArray()); } - public function fromNotificationProvider(): iterable + public static function fromNotificationProvider(): iterable { $subject = 'Hi!'; $emoji = '🌧️'; diff --git a/src/Symfony/Component/Notifier/Tests/Channel/ChannelPolicyTest.php b/src/Symfony/Component/Notifier/Tests/Channel/ChannelPolicyTest.php index 59acb33f0c873..e448368685b28 100644 --- a/src/Symfony/Component/Notifier/Tests/Channel/ChannelPolicyTest.php +++ b/src/Symfony/Component/Notifier/Tests/Channel/ChannelPolicyTest.php @@ -39,7 +39,7 @@ public function testCanRetrieveChannels(array $policy, string $importance, array $this->assertSame($expectedChannels, $channels); } - public function provideValidPolicies(): \Generator + public static function provideValidPolicies(): \Generator { yield [['urgent' => ['chat']], 'urgent', ['chat']]; yield [['urgent' => ['chat', 'sms']], 'urgent', ['chat', 'sms']]; diff --git a/src/Symfony/Component/Notifier/Tests/Event/FailedMessageEventTest.php b/src/Symfony/Component/Notifier/Tests/Event/FailedMessageEventTest.php index a2c0263eb50be..747100cd585a8 100644 --- a/src/Symfony/Component/Notifier/Tests/Event/FailedMessageEventTest.php +++ b/src/Symfony/Component/Notifier/Tests/Event/FailedMessageEventTest.php @@ -95,7 +95,7 @@ public function __toString(): string } } - public function messagesProvider(): iterable + public static function messagesProvider(): iterable { yield [$message = new ChatMessage('subject'), $error = new \RuntimeException(), new FailedMessageEvent($message, $error)]; yield [$message = new SmsMessage('+3312345678', 'subject'), $error = new \Exception(), new FailedMessageEvent($message, $error)]; diff --git a/src/Symfony/Component/Notifier/Tests/Event/SentMessageEventTest.php b/src/Symfony/Component/Notifier/Tests/Event/SentMessageEventTest.php index 0668c43171f78..b76886570b792 100644 --- a/src/Symfony/Component/Notifier/Tests/Event/SentMessageEventTest.php +++ b/src/Symfony/Component/Notifier/Tests/Event/SentMessageEventTest.php @@ -35,7 +35,7 @@ public function testGetMessage(SentMessage $message, SentMessageEvent $event) $this->assertSame($message, $event->getMessage()); } - public function messagesProvider(): iterable + public static function messagesProvider(): iterable { yield [$message = new SentMessage(new ChatMessage('subject'), 'null_transport'), new SentMessageEvent($message)]; yield [$message = new SentMessage(new SmsMessage('+3312345678', 'subject'), 'null_transport'), new SentMessageEvent($message)]; diff --git a/src/Symfony/Component/Notifier/Tests/Exception/UnsupportedSchemeExceptionTest.php b/src/Symfony/Component/Notifier/Tests/Exception/UnsupportedSchemeExceptionTest.php index 1cd8d4033eb4d..98ffe6d615a42 100644 --- a/src/Symfony/Component/Notifier/Tests/Exception/UnsupportedSchemeExceptionTest.php +++ b/src/Symfony/Component/Notifier/Tests/Exception/UnsupportedSchemeExceptionTest.php @@ -127,7 +127,7 @@ public function testMessageWhereSchemeIsPartOfSchemeToPackageMap(string $scheme, ); } - public function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \Generator + public static function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \Generator { yield ['allmysms', 'symfony/all-my-sms-notifier']; yield ['sns', 'symfony/amazon-sns-notifier']; @@ -183,7 +183,7 @@ public function testMessageWhereSchemeIsNotPartOfSchemeToPackageMap(string $expe ); } - public function messageWhereSchemeIsNotPartOfSchemeToPackageMapProvider(): \Generator + public static function messageWhereSchemeIsNotPartOfSchemeToPackageMapProvider(): \Generator { yield [ 'The "somethingElse" scheme is not supported.', diff --git a/src/Symfony/Component/Notifier/Tests/Message/NullMessageTest.php b/src/Symfony/Component/Notifier/Tests/Message/NullMessageTest.php index 9213fde3704ff..c3fee9a1d92bd 100644 --- a/src/Symfony/Component/Notifier/Tests/Message/NullMessageTest.php +++ b/src/Symfony/Component/Notifier/Tests/Message/NullMessageTest.php @@ -36,7 +36,7 @@ public function testCanBeConstructed(MessageInterface $message) : $this->assertSame($message->getTransport(), $nullMessage->getTransport()); } - public function messageDataProvider(): \Generator + public static function messageDataProvider(): \Generator { yield [new DummyMessageWithoutTransport()]; yield [new DummyMessageWithTransport()]; diff --git a/src/Symfony/Component/Notifier/Tests/Recipient/RecipientTest.php b/src/Symfony/Component/Notifier/Tests/Recipient/RecipientTest.php index f4e93ccd5127f..a1dce4357568e 100644 --- a/src/Symfony/Component/Notifier/Tests/Recipient/RecipientTest.php +++ b/src/Symfony/Component/Notifier/Tests/Recipient/RecipientTest.php @@ -38,7 +38,7 @@ public function testCanBeConstructed(string $email, string $phone) $this->assertSame($phone, $recipient->getPhone()); } - public function provideValidEmailAndPhone() + public static function provideValidEmailAndPhone() { yield ['test@test.de', '+0815']; yield ['test@test.de', '']; diff --git a/src/Symfony/Component/Notifier/Tests/Transport/DsnTest.php b/src/Symfony/Component/Notifier/Tests/Transport/DsnTest.php index b927c9d955689..98a898cd50a36 100644 --- a/src/Symfony/Component/Notifier/Tests/Transport/DsnTest.php +++ b/src/Symfony/Component/Notifier/Tests/Transport/DsnTest.php @@ -35,7 +35,7 @@ public function testConstruct(string $dsnString, string $scheme, string $host, s $this->assertSame($options, $dsn->getOptions()); } - public function constructProvider(): iterable + public static function constructProvider(): iterable { yield 'simple dsn' => [ 'scheme://localhost', @@ -151,7 +151,7 @@ public function testInvalidDsn(string $dsnString, string $exceptionMessage) new Dsn($dsnString); } - public function invalidDsnProvider(): iterable + public static function invalidDsnProvider(): iterable { yield [ 'some://', @@ -179,7 +179,7 @@ public function testGetOption($expected, string $dsnString, string $option, stri $this->assertSame($expected, $dsn->getOption($option, $default)); } - public function getOptionProvider(): iterable + public static function getOptionProvider(): iterable { yield [ 'foo', @@ -217,7 +217,7 @@ public function testGetRequiredOption(string $expectedValue, string $options, st $this->assertSame($expectedValue, $dsn->getRequiredOption($option)); } - public function getRequiredOptionProvider(): iterable + public static function getRequiredOptionProvider(): iterable { yield [ 'value', @@ -245,7 +245,7 @@ public function testGetRequiredOptionThrowsMissingRequiredOptionException(string $dsn->getRequiredOption($option); } - public function getRequiredOptionThrowsMissingRequiredOptionExceptionProvider(): iterable + public static function getRequiredOptionThrowsMissingRequiredOptionExceptionProvider(): iterable { yield [ 'The option "foo_bar" is required but missing.', diff --git a/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php b/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php index ba8ebfd20e8ab..2c8fc0639198e 100644 --- a/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php +++ b/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php @@ -552,7 +552,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) { @@ -850,7 +850,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 "bool".'], diff --git a/src/Symfony/Component/PasswordHasher/Tests/Command/UserPasswordHashCommandTest.php b/src/Symfony/Component/PasswordHasher/Tests/Command/UserPasswordHashCommandTest.php index 16924a18151d9..86a183e96547c 100644 --- a/src/Symfony/Component/PasswordHasher/Tests/Command/UserPasswordHashCommandTest.php +++ b/src/Symfony/Component/PasswordHasher/Tests/Command/UserPasswordHashCommandTest.php @@ -302,7 +302,7 @@ public function testCompletionSuggestions(array $input, array $expectedSuggestio $this->assertSame($expectedSuggestions, $tester->complete($input)); } - public function provideCompletionSuggestions(): iterable + public static function provideCompletionSuggestions(): iterable { yield 'user_class_empty' => [ ['p@ssw0rd', ''], diff --git a/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php b/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php index dc29ac6648173..2b7bd7855a9b7 100644 --- a/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php +++ b/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php @@ -39,7 +39,7 @@ public function testCostInRange($cost) $this->assertInstanceOf(NativePasswordHasher::class, new NativePasswordHasher(null, null, $cost)); } - public function validRangeData() + public static function validRangeData() { $costs = range(4, 31); array_walk($costs, function (&$cost) { $cost = [$cost]; }); diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php index 1646bcb97b9b3..790167fcade94 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/PropertyAccessorTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php index 46ecfcca07bc0..b5fbf23fd1c56 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php @@ -55,7 +55,7 @@ protected function setUp(): void $this->propertyAccessor = new PropertyAccessor(); } - public function getPathsWithUnexpectedType() + public static function getPathsWithUnexpectedType() { return [ ['', 'foobar'], @@ -69,7 +69,7 @@ public function getPathsWithUnexpectedType() ]; } - public function getPathsWithMissingProperty() + public static function getPathsWithMissingProperty() { return [ [(object) ['firstName' => 'Bernhard'], 'lastName'], @@ -89,7 +89,7 @@ public function getPathsWithMissingProperty() ]; } - public function getPathsWithMissingIndex() + public static function getPathsWithMissingIndex() { return [ [['firstName' => 'Bernhard'], '[lastName]'], @@ -660,7 +660,7 @@ public function testIsWritableReturnsFalseIfNotObjectOrArray($objectOrArray, $pa $this->assertFalse($this->propertyAccessor->isWritable($objectOrArray, $path)); } - public function getValidPropertyPaths() + public static function getValidPropertyPaths() { return [ [['Bernhard', 'Schussek'], '[0]', 'Bernhard'], @@ -723,7 +723,7 @@ public function testSetValueDeepWithMagicGetter() $this->assertSame('Updated', $obj->publicProperty['foo']['bar']); } - public function getReferenceChainObjectsForSetValue() + public static function getReferenceChainObjectsForSetValue() { return [ [['a' => ['b' => ['c' => 'old-value']]], '[a][b][c]', 'new-value'], @@ -744,7 +744,7 @@ public function testSetValueForReferenceChainIssue($object, $path, $value) $this->assertEquals($value, $this->propertyAccessor->getValue($object, $path)); } - public function getReferenceChainObjectsForIsWritable() + public static function getReferenceChainObjectsForIsWritable() { return [ [new TestClassIsWritable(['a' => ['b' => 'old-value']]), 'value[a][b]', false], 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/PhpStanExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php index 467c076e2575e..a517e7ac30469 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php @@ -58,7 +58,7 @@ public function testParamTagTypeIsOmitted() $this->assertNull($this->extractor->getTypes(PhpStanOmittedParamTagTypeDocBlock::class, 'omittedType')); } - public function invalidTypesProvider() + public static function invalidTypesProvider() { return [ 'pub' => ['pub'], @@ -86,7 +86,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], @@ -139,7 +139,7 @@ public function testExtractCollection($property, array $type = null) $this->testExtract($property, $type); } - 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))]], @@ -197,7 +197,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], @@ -235,7 +235,7 @@ public function typesWithCustomPrefixesProvider() ]; } - public function typesWithNoPrefixesProvider() + public static function typesWithNoPrefixesProvider() { return [ ['foo', null], @@ -273,7 +273,7 @@ public function typesWithNoPrefixesProvider() ]; } - public function dockBlockFallbackTypesProvider() + public static function dockBlockFallbackTypesProvider() { return [ 'pub' => [ @@ -304,7 +304,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)], @@ -321,7 +321,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)], @@ -337,7 +337,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')]], @@ -353,7 +353,7 @@ public function testExtractConstructorTypes($property, array $type = null) $this->assertEquals($type, $this->extractor->getTypesFromConstructor('Symfony\Component\PropertyInfo\Tests\Fixtures\ConstructorDummy', $property)); } - public function constructorTypesProvider() + public static function constructorTypesProvider() { return [ ['date', [new Type(Type::BUILTIN_TYPE_INT)]], @@ -372,7 +372,7 @@ public function testExtractorUnionTypes(string $property, ?array $types) $this->assertEquals($types, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\DummyUnionType', $property)); } - public function unionTypesProvider(): array + public static function unionTypesProvider(): array { return [ ['a', [new Type(Type::BUILTIN_TYPE_STRING), new Type(Type::BUILTIN_TYPE_INT)]], @@ -410,7 +410,7 @@ public function testExtractorIntRangeType(string $property, ?array $types) $this->assertEquals($types, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\IntRangeDummy', $property)); } - public function intRangeTypeProvider(): array + public static function intRangeTypeProvider(): array { return [ ['a', [new Type(Type::BUILTIN_TYPE_INT)]], diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php index e17e203c1523c..b7955584d8c36 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php @@ -207,7 +207,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], @@ -234,7 +234,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)]], @@ -255,7 +255,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)]], @@ -276,7 +276,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)]], @@ -300,7 +300,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], @@ -326,7 +326,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)]]; @@ -344,7 +344,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)]], @@ -366,7 +366,7 @@ public function testIsReadable($property, $expected) ); } - public function getReadableProperties() + public static function getReadableProperties() { return [ ['bar', false], @@ -397,7 +397,7 @@ public function testIsWritable($property, $expected) ); } - public function getWritableProperties() + public static function getWritableProperties() { return [ ['bar', false], @@ -451,7 +451,7 @@ public function testIsInitializable(string $class, string $property, bool $expec $this->assertSame($expected, $this->extractor->isInitializable($class, $property)); } - public function getInitializableProperties(): array + public static function getInitializableProperties(): array { return [ [Php71Dummy::class, 'string', true], @@ -475,7 +475,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) @@ -534,7 +534,7 @@ public function testGetReadAccessor($class, $property, $found, $type, $name, $vi $this->assertSame($static, $readAcessor->isStatic()); } - public function readAccessorProvider(): array + public static function readAccessorProvider(): array { return [ [Dummy::class, 'bar', true, PropertyReadInfo::TYPE_PROPERTY, 'bar', PropertyReadInfo::VISIBILITY_PRIVATE, false], @@ -592,7 +592,7 @@ public function testGetWriteMutator($class, $property, $allowConstruct, $found, } } - public function writeMutatorProvider(): array + public static function writeMutatorProvider(): array { return [ [Dummy::class, 'bar', false, true, PropertyWriteInfo::TYPE_PROPERTY, 'bar', null, null, PropertyWriteInfo::VISIBILITY_PRIVATE, false], @@ -650,7 +650,7 @@ public function testExtractConstructorTypes(string $property, array $type = null $this->assertEquals($type, $this->extractor->getTypesFromConstructor('Symfony\Component\PropertyInfo\Tests\Fixtures\ConstructorDummy', $property)); } - public function extractConstructorTypesProvider(): array + public static function extractConstructorTypesProvider(): array { return [ ['timezone', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTimeZone')]], diff --git a/src/Symfony/Component/RateLimiter/Tests/Policy/FixedWindowLimiterTest.php b/src/Symfony/Component/RateLimiter/Tests/Policy/FixedWindowLimiterTest.php index a9f9960c4b547..0cffc14e1aee6 100644 --- a/src/Symfony/Component/RateLimiter/Tests/Policy/FixedWindowLimiterTest.php +++ b/src/Symfony/Component/RateLimiter/Tests/Policy/FixedWindowLimiterTest.php @@ -108,7 +108,7 @@ public function testWindowResilientToTimeShifting() $this->assertSame(100, $window->getAvailableTokens($serverOneClock)); } - public function provideConsumeOutsideInterval(): \Generator + public static function provideConsumeOutsideInterval(): \Generator { yield ['PT15S']; diff --git a/src/Symfony/Component/RateLimiter/Tests/Policy/RateTest.php b/src/Symfony/Component/RateLimiter/Tests/Policy/RateTest.php index a780d34fdb82f..f5dc600696007 100644 --- a/src/Symfony/Component/RateLimiter/Tests/Policy/RateTest.php +++ b/src/Symfony/Component/RateLimiter/Tests/Policy/RateTest.php @@ -24,7 +24,7 @@ public function testFromString(Rate $rate) $this->assertEquals($rate, Rate::fromString((string) $rate)); } - public function provideRate(): iterable + public static function provideRate(): iterable { yield [new Rate(new \DateInterval('PT15S'), 10)]; yield [Rate::perSecond(10)]; diff --git a/src/Symfony/Component/RateLimiter/Tests/RateLimiterFactoryTest.php b/src/Symfony/Component/RateLimiter/Tests/RateLimiterFactoryTest.php index 7d7627809238e..5ac5963a2a1cb 100644 --- a/src/Symfony/Component/RateLimiter/Tests/RateLimiterFactoryTest.php +++ b/src/Symfony/Component/RateLimiter/Tests/RateLimiterFactoryTest.php @@ -32,7 +32,7 @@ public function testValidConfig(string $expectedClass, array $config) $this->assertInstanceOf($expectedClass, $rateLimiter); } - public function validConfigProvider() + public static function validConfigProvider() { yield [TokenBucketLimiter::class, [ 'policy' => 'token_bucket', @@ -70,7 +70,7 @@ public function testInvalidConfig(string $exceptionClass, array $config) $factory->create('key'); } - public function invalidConfigProvider() + public static function invalidConfigProvider() { yield [MissingOptionsException::class, [ 'policy' => 'token_bucket', diff --git a/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php b/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php index e249aa5da8903..f7e42a603e789 100644 --- a/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php +++ b/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php @@ -42,7 +42,7 @@ private function getMethodAnnotation(string $method, bool $attributes): Route return $route; } - public function provideDeprecationArrayAsFirstArgument() + public static function provideDeprecationArrayAsFirstArgument() { return [ ['requirements', ['locale' => 'en'], 'getRequirements'], @@ -89,7 +89,7 @@ public function testLoadFromDoctrineAnnotation(string $methodName, string $gette $this->assertEquals($route->$getter(), $expectedReturn); } - public function getValidParameters(): iterable + public static function getValidParameters(): iterable { return [ ['simplePath', 'getPath', '/Blog'], diff --git a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php index 71501d2a1e896..f2062e8e6fec2 100644 --- a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php +++ b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php @@ -130,7 +130,7 @@ public function testAbsoluteUrlWithExtraParameters(string $expectedQueryString, $this->assertSame('http://localhost/app.php/testing'.$expectedQueryString, $url); } - public function valuesProvider(): array + public static function valuesProvider(): array { $stdClass = new \stdClass(); $stdClass->baz = 'bar'; @@ -862,7 +862,7 @@ public function testGetRelativePath($sourcePath, $targetPath, $expectedPath) $this->assertSame($expectedPath, UrlGenerator::getRelativePath($sourcePath, $targetPath)); } - public function provideRelativePaths() + public static function provideRelativePaths() { return [ [ @@ -1004,7 +1004,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/AnnotationClassLoaderTestCase.php b/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTestCase.php index 0c820fc278b86..e10e9993a6a3e 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTestCase.php +++ b/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTestCase.php @@ -30,7 +30,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/ObjectLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php index fcd679ead9e31..6027c3fd63059 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php @@ -50,7 +50,7 @@ public function testExceptionWithoutSyntax(string $resourceString) $loader->load($resourceString); } - public function getBadResourceStrings() + public static function getBadResourceStrings() { return [ ['Foo:Bar:baz'], diff --git a/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php index 7637fd600aa92..ec7bd6ed516bd 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php @@ -230,7 +230,7 @@ public function testLoadThrowsExceptionWithInvalidFileEvenWithoutSchemaValidatio $loader->load($filePath); } - public function getPathsToInvalidFiles() + public static function getPathsToInvalidFiles() { return [ ['nonvalidnode.xml'], @@ -478,7 +478,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 b509ce36237c8..a81a6b2faced7 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php @@ -52,7 +52,7 @@ public function testLoadThrowsExceptionWithInvalidFile($filePath) $loader->load($filePath); } - public function getPathsToInvalidFiles() + public static function getPathsToInvalidFiles() { return [ ['nonvalid.yml'], @@ -171,7 +171,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/CompiledUrlMatcherDumperTest.php b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php index 4886d717685c6..913456775a3f1 100644 --- a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php +++ b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php @@ -65,7 +65,7 @@ public function testDump(RouteCollection $collection, $fixture) $this->assertStringEqualsFile($basePath.$fixture, $dumper->dump()); } - public function getRouteCollections() + public static function getRouteCollections() { /* test case 1 */ 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/Matcher/ExpressionLanguageProviderTest.php b/src/Symfony/Component/Routing/Tests/Matcher/ExpressionLanguageProviderTest.php index 0aa3549b26c60..2e431b7197f5e 100644 --- a/src/Symfony/Component/Routing/Tests/Matcher/ExpressionLanguageProviderTest.php +++ b/src/Symfony/Component/Routing/Tests/Matcher/ExpressionLanguageProviderTest.php @@ -59,7 +59,7 @@ public function testCompile(string $expression, string $expected) $this->assertSame($expected, $this->expressionLanguage->compile($expression)); } - public function compileProvider(): iterable + public static function compileProvider(): iterable { return [ ['env("APP_ENV")', '($context->getParameter(\'_functions\')->get(\'env\')("APP_ENV"))'], @@ -76,7 +76,7 @@ public function testEvaluate(string $expression, $expected) $this->assertSame($expected, $this->expressionLanguage->evaluate($expression, ['context' => $this->context])); } - public function evaluateProvider(): iterable + public static function evaluateProvider(): iterable { return [ ['env("APP_ENV")', 'test'], diff --git a/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php b/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php index ef0d73a66af78..682b0ccec4175 100644 --- a/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php +++ b/src/Symfony/Component/Routing/Tests/RouteCollectionBuilderTest.php @@ -251,7 +251,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 6f5b91f5727c3..57f61c7e865f2 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 [ [ @@ -284,7 +284,7 @@ public function testRouteWithVariableNameStartingWithADigit($name) $route->compile(); } - public function getVariableNamesStartingWithADigit() + public static function getVariableNamesStartingWithADigit() { return [ ['09'], @@ -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 4be50d9a45203..4d7d9299ab72a 100644 --- a/src/Symfony/Component/Routing/Tests/RouteTest.php +++ b/src/Symfony/Component/Routing/Tests/RouteTest.php @@ -151,7 +151,7 @@ public function testSetInvalidRequirement($req) $route->setRequirement('foo', $req); } - public function getInvalidRequirements() + public static function getInvalidRequirements() { return [ [''], @@ -354,7 +354,7 @@ public function testLocaleRequirementWithLocalizedRoutes(Route $route) $this->assertSame($expected, $route->getRequirement('_locale')); } - public function provideNonLocalizedRoutes() + public static function provideNonLocalizedRoutes() { return [ [new Route('/foo')], @@ -364,7 +364,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/Authorization/AccessDecisionManagerTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php index c378b19e38015..9ddea2bb3344a 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php @@ -72,7 +72,7 @@ public function decide(\Traversable $results): bool $manager->decide($token, ['ROLE_FOO']); } - public function provideBadVoterResults(): array + public static function provideBadVoterResults(): array { return [ [3], diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php index 160b921b3075c..5ea3e6eeb3589 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php @@ -117,7 +117,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 c76ca77dfbbf5..d8fdc1447c19e 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php @@ -45,7 +45,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 InMemoryUser('username', 'password', $roles); @@ -85,7 +85,7 @@ public function testLegacyIsAuthenticated($token, $expression, $result) /** * @group legacy */ - public function legacyProvider() + public static function legacyProvider() { $roles = ['ROLE_USER', 'ROLE_ADMIN']; $user = new InMemoryUser('username', 'password', $roles); diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php index c1abddb5b9e02..1264af0ef0030 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php @@ -33,7 +33,7 @@ public function testVote($authenticated, $attributes, $expected) $this->assertSame($expected, $voter->vote($this->getToken($authenticated), null, $attributes)); } - public function getVoteTests() + public static function getVoteTests() { return [ ['fully', [], VoterInterface::ACCESS_ABSTAIN], @@ -62,7 +62,7 @@ public function testLegacyVote($authenticated, $attributes, $expected) $this->testVote($authenticated, $attributes, $expected); } - public function getLegacyVoteTests() + public static function getLegacyVoteTests() { return [ ['anonymously', [], VoterInterface::ACCESS_ABSTAIN], @@ -93,7 +93,7 @@ public function testSupportsAttribute(string $attribute, bool $expected) $this->assertSame($expected, $voter->supportsAttribute($attribute)); } - public function provideAttributes() + public static function provideAttributes() { yield [AuthenticatedVoter::IS_AUTHENTICATED_FULLY, true]; yield [AuthenticatedVoter::IS_AUTHENTICATED_REMEMBERED, true]; diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php index 571270072706b..b811bd745bb85 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php @@ -27,7 +27,7 @@ public function testVoteUsingTokenThatReturnsRoleNames($roles, $attributes, $exp $this->assertSame($expected, $voter->vote($this->getTokenWithRoleNames($roles), null, $attributes)); } - public function getVoteTests() + public static function getVoteTests() { return array_merge(parent::getVoteTests(), [ [['ROLE_FOO'], ['ROLE_FOOBAR'], VoterInterface::ACCESS_GRANTED], @@ -44,7 +44,7 @@ public function testVoteWithEmptyHierarchyUsingTokenThatReturnsRoleNames($roles, $this->assertSame($expected, $voter->vote($this->getTokenWithRoleNames($roles), null, $attributes)); } - public function getVoteWithEmptyHierarchyTests() + public static function getVoteWithEmptyHierarchyTests() { return parent::getVoteTests(); } diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php index 21946e5d0b567..59a7ab770991f 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php @@ -33,7 +33,7 @@ public function testVoteUsingTokenThatReturnsRoleNames($roles, $attributes, $exp $this->assertSame($expected, $voter->vote($this->getTokenWithRoleNames($roles), null, $attributes)); } - public function getVoteTests() + public static function getVoteTests() { return [ [[], [], VoterInterface::ACCESS_ABSTAIN], @@ -70,7 +70,7 @@ public function testSupportsAttribute(string $prefix, string $attribute, bool $e $this->assertSame($expected, $voter->supportsAttribute($attribute)); } - public function provideAttributes() + public static function provideAttributes() { yield ['ROLE_', 'ROLE_foo', true]; yield ['ROLE_', 'ROLE_', true]; diff --git a/src/Symfony/Component/Security/Core/Tests/Encoder/NativePasswordEncoderTest.php b/src/Symfony/Component/Security/Core/Tests/Encoder/NativePasswordEncoderTest.php index 9d864dfce038e..6400d1f618ab0 100644 --- a/src/Symfony/Component/Security/Core/Tests/Encoder/NativePasswordEncoderTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Encoder/NativePasswordEncoderTest.php @@ -40,7 +40,7 @@ public function testCostInRange($cost) $this->assertInstanceOf(NativePasswordEncoder::class, new NativePasswordEncoder(null, null, $cost)); } - public function validRangeData() + public static function validRangeData() { $costs = range(4, 31); array_walk($costs, function (&$cost) { $cost = [$cost]; }); 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/Core/Tests/SecurityTest.php b/src/Symfony/Component/Security/Core/Tests/SecurityTest.php index e1398fa45108d..55dad5a679d76 100644 --- a/src/Symfony/Component/Security/Core/Tests/SecurityTest.php +++ b/src/Symfony/Component/Security/Core/Tests/SecurityTest.php @@ -59,7 +59,7 @@ public function testGetUser($userInToken, $expectedUser) $this->assertSame($expectedUser, $security->getUser()); } - public function getUserTests() + public static function getUserTests() { yield [null, null]; @@ -70,7 +70,7 @@ public function getUserTests() /** * @group legacy */ - public function getLegacyUserTests() + public static function getLegacyUserTests() { yield ['string_username', null]; diff --git a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordTest.php b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordTest.php index 8e956c3848bbf..7e22d28b94a4e 100644 --- a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordTest.php @@ -33,7 +33,7 @@ public function testValidatedByService(UserPassword $constraint) self::assertSame('my_service', $constraint->validatedBy()); } - public function provideServiceValidatedConstraints(): iterable + public static function provideServiceValidatedConstraints(): iterable { yield 'Doctrine style' => [new UserPassword(['service' => 'my_service'])]; diff --git a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTestCase.php b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTestCase.php index dfed2e4143c95..6fe8de6a1aa87 100644 --- a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTestCase.php +++ b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTestCase.php @@ -90,7 +90,7 @@ public function testPasswordIsNotValid(UserPassword $constraint) ->assertRaised(); } - public function provideConstraints(): iterable + public static function provideConstraints(): iterable { yield 'Doctrine style' => [new UserPassword(['message' => 'myMessage'])]; @@ -114,7 +114,7 @@ public function testEmptyPasswordsAreNotValid($password) ->assertRaised(); } - public function emptyPasswordData() + public static function emptyPasswordData() { return [ [null], diff --git a/src/Symfony/Component/Security/Guard/Tests/Authenticator/GuardBridgeAuthenticatorTest.php b/src/Symfony/Component/Security/Guard/Tests/Authenticator/GuardBridgeAuthenticatorTest.php index 3dd65a1715023..0eb67318f5b8c 100644 --- a/src/Symfony/Component/Security/Guard/Tests/Authenticator/GuardBridgeAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Guard/Tests/Authenticator/GuardBridgeAuthenticatorTest.php @@ -140,7 +140,7 @@ public function testAuthenticateRememberMe(bool $rememberMeSupported) $this->assertEquals($rememberMeSupported, $passport->hasBadge(RememberMeBadge::class)); } - public function provideRememberMeData() + public static function provideRememberMeData() { yield [true]; yield [false]; diff --git a/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php b/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php index 19bedb20dac66..481579ddf71cf 100644 --- a/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php +++ b/src/Symfony/Component/Security/Guard/Tests/Firewall/GuardAuthenticationListenerTest.php @@ -256,7 +256,7 @@ public function testHandleHidesInvalidUserExceptions(AuthenticationException $ex $listener($this->event); } - public function exceptionsToHide() + public static function exceptionsToHide() { return [ [new UserNotFoundException()], diff --git a/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php b/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php index d36cf666f32a9..d14bf43d0f91f 100644 --- a/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php +++ b/src/Symfony/Component/Security/Guard/Tests/GuardAuthenticatorHandlerTest.php @@ -109,7 +109,7 @@ public function testHandleAuthenticationClearsToken($tokenProviderKey, $actualPr $this->assertSame($response, $actualResponse); } - public function getTokenClearingTests() + public static function getTokenClearingTests() { $tests = []; // matching firewall => clear the token diff --git a/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php b/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php index 01677154b6482..f1eddd09c723b 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php @@ -119,7 +119,7 @@ public function testAuthenticateRequest($matchingAuthenticatorIndex) $this->assertTrue($listenerCalled, 'The CheckPassportEvent listener is not called'); } - public function provideMatchingAuthenticatorIndex() + public static function provideMatchingAuthenticatorIndex() { yield [0]; yield [1]; @@ -189,7 +189,7 @@ public function testEraseCredentials($eraseCredentials) $manager->authenticateRequest($this->request); } - public function provideEraseCredentialsData() + public static function provideEraseCredentialsData() { yield [true]; yield [false]; diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/AbstractLoginFormAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/AbstractLoginFormAuthenticatorTest.php index 3a50c131cd522..bbedd40b7c4ea 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authenticator/AbstractLoginFormAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/AbstractLoginFormAuthenticatorTest.php @@ -30,7 +30,7 @@ public function testSupports(string $loginUrl, Request $request, bool $expected) $this->assertSame($expected, $authenticator->supports($request)); } - public function provideSupportsData(): iterable + public static function provideSupportsData(): iterable { yield [ '/login', diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php index 3536b103a3041..aa1ae8a950ccf 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php @@ -60,7 +60,7 @@ public function testHandleWhenUsernameLength($username, $ok) $this->authenticator->authenticate($request); } - public function provideUsernamesForLength() + public static function provideUsernamesForLength() { yield [str_repeat('x', Security::MAX_USERNAME_LENGTH + 1), false]; yield [str_repeat('x', Security::MAX_USERNAME_LENGTH - 1), true]; @@ -126,7 +126,7 @@ public function testHandleNonStringUsernameWithToString($postOnly) $this->authenticator->authenticate($request); } - public function postOnlyDataProvider() + public static function postOnlyDataProvider() { yield [true]; yield [false]; @@ -171,7 +171,7 @@ public function testSupportsFormOnly(string $contentType, bool $shouldSupport) $this->assertSame($shouldSupport, $this->authenticator->supports($request)); } - public function provideContentTypes() + public static function provideContentTypes() { yield ['application/json', false]; yield ['application/x-www-form-urlencoded', true]; diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/HttpBasicAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/HttpBasicAuthenticatorTest.php index 70f48b9bc138e..b7b0cc010801f 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authenticator/HttpBasicAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/HttpBasicAuthenticatorTest.php @@ -67,7 +67,7 @@ public function testHttpBasicServerParametersMissing(array $serverParameters) $this->assertFalse($this->authenticator->supports($request)); } - public function provideMissingHttpBasicServerParameters() + public static function provideMissingHttpBasicServerParameters() { return [ [[]], diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/JsonLoginAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/JsonLoginAuthenticatorTest.php index 47e02689ead93..ae37976d5ee0f 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authenticator/JsonLoginAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/JsonLoginAuthenticatorTest.php @@ -45,7 +45,7 @@ public function testSupport($request) $this->assertTrue($this->authenticator->supports($request)); } - public function provideSupportData() + public static function provideSupportData() { yield [new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json'], '{"username": "dunglas", "password": "foo"}')]; @@ -64,7 +64,7 @@ public function testSupportsWithCheckPath($request, $result) $this->assertSame($result, $this->authenticator->supports($request)); } - public function provideSupportsWithCheckPathData() + public static function provideSupportsWithCheckPathData() { yield [Request::create('/api/login', 'GET', [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json']), true]; yield [Request::create('/login', 'GET', [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json']), false]; @@ -104,7 +104,7 @@ public function testAuthenticateInvalid($request, $errorMessage, $exceptionType $this->authenticator->authenticate($request); } - public function provideInvalidAuthenticateData() + public static function provideInvalidAuthenticateData() { $request = new Request([], [], [], [], [], ['HTTP_CONTENT_TYPE' => 'application/json']); yield [$request, 'Invalid JSON.']; diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/LoginLinkAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/LoginLinkAuthenticatorTest.php index 7e533398d96c6..fb704d988ec7e 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authenticator/LoginLinkAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/LoginLinkAuthenticatorTest.php @@ -50,7 +50,7 @@ public function testSupport(array $options, $request, bool $supported) $this->assertEquals($supported, $this->authenticator->supports($request)); } - public function provideSupportData() + public static function provideSupportData() { yield [['check_route' => '/validate_link'], Request::create('/validate_link?hash=abc123'), true]; yield [['check_route' => '/validate_link'], Request::create('/login?hash=abc123'), false]; diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/RememberMeAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/RememberMeAuthenticatorTest.php index c7492a95a464f..302def675391b 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authenticator/RememberMeAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/RememberMeAuthenticatorTest.php @@ -51,7 +51,7 @@ public function testSupports($request, $support) $this->assertSame($support, $this->authenticator->supports($request)); } - public function provideSupportsData() + public static function provideSupportsData() { yield [Request::create('/'), false]; diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/RemoteUserAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/RemoteUserAuthenticatorTest.php index 89a5776decd29..5119f8ce09e74 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authenticator/RemoteUserAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/RemoteUserAuthenticatorTest.php @@ -64,7 +64,7 @@ public function testAuthenticate(InMemoryUserProvider $userProvider, RemoteUserA $this->assertTrue($user->isEqualTo($passport->getUser())); } - public function provideAuthenticators() + public static function provideAuthenticators() { $userProvider = new InMemoryUserProvider(); yield [$userProvider, new RemoteUserAuthenticator($userProvider, new TokenStorage(), 'main'), 'REMOTE_USER']; diff --git a/src/Symfony/Component/Security/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php b/src/Symfony/Component/Security/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php index e9e5ddd54aba4..9b9492d9ff822 100644 --- a/src/Symfony/Component/Security/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php +++ b/src/Symfony/Component/Security/Http/Tests/EntryPoint/RetryAuthenticationEntryPointTest.php @@ -33,7 +33,7 @@ public function testStart($httpPort, $httpsPort, $request, $expectedUrl) $this->assertEquals($expectedUrl, $response->headers->get('Location')); } - public function dataForStart() + public static function dataForStart() { if (!class_exists(Request::class)) { return [[]]; diff --git a/src/Symfony/Component/Security/Http/Tests/EventListener/CheckCredentialsListenerTest.php b/src/Symfony/Component/Security/Http/Tests/EventListener/CheckCredentialsListenerTest.php index bab2ad0fc13f7..7135edbcb80b6 100644 --- a/src/Symfony/Component/Security/Http/Tests/EventListener/CheckCredentialsListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/EventListener/CheckCredentialsListenerTest.php @@ -62,7 +62,7 @@ public function testPasswordAuthenticated($password, $passwordValid, $result) } } - public function providePasswords() + public static function providePasswords() { yield ['ThePa$$word', true, true]; yield ['Invalid', false, false]; @@ -100,7 +100,7 @@ public function testCustomAuthenticated($result) } } - public function provideCustomAuthenticatedResults() + public static function provideCustomAuthenticatedResults() { yield [true]; yield [false]; diff --git a/src/Symfony/Component/Security/Http/Tests/EventListener/CheckRememberMeConditionsListenerTest.php b/src/Symfony/Component/Security/Http/Tests/EventListener/CheckRememberMeConditionsListenerTest.php index adc4a51251ded..a0e4904c20329 100644 --- a/src/Symfony/Component/Security/Http/Tests/EventListener/CheckRememberMeConditionsListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/EventListener/CheckRememberMeConditionsListenerTest.php @@ -80,7 +80,7 @@ public function testSuccessfulLoginWithOptInRequestParameter($optInValue) $this->assertTrue($passport->getBadge(RememberMeBadge::class)->isEnabled()); } - public function provideRememberMeOptInValues() + public static function provideRememberMeOptInValues() { yield ['true']; yield ['1']; diff --git a/src/Symfony/Component/Security/Http/Tests/EventListener/UserProviderListenerTest.php b/src/Symfony/Component/Security/Http/Tests/EventListener/UserProviderListenerTest.php index 1f5a65ac0b926..d81fc80c8de8e 100644 --- a/src/Symfony/Component/Security/Http/Tests/EventListener/UserProviderListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/EventListener/UserProviderListenerTest.php @@ -59,7 +59,7 @@ public function testNotOverrideUserLoader($passport) $this->assertEquals($passport->hasBadge(UserBadge::class) ? $passport->getBadge(UserBadge::class) : null, $badgeBefore); } - public function provideCompletePassports() + public static function provideCompletePassports() { yield [new SelfValidatingPassport(new UserBadge('wouter', function () {}))]; } diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php index 6c02847bc4b26..b98dc77651ff8 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php @@ -169,7 +169,7 @@ public function testInvalidTokenInSession($token) $listener(new RequestEvent($this->createMock(HttpKernelInterface::class), $request, HttpKernelInterface::MAIN_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 487b0f7caf93f..f05ce5f4315e7 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 ec9165ffcbb09..57c23b5ca636a 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php @@ -204,7 +204,7 @@ public function testLegacyLogoutHandlers() $this->assertSame($response, $event->getResponse()); } - 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 73d03e1a27d98..063afc4188f2c 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordFormAuthenticationListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordFormAuthenticationListenerTest.php @@ -267,7 +267,7 @@ public function testInvalidCsrfToken($invalidToken) $listener(new RequestEvent($this->createMock(HttpKernelInterface::class), $request, HttpKernelInterface::MAIN_REQUEST)); } - public function postOnlyDataProvider(): array + public static function postOnlyDataProvider(): array { return [ [true], @@ -275,7 +275,7 @@ public function postOnlyDataProvider(): array ]; } - public function getUsernameForLength(): array + public static function getUsernameForLength(): array { return [ [str_repeat('x', Security::MAX_USERNAME_LENGTH + 1), false], @@ -283,7 +283,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..4a1ba23ac60ca 100644 --- a/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php +++ b/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php @@ -69,7 +69,7 @@ public function testCreateRedirectResponseWithBadRequestsDomain($url) $this->assertTrue($response->isRedirect('http://localhost/')); } - public function badRequestDomainUrls() + public static function badRequestDomainUrls() { return [ ['http://pirate.net/foo'], @@ -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/LoginLink/LoginLinkHandlerTest.php b/src/Symfony/Component/Security/Http/Tests/LoginLink/LoginLinkHandlerTest.php index f2d03eed1c0f1..0d6983620439d 100644 --- a/src/Symfony/Component/Security/Http/Tests/LoginLink/LoginLinkHandlerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/LoginLink/LoginLinkHandlerTest.php @@ -89,7 +89,7 @@ public function testCreateLoginLink($user, array $extraProperties, Request $requ $this->assertSame('https://example.com/login/verify?user=weaverryan&hash=abchash&expires=1601235000', $loginLink->getUrl()); } - public function provideCreateLoginLinkData() + public static function provideCreateLoginLinkData() { yield [ new TestLoginLinkHandlerUser('weaverryan', 'ryan@symfonycasts.com', 'pwhash'), diff --git a/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php b/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php index 1cfec9bdca5eb..37e4d753da521 100644 --- a/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php +++ b/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php @@ -119,7 +119,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]], @@ -259,7 +259,7 @@ public function testLoginSuccessWhenRememberMeParameterIsPositive($value) $service->loginSuccess($request, $response, $token); } - public function getPositiveRememberMeParameterValues() + public static function getPositiveRememberMeParameterValues() { return [ ['true'], diff --git a/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php b/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php index ff774506f2a43..792afce133dff 100644 --- a/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php +++ b/src/Symfony/Component/Security/Http/Tests/RememberMe/TokenBasedRememberMeServicesTest.php @@ -107,7 +107,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/ContextTest.php b/src/Symfony/Component/Serializer/Tests/Annotation/ContextTest.php index ad79c893b5fed..4a26c1b36a65a 100644 --- a/src/Symfony/Component/Serializer/Tests/Annotation/ContextTest.php +++ b/src/Symfony/Component/Serializer/Tests/Annotation/ContextTest.php @@ -51,7 +51,7 @@ public function testThrowsOnEmptyContextLegacy(callable $factory) $factory(); } - public function provideTestThrowsOnEmptyContextLegacyData(): iterable + public static function provideTestThrowsOnEmptyContextLegacyData(): iterable { yield 'doctrine-style: value option as empty array' => [function () { new Context(['value' => []]); }]; yield 'doctrine-style: context option as empty array' => [function () { new Context(['context' => []]); }]; @@ -70,7 +70,7 @@ public function testThrowsOnNonArrayContext(array $options) new Context($options); } - public function provideTestThrowsOnNonArrayContextData(): iterable + public static function provideTestThrowsOnNonArrayContextData(): iterable { yield 'non-array context' => [['context' => 'not_an_array']]; yield 'non-array normalization context' => [['normalizationContext' => 'not_an_array']]; @@ -136,7 +136,7 @@ public function testValidInputs(callable $factory, string $expectedDump) $this->assertDumpEquals($expectedDump, $factory()); } - public function provideValidInputs(): iterable + public static function provideValidInputs(): iterable { yield 'named arguments: with context option' => [ function () { return new Context(...['context' => ['foo' => 'bar']]); }, @@ -224,7 +224,7 @@ public function testValidLegacyInputs(callable $factory, string $expectedDump) $this->assertDumpEquals($expectedDump, $factory()); } - public function provideValidLegacyInputs(): iterable + public static function provideValidLegacyInputs(): iterable { yield 'doctrine-style: with context option' => [ function () { return new Context(['context' => ['foo' => 'bar']]); }, diff --git a/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php b/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php index 3d3355e16ae41..e1a7c1ca3323b 100644 --- a/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php +++ b/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php @@ -33,7 +33,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 8ea70a67444a1..2a2ca2bbf3dc0 100644 --- a/src/Symfony/Component/Serializer/Tests/Annotation/SerializedNameTest.php +++ b/src/Symfony/Component/Serializer/Tests/Annotation/SerializedNameTest.php @@ -33,7 +33,7 @@ public function testNotSetSerializedNameParameter() new SerializedName([]); } - public function provideInvalidValues(): array + public static function provideInvalidValues(): array { 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..62045972dbe68 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'; @@ -65,7 +65,7 @@ public function testDecodeWithException($value) $this->decode->decode($value, JsonEncoder::FORMAT); } - public function decodeProviderException() + public static function decodeProviderException() { return [ ["{'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/Mapping/Factory/CompiledClassMetadataFactoryTest.php b/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CompiledClassMetadataFactoryTest.php index 13e766af72e45..d82431a8adec3 100644 --- a/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CompiledClassMetadataFactoryTest.php +++ b/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CompiledClassMetadataFactoryTest.php @@ -128,7 +128,7 @@ public function testItDelegatesHasMetadataForCall() $this->assertTrue($compiledClassMetadataFactory->hasMetadataFor(SerializedNameDummy::class)); } - public function valueProvider() + public static function valueProvider() { return [ [Dummy::class], 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 119edfbfb954d..e0c2d4fafabb6 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(): array + public static function attributeProvider(): array { return [ ['foo', 'baz'], @@ -107,7 +107,7 @@ public function attributeProvider(): array ]; } - public function fallbackAttributeProvider(): array + public static function fallbackAttributeProvider(): array { 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/AbstractNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php index ee305403837c2..822b21dd5e411 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php @@ -201,7 +201,7 @@ public function testObjectWithVariadicConstructorTypedArguments(AbstractNormaliz } } - public function getNormalizer() + public static function getNormalizer() { $extractor = new PhpDocExtractor(); diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ConstraintViolationListNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ConstraintViolationListNormalizerTest.php index d558c126c5b44..4dd1779489c81 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/ConstraintViolationListNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ConstraintViolationListNormalizerTest.php @@ -128,7 +128,7 @@ public function testNormalizePayloadFields($fields, array $expected = null) $this->assertSame($expected, $violation['payload']); } - public function payloadFieldsProvider(): iterable + public static function payloadFieldsProvider(): iterable { yield [['severity', 'anotherField1'], ['severity' => 'warning']]; yield [null, ['severity' => 'warning', 'anotherField2' => 'aValue']]; 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/DateIntervalNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php index 36779e544bced..cfe8c573c9c50 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php @@ -31,7 +31,7 @@ protected function setUp(): void $this->normalizer = new DateIntervalNormalizer(); } - public function dataProviderISO() + public static function dataProviderISO() { $data = [ ['P%YY%MM%DDT%HH%IM%SS', 'P00Y00M00DT00H00M00S', 'PT0S'], diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php index 85122918faf36..8f368deca68b3 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php @@ -73,7 +73,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')]; @@ -99,7 +99,7 @@ public function testNormalizeUsingTimeZonePassedInContextAndFormattedWithMicrose ); } - public function normalizeUsingTimeZonePassedInContextAndExpectedFormatWithMicrosecondsProvider() + public static function normalizeUsingTimeZonePassedInContextAndExpectedFormatWithMicrosecondsProvider() { yield [ '2018-12-01T18:03:06.067634', @@ -211,7 +211,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/UidNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/UidNormalizerTest.php index 643e1f809abb9..72e6b64c345a4 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/UidNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/UidNormalizerTest.php @@ -46,7 +46,7 @@ public function testSupportsNormalization() $this->assertFalse($this->normalizer->supportsNormalization(new \stdClass())); } - public function normalizeProvider() + public static function normalizeProvider() { $uidFormats = [null, 'canonical', 'base58', 'base32', 'rfc4122']; $data = [ @@ -117,7 +117,7 @@ public function testNormalize(string $expected, AbstractUid $uid, ?string $uidFo ] : [])); } - public function dataProvider() + public static function dataProvider() { return [ ['9b7541de-6f87-11ea-ab3c-9da9a81562fc', UuidV1::class], diff --git a/src/Symfony/Component/Serializer/Tests/SerializerTest.php b/src/Symfony/Component/Serializer/Tests/SerializerTest.php index b2a33cbc0e5db..957330faa3e39 100644 --- a/src/Symfony/Component/Serializer/Tests/SerializerTest.php +++ b/src/Symfony/Component/Serializer/Tests/SerializerTest.php @@ -550,7 +550,7 @@ public function testNormalizeTransformEmptyArrayObjectToArray() $this->assertSame('{"foo":[],"bar":["notempty"],"baz":{"nested":[]},"a":{"nested":[]},"b":[]}', $serializer->serialize($object, 'json')); } - public function provideObjectOrCollectionTests() + public static function provideObjectOrCollectionTests() { $serializer = new Serializer( [ @@ -1238,7 +1238,7 @@ public function testNoCollectDenormalizationErrorsWithWrongEnum() } } - public function provideCollectDenormalizationErrors() + public static function provideCollectDenormalizationErrors() { return [ [null], 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/String/Tests/AbstractAsciiTestCase.php b/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php index a0cf2068f9476..d25fbdee57b6f 100644 --- a/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php +++ b/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php @@ -110,7 +110,7 @@ public function testWordwrap($expected, $actual, $length, $break, $cut = false) $this->assertEquals($expected, $actual); } - public function wordwrapProvider() + public static function wordwrapProvider() { return [ [ diff --git a/src/Symfony/Component/String/Tests/FunctionsTest.php b/src/Symfony/Component/String/Tests/FunctionsTest.php index a721d8591aa03..6a69106553d19 100644 --- a/src/Symfony/Component/String/Tests/FunctionsTest.php +++ b/src/Symfony/Component/String/Tests/FunctionsTest.php @@ -30,7 +30,7 @@ public function testS(AbstractString $expected, ?string $input) $this->assertEquals($expected, s($input)); } - public function provideSStrings(): array + public static function provideSStrings(): array { return [ [new UnicodeString(''), ''], @@ -50,7 +50,7 @@ public function testU(UnicodeString $expected, ?string $input) $this->assertEquals($expected, u($input)); } - public function provideUStrings(): array + public static function provideUStrings(): array { return [ [new UnicodeString(''), ''], @@ -68,7 +68,7 @@ public function testB(ByteString $expected, ?string $input) $this->assertEquals($expected, b($input)); } - public function provideBStrings(): array + public static function provideBStrings(): array { return [ [new ByteString(''), ''], diff --git a/src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php b/src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php index face92d406897..afe3b63911d39 100644 --- a/src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php +++ b/src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php @@ -16,7 +16,7 @@ class EnglishInflectorTest 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 @@ -166,7 +166,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/String/Tests/Inflector/FrenchInflectorTest.php b/src/Symfony/Component/String/Tests/Inflector/FrenchInflectorTest.php index 1d5bdac2c9e4f..530b0279a7a9e 100644 --- a/src/Symfony/Component/String/Tests/Inflector/FrenchInflectorTest.php +++ b/src/Symfony/Component/String/Tests/Inflector/FrenchInflectorTest.php @@ -16,7 +16,7 @@ class FrenchInflectorTest extends TestCase { - public function pluralizeProvider() + public static function pluralizeProvider() { return [ // Le pluriel par défaut diff --git a/src/Symfony/Component/String/Tests/Slugger/AsciiSluggerTest.php b/src/Symfony/Component/String/Tests/Slugger/AsciiSluggerTest.php index d58c002c40d99..89b5887a4099f 100644 --- a/src/Symfony/Component/String/Tests/Slugger/AsciiSluggerTest.php +++ b/src/Symfony/Component/String/Tests/Slugger/AsciiSluggerTest.php @@ -16,7 +16,7 @@ class AsciiSluggerTest extends TestCase { - public function provideSlugTests(): iterable + public static function provideSlugTests(): iterable { yield ['', '']; yield ['foo', ' foo ']; diff --git a/src/Symfony/Component/Templating/Tests/PhpEngineTest.php b/src/Symfony/Component/Templating/Tests/PhpEngineTest.php index c6676fcde5676..7948e8578f42a 100644 --- a/src/Symfony/Component/Templating/Tests/PhpEngineTest.php +++ b/src/Symfony/Component/Templating/Tests/PhpEngineTest.php @@ -135,7 +135,7 @@ public function testRenderForbiddenParameter($name) $engine->render('foo.php', [$name => 'foo']); } - public function forbiddenParameterNames() + public static function forbiddenParameterNames() { return [ ['this'], 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/TranslationPullCommandTest.php b/src/Symfony/Component/Translation/Tests/Command/TranslationPullCommandTest.php index c002fc7532b1f..7ae435afbeb6a 100644 --- a/src/Symfony/Component/Translation/Tests/Command/TranslationPullCommandTest.php +++ b/src/Symfony/Component/Translation/Tests/Command/TranslationPullCommandTest.php @@ -614,7 +614,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions(): \Generator + public static function provideCompletionSuggestions(): \Generator { yield 'provider' => [ [''], diff --git a/src/Symfony/Component/Translation/Tests/Command/TranslationPushCommandTest.php b/src/Symfony/Component/Translation/Tests/Command/TranslationPushCommandTest.php index 9fcd0d77b183b..b174c5c0cfaa4 100644 --- a/src/Symfony/Component/Translation/Tests/Command/TranslationPushCommandTest.php +++ b/src/Symfony/Component/Translation/Tests/Command/TranslationPushCommandTest.php @@ -340,7 +340,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions(): \Generator + public static function provideCompletionSuggestions(): \Generator { yield 'provider' => [ [''], diff --git a/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php b/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php index 3c98c2055a4d7..3b9dca6d18340 100644 --- a/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php +++ b/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php @@ -240,7 +240,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]; @@ -262,7 +262,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $tester->complete($input)); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'option' => [['--format', ''], ['txt', 'json', 'github']]; } diff --git a/src/Symfony/Component/Translation/Tests/Exception/UnsupportedSchemeExceptionTest.php b/src/Symfony/Component/Translation/Tests/Exception/UnsupportedSchemeExceptionTest.php index 5fa018d8090a1..2eb022ec4bbaf 100644 --- a/src/Symfony/Component/Translation/Tests/Exception/UnsupportedSchemeExceptionTest.php +++ b/src/Symfony/Component/Translation/Tests/Exception/UnsupportedSchemeExceptionTest.php @@ -47,7 +47,7 @@ public function testMessageWhereSchemeIsPartOfSchemeToPackageMap(string $scheme, ); } - public function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \Generator + public static function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \Generator { yield ['crowdin', 'symfony/crowdin-translation-provider']; yield ['loco', 'symfony/loco-translation-provider']; @@ -65,7 +65,7 @@ public function testMessageWhereSchemeIsNotPartOfSchemeToPackageMap(string $expe ); } - public function messageWhereSchemeIsNotPartOfSchemeToPackageMapProvider(): \Generator + public static function messageWhereSchemeIsNotPartOfSchemeToPackageMapProvider(): \Generator { yield [ 'The "somethingElse" scheme is not supported.', diff --git a/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php b/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php index 82ddfe0e8aeac..5a84fb6f53974 100644 --- a/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php +++ b/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php @@ -151,7 +151,7 @@ public function testExtractionFromIndentedHeredocNowdoc() $this->assertEquals($expectedCatalogue, $catalogue->all()); } - public function resourcesProvider() + public static function resourcesProvider() { $directory = __DIR__.'/../fixtures/extractor/'; $phpFiles = []; 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/Translation/Tests/Formatter/MessageFormatterTest.php b/src/Symfony/Component/Translation/Tests/Formatter/MessageFormatterTest.php index 6e25eed3fe032..46e0e09c3579b 100644 --- a/src/Symfony/Component/Translation/Tests/Formatter/MessageFormatterTest.php +++ b/src/Symfony/Component/Translation/Tests/Formatter/MessageFormatterTest.php @@ -24,7 +24,7 @@ public function testFormat($expected, $message, $parameters = []) $this->assertEquals($expected, $this->getMessageFormatter()->format($message, 'en', $parameters)); } - public function getTransMessages() + public static function getTransMessages() { return [ [ diff --git a/src/Symfony/Component/Translation/Tests/Provider/DsnTest.php b/src/Symfony/Component/Translation/Tests/Provider/DsnTest.php index 99e3a60386f16..6240e7c4e6e95 100644 --- a/src/Symfony/Component/Translation/Tests/Provider/DsnTest.php +++ b/src/Symfony/Component/Translation/Tests/Provider/DsnTest.php @@ -35,7 +35,7 @@ public function testConstruct(string $dsnString, string $scheme, string $host, s $this->assertSame($options, $dsn->getOptions()); } - public function constructProvider(): iterable + public static function constructProvider(): iterable { yield 'simple dsn' => [ 'scheme://localhost', @@ -151,7 +151,7 @@ public function testInvalidDsn(string $dsnString, string $exceptionMessage) new Dsn($dsnString); } - public function invalidDsnProvider(): iterable + public static function invalidDsnProvider(): iterable { yield [ 'some://', @@ -179,7 +179,7 @@ public function testGetOption($expected, string $dsnString, string $option, stri $this->assertSame($expected, $dsn->getOption($option, $default)); } - public function getOptionProvider(): iterable + public static function getOptionProvider(): iterable { yield [ 'foo', @@ -217,7 +217,7 @@ public function testGetRequiredOption(string $expectedValue, string $options, st $this->assertSame($expectedValue, $dsn->getRequiredOption($option)); } - public function getRequiredOptionProvider(): iterable + public static function getRequiredOptionProvider(): iterable { yield [ 'value', @@ -245,7 +245,7 @@ public function testGetRequiredOptionThrowsMissingRequiredOptionException(string $dsn->getRequiredOption($option); } - public function getRequiredOptionThrowsMissingRequiredOptionExceptionProvider(): iterable + public static function getRequiredOptionThrowsMissingRequiredOptionExceptionProvider(): iterable { yield [ 'The option "foo_bar" is required but missing.', diff --git a/src/Symfony/Component/Translation/Tests/TranslatableTest.php b/src/Symfony/Component/Translation/Tests/TranslatableTest.php index 914cf6429b581..ce08c8ae1a8b3 100644 --- a/src/Symfony/Component/Translation/Tests/TranslatableTest.php +++ b/src/Symfony/Component/Translation/Tests/TranslatableTest.php @@ -47,7 +47,7 @@ public function testToString() $this->assertSame('Symfony is great!', (string) new TranslatableMessage('Symfony is great!')); } - public function getTransTests() + public static function getTransTests() { return [ ['Symfony est super !', new TranslatableMessage('Symfony is great!', [], ''), [ @@ -63,7 +63,7 @@ public function getTransTests() ]; } - public function getFlattenedTransTests() + public static function getFlattenedTransTests() { $messages = [ 'symfony' => [ diff --git a/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php b/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php index 3720aeb74e047..596b8d4afa982 100644 --- a/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php +++ b/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php @@ -302,7 +302,7 @@ protected function getCatalogue($locale, $messages, $resources = []) return $catalogue; } - public function runForDebugAndProduction() + public static function runForDebugAndProduction() { return [[true], [false]]; } diff --git a/src/Symfony/Component/Translation/Tests/TranslatorTest.php b/src/Symfony/Component/Translation/Tests/TranslatorTest.php index ea8248cb64c8f..38821eda653f8 100644 --- a/src/Symfony/Component/Translation/Tests/TranslatorTest.php +++ b/src/Symfony/Component/Translation/Tests/TranslatorTest.php @@ -301,7 +301,7 @@ public function testTransWithFallbackLocaleBis($expectedLocale, $locale) $this->assertEquals('foobar', $translator->trans('bar')); } - public function getFallbackLocales() + public static function getFallbackLocales() { $locales = [ ['en', 'en_US'], @@ -456,7 +456,7 @@ public function testTransNullId() }, $this, Translator::class))(); } - public function getTransFileTests() + public static function getTransFileTests() { return [ ['csv', 'CsvFileLoader'], @@ -471,7 +471,7 @@ public function getTransFileTests() ]; } - public function getTransTests() + public static function getTransTests() { return [ ['Symfony est super !', 'Symfony is great!', 'Symfony est super !', [], 'fr', ''], @@ -481,7 +481,7 @@ public function getTransTests() ]; } - public function getTransICUTests() + public static function getTransICUTests() { $id = '{apples, plural, =0 {There are no apples} one {There is one apple} other {There are # apples}}'; @@ -492,7 +492,7 @@ public function getTransICUTests() ]; } - public function getFlattenedTransTests() + public static function getFlattenedTransTests() { $messages = [ 'symfony' => [ @@ -515,7 +515,7 @@ public function getFlattenedTransTests() ]; } - public function getInvalidLocalesTests() + public static function getInvalidLocalesTests() { return [ ['fr FR'], @@ -532,7 +532,7 @@ public function getInvalidLocalesTests() ]; } - public function getValidLocalesTests() + public static function getValidLocalesTests() { return [ [''], diff --git a/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php b/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php index b0335415e1b3d..8936ef1ae6926 100644 --- a/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php +++ b/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php @@ -24,7 +24,7 @@ public function testDump($input, $expectedOutput) $this->assertEquals($expectedOutput, ArrayConverter::expandToTree($input)); } - public function messagesData() + public static function messagesData() { return [ [ diff --git a/src/Symfony/Component/Uid/Tests/Command/GenerateUlidCommandTest.php b/src/Symfony/Component/Uid/Tests/Command/GenerateUlidCommandTest.php index 48814de9c72fb..d1116c0a8c9e6 100644 --- a/src/Symfony/Component/Uid/Tests/Command/GenerateUlidCommandTest.php +++ b/src/Symfony/Component/Uid/Tests/Command/GenerateUlidCommandTest.php @@ -119,7 +119,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions(): iterable + public static function provideCompletionSuggestions(): iterable { yield 'option --format' => [ ['--format', ''], diff --git a/src/Symfony/Component/Uid/Tests/Command/GenerateUuidCommandTest.php b/src/Symfony/Component/Uid/Tests/Command/GenerateUuidCommandTest.php index 65b9f87f7063a..a0ee281c243b6 100644 --- a/src/Symfony/Component/Uid/Tests/Command/GenerateUuidCommandTest.php +++ b/src/Symfony/Component/Uid/Tests/Command/GenerateUuidCommandTest.php @@ -132,7 +132,7 @@ public function testInvalidCombinationOfBasedOptions(array $input) $this->assertStringContainsString('Only one of "--time-based", "--name-based" or "--random-based"', $commandTester->getDisplay()); } - public function provideInvalidCombinationOfBasedOptions() + public static function provideInvalidCombinationOfBasedOptions() { return [ [['--time-based' => 'now', '--name-based' => 'foo']], @@ -153,7 +153,7 @@ public function testExtraNodeOption(array $input) $this->assertStringContainsString('Option "--node" can only be used with "--time-based"', $commandTester->getDisplay()); } - public function provideExtraNodeOption() + public static function provideExtraNodeOption() { return [ [['--node' => 'foo']], @@ -173,7 +173,7 @@ public function testExtraNamespaceOption(array $input) $this->assertStringContainsString('Option "--namespace" can only be used with "--name-based"', $commandTester->getDisplay()); } - public function provideExtraNamespaceOption() + public static function provideExtraNamespaceOption() { return [ [['--namespace' => 'foo']], @@ -248,7 +248,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $suggestions); } - public function provideCompletionSuggestions(): iterable + public static function provideCompletionSuggestions(): iterable { yield 'option --format' => [ ['--format', ''], diff --git a/src/Symfony/Component/Uid/Tests/UlidTest.php b/src/Symfony/Component/Uid/Tests/UlidTest.php index 50801a840c326..27f06645fccb2 100644 --- a/src/Symfony/Component/Uid/Tests/UlidTest.php +++ b/src/Symfony/Component/Uid/Tests/UlidTest.php @@ -149,7 +149,7 @@ public function testFromBinaryInvalidFormat(string $ulid) Ulid::fromBinary($ulid); } - public function provideInvalidBinaryFormat() + public static function provideInvalidBinaryFormat() { return [ ['01EW2RYKDCT2SAK454KBR2QG08'], @@ -176,7 +176,7 @@ public function testFromBase58InvalidFormat(string $ulid) Ulid::fromBase58($ulid); } - public function provideInvalidBase58Format() + public static function provideInvalidBase58Format() { return [ ["\x01\x77\x05\x8F\x4D\xAC\xD0\xB2\xA9\x90\xA4\x9A\xF0\x2B\xC0\x08"], @@ -203,7 +203,7 @@ public function testFromBase32InvalidFormat(string $ulid) Ulid::fromBase32($ulid); } - public function provideInvalidBase32Format() + public static function provideInvalidBase32Format() { return [ ["\x01\x77\x05\x8F\x4D\xAC\xD0\xB2\xA9\x90\xA4\x9A\xF0\x2B\xC0\x08"], @@ -230,7 +230,7 @@ public function testFromRfc4122InvalidFormat(string $ulid) Ulid::fromRfc4122($ulid); } - public function provideInvalidRfc4122Format() + public static function provideInvalidRfc4122Format() { return [ ["\x01\x77\x05\x8F\x4D\xAC\xD0\xB2\xA9\x90\xA4\x9A\xF0\x2B\xC0\x08"], diff --git a/src/Symfony/Component/Uid/Tests/UuidTest.php b/src/Symfony/Component/Uid/Tests/UuidTest.php index 8e73eb0d2d057..dbf5ea03c1375 100644 --- a/src/Symfony/Component/Uid/Tests/UuidTest.php +++ b/src/Symfony/Component/Uid/Tests/UuidTest.php @@ -38,7 +38,7 @@ public function testConstructorWithInvalidUuid(string $uuid) Uuid::fromString($uuid); } - public function provideInvalidUuids(): iterable + public static function provideInvalidUuids(): iterable { yield ['this is not a uuid']; yield ['these are just thirty-six characters']; @@ -61,7 +61,7 @@ public function testInvalidVariant(string $uuid) new $class($uuid); } - public function provideInvalidVariant(): iterable + public static function provideInvalidVariant(): iterable { yield ['8dac64d3-937a-1e7c-fa1d-d5d6c06a61f5']; yield ['8dac64d3-937a-3e7c-fa1d-d5d6c06a61f5']; @@ -206,7 +206,7 @@ public function testEqualsAgainstOtherType($other) $this->assertFalse((new UuidV4(self::A_UUID_V4))->equals($other)); } - public function provideInvalidEqualType() + public static function provideInvalidEqualType() { yield [null]; yield [self::A_UUID_V1]; @@ -268,7 +268,7 @@ public function testFromBinaryInvalidFormat(string $ulid) Uuid::fromBinary($ulid); } - public function provideInvalidBinaryFormat() + public static function provideInvalidBinaryFormat() { return [ ['01EW2RYKDCT2SAK454KBR2QG08'], @@ -295,7 +295,7 @@ public function testFromBase58InvalidFormat(string $ulid) Uuid::fromBase58($ulid); } - public function provideInvalidBase58Format() + public static function provideInvalidBase58Format() { return [ ["\x41\x4C\x08\x92\x57\x1B\x11\xEB\xBF\x70\x93\xF9\xB0\x82\x2C\x57"], @@ -322,7 +322,7 @@ public function testFromBase32InvalidFormat(string $ulid) Uuid::fromBase32($ulid); } - public function provideInvalidBase32Format() + public static function provideInvalidBase32Format() { return [ ["\x5B\xA8\x32\x72\x45\x6D\x5A\xC0\xAB\xE3\xAA\x8B\xF7\x01\x96\x73"], @@ -349,7 +349,7 @@ public function testFromRfc4122InvalidFormat(string $ulid) Uuid::fromRfc4122($ulid); } - public function provideInvalidRfc4122Format() + public static function provideInvalidRfc4122Format() { return [ ["\x1E\xB5\x71\xB4\x14\xC0\x68\x93\xBF\x70\x2D\x4C\x83\xCF\x75\x5A"], 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 effaab06d33c2..3aabf7a2137f6 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/AllValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php index 0daa82498af19..ff884d43a6714 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php @@ -77,7 +77,7 @@ public function testWalkMultipleConstraints($array) $this->assertNoViolation(); } - public function getValidArguments() + public static function getValidArguments() { return [ [[5, 6, 7]], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php index 0fb735a84cdb2..3685a67b65dea 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php @@ -56,7 +56,7 @@ public function testValidCombinations($value, $constraints) $this->assertCount(0, Validation::createValidator()->validate($value, new AtLeastOneOf($constraints))); } - public function getValidCombinations() + public static function getValidCombinations() { return [ ['symfony', [ @@ -125,7 +125,7 @@ public function testInvalidCombinationsWithCustomMessage($value, $constraints) $this->assertEquals(new ConstraintViolation('foo', 'foo', [], $value, '', $value, null, AtLeastOneOf::AT_LEAST_ONE_OF_ERROR, $atLeastOneOf), $violations->get(0)); } - public function getInvalidCombinations() + public static function getInvalidCombinations() { return [ ['symphony', [ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php index 20c9d7c54681a..97239ab71a310 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php @@ -197,7 +197,7 @@ public function testValidBics($bic) $this->assertNoViolation(); } - public function getValidBics() + public static function getValidBics() { // http://formvalidation.io/validators/bic/ return [ @@ -243,7 +243,7 @@ public function testInvalidBicsNamed($bic, $code) ->assertRaised(); } - public function getInvalidBics() + public static function getInvalidBics() { return [ ['DEUTD', Bic::INVALID_LENGTH_ERROR], @@ -287,7 +287,7 @@ public function testValidBicSpecialCases(string $bic, string $iban) $this->assertNoViolation(); } - public function getValidBicSpecialCases() + public static function getValidBicSpecialCases() { // FR related special cases yield ['BNPAGFGX', 'FR14 2004 1010 0505 0001 3M02 606']; diff --git a/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php index 1d138348a9e7b..95f5bc8f7846d 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php @@ -53,7 +53,7 @@ public function testInvalidValues($value, $valueAsString) ->assertRaised(); } - public function getInvalidValues() + public static function getInvalidValues() { return [ ['foobar', '"foobar"'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php index 100a3811b00ff..dcb40c9e7383b 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php @@ -90,7 +90,7 @@ public function testInvalidNumberNamedArguments() ->assertRaised(); } - public function getValidNumbers() + public static function getValidNumbers() { return [ ['AMEX', '378282246310005'], @@ -145,7 +145,7 @@ public function getValidNumbers() ]; } - public function getInvalidNumbers() + public static function getInvalidNumbers() { return [ ['VISA', '42424242424242424242', CardScheme::INVALID_FORMAT_ERROR], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php index 262e8654f043b..5c3bcc4720353 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php @@ -84,7 +84,7 @@ public function testValidChoiceArray(Choice $constraint) $this->assertNoViolation(); } - public function provideConstraintsWithChoicesArray(): iterable + public static function provideConstraintsWithChoicesArray(): iterable { yield 'Doctrine style' => [new Choice(['choices' => ['foo', 'bar']])]; yield 'Doctrine default option' => [new Choice(['value' => ['foo', 'bar']])]; @@ -105,7 +105,7 @@ public function testValidChoiceCallbackFunction(Choice $constraint) $this->assertNoViolation(); } - public function provideConstraintsWithCallbackFunction(): iterable + public static function provideConstraintsWithCallbackFunction(): iterable { yield 'doctrine style, namespaced function' => [new Choice(['callback' => __NAMESPACE__.'\choice_callback'])]; yield 'doctrine style, closure' => [new Choice([ @@ -156,7 +156,7 @@ public function testMultipleChoices(Choice $constraint) $this->assertNoViolation(); } - public function provideConstraintsWithMultipleTrue(): iterable + public static function provideConstraintsWithMultipleTrue(): iterable { yield 'Doctrine style' => [new Choice([ 'choices' => ['foo', 'bar', 'baz'], @@ -185,7 +185,7 @@ public function testInvalidChoice(Choice $constraint) ->assertRaised(); } - public function provideConstraintsWithMessage(): iterable + public static function provideConstraintsWithMessage(): iterable { yield 'Doctrine style' => [new Choice(['choices' => ['foo', 'bar'], 'message' => 'myMessage'])]; @@ -227,7 +227,7 @@ public function testInvalidChoiceMultiple(Choice $constraint) ->assertRaised(); } - public function provideConstraintsWithMultipleMessage(): iterable + public static function provideConstraintsWithMultipleMessage(): iterable { yield 'Doctrine style' => [new Choice([ 'choices' => ['foo', 'bar'], @@ -263,7 +263,7 @@ public function testTooFewChoices(Choice $constraint) ->assertRaised(); } - public function provideConstraintsWithMin(): iterable + public static function provideConstraintsWithMin(): iterable { yield 'Doctrine style' => [new Choice([ 'choices' => ['foo', 'bar', 'moo', 'maa'], @@ -301,7 +301,7 @@ public function testTooManyChoices(Choice $constraint) ->assertRaised(); } - public function provideConstraintsWithMax(): iterable + public static function provideConstraintsWithMax(): iterable { yield 'Doctrine style' => [new Choice([ 'choices' => ['foo', 'bar', 'moo', 'maa'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CidrTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CidrTest.php index 571cdbf2758c9..dc41ae1f0f597 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/CidrTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/CidrTest.php @@ -90,7 +90,7 @@ public function testWithInvalidMinMaxValues(string $ipVersion, int $netmaskMin, ]); } - public function getInvalidMinMaxValues(): array + public static function getInvalidMinMaxValues(): array { return [ [Ip::ALL, -1, 23], @@ -108,7 +108,7 @@ public function getInvalidMinMaxValues(): array ]; } - public function getValidMinMaxValues(): array + public static function getValidMinMaxValues(): array { return [ [Ip::ALL, 0, 23], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CidrValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CidrValidatorTest.php index c522335a84b05..7c5745ee6942a 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/CidrValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/CidrValidatorTest.php @@ -135,7 +135,7 @@ public function testWrongVersion(string $cidr, string $version) ->assertRaised(); } - public function getWithInvalidIps(): array + public static function getWithInvalidIps(): array { return [ ['0/20'], @@ -164,7 +164,7 @@ public function getWithInvalidIps(): array ]; } - public function getValid(): array + public static function getValid(): array { return [ ['127.0.0.0/32', Ip::ALL], @@ -198,7 +198,7 @@ public function getValid(): array ]; } - public function getWithInvalidNetmask(): array + public static function getWithInvalidNetmask(): array { return [ ['192.168.1.0/-1'], @@ -217,7 +217,7 @@ public function getWithInvalidNetmask(): array ]; } - public function getWithInvalidMasksAndIps(): array + public static function getWithInvalidMasksAndIps(): array { return [ ['0.0.0.0/foobar'], @@ -236,7 +236,7 @@ public function getWithInvalidMasksAndIps(): array ]; } - public function getOutOfRangeNetmask(): array + public static function getOutOfRangeNetmask(): array { return [ ['10.0.0.0/24', Ip::V4, 10, 20], @@ -244,7 +244,7 @@ public function getOutOfRangeNetmask(): array ]; } - public function getWithWrongVersion(): array + public static function getWithWrongVersion(): array { return [ ['2001:0db8:85a3:0000:0000:8a2e:0370:7334/12', Ip::V4], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php index 71cb41c46564d..be80a9e63dba8 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php @@ -70,7 +70,7 @@ public function testValidCountries($country) $this->assertNoViolation(); } - public function getValidCountries() + public static function getValidCountries() { return [ ['GB'], @@ -96,7 +96,7 @@ public function testInvalidCountries($country) ->assertRaised(); } - public function getInvalidCountries() + public static function getInvalidCountries() { return [ ['foobar'], @@ -116,7 +116,7 @@ public function testValidAlpha3Countries($country) $this->assertNoViolation(); } - public function getValidAlpha3Countries() + public static function getValidAlpha3Countries() { return [ ['GBR'], @@ -143,7 +143,7 @@ public function testInvalidAlpha3Countries($country) ->assertRaised(); } - public function getInvalidAlpha3Countries() + public static function getInvalidAlpha3Countries() { return [ ['foobar'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CssColorValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CssColorValidatorTest.php index 6a9b398ac57a1..95b0b6f29ea34 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/CssColorValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/CssColorValidatorTest.php @@ -52,7 +52,7 @@ public function testValidAnyColor($cssColor) $this->assertNoViolation(); } - public function getValidAnyColor(): array + public static function getValidAnyColor(): array { return [ ['#ABCDEF'], @@ -79,7 +79,7 @@ public function testValidHexLongColors($cssColor) $this->assertNoViolation(); } - public function getValidHexLongColors(): array + public static function getValidHexLongColors(): array { return [['#ABCDEF'], ['#abcdef'], ['#C0FFEE'], ['#c0ffee'], ['#501311']]; } @@ -93,7 +93,7 @@ public function testValidHexLongColorsWithAlpha($cssColor) $this->assertNoViolation(); } - public function getValidHexLongColorsWithAlpha(): array + public static function getValidHexLongColorsWithAlpha(): array { return [['#ABCDEF00'], ['#abcdef01'], ['#C0FFEE02'], ['#c0ffee03'], ['#501311FF']]; } @@ -107,7 +107,7 @@ public function testValidHexShortColors($cssColor) $this->assertNoViolation(); } - public function getValidHexShortColors(): array + public static function getValidHexShortColors(): array { return [['#F4B'], ['#FAB'], ['#f4b'], ['#fab']]; } @@ -121,7 +121,7 @@ public function testValidHexShortColorsWithAlpha($cssColor) $this->assertNoViolation(); } - public function getValidHexShortColorsWithAlpha(): array + public static function getValidHexShortColorsWithAlpha(): array { return [['#F4B1'], ['#FAB1'], ['#f4b1'], ['#fab1']]; } @@ -135,7 +135,7 @@ public function testValidBasicNamedColors($cssColor) $this->assertNoViolation(); } - public function getValidBasicNamedColors(): array + public static function getValidBasicNamedColors(): array { return [ ['black'], ['silver'], ['gray'], ['white'], ['maroon'], ['red'], ['purple'], ['fuchsia'], ['green'], ['lime'], ['olive'], ['yellow'], ['navy'], ['blue'], ['teal'], ['aqua'], @@ -152,7 +152,7 @@ public function testValidExtendedNamedColors($cssColor) $this->assertNoViolation(); } - public function getValidExtendedNamedColors(): array + public static function getValidExtendedNamedColors(): array { return [ ['aliceblue'], ['antiquewhite'], ['aqua'], ['aquamarine'], ['azure'], ['beige'], ['bisque'], ['black'], ['blanchedalmond'], ['blue'], ['blueviolet'], ['brown'], ['burlywood'], ['cadetblue'], ['chartreuse'], ['chocolate'], ['coral'], ['cornflowerblue'], ['cornsilk'], ['crimson'], ['cyan'], ['darkblue'], ['darkcyan'], ['darkgoldenrod'], ['darkgray'], ['darkgreen'], ['darkgrey'], ['darkkhaki'], ['darkmagenta'], ['darkolivegreen'], ['darkorange'], ['darkorchid'], ['darkred'], ['darksalmon'], ['darkseagreen'], ['darkslateblue'], ['darkslategray'], ['darkslategrey'], ['darkturquoise'], ['darkviolet'], ['deeppink'], ['deepskyblue'], ['dimgray'], ['dimgrey'], ['dodgerblue'], ['firebrick'], ['floralwhite'], ['forestgreen'], ['fuchsia'], ['gainsboro'], ['ghostwhite'], ['gold'], ['goldenrod'], ['gray'], ['green'], ['greenyellow'], ['grey'], ['honeydew'], ['hotpink'], ['indianred'], ['indigo'], ['ivory'], ['khaki'], ['lavender'], ['lavenderblush'], ['lawngreen'], ['lemonchiffon'], ['lightblue'], ['lightcoral'], ['lightcyan'], ['lightgoldenrodyellow'], ['lightgray'], ['lightgreen'], ['lightgrey'], ['lightpink'], ['lightsalmon'], ['lightseagreen'], ['lightskyblue'], ['lightslategray'], ['lightslategrey'], ['lightsteelblue'], ['lightyellow'], ['lime'], ['limegreen'], ['linen'], ['magenta'], ['maroon'], ['mediumaquamarine'], ['mediumblue'], ['mediumorchid'], ['mediumpurple'], ['mediumseagreen'], ['mediumslateblue'], ['mediumspringgreen'], ['mediumturquoise'], ['mediumvioletred'], ['midnightblue'], ['mintcream'], ['mistyrose'], ['moccasin'], ['navajowhite'], ['navy'], ['oldlace'], ['olive'], ['olivedrab'], ['orange'], ['orangered'], ['orchid'], ['palegoldenrod'], ['palegreen'], ['paleturquoise'], ['palevioletred'], ['papayawhip'], ['peachpuff'], ['peru'], ['pink'], ['plum'], ['powderblue'], ['purple'], ['red'], ['rosybrown'], ['royalblue'], ['saddlebrown'], ['salmon'], ['sandybrown'], ['seagreen'], ['seashell'], ['sienna'], ['silver'], ['skyblue'], ['slateblue'], ['slategray'], ['slategrey'], ['snow'], ['springgreen'], ['steelblue'], ['tan'], ['teal'], ['thistle'], ['tomato'], ['turquoise'], ['violet'], ['wheat'], ['white'], ['whitesmoke'], ['yellow'], ['yellowgreen'], @@ -169,7 +169,7 @@ public function testValidSystemColors($cssColor) $this->assertNoViolation(); } - public function getValidSystemColors(): array + public static function getValidSystemColors(): array { return [ ['Canvas'], ['CanvasText'], ['LinkText'], ['VisitedText'], ['ActiveText'], ['ButtonFace'], ['ButtonText'], ['ButtonBorder'], ['Field'], ['FieldText'], ['Highlight'], ['HighlightText'], ['SelectedItem'], ['SelectedItemText'], ['Mark'], ['MarkText'], ['GrayText'], @@ -187,7 +187,7 @@ public function testValidKeywords($cssColor) $this->assertNoViolation(); } - public function getValidKeywords(): array + public static function getValidKeywords(): array { return [['transparent'], ['currentColor']]; } @@ -201,7 +201,7 @@ public function testValidRGB($cssColor) $this->assertNoViolation(); } - public function getValidRGB(): array + public static function getValidRGB(): array { return [ ['rgb(0, 255, 243)'], @@ -219,7 +219,7 @@ public function testValidRGBA($cssColor) $this->assertNoViolation(); } - public function getValidRGBA(): array + public static function getValidRGBA(): array { return [ ['rgba( 255, 255, 255, 0.3 )'], ['rgba(255, 255, 255, 0.3)'], ['rgba(255, 255, 255, .3)'], @@ -238,7 +238,7 @@ public function testValidHSL($cssColor) $this->assertNoViolation(); } - public function getValidHSL(): array + public static function getValidHSL(): array { return [ ['hsl(0, 0%, 20%)'], ['hsl( 0, 0%, 20% )'], @@ -256,7 +256,7 @@ public function testValidHSLA($cssColor) $this->assertNoViolation(); } - public function getValidHSLA(): array + public static function getValidHSLA(): array { return [ ['hsla( 0, 0%, 20%, 0.4 )'], ['hsla(0, 0%, 20%, 0.4)'], ['hsla(0, 0%, 20%, .4)'], @@ -280,7 +280,7 @@ public function testInvalidHexColors($cssColor) ->assertRaised(); } - public function getInvalidHexColors(): array + public static function getInvalidHexColors(): array { return [['ABCDEF'], ['abcdef'], ['#K0FFEE'], ['#k0ffee'], ['#_501311'], ['ABCDEF00'], ['abcdefcc'], ['#K0FFEE33'], ['#k0ffeecc'], ['#_50131100'], ['#FAℬ'], ['#Ⅎab'], ['#F4️⃣B'], ['#f(4)b'], ['#907;']]; } @@ -298,7 +298,7 @@ public function testInvalidShortHexColors($cssColor) ->assertRaised(); } - public function getInvalidShortHexColors(): array + public static function getInvalidShortHexColors(): array { return [['ABC'], ['ABCD'], ['abc'], ['abcd'], ['#K0F'], ['#K0FF'], ['#k0f'], ['#k0ff'], ['#_50'], ['#_501']]; } @@ -321,7 +321,7 @@ public function testInvalidNamedColors($cssColor) ->assertRaised(); } - public function getInvalidNamedColors(): array + public static function getInvalidNamedColors(): array { return [['fabpot'], ['ngrekas'], ['symfony'], ['FABPOT'], ['NGREKAS'], ['SYMFONY']]; } @@ -344,7 +344,7 @@ public function testInvalidRGB($cssColor) ->assertRaised(); } - public function getInvalidRGB(): array + public static function getInvalidRGB(): array { return [['rgb(999,999,999)'], ['rgb(-99,-99,-99)'], ['rgb(a,b,c)'], ['rgb(99 99, 9 99, 99 9)']]; } @@ -367,7 +367,7 @@ public function testInvalidRGBA($cssColor) ->assertRaised(); } - public function getInvalidRGBA(): array + public static function getInvalidRGBA(): array { return [['rgba(999,999,999,999)'], ['rgba(-99,-99,-99,-99)'], ['rgba(a,b,c,d)'], ['rgba(99 99, 9 99, 99 9, . 9)']]; } @@ -390,7 +390,7 @@ public function testInvalidHSL($cssColor) ->assertRaised(); } - public function getInvalidHSL(): array + public static function getInvalidHSL(): array { return [['hsl(1000, 1000%, 20000%)'], ['hsl(-100, -10%, -2%)'], ['hsl(a, b, c)'], ['hsl(a, b%, c%)'], ['hsl( 99 99% , 9 99% , 99 9%)']]; } diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php index dcca9e0ed7c54..6a0773ac6c43f 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php @@ -84,7 +84,7 @@ public function testValidCurrenciesWithCountrySpecificLocale($currency) $this->assertNoViolation(); } - public function getValidCurrencies() + public static function getValidCurrencies() { return [ ['EUR'], @@ -128,7 +128,7 @@ public function testInvalidCurrenciesNamed($currency) ->assertRaised(); } - public function getInvalidCurrencies() + public static function getInvalidCurrencies() { return [ ['EN'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php index aa956c1433931..4438d2f48e559 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php @@ -71,7 +71,7 @@ public function testValidDateTimes($format, $dateTime) $this->assertNoViolation(); } - public function getValidDateTimes() + public static function getValidDateTimes() { return [ ['Y-m-d H:i:s e', '1995-03-24 00:00:00 UTC'], @@ -100,7 +100,7 @@ public function testInvalidDateTimes($format, $dateTime, $code) ->assertRaised(); } - public function getInvalidDateTimes() + public static function getInvalidDateTimes() { return [ ['Y-m-d', 'foobar', DateTime::INVALID_FORMAT_ERROR], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php index af16525892c4c..b2e9fdf5e2f82 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php @@ -53,7 +53,7 @@ public function testValidDates($date) $this->assertNoViolation(); } - public function getValidDates() + public static function getValidDates() { return [ ['2010-01-01'], @@ -94,7 +94,7 @@ public function testInvalidDateNamed() ->assertRaised(); } - public function getInvalidDates() + public static function getInvalidDates() { return [ ['foobar', Date::INVALID_FORMAT_ERROR], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php index 0074d0a9f4a6d..ebcf9b8493af1 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php @@ -104,7 +104,7 @@ public function testThrowsOnNonNumericValues(string $expectedGivenType, $value, ])); } - public function throwsOnNonNumericValuesProvider() + public static function throwsOnNonNumericValuesProvider() { return [ [\stdClass::class, 2, new \stdClass()], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php index 3fff0c35d57f2..fa829e77b6764 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php @@ -70,7 +70,7 @@ public function testValidEmails($email) $this->assertNoViolation(); } - public function getValidEmails() + public static function getValidEmails() { return [ ['fabien@symfony.com'], @@ -94,7 +94,7 @@ public function testValidNormalizedEmails($email) $this->assertNoViolation(); } - public function getValidEmailsWithWhitespaces() + public static function getValidEmailsWithWhitespaces() { return [ ["\x20example@example.co.uk\x20"], @@ -116,7 +116,7 @@ public function testValidEmailsHtml5($email) $this->assertNoViolation(); } - public function getValidEmailsHtml5() + public static function getValidEmailsHtml5() { return [ ['fabien@symfony.com'], @@ -143,7 +143,7 @@ public function testInvalidEmails($email) ->assertRaised(); } - public function getInvalidEmails() + public static function getInvalidEmails() { return [ ['example'], @@ -171,7 +171,7 @@ public function testInvalidHtml5Emails($email) ->assertRaised(); } - public function getInvalidHtml5Emails() + public static function getInvalidHtml5Emails() { return [ ['example'], @@ -255,7 +255,7 @@ public function testStrictWithInvalidEmails($email) /** * @see https://github.com/egulias/EmailValidator/blob/1.2.8/tests/egulias/Tests/EmailValidator/EmailValidatorTest.php */ - public function getInvalidEmailsForStrictChecks() + public static function getInvalidEmailsForStrictChecks() { return [ ['test@example.com test'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionLanguageSyntaxTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionLanguageSyntaxTest.php index 1c57d56f0e6a6..3894269a9b90b 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionLanguageSyntaxTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionLanguageSyntaxTest.php @@ -34,7 +34,7 @@ public function testValidatedByService(ExpressionLanguageSyntax $constraint) self::assertSame('my_service', $constraint->validatedBy()); } - public function provideServiceValidatedConstraints(): iterable + public static function provideServiceValidatedConstraints(): iterable { yield 'Doctrine style' => [new ExpressionLanguageSyntax(['service' => 'my_service'])]; diff --git a/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php b/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php index 31227bb737c84..d12c1ad9651bd 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php @@ -86,7 +86,7 @@ public function testInvalidMaxSize($maxSize) new File(['maxSize' => $maxSize]); } - public function provideValidSizes() + public static function provideValidSizes() { return [ ['500', 500, false], @@ -106,7 +106,7 @@ public function provideValidSizes() ]; } - public function provideInvalidSizes() + public static function provideInvalidSizes() { return [ ['+100'], @@ -126,7 +126,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/FileValidatorTestCase.php b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTestCase.php index de58d6d877094..cd16f8b4b0682 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTestCase.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTestCase.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'], @@ -386,7 +386,7 @@ public function testInvalidMimeType(File $constraint) ->assertRaised(); } - public function provideMimeTypeConstraints(): iterable + public static function provideMimeTypeConstraints(): iterable { yield 'Doctrine style' => [new File([ 'mimeTypes' => ['image/png', 'image/jpg'], @@ -447,7 +447,7 @@ public function testDisallowEmpty(File $constraint) ->assertRaised(); } - public function provideDisallowEmptyConstraints(): iterable + public static function provideDisallowEmptyConstraints(): iterable { yield 'Doctrine style' => [new File([ 'disallowEmptyMessage' => 'myMessage', @@ -480,7 +480,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/HostnameValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/HostnameValidatorTest.php index 16c3121705115..4ac1970390683 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/HostnameValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/HostnameValidatorTest.php @@ -62,7 +62,7 @@ public function testValidTldDomainsPassValidationIfTldNotRequired($domain) $this->assertNoViolation(); } - public function getValidMultilevelDomains() + public static function getValidMultilevelDomains() { return [ ['symfony.com'], @@ -107,7 +107,7 @@ public function testInvalidDomainsRaiseViolationIfTldNotRequired($domain) ->assertRaised(); } - public function getInvalidDomains() + public static function getInvalidDomains() { return [ ['acme..com'], @@ -144,7 +144,7 @@ public function testReservedDomainsRaiseViolationIfTldRequired($domain) ->assertRaised(); } - public function getReservedDomains() + public static function getReservedDomains() { return [ ['example'], @@ -200,7 +200,7 @@ public function testTopLevelDomainsRaiseViolationIfTldRequired($domain) ->assertRaised(); } - public function getTopLevelDomains() + public static function getTopLevelDomains() { return [ ['com'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php index 6274a41cddbe6..257f47b03eab5 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php @@ -48,7 +48,7 @@ public function testValidIbans($iban) $this->assertNoViolation(); } - public function getValidIbans() + public static function getValidIbans() { return [ ['CH9300762011623852957'], // Switzerland without spaces @@ -170,7 +170,7 @@ public function testIbansWithInvalidFormat($iban) $this->assertViolationRaised($iban, Iban::INVALID_FORMAT_ERROR); } - public function getIbansWithInvalidFormat() + public static function getIbansWithInvalidFormat() { return [ ['AL47 2121 1009 0000 0002 3569 874'], // Albania @@ -289,7 +289,7 @@ public function testIbansWithValidFormatButIncorrectChecksum($iban) $this->assertViolationRaised($iban, Iban::CHECKSUM_FAILED_ERROR); } - public function getIbansWithValidFormatButIncorrectChecksum() + public static function getIbansWithValidFormatButIncorrectChecksum() { return [ ['AL47 2121 1009 0000 0002 3569 8742'], // Albania @@ -401,7 +401,7 @@ public function testIbansWithUnsupportedCountryCode($countryCode) $this->assertViolationRaised($countryCode.'260211000000230064016', Iban::NOT_SUPPORTED_COUNTRY_CODE_ERROR); } - public function getUnsupportedCountryCodes() + public static function getUnsupportedCountryCodes() { return [ ['AG'], @@ -443,7 +443,7 @@ public function testLoadFromAttribute() ->assertRaised(); } - public function getIbansWithInvalidCountryCode() + public static function getIbansWithInvalidCountryCode() { return [ ['0750447346'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php index b43e76559e709..862876a0b6ef5 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php @@ -91,7 +91,7 @@ public function testFileNotFound(Image $constraint) ->assertRaised(); } - public function provideConstraintsWithNotFoundMessage(): iterable + public static function provideConstraintsWithNotFoundMessage(): iterable { yield 'Doctrine style' => [new Image([ 'notFoundMessage' => 'myMessage', @@ -132,7 +132,7 @@ public function testWidthTooSmall(Image $constraint) ->assertRaised(); } - public function provideMinWidthConstraints(): iterable + public static function provideMinWidthConstraints(): iterable { yield 'Doctrine style' => [new Image([ 'minWidth' => 3, @@ -160,7 +160,7 @@ public function testWidthTooBig(Image $constraint) ->assertRaised(); } - public function provideMaxWidthConstraints(): iterable + public static function provideMaxWidthConstraints(): iterable { yield 'Doctrine style' => [new Image([ 'maxWidth' => 1, @@ -188,7 +188,7 @@ public function testHeightTooSmall(Image $constraint) ->assertRaised(); } - public function provideMinHeightConstraints(): iterable + public static function provideMinHeightConstraints(): iterable { yield 'Doctrine style' => [new Image([ 'minHeight' => 3, @@ -216,7 +216,7 @@ public function testHeightTooBig(Image $constraint) ->assertRaised(); } - public function provideMaxHeightConstraints(): iterable + public static function provideMaxHeightConstraints(): iterable { yield 'Doctrine style' => [new Image([ 'maxHeight' => 1, @@ -246,7 +246,7 @@ public function testPixelsTooFew(Image $constraint) ->assertRaised(); } - public function provideMinPixelsConstraints(): iterable + public static function provideMinPixelsConstraints(): iterable { yield 'Doctrine style' => [new Image([ 'minPixels' => 5, @@ -276,7 +276,7 @@ public function testPixelsTooMany(Image $constraint) ->assertRaised(); } - public function provideMaxPixelsConstraints(): iterable + public static function provideMaxPixelsConstraints(): iterable { yield 'Doctrine style' => [new Image([ 'maxPixels' => 3, @@ -364,7 +364,7 @@ public function testRatioTooSmall(Image $constraint) ->assertRaised(); } - public function provideMinRatioConstraints(): iterable + public static function provideMinRatioConstraints(): iterable { yield 'Doctrine style' => [new Image([ 'minRatio' => 2, @@ -392,7 +392,7 @@ public function testRatioTooBig(Image $constraint) ->assertRaised(); } - public function provideMaxRatioConstraints(): iterable + public static function provideMaxRatioConstraints(): iterable { yield 'Doctrine style' => [new Image([ 'maxRatio' => 0.5, @@ -473,7 +473,7 @@ public function testSquareNotAllowed(Image $constraint) ->assertRaised(); } - public function provideAllowSquareConstraints(): iterable + public static function provideAllowSquareConstraints(): iterable { yield 'Doctrine style' => [new Image([ 'allowSquare' => false, @@ -501,7 +501,7 @@ public function testLandscapeNotAllowed(Image $constraint) ->assertRaised(); } - public function provideAllowLandscapeConstraints(): iterable + public static function provideAllowLandscapeConstraints(): iterable { yield 'Doctrine style' => [new Image([ 'allowLandscape' => false, @@ -529,7 +529,7 @@ public function testPortraitNotAllowed(Image $constraint) ->assertRaised(); } - public function provideAllowPortraitConstraints(): iterable + public static function provideAllowPortraitConstraints(): iterable { yield 'Doctrine style' => [new Image([ 'allowPortrait' => false, @@ -578,7 +578,7 @@ public function testInvalidMimeType() ->assertRaised(); } - public function provideDetectCorruptedConstraints(): iterable + public static function provideDetectCorruptedConstraints(): iterable { yield 'Doctrine style' => [new Image([ 'detectCorrupted' => true, diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php index 1ec75dcb844e4..567ddfe99b838 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php @@ -49,7 +49,7 @@ public function testTrueIsInvalid(IsFalse $constraint) ->assertRaised(); } - public function provideInvalidConstraints(): iterable + public static function provideInvalidConstraints(): iterable { yield 'Doctrine style' => [new IsFalse([ 'message' => 'myMessage', diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php index f3128eb23e38e..875773eb621ee 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php @@ -62,7 +62,7 @@ public function testInvalidValuesNamed($value, $valueAsString) ->assertRaised(); } - public function getInvalidValues() + public static function getInvalidValues() { return [ [0, '0'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php index e12cbdde3f20b..81c6067eace92 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php @@ -49,7 +49,7 @@ public function testFalseIsInvalid(IsTrue $constraint) ->assertRaised(); } - public function provideInvalidConstraints(): iterable + public static function provideInvalidConstraints(): iterable { yield 'Doctrine style' => [new IsTrue([ 'message' => 'myMessage', diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IsinValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IsinValidatorTest.php index 9f19493937abc..44c55d9fc74ff 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/IsinValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/IsinValidatorTest.php @@ -47,7 +47,7 @@ public function testValidIsin($isin) $this->assertNoViolation(); } - public function getValidIsin() + public static function getValidIsin() { return [ ['XS2125535901'], // Goldman Sachs International @@ -71,7 +71,7 @@ public function testIsinWithInvalidFormat($isin) $this->assertViolationRaised($isin, Isin::INVALID_LENGTH_ERROR); } - public function getIsinWithInvalidLenghFormat() + public static function getIsinWithInvalidLenghFormat() { return [ ['X'], @@ -96,7 +96,7 @@ public function testIsinWithInvalidPattern($isin) $this->assertViolationRaised($isin, Isin::INVALID_PATTERN_ERROR); } - public function getIsinWithInvalidPattern() + public static function getIsinWithInvalidPattern() { return [ ['X12155696679'], @@ -115,7 +115,7 @@ public function testIsinWithValidFormatButIncorrectChecksum($isin) $this->assertViolationRaised($isin, Isin::INVALID_CHECKSUM_ERROR); } - public function getIsinWithValidFormatButIncorrectChecksum() + public static function getIsinWithValidFormatButIncorrectChecksum() { return [ ['XS2112212144'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/JsonValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/JsonValidatorTest.php index 6c94c1d8df6cc..a336e680d2790 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/JsonValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/JsonValidatorTest.php @@ -49,7 +49,7 @@ public function testInvalidValues($value) ->assertRaised(); } - public function getValidValues() + public static function getValidValues() { return [ ['{"planet":"earth", "country": "Morocco","city": "Rabat" ,"postcode" : 10160, "is_great": true, @@ -65,7 +65,7 @@ public function getValidValues() ]; } - public function getInvalidValues() + public static function getInvalidValues() { return [ ['{"foo": 3 "bar": 4}'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php index 23df113872367..15f7ddc42602f 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php @@ -70,7 +70,7 @@ public function testValidLanguages($language) $this->assertNoViolation(); } - public function getValidLanguages() + public static function getValidLanguages() { return [ ['en'], @@ -95,7 +95,7 @@ public function testInvalidLanguages($language) ->assertRaised(); } - public function getInvalidLanguages() + public static function getInvalidLanguages() { return [ ['EN'], @@ -115,7 +115,7 @@ public function testValidAlpha3Languages($language) $this->assertNoViolation(); } - public function getValidAlpha3Languages() + public static function getValidAlpha3Languages() { return [ ['deu'], @@ -142,7 +142,7 @@ public function testInvalidAlpha3Languages($language) ->assertRaised(); } - public function getInvalidAlpha3Languages() + public static function getInvalidAlpha3Languages() { return [ ['foobar'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LengthTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LengthTest.php index 90c57bed6d1b7..2d7d12576702c 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LengthTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LengthTest.php @@ -57,7 +57,7 @@ public function testDeprecatedAllowEmptyStringOption(bool $value) new Length(['allowEmptyString' => $value, 'max' => 5]); } - public function allowEmptyStringOptionData() + public static function allowEmptyStringOptionData() { return [ [true], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php index 5772d6e0a8308..babe2737e8a5e 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php @@ -62,7 +62,7 @@ public function testExpectsStringCompatibleType() $this->validator->validate(new \stdClass(), new Length(['value' => 5])); } - public function getThreeOrLessCharacters() + public static function getThreeOrLessCharacters() { return [ [12], @@ -76,7 +76,7 @@ public function getThreeOrLessCharacters() ]; } - public function getFourCharacters() + public static function getFourCharacters() { return [ [1234], @@ -86,7 +86,7 @@ public function getFourCharacters() ]; } - public function getFiveOrMoreCharacters() + public static function getFiveOrMoreCharacters() { return [ [12345], @@ -100,7 +100,7 @@ public function getFiveOrMoreCharacters() ]; } - public function getOneCharset() + public static function getOneCharset() { return [ ['é', 'utf8', true], @@ -110,7 +110,7 @@ public function getOneCharset() ]; } - public function getThreeCharactersWithWhitespaces() + public static function getThreeCharactersWithWhitespaces() { return [ ["\x20ccc"], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php index 7c3746f5c8fe3..91153cad47736 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php @@ -53,7 +53,7 @@ public function testValidLocales($locale) $this->assertNoViolation(); } - public function getValidLocales() + public static function getValidLocales() { return [ ['en'], @@ -83,7 +83,7 @@ public function testInvalidLocales($locale) ->assertRaised(); } - public function getInvalidLocales() + public static function getInvalidLocales() { return [ ['baz'], @@ -154,7 +154,7 @@ public function testInvalidLocaleWithoutCanonicalizationNamed() ->assertRaised(); } - public function getUncanonicalizedLocales(): iterable + public static function getUncanonicalizedLocales(): iterable { return [ ['en-US'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php index 5dc15b41a9705..17f38bee4c8d7 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php @@ -47,7 +47,7 @@ public function testValidNumbers($number) $this->assertNoViolation(); } - public function getValidNumbers() + public static function getValidNumbers() { return [ ['42424242424242424242'], @@ -88,7 +88,7 @@ public function testInvalidNumbers($number, $code) ->assertRaised(); } - public function getInvalidNumbers() + public static function getInvalidNumbers() { return [ ['1234567812345678', Luhn::CHECKSUM_FAILED_ERROR], @@ -110,7 +110,7 @@ public function testInvalidTypes($number) $this->validator->validate($number, $constraint); } - public function getInvalidTypes() + public static function getInvalidTypes() { return [ [0], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php index 3bf322052759a..1437c01093c76 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php @@ -32,7 +32,7 @@ public function testValidValues($value) $this->assertNoViolation(); } - public function getValidValues() + public static function getValidValues() { return [ ['foobar'], @@ -143,7 +143,7 @@ public function testNormalizedStringIsInvalid($value) ->assertRaised(); } - public function getWhitespaces() + public static function getWhitespaces() { return [ ["\x20"], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NotCompromisedPasswordValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotCompromisedPasswordValidatorTest.php index 4209c45c771ec..8a3d343b2011a 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/NotCompromisedPasswordValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/NotCompromisedPasswordValidatorTest.php @@ -103,7 +103,7 @@ public function testThresholdNotReached(NotCompromisedPassword $constraint) $this->assertNoViolation(); } - public function provideConstraintsWithThreshold(): iterable + public static function provideConstraintsWithThreshold(): iterable { yield 'Doctrine style' => [new NotCompromisedPassword(['threshold' => 10])]; @@ -218,7 +218,7 @@ public function testApiErrorSkipped(NotCompromisedPassword $constraint) $this->assertTrue(true); // No exception have been thrown } - public function provideErrorSkippingConstraints(): iterable + public static function provideErrorSkippingConstraints(): iterable { yield 'Doctrine style' => [new NotCompromisedPassword(['skipOnError' => true])]; diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php index abaa7f874a530..1b54c420dbf9a 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php @@ -32,7 +32,7 @@ public function testValidValues($value) $this->assertNoViolation(); } - public function getValidValues() + public static function getValidValues() { return [ [0], @@ -55,7 +55,7 @@ public function testNullIsInvalid(NotNull $constraint) ->assertRaised(); } - public function provideInvalidConstraints(): iterable + public static function provideInvalidConstraints(): iterable { yield 'Doctrine style' => [new NotNull([ 'message' => 'myMessage', diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php index 542cb3996d10c..0982254b7de85 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php @@ -74,7 +74,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], @@ -96,7 +96,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 d67bbe526cbaf..2f7da24176cfb 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php @@ -31,7 +31,7 @@ public function testNullIsValid() $this->assertNoViolation(); } - public function getTenToTwenty() + public static function getTenToTwenty() { return [ [10.00001], @@ -45,7 +45,7 @@ public function getTenToTwenty() ]; } - public function getLessThanTen() + public static function getLessThanTen() { return [ [9.99999, '9.99999'], @@ -55,7 +55,7 @@ public function getLessThanTen() ]; } - public function getMoreThanTwenty() + public static function getMoreThanTwenty() { return [ [20.000001, '20.000001'], @@ -610,7 +610,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], @@ -1042,7 +1042,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 1b9f25c362325..384e53fe744b0 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php @@ -29,7 +29,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/RegexValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php index 63645ca04e162..e46a53efaaa87 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php @@ -77,7 +77,7 @@ public function testValidValuesWithWhitespacesNamed($value) $this->assertNoViolation(); } - public function getValidValues() + public static function getValidValues() { return [ [0], @@ -93,7 +93,7 @@ public function __toString(): string ]; } - public function getValidValuesWithWhitespaces() + public static function getValidValuesWithWhitespaces() { return [ ["\x207"], @@ -139,7 +139,7 @@ public function testInvalidValuesNamed($value) ->assertRaised(); } - public function getInvalidValues() + public static function getInvalidValues() { return [ ['abcd'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php index 0e0a23fbb3cbc..80d21d5c28d35 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php @@ -53,7 +53,7 @@ public function testValidTimes($time) $this->assertNoViolation(); } - public function getValidTimes() + public static function getValidTimes() { return [ ['01:02:03'], @@ -79,7 +79,7 @@ public function testInvalidTimes($time, $code) ->assertRaised(); } - public function getInvalidTimes() + public static function getInvalidTimes() { return [ ['foobar', Time::INVALID_FORMAT_ERROR], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/TimezoneTest.php b/src/Symfony/Component/Validator/Tests/Constraints/TimezoneTest.php index 271b17174cb39..e5a0cd3668646 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/TimezoneTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/TimezoneTest.php @@ -59,7 +59,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/Constraints/TimezoneValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/TimezoneValidatorTest.php index 3b00b75acdc95..3e0b23f0498eb 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/TimezoneValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/TimezoneValidatorTest.php @@ -57,7 +57,7 @@ public function testValidTimezones(string $timezone) $this->assertNoViolation(); } - public function getValidTimezones(): iterable + public static function getValidTimezones(): iterable { // ICU standard (alias/BC in PHP) yield ['Etc/UTC']; @@ -105,7 +105,7 @@ public function testValidGroupedTimezones(string $timezone, int $zone) $this->assertNoViolation(); } - public function getValidGroupedTimezones(): iterable + public static function getValidGroupedTimezones(): iterable { yield ['America/Buenos_Aires', \DateTimeZone::AMERICA | \DateTimeZone::AUSTRALIA]; // icu yield ['America/Argentina/Buenos_Aires', \DateTimeZone::AMERICA]; // php @@ -141,7 +141,7 @@ public function testInvalidTimezoneWithoutZone(string $timezone) ->assertRaised(); } - public function getInvalidTimezones(): iterable + public static function getInvalidTimezones(): iterable { yield ['Buenos_Aires/America']; yield ['Buenos_Aires/Argentina/America']; @@ -167,7 +167,7 @@ public function testInvalidGroupedTimezones(string $timezone, int $zone) ->assertRaised(); } - public function getInvalidGroupedTimezones(): iterable + public static function getInvalidGroupedTimezones(): iterable { yield ['America/Buenos_Aires', \DateTimeZone::ASIA | \DateTimeZone::AUSTRALIA]; // icu yield ['America/Argentina/Buenos_Aires', \DateTimeZone::EUROPE]; // php @@ -210,7 +210,7 @@ public function testValidGroupedTimezonesByCountry(string $timezone, string $cou $this->assertNoViolation(); } - public function getValidGroupedTimezonesByCountry(): iterable + public static function getValidGroupedTimezonesByCountry(): iterable { yield ['America/Buenos_Aires', 'AR']; // icu yield ['America/Argentina/Buenos_Aires', 'AR']; // php @@ -251,7 +251,7 @@ public function testInvalidGroupedTimezonesByCountry(string $timezone, string $c ->assertRaised(); } - public function getInvalidGroupedTimezonesByCountry(): iterable + public static function getInvalidGroupedTimezonesByCountry(): iterable { yield ['America/Argentina/Cordoba', 'FR']; yield ['America/Barbados', 'PT']; @@ -305,7 +305,7 @@ public function testDeprecatedTimezonesAreInvalidWithoutBC(string $timezone) ->assertRaised(); } - public function getDeprecatedTimezones(): iterable + public static function getDeprecatedTimezones(): iterable { yield ['Australia/ACT']; yield ['Australia/LHI']; diff --git a/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php index 088bb40c79ede..e7687da58a345 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php @@ -175,7 +175,7 @@ public function testValidValuesMultipleTypes($value, array $types) $this->assertNoViolation(); } - public function getValidValuesMultipleTypes() + public static function getValidValuesMultipleTypes() { return [ ['12345', ['array', 'string']], @@ -197,7 +197,7 @@ public function testInvalidValuesMultipleTypes(Type $constraint) ->assertRaised(); } - public function provideConstraintsWithMultipleTypes() + public static function provideConstraintsWithMultipleTypes() { yield 'Doctrine style' => [new Type([ 'type' => ['boolean', 'array'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php index 8948cbabd8d9f..c7b94fdde9c6c 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php @@ -71,7 +71,7 @@ public function testInvalidUlid(string $ulid, string $code) ->assertRaised(); } - public function getInvalidUlids() + public static function getInvalidUlids() { return [ ['01ARZ3NDEKTSV4RRFFQ69G5FA', Ulid::TOO_SHORT_ERROR], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UniqueValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UniqueValidatorTest.php index 6b892cb0a5ca5..417050bd8e67d 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/UniqueValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/UniqueValidatorTest.php @@ -39,7 +39,7 @@ public function testValidValues($value) $this->assertNoViolation(); } - public function getValidValues() + public static function getValidValues() { return [ yield 'null' => [[null]], @@ -72,7 +72,7 @@ public function testInvalidValues($value) ->assertRaised(); } - public function getInvalidValues() + public static function getInvalidValues() { $object = new \stdClass(); @@ -156,7 +156,7 @@ public function testExpectsNonUniqueObjects($callback) ->assertRaised(); } - public function getCallback() + public static function getCallback() { return [ yield 'static function' => [static function (\stdClass $object) { diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php index 8227cd73f1b21..e7bd83d07d708 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php @@ -85,7 +85,7 @@ public function testValidRelativeUrl($url) $this->assertNoViolation(); } - public function getValidRelativeUrls() + public static function getValidRelativeUrls() { return [ ['//example.com'], @@ -95,7 +95,7 @@ public function getValidRelativeUrls() ]; } - public function getValidUrls() + public static function getValidUrls() { return [ ['http://a.pl'], @@ -177,7 +177,7 @@ public function getValidUrls() ]; } - public function getValidUrlsWithWhitespaces() + public static function getValidUrlsWithWhitespaces() { return [ ["\x20http://www.example.com"], @@ -225,7 +225,7 @@ public function testInvalidRelativeUrl($url) ->assertRaised(); } - public function getInvalidRelativeUrls() + public static function getInvalidRelativeUrls() { return [ ['/example.com'], @@ -245,7 +245,7 @@ public function getInvalidRelativeUrls() ]; } - public function getInvalidUrls() + public static function getInvalidUrls() { return [ ['example.com'], @@ -303,7 +303,7 @@ public function testCustomProtocolIsValid($url) $this->assertNoViolation(); } - public function getValidCustomUrls() + public static function getValidCustomUrls() { return [ ['ftp://example.com'], diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php index 672a594e9e952..d6d6e80699ed9 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php @@ -72,7 +72,7 @@ public function testValidStrictUuids($uuid, $versions = null) $this->assertNoViolation(); } - public function getValidStrictUuids() + public static function getValidStrictUuids() { return [ ['216fff40-98d9-11e3-a5e2-0800200c9a66'], // Version 1 UUID in lowercase @@ -101,7 +101,7 @@ public function testValidStrictUuidsWithWhitespaces($uuid, $versions = null) $this->assertNoViolation(); } - public function getValidStrictUuidsWithWhitespaces() + public static function getValidStrictUuidsWithWhitespaces() { return [ ["\x20216fff40-98d9-11e3-a5e2-0800200c9a66"], // Version 1 UUID in lowercase @@ -147,7 +147,7 @@ public function testInvalidStrictUuids($uuid, $code, $versions = null) ->assertRaised(); } - public function getInvalidStrictUuids() + public static function getInvalidStrictUuids() { return [ ['216fff40-98d9-11e3-a5e2_0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR], @@ -206,7 +206,7 @@ public function testValidNonStrictUuids($uuid) $this->assertNoViolation(); } - public function getValidNonStrictUuids() + public static function getValidNonStrictUuids() { return [ ['216fff40-98d9-11e3-a5e2-0800200c9a66'], // Version 1 UUID in lowercase @@ -241,7 +241,7 @@ public function testInvalidNonStrictUuids($uuid, $code) ->assertRaised(); } - public function getInvalidNonStrictUuids() + public static function getInvalidNonStrictUuids() { return [ ['216fff40-98d9-11e3-a5e2_0800200c9a66', Uuid::INVALID_CHARACTERS_ERROR], 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/Loader/AnnotationLoaderTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderTest.php index ab0f79663562e..020b554acc554 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderTest.php @@ -211,7 +211,7 @@ public function testLoadGroupSequenceProviderAnnotation(string $namespace) $this->assertEquals($expected, $metadata); } - public function provideNamespaces(): iterable + public static function provideNamespaces(): iterable { yield 'annotations' => ['Symfony\Component\Validator\Tests\Fixtures\Annotation']; diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php index 0965d8e135fa0..f41d4c55443a9 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php @@ -205,7 +205,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/YamlFileLoaderTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php index 1813019b43a67..8ddcd02f17608 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php @@ -52,7 +52,7 @@ public function testInvalidYamlFiles($path) $loader->loadClassMetadata($metadata); } - public function provideInvalidYamlFiles() + public static function provideInvalidYamlFiles() { return [ ['nonvalid-mapping.yml'], 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/Validator/Tests/Validator/RecursiveValidatorTest.php b/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php index c78eb75448701..2bb212eaac293 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php @@ -1284,7 +1284,7 @@ public function testReplaceDefaultGroup($sequence, array $assertViolations) } } - public function getConstraintMethods() + public static function getConstraintMethods() { return [ ['addPropertyConstraint'], @@ -1292,7 +1292,7 @@ public function getConstraintMethods() ]; } - public function getTestReplaceDefaultGroup() + public static function getTestReplaceDefaultGroup() { return [ [ diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php index 66cd5fbeda660..55eb4040f62b8 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(self::$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 335aa7dda4b1c..40835671b5137 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'], @@ -194,7 +194,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'], @@ -293,7 +293,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' : ''; @@ -370,7 +370,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..4093471f8929a 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php @@ -21,7 +21,7 @@ class SplCasterTest extends TestCase { use VarDumperTestTrait; - public function getCastFileInfoTests() + public static function getCastFileInfoTests() { return [ [__FILE__, <<<'EOTXT' @@ -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..78416f30943b7 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' diff --git a/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php b/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php index 56fb218776259..5941508a3a235 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' => [ [ diff --git a/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/HtmlDescriptorTest.php b/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/HtmlDescriptorTest.php index 426e99d360c3e..09acf149a877b 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' => [ [ diff --git a/src/Symfony/Component/VarDumper/Tests/Command/ServerDumpCommandTest.php b/src/Symfony/Component/VarDumper/Tests/Command/ServerDumpCommandTest.php index fe1a9b05d3da9..d593608de897e 100644 --- a/src/Symfony/Component/VarDumper/Tests/Command/ServerDumpCommandTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Command/ServerDumpCommandTest.php @@ -32,7 +32,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $tester->complete($input)); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'option --format' => [ ['--format', ''], diff --git a/src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php b/src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php index 92b7119a01009..d94b15ff4b731 100644 --- a/src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php @@ -157,7 +157,7 @@ public function testDumpWithCommaFlagsAndExceptionCodeExcerpt() , $dump); } - public function provideDumpWithCommaFlagTests() + public static function provideDumpWithCommaFlagTests() { $expected = <<<'EOTXT' array:3 [ @@ -492,7 +492,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 1fd98640312e0..8c9592e47b304 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/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 a4ea1a9221d3c..21320e1d59d4c 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/WorkflowTest.php b/src/Symfony/Component/Workflow/Tests/WorkflowTest.php index 6399bf21d9c15..6d84b1937d94d 100644 --- a/src/Symfony/Component/Workflow/Tests/WorkflowTest.php +++ b/src/Symfony/Component/Workflow/Tests/WorkflowTest.php @@ -438,7 +438,7 @@ public function testApplyWithEventDispatcher() $this->assertSame($eventNameExpected, $eventDispatcher->dispatchedEvents); } - public function provideApplyWithEventDispatcherForAnnounceTests() + public static function provideApplyWithEventDispatcherForAnnounceTests() { yield [false, [Workflow::DISABLE_ANNOUNCE_EVENT => true]]; yield [true, [Workflow::DISABLE_ANNOUNCE_EVENT => false]]; diff --git a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php index 90e20455ff0ed..4d3024cc3e4b1 100644 --- a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php +++ b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php @@ -179,7 +179,7 @@ public function testComplete(array $input, array $expectedSuggestions) $this->assertSame($expectedSuggestions, $tester->complete($input)); } - public function provideCompletionSuggestions() + public static function provideCompletionSuggestions() { yield 'option' => [['--format', ''], ['txt', 'json', 'github']]; } diff --git a/src/Symfony/Component/Yaml/Tests/DumperTest.php b/src/Symfony/Component/Yaml/Tests/DumperTest.php index 16551f187136c..721b04caab2ee 100644 --- a/src/Symfony/Component/Yaml/Tests/DumperTest.php +++ b/src/Symfony/Component/Yaml/Tests/DumperTest.php @@ -225,7 +225,7 @@ public function testEscapedEscapeSequencesInQuotedScalar($input, $expected) $this->assertSameData($input, $this->parser->parse($expected)); } - public function getEscapeSequences() + public static function getEscapeSequences() { return [ 'empty string' => ['', "''"], @@ -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 f71509d28f35c..8cd2582fdccc5 100644 --- a/src/Symfony/Component/Yaml/Tests/InlineTest.php +++ b/src/Symfony/Component/Yaml/Tests/InlineTest.php @@ -56,7 +56,7 @@ public function testParsePhpConstants($yaml, $value) $this->assertSame($value, $actual); } - public function getTestsForParsePhpConstants() + public static function getTestsForParsePhpConstants() { return [ ['!php/const Symfony\Component\Yaml\Yaml::PARSE_CONSTANT', Yaml::PARSE_CONSTANT], @@ -195,7 +195,7 @@ public function testParseReferences($yaml, $expected) $this->assertSame($expected, Inline::parse($yaml, 0, $references)); } - public function getDataForParseReferences() + public static function getDataForParseReferences() { return [ 'scalar' => ['*var', 'var-value'], @@ -245,7 +245,7 @@ public function testParseUnquotedScalarStartingWithReservedIndicator($indicator) Inline::parse(sprintf('{ foo: %sfoo }', $indicator)); } - public function getReservedIndicators() + public static function getReservedIndicators() { return [['@'], ['`']]; } @@ -261,7 +261,7 @@ public function testParseUnquotedScalarStartingWithScalarIndicator($indicator) Inline::parse(sprintf('{ foo: %sfoo }', $indicator)); } - public function getScalarIndicators() + public static function getScalarIndicators() { return [['|'], ['>'], ['%']]; } @@ -274,7 +274,7 @@ public function testIsHash($array, $expected) $this->assertSame($expected, Inline::isHash($array)); } - public function getDataForIsHash() + public static function getDataForIsHash() { return [ [[], false], @@ -284,7 +284,7 @@ public function getDataForIsHash() ]; } - public function getTestsForParse() + public static function getTestsForParse() { return [ ['', ''], @@ -370,7 +370,7 @@ public function getTestsForParse() ]; } - public function getTestsForParseWithMapObjects() + public static function getTestsForParseWithMapObjects() { return [ ['', ''], @@ -451,7 +451,7 @@ public function getTestsForParseWithMapObjects() ]; } - public function getTestsForDump() + public static function getTestsForDump() { return [ ['null', null], @@ -549,7 +549,7 @@ public function testParseTimestampAsDateTimeObject(string $yaml, int $year, int $this->assertSame($timezone, $date->format('O')); } - public function getTimestampTests(): array + public static function getTimestampTests(): array { return [ 'canonical' => ['2001-12-15T02:59:43.1Z', 2001, 12, 15, 2, 59, 43, 100000, '+0000'], @@ -591,7 +591,7 @@ public function testDumpUnitEnum() $this->assertSame("!php/const Symfony\Component\Yaml\Tests\Fixtures\FooUnitEnum::BAR", Inline::dump(FooUnitEnum::BAR)); } - public function getDateTimeDumpTests() + public static function getDateTimeDumpTests() { $tests = []; @@ -612,7 +612,7 @@ public function testParseBinaryData($data) $this->assertSame('Hello world', Inline::parse($data)); } - public function getBinaryData() + public static function getBinaryData() { return [ 'enclosed with double quotes' => ['!!binary "SGVsbG8gd29ybGQ="'], @@ -632,7 +632,7 @@ public function testParseInvalidBinaryData($data, $expectedMessage) Inline::parse($data); } - public function getInvalidBinaryData() + public static function getInvalidBinaryData() { return [ 'length not a multiple of four' => ['!!binary "SGVsbG8d29ybGQ="', '/The normalized base64 encoded data \(data without whitespace characters\) length must be a multiple of four \(\d+ bytes given\)/'], @@ -674,7 +674,7 @@ public function testParseMissingMappingValueAsNull($yaml, $expected) $this->assertSame($expected, Inline::parse($yaml)); } - public function getTestsForNullValues() + public static function getTestsForNullValues() { return [ 'null before closing curly brace' => ['{foo:}', ['foo' => null]], @@ -697,7 +697,7 @@ public function testImplicitStringCastingOfMappingKeysIsDeprecated($yaml, $expec $this->assertSame($expected, Inline::parse($yaml)); } - public function getNotPhpCompatibleMappingKeyData() + public static function getNotPhpCompatibleMappingKeyData() { return [ 'boolean-true' => ['{true: "foo"}', ['true' => 'foo']], @@ -776,7 +776,7 @@ public function testParseOctalNumbers($expected, $yaml) self::assertSame($expected, Inline::parse($yaml)); } - public function getTestsForOctalNumbers() + public static function getTestsForOctalNumbers() { return [ 'positive octal number' => [28, '0o34'], @@ -797,7 +797,7 @@ public function testParseOctalNumbersYaml11Notation(int $expected, string $yaml, self::assertSame($expected, Inline::parse($yaml)); } - public function getTestsForOctalNumbersYaml11Notation() + public static function getTestsForOctalNumbersYaml11Notation() { return [ 'positive octal number' => [28, '034', '0o34'], @@ -818,7 +818,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'], @@ -842,7 +842,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'], @@ -894,7 +894,7 @@ public function testUnquotedExclamationMarkThrows(string $value) Inline::parse($value); } - public function unquotedExclamationMarkThrowsProvider() + public static function unquotedExclamationMarkThrowsProvider() { return [ ['!'], @@ -926,7 +926,7 @@ public function testQuotedExclamationMark($expected, string $value) } // This provider should stay consistent with unquotedExclamationMarkThrowsProvider - public function quotedExclamationMarkProvider() + public static function quotedExclamationMarkProvider() { return [ ['!', '"!"'], @@ -956,7 +956,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 b09ff0908f850..98e5e73ec53e7 100644 --- a/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -144,7 +144,7 @@ public function testTabsAsIndentationInYaml(string $given, string $expectedMessa $this->parser->parse($given); } - public function invalidIndentation(): array + public static function invalidIndentation(): array { return [ [ @@ -189,7 +189,7 @@ public function testValidTokenSeparation(string $given, array $expected) $this->assertSameData($expected, $actual); } - public function validTokenSeparators(): array + public static function validTokenSeparators(): array { return [ [ @@ -222,7 +222,7 @@ public function testEndOfTheDocumentMarker() $this->assertEquals('foo', $this->parser->parse($yaml)); } - public function getBlockChompingTests() + public static function getBlockChompingTests() { $tests = []; @@ -586,7 +586,7 @@ public function testObjectForMap($yaml, $expected) $this->assertSameData($expected, $this->parser->parse($yaml, $flags)); } - public function getObjectForMapTests() + public static function getObjectForMapTests() { $tests = []; @@ -833,7 +833,7 @@ public function testNonStringFollowedByCommentEmbeddedInMapping() $this->assertSame($expected, $this->parser->parse($yaml)); } - public function getParseExceptionNotAffectedMultiLineStringLastResortParsing() + public static function getParseExceptionNotAffectedMultiLineStringLastResortParsing() { $tests = []; @@ -975,7 +975,7 @@ public function testParseExceptionOnDuplicate($input, $duplicateKey, $lineNumber Yaml::parse($input); } - public function getParseExceptionOnDuplicateData() + public static function getParseExceptionOnDuplicateData() { $tests = []; @@ -1280,7 +1280,7 @@ public function testCommentLikeStringsAreNotStrippedInBlockScalars($yaml, $expec $this->assertSame($expectedParserResult, $this->parser->parse($yaml)); } - public function getCommentLikeStringInScalarBlockData() + public static function getCommentLikeStringInScalarBlockData() { $tests = []; @@ -1465,7 +1465,7 @@ public function testParseBinaryData($data) $this->assertSame(['data' => 'Hello world'], $this->parser->parse($data)); } - public function getBinaryData() + public static function getBinaryData() { return [ 'enclosed with double quotes' => ['data: !!binary "SGVsbG8gd29ybGQ="'], @@ -1497,7 +1497,7 @@ public function testParseInvalidBinaryData($data, $expectedMessage) $this->parser->parse($data); } - public function getInvalidBinaryData() + public static function getInvalidBinaryData() { return [ 'length not a multiple of four' => ['data: !!binary "SGVsbG8d29ybGQ="', '/The normalized base64 encoded data \(data without whitespace characters\) length must be a multiple of four \(\d+ bytes given\)/'], @@ -1563,7 +1563,7 @@ public function testParserThrowsExceptionWithCorrectLineNumber($lineNumber, $yam $this->parser->parse($yaml); } - public function parserThrowsExceptionWithCorrectLineNumberProvider() + public static function parserThrowsExceptionWithCorrectLineNumberProvider() { return [ [ @@ -1720,7 +1720,7 @@ public function testParseQuotedStringContainingEscapedQuotationCharacters(string $this->assertSame($expected, $this->parser->parse($yaml)); } - public function escapedQuotationCharactersInQuotedStrings() + public static function escapedQuotationCharactersInQuotedStrings() { return [ 'single quoted string' => [ @@ -1778,7 +1778,7 @@ public function testParseMultiLineMappingValue($yaml, $expected, $parseError) $this->assertSame($expected, $this->parser->parse($yaml)); } - public function multiLineDataProvider() + public static function multiLineDataProvider() { $tests = []; @@ -1845,7 +1845,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' => [ @@ -2234,7 +2234,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' => [ @@ -2658,7 +2658,7 @@ public function testDetectCircularReferences($yaml) $this->parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS); } - public function circularReferenceProvider() + public static function circularReferenceProvider() { $tests = []; @@ -2698,7 +2698,7 @@ public function testParseIndentedMappings($yaml, $expected) $this->assertSame($expected, $this->parser->parse($yaml)); } - public function indentedMappingData() + public static function indentedMappingData() { $tests = []; diff --git a/src/Symfony/Contracts/Translation/Test/TranslatorTest.php b/src/Symfony/Contracts/Translation/Test/TranslatorTest.php index 68587f12d9817..fdf4f76c1589a 100644 --- a/src/Symfony/Contracts/Translation/Test/TranslatorTest.php +++ b/src/Symfony/Contracts/Translation/Test/TranslatorTest.php @@ -117,7 +117,7 @@ public function testGetLocaleReturnsDefaultLocaleIfNotSet() $this->assertEquals('en', $translator->getLocale()); } - public function getTransTests() + public static function getTransTests() { return [ ['Symfony is great!', 'Symfony is great!', []], @@ -125,7 +125,7 @@ public function getTransTests() ]; } - public function getTransChoiceTests() + public static function getTransChoiceTests() { return [ ['There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0], @@ -149,7 +149,7 @@ public function testInterval($expected, $number, $interval) $this->assertEquals($expected, $translator->trans($interval.' foo|[1,Inf[ bar', ['%count%' => $number])); } - public function getInterval() + public static function getInterval() { return [ ['foo', 3, '{1,2, 3 ,4}'], @@ -192,7 +192,7 @@ public function testThrowExceptionIfMatchingMessageCannotBeFound($id, $number) $translator->trans($id, ['%count%' => $number]); } - public function getNonMatchingMessages() + public static function getNonMatchingMessages() { return [ ['{0} There are no apples|{1} There is one apple', 2], @@ -202,7 +202,7 @@ public function getNonMatchingMessages() ]; } - public function getChooseTests() + public static function getChooseTests() { return [ ['There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0], @@ -320,7 +320,7 @@ public function testLangcodes($nplural, $langCodes) * * @return array */ - public function successLangcodes() + public static function successLangcodes() { return [ ['1', ['ay', 'bo', 'cgg', 'dz', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky']], @@ -339,7 +339,7 @@ public function successLangcodes() * * @return array with nplural together with langcodes */ - public function failingLangcodes() + public static function failingLangcodes() { return [ ['1', ['fa']],