From ff22d30cb02fad4a3e97245d46411cea05fcb36b Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 8 Dec 2020 17:59:59 +0100 Subject: [PATCH 1/2] Apply "visibility_required" CS rule to constants php-cs-fixer fix --rules='{"visibility_required": ["property", "method", "const"]}' --- .../Bridge/Doctrine/Logger/DbalLogger.php | 4 +- .../Tests/Form/Type/EntityTypeTest.php | 2 +- .../Validator/Constraints/UniqueEntity.php | 2 +- .../Monolog/Formatter/ConsoleFormatter.php | 4 +- .../PhpUnit/DeprecationErrorHandler.php | 8 +- .../DeprecationErrorHandler/Deprecation.php | 14 +- .../NodeVisitor/TranslationNodeVisitor.php | 2 +- .../Command/AssetsInstallCommand.php | 6 +- .../Command/TranslationDebugCommand.php | 6 +- .../Security/EntryPointStub.php | 2 +- .../EventListener/WebDebugToolbarListener.php | 4 +- .../Bundle/WebServerBundle/WebServer.php | 4 +- .../Cache/Adapter/TagAwareAdapter.php | 2 +- .../Component/Config/Definition/BaseNode.php | 2 +- .../Component/Console/ConsoleEvents.php | 6 +- .../Descriptor/ApplicationDescription.php | 2 +- .../Console/Event/ConsoleCommandEvent.php | 2 +- .../Component/Console/Input/InputArgument.php | 6 +- .../Component/Console/Input/InputOption.php | 8 +- .../Component/Console/Input/StringInput.php | 4 +- .../Console/Logger/ConsoleLogger.php | 4 +- .../Console/Output/OutputInterface.php | 16 +- .../Component/Console/Style/SymfonyStyle.php | 2 +- .../CssSelector/Node/Specificity.php | 6 +- .../Component/CssSelector/Parser/Token.php | 14 +- .../XPath/Extension/NodeExtension.php | 6 +- .../Argument/BoundArgument.php | 6 +- .../Compiler/PassConfig.php | 10 +- .../ContainerInterface.php | 10 +- .../DependencyInjection/Dumper/PhpDumper.php | 4 +- .../Configurator/AbstractConfigurator.php | 2 +- .../Loader/Configurator/AliasConfigurator.php | 2 +- .../Configurator/ContainerConfigurator.php | 2 +- .../Configurator/DefaultsConfigurator.php | 2 +- .../InlineServiceConfigurator.php | 2 +- .../Configurator/InstanceofConfigurator.php | 2 +- .../Configurator/ParametersConfigurator.php | 2 +- .../Configurator/PrototypeConfigurator.php | 2 +- .../Configurator/ServiceConfigurator.php | 2 +- .../Configurator/ServicesConfigurator.php | 2 +- .../Loader/XmlFileLoader.php | 2 +- .../Tests/EnvVarProcessorTest.php | 2 +- src/Symfony/Component/Dotenv/Dotenv.php | 6 +- .../ExpressionLanguage/Node/GetAttrNode.php | 6 +- .../Component/ExpressionLanguage/Parser.php | 4 +- .../Component/ExpressionLanguage/Token.php | 12 +- src/Symfony/Component/Finder/Finder.php | 6 +- .../Iterator/FileTypeFilterIterator.php | 4 +- .../Finder/Iterator/SortableIterator.php | 14 +- .../Finder/Tests/Iterator/MockSplFileInfo.php | 6 +- .../Component/Form/AbstractRendererEngine.php | 2 +- .../DateIntervalToArrayTransformer.php | 14 +- ...ateTimeToHtml5LocalDateTimeTransformer.php | 2 +- .../NumberToLocalizedStringTransformer.php | 14 +- .../PercentToLocalizedStringTransformer.php | 4 +- .../Form/Extension/Core/Type/DateTimeType.php | 6 +- .../Form/Extension/Core/Type/DateType.php | 4 +- .../Form/Extension/Core/Type/FileType.php | 4 +- .../Extension/Validator/Constraints/Form.php | 4 +- .../Component/Form/FormErrorIterator.php | 2 +- src/Symfony/Component/Form/FormEvents.php | 10 +- src/Symfony/Component/Form/FormRenderer.php | 2 +- src/Symfony/Component/Form/Guess/Guess.php | 8 +- .../Extension/Core/Type/BaseTypeTest.php | 2 +- .../Extension/Core/Type/BirthdayTypeTest.php | 2 +- .../Extension/Core/Type/ButtonTypeTest.php | 2 +- .../Extension/Core/Type/CheckboxTypeTest.php | 2 +- .../Extension/Core/Type/ChoiceTypeTest.php | 2 +- .../Core/Type/CollectionTypeTest.php | 2 +- .../Extension/Core/Type/CountryTypeTest.php | 2 +- .../Extension/Core/Type/CurrencyTypeTest.php | 2 +- .../Core/Type/DateIntervalTypeTest.php | 2 +- .../Extension/Core/Type/DateTimeTypeTest.php | 2 +- .../Extension/Core/Type/DateTypeTest.php | 2 +- .../Extension/Core/Type/FileTypeTest.php | 2 +- .../Extension/Core/Type/FormTypeTest.php | 2 +- .../Extension/Core/Type/IntegerTypeTest.php | 2 +- .../Extension/Core/Type/LanguageTypeTest.php | 2 +- .../Extension/Core/Type/LocaleTypeTest.php | 2 +- .../Extension/Core/Type/MoneyTypeTest.php | 2 +- .../Extension/Core/Type/NumberTypeTest.php | 2 +- .../Extension/Core/Type/PasswordTypeTest.php | 2 +- .../Extension/Core/Type/RepeatedTypeTest.php | 2 +- .../Extension/Core/Type/SubmitTypeTest.php | 2 +- .../Extension/Core/Type/TextTypeTest.php | 2 +- .../Extension/Core/Type/TimeTypeTest.php | 2 +- .../Extension/Core/Type/TimezoneTypeTest.php | 2 +- .../Tests/Extension/Core/Type/UrlTypeTest.php | 2 +- .../Extension/Core/Type/WeekTypeTest.php | 2 +- .../Validator/ValidatorTypeGuesserTest.php | 4 +- .../Component/HttpFoundation/Cookie.php | 6 +- .../Component/HttpFoundation/JsonResponse.php | 2 +- .../Component/HttpFoundation/Request.php | 34 ++-- .../Component/HttpFoundation/Response.php | 128 +++++++-------- .../HttpFoundation/ResponseHeaderBag.php | 8 +- .../Storage/Handler/PdoSessionHandler.php | 6 +- .../Session/Storage/MetadataBag.php | 6 +- .../EventListener/AbstractSessionListener.php | 2 +- .../HttpKernel/HttpKernelInterface.php | 4 +- src/Symfony/Component/HttpKernel/Kernel.php | 16 +- .../Component/HttpKernel/KernelEvents.php | 16 +- .../Component/Intl/Collator/Collator.php | 48 +++--- .../Data/Provider/CurrencyDataProvider.php | 8 +- .../Intl/DateFormatter/IntlDateFormatter.php | 14 +- .../Exception/NotImplementedException.php | 2 +- .../Component/Intl/Globals/IntlGlobals.php | 6 +- src/Symfony/Component/Intl/Intl.php | 12 +- src/Symfony/Component/Intl/Locale/Locale.php | 20 +-- .../Intl/NumberFormatter/NumberFormatter.php | 146 +++++++++--------- .../Adapter/ExtLdap/ConnectionOptions.php | 76 ++++----- .../Component/Ldap/Adapter/ExtLdap/Query.php | 2 +- .../Component/Ldap/Adapter/QueryInterface.php | 14 +- src/Symfony/Component/Ldap/LdapInterface.php | 4 +- src/Symfony/Component/Mime/Email.php | 10 +- .../Component/Mime/Header/AbstractHeader.php | 2 +- .../Mime/Header/ParameterizedHeader.php | 2 +- .../Exception/ProcessTimedOutException.php | 4 +- .../Process/Pipes/PipesInterface.php | 2 +- src/Symfony/Component/Process/Process.php | 26 ++-- .../Component/PropertyAccess/PropertyPath.php | 2 +- .../Extractor/PhpDocExtractor.php | 6 +- src/Symfony/Component/PropertyInfo/Type.php | 20 +-- .../Generator/UrlGeneratorInterface.php | 8 +- .../Routing/Loader/XmlFileLoader.php | 4 +- .../Routing/Matcher/TraceableUrlMatcher.php | 6 +- .../Component/Routing/Matcher/UrlMatcher.php | 6 +- .../Component/Routing/RouteCompiler.php | 6 +- .../Routing/Tests/RouteCompilerTest.php | 2 +- .../AuthenticationProviderInterface.php | 2 +- .../Security/Core/AuthenticationEvents.php | 4 +- .../Authorization/AccessDecisionManager.php | 6 +- .../Voter/AuthenticatedVoter.php | 6 +- .../Authorization/Voter/VoterInterface.php | 6 +- .../Core/Encoder/BCryptPasswordEncoder.php | 2 +- .../Core/Encoder/BasePasswordEncoder.php | 2 +- .../Component/Security/Core/Security.php | 8 +- .../NativeSessionTokenStorage.php | 2 +- .../Csrf/TokenStorage/SessionTokenStorage.php | 2 +- .../Http/Firewall/SwitchUserListener.php | 2 +- .../RememberMe/AbstractRememberMeServices.php | 2 +- .../RememberMeServicesInterface.php | 2 +- .../Security/Http/SecurityEvents.php | 4 +- .../Session/SessionAuthenticationStrategy.php | 6 +- .../Serializer/Encoder/CsvEncoder.php | 20 +-- .../Serializer/Encoder/JsonDecode.php | 6 +- .../Serializer/Encoder/JsonEncode.php | 2 +- .../Serializer/Encoder/JsonEncoder.php | 2 +- .../Serializer/Encoder/XmlEncoder.php | 26 ++-- .../Serializer/Encoder/YamlEncoder.php | 2 +- .../ConstraintViolationListNormalizer.php | 8 +- .../Normalizer/DateIntervalNormalizer.php | 2 +- .../Normalizer/DateTimeNormalizer.php | 4 +- .../Translation/DataCollectorTranslator.php | 6 +- .../Translation/Extractor/PhpExtractor.php | 6 +- .../Translation/Loader/MoFileLoader.php | 6 +- .../Translation/MessageCatalogueInterface.php | 2 +- .../Component/Validator/Constraint.php | 6 +- .../Validator/ConstraintValidator.php | 4 +- .../Component/Validator/Constraints/Bic.php | 12 +- .../Component/Validator/Constraints/Blank.php | 2 +- .../Validator/Constraints/CardScheme.php | 4 +- .../Validator/Constraints/Choice.php | 6 +- .../Validator/Constraints/Collection.php | 4 +- .../Component/Validator/Constraints/Count.php | 4 +- .../Validator/Constraints/Country.php | 2 +- .../Validator/Constraints/Currency.php | 2 +- .../Component/Validator/Constraints/Date.php | 4 +- .../Validator/Constraints/DateTime.php | 6 +- .../Validator/Constraints/DateValidator.php | 2 +- .../Validator/Constraints/DivisibleBy.php | 2 +- .../Component/Validator/Constraints/Email.php | 6 +- .../Validator/Constraints/EmailValidator.php | 4 +- .../Validator/Constraints/EqualTo.php | 2 +- .../Validator/Constraints/Expression.php | 2 +- .../Component/Validator/Constraints/File.php | 10 +- .../Validator/Constraints/FileValidator.php | 8 +- .../Validator/Constraints/GreaterThan.php | 2 +- .../Constraints/GreaterThanOrEqual.php | 2 +- .../Component/Validator/Constraints/Iban.php | 10 +- .../Validator/Constraints/IdenticalTo.php | 2 +- .../Component/Validator/Constraints/Image.php | 26 ++-- .../Component/Validator/Constraints/Ip.php | 26 ++-- .../Validator/Constraints/IsFalse.php | 2 +- .../Validator/Constraints/IsNull.php | 2 +- .../Validator/Constraints/IsTrue.php | 2 +- .../Component/Validator/Constraints/Isbn.php | 10 +- .../Component/Validator/Constraints/Issn.php | 12 +- .../Component/Validator/Constraints/Json.php | 2 +- .../Validator/Constraints/Language.php | 2 +- .../Validator/Constraints/Length.php | 6 +- .../Validator/Constraints/LessThan.php | 2 +- .../Validator/Constraints/LessThanOrEqual.php | 2 +- .../Validator/Constraints/Locale.php | 2 +- .../Component/Validator/Constraints/Luhn.php | 4 +- .../Validator/Constraints/NotBlank.php | 2 +- .../Constraints/NotCompromisedPassword.php | 2 +- .../Validator/Constraints/NotEqualTo.php | 2 +- .../Validator/Constraints/NotIdenticalTo.php | 2 +- .../Validator/Constraints/NotNull.php | 2 +- .../Component/Validator/Constraints/Range.php | 8 +- .../Component/Validator/Constraints/Regex.php | 2 +- .../Component/Validator/Constraints/Time.php | 4 +- .../Validator/Constraints/TimeValidator.php | 2 +- .../Component/Validator/Constraints/Type.php | 2 +- .../Component/Validator/Constraints/Url.php | 28 ++-- .../Validator/Constraints/UrlValidator.php | 2 +- .../Component/Validator/Constraints/Uuid.php | 22 +-- .../Validator/Constraints/UuidValidator.php | 14 +- .../Validator/Mapping/CascadingStrategy.php | 4 +- .../Mapping/Loader/AbstractLoader.php | 2 +- .../Validator/Mapping/TraversalStrategy.php | 6 +- .../Component/VarDumper/Caster/Caster.php | 26 ++-- .../VarDumper/Caster/ReflectionCaster.php | 2 +- .../Component/VarDumper/Cloner/Cursor.php | 8 +- .../Component/VarDumper/Cloner/Stub.php | 18 +-- .../VarDumper/Dumper/AbstractDumper.php | 8 +- .../Workflow/Dumper/PlantUmlDumper.php | 8 +- .../Component/Workflow/TransitionBlocker.php | 6 +- .../Component/Workflow/WorkflowEvents.php | 14 +- src/Symfony/Component/Yaml/Escaper.php | 2 +- src/Symfony/Component/Yaml/Inline.php | 2 +- src/Symfony/Component/Yaml/Parser.php | 4 +- .../Yaml/Tests/Command/LintCommandTest.php | 2 +- .../Component/Yaml/Tests/ParserTest.php | 6 +- src/Symfony/Component/Yaml/Unescaper.php | 2 +- src/Symfony/Component/Yaml/Yaml.php | 24 +-- src/Symfony/Contracts/Cache/ItemInterface.php | 8 +- 227 files changed, 835 insertions(+), 835 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php index 27bbd984cb..f7d2ae00e5 100644 --- a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php +++ b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php @@ -20,8 +20,8 @@ use Symfony\Component\Stopwatch\Stopwatch; */ class DbalLogger implements SQLLogger { - const MAX_STRING_LENGTH = 32; - const BINARY_DATA_VALUE = '(binary value)'; + public const MAX_STRING_LENGTH = 32; + public const BINARY_DATA_VALUE = '(binary value)'; protected $logger; protected $stopwatch; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php index f7683a579c..f35d3f5acc 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php @@ -37,7 +37,7 @@ use Symfony\Component\Form\Tests\Extension\Core\Type\FormTypeTest; class EntityTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Bridge\Doctrine\Form\Type\EntityType'; + public const TESTED_TYPE = 'Symfony\Bridge\Doctrine\Form\Type\EntityType'; private const ITEM_GROUP_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\GroupableEntity'; private const SINGLE_IDENT_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity'; diff --git a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php index 2c319709eb..3839f14f35 100644 --- a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php +++ b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php @@ -23,7 +23,7 @@ use Symfony\Component\Validator\Constraint; */ class UniqueEntity extends Constraint { - const NOT_UNIQUE_ERROR = '23bd9dbf-6b9b-41cd-a99e-4844bcf3077f'; + public const NOT_UNIQUE_ERROR = '23bd9dbf-6b9b-41cd-a99e-4844bcf3077f'; public $message = 'This value is already used.'; public $service = 'doctrine.orm.validator.unique'; diff --git a/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php b/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php index 8285254e12..be4838a795 100644 --- a/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php +++ b/src/Symfony/Bridge/Monolog/Formatter/ConsoleFormatter.php @@ -27,8 +27,8 @@ use Symfony\Component\VarDumper\Dumper\CliDumper; */ class ConsoleFormatter implements FormatterInterface { - const SIMPLE_FORMAT = "%datetime% %start_tag%%level_name%%end_tag% [%channel%] %message%%context%%extra%\n"; - const SIMPLE_DATE = 'H:i:s'; + public const SIMPLE_FORMAT = "%datetime% %start_tag%%level_name%%end_tag% [%channel%] %message%%context%%extra%\n"; + public const SIMPLE_DATE = 'H:i:s'; private static $levelColorMap = [ Logger::DEBUG => 'fg=white', diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php index cfbdd30fc1..6f264d0bd3 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -27,11 +27,11 @@ class DeprecationErrorHandler /** * @deprecated since Symfony 4.3, use max[self]=0 instead */ - const MODE_WEAK_VENDORS = 'weak_vendors'; + public const MODE_WEAK_VENDORS = 'weak_vendors'; - const MODE_DISABLED = 'disabled'; - const MODE_WEAK = 'max[total]=999999&verbose=0'; - const MODE_STRICT = 'max[total]=0'; + public const MODE_DISABLED = 'disabled'; + public const MODE_WEAK = 'max[total]=999999&verbose=0'; + public const MODE_STRICT = 'max[total]=0'; private $mode; private $configuration; diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php index 9eded1a14e..c83896f61f 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php @@ -21,14 +21,14 @@ use Symfony\Component\ErrorHandler\DebugClassLoader; */ class Deprecation { - const PATH_TYPE_VENDOR = 'path_type_vendor'; - const PATH_TYPE_SELF = 'path_type_internal'; - const PATH_TYPE_UNDETERMINED = 'path_type_undetermined'; + public const PATH_TYPE_VENDOR = 'path_type_vendor'; + public const PATH_TYPE_SELF = 'path_type_internal'; + public const PATH_TYPE_UNDETERMINED = 'path_type_undetermined'; - const TYPE_SELF = 'type_self'; - const TYPE_DIRECT = 'type_direct'; - const TYPE_INDIRECT = 'type_indirect'; - const TYPE_UNDETERMINED = 'type_undetermined'; + public const TYPE_SELF = 'type_self'; + public const TYPE_DIRECT = 'type_direct'; + public const TYPE_INDIRECT = 'type_indirect'; + public const TYPE_UNDETERMINED = 'type_undetermined'; private $trace = []; private $message; diff --git a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php index a72697deb3..b9b5959bbd 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php @@ -27,7 +27,7 @@ use Twig\NodeVisitor\AbstractNodeVisitor; */ class TranslationNodeVisitor extends AbstractNodeVisitor { - const UNDEFINED_DOMAIN = '_undefined'; + public const UNDEFINED_DOMAIN = '_undefined'; private $enabled = false; private $messages = []; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php index f48b4cfe4e..28ffd1ea8b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php @@ -35,9 +35,9 @@ use Symfony\Component\HttpKernel\KernelInterface; */ class AssetsInstallCommand extends Command { - const METHOD_COPY = 'copy'; - const METHOD_ABSOLUTE_SYMLINK = 'absolute symlink'; - const METHOD_RELATIVE_SYMLINK = 'relative symlink'; + public const METHOD_COPY = 'copy'; + public const METHOD_ABSOLUTE_SYMLINK = 'absolute symlink'; + public const METHOD_RELATIVE_SYMLINK = 'relative symlink'; protected static $defaultName = 'assets:install'; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php index e63e3ddb3c..fa20154cf6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php @@ -39,9 +39,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class TranslationDebugCommand extends Command { - const MESSAGE_MISSING = 0; - const MESSAGE_UNUSED = 1; - const MESSAGE_EQUALS_FALLBACK = 2; + public const MESSAGE_MISSING = 0; + public const MESSAGE_UNUSED = 1; + public const MESSAGE_EQUALS_FALLBACK = 2; protected static $defaultName = 'debug:translation'; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Security/EntryPointStub.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Security/EntryPointStub.php index 816457bdc8..56552b99c7 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Security/EntryPointStub.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FirewallEntryPointBundle/Security/EntryPointStub.php @@ -18,7 +18,7 @@ use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface class EntryPointStub implements AuthenticationEntryPointInterface { - const RESPONSE_TEXT = '2be8e651259189d841a19eecdf37e771e2431741'; + public const RESPONSE_TEXT = '2be8e651259189d841a19eecdf37e771e2431741'; public function start(Request $request, AuthenticationException $authException = null): Response { diff --git a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php index fbcdb67826..c89ad0a14c 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php +++ b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php @@ -35,8 +35,8 @@ use Twig\Environment; */ class WebDebugToolbarListener implements EventSubscriberInterface { - const DISABLED = 1; - const ENABLED = 2; + public const DISABLED = 1; + public const ENABLED = 2; protected $twig; protected $urlGenerator; diff --git a/src/Symfony/Bundle/WebServerBundle/WebServer.php b/src/Symfony/Bundle/WebServerBundle/WebServer.php index ec0bd03219..9b9a36b7e8 100644 --- a/src/Symfony/Bundle/WebServerBundle/WebServer.php +++ b/src/Symfony/Bundle/WebServerBundle/WebServer.php @@ -24,8 +24,8 @@ use Symfony\Component\Process\Process; */ class WebServer { - const STARTED = 0; - const STOPPED = 1; + public const STARTED = 0; + public const STOPPED = 1; private $pidFileDirectory; diff --git a/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php index d75231b130..9d5fefa4fb 100644 --- a/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php @@ -25,7 +25,7 @@ use Symfony\Contracts\Cache\TagAwareCacheInterface; */ class TagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface, PruneableInterface, ResettableInterface { - const TAGS_PREFIX = "\0tags\0"; + public const TAGS_PREFIX = "\0tags\0"; use ContractsTrait; use ProxyTrait; diff --git a/src/Symfony/Component/Config/Definition/BaseNode.php b/src/Symfony/Component/Config/Definition/BaseNode.php index 3d7fd85603..b2cc93395a 100644 --- a/src/Symfony/Component/Config/Definition/BaseNode.php +++ b/src/Symfony/Component/Config/Definition/BaseNode.php @@ -24,7 +24,7 @@ use Symfony\Component\Config\Definition\Exception\UnsetKeyException; */ abstract class BaseNode implements NodeInterface { - const DEFAULT_PATH_SEPARATOR = '.'; + public const DEFAULT_PATH_SEPARATOR = '.'; private static $placeholderUniquePrefixes = []; private static $placeholders = []; diff --git a/src/Symfony/Component/Console/ConsoleEvents.php b/src/Symfony/Component/Console/ConsoleEvents.php index 4975643aed..f3c6cad5aa 100644 --- a/src/Symfony/Component/Console/ConsoleEvents.php +++ b/src/Symfony/Component/Console/ConsoleEvents.php @@ -25,7 +25,7 @@ final class ConsoleEvents * * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent") */ - const COMMAND = 'console.command'; + public const COMMAND = 'console.command'; /** * The TERMINATE event allows you to attach listeners after a command is @@ -33,7 +33,7 @@ final class ConsoleEvents * * @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent") */ - const TERMINATE = 'console.terminate'; + public const TERMINATE = 'console.terminate'; /** * The ERROR event occurs when an uncaught exception or error appears. @@ -43,5 +43,5 @@ final class ConsoleEvents * * @Event("Symfony\Component\Console\Event\ConsoleErrorEvent") */ - const ERROR = 'console.error'; + public const ERROR = 'console.error'; } diff --git a/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php b/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php index d361b48901..3192c0f6f2 100644 --- a/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php +++ b/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php @@ -22,7 +22,7 @@ use Symfony\Component\Console\Exception\CommandNotFoundException; */ class ApplicationDescription { - const GLOBAL_NAMESPACE = '_global'; + public const GLOBAL_NAMESPACE = '_global'; private $application; private $namespace; diff --git a/src/Symfony/Component/Console/Event/ConsoleCommandEvent.php b/src/Symfony/Component/Console/Event/ConsoleCommandEvent.php index 79a51906a8..9691db6362 100644 --- a/src/Symfony/Component/Console/Event/ConsoleCommandEvent.php +++ b/src/Symfony/Component/Console/Event/ConsoleCommandEvent.php @@ -23,7 +23,7 @@ class ConsoleCommandEvent extends ConsoleEvent /** * The return code for skipped commands, this will also be passed into the terminate event. */ - const RETURN_CODE_DISABLED = 113; + public const RETURN_CODE_DISABLED = 113; /** * Indicates if the command should be run or skipped. diff --git a/src/Symfony/Component/Console/Input/InputArgument.php b/src/Symfony/Component/Console/Input/InputArgument.php index b6aa6452a0..140c86d0e6 100644 --- a/src/Symfony/Component/Console/Input/InputArgument.php +++ b/src/Symfony/Component/Console/Input/InputArgument.php @@ -21,9 +21,9 @@ use Symfony\Component\Console\Exception\LogicException; */ class InputArgument { - const REQUIRED = 1; - const OPTIONAL = 2; - const IS_ARRAY = 4; + public const REQUIRED = 1; + public const OPTIONAL = 2; + public const IS_ARRAY = 4; private $name; private $mode; diff --git a/src/Symfony/Component/Console/Input/InputOption.php b/src/Symfony/Component/Console/Input/InputOption.php index d62e0aea02..66f857a6c0 100644 --- a/src/Symfony/Component/Console/Input/InputOption.php +++ b/src/Symfony/Component/Console/Input/InputOption.php @@ -21,10 +21,10 @@ use Symfony\Component\Console\Exception\LogicException; */ class InputOption { - const VALUE_NONE = 1; - const VALUE_REQUIRED = 2; - const VALUE_OPTIONAL = 4; - const VALUE_IS_ARRAY = 8; + public const VALUE_NONE = 1; + public const VALUE_REQUIRED = 2; + public const VALUE_OPTIONAL = 4; + public const VALUE_IS_ARRAY = 8; private $name; private $shortcut; diff --git a/src/Symfony/Component/Console/Input/StringInput.php b/src/Symfony/Component/Console/Input/StringInput.php index 6fddf6488d..2890b0f5fc 100644 --- a/src/Symfony/Component/Console/Input/StringInput.php +++ b/src/Symfony/Component/Console/Input/StringInput.php @@ -24,8 +24,8 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; */ class StringInput extends ArgvInput { - const REGEX_STRING = '([^\s]+?)(?:\s|(? 'y', diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php index f7f113b9d8..ec323179eb 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformer.php @@ -20,7 +20,7 @@ use Symfony\Component\Form\Exception\TransformationFailedException; */ class DateTimeToHtml5LocalDateTimeTransformer extends BaseDateTimeTransformer { - const HTML5_FORMAT = 'Y-m-d\\TH:i:s'; + public const HTML5_FORMAT = 'Y-m-d\\TH:i:s'; /** * Transforms a \DateTime into a local date and time string. diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php index 9262b6249c..84ad6d18e1 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php @@ -28,49 +28,49 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface * * Rounds 1.4 to 2 and -1.4 to -1. */ - const ROUND_CEILING = \NumberFormatter::ROUND_CEILING; + public const ROUND_CEILING = \NumberFormatter::ROUND_CEILING; /** * Rounds a number towards negative infinity. * * Rounds 1.4 to 1 and -1.4 to -2. */ - const ROUND_FLOOR = \NumberFormatter::ROUND_FLOOR; + public const ROUND_FLOOR = \NumberFormatter::ROUND_FLOOR; /** * Rounds a number away from zero. * * Rounds 1.4 to 2 and -1.4 to -2. */ - const ROUND_UP = \NumberFormatter::ROUND_UP; + public const ROUND_UP = \NumberFormatter::ROUND_UP; /** * Rounds a number towards zero. * * Rounds 1.4 to 1 and -1.4 to -1. */ - const ROUND_DOWN = \NumberFormatter::ROUND_DOWN; + public const ROUND_DOWN = \NumberFormatter::ROUND_DOWN; /** * Rounds to the nearest number and halves to the next even number. * * Rounds 2.5, 1.6 and 1.5 to 2 and 1.4 to 1. */ - const ROUND_HALF_EVEN = \NumberFormatter::ROUND_HALFEVEN; + public const ROUND_HALF_EVEN = \NumberFormatter::ROUND_HALFEVEN; /** * Rounds to the nearest number and halves away from zero. * * Rounds 2.5 to 3, 1.6 and 1.5 to 2 and 1.4 to 1. */ - const ROUND_HALF_UP = \NumberFormatter::ROUND_HALFUP; + public const ROUND_HALF_UP = \NumberFormatter::ROUND_HALFUP; /** * Rounds to the nearest number and halves towards zero. * * Rounds 2.5 and 1.6 to 2, 1.5 and 1.4 to 1. */ - const ROUND_HALF_DOWN = \NumberFormatter::ROUND_HALFDOWN; + public const ROUND_HALF_DOWN = \NumberFormatter::ROUND_HALFDOWN; protected $grouping; diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php index 9e6d3f94a9..d231af8c75 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/PercentToLocalizedStringTransformer.php @@ -23,8 +23,8 @@ use Symfony\Component\Form\Exception\UnexpectedTypeException; */ class PercentToLocalizedStringTransformer implements DataTransformerInterface { - const FRACTIONAL = 'fractional'; - const INTEGER = 'integer'; + public const FRACTIONAL = 'fractional'; + public const INTEGER = 'integer'; protected static $types = [ self::FRACTIONAL, diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php index 426ecb679a..7989115074 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php @@ -31,14 +31,14 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class DateTimeType extends AbstractType { - const DEFAULT_DATE_FORMAT = \IntlDateFormatter::MEDIUM; - const DEFAULT_TIME_FORMAT = \IntlDateFormatter::MEDIUM; + public const DEFAULT_DATE_FORMAT = \IntlDateFormatter::MEDIUM; + public const DEFAULT_TIME_FORMAT = \IntlDateFormatter::MEDIUM; /** * The HTML5 datetime-local format as defined in * http://w3c.github.io/html-reference/datatypes.html#form.data.datetime-local. */ - const HTML5_FORMAT = "yyyy-MM-dd'T'HH:mm:ss"; + public const HTML5_FORMAT = "yyyy-MM-dd'T'HH:mm:ss"; private static $acceptedFormats = [ \IntlDateFormatter::FULL, diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php index 0d60c3bb28..546331a1b8 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php @@ -28,8 +28,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class DateType extends AbstractType { - const DEFAULT_FORMAT = \IntlDateFormatter::MEDIUM; - const HTML5_FORMAT = 'yyyy-MM-dd'; + public const DEFAULT_FORMAT = \IntlDateFormatter::MEDIUM; + public const HTML5_FORMAT = 'yyyy-MM-dd'; private static $acceptedFormats = [ \IntlDateFormatter::FULL, diff --git a/src/Symfony/Component/Form/Extension/Core/Type/FileType.php b/src/Symfony/Component/Form/Extension/Core/Type/FileType.php index d8b93f6fc7..9dd06af214 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/FileType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/FileType.php @@ -25,8 +25,8 @@ use Symfony\Contracts\Translation\TranslatorInterface; class FileType extends AbstractType { - const KIB_BYTES = 1024; - const MIB_BYTES = 1048576; + public const KIB_BYTES = 1024; + public const MIB_BYTES = 1048576; private static $suffixes = [ 1 => 'bytes', diff --git a/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php b/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php index 7d2d751525..49291e6718 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php +++ b/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php @@ -18,8 +18,8 @@ use Symfony\Component\Validator\Constraint; */ class Form extends Constraint { - const NOT_SYNCHRONIZED_ERROR = '1dafa156-89e1-4736-b832-419c2e501fca'; - const NO_SUCH_FIELD_ERROR = '6e5212ed-a197-4339-99aa-5654798a4854'; + public const NOT_SYNCHRONIZED_ERROR = '1dafa156-89e1-4736-b832-419c2e501fca'; + public const NO_SUCH_FIELD_ERROR = '6e5212ed-a197-4339-99aa-5654798a4854'; protected static $errorNames = [ self::NOT_SYNCHRONIZED_ERROR => 'NOT_SYNCHRONIZED_ERROR', diff --git a/src/Symfony/Component/Form/FormErrorIterator.php b/src/Symfony/Component/Form/FormErrorIterator.php index 86aa26fbfd..b7d74ca2dd 100644 --- a/src/Symfony/Component/Form/FormErrorIterator.php +++ b/src/Symfony/Component/Form/FormErrorIterator.php @@ -33,7 +33,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array /** * The prefix used for indenting nested error messages. */ - const INDENTATION = ' '; + public const INDENTATION = ' '; private $form; private $errors; diff --git a/src/Symfony/Component/Form/FormEvents.php b/src/Symfony/Component/Form/FormEvents.php index 2dc47e6a63..f74b9ff99c 100644 --- a/src/Symfony/Component/Form/FormEvents.php +++ b/src/Symfony/Component/Form/FormEvents.php @@ -31,7 +31,7 @@ final class FormEvents * * @Event("Symfony\Component\Form\Event\PreSubmitEvent") */ - const PRE_SUBMIT = 'form.pre_submit'; + public const PRE_SUBMIT = 'form.pre_submit'; /** * The SUBMIT event is dispatched after the Form::submit() method @@ -50,7 +50,7 @@ final class FormEvents * * @Event("Symfony\Component\Form\Event\SubmitEvent") */ - const SUBMIT = 'form.submit'; + public const SUBMIT = 'form.submit'; /** * The FormEvents::POST_SUBMIT event is dispatched at the very end of the Form::submit(). @@ -65,7 +65,7 @@ final class FormEvents * * @Event("Symfony\Component\Form\Event\PostSubmitEvent") */ - const POST_SUBMIT = 'form.post_submit'; + public const POST_SUBMIT = 'form.post_submit'; /** * The FormEvents::PRE_SET_DATA event is dispatched at the beginning of the Form::setData() method. @@ -76,7 +76,7 @@ final class FormEvents * * @Event("Symfony\Component\Form\Event\PreSetDataEvent") */ - const PRE_SET_DATA = 'form.pre_set_data'; + public const PRE_SET_DATA = 'form.pre_set_data'; /** * The FormEvents::POST_SET_DATA event is dispatched at the end of the Form::setData() method. @@ -86,7 +86,7 @@ final class FormEvents * * @Event("Symfony\Component\Form\Event\PostSetDataEvent") */ - const POST_SET_DATA = 'form.post_set_data'; + public const POST_SET_DATA = 'form.post_set_data'; private function __construct() { diff --git a/src/Symfony/Component/Form/FormRenderer.php b/src/Symfony/Component/Form/FormRenderer.php index 77db252013..64e7cf3746 100644 --- a/src/Symfony/Component/Form/FormRenderer.php +++ b/src/Symfony/Component/Form/FormRenderer.php @@ -23,7 +23,7 @@ use Twig\Environment; */ class FormRenderer implements FormRendererInterface { - const CACHE_KEY_VAR = 'unique_block_prefix'; + public const CACHE_KEY_VAR = 'unique_block_prefix'; private $engine; private $csrfTokenManager; diff --git a/src/Symfony/Component/Form/Guess/Guess.php b/src/Symfony/Component/Form/Guess/Guess.php index 83facb7551..81ed8e1998 100644 --- a/src/Symfony/Component/Form/Guess/Guess.php +++ b/src/Symfony/Component/Form/Guess/Guess.php @@ -27,22 +27,22 @@ abstract class Guess /** * Marks an instance with a value that is extremely likely to be correct. */ - const VERY_HIGH_CONFIDENCE = 3; + public const VERY_HIGH_CONFIDENCE = 3; /** * Marks an instance with a value that is very likely to be correct. */ - const HIGH_CONFIDENCE = 2; + public const HIGH_CONFIDENCE = 2; /** * Marks an instance with a value that is likely to be correct. */ - const MEDIUM_CONFIDENCE = 1; + public const MEDIUM_CONFIDENCE = 1; /** * Marks an instance with a value that may be correct. */ - const LOW_CONFIDENCE = 0; + public const LOW_CONFIDENCE = 0; /** * The confidence about the correctness of the value. diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/BaseTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/BaseTypeTest.php index 20618bba39..b1167576cb 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/BaseTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/BaseTypeTest.php @@ -21,7 +21,7 @@ abstract class BaseTypeTest extends TypeTestCase { use VersionAwareTest; - const TESTED_TYPE = ''; + public const TESTED_TYPE = ''; public function testPassDisabledAsOption() { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/BirthdayTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/BirthdayTypeTest.php index 8fef1d154b..3ca4cf07a7 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/BirthdayTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/BirthdayTypeTest.php @@ -16,7 +16,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; */ class BirthdayTypeTest extends DateTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\BirthdayType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\BirthdayType'; public function testSetInvalidYearsOption() { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ButtonTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ButtonTypeTest.php index 9ed86fe459..ed1957c7c9 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ButtonTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ButtonTypeTest.php @@ -16,7 +16,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; */ class ButtonTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\ButtonType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\ButtonType'; public function testCreateButtonInstances() { 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 e12347405d..6f872bbd73 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php @@ -15,7 +15,7 @@ use Symfony\Component\Form\CallbackTransformer; class CheckboxTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CheckboxType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CheckboxType'; public function testDataIsFalseByDefault() { 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 547e86fbfb..c7d40ed2e1 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php @@ -16,7 +16,7 @@ use Symfony\Component\Form\ChoiceList\View\ChoiceView; class ChoiceTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\ChoiceType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\ChoiceType'; private $choices = [ 'Bernhard' => 'a', diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php index 583a7c4f8b..6f0510c08b 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php @@ -16,7 +16,7 @@ use Symfony\Component\Form\Tests\Fixtures\AuthorType; class CollectionTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CollectionType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CollectionType'; public function testContainsNoChildByDefault() { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php index ca8ffe3e8c..f8a777b53b 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php @@ -17,7 +17,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper; class CountryTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CountryType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CountryType'; protected function setUp(): void { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php index 57a67a292b..7380103de9 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php @@ -17,7 +17,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper; class CurrencyTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CurrencyType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\CurrencyType'; protected function setUp(): void { 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 4add8b13bf..efbb47bea5 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php @@ -17,7 +17,7 @@ use Symfony\Component\Form\FormInterface; class DateIntervalTypeTest extends BaseTypeTest { - const TESTED_TYPE = DateIntervalType::class; + public const TESTED_TYPE = DateIntervalType::class; public function testSubmitDateInterval() { 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 f4ac8f1523..9074e5a7a7 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php @@ -16,7 +16,7 @@ use Symfony\Component\Form\FormInterface; class DateTimeTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\DateTimeType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\DateTimeType'; protected function setUp(): void { 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 63175fc0be..054b46780d 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php @@ -18,7 +18,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper; class DateTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\DateType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\DateType'; private $defaultTimezone; private $defaultLocale; 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 7c6e639354..7d3957e942 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php @@ -21,7 +21,7 @@ use Symfony\Contracts\Translation\TranslatorInterface; class FileTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\FileType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\FileType'; protected function getExtensions() { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php index 066bed2174..beba0729b0 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php @@ -59,7 +59,7 @@ class FormTest_AuthorWithoutRefSetter class FormTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\FormType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\FormType'; public function testCreateFormInstances() { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php index 19c730b354..a88eb70c5f 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php @@ -15,7 +15,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper; class IntegerTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\IntegerType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\IntegerType'; protected function setUp(): void { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php index 13c90dd859..e29ca06b0c 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php @@ -17,7 +17,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper; class LanguageTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\LanguageType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\LanguageType'; protected function setUp(): void { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php index fc3ae4d540..3364fd9f4c 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php @@ -17,7 +17,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper; class LocaleTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\LocaleType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\LocaleType'; protected function setUp(): void { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php index 8dd08bd7bd..9cb5ac0ce7 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php @@ -15,7 +15,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper; class MoneyTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\MoneyType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\MoneyType'; private $defaultLocale; diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php index d67dab2f09..297463d70b 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php @@ -15,7 +15,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper; class NumberTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\NumberType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\NumberType'; private $defaultLocale; diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php index 872311b91d..29756f17b9 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php @@ -13,7 +13,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; class PasswordTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\PasswordType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\PasswordType'; public function testEmptyIfNotSubmitted() { 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 a70f650216..04e53697ae 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php @@ -16,7 +16,7 @@ use Symfony\Component\Form\Tests\Fixtures\NotMappedType; class RepeatedTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\RepeatedType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\RepeatedType'; /** * @var Form diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/SubmitTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/SubmitTypeTest.php index ea9c9d38dc..5b12ced9f2 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/SubmitTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/SubmitTypeTest.php @@ -16,7 +16,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; */ class SubmitTypeTest extends ButtonTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\SubmitType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\SubmitType'; public function testCreateSubmitButtonInstances() { 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 42853f607f..3f8fbe7725 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php @@ -13,7 +13,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; class TextTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\TextType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\TextType'; public function testSubmitNull($expected = null, $norm = null, $view = null) { 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 34b843ed24..433a7456ae 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php @@ -17,7 +17,7 @@ use Symfony\Component\Form\FormInterface; class TimeTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\TimeType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\TimeType'; public function testSubmitDateTime() { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php index 3f34b2eb5e..c7dc10f05b 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php @@ -16,7 +16,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper; class TimezoneTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\TimezoneType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\TimezoneType'; public function testTimezonesAreSelectable() { diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php index 74c4efb82f..5a829c95bb 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php @@ -13,7 +13,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; class UrlTypeTest extends TextTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\UrlType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\UrlType'; public function testSubmitAddsDefaultProtocolIfNoneIsIncluded() { 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 aea4c064b3..7d0dc1958b 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/WeekTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/WeekTypeTest.php @@ -15,7 +15,7 @@ use Symfony\Component\Form\FormError; class WeekTypeTest extends BaseTypeTest { - const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\WeekType'; + public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\WeekType'; public function testSubmitArray() { diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php index 6b83a42895..10cc93d8f3 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php @@ -41,9 +41,9 @@ use Symfony\Component\Validator\Tests\Fixtures\FakeMetadataFactory; */ class ValidatorTypeGuesserTest extends TestCase { - const TEST_CLASS = 'Symfony\Component\Form\Tests\Extension\Validator\ValidatorTypeGuesserTest_TestClass'; + public const TEST_CLASS = 'Symfony\Component\Form\Tests\Extension\Validator\ValidatorTypeGuesserTest_TestClass'; - const TEST_PROPERTY = 'property'; + public const TEST_PROPERTY = 'property'; /** * @var ValidatorTypeGuesser diff --git a/src/Symfony/Component/HttpFoundation/Cookie.php b/src/Symfony/Component/HttpFoundation/Cookie.php index 70eb5ea884..4a15bc997d 100644 --- a/src/Symfony/Component/HttpFoundation/Cookie.php +++ b/src/Symfony/Component/HttpFoundation/Cookie.php @@ -18,9 +18,9 @@ namespace Symfony\Component\HttpFoundation; */ class Cookie { - const SAMESITE_NONE = 'none'; - const SAMESITE_LAX = 'lax'; - const SAMESITE_STRICT = 'strict'; + public const SAMESITE_NONE = 'none'; + public const SAMESITE_LAX = 'lax'; + public const SAMESITE_STRICT = 'strict'; protected $name; protected $value; diff --git a/src/Symfony/Component/HttpFoundation/JsonResponse.php b/src/Symfony/Component/HttpFoundation/JsonResponse.php index 606e244daf..9786a473ca 100644 --- a/src/Symfony/Component/HttpFoundation/JsonResponse.php +++ b/src/Symfony/Component/HttpFoundation/JsonResponse.php @@ -29,7 +29,7 @@ class JsonResponse extends Response // Encode <, >, ', &, and " characters in the JSON, making it also safe to be embedded into HTML. // 15 === JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT - const DEFAULT_ENCODING_OPTIONS = 15; + public const DEFAULT_ENCODING_OPTIONS = 15; protected $encodingOptions = self::DEFAULT_ENCODING_OPTIONS; diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index d03c12a61b..1f89b2db3c 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -38,24 +38,24 @@ class_exists(ServerBag::class); */ class Request { - const HEADER_FORWARDED = 0b00001; // When using RFC 7239 - const HEADER_X_FORWARDED_FOR = 0b00010; - const HEADER_X_FORWARDED_HOST = 0b00100; - const HEADER_X_FORWARDED_PROTO = 0b01000; - const HEADER_X_FORWARDED_PORT = 0b10000; - const HEADER_X_FORWARDED_ALL = 0b11110; // All "X-Forwarded-*" headers - const HEADER_X_FORWARDED_AWS_ELB = 0b11010; // AWS ELB doesn't send X-Forwarded-Host + public const HEADER_FORWARDED = 0b00001; // When using RFC 7239 + public const HEADER_X_FORWARDED_FOR = 0b00010; + public const HEADER_X_FORWARDED_HOST = 0b00100; + public const HEADER_X_FORWARDED_PROTO = 0b01000; + public const HEADER_X_FORWARDED_PORT = 0b10000; + public const HEADER_X_FORWARDED_ALL = 0b11110; // All "X-Forwarded-*" headers + public const HEADER_X_FORWARDED_AWS_ELB = 0b11010; // AWS ELB doesn't send X-Forwarded-Host - const METHOD_HEAD = 'HEAD'; - const METHOD_GET = 'GET'; - const METHOD_POST = 'POST'; - const METHOD_PUT = 'PUT'; - const METHOD_PATCH = 'PATCH'; - const METHOD_DELETE = 'DELETE'; - const METHOD_PURGE = 'PURGE'; - const METHOD_OPTIONS = 'OPTIONS'; - const METHOD_TRACE = 'TRACE'; - const METHOD_CONNECT = 'CONNECT'; + public const METHOD_HEAD = 'HEAD'; + public const METHOD_GET = 'GET'; + public const METHOD_POST = 'POST'; + public const METHOD_PUT = 'PUT'; + public const METHOD_PATCH = 'PATCH'; + public const METHOD_DELETE = 'DELETE'; + public const METHOD_PURGE = 'PURGE'; + public const METHOD_OPTIONS = 'OPTIONS'; + public const METHOD_TRACE = 'TRACE'; + public const METHOD_CONNECT = 'CONNECT'; /** * @var string[] diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index e64b272946..14c3652851 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -21,74 +21,74 @@ class_exists(ResponseHeaderBag::class); */ class Response { - const HTTP_CONTINUE = 100; - const HTTP_SWITCHING_PROTOCOLS = 101; - const HTTP_PROCESSING = 102; // RFC2518 - const HTTP_EARLY_HINTS = 103; // RFC8297 - const HTTP_OK = 200; - const HTTP_CREATED = 201; - const HTTP_ACCEPTED = 202; - const HTTP_NON_AUTHORITATIVE_INFORMATION = 203; - const HTTP_NO_CONTENT = 204; - const HTTP_RESET_CONTENT = 205; - const HTTP_PARTIAL_CONTENT = 206; - const HTTP_MULTI_STATUS = 207; // RFC4918 - const HTTP_ALREADY_REPORTED = 208; // RFC5842 - const HTTP_IM_USED = 226; // RFC3229 - const HTTP_MULTIPLE_CHOICES = 300; - const HTTP_MOVED_PERMANENTLY = 301; - const HTTP_FOUND = 302; - const HTTP_SEE_OTHER = 303; - const HTTP_NOT_MODIFIED = 304; - const HTTP_USE_PROXY = 305; - const HTTP_RESERVED = 306; - const HTTP_TEMPORARY_REDIRECT = 307; - const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238 - const HTTP_BAD_REQUEST = 400; - const HTTP_UNAUTHORIZED = 401; - const HTTP_PAYMENT_REQUIRED = 402; - const HTTP_FORBIDDEN = 403; - const HTTP_NOT_FOUND = 404; - const HTTP_METHOD_NOT_ALLOWED = 405; - const HTTP_NOT_ACCEPTABLE = 406; - const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407; - const HTTP_REQUEST_TIMEOUT = 408; - const HTTP_CONFLICT = 409; - const HTTP_GONE = 410; - const HTTP_LENGTH_REQUIRED = 411; - const HTTP_PRECONDITION_FAILED = 412; - const HTTP_REQUEST_ENTITY_TOO_LARGE = 413; - const HTTP_REQUEST_URI_TOO_LONG = 414; - const HTTP_UNSUPPORTED_MEDIA_TYPE = 415; - const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416; - const HTTP_EXPECTATION_FAILED = 417; - const HTTP_I_AM_A_TEAPOT = 418; // RFC2324 - const HTTP_MISDIRECTED_REQUEST = 421; // RFC7540 - const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918 - const HTTP_LOCKED = 423; // RFC4918 - const HTTP_FAILED_DEPENDENCY = 424; // RFC4918 + public const HTTP_CONTINUE = 100; + public const HTTP_SWITCHING_PROTOCOLS = 101; + public const HTTP_PROCESSING = 102; // RFC2518 + public const HTTP_EARLY_HINTS = 103; // RFC8297 + public const HTTP_OK = 200; + public const HTTP_CREATED = 201; + public const HTTP_ACCEPTED = 202; + public const HTTP_NON_AUTHORITATIVE_INFORMATION = 203; + public const HTTP_NO_CONTENT = 204; + public const HTTP_RESET_CONTENT = 205; + public const HTTP_PARTIAL_CONTENT = 206; + public const HTTP_MULTI_STATUS = 207; // RFC4918 + public const HTTP_ALREADY_REPORTED = 208; // RFC5842 + public const HTTP_IM_USED = 226; // RFC3229 + public const HTTP_MULTIPLE_CHOICES = 300; + public const HTTP_MOVED_PERMANENTLY = 301; + public const HTTP_FOUND = 302; + public const HTTP_SEE_OTHER = 303; + public const HTTP_NOT_MODIFIED = 304; + public const HTTP_USE_PROXY = 305; + public const HTTP_RESERVED = 306; + public const HTTP_TEMPORARY_REDIRECT = 307; + public const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238 + public const HTTP_BAD_REQUEST = 400; + public const HTTP_UNAUTHORIZED = 401; + public const HTTP_PAYMENT_REQUIRED = 402; + public const HTTP_FORBIDDEN = 403; + public const HTTP_NOT_FOUND = 404; + public const HTTP_METHOD_NOT_ALLOWED = 405; + public const HTTP_NOT_ACCEPTABLE = 406; + public const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407; + public const HTTP_REQUEST_TIMEOUT = 408; + public const HTTP_CONFLICT = 409; + public const HTTP_GONE = 410; + public const HTTP_LENGTH_REQUIRED = 411; + public const HTTP_PRECONDITION_FAILED = 412; + public const HTTP_REQUEST_ENTITY_TOO_LARGE = 413; + public const HTTP_REQUEST_URI_TOO_LONG = 414; + public const HTTP_UNSUPPORTED_MEDIA_TYPE = 415; + public const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416; + public const HTTP_EXPECTATION_FAILED = 417; + public const HTTP_I_AM_A_TEAPOT = 418; // RFC2324 + public const HTTP_MISDIRECTED_REQUEST = 421; // RFC7540 + public const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918 + public const HTTP_LOCKED = 423; // RFC4918 + public const HTTP_FAILED_DEPENDENCY = 424; // RFC4918 /** * @deprecated */ - const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; // RFC2817 - const HTTP_TOO_EARLY = 425; // RFC-ietf-httpbis-replay-04 - const HTTP_UPGRADE_REQUIRED = 426; // RFC2817 - const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585 - const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585 - const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585 - const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451; - const HTTP_INTERNAL_SERVER_ERROR = 500; - const HTTP_NOT_IMPLEMENTED = 501; - const HTTP_BAD_GATEWAY = 502; - const HTTP_SERVICE_UNAVAILABLE = 503; - const HTTP_GATEWAY_TIMEOUT = 504; - const HTTP_VERSION_NOT_SUPPORTED = 505; - const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; // RFC2295 - const HTTP_INSUFFICIENT_STORAGE = 507; // RFC4918 - const HTTP_LOOP_DETECTED = 508; // RFC5842 - const HTTP_NOT_EXTENDED = 510; // RFC2774 - const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; // RFC6585 + public const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; // RFC2817 + public const HTTP_TOO_EARLY = 425; // RFC-ietf-httpbis-replay-04 + public const HTTP_UPGRADE_REQUIRED = 426; // RFC2817 + public const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585 + public const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585 + public const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585 + public const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451; + public const HTTP_INTERNAL_SERVER_ERROR = 500; + public const HTTP_NOT_IMPLEMENTED = 501; + public const HTTP_BAD_GATEWAY = 502; + public const HTTP_SERVICE_UNAVAILABLE = 503; + public const HTTP_GATEWAY_TIMEOUT = 504; + public const HTTP_VERSION_NOT_SUPPORTED = 505; + public const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; // RFC2295 + public const HTTP_INSUFFICIENT_STORAGE = 507; // RFC4918 + public const HTTP_LOOP_DETECTED = 508; // RFC5842 + public const HTTP_NOT_EXTENDED = 510; // RFC2774 + public const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; // RFC6585 /** * @var ResponseHeaderBag diff --git a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php index e71034abac..3c5889cacf 100644 --- a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php +++ b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php @@ -18,11 +18,11 @@ namespace Symfony\Component\HttpFoundation; */ class ResponseHeaderBag extends HeaderBag { - const COOKIES_FLAT = 'flat'; - const COOKIES_ARRAY = 'array'; + public const COOKIES_FLAT = 'flat'; + public const COOKIES_ARRAY = 'array'; - const DISPOSITION_ATTACHMENT = 'attachment'; - const DISPOSITION_INLINE = 'inline'; + public const DISPOSITION_ATTACHMENT = 'attachment'; + public const DISPOSITION_INLINE = 'inline'; protected $computedCacheControl = []; protected $cookies = []; diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php index 01b4120519..e579c4ab1b 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -46,7 +46,7 @@ class PdoSessionHandler extends AbstractSessionHandler * write will win in this case. It might be useful when you implement your own * logic to deal with this like an optimistic approach. */ - const LOCK_NONE = 0; + public const LOCK_NONE = 0; /** * Creates an application-level lock on a session. The disadvantage is that the @@ -55,7 +55,7 @@ class PdoSessionHandler extends AbstractSessionHandler * does not require a transaction. * This mode is not available for SQLite and not yet implemented for oci and sqlsrv. */ - const LOCK_ADVISORY = 1; + public const LOCK_ADVISORY = 1; /** * Issues a real row lock. Since it uses a transaction between opening and @@ -63,7 +63,7 @@ class PdoSessionHandler extends AbstractSessionHandler * that you also use for your application logic. This mode is the default because * it's the only reliable solution across DBMSs. */ - const LOCK_TRANSACTIONAL = 2; + public const LOCK_TRANSACTIONAL = 2; private const MAX_LIFETIME = 315576000; diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php index 5fe40fc106..c3090d7378 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php @@ -22,9 +22,9 @@ use Symfony\Component\HttpFoundation\Session\SessionBagInterface; */ class MetadataBag implements SessionBagInterface { - const CREATED = 'c'; - const UPDATED = 'u'; - const LIFETIME = 'l'; + public const CREATED = 'c'; + public const UPDATED = 'u'; + public const LIFETIME = 'l'; /** * @var string diff --git a/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php b/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php index ce38d88608..0e99ee55c2 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php @@ -37,7 +37,7 @@ use Symfony\Component\HttpKernel\KernelEvents; */ abstract class AbstractSessionListener implements EventSubscriberInterface { - const NO_AUTO_CACHE_CONTROL_HEADER = 'Symfony-Session-NoAutoCacheControl'; + public const NO_AUTO_CACHE_CONTROL_HEADER = 'Symfony-Session-NoAutoCacheControl'; protected $container; private $sessionUsageStack = []; diff --git a/src/Symfony/Component/HttpKernel/HttpKernelInterface.php b/src/Symfony/Component/HttpKernel/HttpKernelInterface.php index 7595d29d04..85fedbbe26 100644 --- a/src/Symfony/Component/HttpKernel/HttpKernelInterface.php +++ b/src/Symfony/Component/HttpKernel/HttpKernelInterface.php @@ -21,8 +21,8 @@ use Symfony\Component\HttpFoundation\Response; */ interface HttpKernelInterface { - const MASTER_REQUEST = 1; - const SUB_REQUEST = 2; + public const MASTER_REQUEST = 1; + public const SUB_REQUEST = 2; /** * Handles a Request to convert it to a Response. diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 2eaf01573a..18fbb9ebe7 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -76,15 +76,15 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private static $freshCache = []; - const VERSION = '4.4.18-DEV'; - const VERSION_ID = 40418; - const MAJOR_VERSION = 4; - const MINOR_VERSION = 4; - const RELEASE_VERSION = 18; - const EXTRA_VERSION = 'DEV'; + public const VERSION = '4.4.18-DEV'; + public const VERSION_ID = 40418; + public const MAJOR_VERSION = 4; + public const MINOR_VERSION = 4; + public const RELEASE_VERSION = 18; + public const EXTRA_VERSION = 'DEV'; - const END_OF_MAINTENANCE = '11/2022'; - const END_OF_LIFE = '11/2023'; + public const END_OF_MAINTENANCE = '11/2022'; + public const END_OF_LIFE = '11/2023'; public function __construct(string $environment, bool $debug) { diff --git a/src/Symfony/Component/HttpKernel/KernelEvents.php b/src/Symfony/Component/HttpKernel/KernelEvents.php index 682561c324..b16141c602 100644 --- a/src/Symfony/Component/HttpKernel/KernelEvents.php +++ b/src/Symfony/Component/HttpKernel/KernelEvents.php @@ -27,7 +27,7 @@ final class KernelEvents * * @Event("Symfony\Component\HttpKernel\Event\RequestEvent") */ - const REQUEST = 'kernel.request'; + public const REQUEST = 'kernel.request'; /** * The EXCEPTION event occurs when an uncaught exception appears. @@ -37,7 +37,7 @@ final class KernelEvents * * @Event("Symfony\Component\HttpKernel\Event\ExceptionEvent") */ - const EXCEPTION = 'kernel.exception'; + public const EXCEPTION = 'kernel.exception'; /** * The VIEW event occurs when the return value of a controller @@ -48,7 +48,7 @@ final class KernelEvents * * @Event("Symfony\Component\HttpKernel\Event\ViewEvent") */ - const VIEW = 'kernel.view'; + public const VIEW = 'kernel.view'; /** * The CONTROLLER event occurs once a controller was found for @@ -59,7 +59,7 @@ final class KernelEvents * * @Event("Symfony\Component\HttpKernel\Event\ControllerEvent") */ - const CONTROLLER = 'kernel.controller'; + public const CONTROLLER = 'kernel.controller'; /** * The CONTROLLER_ARGUMENTS event occurs once controller arguments have been resolved. @@ -69,7 +69,7 @@ final class KernelEvents * * @Event("Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent") */ - const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments'; + public const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments'; /** * The RESPONSE event occurs once a response was created for @@ -80,7 +80,7 @@ final class KernelEvents * * @Event("Symfony\Component\HttpKernel\Event\ResponseEvent") */ - const RESPONSE = 'kernel.response'; + public const RESPONSE = 'kernel.response'; /** * The TERMINATE event occurs once a response was sent. @@ -89,7 +89,7 @@ final class KernelEvents * * @Event("Symfony\Component\HttpKernel\Event\TerminateEvent") */ - const TERMINATE = 'kernel.terminate'; + public const TERMINATE = 'kernel.terminate'; /** * The FINISH_REQUEST event occurs when a response was generated for a request. @@ -99,5 +99,5 @@ final class KernelEvents * * @Event("Symfony\Component\HttpKernel\Event\FinishRequestEvent") */ - const FINISH_REQUEST = 'kernel.finish_request'; + public const FINISH_REQUEST = 'kernel.finish_request'; } diff --git a/src/Symfony/Component/Intl/Collator/Collator.php b/src/Symfony/Component/Intl/Collator/Collator.php index 50697bb6b5..4e15eeed26 100644 --- a/src/Symfony/Component/Intl/Collator/Collator.php +++ b/src/Symfony/Component/Intl/Collator/Collator.php @@ -36,38 +36,38 @@ use Symfony\Component\Intl\Locale\Locale; abstract class Collator { /* Attribute constants */ - const FRENCH_COLLATION = 0; - const ALTERNATE_HANDLING = 1; - const CASE_FIRST = 2; - const CASE_LEVEL = 3; - const NORMALIZATION_MODE = 4; - const STRENGTH = 5; - const HIRAGANA_QUATERNARY_MODE = 6; - const NUMERIC_COLLATION = 7; + public const FRENCH_COLLATION = 0; + public const ALTERNATE_HANDLING = 1; + public const CASE_FIRST = 2; + public const CASE_LEVEL = 3; + public const NORMALIZATION_MODE = 4; + public const STRENGTH = 5; + public const HIRAGANA_QUATERNARY_MODE = 6; + public const NUMERIC_COLLATION = 7; /* Attribute constants values */ - const DEFAULT_VALUE = -1; + public const DEFAULT_VALUE = -1; - const PRIMARY = 0; - const SECONDARY = 1; - const TERTIARY = 2; - const DEFAULT_STRENGTH = 2; - const QUATERNARY = 3; - const IDENTICAL = 15; + public const PRIMARY = 0; + public const SECONDARY = 1; + public const TERTIARY = 2; + public const DEFAULT_STRENGTH = 2; + public const QUATERNARY = 3; + public const IDENTICAL = 15; - const OFF = 16; - const ON = 17; + public const OFF = 16; + public const ON = 17; - const SHIFTED = 20; - const NON_IGNORABLE = 21; + public const SHIFTED = 20; + public const NON_IGNORABLE = 21; - const LOWER_FIRST = 24; - const UPPER_FIRST = 25; + public const LOWER_FIRST = 24; + public const UPPER_FIRST = 25; /* Sorting options */ - const SORT_REGULAR = 0; - const SORT_NUMERIC = 2; - const SORT_STRING = 1; + public const SORT_REGULAR = 0; + public const SORT_NUMERIC = 2; + public const SORT_STRING = 1; /** * @param string|null $locale The locale code. The only currently supported locale is "en" (or null using the default locale, i.e. "en") diff --git a/src/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.php b/src/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.php index f4e32d1537..4314bd85aa 100644 --- a/src/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.php +++ b/src/Symfony/Component/Intl/Data/Provider/CurrencyDataProvider.php @@ -23,10 +23,10 @@ use Symfony\Component\Intl\Exception\MissingResourceException; */ class CurrencyDataProvider { - const INDEX_SYMBOL = 0; - const INDEX_NAME = 1; - const INDEX_FRACTION_DIGITS = 0; - const INDEX_ROUNDING_INCREMENT = 1; + public const INDEX_SYMBOL = 0; + public const INDEX_NAME = 1; + public const INDEX_FRACTION_DIGITS = 0; + public const INDEX_ROUNDING_INCREMENT = 1; private $path; private $reader; diff --git a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php index 6f42964bd7..d77c094117 100644 --- a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php +++ b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php @@ -63,15 +63,15 @@ abstract class IntlDateFormatter protected $errorMessage = 'U_ZERO_ERROR'; /* date/time format types */ - const NONE = -1; - const FULL = 0; - const LONG = 1; - const MEDIUM = 2; - const SHORT = 3; + public const NONE = -1; + public const FULL = 0; + public const LONG = 1; + public const MEDIUM = 2; + public const SHORT = 3; /* calendar formats */ - const TRADITIONAL = 0; - const GREGORIAN = 1; + public const TRADITIONAL = 0; + public const GREGORIAN = 1; /** * Patterns used to format the date when no pattern is provided. diff --git a/src/Symfony/Component/Intl/Exception/NotImplementedException.php b/src/Symfony/Component/Intl/Exception/NotImplementedException.php index 1413886b3e..1bae867f6f 100644 --- a/src/Symfony/Component/Intl/Exception/NotImplementedException.php +++ b/src/Symfony/Component/Intl/Exception/NotImplementedException.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Intl\Exception; */ class NotImplementedException extends RuntimeException { - const INTL_INSTALL_MESSAGE = 'Please install the "intl" extension for full localization capabilities.'; + public const INTL_INSTALL_MESSAGE = 'Please install the "intl" extension for full localization capabilities.'; /** * @param string $message The exception message. A note to install the intl extension is appended to this string diff --git a/src/Symfony/Component/Intl/Globals/IntlGlobals.php b/src/Symfony/Component/Intl/Globals/IntlGlobals.php index d353368900..6113523e37 100644 --- a/src/Symfony/Component/Intl/Globals/IntlGlobals.php +++ b/src/Symfony/Component/Intl/Globals/IntlGlobals.php @@ -23,17 +23,17 @@ abstract class IntlGlobals /** * Indicates that no error occurred. */ - const U_ZERO_ERROR = 0; + public const U_ZERO_ERROR = 0; /** * Indicates that an invalid argument was passed. */ - const U_ILLEGAL_ARGUMENT_ERROR = 1; + public const U_ILLEGAL_ARGUMENT_ERROR = 1; /** * Indicates that the parse() operation failed. */ - const U_PARSE_ERROR = 9; + public const U_PARSE_ERROR = 9; /** * All known error codes. diff --git a/src/Symfony/Component/Intl/Intl.php b/src/Symfony/Component/Intl/Intl.php index d3fa46dbe6..e80cd4bd4d 100644 --- a/src/Symfony/Component/Intl/Intl.php +++ b/src/Symfony/Component/Intl/Intl.php @@ -37,32 +37,32 @@ final class Intl * The number of resource bundles to buffer. Loading the same resource * bundle for n locales takes up n spots in the buffer. */ - const BUFFER_SIZE = 10; + public const BUFFER_SIZE = 10; /** * The directory name of the currency data. */ - const CURRENCY_DIR = 'currencies'; + public const CURRENCY_DIR = 'currencies'; /** * The directory name of the language data. */ - const LANGUAGE_DIR = 'languages'; + public const LANGUAGE_DIR = 'languages'; /** * The directory name of the script data. */ - const SCRIPT_DIR = 'scripts'; + public const SCRIPT_DIR = 'scripts'; /** * The directory name of the locale data. */ - const LOCALE_DIR = 'locales'; + public const LOCALE_DIR = 'locales'; /** * The directory name of the region data. */ - const REGION_DIR = 'regions'; + public const REGION_DIR = 'regions'; /** * The directory name of the zone data. diff --git a/src/Symfony/Component/Intl/Locale/Locale.php b/src/Symfony/Component/Intl/Locale/Locale.php index 17cdd3ad09..9637b6f61b 100644 --- a/src/Symfony/Component/Intl/Locale/Locale.php +++ b/src/Symfony/Component/Intl/Locale/Locale.php @@ -26,20 +26,20 @@ use Symfony\Component\Intl\Exception\MethodNotImplementedException; */ abstract class Locale { - const DEFAULT_LOCALE = null; + public const DEFAULT_LOCALE = null; /* Locale method constants */ - const ACTUAL_LOCALE = 0; - const VALID_LOCALE = 1; + public const ACTUAL_LOCALE = 0; + public const VALID_LOCALE = 1; /* Language tags constants */ - const LANG_TAG = 'language'; - const EXTLANG_TAG = 'extlang'; - const SCRIPT_TAG = 'script'; - const REGION_TAG = 'region'; - const VARIANT_TAG = 'variant'; - const GRANDFATHERED_LANG_TAG = 'grandfathered'; - const PRIVATE_TAG = 'private'; + public const LANG_TAG = 'language'; + public const EXTLANG_TAG = 'extlang'; + public const SCRIPT_TAG = 'script'; + public const REGION_TAG = 'region'; + public const VARIANT_TAG = 'variant'; + public const GRANDFATHERED_LANG_TAG = 'grandfathered'; + public const PRIVATE_TAG = 'private'; /** * Not supported. Returns the best available locale based on HTTP "Accept-Language" header according to RFC 2616. diff --git a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php index 8350bc4e4a..b6cad37226 100644 --- a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php +++ b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php @@ -43,91 +43,91 @@ use Symfony\Component\Intl\Locale\Locale; abstract class NumberFormatter { /* Format style constants */ - const PATTERN_DECIMAL = 0; - const DECIMAL = 1; - const CURRENCY = 2; - const PERCENT = 3; - const SCIENTIFIC = 4; - const SPELLOUT = 5; - const ORDINAL = 6; - const DURATION = 7; - const PATTERN_RULEBASED = 9; - const IGNORE = 0; - const DEFAULT_STYLE = 1; + public const PATTERN_DECIMAL = 0; + public const DECIMAL = 1; + public const CURRENCY = 2; + public const PERCENT = 3; + public const SCIENTIFIC = 4; + public const SPELLOUT = 5; + public const ORDINAL = 6; + public const DURATION = 7; + public const PATTERN_RULEBASED = 9; + public const IGNORE = 0; + public const DEFAULT_STYLE = 1; /* Format type constants */ - const TYPE_DEFAULT = 0; - const TYPE_INT32 = 1; - const TYPE_INT64 = 2; - const TYPE_DOUBLE = 3; - const TYPE_CURRENCY = 4; + public const TYPE_DEFAULT = 0; + public const TYPE_INT32 = 1; + public const TYPE_INT64 = 2; + public const TYPE_DOUBLE = 3; + public const TYPE_CURRENCY = 4; /* Numeric attribute constants */ - const PARSE_INT_ONLY = 0; - const GROUPING_USED = 1; - const DECIMAL_ALWAYS_SHOWN = 2; - const MAX_INTEGER_DIGITS = 3; - const MIN_INTEGER_DIGITS = 4; - const INTEGER_DIGITS = 5; - const MAX_FRACTION_DIGITS = 6; - const MIN_FRACTION_DIGITS = 7; - const FRACTION_DIGITS = 8; - const MULTIPLIER = 9; - const GROUPING_SIZE = 10; - const ROUNDING_MODE = 11; - const ROUNDING_INCREMENT = 12; - const FORMAT_WIDTH = 13; - const PADDING_POSITION = 14; - const SECONDARY_GROUPING_SIZE = 15; - const SIGNIFICANT_DIGITS_USED = 16; - const MIN_SIGNIFICANT_DIGITS = 17; - const MAX_SIGNIFICANT_DIGITS = 18; - const LENIENT_PARSE = 19; + public const PARSE_INT_ONLY = 0; + public const GROUPING_USED = 1; + public const DECIMAL_ALWAYS_SHOWN = 2; + public const MAX_INTEGER_DIGITS = 3; + public const MIN_INTEGER_DIGITS = 4; + public const INTEGER_DIGITS = 5; + public const MAX_FRACTION_DIGITS = 6; + public const MIN_FRACTION_DIGITS = 7; + public const FRACTION_DIGITS = 8; + public const MULTIPLIER = 9; + public const GROUPING_SIZE = 10; + public const ROUNDING_MODE = 11; + public const ROUNDING_INCREMENT = 12; + public const FORMAT_WIDTH = 13; + public const PADDING_POSITION = 14; + public const SECONDARY_GROUPING_SIZE = 15; + public const SIGNIFICANT_DIGITS_USED = 16; + public const MIN_SIGNIFICANT_DIGITS = 17; + public const MAX_SIGNIFICANT_DIGITS = 18; + public const LENIENT_PARSE = 19; /* Text attribute constants */ - const POSITIVE_PREFIX = 0; - const POSITIVE_SUFFIX = 1; - const NEGATIVE_PREFIX = 2; - const NEGATIVE_SUFFIX = 3; - const PADDING_CHARACTER = 4; - const CURRENCY_CODE = 5; - const DEFAULT_RULESET = 6; - const PUBLIC_RULESETS = 7; + public const POSITIVE_PREFIX = 0; + public const POSITIVE_SUFFIX = 1; + public const NEGATIVE_PREFIX = 2; + public const NEGATIVE_SUFFIX = 3; + public const PADDING_CHARACTER = 4; + public const CURRENCY_CODE = 5; + public const DEFAULT_RULESET = 6; + public const PUBLIC_RULESETS = 7; /* Format symbol constants */ - const DECIMAL_SEPARATOR_SYMBOL = 0; - const GROUPING_SEPARATOR_SYMBOL = 1; - const PATTERN_SEPARATOR_SYMBOL = 2; - const PERCENT_SYMBOL = 3; - const ZERO_DIGIT_SYMBOL = 4; - const DIGIT_SYMBOL = 5; - const MINUS_SIGN_SYMBOL = 6; - const PLUS_SIGN_SYMBOL = 7; - const CURRENCY_SYMBOL = 8; - const INTL_CURRENCY_SYMBOL = 9; - const MONETARY_SEPARATOR_SYMBOL = 10; - const EXPONENTIAL_SYMBOL = 11; - const PERMILL_SYMBOL = 12; - const PAD_ESCAPE_SYMBOL = 13; - const INFINITY_SYMBOL = 14; - const NAN_SYMBOL = 15; - const SIGNIFICANT_DIGIT_SYMBOL = 16; - const MONETARY_GROUPING_SEPARATOR_SYMBOL = 17; + public const DECIMAL_SEPARATOR_SYMBOL = 0; + public const GROUPING_SEPARATOR_SYMBOL = 1; + public const PATTERN_SEPARATOR_SYMBOL = 2; + public const PERCENT_SYMBOL = 3; + public const ZERO_DIGIT_SYMBOL = 4; + public const DIGIT_SYMBOL = 5; + public const MINUS_SIGN_SYMBOL = 6; + public const PLUS_SIGN_SYMBOL = 7; + public const CURRENCY_SYMBOL = 8; + public const INTL_CURRENCY_SYMBOL = 9; + public const MONETARY_SEPARATOR_SYMBOL = 10; + public const EXPONENTIAL_SYMBOL = 11; + public const PERMILL_SYMBOL = 12; + public const PAD_ESCAPE_SYMBOL = 13; + public const INFINITY_SYMBOL = 14; + public const NAN_SYMBOL = 15; + public const SIGNIFICANT_DIGIT_SYMBOL = 16; + public const MONETARY_GROUPING_SEPARATOR_SYMBOL = 17; /* Rounding mode values used by NumberFormatter::setAttribute() with NumberFormatter::ROUNDING_MODE attribute */ - const ROUND_CEILING = 0; - const ROUND_FLOOR = 1; - const ROUND_DOWN = 2; - const ROUND_UP = 3; - const ROUND_HALFEVEN = 4; - const ROUND_HALFDOWN = 5; - const ROUND_HALFUP = 6; + public const ROUND_CEILING = 0; + public const ROUND_FLOOR = 1; + public const ROUND_DOWN = 2; + public const ROUND_UP = 3; + public const ROUND_HALFEVEN = 4; + public const ROUND_HALFDOWN = 5; + public const ROUND_HALFUP = 6; /* Pad position values used by NumberFormatter::setAttribute() with NumberFormatter::PADDING_POSITION attribute */ - const PAD_BEFORE_PREFIX = 0; - const PAD_AFTER_PREFIX = 1; - const PAD_BEFORE_SUFFIX = 2; - const PAD_AFTER_SUFFIX = 3; + public const PAD_BEFORE_PREFIX = 0; + public const PAD_AFTER_PREFIX = 1; + public const PAD_BEFORE_SUFFIX = 2; + public const PAD_AFTER_SUFFIX = 3; /** * The error code from the last operation. diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/ConnectionOptions.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/ConnectionOptions.php index 225f107ffd..0d5f09d52d 100644 --- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/ConnectionOptions.php +++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/ConnectionOptions.php @@ -23,44 +23,44 @@ use Symfony\Component\Ldap\Exception\LdapException; */ final class ConnectionOptions { - const API_INFO = 0x00; - const DEREF = 0x02; - const SIZELIMIT = 0x03; - const TIMELIMIT = 0x04; - const REFERRALS = 0x08; - const RESTART = 0x09; - const PROTOCOL_VERSION = 0x11; - const SERVER_CONTROLS = 0x12; - const CLIENT_CONTROLS = 0x13; - const API_FEATURE_INFO = 0x15; - const HOST_NAME = 0x30; - const ERROR_NUMBER = 0x31; - const ERROR_STRING = 0x32; - const MATCHED_DN = 0x33; - const DEBUG_LEVEL = 0x5001; - const TIMEOUT = 0x5002; - const NETWORK_TIMEOUT = 0x5005; - const X_TLS_CACERTDIR = 0x6003; - const X_TLS_CERTFILE = 0x6004; - const X_TLS_CRL_ALL = 0x02; - const X_TLS_CRL_NONE = 0x00; - const X_TLS_CRL_PEER = 0x01; - const X_TLS_KEYFILE = 0x6005; - const X_TLS_REQUIRE_CERT = 0x6006; - const X_TLS_PROTOCOL_MIN = 0x6007; - const X_TLS_CIPHER_SUITE = 0x6008; - const X_TLS_RANDOM_FILE = 0x6009; - const X_TLS_CRLFILE = 0x6010; - const X_TLS_PACKAGE = 0x6011; - const X_TLS_CRLCHECK = 0x600b; - const X_TLS_DHFILE = 0x600e; - const X_SASL_MECH = 0x6100; - const X_SASL_REALM = 0x6101; - const X_SASL_AUTHCID = 0x6102; - const X_SASL_AUTHZID = 0x6103; - const X_KEEPALIVE_IDLE = 0x6300; - const X_KEEPALIVE_PROBES = 0x6301; - const X_KEEPALIVE_INTERVAL = 0x6302; + public const API_INFO = 0x00; + public const DEREF = 0x02; + public const SIZELIMIT = 0x03; + public const TIMELIMIT = 0x04; + public const REFERRALS = 0x08; + public const RESTART = 0x09; + public const PROTOCOL_VERSION = 0x11; + public const SERVER_CONTROLS = 0x12; + public const CLIENT_CONTROLS = 0x13; + public const API_FEATURE_INFO = 0x15; + public const HOST_NAME = 0x30; + public const ERROR_NUMBER = 0x31; + public const ERROR_STRING = 0x32; + public const MATCHED_DN = 0x33; + public const DEBUG_LEVEL = 0x5001; + public const TIMEOUT = 0x5002; + public const NETWORK_TIMEOUT = 0x5005; + public const X_TLS_CACERTDIR = 0x6003; + public const X_TLS_CERTFILE = 0x6004; + public const X_TLS_CRL_ALL = 0x02; + public const X_TLS_CRL_NONE = 0x00; + public const X_TLS_CRL_PEER = 0x01; + public const X_TLS_KEYFILE = 0x6005; + public const X_TLS_REQUIRE_CERT = 0x6006; + public const X_TLS_PROTOCOL_MIN = 0x6007; + public const X_TLS_CIPHER_SUITE = 0x6008; + public const X_TLS_RANDOM_FILE = 0x6009; + public const X_TLS_CRLFILE = 0x6010; + public const X_TLS_PACKAGE = 0x6011; + public const X_TLS_CRLCHECK = 0x600b; + public const X_TLS_DHFILE = 0x600e; + public const X_SASL_MECH = 0x6100; + public const X_SASL_REALM = 0x6101; + public const X_SASL_AUTHCID = 0x6102; + public const X_SASL_AUTHZID = 0x6103; + public const X_KEEPALIVE_IDLE = 0x6300; + public const X_KEEPALIVE_PROBES = 0x6301; + public const X_KEEPALIVE_INTERVAL = 0x6302; public static function getOptionName(string $name): string { diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php index 4fa933a319..e3a6fc8d65 100644 --- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php +++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php @@ -22,7 +22,7 @@ use Symfony\Component\Ldap\Exception\NotBoundException; class Query extends AbstractQuery { // As of PHP 7.2, we can use LDAP_CONTROL_PAGEDRESULTS instead of this - const PAGINATION_OID = '1.2.840.113556.1.4.319'; + public const PAGINATION_OID = '1.2.840.113556.1.4.319'; /** @var Connection */ protected $connection; diff --git a/src/Symfony/Component/Ldap/Adapter/QueryInterface.php b/src/Symfony/Component/Ldap/Adapter/QueryInterface.php index afeff7fec5..23cf3e7b63 100644 --- a/src/Symfony/Component/Ldap/Adapter/QueryInterface.php +++ b/src/Symfony/Component/Ldap/Adapter/QueryInterface.php @@ -21,14 +21,14 @@ use Symfony\Component\Ldap\Exception\NotBoundException; */ interface QueryInterface { - const DEREF_NEVER = 0x00; - const DEREF_SEARCHING = 0x01; - const DEREF_FINDING = 0x02; - const DEREF_ALWAYS = 0x03; + public const DEREF_NEVER = 0x00; + public const DEREF_SEARCHING = 0x01; + public const DEREF_FINDING = 0x02; + public const DEREF_ALWAYS = 0x03; - const SCOPE_BASE = 'base'; - const SCOPE_ONE = 'one'; - const SCOPE_SUB = 'sub'; + public const SCOPE_BASE = 'base'; + public const SCOPE_ONE = 'one'; + public const SCOPE_SUB = 'sub'; /** * Executes a query and returns the list of Ldap entries. diff --git a/src/Symfony/Component/Ldap/LdapInterface.php b/src/Symfony/Component/Ldap/LdapInterface.php index 6c88ad5d00..2535256e12 100644 --- a/src/Symfony/Component/Ldap/LdapInterface.php +++ b/src/Symfony/Component/Ldap/LdapInterface.php @@ -22,8 +22,8 @@ use Symfony\Component\Ldap\Exception\ConnectionException; */ interface LdapInterface { - const ESCAPE_FILTER = 0x01; - const ESCAPE_DN = 0x02; + public const ESCAPE_FILTER = 0x01; + public const ESCAPE_DN = 0x02; /** * Return a connection bound to the ldap. diff --git a/src/Symfony/Component/Mime/Email.php b/src/Symfony/Component/Mime/Email.php index 74cb93c689..fa01e39d24 100644 --- a/src/Symfony/Component/Mime/Email.php +++ b/src/Symfony/Component/Mime/Email.php @@ -24,11 +24,11 @@ use Symfony\Component\Mime\Part\TextPart; */ class Email extends Message { - const PRIORITY_HIGHEST = 1; - const PRIORITY_HIGH = 2; - const PRIORITY_NORMAL = 3; - const PRIORITY_LOW = 4; - const PRIORITY_LOWEST = 5; + public const PRIORITY_HIGHEST = 1; + public const PRIORITY_HIGH = 2; + public const PRIORITY_NORMAL = 3; + public const PRIORITY_LOW = 4; + public const PRIORITY_LOWEST = 5; private const PRIORITY_MAP = [ self::PRIORITY_HIGHEST => 'Highest', diff --git a/src/Symfony/Component/Mime/Header/AbstractHeader.php b/src/Symfony/Component/Mime/Header/AbstractHeader.php index e93b87aeb7..6843f9fbf0 100644 --- a/src/Symfony/Component/Mime/Header/AbstractHeader.php +++ b/src/Symfony/Component/Mime/Header/AbstractHeader.php @@ -20,7 +20,7 @@ use Symfony\Component\Mime\Encoder\QpMimeHeaderEncoder; */ abstract class AbstractHeader implements HeaderInterface { - const PHRASE_PATTERN = '(?:(?:(?:(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))*(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))|(?:(?:[ \t]*(?:\r\n))?[ \t])))?[a-zA-Z0-9!#\$%&\'\*\+\-\/=\?\^_`\{\}\|~]+(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))*(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))|(?:(?:[ \t]*(?:\r\n))?[ \t])))?)|(?:(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))*(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))|(?:(?:[ \t]*(?:\r\n))?[ \t])))?"((?:(?:[ \t]*(?:\r\n))?[ \t])?(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21\x23-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])))*(?:(?:[ \t]*(?:\r\n))?[ \t])?"(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))*(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))|(?:(?:[ \t]*(?:\r\n))?[ \t])))?))+?)'; + public const PHRASE_PATTERN = '(?:(?:(?:(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))*(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))|(?:(?:[ \t]*(?:\r\n))?[ \t])))?[a-zA-Z0-9!#\$%&\'\*\+\-\/=\?\^_`\{\}\|~]+(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))*(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))|(?:(?:[ \t]*(?:\r\n))?[ \t])))?)|(?:(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))*(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))|(?:(?:[ \t]*(?:\r\n))?[ \t])))?"((?:(?:[ \t]*(?:\r\n))?[ \t])?(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21\x23-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])))*(?:(?:[ \t]*(?:\r\n))?[ \t])?"(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))*(?:(?:(?:(?:[ \t]*(?:\r\n))?[ \t])?(\((?:(?:(?:[ \t]*(?:\r\n))?[ \t])|(?:(?:[\x01-\x08\x0B\x0C\x0E-\x19\x7F]|[\x21-\x27\x2A-\x5B\x5D-\x7E])|(?:\\[\x00-\x08\x0B\x0C\x0E-\x7F])|(?1)))*(?:(?:[ \t]*(?:\r\n))?[ \t])?\)))|(?:(?:[ \t]*(?:\r\n))?[ \t])))?))+?)'; private static $encoder; diff --git a/src/Symfony/Component/Mime/Header/ParameterizedHeader.php b/src/Symfony/Component/Mime/Header/ParameterizedHeader.php index 9d3b905a28..1d167b43b1 100644 --- a/src/Symfony/Component/Mime/Header/ParameterizedHeader.php +++ b/src/Symfony/Component/Mime/Header/ParameterizedHeader.php @@ -23,7 +23,7 @@ final class ParameterizedHeader extends UnstructuredHeader * * @var string */ - const TOKEN_REGEX = '(?:[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7E]+)'; + public const TOKEN_REGEX = '(?:[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7E]+)'; private $encoder; private $parameters = []; diff --git a/src/Symfony/Component/Process/Exception/ProcessTimedOutException.php b/src/Symfony/Component/Process/Exception/ProcessTimedOutException.php index e1f6445a4b..94391a4596 100644 --- a/src/Symfony/Component/Process/Exception/ProcessTimedOutException.php +++ b/src/Symfony/Component/Process/Exception/ProcessTimedOutException.php @@ -20,8 +20,8 @@ use Symfony\Component\Process\Process; */ class ProcessTimedOutException extends RuntimeException { - const TYPE_GENERAL = 1; - const TYPE_IDLE = 2; + public const TYPE_GENERAL = 1; + public const TYPE_IDLE = 2; private $process; private $timeoutType; diff --git a/src/Symfony/Component/Process/Pipes/PipesInterface.php b/src/Symfony/Component/Process/Pipes/PipesInterface.php index 2d63e2c05a..50eb5c47e1 100644 --- a/src/Symfony/Component/Process/Pipes/PipesInterface.php +++ b/src/Symfony/Component/Process/Pipes/PipesInterface.php @@ -20,7 +20,7 @@ namespace Symfony\Component\Process\Pipes; */ interface PipesInterface { - const CHUNK_SIZE = 16384; + public const CHUNK_SIZE = 16384; /** * Returns an array of descriptors for the use of proc_open. diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 4e2968e4c1..5f8ba6d13a 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -30,24 +30,24 @@ use Symfony\Component\Process\Pipes\WindowsPipes; */ class Process implements \IteratorAggregate { - const ERR = 'err'; - const OUT = 'out'; + public const ERR = 'err'; + public const OUT = 'out'; - const STATUS_READY = 'ready'; - const STATUS_STARTED = 'started'; - const STATUS_TERMINATED = 'terminated'; + public const STATUS_READY = 'ready'; + public const STATUS_STARTED = 'started'; + public const STATUS_TERMINATED = 'terminated'; - const STDIN = 0; - const STDOUT = 1; - const STDERR = 2; + public const STDIN = 0; + public const STDOUT = 1; + public const STDERR = 2; // Timeout Precision in seconds. - const TIMEOUT_PRECISION = 0.2; + public const TIMEOUT_PRECISION = 0.2; - const ITER_NON_BLOCKING = 1; // By default, iterating over outputs is a blocking call, use this flag to make it non-blocking - const ITER_KEEP_OUTPUT = 2; // By default, outputs are cleared while iterating, use this flag to keep them in memory - const ITER_SKIP_OUT = 4; // Use this flag to skip STDOUT while iterating - const ITER_SKIP_ERR = 8; // Use this flag to skip STDERR while iterating + public const ITER_NON_BLOCKING = 1; // By default, iterating over outputs is a blocking call, use this flag to make it non-blocking + public const ITER_KEEP_OUTPUT = 2; // By default, outputs are cleared while iterating, use this flag to keep them in memory + public const ITER_SKIP_OUT = 4; // Use this flag to skip STDOUT while iterating + public const ITER_SKIP_ERR = 8; // Use this flag to skip STDERR while iterating private $callback; private $hasCallback = false; diff --git a/src/Symfony/Component/PropertyAccess/PropertyPath.php b/src/Symfony/Component/PropertyAccess/PropertyPath.php index 7f3d256741..f831ec3fda 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyPath.php +++ b/src/Symfony/Component/PropertyAccess/PropertyPath.php @@ -25,7 +25,7 @@ class PropertyPath implements \IteratorAggregate, PropertyPathInterface /** * Character used for separating between plural and singular of an element. */ - const SINGULAR_SEPARATOR = '|'; + public const SINGULAR_SEPARATOR = '|'; /** * The elements of the property path. diff --git a/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php index fd6421c2b1..176a00a2f8 100644 --- a/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php @@ -31,9 +31,9 @@ use Symfony\Component\PropertyInfo\Util\PhpDocTypeHelper; */ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, PropertyTypeExtractorInterface { - const PROPERTY = 0; - const ACCESSOR = 1; - const MUTATOR = 2; + public const PROPERTY = 0; + public const ACCESSOR = 1; + public const MUTATOR = 2; /** * @var DocBlock[] diff --git a/src/Symfony/Component/PropertyInfo/Type.php b/src/Symfony/Component/PropertyInfo/Type.php index b27ea6ed79..582b98d641 100644 --- a/src/Symfony/Component/PropertyInfo/Type.php +++ b/src/Symfony/Component/PropertyInfo/Type.php @@ -20,16 +20,16 @@ namespace Symfony\Component\PropertyInfo; */ class Type { - const BUILTIN_TYPE_INT = 'int'; - const BUILTIN_TYPE_FLOAT = 'float'; - const BUILTIN_TYPE_STRING = 'string'; - const BUILTIN_TYPE_BOOL = 'bool'; - const BUILTIN_TYPE_RESOURCE = 'resource'; - const BUILTIN_TYPE_OBJECT = 'object'; - const BUILTIN_TYPE_ARRAY = 'array'; - const BUILTIN_TYPE_NULL = 'null'; - const BUILTIN_TYPE_CALLABLE = 'callable'; - const BUILTIN_TYPE_ITERABLE = 'iterable'; + public const BUILTIN_TYPE_INT = 'int'; + public const BUILTIN_TYPE_FLOAT = 'float'; + public const BUILTIN_TYPE_STRING = 'string'; + public const BUILTIN_TYPE_BOOL = 'bool'; + public const BUILTIN_TYPE_RESOURCE = 'resource'; + public const BUILTIN_TYPE_OBJECT = 'object'; + public const BUILTIN_TYPE_ARRAY = 'array'; + public const BUILTIN_TYPE_NULL = 'null'; + public const BUILTIN_TYPE_CALLABLE = 'callable'; + public const BUILTIN_TYPE_ITERABLE = 'iterable'; /** * List of PHP builtin types. diff --git a/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php b/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php index 64714d354d..2550619a1d 100644 --- a/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php +++ b/src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php @@ -34,25 +34,25 @@ interface UrlGeneratorInterface extends RequestContextAwareInterface /** * Generates an absolute URL, e.g. "http://example.com/dir/file". */ - const ABSOLUTE_URL = 0; + public const ABSOLUTE_URL = 0; /** * Generates an absolute path, e.g. "/dir/file". */ - const ABSOLUTE_PATH = 1; + public const ABSOLUTE_PATH = 1; /** * Generates a relative path based on the current request path, e.g. "../parent-file". * * @see UrlGenerator::getRelativePath() */ - const RELATIVE_PATH = 2; + public const RELATIVE_PATH = 2; /** * Generates a network path, e.g. "//example.com/dir/file". * Such reference reuses the current scheme but specifies the host. */ - const NETWORK_PATH = 3; + public const NETWORK_PATH = 3; /** * Generates a URL or path for a specific route based on the given parameters. diff --git a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php index 3b40e3d2a1..c78213387f 100644 --- a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php @@ -26,8 +26,8 @@ use Symfony\Component\Routing\RouteCompiler; */ class XmlFileLoader extends FileLoader { - const NAMESPACE_URI = 'http://symfony.com/schema/routing'; - const SCHEME_PATH = '/schema/routing/routing-1.0.xsd'; + public const NAMESPACE_URI = 'http://symfony.com/schema/routing'; + public const SCHEME_PATH = '/schema/routing/routing-1.0.xsd'; /** * Loads an XML file. diff --git a/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php b/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php index b687ffb4b1..3c8c451680 100644 --- a/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php @@ -23,9 +23,9 @@ use Symfony\Component\Routing\RouteCollection; */ class TraceableUrlMatcher extends UrlMatcher { - const ROUTE_DOES_NOT_MATCH = 0; - const ROUTE_ALMOST_MATCHES = 1; - const ROUTE_MATCHES = 2; + public const ROUTE_DOES_NOT_MATCH = 0; + public const ROUTE_ALMOST_MATCHES = 1; + public const ROUTE_MATCHES = 2; protected $traces; diff --git a/src/Symfony/Component/Routing/Matcher/UrlMatcher.php b/src/Symfony/Component/Routing/Matcher/UrlMatcher.php index b44dfa1b62..59452d8873 100644 --- a/src/Symfony/Component/Routing/Matcher/UrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/UrlMatcher.php @@ -28,9 +28,9 @@ use Symfony\Component\Routing\RouteCollection; */ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface { - const REQUIREMENT_MATCH = 0; - const REQUIREMENT_MISMATCH = 1; - const ROUTE_MATCH = 2; + public const REQUIREMENT_MATCH = 0; + public const REQUIREMENT_MISMATCH = 1; + public const ROUTE_MATCH = 2; /** @var RequestContext */ protected $context; diff --git a/src/Symfony/Component/Routing/RouteCompiler.php b/src/Symfony/Component/Routing/RouteCompiler.php index fa63df4884..db2bbec7cc 100644 --- a/src/Symfony/Component/Routing/RouteCompiler.php +++ b/src/Symfony/Component/Routing/RouteCompiler.php @@ -19,14 +19,14 @@ namespace Symfony\Component\Routing; */ class RouteCompiler implements RouteCompilerInterface { - const REGEX_DELIMITER = '#'; + public const REGEX_DELIMITER = '#'; /** * This string defines the characters that are automatically considered separators in front of * optional placeholders (with default and no static text following). Such a single separator * can be left out together with the optional placeholder from matching and generating URLs. */ - const SEPARATORS = '/,;.:-_~+*=@|'; + public const SEPARATORS = '/,;.:-_~+*=@|'; /** * The maximum supported length of a PCRE subpattern name @@ -34,7 +34,7 @@ class RouteCompiler implements RouteCompilerInterface * * @internal */ - const VARIABLE_MAXIMUM_LENGTH = 32; + public const VARIABLE_MAXIMUM_LENGTH = 32; /** * {@inheritdoc} diff --git a/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php b/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php index 5729d4caa5..3cfcfc05c6 100644 --- a/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php +++ b/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php @@ -394,5 +394,5 @@ class RouteCompilerTest extends TestCase class Utf8RouteCompiler extends RouteCompiler { - const SEPARATORS = '/§'; + public const SEPARATORS = '/§'; } diff --git a/src/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php b/src/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php index feb27f50d5..6638726836 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php +++ b/src/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php @@ -29,7 +29,7 @@ interface AuthenticationProviderInterface extends AuthenticationManagerInterface * * @var string */ - const USERNAME_NONE_PROVIDED = 'NONE_PROVIDED'; + public const USERNAME_NONE_PROVIDED = 'NONE_PROVIDED'; /** * Checks whether this provider supports the given token. diff --git a/src/Symfony/Component/Security/Core/AuthenticationEvents.php b/src/Symfony/Component/Security/Core/AuthenticationEvents.php index 06358275f7..0b3ae4dd42 100644 --- a/src/Symfony/Component/Security/Core/AuthenticationEvents.php +++ b/src/Symfony/Component/Security/Core/AuthenticationEvents.php @@ -19,7 +19,7 @@ final class AuthenticationEvents * * @Event("Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent") */ - const AUTHENTICATION_SUCCESS = 'security.authentication.success'; + public const AUTHENTICATION_SUCCESS = 'security.authentication.success'; /** * The AUTHENTICATION_FAILURE event occurs after a user cannot be @@ -27,5 +27,5 @@ final class AuthenticationEvents * * @Event("Symfony\Component\Security\Core\Event\AuthenticationFailureEvent") */ - const AUTHENTICATION_FAILURE = 'security.authentication.failure'; + public const AUTHENTICATION_FAILURE = 'security.authentication.failure'; } diff --git a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php index 31eb9c0f4b..ea30549333 100644 --- a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php +++ b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php @@ -22,9 +22,9 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; */ class AccessDecisionManager implements AccessDecisionManagerInterface { - const STRATEGY_AFFIRMATIVE = 'affirmative'; - const STRATEGY_CONSENSUS = 'consensus'; - const STRATEGY_UNANIMOUS = 'unanimous'; + public const STRATEGY_AFFIRMATIVE = 'affirmative'; + public const STRATEGY_CONSENSUS = 'consensus'; + public const STRATEGY_UNANIMOUS = 'unanimous'; private $voters; private $strategy; diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php b/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php index 7f99fbb05b..9411ed95aa 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php @@ -25,9 +25,9 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; */ class AuthenticatedVoter implements VoterInterface { - const IS_AUTHENTICATED_FULLY = 'IS_AUTHENTICATED_FULLY'; - const IS_AUTHENTICATED_REMEMBERED = 'IS_AUTHENTICATED_REMEMBERED'; - const IS_AUTHENTICATED_ANONYMOUSLY = 'IS_AUTHENTICATED_ANONYMOUSLY'; + public const IS_AUTHENTICATED_FULLY = 'IS_AUTHENTICATED_FULLY'; + public const IS_AUTHENTICATED_REMEMBERED = 'IS_AUTHENTICATED_REMEMBERED'; + public const IS_AUTHENTICATED_ANONYMOUSLY = 'IS_AUTHENTICATED_ANONYMOUSLY'; private $authenticationTrustResolver; diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php b/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php index 76c1968f5e..a50af88ee6 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php @@ -20,9 +20,9 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; */ interface VoterInterface { - const ACCESS_GRANTED = 1; - const ACCESS_ABSTAIN = 0; - const ACCESS_DENIED = -1; + public const ACCESS_GRANTED = 1; + public const ACCESS_ABSTAIN = 0; + public const ACCESS_DENIED = -1; /** * Returns the vote for the given parameters. diff --git a/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php b/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php index e23eb9a44c..02329b94dd 100644 --- a/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php +++ b/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php @@ -23,7 +23,7 @@ use Symfony\Component\Security\Core\Exception\BadCredentialsException; */ class BCryptPasswordEncoder extends BasePasswordEncoder implements SelfSaltingEncoderInterface { - const MAX_PASSWORD_LENGTH = 72; + public const MAX_PASSWORD_LENGTH = 72; private $cost; diff --git a/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php b/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php index ffacede722..5e8403cc8b 100644 --- a/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php +++ b/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Security\Core\Encoder; */ abstract class BasePasswordEncoder implements PasswordEncoderInterface { - const MAX_PASSWORD_LENGTH = 4096; + public const MAX_PASSWORD_LENGTH = 4096; /** * {@inheritdoc} diff --git a/src/Symfony/Component/Security/Core/Security.php b/src/Symfony/Component/Security/Core/Security.php index 24d5fef39a..f4a2e7c7b4 100644 --- a/src/Symfony/Component/Security/Core/Security.php +++ b/src/Symfony/Component/Security/Core/Security.php @@ -22,10 +22,10 @@ use Symfony\Component\Security\Core\User\UserInterface; */ class Security { - const ACCESS_DENIED_ERROR = '_security.403_error'; - const AUTHENTICATION_ERROR = '_security.last_error'; - const LAST_USERNAME = '_security.last_username'; - const MAX_USERNAME_LENGTH = 4096; + public const ACCESS_DENIED_ERROR = '_security.403_error'; + public const AUTHENTICATION_ERROR = '_security.last_error'; + public const LAST_USERNAME = '_security.last_username'; + public const MAX_USERNAME_LENGTH = 4096; private $container; diff --git a/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php b/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php index 269db1ee8b..751e0730cd 100644 --- a/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php +++ b/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php @@ -23,7 +23,7 @@ class NativeSessionTokenStorage implements ClearableTokenStorageInterface /** * The namespace used to store values in the session. */ - const SESSION_NAMESPACE = '_csrf'; + public const SESSION_NAMESPACE = '_csrf'; private $sessionStarted = false; private $namespace; diff --git a/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php b/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php index 4c093fbac1..1dcfee18f7 100644 --- a/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php +++ b/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php @@ -24,7 +24,7 @@ class SessionTokenStorage implements ClearableTokenStorageInterface /** * The namespace used to store values in the session. */ - const SESSION_NAMESPACE = '_csrf'; + public const SESSION_NAMESPACE = '_csrf'; private $session; private $namespace; diff --git a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php index a6718a7232..8577d5c734 100644 --- a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php @@ -43,7 +43,7 @@ class SwitchUserListener extends AbstractListener implements ListenerInterface { use LegacyListenerTrait; - const EXIT_VALUE = '_exit'; + public const EXIT_VALUE = '_exit'; private $tokenStorage; private $provider; diff --git a/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php b/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php index 41d61732ac..b06ff947d6 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php +++ b/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php @@ -33,7 +33,7 @@ use Symfony\Component\Security\Http\ParameterBagUtils; */ abstract class AbstractRememberMeServices implements RememberMeServicesInterface, LogoutHandlerInterface { - const COOKIE_DELIMITER = ':'; + public const COOKIE_DELIMITER = ':'; protected $logger; protected $options = [ diff --git a/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php b/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php index ae52591da0..6a2e0970f9 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php +++ b/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php @@ -31,7 +31,7 @@ interface RememberMeServicesInterface * This attribute name can be used by the implementation if it needs to set * a cookie on the Request when there is no actual Response, yet. */ - const COOKIE_ATTR_NAME = '_security_remember_me_cookie'; + public const COOKIE_ATTR_NAME = '_security_remember_me_cookie'; /** * This method will be called whenever the TokenStorage does not contain diff --git a/src/Symfony/Component/Security/Http/SecurityEvents.php b/src/Symfony/Component/Security/Http/SecurityEvents.php index 5c866f3655..fbef93d619 100644 --- a/src/Symfony/Component/Security/Http/SecurityEvents.php +++ b/src/Symfony/Component/Security/Http/SecurityEvents.php @@ -22,7 +22,7 @@ final class SecurityEvents * * @Event("Symfony\Component\Security\Http\Event\InteractiveLoginEvent") */ - const INTERACTIVE_LOGIN = 'security.interactive_login'; + public const INTERACTIVE_LOGIN = 'security.interactive_login'; /** * The SWITCH_USER event occurs before switch to another user and @@ -30,5 +30,5 @@ final class SecurityEvents * * @Event("Symfony\Component\Security\Http\Event\SwitchUserEvent") */ - const SWITCH_USER = 'security.switch_user'; + public const SWITCH_USER = 'security.switch_user'; } diff --git a/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php b/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php index cb788a8e13..a4bb88818d 100644 --- a/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php +++ b/src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php @@ -26,9 +26,9 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; */ class SessionAuthenticationStrategy implements SessionAuthenticationStrategyInterface { - const NONE = 'none'; - const MIGRATE = 'migrate'; - const INVALIDATE = 'invalidate'; + public const NONE = 'none'; + public const MIGRATE = 'migrate'; + public const INVALIDATE = 'invalidate'; private $strategy; diff --git a/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php b/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php index dfe3fbfc19..f20211b208 100644 --- a/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/CsvEncoder.php @@ -22,16 +22,16 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException; */ class CsvEncoder implements EncoderInterface, DecoderInterface { - const FORMAT = 'csv'; - const DELIMITER_KEY = 'csv_delimiter'; - const ENCLOSURE_KEY = 'csv_enclosure'; - const ESCAPE_CHAR_KEY = 'csv_escape_char'; - const KEY_SEPARATOR_KEY = 'csv_key_separator'; - const HEADERS_KEY = 'csv_headers'; - const ESCAPE_FORMULAS_KEY = 'csv_escape_formulas'; - const AS_COLLECTION_KEY = 'as_collection'; - const NO_HEADERS_KEY = 'no_headers'; - const OUTPUT_UTF8_BOM_KEY = 'output_utf8_bom'; + public const FORMAT = 'csv'; + public const DELIMITER_KEY = 'csv_delimiter'; + public const ENCLOSURE_KEY = 'csv_enclosure'; + public const ESCAPE_CHAR_KEY = 'csv_escape_char'; + public const KEY_SEPARATOR_KEY = 'csv_key_separator'; + public const HEADERS_KEY = 'csv_headers'; + public const ESCAPE_FORMULAS_KEY = 'csv_escape_formulas'; + public const AS_COLLECTION_KEY = 'as_collection'; + public const NO_HEADERS_KEY = 'no_headers'; + public const OUTPUT_UTF8_BOM_KEY = 'output_utf8_bom'; private const UTF8_BOM = "\xEF\xBB\xBF"; diff --git a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php index 1b3c9e9c63..cb5cc97ee3 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -25,14 +25,14 @@ class JsonDecode implements DecoderInterface /** * True to return the result as an associative array, false for a nested stdClass hierarchy. */ - const ASSOCIATIVE = 'json_decode_associative'; + public const ASSOCIATIVE = 'json_decode_associative'; - const OPTIONS = 'json_decode_options'; + public const OPTIONS = 'json_decode_options'; /** * Specifies the recursion depth. */ - const RECURSION_DEPTH = 'json_decode_recursion_depth'; + public const RECURSION_DEPTH = 'json_decode_recursion_depth'; private $defaultContext = [ self::ASSOCIATIVE => false, diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php index d14e070c97..6f17970ba6 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -20,7 +20,7 @@ use Symfony\Component\Serializer\Exception\NotEncodableValueException; */ class JsonEncode implements EncoderInterface { - const OPTIONS = 'json_encode_options'; + public const OPTIONS = 'json_encode_options'; private $defaultContext = [ self::OPTIONS => 0, diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php b/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php index 8cb98accdf..6305ede437 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Serializer\Encoder; */ class JsonEncoder implements EncoderInterface, DecoderInterface { - const FORMAT = 'json'; + public const FORMAT = 'json'; protected $encodingImpl; protected $decodingImpl; diff --git a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php index d288b78c82..09df387aa6 100644 --- a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php @@ -29,34 +29,34 @@ class XmlEncoder implements EncoderInterface, DecoderInterface, NormalizationAwa { use SerializerAwareTrait; - const FORMAT = 'xml'; + public const FORMAT = 'xml'; - const AS_COLLECTION = 'as_collection'; + public const AS_COLLECTION = 'as_collection'; /** * An array of ignored XML node types while decoding, each one of the DOM Predefined XML_* constants. */ - const DECODER_IGNORED_NODE_TYPES = 'decoder_ignored_node_types'; + public const DECODER_IGNORED_NODE_TYPES = 'decoder_ignored_node_types'; /** * An array of ignored XML node types while encoding, each one of the DOM Predefined XML_* constants. */ - const ENCODER_IGNORED_NODE_TYPES = 'encoder_ignored_node_types'; - const ENCODING = 'xml_encoding'; - const FORMAT_OUTPUT = 'xml_format_output'; + public const ENCODER_IGNORED_NODE_TYPES = 'encoder_ignored_node_types'; + public const ENCODING = 'xml_encoding'; + public const FORMAT_OUTPUT = 'xml_format_output'; /** * A bit field of LIBXML_* constants. */ - const LOAD_OPTIONS = 'load_options'; - const REMOVE_EMPTY_TAGS = 'remove_empty_tags'; - const ROOT_NODE_NAME = 'xml_root_node_name'; - const STANDALONE = 'xml_standalone'; + public const LOAD_OPTIONS = 'load_options'; + public const REMOVE_EMPTY_TAGS = 'remove_empty_tags'; + public const ROOT_NODE_NAME = 'xml_root_node_name'; + public const STANDALONE = 'xml_standalone'; /** @deprecated The constant TYPE_CASE_ATTRIBUTES is deprecated since version 4.4 and will be removed in version 5. Use TYPE_CAST_ATTRIBUTES instead. */ - const TYPE_CASE_ATTRIBUTES = 'xml_type_cast_attributes'; - const TYPE_CAST_ATTRIBUTES = 'xml_type_cast_attributes'; - const VERSION = 'xml_version'; + public const TYPE_CASE_ATTRIBUTES = 'xml_type_cast_attributes'; + public const TYPE_CAST_ATTRIBUTES = 'xml_type_cast_attributes'; + public const VERSION = 'xml_version'; private $defaultContext = [ self::AS_COLLECTION => false, diff --git a/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php b/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php index d17ba6b355..f1a7b211cf 100644 --- a/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php @@ -23,7 +23,7 @@ use Symfony\Component\Yaml\Yaml; */ class YamlEncoder implements EncoderInterface, DecoderInterface { - const FORMAT = 'yaml'; + public const FORMAT = 'yaml'; private const ALTERNATIVE_FORMAT = 'yml'; public const PRESERVE_EMPTY_OBJECTS = 'preserve_empty_objects'; diff --git a/src/Symfony/Component/Serializer/Normalizer/ConstraintViolationListNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ConstraintViolationListNormalizer.php index 81a5416ff0..3b373c288a 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ConstraintViolationListNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ConstraintViolationListNormalizer.php @@ -24,10 +24,10 @@ use Symfony\Component\Validator\ConstraintViolationListInterface; */ class ConstraintViolationListNormalizer implements NormalizerInterface, CacheableSupportsMethodInterface { - const INSTANCE = 'instance'; - const STATUS = 'status'; - const TITLE = 'title'; - const TYPE = 'type'; + public const INSTANCE = 'instance'; + public const STATUS = 'status'; + public const TITLE = 'title'; + public const TYPE = 'type'; private $defaultContext; private $nameConverter; diff --git a/src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php index 31cadaa88b..21abe49bb1 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php @@ -22,7 +22,7 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException; */ class DateIntervalNormalizer implements NormalizerInterface, DenormalizerInterface, CacheableSupportsMethodInterface { - const FORMAT_KEY = 'dateinterval_format'; + public const FORMAT_KEY = 'dateinterval_format'; private $defaultContext = [ self::FORMAT_KEY => '%rP%yY%mM%dDT%hH%iM%sS', diff --git a/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php index 996700cf14..fb28dff331 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php @@ -22,8 +22,8 @@ use Symfony\Component\Serializer\Exception\NotNormalizableValueException; */ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface, CacheableSupportsMethodInterface { - const FORMAT_KEY = 'datetime_format'; - const TIMEZONE_KEY = 'datetime_timezone'; + public const FORMAT_KEY = 'datetime_format'; + public const TIMEZONE_KEY = 'datetime_timezone'; private $defaultContext; diff --git a/src/Symfony/Component/Translation/DataCollectorTranslator.php b/src/Symfony/Component/Translation/DataCollectorTranslator.php index 94b9e3e5cd..68acf1561b 100644 --- a/src/Symfony/Component/Translation/DataCollectorTranslator.php +++ b/src/Symfony/Component/Translation/DataCollectorTranslator.php @@ -22,9 +22,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class DataCollectorTranslator implements LegacyTranslatorInterface, TranslatorInterface, TranslatorBagInterface, WarmableInterface { - const MESSAGE_DEFINED = 0; - const MESSAGE_MISSING = 1; - const MESSAGE_EQUALS_FALLBACK = 2; + public const MESSAGE_DEFINED = 0; + public const MESSAGE_MISSING = 1; + public const MESSAGE_EQUALS_FALLBACK = 2; /** * @var TranslatorInterface|TranslatorBagInterface diff --git a/src/Symfony/Component/Translation/Extractor/PhpExtractor.php b/src/Symfony/Component/Translation/Extractor/PhpExtractor.php index edea36769c..88811418ca 100644 --- a/src/Symfony/Component/Translation/Extractor/PhpExtractor.php +++ b/src/Symfony/Component/Translation/Extractor/PhpExtractor.php @@ -21,9 +21,9 @@ use Symfony\Component\Translation\MessageCatalogue; */ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface { - const MESSAGE_TOKEN = 300; - const METHOD_ARGUMENTS_TOKEN = 1000; - const DOMAIN_TOKEN = 1001; + public const MESSAGE_TOKEN = 300; + public const METHOD_ARGUMENTS_TOKEN = 1000; + public const DOMAIN_TOKEN = 1001; /** * Prefix for new found message. diff --git a/src/Symfony/Component/Translation/Loader/MoFileLoader.php b/src/Symfony/Component/Translation/Loader/MoFileLoader.php index 1d90136bdb..1f2e62ced6 100644 --- a/src/Symfony/Component/Translation/Loader/MoFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/MoFileLoader.php @@ -22,18 +22,18 @@ class MoFileLoader extends FileLoader * Magic used for validating the format of a MO file as well as * detecting if the machine used to create that file was little endian. */ - const MO_LITTLE_ENDIAN_MAGIC = 0x950412de; + public const MO_LITTLE_ENDIAN_MAGIC = 0x950412de; /** * Magic used for validating the format of a MO file as well as * detecting if the machine used to create that file was big endian. */ - const MO_BIG_ENDIAN_MAGIC = 0xde120495; + public const MO_BIG_ENDIAN_MAGIC = 0xde120495; /** * The size of the header of a MO file in bytes. */ - const MO_HEADER_SIZE = 28; + public const MO_HEADER_SIZE = 28; /** * Parses machine object (MO) format, independent of the machine's endian it diff --git a/src/Symfony/Component/Translation/MessageCatalogueInterface.php b/src/Symfony/Component/Translation/MessageCatalogueInterface.php index f3d3f5ea9c..853ce70317 100644 --- a/src/Symfony/Component/Translation/MessageCatalogueInterface.php +++ b/src/Symfony/Component/Translation/MessageCatalogueInterface.php @@ -20,7 +20,7 @@ use Symfony\Component\Config\Resource\ResourceInterface; */ interface MessageCatalogueInterface { - const INTL_DOMAIN_SUFFIX = '+intl-icu'; + public const INTL_DOMAIN_SUFFIX = '+intl-icu'; /** * Gets the catalogue locale. diff --git a/src/Symfony/Component/Validator/Constraint.php b/src/Symfony/Component/Validator/Constraint.php index cf0a9f17ef..7cd3a68b86 100644 --- a/src/Symfony/Component/Validator/Constraint.php +++ b/src/Symfony/Component/Validator/Constraint.php @@ -34,17 +34,17 @@ abstract class Constraint /** * The name of the group given to all constraints with no explicit group. */ - const DEFAULT_GROUP = 'Default'; + public const DEFAULT_GROUP = 'Default'; /** * Marks a constraint that can be put onto classes. */ - const CLASS_CONSTRAINT = 'class'; + public const CLASS_CONSTRAINT = 'class'; /** * Marks a constraint that can be put onto properties. */ - const PROPERTY_CONSTRAINT = 'property'; + public const PROPERTY_CONSTRAINT = 'property'; /** * Maps error codes to the names of their constants. diff --git a/src/Symfony/Component/Validator/ConstraintValidator.php b/src/Symfony/Component/Validator/ConstraintValidator.php index db0ccb60a8..1045ed0ea5 100644 --- a/src/Symfony/Component/Validator/ConstraintValidator.php +++ b/src/Symfony/Component/Validator/ConstraintValidator.php @@ -24,12 +24,12 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface * Whether to format {@link \DateTime} objects, either with the {@link \IntlDateFormatter} * (if it is available) or as RFC-3339 dates ("Y-m-d H:i:s"). */ - const PRETTY_DATE = 1; + public const PRETTY_DATE = 1; /** * Whether to cast objects with a "__toString()" method to strings. */ - const OBJECT_TO_STRING = 2; + public const OBJECT_TO_STRING = 2; /** * @var ExecutionContextInterface diff --git a/src/Symfony/Component/Validator/Constraints/Bic.php b/src/Symfony/Component/Validator/Constraints/Bic.php index 344f3f8240..3eb7e5ce21 100644 --- a/src/Symfony/Component/Validator/Constraints/Bic.php +++ b/src/Symfony/Component/Validator/Constraints/Bic.php @@ -25,12 +25,12 @@ use Symfony\Component\Validator\Exception\LogicException; */ class Bic extends Constraint { - const INVALID_LENGTH_ERROR = '66dad313-af0b-4214-8566-6c799be9789c'; - const INVALID_CHARACTERS_ERROR = 'f424c529-7add-4417-8f2d-4b656e4833e2'; - const INVALID_BANK_CODE_ERROR = '00559357-6170-4f29-aebd-d19330aa19cf'; - const INVALID_COUNTRY_CODE_ERROR = '1ce76f8d-3c1f-451c-9e62-fe9c3ed486ae'; - const INVALID_CASE_ERROR = '11884038-3312-4ae5-9d04-699f782130c7'; - const INVALID_IBAN_COUNTRY_CODE_ERROR = '29a2c3bb-587b-4996-b6f5-53081364cea5'; + public const INVALID_LENGTH_ERROR = '66dad313-af0b-4214-8566-6c799be9789c'; + public const INVALID_CHARACTERS_ERROR = 'f424c529-7add-4417-8f2d-4b656e4833e2'; + public const INVALID_BANK_CODE_ERROR = '00559357-6170-4f29-aebd-d19330aa19cf'; + public const INVALID_COUNTRY_CODE_ERROR = '1ce76f8d-3c1f-451c-9e62-fe9c3ed486ae'; + public const INVALID_CASE_ERROR = '11884038-3312-4ae5-9d04-699f782130c7'; + public const INVALID_IBAN_COUNTRY_CODE_ERROR = '29a2c3bb-587b-4996-b6f5-53081364cea5'; protected static $errorNames = [ self::INVALID_LENGTH_ERROR => 'INVALID_LENGTH_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Blank.php b/src/Symfony/Component/Validator/Constraints/Blank.php index 4fa913c85f..ba384fe1be 100644 --- a/src/Symfony/Component/Validator/Constraints/Blank.php +++ b/src/Symfony/Component/Validator/Constraints/Blank.php @@ -21,7 +21,7 @@ use Symfony\Component\Validator\Constraint; */ class Blank extends Constraint { - const NOT_BLANK_ERROR = '183ad2de-533d-4796-a439-6d3c3852b549'; + public const NOT_BLANK_ERROR = '183ad2de-533d-4796-a439-6d3c3852b549'; protected static $errorNames = [ self::NOT_BLANK_ERROR => 'NOT_BLANK_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/CardScheme.php b/src/Symfony/Component/Validator/Constraints/CardScheme.php index 4284826008..ff1348a989 100644 --- a/src/Symfony/Component/Validator/Constraints/CardScheme.php +++ b/src/Symfony/Component/Validator/Constraints/CardScheme.php @@ -24,8 +24,8 @@ use Symfony\Component\Validator\Constraint; */ class CardScheme extends Constraint { - const NOT_NUMERIC_ERROR = 'a2ad9231-e827-485f-8a1e-ef4d9a6d5c2e'; - const INVALID_FORMAT_ERROR = 'a8faedbf-1c2f-4695-8d22-55783be8efed'; + public const NOT_NUMERIC_ERROR = 'a2ad9231-e827-485f-8a1e-ef4d9a6d5c2e'; + public const INVALID_FORMAT_ERROR = 'a8faedbf-1c2f-4695-8d22-55783be8efed'; protected static $errorNames = [ self::NOT_NUMERIC_ERROR => 'NOT_NUMERIC_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Choice.php b/src/Symfony/Component/Validator/Constraints/Choice.php index 9409491446..95b91d576d 100644 --- a/src/Symfony/Component/Validator/Constraints/Choice.php +++ b/src/Symfony/Component/Validator/Constraints/Choice.php @@ -21,9 +21,9 @@ use Symfony\Component\Validator\Constraint; */ class Choice extends Constraint { - const NO_SUCH_CHOICE_ERROR = '8e179f1b-97aa-4560-a02f-2a8b42e49df7'; - const TOO_FEW_ERROR = '11edd7eb-5872-4b6e-9f12-89923999fd0e'; - const TOO_MANY_ERROR = '9bd98e49-211c-433f-8630-fd1c2d0f08c3'; + public const NO_SUCH_CHOICE_ERROR = '8e179f1b-97aa-4560-a02f-2a8b42e49df7'; + public const TOO_FEW_ERROR = '11edd7eb-5872-4b6e-9f12-89923999fd0e'; + public const TOO_MANY_ERROR = '9bd98e49-211c-433f-8630-fd1c2d0f08c3'; protected static $errorNames = [ self::NO_SUCH_CHOICE_ERROR => 'NO_SUCH_CHOICE_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Collection.php b/src/Symfony/Component/Validator/Constraints/Collection.php index 605d4b9dbb..6007b13318 100644 --- a/src/Symfony/Component/Validator/Constraints/Collection.php +++ b/src/Symfony/Component/Validator/Constraints/Collection.php @@ -21,8 +21,8 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException; */ class Collection extends Composite { - const MISSING_FIELD_ERROR = '2fa2158c-2a7f-484b-98aa-975522539ff8'; - const NO_SUCH_FIELD_ERROR = '7703c766-b5d5-4cef-ace7-ae0dd82304e9'; + public const MISSING_FIELD_ERROR = '2fa2158c-2a7f-484b-98aa-975522539ff8'; + public const NO_SUCH_FIELD_ERROR = '7703c766-b5d5-4cef-ace7-ae0dd82304e9'; protected static $errorNames = [ self::MISSING_FIELD_ERROR => 'MISSING_FIELD_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Count.php b/src/Symfony/Component/Validator/Constraints/Count.php index 11ea0eca11..792013fa01 100644 --- a/src/Symfony/Component/Validator/Constraints/Count.php +++ b/src/Symfony/Component/Validator/Constraints/Count.php @@ -22,8 +22,8 @@ use Symfony\Component\Validator\Exception\MissingOptionsException; */ class Count extends Constraint { - const TOO_FEW_ERROR = 'bef8e338-6ae5-4caf-b8e2-50e7b0579e69'; - const TOO_MANY_ERROR = '756b1212-697c-468d-a9ad-50dd783bb169'; + public const TOO_FEW_ERROR = 'bef8e338-6ae5-4caf-b8e2-50e7b0579e69'; + public const TOO_MANY_ERROR = '756b1212-697c-468d-a9ad-50dd783bb169'; protected static $errorNames = [ self::TOO_FEW_ERROR => 'TOO_FEW_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Country.php b/src/Symfony/Component/Validator/Constraints/Country.php index f917122276..27ec7aaf8a 100644 --- a/src/Symfony/Component/Validator/Constraints/Country.php +++ b/src/Symfony/Component/Validator/Constraints/Country.php @@ -23,7 +23,7 @@ use Symfony\Component\Validator\Exception\LogicException; */ class Country extends Constraint { - const NO_SUCH_COUNTRY_ERROR = '8f900c12-61bd-455d-9398-996cd040f7f0'; + public const NO_SUCH_COUNTRY_ERROR = '8f900c12-61bd-455d-9398-996cd040f7f0'; protected static $errorNames = [ self::NO_SUCH_COUNTRY_ERROR => 'NO_SUCH_COUNTRY_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Currency.php b/src/Symfony/Component/Validator/Constraints/Currency.php index 72a685f779..0ee57dc90d 100644 --- a/src/Symfony/Component/Validator/Constraints/Currency.php +++ b/src/Symfony/Component/Validator/Constraints/Currency.php @@ -24,7 +24,7 @@ use Symfony\Component\Validator\Exception\LogicException; */ class Currency extends Constraint { - const NO_SUCH_CURRENCY_ERROR = '69945ac1-2db4-405f-bec7-d2772f73df52'; + public const NO_SUCH_CURRENCY_ERROR = '69945ac1-2db4-405f-bec7-d2772f73df52'; protected static $errorNames = [ self::NO_SUCH_CURRENCY_ERROR => 'NO_SUCH_CURRENCY_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Date.php b/src/Symfony/Component/Validator/Constraints/Date.php index 530475ff7d..0b14cbb4ab 100644 --- a/src/Symfony/Component/Validator/Constraints/Date.php +++ b/src/Symfony/Component/Validator/Constraints/Date.php @@ -21,8 +21,8 @@ use Symfony\Component\Validator\Constraint; */ class Date extends Constraint { - const INVALID_FORMAT_ERROR = '69819696-02ac-4a99-9ff0-14e127c4d1bc'; - const INVALID_DATE_ERROR = '3c184ce5-b31d-4de7-8b76-326da7b2be93'; + public const INVALID_FORMAT_ERROR = '69819696-02ac-4a99-9ff0-14e127c4d1bc'; + public const INVALID_DATE_ERROR = '3c184ce5-b31d-4de7-8b76-326da7b2be93'; protected static $errorNames = [ self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/DateTime.php b/src/Symfony/Component/Validator/Constraints/DateTime.php index b700bacd3f..7e64a62d08 100644 --- a/src/Symfony/Component/Validator/Constraints/DateTime.php +++ b/src/Symfony/Component/Validator/Constraints/DateTime.php @@ -21,9 +21,9 @@ use Symfony\Component\Validator\Constraint; */ class DateTime extends Constraint { - const INVALID_FORMAT_ERROR = '1a9da513-2640-4f84-9b6a-4d99dcddc628'; - const INVALID_DATE_ERROR = 'd52afa47-620d-4d99-9f08-f4d85b36e33c'; - const INVALID_TIME_ERROR = '5e797c9d-74f7-4098-baa3-94390c447b27'; + public const INVALID_FORMAT_ERROR = '1a9da513-2640-4f84-9b6a-4d99dcddc628'; + public const INVALID_DATE_ERROR = 'd52afa47-620d-4d99-9f08-f4d85b36e33c'; + public const INVALID_TIME_ERROR = '5e797c9d-74f7-4098-baa3-94390c447b27'; protected static $errorNames = [ self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/DateValidator.php b/src/Symfony/Component/Validator/Constraints/DateValidator.php index 29e48cce36..761690e62e 100644 --- a/src/Symfony/Component/Validator/Constraints/DateValidator.php +++ b/src/Symfony/Component/Validator/Constraints/DateValidator.php @@ -21,7 +21,7 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException; */ class DateValidator extends ConstraintValidator { - const PATTERN = '/^(\d{4})-(\d{2})-(\d{2})$/'; + public const PATTERN = '/^(\d{4})-(\d{2})-(\d{2})$/'; /** * Checks whether a date is valid. diff --git a/src/Symfony/Component/Validator/Constraints/DivisibleBy.php b/src/Symfony/Component/Validator/Constraints/DivisibleBy.php index e806a77b55..1e208f61a7 100644 --- a/src/Symfony/Component/Validator/Constraints/DivisibleBy.php +++ b/src/Symfony/Component/Validator/Constraints/DivisibleBy.php @@ -19,7 +19,7 @@ namespace Symfony\Component\Validator\Constraints; */ class DivisibleBy extends AbstractComparison { - const NOT_DIVISIBLE_BY = '6d99d6c3-1464-4ccf-bdc7-14d083cf455c'; + public const NOT_DIVISIBLE_BY = '6d99d6c3-1464-4ccf-bdc7-14d083cf455c'; protected static $errorNames = [ self::NOT_DIVISIBLE_BY => 'NOT_DIVISIBLE_BY', diff --git a/src/Symfony/Component/Validator/Constraints/Email.php b/src/Symfony/Component/Validator/Constraints/Email.php index b31c355b08..e8396c57c5 100644 --- a/src/Symfony/Component/Validator/Constraints/Email.php +++ b/src/Symfony/Component/Validator/Constraints/Email.php @@ -28,17 +28,17 @@ class Email extends Constraint public const VALIDATION_MODE_STRICT = 'strict'; public const VALIDATION_MODE_LOOSE = 'loose'; - const INVALID_FORMAT_ERROR = 'bd79c0ab-ddba-46cc-a703-a7a4b08de310'; + public const INVALID_FORMAT_ERROR = 'bd79c0ab-ddba-46cc-a703-a7a4b08de310'; /** * @deprecated since Symfony 4.2. */ - const MX_CHECK_FAILED_ERROR = 'bf447c1c-0266-4e10-9c6c-573df282e413'; + public const MX_CHECK_FAILED_ERROR = 'bf447c1c-0266-4e10-9c6c-573df282e413'; /** * @deprecated since Symfony 4.2. */ - const HOST_CHECK_FAILED_ERROR = '7da53a8b-56f3-4288-bb3e-ee9ede4ef9a1'; + public const HOST_CHECK_FAILED_ERROR = '7da53a8b-56f3-4288-bb3e-ee9ede4ef9a1'; protected static $errorNames = [ self::INVALID_FORMAT_ERROR => 'STRICT_CHECK_FAILED_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/EmailValidator.php b/src/Symfony/Component/Validator/Constraints/EmailValidator.php index a7e504add2..5c37b5e8ad 100644 --- a/src/Symfony/Component/Validator/Constraints/EmailValidator.php +++ b/src/Symfony/Component/Validator/Constraints/EmailValidator.php @@ -27,12 +27,12 @@ class EmailValidator extends ConstraintValidator /** * @internal */ - const PATTERN_HTML5 = '/^[a-zA-Z0-9.!#$%&\'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/'; + public const PATTERN_HTML5 = '/^[a-zA-Z0-9.!#$%&\'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/'; /** * @internal */ - const PATTERN_LOOSE = '/^.+\@\S+\.\S+$/'; + public const PATTERN_LOOSE = '/^.+\@\S+\.\S+$/'; private static $emailPatterns = [ Email::VALIDATION_MODE_LOOSE => self::PATTERN_LOOSE, diff --git a/src/Symfony/Component/Validator/Constraints/EqualTo.php b/src/Symfony/Component/Validator/Constraints/EqualTo.php index ccd67675e7..0a3a05b142 100644 --- a/src/Symfony/Component/Validator/Constraints/EqualTo.php +++ b/src/Symfony/Component/Validator/Constraints/EqualTo.php @@ -20,7 +20,7 @@ namespace Symfony\Component\Validator\Constraints; */ class EqualTo extends AbstractComparison { - const NOT_EQUAL_ERROR = '478618a7-95ba-473d-9101-cabd45e49115'; + public const NOT_EQUAL_ERROR = '478618a7-95ba-473d-9101-cabd45e49115'; protected static $errorNames = [ self::NOT_EQUAL_ERROR => 'NOT_EQUAL_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Expression.php b/src/Symfony/Component/Validator/Constraints/Expression.php index cef29f0a1c..dac58b6fb1 100644 --- a/src/Symfony/Component/Validator/Constraints/Expression.php +++ b/src/Symfony/Component/Validator/Constraints/Expression.php @@ -24,7 +24,7 @@ use Symfony\Component\Validator\Exception\LogicException; */ class Expression extends Constraint { - const EXPRESSION_FAILED_ERROR = '6b3befbc-2f01-4ddf-be21-b57898905284'; + public const EXPRESSION_FAILED_ERROR = '6b3befbc-2f01-4ddf-be21-b57898905284'; protected static $errorNames = [ self::EXPRESSION_FAILED_ERROR => 'EXPRESSION_FAILED_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/File.php b/src/Symfony/Component/Validator/Constraints/File.php index 4d037f871b..690b873ea8 100644 --- a/src/Symfony/Component/Validator/Constraints/File.php +++ b/src/Symfony/Component/Validator/Constraints/File.php @@ -26,11 +26,11 @@ class File extends Constraint { // Check the Image constraint for clashes if adding new constants here - const NOT_FOUND_ERROR = 'd2a3fb6e-7ddc-4210-8fbf-2ab345ce1998'; - const NOT_READABLE_ERROR = 'c20c92a4-5bfa-4202-9477-28e800e0f6ff'; - const EMPTY_ERROR = '5d743385-9775-4aa5-8ff5-495fb1e60137'; - const TOO_LARGE_ERROR = 'df8637af-d466-48c6-a59d-e7126250a654'; - const INVALID_MIME_TYPE_ERROR = '744f00bc-4389-4c74-92de-9a43cde55534'; + public const NOT_FOUND_ERROR = 'd2a3fb6e-7ddc-4210-8fbf-2ab345ce1998'; + public const NOT_READABLE_ERROR = 'c20c92a4-5bfa-4202-9477-28e800e0f6ff'; + public const EMPTY_ERROR = '5d743385-9775-4aa5-8ff5-495fb1e60137'; + public const TOO_LARGE_ERROR = 'df8637af-d466-48c6-a59d-e7126250a654'; + public const INVALID_MIME_TYPE_ERROR = '744f00bc-4389-4c74-92de-9a43cde55534'; protected static $errorNames = [ self::NOT_FOUND_ERROR => 'NOT_FOUND_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/FileValidator.php b/src/Symfony/Component/Validator/Constraints/FileValidator.php index e5a756d893..3142f4cea6 100644 --- a/src/Symfony/Component/Validator/Constraints/FileValidator.php +++ b/src/Symfony/Component/Validator/Constraints/FileValidator.php @@ -25,10 +25,10 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException; */ class FileValidator extends ConstraintValidator { - const KB_BYTES = 1000; - const MB_BYTES = 1000000; - const KIB_BYTES = 1024; - const MIB_BYTES = 1048576; + public const KB_BYTES = 1000; + public const MB_BYTES = 1000000; + public const KIB_BYTES = 1024; + public const MIB_BYTES = 1048576; private static $suffices = [ 1 => 'bytes', diff --git a/src/Symfony/Component/Validator/Constraints/GreaterThan.php b/src/Symfony/Component/Validator/Constraints/GreaterThan.php index ba225b44b6..9523a981ea 100644 --- a/src/Symfony/Component/Validator/Constraints/GreaterThan.php +++ b/src/Symfony/Component/Validator/Constraints/GreaterThan.php @@ -20,7 +20,7 @@ namespace Symfony\Component\Validator\Constraints; */ class GreaterThan extends AbstractComparison { - const TOO_LOW_ERROR = '778b7ae0-84d3-481a-9dec-35fdb64b1d78'; + public const TOO_LOW_ERROR = '778b7ae0-84d3-481a-9dec-35fdb64b1d78'; protected static $errorNames = [ self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php b/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php index 2c88f3ad05..57ed692b90 100644 --- a/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php +++ b/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php @@ -20,7 +20,7 @@ namespace Symfony\Component\Validator\Constraints; */ class GreaterThanOrEqual extends AbstractComparison { - const TOO_LOW_ERROR = 'ea4e51d1-3342-48bd-87f1-9e672cd90cad'; + public const TOO_LOW_ERROR = 'ea4e51d1-3342-48bd-87f1-9e672cd90cad'; protected static $errorNames = [ self::TOO_LOW_ERROR => 'TOO_LOW_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Iban.php b/src/Symfony/Component/Validator/Constraints/Iban.php index 231f8c838d..a9aa3026de 100644 --- a/src/Symfony/Component/Validator/Constraints/Iban.php +++ b/src/Symfony/Component/Validator/Constraints/Iban.php @@ -23,11 +23,11 @@ use Symfony\Component\Validator\Constraint; */ class Iban extends Constraint { - const INVALID_COUNTRY_CODE_ERROR = 'de78ee2c-bd50-44e2-aec8-3d8228aeadb9'; - const INVALID_CHARACTERS_ERROR = '8d3d85e4-784f-4719-a5bc-d9e40d45a3a5'; - const CHECKSUM_FAILED_ERROR = 'b9401321-f9bf-4dcb-83c1-f31094440795'; - const INVALID_FORMAT_ERROR = 'c8d318f1-2ecc-41ba-b983-df70d225cf5a'; - const NOT_SUPPORTED_COUNTRY_CODE_ERROR = 'e2c259f3-4b46-48e6-b72e-891658158ec8'; + public const INVALID_COUNTRY_CODE_ERROR = 'de78ee2c-bd50-44e2-aec8-3d8228aeadb9'; + public const INVALID_CHARACTERS_ERROR = '8d3d85e4-784f-4719-a5bc-d9e40d45a3a5'; + public const CHECKSUM_FAILED_ERROR = 'b9401321-f9bf-4dcb-83c1-f31094440795'; + public const INVALID_FORMAT_ERROR = 'c8d318f1-2ecc-41ba-b983-df70d225cf5a'; + public const NOT_SUPPORTED_COUNTRY_CODE_ERROR = 'e2c259f3-4b46-48e6-b72e-891658158ec8'; protected static $errorNames = [ self::INVALID_COUNTRY_CODE_ERROR => 'INVALID_COUNTRY_CODE_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/IdenticalTo.php b/src/Symfony/Component/Validator/Constraints/IdenticalTo.php index 6c1bc2b1d7..44ae16f8bd 100644 --- a/src/Symfony/Component/Validator/Constraints/IdenticalTo.php +++ b/src/Symfony/Component/Validator/Constraints/IdenticalTo.php @@ -20,7 +20,7 @@ namespace Symfony\Component\Validator\Constraints; */ class IdenticalTo extends AbstractComparison { - const NOT_IDENTICAL_ERROR = '2a8cc50f-58a2-4536-875e-060a2ce69ed5'; + public const NOT_IDENTICAL_ERROR = '2a8cc50f-58a2-4536-875e-060a2ce69ed5'; protected static $errorNames = [ self::NOT_IDENTICAL_ERROR => 'NOT_IDENTICAL_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Image.php b/src/Symfony/Component/Validator/Constraints/Image.php index 21005d9ea5..4c88456a2c 100644 --- a/src/Symfony/Component/Validator/Constraints/Image.php +++ b/src/Symfony/Component/Validator/Constraints/Image.php @@ -20,19 +20,19 @@ namespace Symfony\Component\Validator\Constraints; */ class Image extends File { - const SIZE_NOT_DETECTED_ERROR = '6d55c3f4-e58e-4fe3-91ee-74b492199956'; - const TOO_WIDE_ERROR = '7f87163d-878f-47f5-99ba-a8eb723a1ab2'; - const TOO_NARROW_ERROR = '9afbd561-4f90-4a27-be62-1780fc43604a'; - const TOO_HIGH_ERROR = '7efae81c-4877-47ba-aa65-d01ccb0d4645'; - const TOO_LOW_ERROR = 'aef0cb6a-c07f-4894-bc08-1781420d7b4c'; - const TOO_FEW_PIXEL_ERROR = '1b06b97d-ae48-474e-978f-038a74854c43'; - const TOO_MANY_PIXEL_ERROR = 'ee0804e8-44db-4eac-9775-be91aaf72ce1'; - const RATIO_TOO_BIG_ERROR = '70cafca6-168f-41c9-8c8c-4e47a52be643'; - const RATIO_TOO_SMALL_ERROR = '59b8c6ef-bcf2-4ceb-afff-4642ed92f12e'; - const SQUARE_NOT_ALLOWED_ERROR = '5d41425b-facb-47f7-a55a-de9fbe45cb46'; - const LANDSCAPE_NOT_ALLOWED_ERROR = '6f895685-7cf2-4d65-b3da-9029c5581d88'; - const PORTRAIT_NOT_ALLOWED_ERROR = '65608156-77da-4c79-a88c-02ef6d18c782'; - const CORRUPTED_IMAGE_ERROR = '5d4163f3-648f-4e39-87fd-cc5ea7aad2d1'; + public const SIZE_NOT_DETECTED_ERROR = '6d55c3f4-e58e-4fe3-91ee-74b492199956'; + public const TOO_WIDE_ERROR = '7f87163d-878f-47f5-99ba-a8eb723a1ab2'; + public const TOO_NARROW_ERROR = '9afbd561-4f90-4a27-be62-1780fc43604a'; + public const TOO_HIGH_ERROR = '7efae81c-4877-47ba-aa65-d01ccb0d4645'; + public const TOO_LOW_ERROR = 'aef0cb6a-c07f-4894-bc08-1781420d7b4c'; + public const TOO_FEW_PIXEL_ERROR = '1b06b97d-ae48-474e-978f-038a74854c43'; + public const TOO_MANY_PIXEL_ERROR = 'ee0804e8-44db-4eac-9775-be91aaf72ce1'; + public const RATIO_TOO_BIG_ERROR = '70cafca6-168f-41c9-8c8c-4e47a52be643'; + public const RATIO_TOO_SMALL_ERROR = '59b8c6ef-bcf2-4ceb-afff-4642ed92f12e'; + public const SQUARE_NOT_ALLOWED_ERROR = '5d41425b-facb-47f7-a55a-de9fbe45cb46'; + public const LANDSCAPE_NOT_ALLOWED_ERROR = '6f895685-7cf2-4d65-b3da-9029c5581d88'; + public const PORTRAIT_NOT_ALLOWED_ERROR = '65608156-77da-4c79-a88c-02ef6d18c782'; + public const CORRUPTED_IMAGE_ERROR = '5d4163f3-648f-4e39-87fd-cc5ea7aad2d1'; // Include the mapping from the base class diff --git a/src/Symfony/Component/Validator/Constraints/Ip.php b/src/Symfony/Component/Validator/Constraints/Ip.php index c550749f31..d7d0ba403b 100644 --- a/src/Symfony/Component/Validator/Constraints/Ip.php +++ b/src/Symfony/Component/Validator/Constraints/Ip.php @@ -26,26 +26,26 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; */ class Ip extends Constraint { - const V4 = '4'; - const V6 = '6'; - const ALL = 'all'; + public const V4 = '4'; + public const V6 = '6'; + public const ALL = 'all'; // adds FILTER_FLAG_NO_PRIV_RANGE flag (skip private ranges) - const V4_NO_PRIV = '4_no_priv'; - const V6_NO_PRIV = '6_no_priv'; - const ALL_NO_PRIV = 'all_no_priv'; + public const V4_NO_PRIV = '4_no_priv'; + public const V6_NO_PRIV = '6_no_priv'; + public const ALL_NO_PRIV = 'all_no_priv'; // adds FILTER_FLAG_NO_RES_RANGE flag (skip reserved ranges) - const V4_NO_RES = '4_no_res'; - const V6_NO_RES = '6_no_res'; - const ALL_NO_RES = 'all_no_res'; + public const V4_NO_RES = '4_no_res'; + public const V6_NO_RES = '6_no_res'; + public const ALL_NO_RES = 'all_no_res'; // adds FILTER_FLAG_NO_PRIV_RANGE and FILTER_FLAG_NO_RES_RANGE flags (skip both) - const V4_ONLY_PUBLIC = '4_public'; - const V6_ONLY_PUBLIC = '6_public'; - const ALL_ONLY_PUBLIC = 'all_public'; + public const V4_ONLY_PUBLIC = '4_public'; + public const V6_ONLY_PUBLIC = '6_public'; + public const ALL_ONLY_PUBLIC = 'all_public'; - const INVALID_IP_ERROR = 'b1b427ae-9f6f-41b0-aa9b-84511fbb3c5b'; + public const INVALID_IP_ERROR = 'b1b427ae-9f6f-41b0-aa9b-84511fbb3c5b'; protected static $versions = [ self::V4, diff --git a/src/Symfony/Component/Validator/Constraints/IsFalse.php b/src/Symfony/Component/Validator/Constraints/IsFalse.php index d488c616dd..f7d081b93f 100644 --- a/src/Symfony/Component/Validator/Constraints/IsFalse.php +++ b/src/Symfony/Component/Validator/Constraints/IsFalse.php @@ -21,7 +21,7 @@ use Symfony\Component\Validator\Constraint; */ class IsFalse extends Constraint { - const NOT_FALSE_ERROR = 'd53a91b0-def3-426a-83d7-269da7ab4200'; + public const NOT_FALSE_ERROR = 'd53a91b0-def3-426a-83d7-269da7ab4200'; protected static $errorNames = [ self::NOT_FALSE_ERROR => 'NOT_FALSE_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/IsNull.php b/src/Symfony/Component/Validator/Constraints/IsNull.php index e010f9cf06..da29ad9014 100644 --- a/src/Symfony/Component/Validator/Constraints/IsNull.php +++ b/src/Symfony/Component/Validator/Constraints/IsNull.php @@ -21,7 +21,7 @@ use Symfony\Component\Validator\Constraint; */ class IsNull extends Constraint { - const NOT_NULL_ERROR = '60d2f30b-8cfa-4372-b155-9656634de120'; + public const NOT_NULL_ERROR = '60d2f30b-8cfa-4372-b155-9656634de120'; protected static $errorNames = [ self::NOT_NULL_ERROR => 'NOT_NULL_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/IsTrue.php b/src/Symfony/Component/Validator/Constraints/IsTrue.php index 84f6ce15a7..9772db320d 100644 --- a/src/Symfony/Component/Validator/Constraints/IsTrue.php +++ b/src/Symfony/Component/Validator/Constraints/IsTrue.php @@ -21,7 +21,7 @@ use Symfony\Component\Validator\Constraint; */ class IsTrue extends Constraint { - const NOT_TRUE_ERROR = '2beabf1c-54c0-4882-a928-05249b26e23b'; + public const NOT_TRUE_ERROR = '2beabf1c-54c0-4882-a928-05249b26e23b'; protected static $errorNames = [ self::NOT_TRUE_ERROR => 'NOT_TRUE_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Isbn.php b/src/Symfony/Component/Validator/Constraints/Isbn.php index 6629c823e1..d9cc607e19 100644 --- a/src/Symfony/Component/Validator/Constraints/Isbn.php +++ b/src/Symfony/Component/Validator/Constraints/Isbn.php @@ -23,11 +23,11 @@ use Symfony\Component\Validator\Constraint; */ class Isbn extends Constraint { - const TOO_SHORT_ERROR = '949acbb0-8ef5-43ed-a0e9-032dfd08ae45'; - const TOO_LONG_ERROR = '3171387d-f80a-47b3-bd6e-60598545316a'; - const INVALID_CHARACTERS_ERROR = '23d21cea-da99-453d-98b1-a7d916fbb339'; - const CHECKSUM_FAILED_ERROR = '2881c032-660f-46b6-8153-d352d9706640'; - const TYPE_NOT_RECOGNIZED_ERROR = 'fa54a457-f042-441f-89c4-066ee5bdd3e1'; + public const TOO_SHORT_ERROR = '949acbb0-8ef5-43ed-a0e9-032dfd08ae45'; + public const TOO_LONG_ERROR = '3171387d-f80a-47b3-bd6e-60598545316a'; + public const INVALID_CHARACTERS_ERROR = '23d21cea-da99-453d-98b1-a7d916fbb339'; + public const CHECKSUM_FAILED_ERROR = '2881c032-660f-46b6-8153-d352d9706640'; + public const TYPE_NOT_RECOGNIZED_ERROR = 'fa54a457-f042-441f-89c4-066ee5bdd3e1'; protected static $errorNames = [ self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Issn.php b/src/Symfony/Component/Validator/Constraints/Issn.php index 88d181fa63..7aeb88f899 100644 --- a/src/Symfony/Component/Validator/Constraints/Issn.php +++ b/src/Symfony/Component/Validator/Constraints/Issn.php @@ -22,12 +22,12 @@ use Symfony\Component\Validator\Constraint; */ class Issn extends Constraint { - const TOO_SHORT_ERROR = '6a20dd3d-f463-4460-8e7b-18a1b98abbfb'; - const TOO_LONG_ERROR = '37cef893-5871-464e-8b12-7fb79324833c'; - const MISSING_HYPHEN_ERROR = '2983286f-8134-4693-957a-1ec4ef887b15'; - const INVALID_CHARACTERS_ERROR = 'a663d266-37c2-4ece-a914-ae891940c588'; - const INVALID_CASE_ERROR = '7b6dd393-7523-4a6c-b84d-72b91bba5e1a'; - const CHECKSUM_FAILED_ERROR = 'b0f92dbc-667c-48de-b526-ad9586d43e85'; + public const TOO_SHORT_ERROR = '6a20dd3d-f463-4460-8e7b-18a1b98abbfb'; + public const TOO_LONG_ERROR = '37cef893-5871-464e-8b12-7fb79324833c'; + public const MISSING_HYPHEN_ERROR = '2983286f-8134-4693-957a-1ec4ef887b15'; + public const INVALID_CHARACTERS_ERROR = 'a663d266-37c2-4ece-a914-ae891940c588'; + public const INVALID_CASE_ERROR = '7b6dd393-7523-4a6c-b84d-72b91bba5e1a'; + public const CHECKSUM_FAILED_ERROR = 'b0f92dbc-667c-48de-b526-ad9586d43e85'; protected static $errorNames = [ self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Json.php b/src/Symfony/Component/Validator/Constraints/Json.php index 74d55f775d..2e5c3c8447 100644 --- a/src/Symfony/Component/Validator/Constraints/Json.php +++ b/src/Symfony/Component/Validator/Constraints/Json.php @@ -21,7 +21,7 @@ use Symfony\Component\Validator\Constraint; */ class Json extends Constraint { - const INVALID_JSON_ERROR = '0789c8ad-2d2b-49a4-8356-e2ce63998504'; + public const INVALID_JSON_ERROR = '0789c8ad-2d2b-49a4-8356-e2ce63998504'; protected static $errorNames = [ self::INVALID_JSON_ERROR => 'INVALID_JSON_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Language.php b/src/Symfony/Component/Validator/Constraints/Language.php index 0439d93096..558a52e454 100644 --- a/src/Symfony/Component/Validator/Constraints/Language.php +++ b/src/Symfony/Component/Validator/Constraints/Language.php @@ -23,7 +23,7 @@ use Symfony\Component\Validator\Exception\LogicException; */ class Language extends Constraint { - const NO_SUCH_LANGUAGE_ERROR = 'ee65fec4-9a20-4202-9f39-ca558cd7bdf7'; + public const NO_SUCH_LANGUAGE_ERROR = 'ee65fec4-9a20-4202-9f39-ca558cd7bdf7'; protected static $errorNames = [ self::NO_SUCH_LANGUAGE_ERROR => 'NO_SUCH_LANGUAGE_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Length.php b/src/Symfony/Component/Validator/Constraints/Length.php index ae5dacab14..7e82094458 100644 --- a/src/Symfony/Component/Validator/Constraints/Length.php +++ b/src/Symfony/Component/Validator/Constraints/Length.php @@ -23,9 +23,9 @@ use Symfony\Component\Validator\Exception\MissingOptionsException; */ class Length extends Constraint { - const TOO_SHORT_ERROR = '9ff3fdc4-b214-49db-8718-39c315e33d45'; - const TOO_LONG_ERROR = 'd94b19cc-114f-4f44-9cc4-4138e80a87b9'; - const INVALID_CHARACTERS_ERROR = '35e6a710-aa2e-4719-b58e-24b35749b767'; + public const TOO_SHORT_ERROR = '9ff3fdc4-b214-49db-8718-39c315e33d45'; + public const TOO_LONG_ERROR = 'd94b19cc-114f-4f44-9cc4-4138e80a87b9'; + public const INVALID_CHARACTERS_ERROR = '35e6a710-aa2e-4719-b58e-24b35749b767'; protected static $errorNames = [ self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/LessThan.php b/src/Symfony/Component/Validator/Constraints/LessThan.php index 8ea07ace2e..ae142bd287 100644 --- a/src/Symfony/Component/Validator/Constraints/LessThan.php +++ b/src/Symfony/Component/Validator/Constraints/LessThan.php @@ -20,7 +20,7 @@ namespace Symfony\Component\Validator\Constraints; */ class LessThan extends AbstractComparison { - const TOO_HIGH_ERROR = '079d7420-2d13-460c-8756-de810eeb37d2'; + public const TOO_HIGH_ERROR = '079d7420-2d13-460c-8756-de810eeb37d2'; protected static $errorNames = [ self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php b/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php index 806ca4990f..78a24153b3 100644 --- a/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php +++ b/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php @@ -20,7 +20,7 @@ namespace Symfony\Component\Validator\Constraints; */ class LessThanOrEqual extends AbstractComparison { - const TOO_HIGH_ERROR = '30fbb013-d015-4232-8b3b-8f3be97a7e14'; + public const TOO_HIGH_ERROR = '30fbb013-d015-4232-8b3b-8f3be97a7e14'; protected static $errorNames = [ self::TOO_HIGH_ERROR => 'TOO_HIGH_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Locale.php b/src/Symfony/Component/Validator/Constraints/Locale.php index 555fbd5507..80a853d12a 100644 --- a/src/Symfony/Component/Validator/Constraints/Locale.php +++ b/src/Symfony/Component/Validator/Constraints/Locale.php @@ -23,7 +23,7 @@ use Symfony\Component\Validator\Exception\LogicException; */ class Locale extends Constraint { - const NO_SUCH_LOCALE_ERROR = 'a0af4293-1f1a-4a1c-a328-979cba6182a2'; + public const NO_SUCH_LOCALE_ERROR = 'a0af4293-1f1a-4a1c-a328-979cba6182a2'; protected static $errorNames = [ self::NO_SUCH_LOCALE_ERROR => 'NO_SUCH_LOCALE_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Luhn.php b/src/Symfony/Component/Validator/Constraints/Luhn.php index 85eebc793b..a870401b3d 100644 --- a/src/Symfony/Component/Validator/Constraints/Luhn.php +++ b/src/Symfony/Component/Validator/Constraints/Luhn.php @@ -25,8 +25,8 @@ use Symfony\Component\Validator\Constraint; */ class Luhn extends Constraint { - const INVALID_CHARACTERS_ERROR = 'dfad6d23-1b74-4374-929b-5cbb56fc0d9e'; - const CHECKSUM_FAILED_ERROR = '4d760774-3f50-4cd5-a6d5-b10a3299d8d3'; + public const INVALID_CHARACTERS_ERROR = 'dfad6d23-1b74-4374-929b-5cbb56fc0d9e'; + public const CHECKSUM_FAILED_ERROR = '4d760774-3f50-4cd5-a6d5-b10a3299d8d3'; protected static $errorNames = [ self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/NotBlank.php b/src/Symfony/Component/Validator/Constraints/NotBlank.php index 5a5b68556d..775e1f6f7b 100644 --- a/src/Symfony/Component/Validator/Constraints/NotBlank.php +++ b/src/Symfony/Component/Validator/Constraints/NotBlank.php @@ -23,7 +23,7 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; */ class NotBlank extends Constraint { - const IS_BLANK_ERROR = 'c1051bb4-d103-4f74-8988-acbcafc7fdc3'; + public const IS_BLANK_ERROR = 'c1051bb4-d103-4f74-8988-acbcafc7fdc3'; protected static $errorNames = [ self::IS_BLANK_ERROR => 'IS_BLANK_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/NotCompromisedPassword.php b/src/Symfony/Component/Validator/Constraints/NotCompromisedPassword.php index d38cab1a92..9ad535ae5d 100644 --- a/src/Symfony/Component/Validator/Constraints/NotCompromisedPassword.php +++ b/src/Symfony/Component/Validator/Constraints/NotCompromisedPassword.php @@ -23,7 +23,7 @@ use Symfony\Component\Validator\Constraint; */ class NotCompromisedPassword extends Constraint { - const COMPROMISED_PASSWORD_ERROR = 'd9bcdbfe-a9d6-4bfa-a8ff-da5fd93e0f6d'; + public const COMPROMISED_PASSWORD_ERROR = 'd9bcdbfe-a9d6-4bfa-a8ff-da5fd93e0f6d'; protected static $errorNames = [self::COMPROMISED_PASSWORD_ERROR => 'COMPROMISED_PASSWORD_ERROR']; diff --git a/src/Symfony/Component/Validator/Constraints/NotEqualTo.php b/src/Symfony/Component/Validator/Constraints/NotEqualTo.php index a04f3a9b6c..e99ff81e6a 100644 --- a/src/Symfony/Component/Validator/Constraints/NotEqualTo.php +++ b/src/Symfony/Component/Validator/Constraints/NotEqualTo.php @@ -20,7 +20,7 @@ namespace Symfony\Component\Validator\Constraints; */ class NotEqualTo extends AbstractComparison { - const IS_EQUAL_ERROR = 'aa2e33da-25c8-4d76-8c6c-812f02ea89dd'; + public const IS_EQUAL_ERROR = 'aa2e33da-25c8-4d76-8c6c-812f02ea89dd'; protected static $errorNames = [ self::IS_EQUAL_ERROR => 'IS_EQUAL_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php b/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php index 972e4a103c..3b57108cf1 100644 --- a/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php +++ b/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php @@ -20,7 +20,7 @@ namespace Symfony\Component\Validator\Constraints; */ class NotIdenticalTo extends AbstractComparison { - const IS_IDENTICAL_ERROR = '4aaac518-0dda-4129-a6d9-e216b9b454a0'; + public const IS_IDENTICAL_ERROR = '4aaac518-0dda-4129-a6d9-e216b9b454a0'; protected static $errorNames = [ self::IS_IDENTICAL_ERROR => 'IS_IDENTICAL_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/NotNull.php b/src/Symfony/Component/Validator/Constraints/NotNull.php index a392104d0e..a4529a5193 100644 --- a/src/Symfony/Component/Validator/Constraints/NotNull.php +++ b/src/Symfony/Component/Validator/Constraints/NotNull.php @@ -21,7 +21,7 @@ use Symfony\Component\Validator\Constraint; */ class NotNull extends Constraint { - const IS_NULL_ERROR = 'ad32d13f-c3d4-423b-909a-857b961eb720'; + public const IS_NULL_ERROR = 'ad32d13f-c3d4-423b-909a-857b961eb720'; protected static $errorNames = [ self::IS_NULL_ERROR => 'IS_NULL_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Range.php b/src/Symfony/Component/Validator/Constraints/Range.php index 89ab9b23a2..9ba9655d57 100644 --- a/src/Symfony/Component/Validator/Constraints/Range.php +++ b/src/Symfony/Component/Validator/Constraints/Range.php @@ -25,10 +25,10 @@ use Symfony\Component\Validator\Exception\MissingOptionsException; */ class Range extends Constraint { - const INVALID_CHARACTERS_ERROR = 'ad9a9798-7a99-4df7-8ce9-46e416a1e60b'; - const NOT_IN_RANGE_ERROR = '04b91c99-a946-4221-afc5-e65ebac401eb'; - const TOO_HIGH_ERROR = '2d28afcb-e32e-45fb-a815-01c431a86a69'; - const TOO_LOW_ERROR = '76454e69-502c-46c5-9643-f447d837c4d5'; + public const INVALID_CHARACTERS_ERROR = 'ad9a9798-7a99-4df7-8ce9-46e416a1e60b'; + public const NOT_IN_RANGE_ERROR = '04b91c99-a946-4221-afc5-e65ebac401eb'; + public const TOO_HIGH_ERROR = '2d28afcb-e32e-45fb-a815-01c431a86a69'; + public const TOO_LOW_ERROR = '76454e69-502c-46c5-9643-f447d837c4d5'; protected static $errorNames = [ self::INVALID_CHARACTERS_ERROR => 'INVALID_CHARACTERS_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Regex.php b/src/Symfony/Component/Validator/Constraints/Regex.php index 87601cd433..0c093b34ee 100644 --- a/src/Symfony/Component/Validator/Constraints/Regex.php +++ b/src/Symfony/Component/Validator/Constraints/Regex.php @@ -22,7 +22,7 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; */ class Regex extends Constraint { - const REGEX_FAILED_ERROR = 'de1e3db3-5ed4-4941-aae4-59f3667cc3a3'; + public const REGEX_FAILED_ERROR = 'de1e3db3-5ed4-4941-aae4-59f3667cc3a3'; protected static $errorNames = [ self::REGEX_FAILED_ERROR => 'REGEX_FAILED_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Time.php b/src/Symfony/Component/Validator/Constraints/Time.php index d1a3397b24..c043f15c1b 100644 --- a/src/Symfony/Component/Validator/Constraints/Time.php +++ b/src/Symfony/Component/Validator/Constraints/Time.php @@ -21,8 +21,8 @@ use Symfony\Component\Validator\Constraint; */ class Time extends Constraint { - const INVALID_FORMAT_ERROR = '9d27b2bb-f755-4fbf-b725-39b1edbdebdf'; - const INVALID_TIME_ERROR = '8532f9e1-84b2-4d67-8989-0818bc38533b'; + public const INVALID_FORMAT_ERROR = '9d27b2bb-f755-4fbf-b725-39b1edbdebdf'; + public const INVALID_TIME_ERROR = '8532f9e1-84b2-4d67-8989-0818bc38533b'; protected static $errorNames = [ self::INVALID_FORMAT_ERROR => 'INVALID_FORMAT_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/TimeValidator.php b/src/Symfony/Component/Validator/Constraints/TimeValidator.php index d925939c3c..b827764801 100644 --- a/src/Symfony/Component/Validator/Constraints/TimeValidator.php +++ b/src/Symfony/Component/Validator/Constraints/TimeValidator.php @@ -21,7 +21,7 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException; */ class TimeValidator extends ConstraintValidator { - const PATTERN = '/^(\d{2}):(\d{2}):(\d{2})$/'; + public const PATTERN = '/^(\d{2}):(\d{2}):(\d{2})$/'; /** * Checks whether a time is valid. diff --git a/src/Symfony/Component/Validator/Constraints/Type.php b/src/Symfony/Component/Validator/Constraints/Type.php index ac798bcd44..b3e9ecbf73 100644 --- a/src/Symfony/Component/Validator/Constraints/Type.php +++ b/src/Symfony/Component/Validator/Constraints/Type.php @@ -21,7 +21,7 @@ use Symfony\Component\Validator\Constraint; */ class Type extends Constraint { - const INVALID_TYPE_ERROR = 'ba785a8c-82cb-4283-967c-3cf342181b40'; + public const INVALID_TYPE_ERROR = 'ba785a8c-82cb-4283-967c-3cf342181b40'; protected static $errorNames = [ self::INVALID_TYPE_ERROR => 'INVALID_TYPE_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Url.php b/src/Symfony/Component/Validator/Constraints/Url.php index fc4fdc073c..146501183b 100644 --- a/src/Symfony/Component/Validator/Constraints/Url.php +++ b/src/Symfony/Component/Validator/Constraints/Url.php @@ -25,69 +25,69 @@ class Url extends Constraint /** * @deprecated since Symfony 4.1 */ - const CHECK_DNS_TYPE_ANY = 'ANY'; + public const CHECK_DNS_TYPE_ANY = 'ANY'; /** * @deprecated since Symfony 4.1 */ - const CHECK_DNS_TYPE_NONE = false; + public const CHECK_DNS_TYPE_NONE = false; /** * @deprecated since Symfony 4.1 */ - const CHECK_DNS_TYPE_A = 'A'; + public const CHECK_DNS_TYPE_A = 'A'; /** * @deprecated since Symfony 4.1 */ - const CHECK_DNS_TYPE_A6 = 'A6'; + public const CHECK_DNS_TYPE_A6 = 'A6'; /** * @deprecated since Symfony 4.1 */ - const CHECK_DNS_TYPE_AAAA = 'AAAA'; + public const CHECK_DNS_TYPE_AAAA = 'AAAA'; /** * @deprecated since Symfony 4.1 */ - const CHECK_DNS_TYPE_CNAME = 'CNAME'; + public const CHECK_DNS_TYPE_CNAME = 'CNAME'; /** * @deprecated since Symfony 4.1 */ - const CHECK_DNS_TYPE_MX = 'MX'; + public const CHECK_DNS_TYPE_MX = 'MX'; /** * @deprecated since Symfony 4.1 */ - const CHECK_DNS_TYPE_NAPTR = 'NAPTR'; + public const CHECK_DNS_TYPE_NAPTR = 'NAPTR'; /** * @deprecated since Symfony 4.1 */ - const CHECK_DNS_TYPE_NS = 'NS'; + public const CHECK_DNS_TYPE_NS = 'NS'; /** * @deprecated since Symfony 4.1 */ - const CHECK_DNS_TYPE_PTR = 'PTR'; + public const CHECK_DNS_TYPE_PTR = 'PTR'; /** * @deprecated since Symfony 4.1 */ - const CHECK_DNS_TYPE_SOA = 'SOA'; + public const CHECK_DNS_TYPE_SOA = 'SOA'; /** * @deprecated since Symfony 4.1 */ - const CHECK_DNS_TYPE_SRV = 'SRV'; + public const CHECK_DNS_TYPE_SRV = 'SRV'; /** * @deprecated since Symfony 4.1 */ - const CHECK_DNS_TYPE_TXT = 'TXT'; + public const CHECK_DNS_TYPE_TXT = 'TXT'; - const INVALID_URL_ERROR = '57c2f299-1154-4870-89bb-ef3b1f5ad229'; + public const INVALID_URL_ERROR = '57c2f299-1154-4870-89bb-ef3b1f5ad229'; protected static $errorNames = [ self::INVALID_URL_ERROR => 'INVALID_URL_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/UrlValidator.php b/src/Symfony/Component/Validator/Constraints/UrlValidator.php index 4c5fb8f022..68f26d0875 100644 --- a/src/Symfony/Component/Validator/Constraints/UrlValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UrlValidator.php @@ -22,7 +22,7 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException; */ class UrlValidator extends ConstraintValidator { - const PATTERN = '~^ + public const PATTERN = '~^ (%s):// # protocol (((?:[\_\.\pL\pN-]|%%[0-9A-Fa-f]{2})+:)?((?:[\_\.\pL\pN-]|%%[0-9A-Fa-f]{2})+)@)? # basic auth ( diff --git a/src/Symfony/Component/Validator/Constraints/Uuid.php b/src/Symfony/Component/Validator/Constraints/Uuid.php index 006cae1282..2c7e9bba43 100644 --- a/src/Symfony/Component/Validator/Constraints/Uuid.php +++ b/src/Symfony/Component/Validator/Constraints/Uuid.php @@ -22,12 +22,12 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; */ class Uuid extends Constraint { - const TOO_SHORT_ERROR = 'aa314679-dac9-4f54-bf97-b2049df8f2a3'; - const TOO_LONG_ERROR = '494897dd-36f8-4d31-8923-71a8d5f3000d'; - const INVALID_CHARACTERS_ERROR = '51120b12-a2bc-41bf-aa53-cd73daf330d0'; - const INVALID_HYPHEN_PLACEMENT_ERROR = '98469c83-0309-4f5d-bf95-a496dcaa869c'; - const INVALID_VERSION_ERROR = '21ba13b4-b185-4882-ac6f-d147355987eb'; - const INVALID_VARIANT_ERROR = '164ef693-2b9d-46de-ad7f-836201f0c2db'; + public const TOO_SHORT_ERROR = 'aa314679-dac9-4f54-bf97-b2049df8f2a3'; + public const TOO_LONG_ERROR = '494897dd-36f8-4d31-8923-71a8d5f3000d'; + public const INVALID_CHARACTERS_ERROR = '51120b12-a2bc-41bf-aa53-cd73daf330d0'; + public const INVALID_HYPHEN_PLACEMENT_ERROR = '98469c83-0309-4f5d-bf95-a496dcaa869c'; + public const INVALID_VERSION_ERROR = '21ba13b4-b185-4882-ac6f-d147355987eb'; + public const INVALID_VARIANT_ERROR = '164ef693-2b9d-46de-ad7f-836201f0c2db'; protected static $errorNames = [ self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', @@ -39,11 +39,11 @@ class Uuid extends Constraint ]; // Possible versions defined by RFC 4122 - const V1_MAC = 1; - const V2_DCE = 2; - const V3_MD5 = 3; - const V4_RANDOM = 4; - const V5_SHA1 = 5; + public const V1_MAC = 1; + public const V2_DCE = 2; + public const V3_MD5 = 3; + public const V4_RANDOM = 4; + public const V5_SHA1 = 5; /** * Message to display when validation fails. diff --git a/src/Symfony/Component/Validator/Constraints/UuidValidator.php b/src/Symfony/Component/Validator/Constraints/UuidValidator.php index 49bdf8765a..9082b59247 100644 --- a/src/Symfony/Component/Validator/Constraints/UuidValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UuidValidator.php @@ -41,11 +41,11 @@ class UuidValidator extends ConstraintValidator // M = any allowed version {1..5} // N = any allowed variant {8, 9, a, b} - const STRICT_LENGTH = 36; - const STRICT_FIRST_HYPHEN_POSITION = 8; - const STRICT_LAST_HYPHEN_POSITION = 23; - const STRICT_VERSION_POSITION = 14; - const STRICT_VARIANT_POSITION = 19; + public const STRICT_LENGTH = 36; + public const STRICT_FIRST_HYPHEN_POSITION = 8; + public const STRICT_LAST_HYPHEN_POSITION = 23; + public const STRICT_VERSION_POSITION = 14; + public const STRICT_VARIANT_POSITION = 19; // The loose pattern validates similar yet non-compliant UUIDs. // Hyphens are completely optional. If present, they should only appear @@ -59,8 +59,8 @@ class UuidValidator extends ConstraintValidator // Neither the version nor the variant is validated by this pattern. - const LOOSE_MAX_LENGTH = 39; - const LOOSE_FIRST_HYPHEN_POSITION = 4; + public const LOOSE_MAX_LENGTH = 39; + public const LOOSE_FIRST_HYPHEN_POSITION = 4; /** * {@inheritdoc} diff --git a/src/Symfony/Component/Validator/Mapping/CascadingStrategy.php b/src/Symfony/Component/Validator/Mapping/CascadingStrategy.php index c78fb42ad4..6bab8ac4e6 100644 --- a/src/Symfony/Component/Validator/Mapping/CascadingStrategy.php +++ b/src/Symfony/Component/Validator/Mapping/CascadingStrategy.php @@ -36,12 +36,12 @@ class CascadingStrategy /** * Specifies that a node should not be cascaded. */ - const NONE = 1; + public const NONE = 1; /** * Specifies that a node should be cascaded. */ - const CASCADE = 2; + public const CASCADE = 2; /** * Not instantiable. diff --git a/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php index dde17cb17f..58b1122e2c 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php @@ -30,7 +30,7 @@ abstract class AbstractLoader implements LoaderInterface /** * The namespace to load constraints from by default. */ - const DEFAULT_NAMESPACE = '\\Symfony\\Component\\Validator\\Constraints\\'; + public const DEFAULT_NAMESPACE = '\\Symfony\\Component\\Validator\\Constraints\\'; protected $namespaces = []; diff --git a/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php b/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php index c22469b1f2..0df5a7ee8a 100644 --- a/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php +++ b/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php @@ -33,18 +33,18 @@ class TraversalStrategy * Specifies that a node's value should be iterated only if it is an * instance of {@link \Traversable}. */ - const IMPLICIT = 1; + public const IMPLICIT = 1; /** * Specifies that a node's value should never be iterated. */ - const NONE = 2; + public const NONE = 2; /** * Specifies that a node's value should always be iterated. If the value is * not an instance of {@link \Traversable}, an exception should be thrown. */ - const TRAVERSE = 4; + public const TRAVERSE = 4; /** * Not instantiable. diff --git a/src/Symfony/Component/VarDumper/Caster/Caster.php b/src/Symfony/Component/VarDumper/Caster/Caster.php index 4bdc66ac5b..d35f3230b0 100644 --- a/src/Symfony/Component/VarDumper/Caster/Caster.php +++ b/src/Symfony/Component/VarDumper/Caster/Caster.php @@ -22,20 +22,20 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class Caster { - const EXCLUDE_VERBOSE = 1; - const EXCLUDE_VIRTUAL = 2; - const EXCLUDE_DYNAMIC = 4; - const EXCLUDE_PUBLIC = 8; - const EXCLUDE_PROTECTED = 16; - const EXCLUDE_PRIVATE = 32; - const EXCLUDE_NULL = 64; - const EXCLUDE_EMPTY = 128; - const EXCLUDE_NOT_IMPORTANT = 256; - const EXCLUDE_STRICT = 512; + public const EXCLUDE_VERBOSE = 1; + public const EXCLUDE_VIRTUAL = 2; + public const EXCLUDE_DYNAMIC = 4; + public const EXCLUDE_PUBLIC = 8; + public const EXCLUDE_PROTECTED = 16; + public const EXCLUDE_PRIVATE = 32; + public const EXCLUDE_NULL = 64; + public const EXCLUDE_EMPTY = 128; + public const EXCLUDE_NOT_IMPORTANT = 256; + public const EXCLUDE_STRICT = 512; - const PREFIX_VIRTUAL = "\0~\0"; - const PREFIX_DYNAMIC = "\0+\0"; - const PREFIX_PROTECTED = "\0*\0"; + public const PREFIX_VIRTUAL = "\0~\0"; + public const PREFIX_DYNAMIC = "\0+\0"; + public const PREFIX_PROTECTED = "\0*\0"; /** * Casts objects to arrays and adds the dynamic property prefix. diff --git a/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php b/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php index 6be710c16d..e0181ba0ee 100644 --- a/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php @@ -22,7 +22,7 @@ use Symfony\Component\VarDumper\Cloner\Stub; */ class ReflectionCaster { - const UNSET_CLOSURE_FILE_INFO = ['Closure' => __CLASS__.'::unsetClosureFileInfo']; + public const UNSET_CLOSURE_FILE_INFO = ['Closure' => __CLASS__.'::unsetClosureFileInfo']; private static $extraMap = [ 'docComment' => 'getDocComment', diff --git a/src/Symfony/Component/VarDumper/Cloner/Cursor.php b/src/Symfony/Component/VarDumper/Cloner/Cursor.php index 5b0542f6c2..1fd796d675 100644 --- a/src/Symfony/Component/VarDumper/Cloner/Cursor.php +++ b/src/Symfony/Component/VarDumper/Cloner/Cursor.php @@ -18,10 +18,10 @@ namespace Symfony\Component\VarDumper\Cloner; */ class Cursor { - const HASH_INDEXED = Stub::ARRAY_INDEXED; - const HASH_ASSOC = Stub::ARRAY_ASSOC; - const HASH_OBJECT = Stub::TYPE_OBJECT; - const HASH_RESOURCE = Stub::TYPE_RESOURCE; + public const HASH_INDEXED = Stub::ARRAY_INDEXED; + public const HASH_ASSOC = Stub::ARRAY_ASSOC; + public const HASH_OBJECT = Stub::TYPE_OBJECT; + public const HASH_RESOURCE = Stub::TYPE_RESOURCE; public $depth = 0; public $refIndex = 0; diff --git a/src/Symfony/Component/VarDumper/Cloner/Stub.php b/src/Symfony/Component/VarDumper/Cloner/Stub.php index 7f6d05d33d..073c56efbd 100644 --- a/src/Symfony/Component/VarDumper/Cloner/Stub.php +++ b/src/Symfony/Component/VarDumper/Cloner/Stub.php @@ -18,17 +18,17 @@ namespace Symfony\Component\VarDumper\Cloner; */ class Stub { - const TYPE_REF = 1; - const TYPE_STRING = 2; - const TYPE_ARRAY = 3; - const TYPE_OBJECT = 4; - const TYPE_RESOURCE = 5; + public const TYPE_REF = 1; + public const TYPE_STRING = 2; + public const TYPE_ARRAY = 3; + public const TYPE_OBJECT = 4; + public const TYPE_RESOURCE = 5; - const STRING_BINARY = 1; - const STRING_UTF8 = 2; + public const STRING_BINARY = 1; + public const STRING_UTF8 = 2; - const ARRAY_ASSOC = 1; - const ARRAY_INDEXED = 2; + public const ARRAY_ASSOC = 1; + public const ARRAY_INDEXED = 2; public $type = self::TYPE_REF; public $class = ''; diff --git a/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php b/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php index 766102e8c1..c5c5b9a26f 100644 --- a/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php +++ b/src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php @@ -21,10 +21,10 @@ use Symfony\Component\VarDumper\Cloner\DumperInterface; */ abstract class AbstractDumper implements DataDumperInterface, DumperInterface { - const DUMP_LIGHT_ARRAY = 1; - const DUMP_STRING_LENGTH = 2; - const DUMP_COMMA_SEPARATOR = 4; - const DUMP_TRAILING_COMMA = 8; + public const DUMP_LIGHT_ARRAY = 1; + public const DUMP_STRING_LENGTH = 2; + public const DUMP_COMMA_SEPARATOR = 4; + public const DUMP_TRAILING_COMMA = 8; public static $defaultOutput = 'php://output'; diff --git a/src/Symfony/Component/Workflow/Dumper/PlantUmlDumper.php b/src/Symfony/Component/Workflow/Dumper/PlantUmlDumper.php index 48cd20d3b4..76273c01d1 100644 --- a/src/Symfony/Component/Workflow/Dumper/PlantUmlDumper.php +++ b/src/Symfony/Component/Workflow/Dumper/PlantUmlDumper.php @@ -31,10 +31,10 @@ class PlantUmlDumper implements DumperInterface private const INITIAL = '<>'; private const MARKED = '<>'; - const STATEMACHINE_TRANSITION = 'arrow'; - const WORKFLOW_TRANSITION = 'square'; - const TRANSITION_TYPES = [self::STATEMACHINE_TRANSITION, self::WORKFLOW_TRANSITION]; - const DEFAULT_OPTIONS = [ + public const STATEMACHINE_TRANSITION = 'arrow'; + public const WORKFLOW_TRANSITION = 'square'; + public const TRANSITION_TYPES = [self::STATEMACHINE_TRANSITION, self::WORKFLOW_TRANSITION]; + public const DEFAULT_OPTIONS = [ 'skinparams' => [ 'titleBorderRoundCorner' => 15, 'titleBorderThickness' => 2, diff --git a/src/Symfony/Component/Workflow/TransitionBlocker.php b/src/Symfony/Component/Workflow/TransitionBlocker.php index 81fa1a4130..1cd6459ef8 100644 --- a/src/Symfony/Component/Workflow/TransitionBlocker.php +++ b/src/Symfony/Component/Workflow/TransitionBlocker.php @@ -16,9 +16,9 @@ namespace Symfony\Component\Workflow; */ final class TransitionBlocker { - const BLOCKED_BY_MARKING = '19beefc8-6b1e-4716-9d07-a39bd6d16e34'; - const BLOCKED_BY_EXPRESSION_GUARD_LISTENER = '326a1e9c-0c12-11e8-ba89-0ed5f89f718b'; - const UNKNOWN = 'e8b5bbb9-5913-4b98-bfa6-65dbd228a82a'; + public const BLOCKED_BY_MARKING = '19beefc8-6b1e-4716-9d07-a39bd6d16e34'; + public const BLOCKED_BY_EXPRESSION_GUARD_LISTENER = '326a1e9c-0c12-11e8-ba89-0ed5f89f718b'; + public const UNKNOWN = 'e8b5bbb9-5913-4b98-bfa6-65dbd228a82a'; private $message; private $code; diff --git a/src/Symfony/Component/Workflow/WorkflowEvents.php b/src/Symfony/Component/Workflow/WorkflowEvents.php index 44678dcb88..c84cda67c6 100644 --- a/src/Symfony/Component/Workflow/WorkflowEvents.php +++ b/src/Symfony/Component/Workflow/WorkflowEvents.php @@ -20,37 +20,37 @@ final class WorkflowEvents /** * @Event("Symfony\Component\Workflow\Event\GuardEvent") */ - const GUARD = 'workflow.guard'; + public const GUARD = 'workflow.guard'; /** * @Event("Symfony\Component\Workflow\Event\AnnounceEvent") */ - const ANNOUNCE = 'workflow.announce'; + public const ANNOUNCE = 'workflow.announce'; /** * @Event("Symfony\Component\Workflow\Event\CompletedEvent") */ - const COMPLETED = 'workflow.completed'; + public const COMPLETED = 'workflow.completed'; /** * @Event("Symfony\Component\Workflow\Event\EnterEvent") */ - const ENTER = 'workflow.enter'; + public const ENTER = 'workflow.enter'; /** * @Event("Symfony\Component\Workflow\Event\EnteredEvent") */ - const ENTERED = 'workflow.entered'; + public const ENTERED = 'workflow.entered'; /** * @Event("Symfony\Component\Workflow\Event\LeaveEvent") */ - const LEAVE = 'workflow.leave'; + public const LEAVE = 'workflow.leave'; /** * @Event("Symfony\Component\Workflow\Event\TransitionEvent") */ - const TRANSITION = 'workflow.transition'; + public const TRANSITION = 'workflow.transition'; private function __construct() { diff --git a/src/Symfony/Component/Yaml/Escaper.php b/src/Symfony/Component/Yaml/Escaper.php index b975fb34cc..150c5f6dad 100644 --- a/src/Symfony/Component/Yaml/Escaper.php +++ b/src/Symfony/Component/Yaml/Escaper.php @@ -22,7 +22,7 @@ namespace Symfony\Component\Yaml; class Escaper { // Characters that would cause a dumped string to require double quoting. - const REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\x7f|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9"; + public const REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\x7f|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9"; // Mapping arrays for escaping a double quoted string. The backslash is // first to ensure proper escaping because str_replace operates iteratively diff --git a/src/Symfony/Component/Yaml/Inline.php b/src/Symfony/Component/Yaml/Inline.php index 3875144dc1..4f7b6d490d 100644 --- a/src/Symfony/Component/Yaml/Inline.php +++ b/src/Symfony/Component/Yaml/Inline.php @@ -24,7 +24,7 @@ use Symfony\Component\Yaml\Tag\TaggedValue; */ class Inline { - const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')'; + public const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')'; public static $parsedLineNumber = -1; public static $parsedFilename; diff --git a/src/Symfony/Component/Yaml/Parser.php b/src/Symfony/Component/Yaml/Parser.php index 9ad87fb0f7..7768e0066c 100644 --- a/src/Symfony/Component/Yaml/Parser.php +++ b/src/Symfony/Component/Yaml/Parser.php @@ -23,8 +23,8 @@ use Symfony\Component\Yaml\Tag\TaggedValue; */ class Parser { - const TAG_PATTERN = '(?P![\w!.\/:-]+)'; - const BLOCK_SCALAR_HEADER_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?'; + public const TAG_PATTERN = '(?P![\w!.\/:-]+)'; + public const BLOCK_SCALAR_HEADER_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?'; private $filename; private $offset = 0; diff --git a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php index 32dd30d495..4b9788c1e0 100644 --- a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php +++ b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php @@ -139,5 +139,5 @@ YAML; class Foo { - const TEST = 'foo'; + public const TEST = 'foo'; } diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php index fe1291a7e0..187ed17ea2 100644 --- a/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -2739,7 +2739,7 @@ class B { public $b = 'foo'; - const FOO = 'foo'; - const BAR = 'bar'; - const BAZ = 'baz'; + public const FOO = 'foo'; + public const BAR = 'bar'; + public const BAZ = 'baz'; } diff --git a/src/Symfony/Component/Yaml/Unescaper.php b/src/Symfony/Component/Yaml/Unescaper.php index 9c3a19ec5e..6bdf216ae9 100644 --- a/src/Symfony/Component/Yaml/Unescaper.php +++ b/src/Symfony/Component/Yaml/Unescaper.php @@ -26,7 +26,7 @@ class Unescaper /** * Regex fragment that matches an escaped character in a double quoted string. */ - const REGEX_ESCAPED_CHARACTER = '\\\\(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)'; + public const REGEX_ESCAPED_CHARACTER = '\\\\(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)'; /** * Unescapes a single quoted string. diff --git a/src/Symfony/Component/Yaml/Yaml.php b/src/Symfony/Component/Yaml/Yaml.php index 4efceb3e25..4fea47f9a7 100644 --- a/src/Symfony/Component/Yaml/Yaml.php +++ b/src/Symfony/Component/Yaml/Yaml.php @@ -22,18 +22,18 @@ use Symfony\Component\Yaml\Exception\ParseException; */ class Yaml { - const DUMP_OBJECT = 1; - const PARSE_EXCEPTION_ON_INVALID_TYPE = 2; - const PARSE_OBJECT = 4; - const PARSE_OBJECT_FOR_MAP = 8; - const DUMP_EXCEPTION_ON_INVALID_TYPE = 16; - const PARSE_DATETIME = 32; - const DUMP_OBJECT_AS_MAP = 64; - const DUMP_MULTI_LINE_LITERAL_BLOCK = 128; - const PARSE_CONSTANT = 256; - const PARSE_CUSTOM_TAGS = 512; - const DUMP_EMPTY_ARRAY_AS_SEQUENCE = 1024; - const DUMP_NULL_AS_TILDE = 2048; + public const DUMP_OBJECT = 1; + public const PARSE_EXCEPTION_ON_INVALID_TYPE = 2; + public const PARSE_OBJECT = 4; + public const PARSE_OBJECT_FOR_MAP = 8; + public const DUMP_EXCEPTION_ON_INVALID_TYPE = 16; + public const PARSE_DATETIME = 32; + public const DUMP_OBJECT_AS_MAP = 64; + public const DUMP_MULTI_LINE_LITERAL_BLOCK = 128; + public const PARSE_CONSTANT = 256; + public const PARSE_CUSTOM_TAGS = 512; + public const DUMP_EMPTY_ARRAY_AS_SEQUENCE = 1024; + public const DUMP_NULL_AS_TILDE = 2048; /** * Parses a YAML file into a PHP value. diff --git a/src/Symfony/Contracts/Cache/ItemInterface.php b/src/Symfony/Contracts/Cache/ItemInterface.php index cbd72260ba..10c048897c 100644 --- a/src/Symfony/Contracts/Cache/ItemInterface.php +++ b/src/Symfony/Contracts/Cache/ItemInterface.php @@ -25,22 +25,22 @@ interface ItemInterface extends CacheItemInterface /** * References the Unix timestamp stating when the item will expire. */ - const METADATA_EXPIRY = 'expiry'; + public const METADATA_EXPIRY = 'expiry'; /** * References the time the item took to be created, in milliseconds. */ - const METADATA_CTIME = 'ctime'; + public const METADATA_CTIME = 'ctime'; /** * References the list of tags that were assigned to the item, as string[]. */ - const METADATA_TAGS = 'tags'; + public const METADATA_TAGS = 'tags'; /** * Reserved characters that cannot be used in a key or tag. */ - const RESERVED_CHARACTERS = '{}()/\@:'; + public const RESERVED_CHARACTERS = '{}()/\@:'; /** * Adds a tag to a cache item. From 018415e194312c6a8e2a8f363db67d97057fc90d Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 8 Dec 2020 18:00:58 +0100 Subject: [PATCH 2/2] Update .php_cs.dist --- .php_cs.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/.php_cs.dist b/.php_cs.dist index 78ba3c0266..21c183fc88 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -16,6 +16,7 @@ return PhpCsFixer\Config::create() 'native_constant_invocation' => true, 'combine_nested_dirname' => true, 'list_syntax' => ['syntax' => 'short'], + 'visibility_required' => ['property', 'method', 'const'], ]) ->setRiskyAllowed(true) ->setFinder(