diff --git a/.php_cs.dist b/.php_cs.dist index 84883ff9bf..b56c67faae 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( diff --git a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php index 63437920bd..4c385ef070 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 cc15da57ee..e32d4b0c6d 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 168956da94..dc848c143c 100644 --- a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php +++ b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php @@ -24,7 +24,7 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] 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 6637817090..5ba32b1bc2 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -25,9 +25,9 @@ use Symfony\Component\ErrorHandler\DebugClassLoader; */ class DeprecationErrorHandler { - 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 85d776638d..541754cee2 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 286d6665e3..23c244e424 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php @@ -26,7 +26,7 @@ use Twig\NodeVisitor\AbstractNodeVisitor; */ final 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 e94d1f2408..70ad92343e 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 71a96aef61..ec17387d9b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php @@ -38,13 +38,13 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class TranslationDebugCommand extends Command { - const EXIT_CODE_GENERAL_ERROR = 64; - const EXIT_CODE_MISSING = 65; - const EXIT_CODE_UNUSED = 66; - const EXIT_CODE_FALLBACK = 68; - const MESSAGE_MISSING = 0; - const MESSAGE_UNUSED = 1; - const MESSAGE_EQUALS_FALLBACK = 2; + public const EXIT_CODE_GENERAL_ERROR = 64; + public const EXIT_CODE_MISSING = 65; + public const EXIT_CODE_UNUSED = 66; + public const EXIT_CODE_FALLBACK = 68; + 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 e960d9b38b..f930e6c725 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/Component/Cache/Adapter/TagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/TagAwareAdapter.php index daa5089df0..7f1677e400 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 b113686e66..f4deed977f 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 d63beed94b..be6f435d36 100644 --- a/src/Symfony/Component/Console/ConsoleEvents.php +++ b/src/Symfony/Component/Console/ConsoleEvents.php @@ -30,7 +30,7 @@ final class ConsoleEvents * * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent") */ - const COMMAND = 'console.command'; + public const COMMAND = 'console.command'; /** * The SIGNAL event allows you to perform some actions @@ -38,7 +38,7 @@ final class ConsoleEvents * * @Event("Symfony\Component\Console\Event\ConsoleSignalEvent") */ - const SIGNAL = 'console.signal'; + public const SIGNAL = 'console.signal'; /** * The TERMINATE event allows you to attach listeners after a command is @@ -46,7 +46,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. @@ -56,14 +56,14 @@ final class ConsoleEvents * * @Event("Symfony\Component\Console\Event\ConsoleErrorEvent") */ - const ERROR = 'console.error'; + public const ERROR = 'console.error'; /** * Event aliases. * * These aliases can be consumed by RegisterListenersPass. */ - const ALIASES = [ + public const ALIASES = [ ConsoleCommandEvent::class => self::COMMAND, ConsoleErrorEvent::class => self::ERROR, ConsoleSignalEvent::class => self::SIGNAL, 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 a24697cdc9..08bd18fd1f 100644 --- a/src/Symfony/Component/Console/Event/ConsoleCommandEvent.php +++ b/src/Symfony/Component/Console/Event/ConsoleCommandEvent.php @@ -21,7 +21,7 @@ final 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/Helper/TableCellStyle.php b/src/Symfony/Component/Console/Helper/TableCellStyle.php index 4766ba3736..ad9aea83b1 100644 --- a/src/Symfony/Component/Console/Helper/TableCellStyle.php +++ b/src/Symfony/Component/Console/Helper/TableCellStyle.php @@ -18,7 +18,7 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; */ class TableCellStyle { - const DEFAULT_ALIGN = 'left'; + public const DEFAULT_ALIGN = 'left'; private $options = [ 'fg' => 'default', 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 6ed37e71a3..6fff32696b 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php @@ -26,37 +26,37 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface /** * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_CEILING instead. */ - const ROUND_CEILING = \NumberFormatter::ROUND_CEILING; + public const ROUND_CEILING = \NumberFormatter::ROUND_CEILING; /** * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_FLOOR instead. */ - const ROUND_FLOOR = \NumberFormatter::ROUND_FLOOR; + public const ROUND_FLOOR = \NumberFormatter::ROUND_FLOOR; /** * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_UP instead. */ - const ROUND_UP = \NumberFormatter::ROUND_UP; + public const ROUND_UP = \NumberFormatter::ROUND_UP; /** * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_DOWN instead. */ - const ROUND_DOWN = \NumberFormatter::ROUND_DOWN; + public const ROUND_DOWN = \NumberFormatter::ROUND_DOWN; /** * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_HALFEVEN instead. */ - const ROUND_HALF_EVEN = \NumberFormatter::ROUND_HALFEVEN; + public const ROUND_HALF_EVEN = \NumberFormatter::ROUND_HALFEVEN; /** * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_HALFUP instead. */ - const ROUND_HALF_UP = \NumberFormatter::ROUND_HALFUP; + public const ROUND_HALF_UP = \NumberFormatter::ROUND_HALFUP; /** * @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_HALFDOWN instead. */ - 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 9e64091987..5573572d2b 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 14eb4bd691..fa1e8de8f7 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 f12b006b4a..1881709f89 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 d3b3eb6da1..0afa3d4e43 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/FileType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/FileType.php @@ -24,8 +24,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 3f84f3c342..ee350dd3e4 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 f7ca06c37a..cf4d97f556 100644 --- a/src/Symfony/Component/Form/FormEvents.php +++ b/src/Symfony/Component/Form/FormEvents.php @@ -37,7 +37,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 @@ -56,7 +56,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(). @@ -71,7 +71,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. @@ -82,7 +82,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. @@ -92,14 +92,14 @@ 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'; /** * Event aliases. * * These aliases can be consumed by RegisterListenersPass. */ - const ALIASES = [ + public const ALIASES = [ PreSubmitEvent::class => self::PRE_SUBMIT, SubmitEvent::class => self::SUBMIT, PostSubmitEvent::class => self::POST_SUBMIT, diff --git a/src/Symfony/Component/Form/FormRenderer.php b/src/Symfony/Component/Form/FormRenderer.php index ed63d9499c..100f478920 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 16ede19493..6dcaf6bb2a 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php @@ -22,7 +22,7 @@ class ChoiceTypeTest extends BaseTypeTest { use ExpectDeprecationTrait; - 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 706c3f8506..3fb2d75815 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php @@ -17,7 +17,7 @@ use Symfony\Component\Form\Tests\Fixtures\BlockPrefixedFooTextType; 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/ColorTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ColorTypeTest.php index 1a83b44b65..cfe7f0c527 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ColorTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ColorTypeTest.php @@ -16,7 +16,7 @@ use Symfony\Component\Form\FormError; final class ColorTypeTest extends BaseTypeTest { - const TESTED_TYPE = ColorType::class; + public const TESTED_TYPE = ColorType::class; /** * @dataProvider validationShouldPassProvider 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 8f565f772b..9572f3418c 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php @@ -16,7 +16,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 07e212afda..8cccfd32bd 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php @@ -16,7 +16,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 306460a9d7..d9464265fb 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 f5cb83190b..4879850217 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 488e60bc97..4946aca29e 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 dd2af45406..8d3eaea363 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php @@ -16,7 +16,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 1658c41924..94f47706ab 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 e3c1b58ae4..4dfe38bf59 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/PercentTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/PercentTypeTest.php index a2a187f542..875ac905f7 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/PercentTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/PercentTypeTest.php @@ -20,7 +20,7 @@ class PercentTypeTest extends TypeTestCase { use ExpectDeprecationTrait; - const TESTED_TYPE = PercentType::class; + public const TESTED_TYPE = PercentType::class; private $defaultLocale; 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 4ec255a6c6..c31f6f8682 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 699e1d2700..af22edf39c 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 c4256a315a..9d2eeaae1c 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 90f73add1e..94d65dde1e 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 370c4acb3e..ff317a734a 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 9cb130f720..90e52a913a 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -40,28 +40,28 @@ class_exists(ServerBag::class); */ class Request { - const HEADER_FORWARDED = 0b000001; // When using RFC 7239 - const HEADER_X_FORWARDED_FOR = 0b000010; - const HEADER_X_FORWARDED_HOST = 0b000100; - const HEADER_X_FORWARDED_PROTO = 0b001000; - const HEADER_X_FORWARDED_PORT = 0b010000; - const HEADER_X_FORWARDED_PREFIX = 0b100000; + public const HEADER_FORWARDED = 0b000001; // When using RFC 7239 + public const HEADER_X_FORWARDED_FOR = 0b000010; + public const HEADER_X_FORWARDED_HOST = 0b000100; + public const HEADER_X_FORWARDED_PROTO = 0b001000; + public const HEADER_X_FORWARDED_PORT = 0b010000; + public const HEADER_X_FORWARDED_PREFIX = 0b100000; /** @deprecated since Symfony 5.2, use either "HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO" or "HEADER_X_FORWARDED_AWS_ELB" or "HEADER_X_FORWARDED_TRAEFIK" constants instead. */ - const HEADER_X_FORWARDED_ALL = 0b1011110; // All "X-Forwarded-*" headers sent by "usual" reverse proxy - const HEADER_X_FORWARDED_AWS_ELB = 0b0011010; // AWS ELB doesn't send X-Forwarded-Host - const HEADER_X_FORWARDED_TRAEFIK = 0b0111110; // All "X-Forwarded-*" headers sent by Traefik reverse proxy + public const HEADER_X_FORWARDED_ALL = 0b1011110; // All "X-Forwarded-*" headers sent by "usual" reverse proxy + public const HEADER_X_FORWARDED_AWS_ELB = 0b0011010; // AWS ELB doesn't send X-Forwarded-Host + public const HEADER_X_FORWARDED_TRAEFIK = 0b0111110; // All "X-Forwarded-*" headers sent by Traefik reverse proxy - 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 df65652456..9d17261aad 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -21,69 +21,69 @@ 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 - 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_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 + 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 /** * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control diff --git a/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php index 76e11ce36e..780a5df6cd 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 92174485c7..a371139948 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 c79ee023c4..6911db1811 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 882574ae2f..4244f46014 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php @@ -38,7 +38,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 a75d1a8724..c469a22b81 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 8aa0ffa540..55b59bc9b2 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -74,15 +74,15 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private static $freshCache = []; - const VERSION = '5.2.1-DEV'; - const VERSION_ID = 50201; - const MAJOR_VERSION = 5; - const MINOR_VERSION = 2; - const RELEASE_VERSION = 1; - const EXTRA_VERSION = 'DEV'; + public const VERSION = '5.2.1-DEV'; + public const VERSION_ID = 50201; + public const MAJOR_VERSION = 5; + public const MINOR_VERSION = 2; + public const RELEASE_VERSION = 1; + public const EXTRA_VERSION = 'DEV'; - const END_OF_MAINTENANCE = '07/2021'; - const END_OF_LIFE = '07/2021'; + public const END_OF_MAINTENANCE = '07/2021'; + public const END_OF_LIFE = '07/2021'; public function __construct(string $environment, bool $debug) { diff --git a/src/Symfony/Component/HttpKernel/KernelEvents.php b/src/Symfony/Component/HttpKernel/KernelEvents.php index 848990cb9a..3d47f60801 100644 --- a/src/Symfony/Component/HttpKernel/KernelEvents.php +++ b/src/Symfony/Component/HttpKernel/KernelEvents.php @@ -36,7 +36,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. @@ -46,7 +46,7 @@ final class KernelEvents * * @Event("Symfony\Component\HttpKernel\Event\ExceptionEvent") */ - const EXCEPTION = 'kernel.exception'; + public const EXCEPTION = 'kernel.exception'; /** * The CONTROLLER event occurs once a controller was found for @@ -57,7 +57,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. @@ -67,7 +67,7 @@ final class KernelEvents * * @Event("Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent") */ - const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments'; + public const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments'; /** * The VIEW event occurs when the return value of a controller @@ -78,7 +78,7 @@ final class KernelEvents * * @Event("Symfony\Component\HttpKernel\Event\ViewEvent") */ - const VIEW = 'kernel.view'; + public const VIEW = 'kernel.view'; /** * The RESPONSE event occurs once a response was created for @@ -89,7 +89,7 @@ final class KernelEvents * * @Event("Symfony\Component\HttpKernel\Event\ResponseEvent") */ - const RESPONSE = 'kernel.response'; + public const RESPONSE = 'kernel.response'; /** * The FINISH_REQUEST event occurs when a response was generated for a request. @@ -99,7 +99,7 @@ final class KernelEvents * * @Event("Symfony\Component\HttpKernel\Event\FinishRequestEvent") */ - const FINISH_REQUEST = 'kernel.finish_request'; + public const FINISH_REQUEST = 'kernel.finish_request'; /** * The TERMINATE event occurs once a response was sent. @@ -108,14 +108,14 @@ final class KernelEvents * * @Event("Symfony\Component\HttpKernel\Event\TerminateEvent") */ - const TERMINATE = 'kernel.terminate'; + public const TERMINATE = 'kernel.terminate'; /** * Event aliases. * * These aliases can be consumed by RegisterListenersPass. */ - const ALIASES = [ + public const ALIASES = [ ControllerArgumentsEvent::class => self::CONTROLLER_ARGUMENTS, ControllerEvent::class => self::CONTROLLER, ResponseEvent::class => self::RESPONSE, diff --git a/src/Symfony/Component/Intl/Collator/Collator.php b/src/Symfony/Component/Intl/Collator/Collator.php index a43a4f69bf..aa5ea61ebb 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/DateFormatter/IntlDateFormatter.php b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php index fee4f0a5d9..d5de044d46 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 d91a7e9139..a8791536ab 100644 --- a/src/Symfony/Component/Intl/Intl.php +++ b/src/Symfony/Component/Intl/Intl.php @@ -22,32 +22,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 6fbe50e3fa..81c287e12a 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 40223dc86d..fc65ba3b28 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 497c831315..6d97d7843c 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 a2ddf2e755..16c8a68594 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 edab34f908..459bcf82b7 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/Notifier/Bridge/Mobyt/MobytOptions.php b/src/Symfony/Component/Notifier/Bridge/Mobyt/MobytOptions.php index b63fd59e6c..dc45cd780e 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mobyt/MobytOptions.php +++ b/src/Symfony/Component/Notifier/Bridge/Mobyt/MobytOptions.php @@ -21,9 +21,9 @@ use Symfony\Component\Notifier\Notification\Notification; */ final class MobytOptions implements MessageOptionsInterface { - const MESSAGE_TYPE_QUALITY_HIGH = 'N'; - const MESSAGE_TYPE_QUALITY_MEDIUM = 'L'; - const MESSAGE_TYPE_QUALITY_LOW = 'LL'; + public const MESSAGE_TYPE_QUALITY_HIGH = 'N'; + public const MESSAGE_TYPE_QUALITY_MEDIUM = 'L'; + public const MESSAGE_TYPE_QUALITY_LOW = 'LL'; private $options = []; 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 be36485005..fa747c579a 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 0b4ef88637..2c36b063a7 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 5bd733b4e4..3d8dd07f70 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, ConstructorArgumentTypeExtractorInterface { - 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 5890ffa55e..c641e81511 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 dbff4a87b3..9951625be9 100644 --- a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php @@ -31,8 +31,8 @@ class XmlFileLoader extends FileLoader use LocalizedRouteTrait; use PrefixTrait; - 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 627cd02af4..ab8633a8e2 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 4c76231e3d..356b47bc39 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 618757d9ff..da542e1342 100644 --- a/src/Symfony/Component/Routing/RouteCompiler.php +++ b/src/Symfony/Component/Routing/RouteCompiler.php @@ -22,14 +22,14 @@ class RouteCompiler implements RouteCompilerInterface /** * @deprecated since Symfony 5.1, to be removed in 6.0 */ - 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 @@ -37,7 +37,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 85d3908aab..07fa2bb62b 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 75b932d1d0..35696f9fee 100644 --- a/src/Symfony/Component/Security/Core/AuthenticationEvents.php +++ b/src/Symfony/Component/Security/Core/AuthenticationEvents.php @@ -22,7 +22,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 @@ -30,14 +30,14 @@ final class AuthenticationEvents * * @Event("Symfony\Component\Security\Core\Event\AuthenticationFailureEvent") */ - const AUTHENTICATION_FAILURE = 'security.authentication.failure'; + public const AUTHENTICATION_FAILURE = 'security.authentication.failure'; /** * Event aliases. * * These aliases can be consumed by RegisterListenersPass. */ - const ALIASES = [ + public const ALIASES = [ AuthenticationSuccessEvent::class => self::AUTHENTICATION_SUCCESS, AuthenticationFailureEvent::class => self::AUTHENTICATION_FAILURE, ]; diff --git a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php index 8356c38bb9..440eac75cd 100644 --- a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php +++ b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php @@ -23,10 +23,10 @@ use Symfony\Component\Security\Core\Exception\InvalidArgumentException; */ class AccessDecisionManager implements AccessDecisionManagerInterface { - const STRATEGY_AFFIRMATIVE = 'affirmative'; - const STRATEGY_CONSENSUS = 'consensus'; - const STRATEGY_UNANIMOUS = 'unanimous'; - const STRATEGY_PRIORITY = 'priority'; + public const STRATEGY_AFFIRMATIVE = 'affirmative'; + public const STRATEGY_CONSENSUS = 'consensus'; + public const STRATEGY_UNANIMOUS = 'unanimous'; + public const STRATEGY_PRIORITY = 'priority'; 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 0c57db20fa..fd6a65f2bc 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php @@ -26,13 +26,13 @@ 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'; - const IS_ANONYMOUS = 'IS_ANONYMOUS'; - const IS_IMPERSONATOR = 'IS_IMPERSONATOR'; - const IS_REMEMBERED = 'IS_REMEMBERED'; - const PUBLIC_ACCESS = 'PUBLIC_ACCESS'; + public const IS_AUTHENTICATED_FULLY = 'IS_AUTHENTICATED_FULLY'; + public const IS_AUTHENTICATED_REMEMBERED = 'IS_AUTHENTICATED_REMEMBERED'; + public const IS_AUTHENTICATED_ANONYMOUSLY = 'IS_AUTHENTICATED_ANONYMOUSLY'; + public const IS_ANONYMOUS = 'IS_ANONYMOUS'; + public const IS_IMPERSONATOR = 'IS_IMPERSONATOR'; + public const IS_REMEMBERED = 'IS_REMEMBERED'; + public const PUBLIC_ACCESS = 'PUBLIC_ACCESS'; 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/BasePasswordEncoder.php b/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php index 4c5824f783..e067a48a37 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 f326d07afe..72e87ea416 100644 --- a/src/Symfony/Component/Security/Core/Security.php +++ b/src/Symfony/Component/Security/Core/Security.php @@ -23,10 +23,10 @@ use Symfony\Component\Security\Core\User\UserInterface; */ class Security implements AuthorizationCheckerInterface { - 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 2670072cfb..97a95b657b 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 70df4f5f98..04774d0c96 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 fa9d163ff0..4d91656a42 100644 --- a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php @@ -39,7 +39,7 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; */ class SwitchUserListener extends AbstractListener { - 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 22a63f7803..295e7d80a4 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 23fc0fc187..3f776677de 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php +++ b/src/Symfony/Component/Security/Http/RememberMe/RememberMeServicesInterface.php @@ -33,7 +33,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 6a7247f43f..39a67d24b2 100644 --- a/src/Symfony/Component/Security/Http/SecurityEvents.php +++ b/src/Symfony/Component/Security/Http/SecurityEvents.php @@ -25,7 +25,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 @@ -33,14 +33,14 @@ final class SecurityEvents * * @Event("Symfony\Component\Security\Http\Event\SwitchUserEvent") */ - const SWITCH_USER = 'security.switch_user'; + public const SWITCH_USER = 'security.switch_user'; /** * Event aliases. * * These aliases can be consumed by RegisterListenersPass. */ - const ALIASES = [ + public const ALIASES = [ InteractiveLoginEvent::class => self::INTERACTIVE_LOGIN, SwitchUserEvent::class => self::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 631defab32..6018872e35 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 dda813d7ae..7ba4bffde3 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 93c359eaf7..88a837c603 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 db2619dfe2..386fab9207 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 fe48a9372c..cc49630b6e 100644 --- a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php @@ -29,31 +29,31 @@ 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'; - const TYPE_CAST_ATTRIBUTES = 'xml_type_cast_attributes'; - const VERSION = 'xml_version'; + 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'; + 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 63c3479a74..a969b9594d 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 6be2d44c31..2546ffd0c6 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ConstraintViolationListNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ConstraintViolationListNormalizer.php @@ -24,11 +24,11 @@ use Symfony\Component\Validator\ConstraintViolationListInterface; */ class ConstraintViolationListNormalizer implements NormalizerInterface, CacheableSupportsMethodInterface { - const INSTANCE = 'instance'; - const STATUS = 'status'; - const TITLE = 'title'; - const TYPE = 'type'; - const PAYLOAD_FIELDS = 'payload_fields'; + public const INSTANCE = 'instance'; + public const STATUS = 'status'; + public const TITLE = 'title'; + public const TYPE = 'type'; + public const PAYLOAD_FIELDS = 'payload_fields'; private $defaultContext; private $nameConverter; diff --git a/src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php index 8bfb4c1675..a47fd76b45 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 05aad160e3..f39fb32bc7 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 = [ self::FORMAT_KEY => \DateTime::RFC3339, diff --git a/src/Symfony/Component/Serializer/Normalizer/FormErrorNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/FormErrorNormalizer.php index e05791c3fc..48399f4e6c 100644 --- a/src/Symfony/Component/Serializer/Normalizer/FormErrorNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/FormErrorNormalizer.php @@ -18,9 +18,9 @@ use Symfony\Component\Form\FormInterface; */ final class FormErrorNormalizer implements NormalizerInterface, CacheableSupportsMethodInterface { - const TITLE = 'title'; - const TYPE = 'type'; - const CODE = 'status_code'; + public const TITLE = 'title'; + public const TYPE = 'type'; + public const CODE = 'status_code'; /** * {@inheritdoc} diff --git a/src/Symfony/Component/Serializer/Normalizer/UnwrappingDenormalizer.php b/src/Symfony/Component/Serializer/Normalizer/UnwrappingDenormalizer.php index a56546c677..6bc8df80bb 100644 --- a/src/Symfony/Component/Serializer/Normalizer/UnwrappingDenormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/UnwrappingDenormalizer.php @@ -23,7 +23,7 @@ final class UnwrappingDenormalizer implements DenormalizerInterface, SerializerA { use SerializerAwareTrait; - const UNWRAP_PATH = 'unwrap_path'; + public const UNWRAP_PATH = 'unwrap_path'; private $propertyAccessor; diff --git a/src/Symfony/Component/Translation/DataCollectorTranslator.php b/src/Symfony/Component/Translation/DataCollectorTranslator.php index 6767a2ad5f..ed5008e1c7 100644 --- a/src/Symfony/Component/Translation/DataCollectorTranslator.php +++ b/src/Symfony/Component/Translation/DataCollectorTranslator.php @@ -21,9 +21,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInterface, LocaleAwareInterface, 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 0245711837..fcb33f05a6 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 6683eeb834..5d83bd8a9d 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 6381d38273..f5311c242f 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 b65d244907..78aa1cfa3c 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 81cc1bd195..1cd98b41d2 100644 --- a/src/Symfony/Component/Validator/Constraints/Bic.php +++ b/src/Symfony/Component/Validator/Constraints/Bic.php @@ -27,12 +27,12 @@ use Symfony\Component\Validator\Exception\LogicException; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 b0380d996f..a9ee5259a1 100644 --- a/src/Symfony/Component/Validator/Constraints/Blank.php +++ b/src/Symfony/Component/Validator/Constraints/Blank.php @@ -22,7 +22,7 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 fb70473250..e9d66b9bbe 100644 --- a/src/Symfony/Component/Validator/Constraints/CardScheme.php +++ b/src/Symfony/Component/Validator/Constraints/CardScheme.php @@ -25,21 +25,21 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class CardScheme extends Constraint { - const AMEX = 'AMEX'; - const CHINA_UNIONPAY = 'CHINA_UNIONPAY'; - const DINERS = 'DINERS'; - const DISCOVER = 'DISCOVER'; - const INSTAPAYMENT = 'INSTAPAYMENT'; - const JCB = 'JCB'; - const LASER = 'LASER'; - const MAESTRO = 'MAESTRO'; - const MASTERCARD = 'MASTERCARD'; - const MIR = 'MIR'; - const UATP = 'UATP'; - const VISA = 'VISA'; + public const AMEX = 'AMEX'; + public const CHINA_UNIONPAY = 'CHINA_UNIONPAY'; + public const DINERS = 'DINERS'; + public const DISCOVER = 'DISCOVER'; + public const INSTAPAYMENT = 'INSTAPAYMENT'; + public const JCB = 'JCB'; + public const LASER = 'LASER'; + public const MAESTRO = 'MAESTRO'; + public const MASTERCARD = 'MASTERCARD'; + public const MIR = 'MIR'; + public const UATP = 'UATP'; + public const VISA = 'VISA'; - 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 86d199f867..1e37c31f43 100644 --- a/src/Symfony/Component/Validator/Constraints/Choice.php +++ b/src/Symfony/Component/Validator/Constraints/Choice.php @@ -22,9 +22,9 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 c87b86d0eb..ffeef635eb 100644 --- a/src/Symfony/Component/Validator/Constraints/Count.php +++ b/src/Symfony/Component/Validator/Constraints/Count.php @@ -23,9 +23,9 @@ use Symfony\Component\Validator\Exception\MissingOptionsException; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class Count extends Constraint { - const TOO_FEW_ERROR = 'bef8e338-6ae5-4caf-b8e2-50e7b0579e69'; - const TOO_MANY_ERROR = '756b1212-697c-468d-a9ad-50dd783bb169'; - const NOT_DIVISIBLE_BY_ERROR = DivisibleBy::NOT_DIVISIBLE_BY; + public const TOO_FEW_ERROR = 'bef8e338-6ae5-4caf-b8e2-50e7b0579e69'; + public const TOO_MANY_ERROR = '756b1212-697c-468d-a9ad-50dd783bb169'; + public const NOT_DIVISIBLE_BY_ERROR = DivisibleBy::NOT_DIVISIBLE_BY; 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 4c445d31cd..ccd815cfe5 100644 --- a/src/Symfony/Component/Validator/Constraints/Country.php +++ b/src/Symfony/Component/Validator/Constraints/Country.php @@ -24,7 +24,7 @@ use Symfony\Component\Validator\Exception\LogicException; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 16bda3a163..cac2dfffc8 100644 --- a/src/Symfony/Component/Validator/Constraints/Currency.php +++ b/src/Symfony/Component/Validator/Constraints/Currency.php @@ -25,7 +25,7 @@ use Symfony\Component\Validator\Exception\LogicException; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 e2135aec45..7c9666f7ca 100644 --- a/src/Symfony/Component/Validator/Constraints/Date.php +++ b/src/Symfony/Component/Validator/Constraints/Date.php @@ -22,8 +22,8 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 281e625797..94c3dd6adc 100644 --- a/src/Symfony/Component/Validator/Constraints/DateTime.php +++ b/src/Symfony/Component/Validator/Constraints/DateTime.php @@ -22,9 +22,9 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 c24d8897b5..3f18cac7c1 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 d47545a287..d3f5cd713a 100644 --- a/src/Symfony/Component/Validator/Constraints/DivisibleBy.php +++ b/src/Symfony/Component/Validator/Constraints/DivisibleBy.php @@ -20,7 +20,7 @@ namespace Symfony\Component\Validator\Constraints; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 92ee58c17d..7976cc4ee3 100644 --- a/src/Symfony/Component/Validator/Constraints/Email.php +++ b/src/Symfony/Component/Validator/Constraints/Email.php @@ -29,7 +29,7 @@ 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'; protected static $errorNames = [ self::INVALID_FORMAT_ERROR => 'STRICT_CHECK_FAILED_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/EqualTo.php b/src/Symfony/Component/Validator/Constraints/EqualTo.php index d2394266f5..09ab4f0f52 100644 --- a/src/Symfony/Component/Validator/Constraints/EqualTo.php +++ b/src/Symfony/Component/Validator/Constraints/EqualTo.php @@ -21,7 +21,7 @@ namespace Symfony\Component\Validator\Constraints; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 94ffbb8aca..01cf429b28 100644 --- a/src/Symfony/Component/Validator/Constraints/Expression.php +++ b/src/Symfony/Component/Validator/Constraints/Expression.php @@ -26,7 +26,7 @@ use Symfony\Component\Validator\Exception\LogicException; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] 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/ExpressionLanguageSyntax.php b/src/Symfony/Component/Validator/Constraints/ExpressionLanguageSyntax.php index a68d2e69a1..d5c1f6f9fc 100644 --- a/src/Symfony/Component/Validator/Constraints/ExpressionLanguageSyntax.php +++ b/src/Symfony/Component/Validator/Constraints/ExpressionLanguageSyntax.php @@ -22,7 +22,7 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class ExpressionLanguageSyntax extends Constraint { - const EXPRESSION_LANGUAGE_SYNTAX_ERROR = '1766a3f3-ff03-40eb-b053-ab7aa23d988a'; + public const EXPRESSION_LANGUAGE_SYNTAX_ERROR = '1766a3f3-ff03-40eb-b053-ab7aa23d988a'; protected static $errorNames = [ self::EXPRESSION_LANGUAGE_SYNTAX_ERROR => 'EXPRESSION_LANGUAGE_SYNTAX_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/File.php b/src/Symfony/Component/Validator/Constraints/File.php index 65e5bddf2c..df62c21386 100644 --- a/src/Symfony/Component/Validator/Constraints/File.php +++ b/src/Symfony/Component/Validator/Constraints/File.php @@ -27,11 +27,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 01ff2366a4..41648752a2 100644 --- a/src/Symfony/Component/Validator/Constraints/GreaterThan.php +++ b/src/Symfony/Component/Validator/Constraints/GreaterThan.php @@ -21,7 +21,7 @@ namespace Symfony\Component\Validator\Constraints; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 14c197c93d..86ff44e8c3 100644 --- a/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php +++ b/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php @@ -21,7 +21,7 @@ namespace Symfony\Component\Validator\Constraints; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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/Hostname.php b/src/Symfony/Component/Validator/Constraints/Hostname.php index 4f923c6fc8..d0d02d1f56 100644 --- a/src/Symfony/Component/Validator/Constraints/Hostname.php +++ b/src/Symfony/Component/Validator/Constraints/Hostname.php @@ -22,7 +22,7 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class Hostname extends Constraint { - const INVALID_HOSTNAME_ERROR = '7057ffdb-0af4-4f7e-bd5e-e9acfa6d7a2d'; + public const INVALID_HOSTNAME_ERROR = '7057ffdb-0af4-4f7e-bd5e-e9acfa6d7a2d'; protected static $errorNames = [ self::INVALID_HOSTNAME_ERROR => 'INVALID_HOSTNAME_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Iban.php b/src/Symfony/Component/Validator/Constraints/Iban.php index 1d2989f2e5..2f7a61e982 100644 --- a/src/Symfony/Component/Validator/Constraints/Iban.php +++ b/src/Symfony/Component/Validator/Constraints/Iban.php @@ -24,11 +24,11 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 0b6d3828f2..b3d6b92cba 100644 --- a/src/Symfony/Component/Validator/Constraints/IdenticalTo.php +++ b/src/Symfony/Component/Validator/Constraints/IdenticalTo.php @@ -21,7 +21,7 @@ namespace Symfony\Component\Validator\Constraints; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 b1480af4c2..83fc9f9dd2 100644 --- a/src/Symfony/Component/Validator/Constraints/Image.php +++ b/src/Symfony/Component/Validator/Constraints/Image.php @@ -21,19 +21,19 @@ namespace Symfony\Component\Validator\Constraints; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 e3b5a80a93..0e4124074f 100644 --- a/src/Symfony/Component/Validator/Constraints/Ip.php +++ b/src/Symfony/Component/Validator/Constraints/Ip.php @@ -27,26 +27,26 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 5885bbd6a2..460aafc6d9 100644 --- a/src/Symfony/Component/Validator/Constraints/IsFalse.php +++ b/src/Symfony/Component/Validator/Constraints/IsFalse.php @@ -22,7 +22,7 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 9a56f7589b..2a8439f429 100644 --- a/src/Symfony/Component/Validator/Constraints/IsNull.php +++ b/src/Symfony/Component/Validator/Constraints/IsNull.php @@ -22,7 +22,7 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 57801acfe8..7b95475e38 100644 --- a/src/Symfony/Component/Validator/Constraints/IsTrue.php +++ b/src/Symfony/Component/Validator/Constraints/IsTrue.php @@ -22,7 +22,7 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 4e910876c4..b95dfebca9 100644 --- a/src/Symfony/Component/Validator/Constraints/Isbn.php +++ b/src/Symfony/Component/Validator/Constraints/Isbn.php @@ -24,14 +24,14 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class Isbn extends Constraint { - const ISBN_10 = 'isbn10'; - const ISBN_13 = 'isbn13'; + public const ISBN_10 = 'isbn10'; + public const ISBN_13 = 'isbn13'; - 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/Isin.php b/src/Symfony/Component/Validator/Constraints/Isin.php index 940577774d..7a6af8ae93 100644 --- a/src/Symfony/Component/Validator/Constraints/Isin.php +++ b/src/Symfony/Component/Validator/Constraints/Isin.php @@ -22,12 +22,12 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class Isin extends Constraint { - const VALIDATION_LENGTH = 12; - const VALIDATION_PATTERN = '/[A-Z]{2}[A-Z0-9]{9}[0-9]{1}/'; + public const VALIDATION_LENGTH = 12; + public const VALIDATION_PATTERN = '/[A-Z]{2}[A-Z0-9]{9}[0-9]{1}/'; - const INVALID_LENGTH_ERROR = '88738dfc-9ed5-ba1e-aebe-402a2a9bf58e'; - const INVALID_PATTERN_ERROR = '3d08ce0-ded9-a93d-9216-17ac21265b65e'; - const INVALID_CHECKSUM_ERROR = '32089b-0ee1-93ba-399e-aa232e62f2d29d'; + public const INVALID_LENGTH_ERROR = '88738dfc-9ed5-ba1e-aebe-402a2a9bf58e'; + public const INVALID_PATTERN_ERROR = '3d08ce0-ded9-a93d-9216-17ac21265b65e'; + public const INVALID_CHECKSUM_ERROR = '32089b-0ee1-93ba-399e-aa232e62f2d29d'; protected static $errorNames = [ self::INVALID_LENGTH_ERROR => 'INVALID_LENGTH_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Issn.php b/src/Symfony/Component/Validator/Constraints/Issn.php index 4608b9c3ed..b3b7b21f6c 100644 --- a/src/Symfony/Component/Validator/Constraints/Issn.php +++ b/src/Symfony/Component/Validator/Constraints/Issn.php @@ -23,12 +23,12 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 861502ca61..4388858540 100644 --- a/src/Symfony/Component/Validator/Constraints/Json.php +++ b/src/Symfony/Component/Validator/Constraints/Json.php @@ -22,7 +22,7 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 e4c437fab0..a8204da718 100644 --- a/src/Symfony/Component/Validator/Constraints/Language.php +++ b/src/Symfony/Component/Validator/Constraints/Language.php @@ -24,7 +24,7 @@ use Symfony\Component\Validator\Exception\LogicException; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 aaf5d66df3..9d2a7eb7d9 100644 --- a/src/Symfony/Component/Validator/Constraints/Length.php +++ b/src/Symfony/Component/Validator/Constraints/Length.php @@ -24,9 +24,9 @@ use Symfony\Component\Validator\Exception\MissingOptionsException; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 8181bc9c82..acd6c9e66f 100644 --- a/src/Symfony/Component/Validator/Constraints/LessThan.php +++ b/src/Symfony/Component/Validator/Constraints/LessThan.php @@ -21,7 +21,7 @@ namespace Symfony\Component\Validator\Constraints; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 00e967b22e..6f72845940 100644 --- a/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php +++ b/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php @@ -21,7 +21,7 @@ namespace Symfony\Component\Validator\Constraints; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 e07b13fd00..43c46cc7b1 100644 --- a/src/Symfony/Component/Validator/Constraints/Locale.php +++ b/src/Symfony/Component/Validator/Constraints/Locale.php @@ -24,7 +24,7 @@ use Symfony\Component\Validator\Exception\LogicException; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 6a18508322..b2d2c29794 100644 --- a/src/Symfony/Component/Validator/Constraints/Luhn.php +++ b/src/Symfony/Component/Validator/Constraints/Luhn.php @@ -26,8 +26,8 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 f25d206b61..6f98d5a617 100644 --- a/src/Symfony/Component/Validator/Constraints/NotBlank.php +++ b/src/Symfony/Component/Validator/Constraints/NotBlank.php @@ -24,7 +24,7 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 f1b459e2c9..213bde2f8d 100644 --- a/src/Symfony/Component/Validator/Constraints/NotCompromisedPassword.php +++ b/src/Symfony/Component/Validator/Constraints/NotCompromisedPassword.php @@ -24,7 +24,7 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 8416f51a9a..4b2accdf75 100644 --- a/src/Symfony/Component/Validator/Constraints/NotEqualTo.php +++ b/src/Symfony/Component/Validator/Constraints/NotEqualTo.php @@ -21,7 +21,7 @@ namespace Symfony\Component\Validator\Constraints; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 7177d68d81..82ee014eb6 100644 --- a/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php +++ b/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php @@ -21,7 +21,7 @@ namespace Symfony\Component\Validator\Constraints; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 1c4e62521c..85783c7081 100644 --- a/src/Symfony/Component/Validator/Constraints/NotNull.php +++ b/src/Symfony/Component/Validator/Constraints/NotNull.php @@ -22,7 +22,7 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 bc6245152c..906057ebaa 100644 --- a/src/Symfony/Component/Validator/Constraints/Range.php +++ b/src/Symfony/Component/Validator/Constraints/Range.php @@ -27,10 +27,10 @@ use Symfony\Component\Validator\Exception\MissingOptionsException; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 6bf88a0232..fbe2485b43 100644 --- a/src/Symfony/Component/Validator/Constraints/Regex.php +++ b/src/Symfony/Component/Validator/Constraints/Regex.php @@ -23,7 +23,7 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 5517fb9c4a..366d623766 100644 --- a/src/Symfony/Component/Validator/Constraints/Time.php +++ b/src/Symfony/Component/Validator/Constraints/Time.php @@ -22,8 +22,8 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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 c99b235412..5a71e4439c 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 e0318e728a..95e1c61e02 100644 --- a/src/Symfony/Component/Validator/Constraints/Type.php +++ b/src/Symfony/Component/Validator/Constraints/Type.php @@ -22,7 +22,7 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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/Ulid.php b/src/Symfony/Component/Validator/Constraints/Ulid.php index 0ba2a7ccfd..d1644b8b34 100644 --- a/src/Symfony/Component/Validator/Constraints/Ulid.php +++ b/src/Symfony/Component/Validator/Constraints/Ulid.php @@ -21,10 +21,10 @@ use Symfony\Component\Validator\Constraint; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class Ulid extends Constraint { - const TOO_SHORT_ERROR = '7b44804e-37d5-4df4-9bdd-b738d4a45bb4'; - const TOO_LONG_ERROR = '9608249f-6da1-4d53-889e-9864b58c4d37'; - const INVALID_CHARACTERS_ERROR = 'e4155739-5135-4258-9c81-ae7b44b5311e'; - const TOO_LARGE_ERROR = 'df8cfb9a-ce6d-4a69-ae5a-eea7ab6f278b'; + public const TOO_SHORT_ERROR = '7b44804e-37d5-4df4-9bdd-b738d4a45bb4'; + public const TOO_LONG_ERROR = '9608249f-6da1-4d53-889e-9864b58c4d37'; + public const INVALID_CHARACTERS_ERROR = 'e4155739-5135-4258-9c81-ae7b44b5311e'; + public const TOO_LARGE_ERROR = 'df8cfb9a-ce6d-4a69-ae5a-eea7ab6f278b'; protected static $errorNames = [ self::TOO_SHORT_ERROR => 'TOO_SHORT_ERROR', diff --git a/src/Symfony/Component/Validator/Constraints/Url.php b/src/Symfony/Component/Validator/Constraints/Url.php index d40541fcf9..23cd77cad6 100644 --- a/src/Symfony/Component/Validator/Constraints/Url.php +++ b/src/Symfony/Component/Validator/Constraints/Url.php @@ -23,7 +23,7 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class Url extends Constraint { - 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 1c435ff3e1..b9f3f44efc 100644 --- a/src/Symfony/Component/Validator/Constraints/UrlValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UrlValidator.php @@ -21,7 +21,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 55c7f9bb26..84f83f896f 100644 --- a/src/Symfony/Component/Validator/Constraints/Uuid.php +++ b/src/Symfony/Component/Validator/Constraints/Uuid.php @@ -23,12 +23,12 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] 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', @@ -40,14 +40,14 @@ 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; - const V6_SORTABLE = 6; + 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; + public const V6_SORTABLE = 6; - const ALL_VERSIONS = [ + public const ALL_VERSIONS = [ self::V1_MAC, self::V2_DCE, self::V3_MD5, diff --git a/src/Symfony/Component/Validator/Constraints/UuidValidator.php b/src/Symfony/Component/Validator/Constraints/UuidValidator.php index f3acc86122..0662966784 100644 --- a/src/Symfony/Component/Validator/Constraints/UuidValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UuidValidator.php @@ -38,11 +38,11 @@ class UuidValidator extends ConstraintValidator // M = any allowed version {1..6} // 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 @@ -56,8 +56,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 deb356eb64..c422830d43 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 0a8e936769..612b21f88e 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 9ff534501b..0308bb8cbe 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 c3497e32a1..da5e7d6719 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 fb12fc7152..9e52cc92a0 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 9b6db20a90..999c6d8f04 100644 --- a/src/Symfony/Component/Workflow/WorkflowEvents.php +++ b/src/Symfony/Component/Workflow/WorkflowEvents.php @@ -28,44 +28,44 @@ final class WorkflowEvents /** * @Event("Symfony\Component\Workflow\Event\GuardEvent") */ - const GUARD = 'workflow.guard'; + public const GUARD = 'workflow.guard'; /** * @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'; /** * @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\CompletedEvent") */ - const COMPLETED = 'workflow.completed'; + public const COMPLETED = 'workflow.completed'; /** * @Event("Symfony\Component\Workflow\Event\AnnounceEvent") */ - const ANNOUNCE = 'workflow.announce'; + public const ANNOUNCE = 'workflow.announce'; /** * Event aliases. * * These aliases can be consumed by RegisterListenersPass. */ - const ALIASES = [ + public const ALIASES = [ GuardEvent::class => self::GUARD, LeaveEvent::class => self::LEAVE, TransitionEvent::class => self::TRANSITION, 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 3086ba0bf4..fe10287877 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 baa830601a..755e666ac3 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 4e457603c3..8362af1459 100644 --- a/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -2738,7 +2738,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.