Merge branch '3.4' into 4.3
* 3.4: Improve some URLs Fix test compatibility with 4.x components [Cache] cs fix
This commit is contained in:
commit
fdf6fc349c
@ -125,8 +125,8 @@ class RegisterEventListenersAndSubscribersPass implements CompilerPassInterface
|
|||||||
* and knowing that the \SplPriorityQueue class does not respect the FIFO method,
|
* and knowing that the \SplPriorityQueue class does not respect the FIFO method,
|
||||||
* we should not use this class.
|
* we should not use this class.
|
||||||
*
|
*
|
||||||
* @see https://bugs.php.net/bug.php?id=53710
|
* @see https://bugs.php.net/53710
|
||||||
* @see https://bugs.php.net/bug.php?id=60926
|
* @see https://bugs.php.net/60926
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
@ -137,7 +137,7 @@ class CodeExtension extends AbstractExtension
|
|||||||
{
|
{
|
||||||
if (is_file($file) && is_readable($file)) {
|
if (is_file($file) && is_readable($file)) {
|
||||||
// highlight_file could throw warnings
|
// highlight_file could throw warnings
|
||||||
// see https://bugs.php.net/bug.php?id=25725
|
// see https://bugs.php.net/25725
|
||||||
$code = @highlight_file($file, true);
|
$code = @highlight_file($file, true);
|
||||||
// remove main code/span tags
|
// remove main code/span tags
|
||||||
$code = preg_replace('#^<code.*?>\s*<span.*?>(.*)</span>\s*</code>#s', '\\1', $code);
|
$code = preg_replace('#^<code.*?>\s*<span.*?>(.*)</span>\s*</code>#s', '\\1', $code);
|
||||||
|
@ -225,7 +225,7 @@ class FrameworkExtension extends Extension
|
|||||||
|
|
||||||
if ($this->isConfigEnabled($container, $config['session'])) {
|
if ($this->isConfigEnabled($container, $config['session'])) {
|
||||||
if (!\extension_loaded('session')) {
|
if (!\extension_loaded('session')) {
|
||||||
throw new LogicException('Session support cannot be enabled as the session extension is not installed. See https://www.php.net/session.installation for instructions.');
|
throw new LogicException('Session support cannot be enabled as the session extension is not installed. See https://php.net/session.installation for instructions.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->sessionConfigEnabled = true;
|
$this->sessionConfigEnabled = true;
|
||||||
|
@ -131,7 +131,7 @@ class CodeHelper extends Helper
|
|||||||
}
|
}
|
||||||
|
|
||||||
// highlight_file could throw warnings
|
// highlight_file could throw warnings
|
||||||
// see https://bugs.php.net/bug.php?id=25725
|
// see https://bugs.php.net/25725
|
||||||
$code = @highlight_file($file, true);
|
$code = @highlight_file($file, true);
|
||||||
// remove main code/span tags
|
// remove main code/span tags
|
||||||
$code = preg_replace('#^<code.*?>\s*<span.*?>(.*)</span>\s*</code>#s', '\\1', $code);
|
$code = preg_replace('#^<code.*?>\s*<span.*?>(.*)</span>\s*</code>#s', '\\1', $code);
|
||||||
|
@ -426,10 +426,10 @@ abstract class ControllerTraitTest extends TestCase
|
|||||||
public function testRedirect()
|
public function testRedirect()
|
||||||
{
|
{
|
||||||
$controller = $this->createController();
|
$controller = $this->createController();
|
||||||
$response = $controller->redirect('http://dunglas.fr', 301);
|
$response = $controller->redirect('https://dunglas.fr', 301);
|
||||||
|
|
||||||
$this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', $response);
|
$this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', $response);
|
||||||
$this->assertSame('http://dunglas.fr', $response->getTargetUrl());
|
$this->assertSame('https://dunglas.fr', $response->getTargetUrl());
|
||||||
$this->assertSame(301, $response->getStatusCode());
|
$this->assertSame(301, $response->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ Specify your own router script via the <info>--router</info> option:
|
|||||||
|
|
||||||
<info>%command.full_name% --router=app/config/router.php</info>
|
<info>%command.full_name% --router=app/config/router.php</info>
|
||||||
|
|
||||||
See also: http://www.php.net/manual/en/features.commandline.webserver.php
|
See also: https://php.net/features.commandline.webserver
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
@ -79,7 +79,7 @@ Specify your own router script via the <info>--router</info> option:
|
|||||||
|
|
||||||
<info>php %command.full_name% --router=app/config/router.php</info>
|
<info>php %command.full_name% --router=app/config/router.php</info>
|
||||||
|
|
||||||
See also: http://www.php.net/manual/en/features.commandline.webserver.php
|
See also: https://php.net/features.commandline.webserver
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file implements rewrite rules for PHP built-in web server.
|
* This file implements rewrite rules for PHP built-in web server.
|
||||||
*
|
*
|
||||||
* See: http://www.php.net/manual/en/features.commandline.webserver.php
|
* See: https://php.net/features.commandline.webserver
|
||||||
*
|
*
|
||||||
* If you have custom directory layout, then you have to write your own router
|
* If you have custom directory layout, then you have to write your own router
|
||||||
* and pass it as a value to 'router' option of server:run command.
|
* and pass it as a value to 'router' option of server:run command.
|
||||||
|
@ -18,7 +18,7 @@ class PredisAdapterTest extends AbstractRedisAdapterTest
|
|||||||
{
|
{
|
||||||
public static function setUpBeforeClass(): void
|
public static function setUpBeforeClass(): void
|
||||||
{
|
{
|
||||||
parent::setupBeforeClass();
|
parent::setUpBeforeClass();
|
||||||
self::$redis = new \Predis\Client(['host' => getenv('REDIS_HOST')]);
|
self::$redis = new \Predis\Client(['host' => getenv('REDIS_HOST')]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ class PredisClusterAdapterTest extends AbstractRedisAdapterTest
|
|||||||
{
|
{
|
||||||
public static function setUpBeforeClass(): void
|
public static function setUpBeforeClass(): void
|
||||||
{
|
{
|
||||||
parent::setupBeforeClass();
|
parent::setUpBeforeClass();
|
||||||
self::$redis = new \Predis\Client([['host' => getenv('REDIS_HOST')]]);
|
self::$redis = new \Predis\Client([['host' => getenv('REDIS_HOST')]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ class RedisAdapterTest extends AbstractRedisAdapterTest
|
|||||||
{
|
{
|
||||||
public static function setUpBeforeClass(): void
|
public static function setUpBeforeClass(): void
|
||||||
{
|
{
|
||||||
parent::setupBeforeClass();
|
parent::setUpBeforeClass();
|
||||||
self::$redis = AbstractAdapter::createConnection('redis://'.getenv('REDIS_HOST'), ['lazy' => true]);
|
self::$redis = AbstractAdapter::createConnection('redis://'.getenv('REDIS_HOST'), ['lazy' => true]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||||||
*
|
*
|
||||||
* @author Kévin Dunglas <dunglas@gmail.com>
|
* @author Kévin Dunglas <dunglas@gmail.com>
|
||||||
*
|
*
|
||||||
* @see http://www.php-fig.org/psr/psr-3/
|
* @see https://www.php-fig.org/psr/psr-3/
|
||||||
*/
|
*/
|
||||||
class ConsoleLogger extends AbstractLogger
|
class ConsoleLogger extends AbstractLogger
|
||||||
{
|
{
|
||||||
|
@ -125,7 +125,7 @@ content="0;url=data:text/html;base64,PHNjcmlwdD5hbGVydCgndGVzdDMnKTwvc2NyaXB0Pg"
|
|||||||
});
|
});
|
||||||
|
|
||||||
$handler->handle(new \Exception());
|
$handler->handle(new \Exception());
|
||||||
ob_end_flush(); // Necessary because of this PHP bug : https://bugs.php.net/bug.php?id=76563
|
ob_end_flush(); // Necessary because of this PHP bug : https://bugs.php.net/76563
|
||||||
$this->assertSame('ccc', ob_get_clean());
|
$this->assertSame('ccc', ob_get_clean());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,8 +31,8 @@ trait PriorityTaggedServiceTrait
|
|||||||
* and knowing that the \SplPriorityQueue class does not respect the FIFO method,
|
* and knowing that the \SplPriorityQueue class does not respect the FIFO method,
|
||||||
* we should not use that class.
|
* we should not use that class.
|
||||||
*
|
*
|
||||||
* @see https://bugs.php.net/bug.php?id=53710
|
* @see https://bugs.php.net/53710
|
||||||
* @see https://bugs.php.net/bug.php?id=60926
|
* @see https://bugs.php.net/60926
|
||||||
*
|
*
|
||||||
* @param string|TaggedIteratorArgument $tagName
|
* @param string|TaggedIteratorArgument $tagName
|
||||||
* @param ContainerBuilder $container
|
* @param ContainerBuilder $container
|
||||||
|
@ -285,7 +285,7 @@ class EventDispatcherTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see https://bugs.php.net/bug.php?id=62976
|
* @see https://bugs.php.net/62976
|
||||||
*
|
*
|
||||||
* This bug affects:
|
* This bug affects:
|
||||||
* - The PHP 5.3 branch for versions < 5.3.18
|
* - The PHP 5.3 branch for versions < 5.3.18
|
||||||
|
@ -53,7 +53,7 @@ class Filesystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($doCopy) {
|
if ($doCopy) {
|
||||||
// https://bugs.php.net/bug.php?id=64634
|
// https://bugs.php.net/64634
|
||||||
if (false === $source = @fopen($originFile, 'r')) {
|
if (false === $source = @fopen($originFile, 'r')) {
|
||||||
throw new IOException(sprintf('Failed to copy "%s" to "%s" because source file could not be opened for reading.', $originFile, $targetFile), 0, null, $originFile);
|
throw new IOException(sprintf('Failed to copy "%s" to "%s" because source file could not be opened for reading.', $originFile, $targetFile), 0, null, $originFile);
|
||||||
}
|
}
|
||||||
@ -281,7 +281,7 @@ class Filesystem
|
|||||||
|
|
||||||
if (true !== @rename($origin, $target)) {
|
if (true !== @rename($origin, $target)) {
|
||||||
if (is_dir($origin)) {
|
if (is_dir($origin)) {
|
||||||
// See https://bugs.php.net/bug.php?id=54097 & http://php.net/manual/en/function.rename.php#113943
|
// See https://bugs.php.net/54097 & https://php.net/rename#113943
|
||||||
$this->mirror($origin, $target, null, ['override' => $overwrite, 'delete' => $overwrite]);
|
$this->mirror($origin, $target, null, ['override' => $overwrite, 'delete' => $overwrite]);
|
||||||
$this->remove($origin);
|
$this->remove($origin);
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ class FilesystemTestCase extends TestCase
|
|||||||
$this->markTestSkipped('symlink requires "Create symbolic links" privilege on Windows');
|
$this->markTestSkipped('symlink requires "Create symbolic links" privilege on Windows');
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://bugs.php.net/bug.php?id=69473
|
// https://bugs.php.net/69473
|
||||||
if ($relative && '\\' === \DIRECTORY_SEPARATOR && 1 === PHP_ZTS) {
|
if ($relative && '\\' === \DIRECTORY_SEPARATOR && 1 === PHP_ZTS) {
|
||||||
$this->markTestSkipped('symlink does not support relative paths on thread safe Windows PHP versions');
|
$this->markTestSkipped('symlink does not support relative paths on thread safe Windows PHP versions');
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer
|
|||||||
$dateTime = new \DateTime(sprintf('@%s', $timestamp));
|
$dateTime = new \DateTime(sprintf('@%s', $timestamp));
|
||||||
}
|
}
|
||||||
// set timezone separately, as it would be ignored if set via the constructor,
|
// set timezone separately, as it would be ignored if set via the constructor,
|
||||||
// see http://php.net/manual/en/datetime.construct.php
|
// see https://php.net/datetime.construct
|
||||||
$dateTime->setTimezone(new \DateTimeZone($this->outputTimezone));
|
$dateTime->setTimezone(new \DateTimeZone($this->outputTimezone));
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
|
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
|
||||||
@ -169,7 +169,7 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer
|
|||||||
|
|
||||||
$intlDateFormatter = new \IntlDateFormatter(\Locale::getDefault(), $dateFormat, $timeFormat, $timezone, $calendar, $pattern);
|
$intlDateFormatter = new \IntlDateFormatter(\Locale::getDefault(), $dateFormat, $timeFormat, $timezone, $calendar, $pattern);
|
||||||
|
|
||||||
// new \intlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/bug.php?id=66323
|
// new \intlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/66323
|
||||||
if (!$intlDateFormatter) {
|
if (!$intlDateFormatter) {
|
||||||
throw new TransformationFailedException(intl_get_error_message(), intl_get_error_code());
|
throw new TransformationFailedException(intl_get_error_message(), intl_get_error_code());
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ class DateTimeToStringTransformer extends BaseDateTimeTransformer
|
|||||||
|
|
||||||
$this->generateFormat = $this->parseFormat = $format;
|
$this->generateFormat = $this->parseFormat = $format;
|
||||||
|
|
||||||
// See http://php.net/manual/en/datetime.createfromformat.php
|
// See https://php.net/datetime.createfromformat
|
||||||
// The character "|" in the format makes sure that the parts of a date
|
// The character "|" in the format makes sure that the parts of a date
|
||||||
// that are *not* specified in the format are reset to the corresponding
|
// that are *not* specified in the format are reset to the corresponding
|
||||||
// values from 1970-01-01 00:00:00 instead of the current time.
|
// values from 1970-01-01 00:00:00 instead of the current time.
|
||||||
|
@ -76,7 +76,7 @@ abstract class BaseType extends AbstractType
|
|||||||
|
|
||||||
// Strip leading underscores and digits. These are allowed in
|
// Strip leading underscores and digits. These are allowed in
|
||||||
// form names, but not in HTML4 ID attributes.
|
// form names, but not in HTML4 ID attributes.
|
||||||
// http://www.w3.org/TR/html401/struct/global.html#adef-id
|
// https://www.w3.org/TR/html401/struct/global#adef-id
|
||||||
$id = ltrim($id, '_0123456789');
|
$id = ltrim($id, '_0123456789');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,13 +108,13 @@ class DateType extends AbstractType
|
|||||||
\Locale::getDefault(),
|
\Locale::getDefault(),
|
||||||
$dateFormat,
|
$dateFormat,
|
||||||
$timeFormat,
|
$timeFormat,
|
||||||
// see https://bugs.php.net/bug.php?id=66323
|
// see https://bugs.php.net/66323
|
||||||
class_exists('IntlTimeZone', false) ? \IntlTimeZone::createDefault() : null,
|
class_exists('IntlTimeZone', false) ? \IntlTimeZone::createDefault() : null,
|
||||||
$calendar,
|
$calendar,
|
||||||
$pattern
|
$pattern
|
||||||
);
|
);
|
||||||
|
|
||||||
// new \IntlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/bug.php?id=66323
|
// new \IntlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/66323
|
||||||
if (!$formatter) {
|
if (!$formatter) {
|
||||||
throw new InvalidOptionsException(intl_get_error_message(), intl_get_error_code());
|
throw new InvalidOptionsException(intl_get_error_message(), intl_get_error_code());
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface
|
|||||||
curl_multi_setopt($this->multi->handle, CURLMOPT_MAX_HOST_CONNECTIONS, 0 < $maxHostConnections ? $maxHostConnections : PHP_INT_MAX);
|
curl_multi_setopt($this->multi->handle, CURLMOPT_MAX_HOST_CONNECTIONS, 0 < $maxHostConnections ? $maxHostConnections : PHP_INT_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip configuring HTTP/2 push when it's unsupported or buggy, see https://bugs.php.net/bug.php?id=77535
|
// Skip configuring HTTP/2 push when it's unsupported or buggy, see https://bugs.php.net/77535
|
||||||
if (0 >= $maxPendingPushes || \PHP_VERSION_ID < 70217 || (\PHP_VERSION_ID >= 70300 && \PHP_VERSION_ID < 70304)) {
|
if (0 >= $maxPendingPushes || \PHP_VERSION_ID < 70217 || (\PHP_VERSION_ID >= 70300 && \PHP_VERSION_ID < 70304)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ CHANGELOG
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
* the `Request::setTrustedProxies()` method takes a new `$trustedHeaderSet` argument,
|
* the `Request::setTrustedProxies()` method takes a new `$trustedHeaderSet` argument,
|
||||||
see http://symfony.com/doc/current/components/http_foundation/trusting_proxies.html for more info,
|
see https://symfony.com/doc/current/deployment/proxies.html for more info,
|
||||||
* deprecated the `Request::setTrustedHeaderName()` and `Request::getTrustedHeaderName()` methods,
|
* deprecated the `Request::setTrustedHeaderName()` and `Request::getTrustedHeaderName()` methods,
|
||||||
* added `File\Stream`, to be passed to `BinaryFileResponse` when the size of the served file is unknown,
|
* added `File\Stream`, to be passed to `BinaryFileResponse` when the size of the served file is unknown,
|
||||||
disabling `Range` and `Content-Length` handling, switching to chunked encoding instead
|
disabling `Range` and `Content-Length` handling, switching to chunked encoding instead
|
||||||
|
@ -31,7 +31,7 @@ class FileinfoMimeTypeGuesser implements MimeTypeGuesserInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $magicFile A magic file to use with the finfo instance
|
* @param string $magicFile A magic file to use with the finfo instance
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/function.finfo-open.php
|
* @see https://php.net/finfo-open
|
||||||
*/
|
*/
|
||||||
public function __construct(string $magicFile = null)
|
public function __construct(string $magicFile = null)
|
||||||
{
|
{
|
||||||
|
@ -100,7 +100,7 @@ class JsonResponse extends Response
|
|||||||
public function setCallback($callback = null)
|
public function setCallback($callback = null)
|
||||||
{
|
{
|
||||||
if (null !== $callback) {
|
if (null !== $callback) {
|
||||||
// partially taken from http://www.geekality.net/2011/08/03/valid-javascript-identifier/
|
// partially taken from https://geekality.net/2011/08/03/valid-javascript-identifier/
|
||||||
// partially taken from https://github.com/willdurand/JsonpCallbackValidator
|
// partially taken from https://github.com/willdurand/JsonpCallbackValidator
|
||||||
// JsonpCallbackValidator is released under the MIT License. See https://github.com/willdurand/JsonpCallbackValidator/blob/v1.1.0/LICENSE for details.
|
// JsonpCallbackValidator is released under the MIT License. See https://github.com/willdurand/JsonpCallbackValidator/blob/v1.1.0/LICENSE for details.
|
||||||
// (c) William Durand <william.durand1@gmail.com>
|
// (c) William Durand <william.durand1@gmail.com>
|
||||||
|
@ -191,7 +191,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||||||
* @param int $filter FILTER_* constant
|
* @param int $filter FILTER_* constant
|
||||||
* @param mixed $options Filter options
|
* @param mixed $options Filter options
|
||||||
*
|
*
|
||||||
* @see http://php.net/manual/en/function.filter-var.php
|
* @see https://php.net/filter-var
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
@ -30,7 +30,7 @@ class RedirectResponse extends Response
|
|||||||
*
|
*
|
||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
*
|
*
|
||||||
* @see http://tools.ietf.org/html/rfc2616#section-10.3
|
* @see https://tools.ietf.org/html/rfc2616#section-10.3
|
||||||
*/
|
*/
|
||||||
public function __construct(?string $url, int $status = 302, array $headers = [])
|
public function __construct(?string $url, int $status = 302, array $headers = [])
|
||||||
{
|
{
|
||||||
|
@ -799,7 +799,7 @@ class Request
|
|||||||
* @return string The client IP address
|
* @return string The client IP address
|
||||||
*
|
*
|
||||||
* @see getClientIps()
|
* @see getClientIps()
|
||||||
* @see http://en.wikipedia.org/wiki/X-Forwarded-For
|
* @see https://wikipedia.org/wiki/X-Forwarded-For
|
||||||
*/
|
*/
|
||||||
public function getClientIp()
|
public function getClientIp()
|
||||||
{
|
{
|
||||||
@ -1084,7 +1084,7 @@ class Request
|
|||||||
// A reference to the same base directory or an empty subdirectory must be prefixed with "./".
|
// A reference to the same base directory or an empty subdirectory must be prefixed with "./".
|
||||||
// This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used
|
// This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used
|
||||||
// as the first segment of a relative-path reference, as it would be mistaken for a scheme name
|
// as the first segment of a relative-path reference, as it would be mistaken for a scheme name
|
||||||
// (see http://tools.ietf.org/html/rfc3986#section-4.2).
|
// (see https://tools.ietf.org/html/rfc3986#section-4.2).
|
||||||
return !isset($path[0]) || '/' === $path[0]
|
return !isset($path[0]) || '/' === $path[0]
|
||||||
|| false !== ($colonPos = strpos($path, ':')) && ($colonPos < ($slashPos = strpos($path, '/')) || false === $slashPos)
|
|| false !== ($colonPos = strpos($path, ':')) && ($colonPos < ($slashPos = strpos($path, '/')) || false === $slashPos)
|
||||||
? "./$path" : $path;
|
? "./$path" : $path;
|
||||||
@ -1689,7 +1689,7 @@ class Request
|
|||||||
* It works if your JavaScript library sets an X-Requested-With HTTP header.
|
* It works if your JavaScript library sets an X-Requested-With HTTP header.
|
||||||
* It is known to work with common JavaScript frameworks:
|
* It is known to work with common JavaScript frameworks:
|
||||||
*
|
*
|
||||||
* @see http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript
|
* @see https://wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript
|
||||||
*
|
*
|
||||||
* @return bool true if the request is an XMLHttpRequest, false otherwise
|
* @return bool true if the request is an XMLHttpRequest, false otherwise
|
||||||
*/
|
*/
|
||||||
@ -1701,9 +1701,9 @@ class Request
|
|||||||
/*
|
/*
|
||||||
* The following methods are derived from code of the Zend Framework (1.10dev - 2010-01-24)
|
* The following methods are derived from code of the Zend Framework (1.10dev - 2010-01-24)
|
||||||
*
|
*
|
||||||
* Code subject to the new BSD license (http://framework.zend.com/license/new-bsd).
|
* Code subject to the new BSD license (https://framework.zend.com/license).
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
* Copyright (c) 2005-2010 Zend Technologies USA Inc. (https://www.zend.com/)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
protected function prepareRequestUri()
|
protected function prepareRequestUri()
|
||||||
|
@ -121,7 +121,7 @@ class Response
|
|||||||
* Status codes translation table.
|
* Status codes translation table.
|
||||||
*
|
*
|
||||||
* The list of codes is complete according to the
|
* The list of codes is complete according to the
|
||||||
* {@link http://www.iana.org/assignments/http-status-codes/ Hypertext Transfer Protocol (HTTP) Status Code Registry}
|
* {@link https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml Hypertext Transfer Protocol (HTTP) Status Code Registry}
|
||||||
* (last updated 2016-03-01).
|
* (last updated 2016-03-01).
|
||||||
*
|
*
|
||||||
* Unless otherwise noted, the status code is defined in RFC2616.
|
* Unless otherwise noted, the status code is defined in RFC2616.
|
||||||
@ -990,7 +990,7 @@ class Response
|
|||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*
|
*
|
||||||
* @see http://tools.ietf.org/html/rfc2616#section-10.3.5
|
* @see https://tools.ietf.org/html/rfc2616#section-10.3.5
|
||||||
*
|
*
|
||||||
* @final
|
* @final
|
||||||
*/
|
*/
|
||||||
@ -1092,7 +1092,7 @@ class Response
|
|||||||
/**
|
/**
|
||||||
* Is response invalid?
|
* Is response invalid?
|
||||||
*
|
*
|
||||||
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
|
* @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
|
||||||
*
|
*
|
||||||
* @final
|
* @final
|
||||||
*/
|
*/
|
||||||
|
@ -79,7 +79,7 @@ class ServerBag extends ParameterBag
|
|||||||
/*
|
/*
|
||||||
* XXX: Since there is no PHP_AUTH_BEARER in PHP predefined variables,
|
* XXX: Since there is no PHP_AUTH_BEARER in PHP predefined variables,
|
||||||
* I'll just set $headers['AUTHORIZATION'] here.
|
* I'll just set $headers['AUTHORIZATION'] here.
|
||||||
* http://php.net/manual/en/reserved.variables.server.php
|
* https://php.net/reserved.variables.server
|
||||||
*/
|
*/
|
||||||
$headers['AUTHORIZATION'] = $authorizationHeader;
|
$headers['AUTHORIZATION'] = $authorizationHeader;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
|
|||||||
* Memcached based session storage handler based on the Memcached class
|
* Memcached based session storage handler based on the Memcached class
|
||||||
* provided by the PHP memcached extension.
|
* provided by the PHP memcached extension.
|
||||||
*
|
*
|
||||||
* @see http://php.net/memcached
|
* @see https://php.net/memcached
|
||||||
*
|
*
|
||||||
* @author Drak <drak@zikula.org>
|
* @author Drak <drak@zikula.org>
|
||||||
*/
|
*/
|
||||||
|
@ -56,7 +56,7 @@ class MongoDbSessionHandler extends AbstractSessionHandler
|
|||||||
* { "expireAfterSeconds": 0 }
|
* { "expireAfterSeconds": 0 }
|
||||||
* )
|
* )
|
||||||
*
|
*
|
||||||
* More details on: http://docs.mongodb.org/manual/tutorial/expire-data/
|
* More details on: https://docs.mongodb.org/manual/tutorial/expire-data/
|
||||||
*
|
*
|
||||||
* If you use such an index, you can drop `gc_probability` to 0 since
|
* If you use such an index, you can drop `gc_probability` to 0 since
|
||||||
* no garbage-collection is required.
|
* no garbage-collection is required.
|
||||||
|
@ -23,7 +23,7 @@ class NativeFileSessionHandler extends \SessionHandler
|
|||||||
* Default null will leave setting as defined by PHP.
|
* Default null will leave setting as defined by PHP.
|
||||||
* '/path', 'N;/path', or 'N;octal-mode;/path
|
* '/path', 'N;/path', or 'N;octal-mode;/path
|
||||||
*
|
*
|
||||||
* @see https://php.net/manual/session.configuration.php#ini.session.save-path for further details.
|
* @see https://php.net/session.configuration#ini.session.save-path for further details.
|
||||||
*
|
*
|
||||||
* @throws \InvalidArgumentException On invalid $savePath
|
* @throws \InvalidArgumentException On invalid $savePath
|
||||||
* @throws \RuntimeException When failing to create the save directory
|
* @throws \RuntimeException When failing to create the save directory
|
||||||
|
@ -32,7 +32,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
|
|||||||
* Saving it in a character column could corrupt the data. You can use createTable()
|
* Saving it in a character column could corrupt the data. You can use createTable()
|
||||||
* to initialize a correctly defined table.
|
* to initialize a correctly defined table.
|
||||||
*
|
*
|
||||||
* @see http://php.net/sessionhandlerinterface
|
* @see https://php.net/sessionhandlerinterface
|
||||||
*
|
*
|
||||||
* @author Fabien Potencier <fabien@symfony.com>
|
* @author Fabien Potencier <fabien@symfony.com>
|
||||||
* @author Michael Williams <michael.williams@funsational.com>
|
* @author Michael Williams <michael.williams@funsational.com>
|
||||||
@ -538,7 +538,7 @@ class PdoSessionHandler extends AbstractSessionHandler
|
|||||||
* PDO::rollback or PDO::inTransaction for SQLite.
|
* PDO::rollback or PDO::inTransaction for SQLite.
|
||||||
*
|
*
|
||||||
* Also MySQLs default isolation, REPEATABLE READ, causes deadlock for different sessions
|
* Also MySQLs default isolation, REPEATABLE READ, causes deadlock for different sessions
|
||||||
* due to http://www.mysqlperformanceblog.com/2013/12/12/one-more-innodb-gap-lock-to-avoid/ .
|
* due to https://percona.com/blog/2013/12/12/one-more-innodb-gap-lock-to-avoid/ .
|
||||||
* So we change it to READ COMMITTED.
|
* So we change it to READ COMMITTED.
|
||||||
*/
|
*/
|
||||||
private function beginTransaction()
|
private function beginTransaction()
|
||||||
@ -850,7 +850,7 @@ class PdoSessionHandler extends AbstractSessionHandler
|
|||||||
break;
|
break;
|
||||||
case 'sqlsrv' === $this->driver && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '10', '>='):
|
case 'sqlsrv' === $this->driver && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '10', '>='):
|
||||||
// MERGE is only available since SQL Server 2008 and must be terminated by semicolon
|
// MERGE is only available since SQL Server 2008 and must be terminated by semicolon
|
||||||
// It also requires HOLDLOCK according to http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx
|
// It also requires HOLDLOCK according to https://weblogs.sqlteam.com/dang/2009/01/31/upsert-race-condition-with-merge/
|
||||||
$mergeSql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ".
|
$mergeSql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ".
|
||||||
"WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ".
|
"WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ".
|
||||||
"WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;";
|
"WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;";
|
||||||
@ -863,7 +863,7 @@ class PdoSessionHandler extends AbstractSessionHandler
|
|||||||
"ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)";
|
"ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// MERGE is not supported with LOBs: http://www.oracle.com/technetwork/articles/fuecks-lobs-095315.html
|
// MERGE is not supported with LOBs: https://oracle.com/technetwork/articles/fuecks-lobs-095315.html
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class NativeSessionStorage implements SessionStorageInterface
|
|||||||
*
|
*
|
||||||
* List of options for $options array with their defaults.
|
* List of options for $options array with their defaults.
|
||||||
*
|
*
|
||||||
* @see http://php.net/session.configuration for options
|
* @see https://php.net/session.configuration for options
|
||||||
* but we omit 'session.' from the beginning of the keys for convenience.
|
* but we omit 'session.' from the beginning of the keys for convenience.
|
||||||
*
|
*
|
||||||
* ("auto_start", is not supported as it tells PHP to start a session before
|
* ("auto_start", is not supported as it tells PHP to start a session before
|
||||||
@ -223,7 +223,7 @@ class NativeSessionStorage implements SessionStorageInterface
|
|||||||
$isRegenerated = session_regenerate_id($destroy);
|
$isRegenerated = session_regenerate_id($destroy);
|
||||||
|
|
||||||
// The reference to $_SESSION in session bags is lost in PHP7 and we need to re-create it.
|
// The reference to $_SESSION in session bags is lost in PHP7 and we need to re-create it.
|
||||||
// @see https://bugs.php.net/bug.php?id=70013
|
// @see https://bugs.php.net/70013
|
||||||
$this->loadSession();
|
$this->loadSession();
|
||||||
|
|
||||||
if (null !== $this->emulateSameSite) {
|
if (null !== $this->emulateSameSite) {
|
||||||
@ -355,7 +355,7 @@ class NativeSessionStorage implements SessionStorageInterface
|
|||||||
*
|
*
|
||||||
* @param array $options Session ini directives [key => value]
|
* @param array $options Session ini directives [key => value]
|
||||||
*
|
*
|
||||||
* @see http://php.net/session.configuration
|
* @see https://php.net/session.configuration
|
||||||
*/
|
*/
|
||||||
public function setOptions(array $options)
|
public function setOptions(array $options)
|
||||||
{
|
{
|
||||||
@ -401,10 +401,10 @@ class NativeSessionStorage implements SessionStorageInterface
|
|||||||
* constructor, for a template see NativeFileSessionHandler or use handlers in
|
* constructor, for a template see NativeFileSessionHandler or use handlers in
|
||||||
* composer package drak/native-session
|
* composer package drak/native-session
|
||||||
*
|
*
|
||||||
* @see http://php.net/session-set-save-handler
|
* @see https://php.net/session-set-save-handler
|
||||||
* @see http://php.net/sessionhandlerinterface
|
* @see https://php.net/sessionhandlerinterface
|
||||||
* @see http://php.net/sessionhandler
|
* @see https://php.net/sessionhandler
|
||||||
* @see http://github.com/drak/NativeSession
|
* @see https://github.com/zikula/NativeSession
|
||||||
*
|
*
|
||||||
* @param \SessionHandlerInterface|null $saveHandler
|
* @param \SessionHandlerInterface|null $saveHandler
|
||||||
*
|
*
|
||||||
|
@ -77,7 +77,7 @@ interface SessionStorageInterface
|
|||||||
* only delete the session data from persistent storage.
|
* only delete the session data from persistent storage.
|
||||||
*
|
*
|
||||||
* Care: When regenerating the session ID no locking is involved in PHP's
|
* Care: When regenerating the session ID no locking is involved in PHP's
|
||||||
* session design. See https://bugs.php.net/bug.php?id=61470 for a discussion.
|
* session design. See https://bugs.php.net/61470 for a discussion.
|
||||||
* So you must make sure the regenerated session is saved BEFORE sending the
|
* So you must make sure the regenerated session is saved BEFORE sending the
|
||||||
* headers with the new ID. Symfony's HttpKernel offers a listener for this.
|
* headers with the new ID. Symfony's HttpKernel offers a listener for this.
|
||||||
* See Symfony\Component\HttpKernel\EventListener\SaveSessionListener.
|
* See Symfony\Component\HttpKernel\EventListener\SaveSessionListener.
|
||||||
|
@ -106,7 +106,7 @@ abstract class AbstractSessionListener implements EventSubscriberInterface
|
|||||||
* the one above. But by saving the session before long-running things in the terminate event,
|
* the one above. But by saving the session before long-running things in the terminate event,
|
||||||
* we ensure the session is not blocked longer than needed.
|
* we ensure the session is not blocked longer than needed.
|
||||||
* * When regenerating the session ID no locking is involved in PHPs session design. See
|
* * When regenerating the session ID no locking is involved in PHPs session design. See
|
||||||
* https://bugs.php.net/bug.php?id=61470 for a discussion. So in this case, the session must
|
* https://bugs.php.net/61470 for a discussion. So in this case, the session must
|
||||||
* be saved anyway before sending the headers with the new session ID. Otherwise session
|
* be saved anyway before sending the headers with the new session ID. Otherwise session
|
||||||
* data could get lost again for concurrent requests with the new ID. One result could be
|
* data could get lost again for concurrent requests with the new ID. One result could be
|
||||||
* that you get logged out after just logging in.
|
* that you get logged out after just logging in.
|
||||||
|
@ -128,7 +128,7 @@ class Profiler implements ResetInterface
|
|||||||
*
|
*
|
||||||
* @return array An array of tokens
|
* @return array An array of tokens
|
||||||
*
|
*
|
||||||
* @see http://php.net/manual/en/datetime.formats.php for the supported date/time formats
|
* @see https://php.net/datetime.formats for the supported date/time formats
|
||||||
*/
|
*/
|
||||||
public function find($ip, $url, $limit, $method, $start, $end, $statusCode = null)
|
public function find($ip, $url, $limit, $method, $start, $end, $statusCode = null)
|
||||||
{
|
{
|
||||||
|
@ -130,7 +130,7 @@ class Collator
|
|||||||
* 0 if $str1 is equal than $str2
|
* 0 if $str1 is equal than $str2
|
||||||
* -1 if $str1 is less than $str2
|
* -1 if $str1 is less than $str2
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/collator.compare.php
|
* @see https://php.net/collator.compare
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -146,7 +146,7 @@ class Collator
|
|||||||
*
|
*
|
||||||
* @return bool|int The attribute value on success or false on error
|
* @return bool|int The attribute value on success or false on error
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/collator.getattribute.php
|
* @see https://php.net/collator.getattribute
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -195,7 +195,7 @@ class Collator
|
|||||||
*
|
*
|
||||||
* @return string The collation key for $string
|
* @return string The collation key for $string
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/collator.getsortkey.php
|
* @see https://php.net/collator.getsortkey
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -209,7 +209,7 @@ class Collator
|
|||||||
*
|
*
|
||||||
* @return bool|int The current collator's strength or false on failure
|
* @return bool|int The current collator's strength or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/collator.getstrength.php
|
* @see https://php.net/collator.getstrength
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -226,7 +226,7 @@ class Collator
|
|||||||
*
|
*
|
||||||
* @return bool True on success or false on failure
|
* @return bool True on success or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/collator.setattribute.php
|
* @see https://php.net/collator.setattribute
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -248,7 +248,7 @@ class Collator
|
|||||||
*
|
*
|
||||||
* @return bool True on success or false on failure
|
* @return bool True on success or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/collator.setstrength.php
|
* @see https://php.net/collator.setstrength
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -264,7 +264,7 @@ class Collator
|
|||||||
*
|
*
|
||||||
* @return bool True on success or false on failure
|
* @return bool True on success or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/collator.sortwithsortkeys.php
|
* @see https://php.net/collator.sortwithsortkeys
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -284,7 +284,7 @@ class Collator
|
|||||||
*
|
*
|
||||||
* @return bool True on success or false on failure
|
* @return bool True on success or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/collator.sort.php
|
* @see https://php.net/collator.sort
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
|
@ -27,7 +27,7 @@ use Symfony\Component\Intl\Exception\RuntimeException;
|
|||||||
class LanguageDataGenerator extends AbstractDataGenerator
|
class LanguageDataGenerator extends AbstractDataGenerator
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Source: http://www-01.sil.org/iso639-3/codes.asp.
|
* Source: https://iso639-3.sil.org/code_tables/639/data
|
||||||
*/
|
*/
|
||||||
private static $preferredAlpha2ToAlpha3Mapping = [
|
private static $preferredAlpha2ToAlpha3Mapping = [
|
||||||
'ak' => 'aka',
|
'ak' => 'aka',
|
||||||
|
@ -16,7 +16,7 @@ use Symfony\Component\Intl\Exception\BadMethodCallException;
|
|||||||
/**
|
/**
|
||||||
* Work-around for a bug in PHP's \ResourceBundle implementation.
|
* Work-around for a bug in PHP's \ResourceBundle implementation.
|
||||||
*
|
*
|
||||||
* More information can be found on https://bugs.php.net/bug.php?id=64356.
|
* More information can be found on https://bugs.php.net/64356.
|
||||||
* This class can be removed once that bug is fixed.
|
* This class can be removed once that bug is fixed.
|
||||||
*
|
*
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
|
@ -92,8 +92,7 @@ class TimezoneTransformer extends Transformer
|
|||||||
*
|
*
|
||||||
* @return string A timezone identifier
|
* @return string A timezone identifier
|
||||||
*
|
*
|
||||||
* @see http://php.net/manual/en/timezones.others.php
|
* @see https://php.net/timezones.others
|
||||||
* @see http://www.twinsun.com/tz/tz-link.htm
|
|
||||||
*
|
*
|
||||||
* @throws NotImplementedException When the GMT time zone have minutes offset different than zero
|
* @throws NotImplementedException When the GMT time zone have minutes offset different than zero
|
||||||
* @throws \InvalidArgumentException When the value can not be matched with pattern
|
* @throws \InvalidArgumentException When the value can not be matched with pattern
|
||||||
|
@ -126,7 +126,7 @@ class IntlDateFormatter
|
|||||||
* supported value is IntlDateFormatter::GREGORIAN (or null using the default calendar, i.e. "GREGORIAN")
|
* supported value is IntlDateFormatter::GREGORIAN (or null using the default calendar, i.e. "GREGORIAN")
|
||||||
* @param string|null $pattern Optional pattern to use when formatting
|
* @param string|null $pattern Optional pattern to use when formatting
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.create.php
|
* @see https://php.net/intldateformatter.create
|
||||||
* @see http://userguide.icu-project.org/formatparse/datetime
|
* @see http://userguide.icu-project.org/formatparse/datetime
|
||||||
*
|
*
|
||||||
* @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed
|
* @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed
|
||||||
@ -162,7 +162,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.create.php
|
* @see https://php.net/intldateformatter.create
|
||||||
* @see http://userguide.icu-project.org/formatparse/datetime
|
* @see http://userguide.icu-project.org/formatparse/datetime
|
||||||
*
|
*
|
||||||
* @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed
|
* @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed
|
||||||
@ -180,7 +180,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return string|bool The formatted value or false if formatting failed
|
* @return string|bool The formatted value or false if formatting failed
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.format.php
|
* @see https://php.net/intldateformatter.format
|
||||||
*
|
*
|
||||||
* @throws MethodArgumentValueNotImplementedException If one of the formatting characters is not implemented
|
* @throws MethodArgumentValueNotImplementedException If one of the formatting characters is not implemented
|
||||||
*/
|
*/
|
||||||
@ -231,7 +231,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return string The formatted value
|
* @return string The formatted value
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.formatobject.php
|
* @see https://php.net/intldateformatter.formatobject
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -246,7 +246,7 @@ class IntlDateFormatter
|
|||||||
* @return int The calendar being used by the formatter. Currently always returns
|
* @return int The calendar being used by the formatter. Currently always returns
|
||||||
* IntlDateFormatter::GREGORIAN.
|
* IntlDateFormatter::GREGORIAN.
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.getcalendar.php
|
* @see https://php.net/intldateformatter.getcalendar
|
||||||
*/
|
*/
|
||||||
public function getCalendar()
|
public function getCalendar()
|
||||||
{
|
{
|
||||||
@ -258,7 +258,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return object The calendar's object being used by the formatter
|
* @return object The calendar's object being used by the formatter
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.getcalendarobject.php
|
* @see https://php.net/intldateformatter.getcalendarobject
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -272,7 +272,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return int The current value of the formatter
|
* @return int The current value of the formatter
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.getdatetype.php
|
* @see https://php.net/intldateformatter.getdatetype
|
||||||
*/
|
*/
|
||||||
public function getDateType()
|
public function getDateType()
|
||||||
{
|
{
|
||||||
@ -284,7 +284,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return int The error code from last formatter call
|
* @return int The error code from last formatter call
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.geterrorcode.php
|
* @see https://php.net/intldateformatter.geterrorcode
|
||||||
*/
|
*/
|
||||||
public function getErrorCode()
|
public function getErrorCode()
|
||||||
{
|
{
|
||||||
@ -296,7 +296,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return string The error message from last formatter call
|
* @return string The error message from last formatter call
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.geterrormessage.php
|
* @see https://php.net/intldateformatter.geterrormessage
|
||||||
*/
|
*/
|
||||||
public function getErrorMessage()
|
public function getErrorMessage()
|
||||||
{
|
{
|
||||||
@ -311,7 +311,7 @@ class IntlDateFormatter
|
|||||||
* @return string The locale used to create the formatter. Currently always
|
* @return string The locale used to create the formatter. Currently always
|
||||||
* returns "en".
|
* returns "en".
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.getlocale.php
|
* @see https://php.net/intldateformatter.getlocale
|
||||||
*/
|
*/
|
||||||
public function getLocale($type = Locale::ACTUAL_LOCALE)
|
public function getLocale($type = Locale::ACTUAL_LOCALE)
|
||||||
{
|
{
|
||||||
@ -323,7 +323,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return string The pattern string used by the formatter
|
* @return string The pattern string used by the formatter
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.getpattern.php
|
* @see https://php.net/intldateformatter.getpattern
|
||||||
*/
|
*/
|
||||||
public function getPattern()
|
public function getPattern()
|
||||||
{
|
{
|
||||||
@ -335,7 +335,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return int The time type used by the formatter
|
* @return int The time type used by the formatter
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.gettimetype.php
|
* @see https://php.net/intldateformatter.gettimetype
|
||||||
*/
|
*/
|
||||||
public function getTimeType()
|
public function getTimeType()
|
||||||
{
|
{
|
||||||
@ -347,7 +347,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return string The timezone identifier used by the formatter
|
* @return string The timezone identifier used by the formatter
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.gettimezoneid.php
|
* @see https://php.net/intldateformatter.gettimezoneid
|
||||||
*/
|
*/
|
||||||
public function getTimeZoneId()
|
public function getTimeZoneId()
|
||||||
{
|
{
|
||||||
@ -363,7 +363,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return mixed The timezone used by the formatter
|
* @return mixed The timezone used by the formatter
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.gettimezone.php
|
* @see https://php.net/intldateformatter.gettimezone
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -377,7 +377,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return bool Currently always returns false
|
* @return bool Currently always returns false
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.islenient.php
|
* @see https://php.net/intldateformatter.islenient
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -397,7 +397,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return string Localtime compatible array of integers: contains 24 hour clock value in tm_hour field
|
* @return string Localtime compatible array of integers: contains 24 hour clock value in tm_hour field
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.localtime.php
|
* @see https://php.net/intldateformatter.localtime
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -417,7 +417,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return int Parsed value as a timestamp
|
* @return int Parsed value as a timestamp
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.parse.php
|
* @see https://php.net/intldateformatter.parse
|
||||||
*
|
*
|
||||||
* @throws MethodArgumentNotImplementedException When $position different than null, behavior not implemented
|
* @throws MethodArgumentNotImplementedException When $position different than null, behavior not implemented
|
||||||
*/
|
*/
|
||||||
@ -447,7 +447,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return bool true on success or false on failure
|
* @return bool true on success or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.setcalendar.php
|
* @see https://php.net/intldateformatter.setcalendar
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -469,7 +469,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return bool true on success or false on failure
|
* @return bool true on success or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.setlenient.php
|
* @see https://php.net/intldateformatter.setlenient
|
||||||
*
|
*
|
||||||
* @throws MethodArgumentValueNotImplementedException When $lenient is true
|
* @throws MethodArgumentValueNotImplementedException When $lenient is true
|
||||||
*/
|
*/
|
||||||
@ -489,7 +489,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return bool true on success or false on failure
|
* @return bool true on success or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.setpattern.php
|
* @see https://php.net/intldateformatter.setpattern
|
||||||
* @see http://userguide.icu-project.org/formatparse/datetime
|
* @see http://userguide.icu-project.org/formatparse/datetime
|
||||||
*/
|
*/
|
||||||
public function setPattern($pattern)
|
public function setPattern($pattern)
|
||||||
@ -512,7 +512,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return bool true on success or false on failure
|
* @return bool true on success or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.settimezoneid.php
|
* @see https://php.net/intldateformatter.settimezoneid
|
||||||
*/
|
*/
|
||||||
public function setTimeZoneId($timeZoneId)
|
public function setTimeZoneId($timeZoneId)
|
||||||
{
|
{
|
||||||
@ -556,7 +556,7 @@ class IntlDateFormatter
|
|||||||
*
|
*
|
||||||
* @return bool true on success or false on failure
|
* @return bool true on success or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/intldateformatter.settimezone.php
|
* @see https://php.net/intldateformatter.settimezone
|
||||||
*/
|
*/
|
||||||
public function setTimeZone($timeZone)
|
public function setTimeZone($timeZone)
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return string The corresponding locale code
|
* @return string The corresponding locale code
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.acceptfromhttp.php
|
* @see https://php.net/locale.acceptfromhttp
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -97,7 +97,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return string The corresponding locale code
|
* @return string The corresponding locale code
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.composelocale.php
|
* @see https://php.net/locale.composelocale
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -115,7 +115,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return string The corresponding locale code
|
* @return string The corresponding locale code
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.filtermatches.php
|
* @see https://php.net/locale.filtermatches
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -131,7 +131,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return array The locale variants
|
* @return array The locale variants
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.getallvariants.php
|
* @see https://php.net/locale.getallvariants
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -145,7 +145,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return string The default locale code. Always returns 'en'
|
* @return string The default locale code. Always returns 'en'
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.getdefault.php
|
* @see https://php.net/locale.getdefault
|
||||||
*/
|
*/
|
||||||
public static function getDefault()
|
public static function getDefault()
|
||||||
{
|
{
|
||||||
@ -160,7 +160,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return string The localized language display name
|
* @return string The localized language display name
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.getdisplaylanguage.php
|
* @see https://php.net/locale.getdisplaylanguage
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -177,7 +177,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return string The localized locale display name
|
* @return string The localized locale display name
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.getdisplayname.php
|
* @see https://php.net/locale.getdisplayname
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -194,7 +194,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return string The localized region display name
|
* @return string The localized region display name
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.getdisplayregion.php
|
* @see https://php.net/locale.getdisplayregion
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -211,7 +211,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return string The localized script display name
|
* @return string The localized script display name
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.getdisplayscript.php
|
* @see https://php.net/locale.getdisplayscript
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -228,7 +228,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return string The localized variant display name
|
* @return string The localized variant display name
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.getdisplayvariant.php
|
* @see https://php.net/locale.getdisplayvariant
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -244,7 +244,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return array Associative array with the extracted variants
|
* @return array Associative array with the extracted variants
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.getkeywords.php
|
* @see https://php.net/locale.getkeywords
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -260,7 +260,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return string|null The extracted language code or null in case of error
|
* @return string|null The extracted language code or null in case of error
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.getprimarylanguage.php
|
* @see https://php.net/locale.getprimarylanguage
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -276,7 +276,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return string|null The extracted region code or null if not present
|
* @return string|null The extracted region code or null if not present
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.getregion.php
|
* @see https://php.net/locale.getregion
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -292,7 +292,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return string|null The extracted script code or null if not present
|
* @return string|null The extracted script code or null if not present
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.getscript.php
|
* @see https://php.net/locale.getscript
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -309,7 +309,7 @@ class Locale
|
|||||||
* @param bool $canonicalize If true, the arguments will be converted to canonical form before matching
|
* @param bool $canonicalize If true, the arguments will be converted to canonical form before matching
|
||||||
* @param string $default The locale to use if no match is found
|
* @param string $default The locale to use if no match is found
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.lookup.php
|
* @see https://php.net/locale.lookup
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -325,7 +325,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return array Associative array with the extracted subtags
|
* @return array Associative array with the extracted subtags
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.parselocale.php
|
* @see https://php.net/locale.parselocale
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -341,7 +341,7 @@ class Locale
|
|||||||
*
|
*
|
||||||
* @return bool true on success or false on failure
|
* @return bool true on success or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/locale.setdefault.php
|
* @see https://php.net/locale.setdefault
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
|
@ -198,7 +198,7 @@ class NumberFormatter
|
|||||||
* The mapping between NumberFormatter rounding modes to the available
|
* The mapping between NumberFormatter rounding modes to the available
|
||||||
* modes in PHP's round() function.
|
* modes in PHP's round() function.
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/function.round.php
|
* @see https://php.net/round
|
||||||
*/
|
*/
|
||||||
private static $phpRoundingMap = [
|
private static $phpRoundingMap = [
|
||||||
self::ROUND_HALFDOWN => \PHP_ROUND_HALF_DOWN,
|
self::ROUND_HALFDOWN => \PHP_ROUND_HALF_DOWN,
|
||||||
@ -249,7 +249,7 @@ class NumberFormatter
|
|||||||
* NumberFormat::PATTERN_RULEBASED. It must conform to the syntax
|
* NumberFormat::PATTERN_RULEBASED. It must conform to the syntax
|
||||||
* described in the ICU DecimalFormat or ICU RuleBasedNumberFormat documentation
|
* described in the ICU DecimalFormat or ICU RuleBasedNumberFormat documentation
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.create.php
|
* @see https://php.net/numberformatter.create
|
||||||
* @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details
|
* @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details
|
||||||
* @see http://www.icu-project.org/apiref/icu4c/classRuleBasedNumberFormat.html#_details
|
* @see http://www.icu-project.org/apiref/icu4c/classRuleBasedNumberFormat.html#_details
|
||||||
*
|
*
|
||||||
@ -288,7 +288,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.create.php
|
* @see https://php.net/numberformatter.create
|
||||||
* @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details
|
* @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details
|
||||||
* @see http://www.icu-project.org/apiref/icu4c/classRuleBasedNumberFormat.html#_details
|
* @see http://www.icu-project.org/apiref/icu4c/classRuleBasedNumberFormat.html#_details
|
||||||
*
|
*
|
||||||
@ -309,7 +309,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return string The formatted currency value
|
* @return string The formatted currency value
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.formatcurrency.php
|
* @see https://php.net/numberformatter.formatcurrency
|
||||||
* @see https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
* @see https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||||
*/
|
*/
|
||||||
public function formatCurrency($value, $currency)
|
public function formatCurrency($value, $currency)
|
||||||
@ -346,7 +346,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return bool|string The formatted value or false on error
|
* @return bool|string The formatted value or false on error
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.format.php
|
* @see https://php.net/numberformatter.format
|
||||||
*
|
*
|
||||||
* @throws NotImplementedException If the method is called with the class $style 'CURRENCY'
|
* @throws NotImplementedException If the method is called with the class $style 'CURRENCY'
|
||||||
* @throws MethodArgumentValueNotImplementedException If the $type is different than TYPE_DEFAULT
|
* @throws MethodArgumentValueNotImplementedException If the $type is different than TYPE_DEFAULT
|
||||||
@ -387,7 +387,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return bool|int The attribute value on success or false on error
|
* @return bool|int The attribute value on success or false on error
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.getattribute.php
|
* @see https://php.net/numberformatter.getattribute
|
||||||
*/
|
*/
|
||||||
public function getAttribute($attr)
|
public function getAttribute($attr)
|
||||||
{
|
{
|
||||||
@ -399,7 +399,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return int The error code from last formatter call
|
* @return int The error code from last formatter call
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.geterrorcode.php
|
* @see https://php.net/numberformatter.geterrorcode
|
||||||
*/
|
*/
|
||||||
public function getErrorCode()
|
public function getErrorCode()
|
||||||
{
|
{
|
||||||
@ -411,7 +411,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return string The error message from last formatter call
|
* @return string The error message from last formatter call
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.geterrormessage.php
|
* @see https://php.net/numberformatter.geterrormessage
|
||||||
*/
|
*/
|
||||||
public function getErrorMessage()
|
public function getErrorMessage()
|
||||||
{
|
{
|
||||||
@ -428,7 +428,7 @@ class NumberFormatter
|
|||||||
* @return string The locale used to create the formatter. Currently always
|
* @return string The locale used to create the formatter. Currently always
|
||||||
* returns "en".
|
* returns "en".
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.getlocale.php
|
* @see https://php.net/numberformatter.getlocale
|
||||||
*/
|
*/
|
||||||
public function getLocale($type = Locale::ACTUAL_LOCALE)
|
public function getLocale($type = Locale::ACTUAL_LOCALE)
|
||||||
{
|
{
|
||||||
@ -440,7 +440,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return bool|string The pattern string used by the formatter or false on error
|
* @return bool|string The pattern string used by the formatter or false on error
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.getpattern.php
|
* @see https://php.net/numberformatter.getpattern
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -456,7 +456,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return bool|string The symbol value or false on error
|
* @return bool|string The symbol value or false on error
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.getsymbol.php
|
* @see https://php.net/numberformatter.getsymbol
|
||||||
*/
|
*/
|
||||||
public function getSymbol($attr)
|
public function getSymbol($attr)
|
||||||
{
|
{
|
||||||
@ -470,7 +470,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return bool|string The attribute value or false on error
|
* @return bool|string The attribute value or false on error
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.gettextattribute.php
|
* @see https://php.net/numberformatter.gettextattribute
|
||||||
*/
|
*/
|
||||||
public function getTextAttribute($attr)
|
public function getTextAttribute($attr)
|
||||||
{
|
{
|
||||||
@ -486,7 +486,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return bool|string The parsed numeric value or false on error
|
* @return bool|string The parsed numeric value or false on error
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.parsecurrency.php
|
* @see https://php.net/numberformatter.parsecurrency
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -504,7 +504,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return int|float|false The parsed value or false on error
|
* @return int|float|false The parsed value or false on error
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.parse.php
|
* @see https://php.net/numberformatter.parse
|
||||||
*/
|
*/
|
||||||
public function parse($value, $type = self::TYPE_DOUBLE, &$position = 0)
|
public function parse($value, $type = self::TYPE_DOUBLE, &$position = 0)
|
||||||
{
|
{
|
||||||
@ -558,7 +558,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return bool true on success or false on failure
|
* @return bool true on success or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.setattribute.php
|
* @see https://php.net/numberformatter.setattribute
|
||||||
*
|
*
|
||||||
* @throws MethodArgumentValueNotImplementedException When the $attr is not supported
|
* @throws MethodArgumentValueNotImplementedException When the $attr is not supported
|
||||||
* @throws MethodArgumentValueNotImplementedException When the $value is not supported
|
* @throws MethodArgumentValueNotImplementedException When the $value is not supported
|
||||||
@ -608,7 +608,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return bool true on success or false on failure
|
* @return bool true on success or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.setpattern.php
|
* @see https://php.net/numberformatter.setpattern
|
||||||
* @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details
|
* @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
@ -626,7 +626,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return bool true on success or false on failure
|
* @return bool true on success or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.setsymbol.php
|
* @see https://php.net/numberformatter.setsymbol
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
@ -643,7 +643,7 @@ class NumberFormatter
|
|||||||
*
|
*
|
||||||
* @return bool true on success or false on failure
|
* @return bool true on success or false on failure
|
||||||
*
|
*
|
||||||
* @see http://www.php.net/manual/en/numberformatter.settextattribute.php
|
* @see https://php.net/numberformatter.settextattribute
|
||||||
*
|
*
|
||||||
* @throws MethodNotImplementedException
|
* @throws MethodNotImplementedException
|
||||||
*/
|
*/
|
||||||
|
@ -18,4 +18,4 @@ Resources
|
|||||||
* [Docker images with intl support](https://hub.docker.com/r/jakzal/php-intl)
|
* [Docker images with intl support](https://hub.docker.com/r/jakzal/php-intl)
|
||||||
(for the Intl component development)
|
(for the Intl component development)
|
||||||
|
|
||||||
[0]: http://www.php.net/manual/en/intl.setup.php
|
[0]: https://php.net/intl.setup
|
||||||
|
@ -17,8 +17,8 @@ use Symfony\Component\Process\Process;
|
|||||||
/**
|
/**
|
||||||
* WindowsPipes implementation uses temporary files as handles.
|
* WindowsPipes implementation uses temporary files as handles.
|
||||||
*
|
*
|
||||||
* @see https://bugs.php.net/bug.php?id=51800
|
* @see https://bugs.php.net/51800
|
||||||
* @see https://bugs.php.net/bug.php?id=65650
|
* @see https://bugs.php.net/65650
|
||||||
*
|
*
|
||||||
* @author Romain Neutron <imprec@gmail.com>
|
* @author Romain Neutron <imprec@gmail.com>
|
||||||
*
|
*
|
||||||
@ -43,7 +43,7 @@ class WindowsPipes extends AbstractPipes
|
|||||||
// Fix for PHP bug #51800: reading from STDOUT pipe hangs forever on Windows if the output is too big.
|
// Fix for PHP bug #51800: reading from STDOUT pipe hangs forever on Windows if the output is too big.
|
||||||
// Workaround for this problem is to use temporary files instead of pipes on Windows platform.
|
// Workaround for this problem is to use temporary files instead of pipes on Windows platform.
|
||||||
//
|
//
|
||||||
// @see https://bugs.php.net/bug.php?id=51800
|
// @see https://bugs.php.net/51800
|
||||||
$pipes = [
|
$pipes = [
|
||||||
Process::STDOUT => Process::OUT,
|
Process::STDOUT => Process::OUT,
|
||||||
Process::STDERR => Process::ERR,
|
Process::STDERR => Process::ERR,
|
||||||
@ -105,8 +105,8 @@ class WindowsPipes extends AbstractPipes
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
// We're not using pipe on Windows platform as it hangs (https://bugs.php.net/bug.php?id=51800)
|
// We're not using pipe on Windows platform as it hangs (https://bugs.php.net/51800)
|
||||||
// We're not using file handles as it can produce corrupted output https://bugs.php.net/bug.php?id=65650
|
// We're not using file handles as it can produce corrupted output https://bugs.php.net/65650
|
||||||
// So we redirect output within the commandline and pass the nul device to the process
|
// So we redirect output within the commandline and pass the nul device to the process
|
||||||
return [
|
return [
|
||||||
['pipe', 'r'],
|
['pipe', 'r'],
|
||||||
|
@ -152,8 +152,8 @@ class Process implements \IteratorAggregate
|
|||||||
|
|
||||||
// on Windows, if the cwd changed via chdir(), proc_open defaults to the dir where PHP was started
|
// on Windows, if the cwd changed via chdir(), proc_open defaults to the dir where PHP was started
|
||||||
// on Gnu/Linux, PHP builds with --enable-maintainer-zts are also affected
|
// on Gnu/Linux, PHP builds with --enable-maintainer-zts are also affected
|
||||||
// @see : https://bugs.php.net/bug.php?id=51800
|
// @see : https://bugs.php.net/51800
|
||||||
// @see : https://bugs.php.net/bug.php?id=50524
|
// @see : https://bugs.php.net/50524
|
||||||
if (null === $this->cwd && (\defined('ZEND_THREAD_SAFE') || '\\' === \DIRECTORY_SEPARATOR)) {
|
if (null === $this->cwd && (\defined('ZEND_THREAD_SAFE') || '\\' === \DIRECTORY_SEPARATOR)) {
|
||||||
$this->cwd = getcwd();
|
$this->cwd = getcwd();
|
||||||
}
|
}
|
||||||
@ -488,7 +488,7 @@ class Process implements \IteratorAggregate
|
|||||||
/**
|
/**
|
||||||
* Sends a POSIX signal to the process.
|
* Sends a POSIX signal to the process.
|
||||||
*
|
*
|
||||||
* @param int $signal A valid POSIX signal (see http://www.php.net/manual/en/pcntl.constants.php)
|
* @param int $signal A valid POSIX signal (see https://php.net/pcntl.constants)
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*
|
*
|
||||||
@ -1487,7 +1487,7 @@ class Process implements \IteratorAggregate
|
|||||||
/**
|
/**
|
||||||
* Sends a POSIX signal to the process.
|
* Sends a POSIX signal to the process.
|
||||||
*
|
*
|
||||||
* @param int $signal A valid POSIX signal (see http://www.php.net/manual/en/pcntl.constants.php)
|
* @param int $signal A valid POSIX signal (see https://php.net/pcntl.constants)
|
||||||
* @param bool $throwException Whether to throw exception in case signal failed
|
* @param bool $throwException Whether to throw exception in case signal failed
|
||||||
*
|
*
|
||||||
* @return bool True if the signal was sent successfully, false otherwise
|
* @return bool True if the signal was sent successfully, false otherwise
|
||||||
|
@ -1137,7 +1137,7 @@ class ProcessTest extends TestCase
|
|||||||
];
|
];
|
||||||
|
|
||||||
if ('\\' === \DIRECTORY_SEPARATOR) {
|
if ('\\' === \DIRECTORY_SEPARATOR) {
|
||||||
// Avoid XL buffers on Windows because of https://bugs.php.net/bug.php?id=65650
|
// Avoid XL buffers on Windows because of https://bugs.php.net/65650
|
||||||
$sizes = [1, 2, 4, 8];
|
$sizes = [1, 2, 4, 8];
|
||||||
} else {
|
} else {
|
||||||
$sizes = [1, 16, 64, 1024, 4096];
|
$sizes = [1, 16, 64, 1024, 4096];
|
||||||
|
@ -84,7 +84,7 @@ class JsonDecode implements DecoderInterface
|
|||||||
*
|
*
|
||||||
* @throws NotEncodableValueException
|
* @throws NotEncodableValueException
|
||||||
*
|
*
|
||||||
* @see http://php.net/json_decode json_decode
|
* @see https://php.net/json_decode
|
||||||
*/
|
*/
|
||||||
public function decode($data, $format, array $context = [])
|
public function decode($data, $format, array $context = [])
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ abstract class AbstractComparisonValidator extends ConstraintValidator
|
|||||||
// Convert strings to DateTimes if comparing another DateTime
|
// Convert strings to DateTimes if comparing another DateTime
|
||||||
// This allows to compare with any date/time value supported by
|
// This allows to compare with any date/time value supported by
|
||||||
// the DateTime constructor:
|
// the DateTime constructor:
|
||||||
// http://php.net/manual/en/datetime.formats.php
|
// https://php.net/datetime.formats
|
||||||
if (\is_string($comparedValue)) {
|
if (\is_string($comparedValue)) {
|
||||||
if ($value instanceof \DateTimeImmutable) {
|
if ($value instanceof \DateTimeImmutable) {
|
||||||
// If $value is immutable, convert the compared value to a
|
// If $value is immutable, convert the compared value to a
|
||||||
|
@ -48,7 +48,7 @@ class RangeValidator extends ConstraintValidator
|
|||||||
// Convert strings to DateTimes if comparing another DateTime
|
// Convert strings to DateTimes if comparing another DateTime
|
||||||
// This allows to compare with any date/time value supported by
|
// This allows to compare with any date/time value supported by
|
||||||
// the DateTime constructor:
|
// the DateTime constructor:
|
||||||
// http://php.net/manual/en/datetime.formats.php
|
// https://php.net/datetime.formats
|
||||||
if ($value instanceof \DateTimeInterface) {
|
if ($value instanceof \DateTimeInterface) {
|
||||||
if (\is_string($min)) {
|
if (\is_string($min)) {
|
||||||
$min = new \DateTime($min);
|
$min = new \DateTime($min);
|
||||||
|
@ -351,7 +351,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
|
|||||||
{
|
{
|
||||||
// Quoting after official filter documentation:
|
// Quoting after official filter documentation:
|
||||||
// "FILTER_FLAG_NO_RES_RANGE = This flag does not apply to IPv6 addresses."
|
// "FILTER_FLAG_NO_RES_RANGE = This flag does not apply to IPv6 addresses."
|
||||||
// Full description: http://php.net/manual/en/filter.filters.flags.php
|
// Full description: https://php.net/filter.filters.flags
|
||||||
return $this->getInvalidIpsV6();
|
return $this->getInvalidIpsV6();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ class DateCaster
|
|||||||
public static function castPeriod(\DatePeriod $p, array $a, Stub $stub, $isNested, $filter)
|
public static function castPeriod(\DatePeriod $p, array $a, Stub $stub, $isNested, $filter)
|
||||||
{
|
{
|
||||||
$dates = [];
|
$dates = [];
|
||||||
if (\PHP_VERSION_ID >= 70107) { // see https://bugs.php.net/bug.php?id=74639
|
if (\PHP_VERSION_ID >= 70107) { // see https://bugs.php.net/74639
|
||||||
foreach (clone $p as $i => $d) {
|
foreach (clone $p as $i => $d) {
|
||||||
if (self::PERIOD_LIMIT === $i) {
|
if (self::PERIOD_LIMIT === $i) {
|
||||||
$now = new \DateTimeImmutable();
|
$now = new \DateTimeImmutable();
|
||||||
|
@ -17,7 +17,7 @@ use Symfony\Component\Workflow\Marking;
|
|||||||
/**
|
/**
|
||||||
* GraphvizDumper dumps a workflow as a graphviz file.
|
* GraphvizDumper dumps a workflow as a graphviz file.
|
||||||
*
|
*
|
||||||
* You can convert the generated dot file with the dot utility (http://www.graphviz.org/):
|
* You can convert the generated dot file with the dot utility (https://graphviz.org/):
|
||||||
*
|
*
|
||||||
* dot -Tpng workflow.dot > workflow.png
|
* dot -Tpng workflow.dot > workflow.png
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user