Merge branch '5.1' into 5.2
* 5.1: Update .php_cs.dist Apply "visibility_required" CS rule to constants
This commit is contained in:
commit
555697df61
@ -16,6 +16,7 @@ return PhpCsFixer\Config::create()
|
|||||||
'native_constant_invocation' => true,
|
'native_constant_invocation' => true,
|
||||||
'combine_nested_dirname' => true,
|
'combine_nested_dirname' => true,
|
||||||
'list_syntax' => ['syntax' => 'short'],
|
'list_syntax' => ['syntax' => 'short'],
|
||||||
|
'visibility_required' => ['property', 'method', 'const'],
|
||||||
])
|
])
|
||||||
->setRiskyAllowed(true)
|
->setRiskyAllowed(true)
|
||||||
->setFinder(
|
->setFinder(
|
||||||
|
@ -20,8 +20,8 @@ use Symfony\Component\Stopwatch\Stopwatch;
|
|||||||
*/
|
*/
|
||||||
class DbalLogger implements SQLLogger
|
class DbalLogger implements SQLLogger
|
||||||
{
|
{
|
||||||
const MAX_STRING_LENGTH = 32;
|
public const MAX_STRING_LENGTH = 32;
|
||||||
const BINARY_DATA_VALUE = '(binary value)';
|
public const BINARY_DATA_VALUE = '(binary value)';
|
||||||
|
|
||||||
protected $logger;
|
protected $logger;
|
||||||
protected $stopwatch;
|
protected $stopwatch;
|
||||||
|
@ -37,7 +37,7 @@ use Symfony\Component\Form\Tests\Extension\Core\Type\FormTypeTest;
|
|||||||
|
|
||||||
class EntityTypeTest extends BaseTypeTest
|
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 ITEM_GROUP_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\GroupableEntity';
|
||||||
private const SINGLE_IDENT_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity';
|
private const SINGLE_IDENT_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity';
|
||||||
|
@ -24,7 +24,7 @@ use Symfony\Component\Validator\Constraint;
|
|||||||
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
|
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
|
||||||
class UniqueEntity extends Constraint
|
class UniqueEntity extends Constraint
|
||||||
{
|
{
|
||||||
const NOT_UNIQUE_ERROR = '23bd9dbf-6b9b-41cd-a99e-4844bcf3077f';
|
public const NOT_UNIQUE_ERROR = '23bd9dbf-6b9b-41cd-a99e-4844bcf3077f';
|
||||||
|
|
||||||
public $message = 'This value is already used.';
|
public $message = 'This value is already used.';
|
||||||
public $service = 'doctrine.orm.validator.unique';
|
public $service = 'doctrine.orm.validator.unique';
|
||||||
|
@ -27,8 +27,8 @@ use Symfony\Component\VarDumper\Dumper\CliDumper;
|
|||||||
*/
|
*/
|
||||||
class ConsoleFormatter implements FormatterInterface
|
class ConsoleFormatter implements FormatterInterface
|
||||||
{
|
{
|
||||||
const SIMPLE_FORMAT = "%datetime% %start_tag%%level_name%%end_tag% <comment>[%channel%]</> %message%%context%%extra%\n";
|
public const SIMPLE_FORMAT = "%datetime% %start_tag%%level_name%%end_tag% <comment>[%channel%]</> %message%%context%%extra%\n";
|
||||||
const SIMPLE_DATE = 'H:i:s';
|
public const SIMPLE_DATE = 'H:i:s';
|
||||||
|
|
||||||
private static $levelColorMap = [
|
private static $levelColorMap = [
|
||||||
Logger::DEBUG => 'fg=white',
|
Logger::DEBUG => 'fg=white',
|
||||||
|
@ -25,9 +25,9 @@ use Symfony\Component\ErrorHandler\DebugClassLoader;
|
|||||||
*/
|
*/
|
||||||
class DeprecationErrorHandler
|
class DeprecationErrorHandler
|
||||||
{
|
{
|
||||||
const MODE_DISABLED = 'disabled';
|
public const MODE_DISABLED = 'disabled';
|
||||||
const MODE_WEAK = 'max[total]=999999&verbose=0';
|
public const MODE_WEAK = 'max[total]=999999&verbose=0';
|
||||||
const MODE_STRICT = 'max[total]=0';
|
public const MODE_STRICT = 'max[total]=0';
|
||||||
|
|
||||||
private $mode;
|
private $mode;
|
||||||
private $configuration;
|
private $configuration;
|
||||||
|
@ -21,14 +21,14 @@ use Symfony\Component\ErrorHandler\DebugClassLoader;
|
|||||||
*/
|
*/
|
||||||
class Deprecation
|
class Deprecation
|
||||||
{
|
{
|
||||||
const PATH_TYPE_VENDOR = 'path_type_vendor';
|
public const PATH_TYPE_VENDOR = 'path_type_vendor';
|
||||||
const PATH_TYPE_SELF = 'path_type_internal';
|
public const PATH_TYPE_SELF = 'path_type_internal';
|
||||||
const PATH_TYPE_UNDETERMINED = 'path_type_undetermined';
|
public const PATH_TYPE_UNDETERMINED = 'path_type_undetermined';
|
||||||
|
|
||||||
const TYPE_SELF = 'type_self';
|
public const TYPE_SELF = 'type_self';
|
||||||
const TYPE_DIRECT = 'type_direct';
|
public const TYPE_DIRECT = 'type_direct';
|
||||||
const TYPE_INDIRECT = 'type_indirect';
|
public const TYPE_INDIRECT = 'type_indirect';
|
||||||
const TYPE_UNDETERMINED = 'type_undetermined';
|
public const TYPE_UNDETERMINED = 'type_undetermined';
|
||||||
|
|
||||||
private $trace = [];
|
private $trace = [];
|
||||||
private $message;
|
private $message;
|
||||||
|
@ -26,7 +26,7 @@ use Twig\NodeVisitor\AbstractNodeVisitor;
|
|||||||
*/
|
*/
|
||||||
final class TranslationNodeVisitor extends AbstractNodeVisitor
|
final class TranslationNodeVisitor extends AbstractNodeVisitor
|
||||||
{
|
{
|
||||||
const UNDEFINED_DOMAIN = '_undefined';
|
public const UNDEFINED_DOMAIN = '_undefined';
|
||||||
|
|
||||||
private $enabled = false;
|
private $enabled = false;
|
||||||
private $messages = [];
|
private $messages = [];
|
||||||
|
@ -35,9 +35,9 @@ use Symfony\Component\HttpKernel\KernelInterface;
|
|||||||
*/
|
*/
|
||||||
class AssetsInstallCommand extends Command
|
class AssetsInstallCommand extends Command
|
||||||
{
|
{
|
||||||
const METHOD_COPY = 'copy';
|
public const METHOD_COPY = 'copy';
|
||||||
const METHOD_ABSOLUTE_SYMLINK = 'absolute symlink';
|
public const METHOD_ABSOLUTE_SYMLINK = 'absolute symlink';
|
||||||
const METHOD_RELATIVE_SYMLINK = 'relative symlink';
|
public const METHOD_RELATIVE_SYMLINK = 'relative symlink';
|
||||||
|
|
||||||
protected static $defaultName = 'assets:install';
|
protected static $defaultName = 'assets:install';
|
||||||
|
|
||||||
|
@ -38,13 +38,13 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
*/
|
*/
|
||||||
class TranslationDebugCommand extends Command
|
class TranslationDebugCommand extends Command
|
||||||
{
|
{
|
||||||
const EXIT_CODE_GENERAL_ERROR = 64;
|
public const EXIT_CODE_GENERAL_ERROR = 64;
|
||||||
const EXIT_CODE_MISSING = 65;
|
public const EXIT_CODE_MISSING = 65;
|
||||||
const EXIT_CODE_UNUSED = 66;
|
public const EXIT_CODE_UNUSED = 66;
|
||||||
const EXIT_CODE_FALLBACK = 68;
|
public const EXIT_CODE_FALLBACK = 68;
|
||||||
const MESSAGE_MISSING = 0;
|
public const MESSAGE_MISSING = 0;
|
||||||
const MESSAGE_UNUSED = 1;
|
public const MESSAGE_UNUSED = 1;
|
||||||
const MESSAGE_EQUALS_FALLBACK = 2;
|
public const MESSAGE_EQUALS_FALLBACK = 2;
|
||||||
|
|
||||||
protected static $defaultName = 'debug:translation';
|
protected static $defaultName = 'debug:translation';
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface
|
|||||||
|
|
||||||
class EntryPointStub implements AuthenticationEntryPointInterface
|
class EntryPointStub implements AuthenticationEntryPointInterface
|
||||||
{
|
{
|
||||||
const RESPONSE_TEXT = '2be8e651259189d841a19eecdf37e771e2431741';
|
public const RESPONSE_TEXT = '2be8e651259189d841a19eecdf37e771e2431741';
|
||||||
|
|
||||||
public function start(Request $request, AuthenticationException $authException = null): Response
|
public function start(Request $request, AuthenticationException $authException = null): Response
|
||||||
{
|
{
|
||||||
|
@ -35,8 +35,8 @@ use Twig\Environment;
|
|||||||
*/
|
*/
|
||||||
class WebDebugToolbarListener implements EventSubscriberInterface
|
class WebDebugToolbarListener implements EventSubscriberInterface
|
||||||
{
|
{
|
||||||
const DISABLED = 1;
|
public const DISABLED = 1;
|
||||||
const ENABLED = 2;
|
public const ENABLED = 2;
|
||||||
|
|
||||||
protected $twig;
|
protected $twig;
|
||||||
protected $urlGenerator;
|
protected $urlGenerator;
|
||||||
|
@ -25,7 +25,7 @@ use Symfony\Contracts\Cache\TagAwareCacheInterface;
|
|||||||
*/
|
*/
|
||||||
class TagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface, PruneableInterface, ResettableInterface
|
class TagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface, PruneableInterface, ResettableInterface
|
||||||
{
|
{
|
||||||
const TAGS_PREFIX = "\0tags\0";
|
public const TAGS_PREFIX = "\0tags\0";
|
||||||
|
|
||||||
use ContractsTrait;
|
use ContractsTrait;
|
||||||
use ProxyTrait;
|
use ProxyTrait;
|
||||||
|
@ -24,7 +24,7 @@ use Symfony\Component\Config\Definition\Exception\UnsetKeyException;
|
|||||||
*/
|
*/
|
||||||
abstract class BaseNode implements NodeInterface
|
abstract class BaseNode implements NodeInterface
|
||||||
{
|
{
|
||||||
const DEFAULT_PATH_SEPARATOR = '.';
|
public const DEFAULT_PATH_SEPARATOR = '.';
|
||||||
|
|
||||||
private static $placeholderUniquePrefixes = [];
|
private static $placeholderUniquePrefixes = [];
|
||||||
private static $placeholders = [];
|
private static $placeholders = [];
|
||||||
|
@ -30,7 +30,7 @@ final class ConsoleEvents
|
|||||||
*
|
*
|
||||||
* @Event("Symfony\Component\Console\Event\ConsoleCommandEvent")
|
* @Event("Symfony\Component\Console\Event\ConsoleCommandEvent")
|
||||||
*/
|
*/
|
||||||
const COMMAND = 'console.command';
|
public const COMMAND = 'console.command';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The SIGNAL event allows you to perform some actions
|
* The SIGNAL event allows you to perform some actions
|
||||||
@ -38,7 +38,7 @@ final class ConsoleEvents
|
|||||||
*
|
*
|
||||||
* @Event("Symfony\Component\Console\Event\ConsoleSignalEvent")
|
* @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
|
* 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")
|
* @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.
|
* The ERROR event occurs when an uncaught exception or error appears.
|
||||||
@ -56,14 +56,14 @@ final class ConsoleEvents
|
|||||||
*
|
*
|
||||||
* @Event("Symfony\Component\Console\Event\ConsoleErrorEvent")
|
* @Event("Symfony\Component\Console\Event\ConsoleErrorEvent")
|
||||||
*/
|
*/
|
||||||
const ERROR = 'console.error';
|
public const ERROR = 'console.error';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event aliases.
|
* Event aliases.
|
||||||
*
|
*
|
||||||
* These aliases can be consumed by RegisterListenersPass.
|
* These aliases can be consumed by RegisterListenersPass.
|
||||||
*/
|
*/
|
||||||
const ALIASES = [
|
public const ALIASES = [
|
||||||
ConsoleCommandEvent::class => self::COMMAND,
|
ConsoleCommandEvent::class => self::COMMAND,
|
||||||
ConsoleErrorEvent::class => self::ERROR,
|
ConsoleErrorEvent::class => self::ERROR,
|
||||||
ConsoleSignalEvent::class => self::SIGNAL,
|
ConsoleSignalEvent::class => self::SIGNAL,
|
||||||
|
@ -22,7 +22,7 @@ use Symfony\Component\Console\Exception\CommandNotFoundException;
|
|||||||
*/
|
*/
|
||||||
class ApplicationDescription
|
class ApplicationDescription
|
||||||
{
|
{
|
||||||
const GLOBAL_NAMESPACE = '_global';
|
public const GLOBAL_NAMESPACE = '_global';
|
||||||
|
|
||||||
private $application;
|
private $application;
|
||||||
private $namespace;
|
private $namespace;
|
||||||
|
@ -21,7 +21,7 @@ final class ConsoleCommandEvent extends ConsoleEvent
|
|||||||
/**
|
/**
|
||||||
* The return code for skipped commands, this will also be passed into the terminate event.
|
* 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.
|
* Indicates if the command should be run or skipped.
|
||||||
|
@ -18,7 +18,7 @@ use Symfony\Component\Console\Exception\InvalidArgumentException;
|
|||||||
*/
|
*/
|
||||||
class TableCellStyle
|
class TableCellStyle
|
||||||
{
|
{
|
||||||
const DEFAULT_ALIGN = 'left';
|
public const DEFAULT_ALIGN = 'left';
|
||||||
|
|
||||||
private $options = [
|
private $options = [
|
||||||
'fg' => 'default',
|
'fg' => 'default',
|
||||||
|
@ -21,9 +21,9 @@ use Symfony\Component\Console\Exception\LogicException;
|
|||||||
*/
|
*/
|
||||||
class InputArgument
|
class InputArgument
|
||||||
{
|
{
|
||||||
const REQUIRED = 1;
|
public const REQUIRED = 1;
|
||||||
const OPTIONAL = 2;
|
public const OPTIONAL = 2;
|
||||||
const IS_ARRAY = 4;
|
public const IS_ARRAY = 4;
|
||||||
|
|
||||||
private $name;
|
private $name;
|
||||||
private $mode;
|
private $mode;
|
||||||
|
@ -21,10 +21,10 @@ use Symfony\Component\Console\Exception\LogicException;
|
|||||||
*/
|
*/
|
||||||
class InputOption
|
class InputOption
|
||||||
{
|
{
|
||||||
const VALUE_NONE = 1;
|
public const VALUE_NONE = 1;
|
||||||
const VALUE_REQUIRED = 2;
|
public const VALUE_REQUIRED = 2;
|
||||||
const VALUE_OPTIONAL = 4;
|
public const VALUE_OPTIONAL = 4;
|
||||||
const VALUE_IS_ARRAY = 8;
|
public const VALUE_IS_ARRAY = 8;
|
||||||
|
|
||||||
private $name;
|
private $name;
|
||||||
private $shortcut;
|
private $shortcut;
|
||||||
|
@ -24,8 +24,8 @@ use Symfony\Component\Console\Exception\InvalidArgumentException;
|
|||||||
*/
|
*/
|
||||||
class StringInput extends ArgvInput
|
class StringInput extends ArgvInput
|
||||||
{
|
{
|
||||||
const REGEX_STRING = '([^\s]+?)(?:\s|(?<!\\\\)"|(?<!\\\\)\'|$)';
|
public const REGEX_STRING = '([^\s]+?)(?:\s|(?<!\\\\)"|(?<!\\\\)\'|$)';
|
||||||
const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')';
|
public const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $input A string representing the parameters from the CLI
|
* @param string $input A string representing the parameters from the CLI
|
||||||
|
@ -26,8 +26,8 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||||||
*/
|
*/
|
||||||
class ConsoleLogger extends AbstractLogger
|
class ConsoleLogger extends AbstractLogger
|
||||||
{
|
{
|
||||||
const INFO = 'info';
|
public const INFO = 'info';
|
||||||
const ERROR = 'error';
|
public const ERROR = 'error';
|
||||||
|
|
||||||
private $output;
|
private $output;
|
||||||
private $verbosityLevelMap = [
|
private $verbosityLevelMap = [
|
||||||
|
@ -20,15 +20,15 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
|||||||
*/
|
*/
|
||||||
interface OutputInterface
|
interface OutputInterface
|
||||||
{
|
{
|
||||||
const VERBOSITY_QUIET = 16;
|
public const VERBOSITY_QUIET = 16;
|
||||||
const VERBOSITY_NORMAL = 32;
|
public const VERBOSITY_NORMAL = 32;
|
||||||
const VERBOSITY_VERBOSE = 64;
|
public const VERBOSITY_VERBOSE = 64;
|
||||||
const VERBOSITY_VERY_VERBOSE = 128;
|
public const VERBOSITY_VERY_VERBOSE = 128;
|
||||||
const VERBOSITY_DEBUG = 256;
|
public const VERBOSITY_DEBUG = 256;
|
||||||
|
|
||||||
const OUTPUT_NORMAL = 1;
|
public const OUTPUT_NORMAL = 1;
|
||||||
const OUTPUT_RAW = 2;
|
public const OUTPUT_RAW = 2;
|
||||||
const OUTPUT_PLAIN = 4;
|
public const OUTPUT_PLAIN = 4;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes a message to the output.
|
* Writes a message to the output.
|
||||||
|
@ -35,7 +35,7 @@ use Symfony\Component\Console\Terminal;
|
|||||||
*/
|
*/
|
||||||
class SymfonyStyle extends OutputStyle
|
class SymfonyStyle extends OutputStyle
|
||||||
{
|
{
|
||||||
const MAX_LINE_LENGTH = 120;
|
public const MAX_LINE_LENGTH = 120;
|
||||||
|
|
||||||
private $input;
|
private $input;
|
||||||
private $questionHelper;
|
private $questionHelper;
|
||||||
|
@ -25,9 +25,9 @@ namespace Symfony\Component\CssSelector\Node;
|
|||||||
*/
|
*/
|
||||||
class Specificity
|
class Specificity
|
||||||
{
|
{
|
||||||
const A_FACTOR = 100;
|
public const A_FACTOR = 100;
|
||||||
const B_FACTOR = 10;
|
public const B_FACTOR = 10;
|
||||||
const C_FACTOR = 1;
|
public const C_FACTOR = 1;
|
||||||
|
|
||||||
private $a;
|
private $a;
|
||||||
private $b;
|
private $b;
|
||||||
|
@ -23,13 +23,13 @@ namespace Symfony\Component\CssSelector\Parser;
|
|||||||
*/
|
*/
|
||||||
class Token
|
class Token
|
||||||
{
|
{
|
||||||
const TYPE_FILE_END = 'eof';
|
public const TYPE_FILE_END = 'eof';
|
||||||
const TYPE_DELIMITER = 'delimiter';
|
public const TYPE_DELIMITER = 'delimiter';
|
||||||
const TYPE_WHITESPACE = 'whitespace';
|
public const TYPE_WHITESPACE = 'whitespace';
|
||||||
const TYPE_IDENTIFIER = 'identifier';
|
public const TYPE_IDENTIFIER = 'identifier';
|
||||||
const TYPE_HASH = 'hash';
|
public const TYPE_HASH = 'hash';
|
||||||
const TYPE_NUMBER = 'number';
|
public const TYPE_NUMBER = 'number';
|
||||||
const TYPE_STRING = 'string';
|
public const TYPE_STRING = 'string';
|
||||||
|
|
||||||
private $type;
|
private $type;
|
||||||
private $value;
|
private $value;
|
||||||
|
@ -27,9 +27,9 @@ use Symfony\Component\CssSelector\XPath\XPathExpr;
|
|||||||
*/
|
*/
|
||||||
class NodeExtension extends AbstractExtension
|
class NodeExtension extends AbstractExtension
|
||||||
{
|
{
|
||||||
const ELEMENT_NAME_IN_LOWER_CASE = 1;
|
public const ELEMENT_NAME_IN_LOWER_CASE = 1;
|
||||||
const ATTRIBUTE_NAME_IN_LOWER_CASE = 2;
|
public const ATTRIBUTE_NAME_IN_LOWER_CASE = 2;
|
||||||
const ATTRIBUTE_VALUE_IN_LOWER_CASE = 4;
|
public const ATTRIBUTE_VALUE_IN_LOWER_CASE = 4;
|
||||||
|
|
||||||
private $flags;
|
private $flags;
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@ namespace Symfony\Component\DependencyInjection\Argument;
|
|||||||
*/
|
*/
|
||||||
final class BoundArgument implements ArgumentInterface
|
final class BoundArgument implements ArgumentInterface
|
||||||
{
|
{
|
||||||
const SERVICE_BINDING = 0;
|
public const SERVICE_BINDING = 0;
|
||||||
const DEFAULTS_BINDING = 1;
|
public const DEFAULTS_BINDING = 1;
|
||||||
const INSTANCEOF_BINDING = 2;
|
public const INSTANCEOF_BINDING = 2;
|
||||||
|
|
||||||
private static $sequence = 0;
|
private static $sequence = 0;
|
||||||
|
|
||||||
|
@ -22,11 +22,11 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
|||||||
*/
|
*/
|
||||||
class PassConfig
|
class PassConfig
|
||||||
{
|
{
|
||||||
const TYPE_AFTER_REMOVING = 'afterRemoving';
|
public const TYPE_AFTER_REMOVING = 'afterRemoving';
|
||||||
const TYPE_BEFORE_OPTIMIZATION = 'beforeOptimization';
|
public const TYPE_BEFORE_OPTIMIZATION = 'beforeOptimization';
|
||||||
const TYPE_BEFORE_REMOVING = 'beforeRemoving';
|
public const TYPE_BEFORE_REMOVING = 'beforeRemoving';
|
||||||
const TYPE_OPTIMIZE = 'optimization';
|
public const TYPE_OPTIMIZE = 'optimization';
|
||||||
const TYPE_REMOVE = 'removing';
|
public const TYPE_REMOVE = 'removing';
|
||||||
|
|
||||||
private $mergePass;
|
private $mergePass;
|
||||||
private $afterRemovingPasses = [];
|
private $afterRemovingPasses = [];
|
||||||
|
@ -24,11 +24,11 @@ use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
|||||||
*/
|
*/
|
||||||
interface ContainerInterface extends PsrContainerInterface
|
interface ContainerInterface extends PsrContainerInterface
|
||||||
{
|
{
|
||||||
const RUNTIME_EXCEPTION_ON_INVALID_REFERENCE = 0;
|
public const RUNTIME_EXCEPTION_ON_INVALID_REFERENCE = 0;
|
||||||
const EXCEPTION_ON_INVALID_REFERENCE = 1;
|
public const EXCEPTION_ON_INVALID_REFERENCE = 1;
|
||||||
const NULL_ON_INVALID_REFERENCE = 2;
|
public const NULL_ON_INVALID_REFERENCE = 2;
|
||||||
const IGNORE_ON_INVALID_REFERENCE = 3;
|
public const IGNORE_ON_INVALID_REFERENCE = 3;
|
||||||
const IGNORE_ON_UNINITIALIZED_REFERENCE = 4;
|
public const IGNORE_ON_UNINITIALIZED_REFERENCE = 4;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a service.
|
* Sets a service.
|
||||||
|
@ -56,12 +56,12 @@ class PhpDumper extends Dumper
|
|||||||
/**
|
/**
|
||||||
* Characters that might appear in the generated variable name as first character.
|
* Characters that might appear in the generated variable name as first character.
|
||||||
*/
|
*/
|
||||||
const FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz';
|
public const FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Characters that might appear in the generated variable name as any but the first character.
|
* Characters that might appear in the generated variable name as any but the first character.
|
||||||
*/
|
*/
|
||||||
const NON_FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789_';
|
public const NON_FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789_';
|
||||||
|
|
||||||
private $definitionVariables;
|
private $definitionVariables;
|
||||||
private $referenceVariables;
|
private $referenceVariables;
|
||||||
|
@ -21,7 +21,7 @@ use Symfony\Component\ExpressionLanguage\Expression;
|
|||||||
|
|
||||||
abstract class AbstractConfigurator
|
abstract class AbstractConfigurator
|
||||||
{
|
{
|
||||||
const FACTORY = 'unknown';
|
public const FACTORY = 'unknown';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var callable(mixed, bool $allowService)|null
|
* @var callable(mixed, bool $allowService)|null
|
||||||
|
@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\Alias;
|
|||||||
*/
|
*/
|
||||||
class AliasConfigurator extends AbstractServiceConfigurator
|
class AliasConfigurator extends AbstractServiceConfigurator
|
||||||
{
|
{
|
||||||
const FACTORY = 'alias';
|
public const FACTORY = 'alias';
|
||||||
|
|
||||||
use Traits\DeprecateTrait;
|
use Traits\DeprecateTrait;
|
||||||
use Traits\PublicTrait;
|
use Traits\PublicTrait;
|
||||||
|
@ -27,7 +27,7 @@ use Symfony\Component\ExpressionLanguage\Expression;
|
|||||||
*/
|
*/
|
||||||
class ContainerConfigurator extends AbstractConfigurator
|
class ContainerConfigurator extends AbstractConfigurator
|
||||||
{
|
{
|
||||||
const FACTORY = 'container';
|
public const FACTORY = 'container';
|
||||||
|
|
||||||
private $container;
|
private $container;
|
||||||
private $loader;
|
private $loader;
|
||||||
|
@ -19,7 +19,7 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
|||||||
*/
|
*/
|
||||||
class DefaultsConfigurator extends AbstractServiceConfigurator
|
class DefaultsConfigurator extends AbstractServiceConfigurator
|
||||||
{
|
{
|
||||||
const FACTORY = 'defaults';
|
public const FACTORY = 'defaults';
|
||||||
|
|
||||||
use Traits\AutoconfigureTrait;
|
use Traits\AutoconfigureTrait;
|
||||||
use Traits\AutowireTrait;
|
use Traits\AutowireTrait;
|
||||||
|
@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\Definition;
|
|||||||
*/
|
*/
|
||||||
class InlineServiceConfigurator extends AbstractConfigurator
|
class InlineServiceConfigurator extends AbstractConfigurator
|
||||||
{
|
{
|
||||||
const FACTORY = 'service';
|
public const FACTORY = 'service';
|
||||||
|
|
||||||
use Traits\ArgumentTrait;
|
use Traits\ArgumentTrait;
|
||||||
use Traits\AutowireTrait;
|
use Traits\AutowireTrait;
|
||||||
|
@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\Definition;
|
|||||||
*/
|
*/
|
||||||
class InstanceofConfigurator extends AbstractServiceConfigurator
|
class InstanceofConfigurator extends AbstractServiceConfigurator
|
||||||
{
|
{
|
||||||
const FACTORY = 'instanceof';
|
public const FACTORY = 'instanceof';
|
||||||
|
|
||||||
use Traits\AutowireTrait;
|
use Traits\AutowireTrait;
|
||||||
use Traits\BindTrait;
|
use Traits\BindTrait;
|
||||||
|
@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|||||||
*/
|
*/
|
||||||
class ParametersConfigurator extends AbstractConfigurator
|
class ParametersConfigurator extends AbstractConfigurator
|
||||||
{
|
{
|
||||||
const FACTORY = 'parameters';
|
public const FACTORY = 'parameters';
|
||||||
|
|
||||||
private $container;
|
private $container;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
|
|||||||
*/
|
*/
|
||||||
class PrototypeConfigurator extends AbstractServiceConfigurator
|
class PrototypeConfigurator extends AbstractServiceConfigurator
|
||||||
{
|
{
|
||||||
const FACTORY = 'load';
|
public const FACTORY = 'load';
|
||||||
|
|
||||||
use Traits\AbstractTrait;
|
use Traits\AbstractTrait;
|
||||||
use Traits\ArgumentTrait;
|
use Traits\ArgumentTrait;
|
||||||
|
@ -19,7 +19,7 @@ use Symfony\Component\DependencyInjection\Definition;
|
|||||||
*/
|
*/
|
||||||
class ServiceConfigurator extends AbstractServiceConfigurator
|
class ServiceConfigurator extends AbstractServiceConfigurator
|
||||||
{
|
{
|
||||||
const FACTORY = 'services';
|
public const FACTORY = 'services';
|
||||||
|
|
||||||
use Traits\AbstractTrait;
|
use Traits\AbstractTrait;
|
||||||
use Traits\ArgumentTrait;
|
use Traits\ArgumentTrait;
|
||||||
|
@ -24,7 +24,7 @@ use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
|
|||||||
*/
|
*/
|
||||||
class ServicesConfigurator extends AbstractConfigurator
|
class ServicesConfigurator extends AbstractConfigurator
|
||||||
{
|
{
|
||||||
const FACTORY = 'services';
|
public const FACTORY = 'services';
|
||||||
|
|
||||||
private $defaults;
|
private $defaults;
|
||||||
private $container;
|
private $container;
|
||||||
|
@ -35,7 +35,7 @@ use Symfony\Component\ExpressionLanguage\Expression;
|
|||||||
*/
|
*/
|
||||||
class XmlFileLoader extends FileLoader
|
class XmlFileLoader extends FileLoader
|
||||||
{
|
{
|
||||||
const NS = 'http://symfony.com/schema/dic/services';
|
public const NS = 'http://symfony.com/schema/dic/services';
|
||||||
|
|
||||||
protected $autoRegisterAliasesForSinglyImplementedInterfaces = false;
|
protected $autoRegisterAliasesForSinglyImplementedInterfaces = false;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
|||||||
|
|
||||||
class EnvVarProcessorTest extends TestCase
|
class EnvVarProcessorTest extends TestCase
|
||||||
{
|
{
|
||||||
const TEST_CONST = 'test';
|
public const TEST_CONST = 'test';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider validStrings
|
* @dataProvider validStrings
|
||||||
|
@ -25,9 +25,9 @@ use Symfony\Component\Process\Process;
|
|||||||
*/
|
*/
|
||||||
final class Dotenv
|
final class Dotenv
|
||||||
{
|
{
|
||||||
const VARNAME_REGEX = '(?i:[A-Z][A-Z0-9_]*+)';
|
public const VARNAME_REGEX = '(?i:[A-Z][A-Z0-9_]*+)';
|
||||||
const STATE_VARNAME = 0;
|
public const STATE_VARNAME = 0;
|
||||||
const STATE_VALUE = 1;
|
public const STATE_VALUE = 1;
|
||||||
|
|
||||||
private $path;
|
private $path;
|
||||||
private $cursor;
|
private $cursor;
|
||||||
|
@ -20,9 +20,9 @@ use Symfony\Component\ExpressionLanguage\Compiler;
|
|||||||
*/
|
*/
|
||||||
class GetAttrNode extends Node
|
class GetAttrNode extends Node
|
||||||
{
|
{
|
||||||
const PROPERTY_CALL = 1;
|
public const PROPERTY_CALL = 1;
|
||||||
const METHOD_CALL = 2;
|
public const METHOD_CALL = 2;
|
||||||
const ARRAY_CALL = 3;
|
public const ARRAY_CALL = 3;
|
||||||
|
|
||||||
public function __construct(Node $node, Node $attribute, ArrayNode $arguments, int $type)
|
public function __construct(Node $node, Node $attribute, ArrayNode $arguments, int $type)
|
||||||
{
|
{
|
||||||
|
@ -23,8 +23,8 @@ namespace Symfony\Component\ExpressionLanguage;
|
|||||||
*/
|
*/
|
||||||
class Parser
|
class Parser
|
||||||
{
|
{
|
||||||
const OPERATOR_LEFT = 1;
|
public const OPERATOR_LEFT = 1;
|
||||||
const OPERATOR_RIGHT = 2;
|
public const OPERATOR_RIGHT = 2;
|
||||||
|
|
||||||
private $stream;
|
private $stream;
|
||||||
private $unaryOperators;
|
private $unaryOperators;
|
||||||
|
@ -22,12 +22,12 @@ class Token
|
|||||||
public $type;
|
public $type;
|
||||||
public $cursor;
|
public $cursor;
|
||||||
|
|
||||||
const EOF_TYPE = 'end of expression';
|
public const EOF_TYPE = 'end of expression';
|
||||||
const NAME_TYPE = 'name';
|
public const NAME_TYPE = 'name';
|
||||||
const NUMBER_TYPE = 'number';
|
public const NUMBER_TYPE = 'number';
|
||||||
const STRING_TYPE = 'string';
|
public const STRING_TYPE = 'string';
|
||||||
const OPERATOR_TYPE = 'operator';
|
public const OPERATOR_TYPE = 'operator';
|
||||||
const PUNCTUATION_TYPE = 'punctuation';
|
public const PUNCTUATION_TYPE = 'punctuation';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $type The type of the token (self::*_TYPE)
|
* @param string $type The type of the token (self::*_TYPE)
|
||||||
|
@ -38,9 +38,9 @@ use Symfony\Component\Finder\Iterator\SortableIterator;
|
|||||||
*/
|
*/
|
||||||
class Finder implements \IteratorAggregate, \Countable
|
class Finder implements \IteratorAggregate, \Countable
|
||||||
{
|
{
|
||||||
const IGNORE_VCS_FILES = 1;
|
public const IGNORE_VCS_FILES = 1;
|
||||||
const IGNORE_DOT_FILES = 2;
|
public const IGNORE_DOT_FILES = 2;
|
||||||
const IGNORE_VCS_IGNORED_FILES = 4;
|
public const IGNORE_VCS_IGNORED_FILES = 4;
|
||||||
|
|
||||||
private $mode = 0;
|
private $mode = 0;
|
||||||
private $names = [];
|
private $names = [];
|
||||||
|
@ -18,8 +18,8 @@ namespace Symfony\Component\Finder\Iterator;
|
|||||||
*/
|
*/
|
||||||
class FileTypeFilterIterator extends \FilterIterator
|
class FileTypeFilterIterator extends \FilterIterator
|
||||||
{
|
{
|
||||||
const ONLY_FILES = 1;
|
public const ONLY_FILES = 1;
|
||||||
const ONLY_DIRECTORIES = 2;
|
public const ONLY_DIRECTORIES = 2;
|
||||||
|
|
||||||
private $mode;
|
private $mode;
|
||||||
|
|
||||||
|
@ -18,13 +18,13 @@ namespace Symfony\Component\Finder\Iterator;
|
|||||||
*/
|
*/
|
||||||
class SortableIterator implements \IteratorAggregate
|
class SortableIterator implements \IteratorAggregate
|
||||||
{
|
{
|
||||||
const SORT_BY_NONE = 0;
|
public const SORT_BY_NONE = 0;
|
||||||
const SORT_BY_NAME = 1;
|
public const SORT_BY_NAME = 1;
|
||||||
const SORT_BY_TYPE = 2;
|
public const SORT_BY_TYPE = 2;
|
||||||
const SORT_BY_ACCESSED_TIME = 3;
|
public const SORT_BY_ACCESSED_TIME = 3;
|
||||||
const SORT_BY_CHANGED_TIME = 4;
|
public const SORT_BY_CHANGED_TIME = 4;
|
||||||
const SORT_BY_MODIFIED_TIME = 5;
|
public const SORT_BY_MODIFIED_TIME = 5;
|
||||||
const SORT_BY_NAME_NATURAL = 6;
|
public const SORT_BY_NAME_NATURAL = 6;
|
||||||
|
|
||||||
private $iterator;
|
private $iterator;
|
||||||
private $sort;
|
private $sort;
|
||||||
|
@ -13,9 +13,9 @@ namespace Symfony\Component\Finder\Tests\Iterator;
|
|||||||
|
|
||||||
class MockSplFileInfo extends \SplFileInfo
|
class MockSplFileInfo extends \SplFileInfo
|
||||||
{
|
{
|
||||||
const TYPE_DIRECTORY = 1;
|
public const TYPE_DIRECTORY = 1;
|
||||||
const TYPE_FILE = 2;
|
public const TYPE_FILE = 2;
|
||||||
const TYPE_UNKNOWN = 3;
|
public const TYPE_UNKNOWN = 3;
|
||||||
|
|
||||||
private $contents = null;
|
private $contents = null;
|
||||||
private $mode = null;
|
private $mode = null;
|
||||||
|
@ -21,7 +21,7 @@ abstract class AbstractRendererEngine implements FormRendererEngineInterface
|
|||||||
/**
|
/**
|
||||||
* The variable in {@link FormView} used as cache key.
|
* The variable in {@link FormView} used as cache key.
|
||||||
*/
|
*/
|
||||||
const CACHE_KEY_VAR = 'cache_key';
|
public const CACHE_KEY_VAR = 'cache_key';
|
||||||
|
|
||||||
protected $defaultThemes;
|
protected $defaultThemes;
|
||||||
protected $themes = [];
|
protected $themes = [];
|
||||||
|
@ -22,13 +22,13 @@ use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
|||||||
*/
|
*/
|
||||||
class DateIntervalToArrayTransformer implements DataTransformerInterface
|
class DateIntervalToArrayTransformer implements DataTransformerInterface
|
||||||
{
|
{
|
||||||
const YEARS = 'years';
|
public const YEARS = 'years';
|
||||||
const MONTHS = 'months';
|
public const MONTHS = 'months';
|
||||||
const DAYS = 'days';
|
public const DAYS = 'days';
|
||||||
const HOURS = 'hours';
|
public const HOURS = 'hours';
|
||||||
const MINUTES = 'minutes';
|
public const MINUTES = 'minutes';
|
||||||
const SECONDS = 'seconds';
|
public const SECONDS = 'seconds';
|
||||||
const INVERT = 'invert';
|
public const INVERT = 'invert';
|
||||||
|
|
||||||
private static $availableFields = [
|
private static $availableFields = [
|
||||||
self::YEARS => 'y',
|
self::YEARS => 'y',
|
||||||
|
@ -20,7 +20,7 @@ use Symfony\Component\Form\Exception\TransformationFailedException;
|
|||||||
*/
|
*/
|
||||||
class DateTimeToHtml5LocalDateTimeTransformer extends BaseDateTimeTransformer
|
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.
|
* Transforms a \DateTime into a local date and time string.
|
||||||
|
@ -26,37 +26,37 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface
|
|||||||
/**
|
/**
|
||||||
* @deprecated since Symfony 5.1, use \NumberFormatter::ROUND_CEILING instead.
|
* @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.
|
* @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.
|
* @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.
|
* @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.
|
* @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.
|
* @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.
|
* @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;
|
protected $grouping;
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
|||||||
*/
|
*/
|
||||||
class PercentToLocalizedStringTransformer implements DataTransformerInterface
|
class PercentToLocalizedStringTransformer implements DataTransformerInterface
|
||||||
{
|
{
|
||||||
const FRACTIONAL = 'fractional';
|
public const FRACTIONAL = 'fractional';
|
||||||
const INTEGER = 'integer';
|
public const INTEGER = 'integer';
|
||||||
|
|
||||||
protected static $types = [
|
protected static $types = [
|
||||||
self::FRACTIONAL,
|
self::FRACTIONAL,
|
||||||
|
@ -31,14 +31,14 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
|
|
||||||
class DateTimeType extends AbstractType
|
class DateTimeType extends AbstractType
|
||||||
{
|
{
|
||||||
const DEFAULT_DATE_FORMAT = \IntlDateFormatter::MEDIUM;
|
public const DEFAULT_DATE_FORMAT = \IntlDateFormatter::MEDIUM;
|
||||||
const DEFAULT_TIME_FORMAT = \IntlDateFormatter::MEDIUM;
|
public const DEFAULT_TIME_FORMAT = \IntlDateFormatter::MEDIUM;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The HTML5 datetime-local format as defined in
|
* The HTML5 datetime-local format as defined in
|
||||||
* http://w3c.github.io/html-reference/datatypes.html#form.data.datetime-local.
|
* 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 = [
|
private static $acceptedFormats = [
|
||||||
\IntlDateFormatter::FULL,
|
\IntlDateFormatter::FULL,
|
||||||
|
@ -28,8 +28,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
|
|
||||||
class DateType extends AbstractType
|
class DateType extends AbstractType
|
||||||
{
|
{
|
||||||
const DEFAULT_FORMAT = \IntlDateFormatter::MEDIUM;
|
public const DEFAULT_FORMAT = \IntlDateFormatter::MEDIUM;
|
||||||
const HTML5_FORMAT = 'yyyy-MM-dd';
|
public const HTML5_FORMAT = 'yyyy-MM-dd';
|
||||||
|
|
||||||
private static $acceptedFormats = [
|
private static $acceptedFormats = [
|
||||||
\IntlDateFormatter::FULL,
|
\IntlDateFormatter::FULL,
|
||||||
|
@ -24,8 +24,8 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
|
|
||||||
class FileType extends AbstractType
|
class FileType extends AbstractType
|
||||||
{
|
{
|
||||||
const KIB_BYTES = 1024;
|
public const KIB_BYTES = 1024;
|
||||||
const MIB_BYTES = 1048576;
|
public const MIB_BYTES = 1048576;
|
||||||
|
|
||||||
private static $suffixes = [
|
private static $suffixes = [
|
||||||
1 => 'bytes',
|
1 => 'bytes',
|
||||||
|
@ -18,8 +18,8 @@ use Symfony\Component\Validator\Constraint;
|
|||||||
*/
|
*/
|
||||||
class Form extends Constraint
|
class Form extends Constraint
|
||||||
{
|
{
|
||||||
const NOT_SYNCHRONIZED_ERROR = '1dafa156-89e1-4736-b832-419c2e501fca';
|
public const NOT_SYNCHRONIZED_ERROR = '1dafa156-89e1-4736-b832-419c2e501fca';
|
||||||
const NO_SUCH_FIELD_ERROR = '6e5212ed-a197-4339-99aa-5654798a4854';
|
public const NO_SUCH_FIELD_ERROR = '6e5212ed-a197-4339-99aa-5654798a4854';
|
||||||
|
|
||||||
protected static $errorNames = [
|
protected static $errorNames = [
|
||||||
self::NOT_SYNCHRONIZED_ERROR => 'NOT_SYNCHRONIZED_ERROR',
|
self::NOT_SYNCHRONIZED_ERROR => 'NOT_SYNCHRONIZED_ERROR',
|
||||||
|
@ -33,7 +33,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
|
|||||||
/**
|
/**
|
||||||
* The prefix used for indenting nested error messages.
|
* The prefix used for indenting nested error messages.
|
||||||
*/
|
*/
|
||||||
const INDENTATION = ' ';
|
public const INDENTATION = ' ';
|
||||||
|
|
||||||
private $form;
|
private $form;
|
||||||
private $errors;
|
private $errors;
|
||||||
|
@ -37,7 +37,7 @@ final class FormEvents
|
|||||||
*
|
*
|
||||||
* @Event("Symfony\Component\Form\Event\PreSubmitEvent")
|
* @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
|
* The SUBMIT event is dispatched after the Form::submit() method
|
||||||
@ -56,7 +56,7 @@ final class FormEvents
|
|||||||
*
|
*
|
||||||
* @Event("Symfony\Component\Form\Event\SubmitEvent")
|
* @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().
|
* 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")
|
* @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.
|
* 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")
|
* @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.
|
* 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")
|
* @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.
|
* Event aliases.
|
||||||
*
|
*
|
||||||
* These aliases can be consumed by RegisterListenersPass.
|
* These aliases can be consumed by RegisterListenersPass.
|
||||||
*/
|
*/
|
||||||
const ALIASES = [
|
public const ALIASES = [
|
||||||
PreSubmitEvent::class => self::PRE_SUBMIT,
|
PreSubmitEvent::class => self::PRE_SUBMIT,
|
||||||
SubmitEvent::class => self::SUBMIT,
|
SubmitEvent::class => self::SUBMIT,
|
||||||
PostSubmitEvent::class => self::POST_SUBMIT,
|
PostSubmitEvent::class => self::POST_SUBMIT,
|
||||||
|
@ -23,7 +23,7 @@ use Twig\Environment;
|
|||||||
*/
|
*/
|
||||||
class FormRenderer implements FormRendererInterface
|
class FormRenderer implements FormRendererInterface
|
||||||
{
|
{
|
||||||
const CACHE_KEY_VAR = 'unique_block_prefix';
|
public const CACHE_KEY_VAR = 'unique_block_prefix';
|
||||||
|
|
||||||
private $engine;
|
private $engine;
|
||||||
private $csrfTokenManager;
|
private $csrfTokenManager;
|
||||||
|
@ -27,22 +27,22 @@ abstract class Guess
|
|||||||
/**
|
/**
|
||||||
* Marks an instance with a value that is extremely likely to be correct.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* The confidence about the correctness of the value.
|
||||||
|
@ -21,7 +21,7 @@ abstract class BaseTypeTest extends TypeTestCase
|
|||||||
{
|
{
|
||||||
use VersionAwareTest;
|
use VersionAwareTest;
|
||||||
|
|
||||||
const TESTED_TYPE = '';
|
public const TESTED_TYPE = '';
|
||||||
|
|
||||||
public function testPassDisabledAsOption()
|
public function testPassDisabledAsOption()
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type;
|
|||||||
*/
|
*/
|
||||||
class BirthdayTypeTest extends DateTypeTest
|
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()
|
public function testSetInvalidYearsOption()
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type;
|
|||||||
*/
|
*/
|
||||||
class ButtonTypeTest extends BaseTypeTest
|
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()
|
public function testCreateButtonInstances()
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ use Symfony\Component\Form\CallbackTransformer;
|
|||||||
|
|
||||||
class CheckboxTypeTest extends BaseTypeTest
|
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()
|
public function testDataIsFalseByDefault()
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ class ChoiceTypeTest extends BaseTypeTest
|
|||||||
{
|
{
|
||||||
use ExpectDeprecationTrait;
|
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 = [
|
private $choices = [
|
||||||
'Bernhard' => 'a',
|
'Bernhard' => 'a',
|
||||||
|
@ -17,7 +17,7 @@ use Symfony\Component\Form\Tests\Fixtures\BlockPrefixedFooTextType;
|
|||||||
|
|
||||||
class CollectionTypeTest extends BaseTypeTest
|
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()
|
public function testContainsNoChildByDefault()
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ use Symfony\Component\Form\FormError;
|
|||||||
|
|
||||||
final class ColorTypeTest extends BaseTypeTest
|
final class ColorTypeTest extends BaseTypeTest
|
||||||
{
|
{
|
||||||
const TESTED_TYPE = ColorType::class;
|
public const TESTED_TYPE = ColorType::class;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider validationShouldPassProvider
|
* @dataProvider validationShouldPassProvider
|
||||||
|
@ -16,7 +16,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper;
|
|||||||
|
|
||||||
class CountryTypeTest extends BaseTypeTest
|
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
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper;
|
|||||||
|
|
||||||
class CurrencyTypeTest extends BaseTypeTest
|
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
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@ use Symfony\Component\Form\FormInterface;
|
|||||||
|
|
||||||
class DateIntervalTypeTest extends BaseTypeTest
|
class DateIntervalTypeTest extends BaseTypeTest
|
||||||
{
|
{
|
||||||
const TESTED_TYPE = DateIntervalType::class;
|
public const TESTED_TYPE = DateIntervalType::class;
|
||||||
|
|
||||||
public function testSubmitDateInterval()
|
public function testSubmitDateInterval()
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ use Symfony\Component\Form\FormInterface;
|
|||||||
|
|
||||||
class DateTimeTypeTest extends BaseTypeTest
|
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
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
|
@ -18,7 +18,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper;
|
|||||||
|
|
||||||
class DateTypeTest extends BaseTypeTest
|
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 $defaultTimezone;
|
||||||
private $defaultLocale;
|
private $defaultLocale;
|
||||||
|
@ -21,7 +21,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||||||
|
|
||||||
class FileTypeTest extends BaseTypeTest
|
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()
|
protected function getExtensions()
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@ class FormTest_AuthorWithoutRefSetter
|
|||||||
|
|
||||||
class FormTypeTest extends BaseTypeTest
|
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()
|
public function testCreateFormInstances()
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper;
|
|||||||
|
|
||||||
class IntegerTypeTest extends BaseTypeTest
|
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
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper;
|
|||||||
|
|
||||||
class LanguageTypeTest extends BaseTypeTest
|
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
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper;
|
|||||||
|
|
||||||
class LocaleTypeTest extends BaseTypeTest
|
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
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper;
|
|||||||
|
|
||||||
class MoneyTypeTest extends BaseTypeTest
|
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;
|
private $defaultLocale;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper;
|
|||||||
|
|
||||||
class NumberTypeTest extends BaseTypeTest
|
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;
|
private $defaultLocale;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type;
|
|||||||
|
|
||||||
class PasswordTypeTest extends BaseTypeTest
|
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()
|
public function testEmptyIfNotSubmitted()
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,7 @@ class PercentTypeTest extends TypeTestCase
|
|||||||
{
|
{
|
||||||
use ExpectDeprecationTrait;
|
use ExpectDeprecationTrait;
|
||||||
|
|
||||||
const TESTED_TYPE = PercentType::class;
|
public const TESTED_TYPE = PercentType::class;
|
||||||
|
|
||||||
private $defaultLocale;
|
private $defaultLocale;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ use Symfony\Component\Form\Tests\Fixtures\NotMappedType;
|
|||||||
|
|
||||||
class RepeatedTypeTest extends BaseTypeTest
|
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
|
* @var Form
|
||||||
|
@ -16,7 +16,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type;
|
|||||||
*/
|
*/
|
||||||
class SubmitTypeTest extends ButtonTypeTest
|
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()
|
public function testCreateSubmitButtonInstances()
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type;
|
|||||||
|
|
||||||
class TextTypeTest extends BaseTypeTest
|
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)
|
public function testSubmitNull($expected = null, $norm = null, $view = null)
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@ use Symfony\Component\Form\FormInterface;
|
|||||||
|
|
||||||
class TimeTypeTest extends BaseTypeTest
|
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()
|
public function testSubmitDateTime()
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ use Symfony\Component\Intl\Util\IntlTestHelper;
|
|||||||
|
|
||||||
class TimezoneTypeTest extends BaseTypeTest
|
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()
|
public function testTimezonesAreSelectable()
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type;
|
|||||||
|
|
||||||
class UrlTypeTest extends TextTypeTest
|
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()
|
public function testSubmitAddsDefaultProtocolIfNoneIsIncluded()
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ use Symfony\Component\Form\FormError;
|
|||||||
|
|
||||||
class WeekTypeTest extends BaseTypeTest
|
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()
|
public function testSubmitArray()
|
||||||
{
|
{
|
||||||
|
@ -41,9 +41,9 @@ use Symfony\Component\Validator\Tests\Fixtures\FakeMetadataFactory;
|
|||||||
*/
|
*/
|
||||||
class ValidatorTypeGuesserTest extends TestCase
|
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
|
* @var ValidatorTypeGuesser
|
||||||
|
@ -18,9 +18,9 @@ namespace Symfony\Component\HttpFoundation;
|
|||||||
*/
|
*/
|
||||||
class Cookie
|
class Cookie
|
||||||
{
|
{
|
||||||
const SAMESITE_NONE = 'none';
|
public const SAMESITE_NONE = 'none';
|
||||||
const SAMESITE_LAX = 'lax';
|
public const SAMESITE_LAX = 'lax';
|
||||||
const SAMESITE_STRICT = 'strict';
|
public const SAMESITE_STRICT = 'strict';
|
||||||
|
|
||||||
protected $name;
|
protected $name;
|
||||||
protected $value;
|
protected $value;
|
||||||
|
@ -29,7 +29,7 @@ class JsonResponse extends Response
|
|||||||
|
|
||||||
// Encode <, >, ', &, and " characters in the JSON, making it also safe to be embedded into HTML.
|
// 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
|
// 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;
|
protected $encodingOptions = self::DEFAULT_ENCODING_OPTIONS;
|
||||||
|
|
||||||
|
@ -40,28 +40,28 @@ class_exists(ServerBag::class);
|
|||||||
*/
|
*/
|
||||||
class Request
|
class Request
|
||||||
{
|
{
|
||||||
const HEADER_FORWARDED = 0b000001; // When using RFC 7239
|
public const HEADER_FORWARDED = 0b000001; // When using RFC 7239
|
||||||
const HEADER_X_FORWARDED_FOR = 0b000010;
|
public const HEADER_X_FORWARDED_FOR = 0b000010;
|
||||||
const HEADER_X_FORWARDED_HOST = 0b000100;
|
public const HEADER_X_FORWARDED_HOST = 0b000100;
|
||||||
const HEADER_X_FORWARDED_PROTO = 0b001000;
|
public const HEADER_X_FORWARDED_PROTO = 0b001000;
|
||||||
const HEADER_X_FORWARDED_PORT = 0b010000;
|
public const HEADER_X_FORWARDED_PORT = 0b010000;
|
||||||
const HEADER_X_FORWARDED_PREFIX = 0b100000;
|
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. */
|
/** @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
|
public 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
|
public 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_TRAEFIK = 0b0111110; // All "X-Forwarded-*" headers sent by Traefik reverse proxy
|
||||||
|
|
||||||
const METHOD_HEAD = 'HEAD';
|
public const METHOD_HEAD = 'HEAD';
|
||||||
const METHOD_GET = 'GET';
|
public const METHOD_GET = 'GET';
|
||||||
const METHOD_POST = 'POST';
|
public const METHOD_POST = 'POST';
|
||||||
const METHOD_PUT = 'PUT';
|
public const METHOD_PUT = 'PUT';
|
||||||
const METHOD_PATCH = 'PATCH';
|
public const METHOD_PATCH = 'PATCH';
|
||||||
const METHOD_DELETE = 'DELETE';
|
public const METHOD_DELETE = 'DELETE';
|
||||||
const METHOD_PURGE = 'PURGE';
|
public const METHOD_PURGE = 'PURGE';
|
||||||
const METHOD_OPTIONS = 'OPTIONS';
|
public const METHOD_OPTIONS = 'OPTIONS';
|
||||||
const METHOD_TRACE = 'TRACE';
|
public const METHOD_TRACE = 'TRACE';
|
||||||
const METHOD_CONNECT = 'CONNECT';
|
public const METHOD_CONNECT = 'CONNECT';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string[]
|
* @var string[]
|
||||||
|
@ -21,69 +21,69 @@ class_exists(ResponseHeaderBag::class);
|
|||||||
*/
|
*/
|
||||||
class Response
|
class Response
|
||||||
{
|
{
|
||||||
const HTTP_CONTINUE = 100;
|
public const HTTP_CONTINUE = 100;
|
||||||
const HTTP_SWITCHING_PROTOCOLS = 101;
|
public const HTTP_SWITCHING_PROTOCOLS = 101;
|
||||||
const HTTP_PROCESSING = 102; // RFC2518
|
public const HTTP_PROCESSING = 102; // RFC2518
|
||||||
const HTTP_EARLY_HINTS = 103; // RFC8297
|
public const HTTP_EARLY_HINTS = 103; // RFC8297
|
||||||
const HTTP_OK = 200;
|
public const HTTP_OK = 200;
|
||||||
const HTTP_CREATED = 201;
|
public const HTTP_CREATED = 201;
|
||||||
const HTTP_ACCEPTED = 202;
|
public const HTTP_ACCEPTED = 202;
|
||||||
const HTTP_NON_AUTHORITATIVE_INFORMATION = 203;
|
public const HTTP_NON_AUTHORITATIVE_INFORMATION = 203;
|
||||||
const HTTP_NO_CONTENT = 204;
|
public const HTTP_NO_CONTENT = 204;
|
||||||
const HTTP_RESET_CONTENT = 205;
|
public const HTTP_RESET_CONTENT = 205;
|
||||||
const HTTP_PARTIAL_CONTENT = 206;
|
public const HTTP_PARTIAL_CONTENT = 206;
|
||||||
const HTTP_MULTI_STATUS = 207; // RFC4918
|
public const HTTP_MULTI_STATUS = 207; // RFC4918
|
||||||
const HTTP_ALREADY_REPORTED = 208; // RFC5842
|
public const HTTP_ALREADY_REPORTED = 208; // RFC5842
|
||||||
const HTTP_IM_USED = 226; // RFC3229
|
public const HTTP_IM_USED = 226; // RFC3229
|
||||||
const HTTP_MULTIPLE_CHOICES = 300;
|
public const HTTP_MULTIPLE_CHOICES = 300;
|
||||||
const HTTP_MOVED_PERMANENTLY = 301;
|
public const HTTP_MOVED_PERMANENTLY = 301;
|
||||||
const HTTP_FOUND = 302;
|
public const HTTP_FOUND = 302;
|
||||||
const HTTP_SEE_OTHER = 303;
|
public const HTTP_SEE_OTHER = 303;
|
||||||
const HTTP_NOT_MODIFIED = 304;
|
public const HTTP_NOT_MODIFIED = 304;
|
||||||
const HTTP_USE_PROXY = 305;
|
public const HTTP_USE_PROXY = 305;
|
||||||
const HTTP_RESERVED = 306;
|
public const HTTP_RESERVED = 306;
|
||||||
const HTTP_TEMPORARY_REDIRECT = 307;
|
public const HTTP_TEMPORARY_REDIRECT = 307;
|
||||||
const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238
|
public const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238
|
||||||
const HTTP_BAD_REQUEST = 400;
|
public const HTTP_BAD_REQUEST = 400;
|
||||||
const HTTP_UNAUTHORIZED = 401;
|
public const HTTP_UNAUTHORIZED = 401;
|
||||||
const HTTP_PAYMENT_REQUIRED = 402;
|
public const HTTP_PAYMENT_REQUIRED = 402;
|
||||||
const HTTP_FORBIDDEN = 403;
|
public const HTTP_FORBIDDEN = 403;
|
||||||
const HTTP_NOT_FOUND = 404;
|
public const HTTP_NOT_FOUND = 404;
|
||||||
const HTTP_METHOD_NOT_ALLOWED = 405;
|
public const HTTP_METHOD_NOT_ALLOWED = 405;
|
||||||
const HTTP_NOT_ACCEPTABLE = 406;
|
public const HTTP_NOT_ACCEPTABLE = 406;
|
||||||
const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407;
|
public const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407;
|
||||||
const HTTP_REQUEST_TIMEOUT = 408;
|
public const HTTP_REQUEST_TIMEOUT = 408;
|
||||||
const HTTP_CONFLICT = 409;
|
public const HTTP_CONFLICT = 409;
|
||||||
const HTTP_GONE = 410;
|
public const HTTP_GONE = 410;
|
||||||
const HTTP_LENGTH_REQUIRED = 411;
|
public const HTTP_LENGTH_REQUIRED = 411;
|
||||||
const HTTP_PRECONDITION_FAILED = 412;
|
public const HTTP_PRECONDITION_FAILED = 412;
|
||||||
const HTTP_REQUEST_ENTITY_TOO_LARGE = 413;
|
public const HTTP_REQUEST_ENTITY_TOO_LARGE = 413;
|
||||||
const HTTP_REQUEST_URI_TOO_LONG = 414;
|
public const HTTP_REQUEST_URI_TOO_LONG = 414;
|
||||||
const HTTP_UNSUPPORTED_MEDIA_TYPE = 415;
|
public const HTTP_UNSUPPORTED_MEDIA_TYPE = 415;
|
||||||
const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
|
public const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
|
||||||
const HTTP_EXPECTATION_FAILED = 417;
|
public const HTTP_EXPECTATION_FAILED = 417;
|
||||||
const HTTP_I_AM_A_TEAPOT = 418; // RFC2324
|
public const HTTP_I_AM_A_TEAPOT = 418; // RFC2324
|
||||||
const HTTP_MISDIRECTED_REQUEST = 421; // RFC7540
|
public const HTTP_MISDIRECTED_REQUEST = 421; // RFC7540
|
||||||
const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918
|
public const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918
|
||||||
const HTTP_LOCKED = 423; // RFC4918
|
public const HTTP_LOCKED = 423; // RFC4918
|
||||||
const HTTP_FAILED_DEPENDENCY = 424; // RFC4918
|
public const HTTP_FAILED_DEPENDENCY = 424; // RFC4918
|
||||||
const HTTP_TOO_EARLY = 425; // RFC-ietf-httpbis-replay-04
|
public const HTTP_TOO_EARLY = 425; // RFC-ietf-httpbis-replay-04
|
||||||
const HTTP_UPGRADE_REQUIRED = 426; // RFC2817
|
public const HTTP_UPGRADE_REQUIRED = 426; // RFC2817
|
||||||
const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585
|
public const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585
|
||||||
const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585
|
public const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585
|
||||||
const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585
|
public const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585
|
||||||
const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451;
|
public const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451;
|
||||||
const HTTP_INTERNAL_SERVER_ERROR = 500;
|
public const HTTP_INTERNAL_SERVER_ERROR = 500;
|
||||||
const HTTP_NOT_IMPLEMENTED = 501;
|
public const HTTP_NOT_IMPLEMENTED = 501;
|
||||||
const HTTP_BAD_GATEWAY = 502;
|
public const HTTP_BAD_GATEWAY = 502;
|
||||||
const HTTP_SERVICE_UNAVAILABLE = 503;
|
public const HTTP_SERVICE_UNAVAILABLE = 503;
|
||||||
const HTTP_GATEWAY_TIMEOUT = 504;
|
public const HTTP_GATEWAY_TIMEOUT = 504;
|
||||||
const HTTP_VERSION_NOT_SUPPORTED = 505;
|
public const HTTP_VERSION_NOT_SUPPORTED = 505;
|
||||||
const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; // RFC2295
|
public const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; // RFC2295
|
||||||
const HTTP_INSUFFICIENT_STORAGE = 507; // RFC4918
|
public const HTTP_INSUFFICIENT_STORAGE = 507; // RFC4918
|
||||||
const HTTP_LOOP_DETECTED = 508; // RFC5842
|
public const HTTP_LOOP_DETECTED = 508; // RFC5842
|
||||||
const HTTP_NOT_EXTENDED = 510; // RFC2774
|
public const HTTP_NOT_EXTENDED = 510; // RFC2774
|
||||||
const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; // RFC6585
|
public const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; // RFC6585
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
|
||||||
|
@ -18,11 +18,11 @@ namespace Symfony\Component\HttpFoundation;
|
|||||||
*/
|
*/
|
||||||
class ResponseHeaderBag extends HeaderBag
|
class ResponseHeaderBag extends HeaderBag
|
||||||
{
|
{
|
||||||
const COOKIES_FLAT = 'flat';
|
public const COOKIES_FLAT = 'flat';
|
||||||
const COOKIES_ARRAY = 'array';
|
public const COOKIES_ARRAY = 'array';
|
||||||
|
|
||||||
const DISPOSITION_ATTACHMENT = 'attachment';
|
public const DISPOSITION_ATTACHMENT = 'attachment';
|
||||||
const DISPOSITION_INLINE = 'inline';
|
public const DISPOSITION_INLINE = 'inline';
|
||||||
|
|
||||||
protected $computedCacheControl = [];
|
protected $computedCacheControl = [];
|
||||||
protected $cookies = [];
|
protected $cookies = [];
|
||||||
|
@ -46,7 +46,7 @@ class PdoSessionHandler extends AbstractSessionHandler
|
|||||||
* write will win in this case. It might be useful when you implement your own
|
* write will win in this case. It might be useful when you implement your own
|
||||||
* logic to deal with this like an optimistic approach.
|
* 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
|
* 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.
|
* does not require a transaction.
|
||||||
* This mode is not available for SQLite and not yet implemented for oci and sqlsrv.
|
* 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
|
* 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
|
* that you also use for your application logic. This mode is the default because
|
||||||
* it's the only reliable solution across DBMSs.
|
* it's the only reliable solution across DBMSs.
|
||||||
*/
|
*/
|
||||||
const LOCK_TRANSACTIONAL = 2;
|
public const LOCK_TRANSACTIONAL = 2;
|
||||||
|
|
||||||
private const MAX_LIFETIME = 315576000;
|
private const MAX_LIFETIME = 315576000;
|
||||||
|
|
||||||
|
@ -22,9 +22,9 @@ use Symfony\Component\HttpFoundation\Session\SessionBagInterface;
|
|||||||
*/
|
*/
|
||||||
class MetadataBag implements SessionBagInterface
|
class MetadataBag implements SessionBagInterface
|
||||||
{
|
{
|
||||||
const CREATED = 'c';
|
public const CREATED = 'c';
|
||||||
const UPDATED = 'u';
|
public const UPDATED = 'u';
|
||||||
const LIFETIME = 'l';
|
public const LIFETIME = 'l';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user