From e95b8a3291f95f47b6c638f237c4af752679552f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 8 Aug 2019 14:31:29 +0200 Subject: [PATCH 1/5] [Cache] cs fix --- src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php | 2 +- .../Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php | 2 +- src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php index 7b43c61c6a..6aadbf266e 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PredisAdapterTest.php @@ -18,7 +18,7 @@ class PredisAdapterTest extends AbstractRedisAdapterTest { public static function setUpBeforeClass() { - parent::setupBeforeClass(); + parent::setUpBeforeClass(); self::$redis = new \Predis\Client(['host' => getenv('REDIS_HOST')]); } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php index cd0dfb7a59..1afabaf1d0 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php @@ -15,7 +15,7 @@ class PredisClusterAdapterTest extends AbstractRedisAdapterTest { public static function setUpBeforeClass() { - parent::setupBeforeClass(); + parent::setUpBeforeClass(); self::$redis = new \Predis\Client([['host' => getenv('REDIS_HOST')]]); } diff --git a/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php index 0ab893a28a..edc6a9934f 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php @@ -19,7 +19,7 @@ class RedisAdapterTest extends AbstractRedisAdapterTest { public static function setUpBeforeClass() { - parent::setupBeforeClass(); + parent::setUpBeforeClass(); self::$redis = AbstractAdapter::createConnection('redis://'.getenv('REDIS_HOST'), ['lazy' => true]); } From bb3cb64e64074ebd0c7d633aaf33cb08b1eddc27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Thu, 8 Aug 2019 15:49:16 +0200 Subject: [PATCH 2/5] Fix test compatibility with 4.x components --- .../FormExtensionBootstrap3HorizontalLayoutTest.php | 7 ++++--- .../Tests/Extension/FormExtensionBootstrap3LayoutTest.php | 7 ++++--- .../FormExtensionBootstrap4HorizontalLayoutTest.php | 7 ++++--- .../Tests/Extension/FormExtensionBootstrap4LayoutTest.php | 7 ++++--- .../Twig/Tests/Extension/FormExtensionDivLayoutTest.php | 7 ++++--- .../Twig/Tests/Extension/FormExtensionTableLayoutTest.php | 7 ++++--- .../Tests/Templating/Helper/FormHelperDivLayoutTest.php | 7 ++++--- .../Tests/Templating/Helper/FormHelperTableLayoutTest.php | 7 ++++--- 8 files changed, 32 insertions(+), 24 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php index 02f6ac9b1e..b11d1720be 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php @@ -33,10 +33,11 @@ class FormExtensionBootstrap3HorizontalLayoutTest extends AbstractBootstrap3Hori */ private $renderer; - protected function setUp() + /** + * @before + */ + public function doSetUp() { - parent::setUp(); - $loader = new StubFilesystemLoader([ __DIR__.'/../../Resources/views/Form', __DIR__.'/Fixtures/templates/form', diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3LayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3LayoutTest.php index 0c2ef171b2..0bb5a7b6ce 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3LayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap3LayoutTest.php @@ -29,10 +29,11 @@ class FormExtensionBootstrap3LayoutTest extends AbstractBootstrap3LayoutTest */ private $renderer; - protected function setUp() + /** + * @before + */ + public function doSetUp() { - parent::setUp(); - $loader = new StubFilesystemLoader([ __DIR__.'/../../Resources/views/Form', __DIR__.'/Fixtures/templates/form', diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4HorizontalLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4HorizontalLayoutTest.php index 319c0e5730..02ab01fc57 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4HorizontalLayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4HorizontalLayoutTest.php @@ -35,10 +35,11 @@ class FormExtensionBootstrap4HorizontalLayoutTest extends AbstractBootstrap4Hori private $renderer; - protected function setUp() + /** + * @before + */ + public function doSetUp() { - parent::setUp(); - $loader = new StubFilesystemLoader([ __DIR__.'/../../Resources/views/Form', __DIR__.'/Fixtures/templates/form', diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4LayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4LayoutTest.php index ea36552d85..cb2328b51f 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4LayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap4LayoutTest.php @@ -33,10 +33,11 @@ class FormExtensionBootstrap4LayoutTest extends AbstractBootstrap4LayoutTest */ private $renderer; - protected function setUp() + /** + * @before + */ + public function doSetUp() { - parent::setUp(); - $loader = new StubFilesystemLoader([ __DIR__.'/../../Resources/views/Form', __DIR__.'/Fixtures/templates/form', diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php index 214df3c7f6..51e5874118 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php @@ -33,10 +33,11 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest protected static $supportedFeatureSetVersion = 304; - protected function setUp() + /** + * @before + */ + public function doSetUp() { - parent::setUp(); - $loader = new StubFilesystemLoader([ __DIR__.'/../../Resources/views/Form', __DIR__.'/Fixtures/templates/form', diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php index f956767363..0676dffd57 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php @@ -32,10 +32,11 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest protected static $supportedFeatureSetVersion = 304; - protected function setUp() + /** + * @before + */ + public function doSetUp() { - parent::setUp(); - $loader = new StubFilesystemLoader([ __DIR__.'/../../Resources/views/Form', __DIR__.'/Fixtures/templates/form', diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php index 03b2ed6961..3ac4415629 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php @@ -52,11 +52,12 @@ class FormHelperDivLayoutTest extends AbstractDivLayoutTest ]); } - protected function tearDown() + /** + * @after + */ + public function doTearDown() { $this->engine = null; - - parent::tearDown(); } public function testStartTagHasNoActionAttributeWhenActionIsEmpty() diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php index bd088078c3..e7555b2341 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php @@ -77,11 +77,12 @@ class FormHelperTableLayoutTest extends AbstractTableLayoutTest ]); } - protected function tearDown() + /** + * @after + */ + public function doTearDown() { $this->engine = null; - - parent::tearDown(); } protected function renderForm(FormView $view, array $vars = []) From 99884e63b587cc51327a88ce695797fde5e87f4c Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 8 Aug 2019 16:08:32 +0200 Subject: [PATCH 3/5] [HttpClient] fix data loss when streaming as a PHP resource --- .../HttpClient/Response/StreamWrapper.php | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpClient/Response/StreamWrapper.php b/src/Symfony/Component/HttpClient/Response/StreamWrapper.php index 0c9a95a951..4f9394aef3 100644 --- a/src/Symfony/Component/HttpClient/Response/StreamWrapper.php +++ b/src/Symfony/Component/HttpClient/Response/StreamWrapper.php @@ -22,7 +22,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface; */ class StreamWrapper { - /** @var resource */ + /** @var resource|string|null */ public $context; /** @var HttpClientInterface */ @@ -103,7 +103,7 @@ class StreamWrapper public function stream_read(int $count) { - if (null !== $this->content) { + if (\is_resource($this->content)) { // Empty the internal activity list foreach ($this->client->stream([$this->response], 0) as $chunk) { try { @@ -127,6 +127,19 @@ class StreamWrapper } } + if (\is_string($this->content)) { + if (\strlen($this->content) <= $count) { + $data = $this->content; + $this->content = null; + } else { + $data = substr($this->content, 0, $count); + $this->content = substr($this->content, $count); + } + $this->offset += \strlen($data); + + return $data; + } + foreach ($this->client->stream([$this->response]) as $chunk) { try { $this->eof = true; @@ -134,6 +147,12 @@ class StreamWrapper $this->eof = $chunk->isLast(); if ('' !== $data = $chunk->getContent()) { + if (\strlen($data) > $count) { + if (null === $this->content) { + $this->content = substr($data, $count); + } + $data = substr($data, 0, $count); + } $this->offset += \strlen($data); return $data; @@ -155,12 +174,12 @@ class StreamWrapper public function stream_eof(): bool { - return $this->eof; + return $this->eof && !\is_string($this->content); } public function stream_seek(int $offset, int $whence = SEEK_SET): bool { - if (null === $this->content || 0 !== fseek($this->content, 0, SEEK_END)) { + if (!\is_resource($this->content) || 0 !== fseek($this->content, 0, SEEK_END)) { return false; } From 5dbcdc6ff4ef35b9b1d83ab4a9e41baf1caafe30 Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Thu, 8 Aug 2019 16:01:55 +0200 Subject: [PATCH 4/5] cleanup remaining param and internal Intl FulLTransformer --- .../Console/Descriptor/Descriptor.php | 2 - .../Bundle/FrameworkBundle/Routing/Router.php | 1 - .../Templating/Helper/ActionsHelper.php | 3 +- .../Translation/Translator.php | 4 -- .../Component/Cache/Traits/MemcachedTrait.php | 1 - .../Descriptor/DescriptorInterface.php | 1 - .../Formatter/OutputFormatterStyle.php | 1 - .../Console/Helper/DescriptorHelper.php | 1 - .../Dumper/DumperInterface.php | 2 - .../Core/EventListener/ResizeFormListener.php | 2 - .../Component/Form/Tests/AbstractFormTest.php | 32 +++-------- .../Component/Form/Tests/CompoundFormTest.php | 5 +- .../Component/Form/Tests/SimpleFormTest.php | 3 +- .../Handler/MemcachedSessionHandler.php | 1 - .../Storage/Handler/MongoDbSessionHandler.php | 3 - .../Storage/Handler/PdoSessionHandler.php | 1 - .../Storage/Handler/RedisSessionHandler.php | 1 - .../Session/Storage/NativeSessionStorage.php | 1 - .../HttpKernel/Fragment/FragmentHandler.php | 1 - .../Fragment/FragmentRendererInterface.php | 3 +- .../DateFormat/FullTransformer.php | 55 +++---------------- .../DateFormatter/DateFormat/Transformer.php | 1 - .../Component/Process/Tests/ProcessTest.php | 10 +--- .../Dumper/GeneratorDumperInterface.php | 2 - .../Matcher/Dumper/MatcherDumperInterface.php | 2 - src/Symfony/Component/Routing/Route.php | 4 +- .../Component/Routing/RouteCollection.php | 2 - src/Symfony/Component/Routing/Router.php | 3 - .../Workflow/Dumper/DumperInterface.php | 2 - 29 files changed, 27 insertions(+), 123 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php index 48fc4f0098..4ab423d064 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php @@ -132,7 +132,6 @@ abstract class Descriptor implements DescriptorInterface * * name: name of described service * * @param Definition|Alias|object $service - * @param array $options */ abstract protected function describeContainerService($service, array $options = [], ContainerBuilder $builder = null); @@ -176,7 +175,6 @@ abstract class Descriptor implements DescriptorInterface * Describes a callable. * * @param callable $callable - * @param array $options */ abstract protected function describeCallable($callable, array $options = []); diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php b/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php index a402d64ab0..83f6602b98 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php +++ b/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php @@ -37,7 +37,6 @@ class Router extends BaseRouter implements WarmableInterface, ServiceSubscriberI /** * @param mixed $resource The main resource to load - * @param array $options An array of options */ public function __construct(ContainerInterface $container, $resource, array $options = [], RequestContext $context = null, ContainerInterface $parameters = null, LoggerInterface $logger = null, string $defaultLocale = null) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php index 8a054162fb..a6eb19fd0f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php @@ -36,8 +36,7 @@ class ActionsHelper extends Helper /** * Returns the fragment content for a given URI. * - * @param string $uri A URI - * @param array $options An array of options + * @param string $uri * * @return string The fragment content * diff --git a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php index bfee2776f5..dd6a213b59 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php +++ b/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php @@ -65,10 +65,6 @@ class Translator extends BaseTranslator implements WarmableInterface * * debug: Whether to enable debugging or not (false by default) * * resource_files: List of translation resources available grouped by locale. * - * @param string $defaultLocale - * @param array $loaderIds An array of loader Ids - * @param array $options An array of options - * * @throws InvalidArgumentException */ public function __construct(ContainerInterface $container, MessageFormatterInterface $formatter, string $defaultLocale, array $loaderIds = [], array $options = []) diff --git a/src/Symfony/Component/Cache/Traits/MemcachedTrait.php b/src/Symfony/Component/Cache/Traits/MemcachedTrait.php index 620668a250..df0915e925 100644 --- a/src/Symfony/Component/Cache/Traits/MemcachedTrait.php +++ b/src/Symfony/Component/Cache/Traits/MemcachedTrait.php @@ -71,7 +71,6 @@ trait MemcachedTrait * - [['localhost', 11211, 33]] * * @param array[]|string|string[] $servers An array of servers, a DSN, or an array of DSNs - * @param array $options An array of options * * @return \Memcached * diff --git a/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php b/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php index 871093851c..e3184a6a5a 100644 --- a/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php +++ b/src/Symfony/Component/Console/Descriptor/DescriptorInterface.php @@ -24,7 +24,6 @@ interface DescriptorInterface * Describes an object if supported. * * @param object $object - * @param array $options */ public function describe(OutputInterface $output, $object, array $options = []); } diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php index 204b46fbb8..16994202ef 100644 --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php +++ b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php @@ -61,7 +61,6 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface * * @param string|null $foreground The style foreground color name * @param string|null $background The style background color name - * @param array $options The style options */ public function __construct(string $foreground = null, string $background = null, array $options = []) { diff --git a/src/Symfony/Component/Console/Helper/DescriptorHelper.php b/src/Symfony/Component/Console/Helper/DescriptorHelper.php index 8859eb1318..3055baefd4 100644 --- a/src/Symfony/Component/Console/Helper/DescriptorHelper.php +++ b/src/Symfony/Component/Console/Helper/DescriptorHelper.php @@ -49,7 +49,6 @@ class DescriptorHelper extends Helper * * raw_text: boolean, sets output type as raw * * @param object $object - * @param array $options * * @throws InvalidArgumentException when the given format is not supported */ diff --git a/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php b/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php index 1ea775ddfe..e8c3e4898e 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php @@ -21,8 +21,6 @@ interface DumperInterface /** * Dumps the service container. * - * @param array $options An array of options - * * @return string The representation of the service container */ public function dump(array $options = []); diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php index 695336e954..d978117552 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php @@ -32,8 +32,6 @@ class ResizeFormListener implements EventSubscriberInterface private $deleteEmpty; /** - * @param string $type - * @param array $options * @param bool $allowAdd Whether children could be added to the group * @param bool $allowDelete Whether children could be removed from the group * @param bool|callable $deleteEmpty diff --git a/src/Symfony/Component/Form/Tests/AbstractFormTest.php b/src/Symfony/Component/Form/Tests/AbstractFormTest.php index f6ba7c7bb1..5dc1ad2311 100644 --- a/src/Symfony/Component/Form/Tests/AbstractFormTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractFormTest.php @@ -16,6 +16,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\Form\FormBuilder; +use Symfony\Component\Form\FormInterface; abstract class AbstractFormTest extends TestCase { @@ -30,7 +31,7 @@ abstract class AbstractFormTest extends TestCase protected $factory; /** - * @var \Symfony\Component\Form\FormInterface + * @var FormInterface */ protected $form; @@ -48,43 +49,24 @@ abstract class AbstractFormTest extends TestCase $this->form = null; } - /** - * @return \Symfony\Component\Form\FormInterface - */ - abstract protected function createForm(); + abstract protected function createForm(): FormInterface; - /** - * @param string $name - * @param string|null $dataClass - * @param array $options - * - * @return FormBuilder - */ - protected function getBuilder($name = 'name', EventDispatcherInterface $dispatcher = null, $dataClass = null, array $options = []) + protected function getBuilder(?string $name = 'name', EventDispatcherInterface $dispatcher = null, string $dataClass = null, array $options = []): FormBuilder { return new FormBuilder($name, $dataClass, $dispatcher ?: $this->dispatcher, $this->factory, $options); } - /** - * @return MockObject - */ - protected function getDataMapper() + protected function getDataMapper(): MockObject { return $this->getMockBuilder('Symfony\Component\Form\DataMapperInterface')->getMock(); } - /** - * @return MockObject - */ - protected function getDataTransformer() + protected function getDataTransformer(): MockObject { return $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock(); } - /** - * @return MockObject - */ - protected function getFormValidator() + protected function getFormValidator(): MockObject { return $this->getMockBuilder('Symfony\Component\Form\FormValidatorInterface')->getMock(); } diff --git a/src/Symfony/Component/Form/Tests/CompoundFormTest.php b/src/Symfony/Component/Form/Tests/CompoundFormTest.php index 595533ec80..0a97f6408c 100644 --- a/src/Symfony/Component/Form/Tests/CompoundFormTest.php +++ b/src/Symfony/Component/Form/Tests/CompoundFormTest.php @@ -17,6 +17,7 @@ use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; +use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\Forms; use Symfony\Component\Form\FormView; use Symfony\Component\Form\SubmitButtonBuilder; @@ -190,7 +191,7 @@ class CompoundFormTest extends AbstractFormTest public function testAddUsingIntegerNameAndType() { - $child = $this->getBuilder(0)->getForm(); + $child = $this->getBuilder('0')->getForm(); $this->factory->expects($this->once()) ->method('createNamed') @@ -1123,7 +1124,7 @@ class CompoundFormTest extends AbstractFormTest $this->assertNull($this->form->get('bar')->getData()); } - protected function createForm($name = 'name', $compound = true) + protected function createForm(string $name = 'name', bool $compound = true): FormInterface { $builder = $this->getBuilder($name); diff --git a/src/Symfony/Component/Form/Tests/SimpleFormTest.php b/src/Symfony/Component/Form/Tests/SimpleFormTest.php index f74c66ff3a..33f815891b 100644 --- a/src/Symfony/Component/Form/Tests/SimpleFormTest.php +++ b/src/Symfony/Component/Form/Tests/SimpleFormTest.php @@ -18,6 +18,7 @@ use Symfony\Component\Form\FormConfigBuilder; use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; +use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\Tests\Fixtures\FixedDataTransformer; use Symfony\Component\Form\Tests\Fixtures\FixedFilterListener; use Symfony\Component\PropertyAccess\PropertyPath; @@ -1096,7 +1097,7 @@ class SimpleFormTest extends AbstractFormTest $form->setData('foo'); } - protected function createForm() + protected function createForm(): FormInterface { return $this->getBuilder()->getForm(); } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php index 1db590b360..bcaeef9783 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php @@ -41,7 +41,6 @@ class MemcachedSessionHandler extends AbstractSessionHandler * * expiretime: The time to live in seconds. * * @param \Memcached $memcached A \Memcached instance - * @param array $options An associative array of Memcached options * * @throws \InvalidArgumentException When unsupported options are passed */ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php index 536c2840e5..fd8f05a222 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -61,9 +61,6 @@ class MongoDbSessionHandler extends AbstractSessionHandler * If you use such an index, you can drop `gc_probability` to 0 since * no garbage-collection is required. * - * @param \MongoDB\Client $mongo A MongoDB\Client instance - * @param array $options An associative array of field options - * * @throws \InvalidArgumentException When "database" or "collection" not provided */ public function __construct(\MongoDB\Client $mongo, array $options) diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php index 5c8eb5f5f9..4e044c69be 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -165,7 +165,6 @@ class PdoSessionHandler extends AbstractSessionHandler * * lock_mode: The strategy for locking, see constants [default: LOCK_TRANSACTIONAL] * * @param \PDO|string|null $pdoOrDsn A \PDO instance or DSN string or URL string or null - * @param array $options An associative array of options * * @throws \InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION */ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php index a6498b882c..c2e7d34dcf 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php @@ -35,7 +35,6 @@ class RedisSessionHandler extends AbstractSessionHandler * * prefix: The prefix to use for the keys in order to avoid collision on the Redis server. * * @param \Redis|\RedisArray|\RedisCluster|\Predis\Client|RedisProxy $redis - * @param array $options An associative array of options * * @throws \InvalidArgumentException When unsupported client or options are passed */ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index 297b114a09..98b3199e9c 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -97,7 +97,6 @@ class NativeSessionStorage implements SessionStorageInterface * trans_sid_hosts, $_SERVER['HTTP_HOST'] * trans_sid_tags, "a=href,area=href,frame=src,form=" * - * @param array $options Session configuration options * @param \SessionHandlerInterface|null $handler */ public function __construct(array $options = [], $handler = null, MetadataBag $metaBag = null) diff --git a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php index 46a2a116d9..5c664ed75b 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php +++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php @@ -62,7 +62,6 @@ class FragmentHandler * * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance * @param string $renderer The renderer name - * @param array $options An array of options * * @return string|null The Response content or null when the Response is streamed * diff --git a/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php b/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php index 00ad3c3f86..4f8ac50b16 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php +++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php @@ -25,8 +25,7 @@ interface FragmentRendererInterface /** * Renders a URI and returns the Response content. * - * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance - * @param array $options An array of options + * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance * * @return Response A Response instance */ diff --git a/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php b/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php index 80c03862cd..7ec82461d6 100644 --- a/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php +++ b/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php @@ -69,21 +69,9 @@ class FullTransformer ]; } - /** - * Return the array of Transformer objects. - * - * @return Transformer[] Associative array of Transformer objects (format char => Transformer) - */ - public function getTransformers() - { - return $this->transformers; - } - /** * Format a DateTime using ICU dateformat pattern. * - * @param \DateTime $dateTime A DateTime object to be used to generate the formatted value - * * @return string The formatted value */ public function format(\DateTime $dateTime) @@ -98,14 +86,9 @@ class FullTransformer /** * Return the formatted ICU value for the matched date characters. * - * @param string $dateChars The date characters to be replaced with a formatted ICU value - * @param \DateTime $dateTime A DateTime object to be used to generate the formatted value - * - * @return string The formatted value - * * @throws NotImplementedException When it encounters a not implemented date character */ - public function formatReplace($dateChars, $dateTime) + private function formatReplace(string $dateChars, \DateTime $dateTime): string { $length = \strlen($dateChars); @@ -167,12 +150,10 @@ class FullTransformer /** * Retrieve a regular expression to match with a formatted value. * - * @param string $pattern The pattern to create the reverse matching regular expression - * * @return string The reverse matching regular expression with named captures being formed by the * transformer index in the $transformer array */ - public function getReverseMatchingRegExp($pattern) + private function getReverseMatchingRegExp(string $pattern): string { $escapedPattern = preg_quote($pattern, '/'); @@ -189,9 +170,8 @@ class FullTransformer return $this->replaceQuoteMatch($dateChars); } - $transformers = $this->getTransformers(); - if (isset($transformers[$transformerIndex])) { - $transformer = $transformers[$transformerIndex]; + if (isset($this->transformers[$transformerIndex])) { + $transformer = $this->transformers[$transformerIndex]; $captureName = str_repeat($transformerIndex, $length); return "(?P<$captureName>".$transformer->getReverseMatchingRegExp($length).')'; @@ -203,24 +183,16 @@ class FullTransformer /** * Check if the first char of a string is a single quote. - * - * @param string $quoteMatch The string to check - * - * @return bool true if matches, false otherwise */ - public function isQuoteMatch($quoteMatch) + private function isQuoteMatch(string $quoteMatch): bool { return "'" === $quoteMatch[0]; } /** * Replaces single quotes at the start or end of a string with two single quotes. - * - * @param string $quoteMatch The string to replace the quotes - * - * @return string A string with the single quotes replaced */ - public function replaceQuoteMatch($quoteMatch) + private function replaceQuoteMatch(string $quoteMatch): string { if (preg_match("/^'+$/", $quoteMatch)) { return str_replace("''", "'", $quoteMatch); @@ -231,12 +203,8 @@ class FullTransformer /** * Builds a chars match regular expression. - * - * @param string $specialChars A string of chars to build the regular expression - * - * @return string The chars match regular expression */ - protected function buildCharsMatch($specialChars) + private function buildCharsMatch(string $specialChars): string { $specialCharsArray = str_split($specialChars); @@ -250,10 +218,8 @@ class FullTransformer /** * Normalize a preg_replace match array, removing the numeric keys and returning an associative array * with the value and pattern values for the matched Transformer. - * - * @return array */ - protected function normalizeArray(array $data) + private function normalizeArray(array $data): array { $ret = []; @@ -275,12 +241,9 @@ class FullTransformer * Calculates the Unix timestamp based on the matched values by the reverse matching regular * expression of parse(). * - * @param \DateTime $dateTime The DateTime object to be used to calculate the timestamp - * @param array $options An array with the matched values to be used to calculate the timestamp - * * @return bool|int The calculated timestamp or false if matched date is invalid */ - protected function calculateUnixTimestamp(\DateTime $dateTime, array $options) + private function calculateUnixTimestamp(\DateTime $dateTime, array $options) { $options = $this->getDefaultValueForOptions($options); diff --git a/src/Symfony/Component/Intl/DateFormatter/DateFormat/Transformer.php b/src/Symfony/Component/Intl/DateFormatter/DateFormat/Transformer.php index 5bdb7267af..1a9a3eff3f 100644 --- a/src/Symfony/Component/Intl/DateFormatter/DateFormat/Transformer.php +++ b/src/Symfony/Component/Intl/DateFormatter/DateFormat/Transformer.php @@ -23,7 +23,6 @@ abstract class Transformer /** * Format a value using a configured DateTime as date/time source. * - * * @param \DateTime $dateTime A DateTime object to be used to generate the formatted value * @param int $length The formatted value string length * diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php index 5d86bc5e8b..d5b325a97a 100644 --- a/src/Symfony/Component/Process/Tests/ProcessTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -1520,14 +1520,8 @@ EOTXT; } /** - * @param string $commandline - * @param string|null $cwd - * @param array|null $env - * @param string|null $input - * @param int $timeout - * @param array $options - * - * @return Process + * @param string|array $commandline + * @param mixed $input */ private function getProcess($commandline, string $cwd = null, array $env = null, $input = null, ?int $timeout = 60): Process { diff --git a/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php b/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php index 096519aa1a..26daefc63c 100644 --- a/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php +++ b/src/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php @@ -24,8 +24,6 @@ interface GeneratorDumperInterface * Dumps a set of routes to a string representation of executable code * that can then be used to generate a URL of such a route. * - * @param array $options An array of options - * * @return string Executable code */ public function dump(array $options = []); diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php b/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php index 2a25293aa3..34aad92741 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php @@ -24,8 +24,6 @@ interface MatcherDumperInterface * Dumps a set of routes to a string representation of executable code * that can then be used to match a request against these routes. * - * @param array $options An array of options - * * @return string Executable code */ public function dump(array $options = []); diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index 51785fda9d..b402665b92 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -45,10 +45,10 @@ class Route implements \Serializable * @param array $defaults An array of default parameter values * @param array $requirements An array of requirements for parameters (regexes) * @param array $options An array of options - * @param string $host The host pattern to match + * @param string|null $host The host pattern to match * @param string|string[] $schemes A required URI scheme or an array of restricted schemes * @param string|string[] $methods A required HTTP method or an array of restricted methods - * @param string $condition A condition that should evaluate to true for the route to match + * @param string|null $condition A condition that should evaluate to true for the route to match */ public function __construct(string $path, array $defaults = [], array $requirements = [], array $options = [], ?string $host = '', $schemes = [], $methods = [], ?string $condition = '') { diff --git a/src/Symfony/Component/Routing/RouteCollection.php b/src/Symfony/Component/Routing/RouteCollection.php index 54ccad805d..b52c6832fe 100644 --- a/src/Symfony/Component/Routing/RouteCollection.php +++ b/src/Symfony/Component/Routing/RouteCollection.php @@ -239,8 +239,6 @@ class RouteCollection implements \IteratorAggregate, \Countable * Adds options to all routes. * * An existing option value under the same name in a route will be overridden. - * - * @param array $options An array of options */ public function addOptions(array $options) { diff --git a/src/Symfony/Component/Routing/Router.php b/src/Symfony/Component/Routing/Router.php index 72f5995401..47df4210c3 100644 --- a/src/Symfony/Component/Routing/Router.php +++ b/src/Symfony/Component/Routing/Router.php @@ -97,7 +97,6 @@ class Router implements RouterInterface, RequestMatcherInterface /** * @param mixed $resource The main resource to load - * @param array $options An array of options */ public function __construct(LoaderInterface $loader, $resource, array $options = [], RequestContext $context = null, LoggerInterface $logger = null, string $defaultLocale = null) { @@ -124,8 +123,6 @@ class Router implements RouterInterface, RequestMatcherInterface * * strict_requirements: Configure strict requirement checking for generators * implementing ConfigurableRequirementsInterface (default is true) * - * @param array $options An array of options - * * @throws \InvalidArgumentException When unsupported option is provided */ public function setOptions(array $options) diff --git a/src/Symfony/Component/Workflow/Dumper/DumperInterface.php b/src/Symfony/Component/Workflow/Dumper/DumperInterface.php index ebed0743fc..e1d8c7d682 100644 --- a/src/Symfony/Component/Workflow/Dumper/DumperInterface.php +++ b/src/Symfony/Component/Workflow/Dumper/DumperInterface.php @@ -25,8 +25,6 @@ interface DumperInterface /** * Dumps a workflow definition. * - * @param array $options An array of options - * * @return string The representation of the workflow */ public function dump(Definition $definition, Marking $marking = null, array $options = []); From fab17a448720db8106134be2a6ce6c4177127d76 Mon Sep 17 00:00:00 2001 From: Arman Hosseini <44655055+Arman-Hosseini@users.noreply.github.com> Date: Mon, 29 Jul 2019 21:55:29 +0430 Subject: [PATCH 5/5] Improve some URLs --- ...gisterEventListenersAndSubscribersPass.php | 4 +- .../Bridge/Twig/Extension/CodeExtension.php | 2 +- .../FrameworkExtension.php | 2 +- .../Templating/Helper/CodeHelper.php | 2 +- .../Tests/Controller/ControllerTraitTest.php | 4 +- .../Command/ServerRunCommand.php | 2 +- .../Command/ServerStartCommand.php | 2 +- .../WebServerBundle/Resources/router.php | 2 +- .../Component/Console/Command/Command.php | 2 +- .../Component/Console/Input/ArgvInput.php | 2 +- .../Console/Logger/ConsoleLogger.php | 2 +- .../Debug/Tests/ExceptionHandlerTest.php | 2 +- .../Compiler/PriorityTaggedServiceTrait.php | 4 +- .../Tests/AbstractEventDispatcherTest.php | 2 +- .../Component/Filesystem/Filesystem.php | 4 +- .../Filesystem/Tests/FilesystemTestCase.php | 2 +- .../DateTimeToLocalizedStringTransformer.php | 4 +- .../DateTimeToStringTransformer.php | 2 +- .../Form/Extension/Core/Type/BaseType.php | 2 +- .../Form/Extension/Core/Type/DateType.php | 4 +- .../Component/HttpFoundation/CHANGELOG.md | 2 +- .../File/MimeType/FileinfoMimeTypeGuesser.php | 2 +- .../Component/HttpFoundation/JsonResponse.php | 2 +- .../Component/HttpFoundation/ParameterBag.php | 2 +- .../HttpFoundation/RedirectResponse.php | 2 +- .../Component/HttpFoundation/Request.php | 10 ++--- .../Component/HttpFoundation/Response.php | 6 +-- .../Component/HttpFoundation/ServerBag.php | 2 +- .../Handler/MemcachedSessionHandler.php | 2 +- .../Storage/Handler/MongoDbSessionHandler.php | 2 +- .../Handler/NativeFileSessionHandler.php | 2 +- .../Storage/Handler/NativeSessionHandler.php | 2 +- .../Storage/Handler/PdoSessionHandler.php | 8 ++-- .../Session/Storage/NativeSessionStorage.php | 14 +++--- .../Storage/SessionStorageInterface.php | 2 +- .../EventListener/SaveSessionListener.php | 2 +- .../HttpKernel/Profiler/Profiler.php | 2 +- .../Component/Intl/Collator/Collator.php | 16 +++---- .../Data/Generator/LanguageDataGenerator.php | 2 +- .../Util/ArrayAccessibleResourceBundle.php | 2 +- .../DateFormat/TimezoneTransformer.php | 3 +- .../Intl/DateFormatter/IntlDateFormatter.php | 44 +++++++++---------- src/Symfony/Component/Intl/Locale/Locale.php | 34 +++++++------- .../Intl/NumberFormatter/NumberFormatter.php | 36 +++++++-------- src/Symfony/Component/Intl/README.md | 2 +- .../Component/Process/Pipes/WindowsPipes.php | 10 ++--- src/Symfony/Component/Process/Process.php | 8 ++-- .../Component/Process/ProcessUtils.php | 4 +- .../Component/Process/Tests/ProcessTest.php | 2 +- .../Serializer/Encoder/JsonDecode.php | 2 +- .../Normalizer/DateTimeNormalizer.php | 2 +- .../AbstractComparisonValidator.php | 2 +- .../Validator/Constraints/RangeValidator.php | 2 +- .../Tests/Constraints/IpValidatorTest.php | 2 +- .../Component/VarDumper/Caster/DateCaster.php | 4 +- .../Workflow/Dumper/GraphvizDumper.php | 2 +- 56 files changed, 147 insertions(+), 148 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php index f602d28766..3b7714f44d 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php @@ -120,8 +120,8 @@ class RegisterEventListenersAndSubscribersPass implements CompilerPassInterface * and knowing that the \SplPriorityQueue class does not respect the FIFO method, * we should not use this class. * - * @see https://bugs.php.net/bug.php?id=53710 - * @see https://bugs.php.net/bug.php?id=60926 + * @see https://bugs.php.net/53710 + * @see https://bugs.php.net/60926 * * @param string $tagName * @param ContainerBuilder $container diff --git a/src/Symfony/Bridge/Twig/Extension/CodeExtension.php b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php index 55855427e9..717d4de697 100644 --- a/src/Symfony/Bridge/Twig/Extension/CodeExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php @@ -136,7 +136,7 @@ class CodeExtension extends AbstractExtension { if (is_file($file) && is_readable($file)) { // 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); // remove main code/span tags $code = preg_replace('#^\s*(.*)\s*#s', '\\1', $code); diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 8243ac65fd..32ec7933ca 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -234,7 +234,7 @@ class FrameworkExtension extends Extension if ($this->isConfigEnabled($container, $config['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; diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php index c8914c3a58..a6c3668322 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php @@ -125,7 +125,7 @@ class CodeHelper extends Helper } // 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); // remove main code/span tags $code = preg_replace('#^\s*(.*)\s*#s', '\\1', $code); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTraitTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTraitTest.php index da950ce0c8..34242136b7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTraitTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTraitTest.php @@ -431,10 +431,10 @@ abstract class ControllerTraitTest extends TestCase public function testRedirect() { $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->assertSame('http://dunglas.fr', $response->getTargetUrl()); + $this->assertSame('https://dunglas.fr', $response->getTargetUrl()); $this->assertSame(301, $response->getStatusCode()); } diff --git a/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php b/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php index c5b0973320..7ae1f419cd 100644 --- a/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php +++ b/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php @@ -76,7 +76,7 @@ Specify your own router script via the --router option: %command.full_name% --router=app/config/router.php -See also: http://www.php.net/manual/en/features.commandline.webserver.php +See also: https://php.net/features.commandline.webserver EOF ) ; diff --git a/src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php b/src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php index 22447c66d9..415b372830 100644 --- a/src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php +++ b/src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php @@ -76,7 +76,7 @@ Specify your own router script via the --router option: php %command.full_name% --router=app/config/router.php -See also: http://www.php.net/manual/en/features.commandline.webserver.php +See also: https://php.net/features.commandline.webserver EOF ) ; diff --git a/src/Symfony/Bundle/WebServerBundle/Resources/router.php b/src/Symfony/Bundle/WebServerBundle/Resources/router.php index 30d6b258a2..d93ffef70c 100644 --- a/src/Symfony/Bundle/WebServerBundle/Resources/router.php +++ b/src/Symfony/Bundle/WebServerBundle/Resources/router.php @@ -12,7 +12,7 @@ /* * 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 * and pass it as a value to 'router' option of server:run command. diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index 5f30da7a2a..3a1ba2e5aa 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -278,7 +278,7 @@ class Command $r = new \ReflectionFunction($code); if (null === $r->getClosureThis()) { if (\PHP_VERSION_ID < 70000) { - // Bug in PHP5: https://bugs.php.net/bug.php?id=64761 + // Bug in PHP5: https://bugs.php.net/64761 // This means that we cannot bind static closures and therefore we must // ignore any errors here. There is no way to test if the closure is // bindable. diff --git a/src/Symfony/Component/Console/Input/ArgvInput.php b/src/Symfony/Component/Console/Input/ArgvInput.php index f604057ec0..cc1f6079e4 100644 --- a/src/Symfony/Component/Console/Input/ArgvInput.php +++ b/src/Symfony/Component/Console/Input/ArgvInput.php @@ -148,7 +148,7 @@ class ArgvInput extends Input if (false !== $pos = strpos($name, '=')) { if (0 === \strlen($value = substr($name, $pos + 1))) { // if no value after "=" then substr() returns "" since php7 only, false before - // see http://php.net/manual/fr/migration70.incompatible.php#119151 + // see https://php.net/migration70.incompatible.php#119151 if (\PHP_VERSION_ID < 70000 && false === $value) { $value = ''; } diff --git a/src/Symfony/Component/Console/Logger/ConsoleLogger.php b/src/Symfony/Component/Console/Logger/ConsoleLogger.php index e531bb1ca5..b4821e0955 100644 --- a/src/Symfony/Component/Console/Logger/ConsoleLogger.php +++ b/src/Symfony/Component/Console/Logger/ConsoleLogger.php @@ -22,7 +22,7 @@ use Symfony\Component\Console\Output\OutputInterface; * * @author Kévin Dunglas * - * @see http://www.php-fig.org/psr/psr-3/ + * @see https://www.php-fig.org/psr/psr-3/ */ class ConsoleLogger extends AbstractLogger { diff --git a/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php b/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php index 8a19664950..58abc3d76e 100644 --- a/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php @@ -116,7 +116,7 @@ class ExceptionHandlerTest extends TestCase }); $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()); } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php b/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php index daff3495ac..5b7475b394 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php @@ -28,8 +28,8 @@ trait PriorityTaggedServiceTrait * and knowing that the \SplPriorityQueue class does not respect the FIFO method, * we should not use that class. * - * @see https://bugs.php.net/bug.php?id=53710 - * @see https://bugs.php.net/bug.php?id=60926 + * @see https://bugs.php.net/53710 + * @see https://bugs.php.net/60926 * * @param string $tagName * @param ContainerBuilder $container diff --git a/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php index b157659dc0..359e6005fe 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php @@ -267,7 +267,7 @@ abstract class AbstractEventDispatcherTest extends TestCase } /** - * @see https://bugs.php.net/bug.php?id=62976 + * @see https://bugs.php.net/62976 * * This bug affects: * - The PHP 5.3 branch for versions < 5.3.18 diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index a6e372ebf1..cd4e2b9811 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -52,7 +52,7 @@ class Filesystem } if ($doCopy) { - // https://bugs.php.net/bug.php?id=64634 + // https://bugs.php.net/64634 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); } @@ -280,7 +280,7 @@ class Filesystem if (true !== @rename($origin, $target)) { 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->remove($origin); diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php index eb6b35ddfd..0948bc1857 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php @@ -144,7 +144,7 @@ class FilesystemTestCase extends TestCase $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) { $this->markTestSkipped('symlink does not support relative paths on thread safe Windows PHP versions'); } diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php index 6ca20106fa..9b5e4f4f5a 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php @@ -136,7 +136,7 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer $dateTime = new \DateTime(sprintf('@%s', $timestamp)); } // 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)); } catch (\Exception $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); - // 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) { throw new TransformationFailedException(intl_get_error_message(), intl_get_error_code()); } diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php index 55501298b2..cb4b4db733 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php @@ -57,7 +57,7 @@ class DateTimeToStringTransformer extends BaseDateTimeTransformer $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 // 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. diff --git a/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php b/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php index 32825ab7af..05d215f63c 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php @@ -71,7 +71,7 @@ abstract class BaseType extends AbstractType // Strip leading underscores and digits. These are allowed in // 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'); } diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php index 8ab5e9cc8a..464c262c13 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php @@ -107,13 +107,13 @@ class DateType extends AbstractType \Locale::getDefault(), $dateFormat, $timeFormat, - // see https://bugs.php.net/bug.php?id=66323 + // see https://bugs.php.net/66323 class_exists('IntlTimeZone', false) ? \IntlTimeZone::createDefault() : null, $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 (!$formatter) { throw new InvalidOptionsException(intl_get_error_message(), intl_get_error_code()); } diff --git a/src/Symfony/Component/HttpFoundation/CHANGELOG.md b/src/Symfony/Component/HttpFoundation/CHANGELOG.md index 7bfde80ff1..c0d8901677 100644 --- a/src/Symfony/Component/HttpFoundation/CHANGELOG.md +++ b/src/Symfony/Component/HttpFoundation/CHANGELOG.md @@ -21,7 +21,7 @@ CHANGELOG ----- * 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, * 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 diff --git a/src/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php b/src/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php index bf1ee9f5db..62feda2eef 100644 --- a/src/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php +++ b/src/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php @@ -26,7 +26,7 @@ class FileinfoMimeTypeGuesser implements MimeTypeGuesserInterface /** * @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($magicFile = null) { diff --git a/src/Symfony/Component/HttpFoundation/JsonResponse.php b/src/Symfony/Component/HttpFoundation/JsonResponse.php index a9bdac30f8..b0e7651675 100644 --- a/src/Symfony/Component/HttpFoundation/JsonResponse.php +++ b/src/Symfony/Component/HttpFoundation/JsonResponse.php @@ -100,7 +100,7 @@ class JsonResponse extends Response public function setCallback($callback = null) { 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 // JsonpCallbackValidator is released under the MIT License. See https://github.com/willdurand/JsonpCallbackValidator/blob/v1.1.0/LICENSE for details. // (c) William Durand diff --git a/src/Symfony/Component/HttpFoundation/ParameterBag.php b/src/Symfony/Component/HttpFoundation/ParameterBag.php index f05e4a2154..194ba2c6c5 100644 --- a/src/Symfony/Component/HttpFoundation/ParameterBag.php +++ b/src/Symfony/Component/HttpFoundation/ParameterBag.php @@ -191,7 +191,7 @@ class ParameterBag implements \IteratorAggregate, \Countable * @param int $filter FILTER_* constant * @param mixed $options Filter options * - * @see http://php.net/manual/en/function.filter-var.php + * @see https://php.net/filter-var * * @return mixed */ diff --git a/src/Symfony/Component/HttpFoundation/RedirectResponse.php b/src/Symfony/Component/HttpFoundation/RedirectResponse.php index 51fd869abe..4e3cb4f77b 100644 --- a/src/Symfony/Component/HttpFoundation/RedirectResponse.php +++ b/src/Symfony/Component/HttpFoundation/RedirectResponse.php @@ -30,7 +30,7 @@ class RedirectResponse extends Response * * @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($url, $status = 302, $headers = []) { diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 7185d75e92..2dd250b80c 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -915,7 +915,7 @@ class Request * @return string|null The client IP address * * @see getClientIps() - * @see http://en.wikipedia.org/wiki/X-Forwarded-For + * @see https://wikipedia.org/wiki/X-Forwarded-For */ public function getClientIp() { @@ -1204,7 +1204,7 @@ class Request // 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 // 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] || false !== ($colonPos = strpos($path, ':')) && ($colonPos < ($slashPos = strpos($path, '/')) || false === $slashPos) ? "./$path" : $path; @@ -1823,7 +1823,7 @@ class Request * It works if your JavaScript library sets an X-Requested-With HTTP header. * 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 */ @@ -1835,9 +1835,9 @@ class Request /* * 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() diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index 4ab05066f4..47dae95345 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -121,7 +121,7 @@ class Response * Status codes translation table. * * 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). * * Unless otherwise noted, the status code is defined in RFC2616. @@ -1025,7 +1025,7 @@ class Response * * @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 since version 3.3 */ @@ -1133,7 +1133,7 @@ class Response * * @return bool * - * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html + * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html * * @final since version 3.2 */ diff --git a/src/Symfony/Component/HttpFoundation/ServerBag.php b/src/Symfony/Component/HttpFoundation/ServerBag.php index 90da49fae5..4c82b17748 100644 --- a/src/Symfony/Component/HttpFoundation/ServerBag.php +++ b/src/Symfony/Component/HttpFoundation/ServerBag.php @@ -79,7 +79,7 @@ class ServerBag extends ParameterBag /* * XXX: Since there is no PHP_AUTH_BEARER in PHP predefined variables, * 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; } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php index 1db590b360..8965c089c1 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php @@ -15,7 +15,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; * Memcached based session storage handler based on the Memcached class * provided by the PHP memcached extension. * - * @see http://php.net/memcached + * @see https://php.net/memcached * * @author Drak */ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php index ddedacffbc..1dd7240669 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -56,7 +56,7 @@ class MongoDbSessionHandler extends AbstractSessionHandler * { "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 * no garbage-collection is required. diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php index 04bcbbfe32..8b7615ec10 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php @@ -23,7 +23,7 @@ class NativeFileSessionHandler extends NativeSessionHandler * Default null will leave setting as defined by PHP. * '/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 \RuntimeException When failing to create the save directory diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php index 9be4528aeb..5159b1e359 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php @@ -13,7 +13,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; /** * @deprecated since version 3.4, to be removed in 4.0. Use \SessionHandler instead. - * @see http://php.net/sessionhandler + * @see https://php.net/sessionhandler */ class NativeSessionHandler extends \SessionHandler { diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php index 9369740eb6..9a50377bcb 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -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() * to initialize a correctly defined table. * - * @see http://php.net/sessionhandlerinterface + * @see https://php.net/sessionhandlerinterface * * @author Fabien Potencier * @author Michael Williams @@ -538,7 +538,7 @@ class PdoSessionHandler extends AbstractSessionHandler * PDO::rollback or PDO::inTransaction for SQLite. * * 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. */ private function beginTransaction() @@ -864,7 +864,7 @@ class PdoSessionHandler extends AbstractSessionHandler break; 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 - // 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 = ?) ". "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 = ?;"; @@ -877,7 +877,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)"; break; 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; } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index 809d7002cf..4f1c30ef52 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -54,7 +54,7 @@ class NativeSessionStorage implements SessionStorageInterface * * 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. * * ("auto_start", is not supported as it tells PHP to start a session before @@ -212,7 +212,7 @@ class NativeSessionStorage implements SessionStorageInterface $isRegenerated = session_regenerate_id($destroy); // 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(); return $isRegenerated; @@ -337,7 +337,7 @@ class NativeSessionStorage implements SessionStorageInterface * * @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) { @@ -378,10 +378,10 @@ class NativeSessionStorage implements SessionStorageInterface * constructor, for a template see NativeFileSessionHandler or use handlers in * composer package drak/native-session * - * @see http://php.net/session-set-save-handler - * @see http://php.net/sessionhandlerinterface - * @see http://php.net/sessionhandler - * @see http://github.com/drak/NativeSession + * @see https://php.net/session-set-save-handler + * @see https://php.net/sessionhandlerinterface + * @see https://php.net/sessionhandler + * @see https://github.com/zikula/NativeSession * * @param \SessionHandlerInterface|null $saveHandler * diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php b/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php index 66e8b33dd2..eeb396a2f1 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php @@ -77,7 +77,7 @@ interface SessionStorageInterface * only delete the session data from persistent storage. * * 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 * headers with the new ID. Symfony's HttpKernel offers a listener for this. * See Symfony\Component\HttpKernel\EventListener\SaveSessionListener. diff --git a/src/Symfony/Component/HttpKernel/EventListener/SaveSessionListener.php b/src/Symfony/Component/HttpKernel/EventListener/SaveSessionListener.php index 5901200a70..5f5cd24801 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/SaveSessionListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/SaveSessionListener.php @@ -29,7 +29,7 @@ use Symfony\Component\HttpKernel\KernelEvents; * 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. * * 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 * 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. diff --git a/src/Symfony/Component/HttpKernel/Profiler/Profiler.php b/src/Symfony/Component/HttpKernel/Profiler/Profiler.php index edf6cb8330..db85a9d115 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/Profiler.php +++ b/src/Symfony/Component/HttpKernel/Profiler/Profiler.php @@ -130,7 +130,7 @@ class Profiler * * @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) { diff --git a/src/Symfony/Component/Intl/Collator/Collator.php b/src/Symfony/Component/Intl/Collator/Collator.php index 62b1ddc995..4c57003336 100644 --- a/src/Symfony/Component/Intl/Collator/Collator.php +++ b/src/Symfony/Component/Intl/Collator/Collator.php @@ -130,7 +130,7 @@ class Collator * 0 if $str1 is equal 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 */ @@ -146,7 +146,7 @@ class Collator * * @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 */ @@ -195,7 +195,7 @@ class Collator * * @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 */ @@ -209,7 +209,7 @@ class Collator * * @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 */ @@ -226,7 +226,7 @@ class Collator * * @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 */ @@ -248,7 +248,7 @@ class Collator * * @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 */ @@ -264,7 +264,7 @@ class Collator * * @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 */ @@ -284,7 +284,7 @@ class Collator * * @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 */ diff --git a/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php b/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php index e8695e1931..ceb57360b0 100644 --- a/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php +++ b/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php @@ -27,7 +27,7 @@ use Symfony\Component\Intl\Exception\RuntimeException; 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 = [ 'ak' => 'aka', diff --git a/src/Symfony/Component/Intl/Data/Util/ArrayAccessibleResourceBundle.php b/src/Symfony/Component/Intl/Data/Util/ArrayAccessibleResourceBundle.php index dcc2befde6..d1de8d5b09 100644 --- a/src/Symfony/Component/Intl/Data/Util/ArrayAccessibleResourceBundle.php +++ b/src/Symfony/Component/Intl/Data/Util/ArrayAccessibleResourceBundle.php @@ -16,7 +16,7 @@ use Symfony\Component\Intl\Exception\BadMethodCallException; /** * 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. * * @author Bernhard Schussek diff --git a/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimezoneTransformer.php b/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimezoneTransformer.php index c77fbc160b..0b347c3930 100644 --- a/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimezoneTransformer.php +++ b/src/Symfony/Component/Intl/DateFormatter/DateFormat/TimezoneTransformer.php @@ -92,8 +92,7 @@ class TimezoneTransformer extends Transformer * * @return string A timezone identifier * - * @see http://php.net/manual/en/timezones.others.php - * @see http://www.twinsun.com/tz/tz-link.htm + * @see https://php.net/timezones.others * * @throws NotImplementedException When the GMT time zone have minutes offset different than zero * @throws \InvalidArgumentException When the value can not be matched with pattern diff --git a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php index 0f19310f22..e7fabfeab0 100644 --- a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php +++ b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php @@ -126,7 +126,7 @@ class IntlDateFormatter * supported value is IntlDateFormatter::GREGORIAN (or null using the default calendar, i.e. "GREGORIAN") * @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 * * @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed @@ -162,7 +162,7 @@ class IntlDateFormatter * * @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 * * @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 * - * @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 */ @@ -231,7 +231,7 @@ class IntlDateFormatter * * @return string The formatted value * - * @see http://www.php.net/manual/en/intldateformatter.formatobject.php + * @see https://php.net/intldateformatter.formatobject * * @throws MethodNotImplementedException */ @@ -246,7 +246,7 @@ class IntlDateFormatter * @return int The calendar being used by the formatter. Currently always returns * IntlDateFormatter::GREGORIAN. * - * @see http://www.php.net/manual/en/intldateformatter.getcalendar.php + * @see https://php.net/intldateformatter.getcalendar */ public function getCalendar() { @@ -258,7 +258,7 @@ class IntlDateFormatter * * @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 */ @@ -272,7 +272,7 @@ class IntlDateFormatter * * @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() { @@ -284,7 +284,7 @@ class IntlDateFormatter * * @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() { @@ -296,7 +296,7 @@ class IntlDateFormatter * * @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() { @@ -311,7 +311,7 @@ class IntlDateFormatter * @return string The locale used to create the formatter. Currently always * 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) { @@ -323,7 +323,7 @@ class IntlDateFormatter * * @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() { @@ -335,7 +335,7 @@ class IntlDateFormatter * * @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() { @@ -347,7 +347,7 @@ class IntlDateFormatter * * @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() { @@ -363,7 +363,7 @@ class IntlDateFormatter * * @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 */ @@ -377,7 +377,7 @@ class IntlDateFormatter * * @return bool Currently always returns false * - * @see http://www.php.net/manual/en/intldateformatter.islenient.php + * @see https://php.net/intldateformatter.islenient * * @throws MethodNotImplementedException */ @@ -397,7 +397,7 @@ class IntlDateFormatter * * @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 */ @@ -417,7 +417,7 @@ class IntlDateFormatter * * @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 */ @@ -447,7 +447,7 @@ class IntlDateFormatter * * @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 */ @@ -469,7 +469,7 @@ class IntlDateFormatter * * @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 */ @@ -489,7 +489,7 @@ class IntlDateFormatter * * @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 */ public function setPattern($pattern) @@ -512,7 +512,7 @@ class IntlDateFormatter * * @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) { @@ -556,7 +556,7 @@ class IntlDateFormatter * * @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) { diff --git a/src/Symfony/Component/Intl/Locale/Locale.php b/src/Symfony/Component/Intl/Locale/Locale.php index 2aa9eb7b09..b228a90dae 100644 --- a/src/Symfony/Component/Intl/Locale/Locale.php +++ b/src/Symfony/Component/Intl/Locale/Locale.php @@ -48,7 +48,7 @@ class Locale * * @return string The corresponding locale code * - * @see http://www.php.net/manual/en/locale.acceptfromhttp.php + * @see https://php.net/locale.acceptfromhttp * * @throws MethodNotImplementedException */ @@ -64,7 +64,7 @@ class Locale * * @return string The corresponding locale code * - * @see http://www.php.net/manual/en/locale.composelocale.php + * @see https://php.net/locale.composelocale * * @throws MethodNotImplementedException */ @@ -82,7 +82,7 @@ class Locale * * @return string The corresponding locale code * - * @see http://www.php.net/manual/en/locale.filtermatches.php + * @see https://php.net/locale.filtermatches * * @throws MethodNotImplementedException */ @@ -98,7 +98,7 @@ class Locale * * @return array The locale variants * - * @see http://www.php.net/manual/en/locale.getallvariants.php + * @see https://php.net/locale.getallvariants * * @throws MethodNotImplementedException */ @@ -112,7 +112,7 @@ class Locale * * @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() { @@ -127,7 +127,7 @@ class Locale * * @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 */ @@ -144,7 +144,7 @@ class Locale * * @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 */ @@ -161,7 +161,7 @@ class Locale * * @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 */ @@ -178,7 +178,7 @@ class Locale * * @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 */ @@ -195,7 +195,7 @@ class Locale * * @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 */ @@ -211,7 +211,7 @@ class Locale * * @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 */ @@ -227,7 +227,7 @@ class Locale * * @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 */ @@ -243,7 +243,7 @@ class Locale * * @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 */ @@ -259,7 +259,7 @@ class Locale * * @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 */ @@ -276,7 +276,7 @@ class Locale * @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 * - * @see http://www.php.net/manual/en/locale.lookup.php + * @see https://php.net/locale.lookup * * @throws MethodNotImplementedException */ @@ -292,7 +292,7 @@ class Locale * * @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 */ @@ -308,7 +308,7 @@ class Locale * * @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 */ diff --git a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php index 9ba821eac8..e57d0f3240 100644 --- a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php +++ b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php @@ -198,7 +198,7 @@ class NumberFormatter * The mapping between NumberFormatter rounding modes to the available * modes in PHP's round() function. * - * @see http://www.php.net/manual/en/function.round.php + * @see https://php.net/round */ private static $phpRoundingMap = [ self::ROUND_HALFDOWN => \PHP_ROUND_HALF_DOWN, @@ -249,7 +249,7 @@ class NumberFormatter * NumberFormat::PATTERN_RULEBASED. It must conform to the syntax * 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/classRuleBasedNumberFormat.html#_details * @@ -288,7 +288,7 @@ class NumberFormatter * * @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/classRuleBasedNumberFormat.html#_details * @@ -309,7 +309,7 @@ class NumberFormatter * * @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 */ public function formatCurrency($value, $currency) @@ -346,7 +346,7 @@ class NumberFormatter * * @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 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 * - * @see http://www.php.net/manual/en/numberformatter.getattribute.php + * @see https://php.net/numberformatter.getattribute */ public function getAttribute($attr) { @@ -399,7 +399,7 @@ class NumberFormatter * * @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() { @@ -411,7 +411,7 @@ class NumberFormatter * * @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() { @@ -428,7 +428,7 @@ class NumberFormatter * @return string The locale used to create the formatter. Currently always * 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) { @@ -440,7 +440,7 @@ class NumberFormatter * * @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 */ @@ -456,7 +456,7 @@ class NumberFormatter * * @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) { @@ -470,7 +470,7 @@ class NumberFormatter * * @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) { @@ -486,7 +486,7 @@ class NumberFormatter * * @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 */ @@ -504,7 +504,7 @@ class NumberFormatter * * @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) { @@ -558,7 +558,7 @@ class NumberFormatter * * @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 $value is not supported @@ -608,7 +608,7 @@ class NumberFormatter * * @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 * * @throws MethodNotImplementedException @@ -626,7 +626,7 @@ class NumberFormatter * * @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 */ @@ -643,7 +643,7 @@ class NumberFormatter * * @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 */ diff --git a/src/Symfony/Component/Intl/README.md b/src/Symfony/Component/Intl/README.md index 9a9cb9b456..03b50c91a0 100644 --- a/src/Symfony/Component/Intl/README.md +++ b/src/Symfony/Component/Intl/README.md @@ -18,4 +18,4 @@ Resources * [Docker images with intl support](https://hub.docker.com/r/jakzal/php-intl) (for the Intl component development) -[0]: http://www.php.net/manual/en/intl.setup.php +[0]: https://php.net/intl.setup diff --git a/src/Symfony/Component/Process/Pipes/WindowsPipes.php b/src/Symfony/Component/Process/Pipes/WindowsPipes.php index 1619e632f1..e8e6f139e5 100644 --- a/src/Symfony/Component/Process/Pipes/WindowsPipes.php +++ b/src/Symfony/Component/Process/Pipes/WindowsPipes.php @@ -17,8 +17,8 @@ use Symfony\Component\Process\Process; /** * WindowsPipes implementation uses temporary files as handles. * - * @see https://bugs.php.net/bug.php?id=51800 - * @see https://bugs.php.net/bug.php?id=65650 + * @see https://bugs.php.net/51800 + * @see https://bugs.php.net/65650 * * @author Romain Neutron * @@ -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. // 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 = [ Process::STDOUT => Process::OUT, 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 file handles as it can produce corrupted output https://bugs.php.net/bug.php?id=65650 + // 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/65650 // So we redirect output within the commandline and pass the nul device to the process return [ ['pipe', 'r'], diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 68cc6c65ae..d592be27cf 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -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 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/bug.php?id=50524 + // @see : https://bugs.php.net/51800 + // @see : https://bugs.php.net/50524 if (null === $this->cwd && (\defined('ZEND_THREAD_SAFE') || '\\' === \DIRECTORY_SEPARATOR)) { $this->cwd = getcwd(); } @@ -451,7 +451,7 @@ class Process implements \IteratorAggregate /** * 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 * @@ -1578,7 +1578,7 @@ class Process implements \IteratorAggregate /** * 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 * * @return bool True if the signal was sent successfully, false otherwise diff --git a/src/Symfony/Component/Process/ProcessUtils.php b/src/Symfony/Component/Process/ProcessUtils.php index c06aa247aa..00acde0a19 100644 --- a/src/Symfony/Component/Process/ProcessUtils.php +++ b/src/Symfony/Component/Process/ProcessUtils.php @@ -44,8 +44,8 @@ class ProcessUtils //Fix for PHP bug #43784 escapeshellarg removes % from given string //Fix for PHP bug #49446 escapeshellarg doesn't work on Windows - //@see https://bugs.php.net/bug.php?id=43784 - //@see https://bugs.php.net/bug.php?id=49446 + //@see https://bugs.php.net/43784 + //@see https://bugs.php.net/49446 if ('\\' === \DIRECTORY_SEPARATOR) { if ('' === $argument) { return escapeshellarg($argument); diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php index 18fef4ff5f..ab6f0b0063 100644 --- a/src/Symfony/Component/Process/Tests/ProcessTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -1178,7 +1178,7 @@ class ProcessTest extends TestCase ]; 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]; } else { $sizes = [1, 16, 64, 1024, 4096]; diff --git a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php index a55f1232e7..e4f6795a6a 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -62,7 +62,7 @@ class JsonDecode implements DecoderInterface * * @throws NotEncodableValueException * - * @see http://php.net/json_decode json_decode + * @see https://php.net/json_decode */ public function decode($data, $format, array $context = []) { diff --git a/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php index a36549c3b2..86c3b8d029 100644 --- a/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php @@ -90,7 +90,7 @@ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface if (null !== $dateTimeFormat) { if (null === $timezone && \PHP_VERSION_ID < 70000) { - // https://bugs.php.net/bug.php?id=68669 + // https://bugs.php.net/68669 $object = \DateTime::class === $class ? \DateTime::createFromFormat($dateTimeFormat, $data) : \DateTimeImmutable::createFromFormat($dateTimeFormat, $data); } else { $object = \DateTime::class === $class ? \DateTime::createFromFormat($dateTimeFormat, $data, $timezone) : \DateTimeImmutable::createFromFormat($dateTimeFormat, $data, $timezone); diff --git a/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php b/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php index 3c95c097e8..e5c3fd5ea6 100644 --- a/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php +++ b/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php @@ -64,7 +64,7 @@ abstract class AbstractComparisonValidator extends ConstraintValidator // Convert strings to DateTimes if comparing another DateTime // This allows to compare with any date/time value supported by // the DateTime constructor: - // http://php.net/manual/en/datetime.formats.php + // https://php.net/datetime.formats if (\is_string($comparedValue)) { if ($value instanceof \DateTimeImmutable) { // If $value is immutable, convert the compared value to a diff --git a/src/Symfony/Component/Validator/Constraints/RangeValidator.php b/src/Symfony/Component/Validator/Constraints/RangeValidator.php index e0cb92a93e..c7cb859a5a 100644 --- a/src/Symfony/Component/Validator/Constraints/RangeValidator.php +++ b/src/Symfony/Component/Validator/Constraints/RangeValidator.php @@ -48,7 +48,7 @@ class RangeValidator extends ConstraintValidator // Convert strings to DateTimes if comparing another DateTime // This allows to compare with any date/time value supported by // the DateTime constructor: - // http://php.net/manual/en/datetime.formats.php + // https://php.net/datetime.formats if ($value instanceof \DateTimeInterface) { if (\is_string($min)) { $min = new \DateTime($min); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php index 1ee44e7c51..7e5a97ce3c 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php @@ -330,7 +330,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase { // Quoting after official filter documentation: // "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(); } diff --git a/src/Symfony/Component/VarDumper/Caster/DateCaster.php b/src/Symfony/Component/VarDumper/Caster/DateCaster.php index 40289a930b..f3258b19a6 100644 --- a/src/Symfony/Component/VarDumper/Caster/DateCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/DateCaster.php @@ -85,12 +85,12 @@ class DateCaster public static function castPeriod(\DatePeriod $p, array $a, Stub $stub, $isNested, $filter) { - if (\defined('HHVM_VERSION_ID') || \PHP_VERSION_ID < 50620 || (\PHP_VERSION_ID >= 70000 && \PHP_VERSION_ID < 70005)) { // see https://bugs.php.net/bug.php?id=71635 + if (\defined('HHVM_VERSION_ID') || \PHP_VERSION_ID < 50620 || (\PHP_VERSION_ID >= 70000 && \PHP_VERSION_ID < 70005)) { // see https://bugs.php.net/71635 return $a; } $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) { if (3 === $i) { $now = new \DateTimeImmutable(); diff --git a/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php b/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php index 6f98350aa3..c3d673fa91 100644 --- a/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php +++ b/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php @@ -17,7 +17,7 @@ use Symfony\Component\Workflow\Marking; /** * 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 *