diff --git a/.php_cs.dist b/.php_cs.dist index 6b68ef5b59da8..2731440d1933b 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -8,8 +8,13 @@ return PhpCsFixer\Config::create() ->setRules(array( '@Symfony' => true, '@Symfony:risky' => true, + '@PHPUnit48Migration:risky' => true, + 'php_unit_no_expectation_annotation' => false, // part of `PHPUnitXYMigration:risky` ruleset, to be enabled when PHPUnit 4.x support will be dropped, as we don't want to rewrite exceptions handling twice 'array_syntax' => array('syntax' => 'long'), 'protected_to_private' => false, + // rule disabled due to https://bugs.php.net/bug.php?id=60573 bug; + // to be re-enabled (by dropping next line, rule is part of @Symfony already) on branch that requires PHP 5.4+ + 'self_accessor' => false, )) ->setRiskyAllowed(true) ->setFinder( @@ -30,14 +35,13 @@ return PhpCsFixer\Config::create() )) // file content autogenerated by `var_export` ->notPath('Symfony/Component/Translation/Tests/fixtures/resources.php') - // autogenerated xmls - ->notPath('Symfony/Component/Console/Tests/Fixtures/application_1.xml') - ->notPath('Symfony/Component/Console/Tests/Fixtures/application_2.xml') - // yml - ->notPath('Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml') // test template ->notPath('Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php') // explicit heredoc test ->notPath('Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php') + // explicit trigger_error tests + ->notPath('Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt') + ->notPath('Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt') + ->notPath('Symfony/Component/Debug/Tests/DebugClassLoaderTest.php') ) ; diff --git a/CHANGELOG-2.7.md b/CHANGELOG-2.7.md index 7ac65a77371f6..916ce96ddb47b 100644 --- a/CHANGELOG-2.7.md +++ b/CHANGELOG-2.7.md @@ -7,6 +7,20 @@ in 2.7 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.7.0...v2.7.1 +* 2.7.39 (2017-12-04) + + * bug #25278 Fix for missing whitespace control modifier in form layout (kubawerlos) + * bug #25236 [Form][TwigBridge] Fix collision between view properties and form fields (yceruto) + * bug #25258 [link] Prevent warnings when running link with 2.7 (dunglas) + * bug #24750 [Validator] ExpressionValidator should use OBJECT_TO_STRING (Simperfit) + * bug #25182 [HttpFoundation] AutExpireFlashBag should not clear new flashes (Simperfit, sroze) + * bug #25152 [Form] Don't rely on `Symfony\Component\HttpFoundation\File\File` if http-foundation isn't in FileType (issei-m) + * bug #24987 [Console] Fix global console flag when used in chain (Simperfit) + * bug #25043 [Yaml] added ability for substitute aliases when mapping is on single line (Michał Strzelecki, xabbuh) + * bug #25102 [Form] Fixed ContextErrorException in FileType (chihiro-adachi) + * bug #25130 [DI] Fix handling of inlined definitions by ContainerBuilder (nicolas-grekas) + * bug #24956 Fix ambiguous pattern (weltling) + * 2.7.38 (2017-11-16) * security #24995 Validate redirect targets using the session cookie domain (nicolas-grekas) diff --git a/CHANGELOG-2.8.md b/CHANGELOG-2.8.md index 2e8fc7e47079d..ac8f7b3768625 100644 --- a/CHANGELOG-2.8.md +++ b/CHANGELOG-2.8.md @@ -7,6 +7,26 @@ in 2.8 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.8.0...v2.8.1 +* 2.8.33 (2018-01-05) + + * bug #25532 [HttpKernel] Disable CSP header on exception pages (ostrolucky) + * bug #25491 [Routing] Use the default host even if context is empty (sroze) + * bug #25662 Dumper shouldn't use html format for phpdbg / cli-server (jhoff) + * bug #25529 [Validator] Fix access to root object when using composite constraint (ostrolucky) + * bug #25430 Fixes for Oracle in PdoSessionHandler (elislenio) + * bug #25599 Add application/ld+json format associated to json (vincentchalamon) + * bug #25407 [Console] Commands with an alias should not be recognized as ambiguous (Simperfit) + * bug #25521 [Console] fix a bug when you are passing a default value and passing -n would output the index (Simperfit) + * bug #25489 [FrameworkBundle] remove esi/ssi renderers if inactive (dmaicher) + * bug #25427 Preserve percent-encoding in URLs when performing redirects in the UrlMatcher (mpdude) + * bug #25480 [FrameworkBundle] add missing validation options to XSD file (xabbuh) + * bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit) + * bug #25233 [TwigBridge][Form] Fix hidden currency element with Bootstrap 3 theme (julienfalque) + * bug #25408 [Debug] Fix catching fatal errors in case of nested error handlers (nicolas-grekas) + * bug #25330 [HttpFoundation] Support 0 bit netmask in IPv6 (`::/0`) (stephank) + * bug #25410 [HttpKernel] Fix logging of post-terminate errors/exceptions (nicolas-grekas) + * bug #25323 [ExpressionLanguage] throw an SyntaxError instead of an undefined index notice (Simperfit) + * 2.8.32 (2017-12-04) * bug #25278 Fix for missing whitespace control modifier in form layout (kubawerlos) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 0f3e9c22adf2d..30d8ae3f828ed 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -14,8 +14,8 @@ Symfony is the result of the work of many people who made the code better - Victor Berchet (victor) - Johannes S (johannes) - Jakub Zalas (jakubzalas) - - Kris Wallsmith (kriswallsmith) - Kévin Dunglas (dunglas) + - Kris Wallsmith (kriswallsmith) - Ryan Weaver (weaverryan) - Javier Eguiluz (javier.eguiluz) - Maxime Steinhausser (ogizanagi) @@ -29,8 +29,8 @@ Symfony is the result of the work of many people who made the code better - Joseph Bielawski (stloyd) - Karma Dordrak (drak) - Lukas Kahwe Smith (lsmith) - - Martin Hasoň (hason) - Roland Franssen (ro0) + - Martin Hasoň (hason) - Jeremy Mikola (jmikola) - Jean-François Simon (jfsimon) - Benjamin Eberlei (beberlei) @@ -52,24 +52,24 @@ Symfony is the result of the work of many people who made the code better - Peter Rehm (rpet) - Saša Stamenković (umpirsky) - Henrik Bjørnskov (henrikbjorn) + - Yonel Ceruto (yonelceruto) - Miha Vrhovnik - Matthias Pigulla (mpdude) - Diego Saint Esteben (dii3g0) - Konstantin Kudryashov (everzet) - Bilal Amarni (bamarni) - - Yonel Ceruto (yonelceruto) - - Dany Maillard (maidmaid) - Kevin Bond (kbond) + - Dany Maillard (maidmaid) + - Pierre du Plessis (pierredup) - Florin Patan (florinpatan) - Jérémy DERUSSÉ (jderusse) - - Pierre du Plessis (pierredup) - Gábor Egyed (1ed) - Michel Weimerskirch (mweimerskirch) - Andrej Hudec (pulzarraider) + - Alexander M. Turek (derrabus) - Eric Clemmons (ericclemmons) - Jáchym Toušek (enumag) - Charles Sarrazin (csarrazi) - - Alexander M. Turek (derrabus) - Konstantin Myakshin (koc) - Christian Raue - Arnout Boks (aboks) @@ -79,6 +79,7 @@ Symfony is the result of the work of many people who made the code better - Titouan Galopin (tgalopin) - Douglas Greenshields (shieldo) - Tobias Nyholm (tobias) + - Issei Murasawa (issei_m) - Lee McDermott - Brandon Turner - Luis Cordova (cordoval) @@ -91,13 +92,14 @@ Symfony is the result of the work of many people who made the code better - John Wards (johnwards) - Dariusz Ruminski - Fran Moreno (franmomu) - - Issei Murasawa (issei_m) - Antoine Hérault (herzult) - Paráda József (paradajozsef) - Arnaud Le Blanc (arnaud-lb) - Maxime STEINHAUSSER - Michal Piotrowski (eventhorizon) + - Samuel ROZE (sroze) - Tim Nagel (merk) + - Amrouche Hamza (simperfit) - Brice BERNARD (brikou) - Baptiste Clavié (talus) - Vladimir Reznichenko (kalessil) @@ -126,6 +128,7 @@ Symfony is the result of the work of many people who made the code better - Sebastiaan Stok (sstok) - Stefano Sala (stefano.sala) - Evgeniy (ewgraf) + - Grégoire Paris (greg0ire) - Vincent AUBERT (vincent) - Juti Noppornpitak (shiroyuki) - Tigran Azatyan (tigranazatyan) @@ -135,7 +138,6 @@ Symfony is the result of the work of many people who made the code better - Guilherme Blanco (guilhermeblanco) - Pablo Godel (pgodel) - Jérémie Augustin (jaugustin) - - Grégoire Paris (greg0ire) - Andréia Bohner (andreia) - Rafael Dohms (rdohms) - Arnaud Kleinpeter (nanocom) @@ -149,6 +151,7 @@ Symfony is the result of the work of many people who made the code better - Vyacheslav Pavlov - Richard van Laak (rvanlaak) - Javier Spagnoletti (phansys) + - Julien Falque (julienfalque) - Richard Shank (iampersistent) - Thomas Rabaix (rande) - Rouven Weßling (realityking) @@ -160,7 +163,6 @@ Symfony is the result of the work of many people who made the code better - Matthieu Ouellette-Vachon (maoueh) - Michał Pipa (michal.pipa) - Dawid Nowak - - Julien Falque (julienfalque) - Amal Raghav (kertz) - Jonathan Ingram (jonathaningram) - Artur Kotyrba @@ -171,8 +173,6 @@ Symfony is the result of the work of many people who made the code better - Warnar Boekkooi (boekkooi) - Dmitrii Chekaliuk (lazyhammer) - Clément JOBEILI (dator) - - Amrouche Hamza - - Samuel ROZE (sroze) - Daniel Espendiller - Possum - Dorian Villet (gnutix) @@ -190,6 +190,7 @@ Symfony is the result of the work of many people who made the code better - Stepan Anchugov (kix) - bronze1man - sun (sun) + - Valentin Udaltsov (vudaltsov) - Larry Garfield (crell) - Martin Schuhfuß (usefulthink) - apetitpa @@ -248,7 +249,6 @@ Symfony is the result of the work of many people who made the code better - Pierre-Yves LEBECQ (pylebecq) - Jordan Samouh (jordansamouh) - Jakub Kucharovic (jkucharovic) - - Valentin Udaltsov (vudaltsov) - Uwe Jäger (uwej711) - Eugene Leonovich (rybakit) - Filippo Tessarotto @@ -261,6 +261,7 @@ Symfony is the result of the work of many people who made the code better - Nikolay Labinskiy (e-moe) - Leo Feyer - Chekote + - gadelat (gadelat) - Thomas Adam - Albert Casademont (acasademont) - Jhonny Lidfors (jhonne) @@ -299,8 +300,8 @@ Symfony is the result of the work of many people who made the code better - Thomas Tourlourat (armetiz) - Andrey Esaulov (andremaha) - Grégoire Passault (gregwar) + - Jerzy Zawadzki (jzawadzki) - Ismael Ambrosi (iambrosi) - - gadelat (gadelat) - Baptiste Lafontaine - Aurelijus Valeiša (aurelijus) - Victor Bocharsky (bocharsky_bw) @@ -345,6 +346,7 @@ Symfony is the result of the work of many people who made the code better - Yaroslav Kiliba - Terje Bråten - Robbert Klarenbeek (robbertkl) + - Edi Modrić (emodric) - Thomas Calvet (fancyweb) - Niels Keurentjes (curry684) - JhonnyL @@ -364,7 +366,6 @@ Symfony is the result of the work of many people who made the code better - Loïc Chardonnet (gnusat) - Marek Kalnik (marekkalnik) - Vyacheslav Salakhutdinov (megazoll) - - Jerzy Zawadzki (jzawadzki) - Hassan Amouhzi - Tamas Szijarto - Pavel Volokitin (pvolok) @@ -375,6 +376,7 @@ Symfony is the result of the work of many people who made the code better - Tobias Naumann (tna) - Daniel Beyer - Shein Alexey + - Alex Rock Ancelet (pierstoval) - Romain Gautier (mykiwi) - Joe Lencioni - Daniel Tschinder @@ -434,7 +436,6 @@ Symfony is the result of the work of many people who made the code better - cedric lombardot (cedriclombardot) - Jonas Flodén (flojon) - Thomas Perez (scullwm) - - Edi Modrić (emodric) - Marcin Sikoń (marphi) - Dominik Zogg (dominik.zogg) - Marek Pietrzak @@ -446,6 +447,7 @@ Symfony is the result of the work of many people who made the code better - Rob Bast - Zander Baldwin - Adam Harvey + - Anton Bakai - Maxime Veber (nek-) - Alex Bakhturin - Yanick Witschi (toflar) @@ -495,7 +497,6 @@ Symfony is the result of the work of many people who made the code better - Arjen van der Meijden - Michele Locati - Dariusz Ruminski - - Alex Rock Ancelet (pierstoval) - Erik Trapman (eriktrapman) - De Cock Xavier (xdecock) - Almog Baku (almogbaku) @@ -619,7 +620,6 @@ Symfony is the result of the work of many people who made the code better - Catalin Dan - Stephan Vock - Benjamin Zikarsky (bzikarsky) - - Anton Bakai - Simon Schick (simonsimcity) - redstar504 - Tristan Roussel @@ -711,8 +711,10 @@ Symfony is the result of the work of many people who made the code better - Nikita Nefedov (nikita2206) - cgonzalez - Ben + - Mathieu Lechat - Vincent Composieux (eko) - Jayson Xu (superjavason) + - Christopher Hertel (chertel) - Hubert Lenoir (hubert_lenoir) - Jaik Dean (jaikdean) - fago @@ -733,6 +735,7 @@ Symfony is the result of the work of many people who made the code better - Pierre Vanliefland (pvanliefland) - Sofiane HADDAG (sofhad) - frost-nzcr4 + - Bozhidar Hristov - Abhoryo - Fabian Vogler (fabian) - Korvin Szanto @@ -763,6 +766,7 @@ Symfony is the result of the work of many people who made the code better - Fabien LUCAS (flucas2) - Jörn Lang (j.lang) - Omar Yepez (oyepez003) + - Gawain Lynch (gawain) - mwsaz - Jelle Kapitein - Benoît Bourgeois @@ -925,6 +929,7 @@ Symfony is the result of the work of many people who made the code better - Christian - Denis Golubovskiy (bukashk0zzz) - Sergii Smertin (nfx) + - Michał Strzelecki - hugofonseca (fonsecas72) - Martynas Narbutas - Bailey Parker @@ -1002,6 +1007,7 @@ Symfony is the result of the work of many people who made the code better - Brooks Boyd - Roger Webb - Dmitriy Simushev + - pkowalczyk - Max Voloshin (maxvoloshin) - Nicolas Fabre (nfabre) - Raul Rodriguez (raul782) @@ -1127,6 +1133,7 @@ Symfony is the result of the work of many people who made the code better - Max Summe - WedgeSama - Felds Liscia + - Chihiro Adachi (chihiro-adachi) - Sullivan SENECHAL - Tadcka - Beth Binkovitz @@ -1283,6 +1290,7 @@ Symfony is the result of the work of many people who made the code better - nuncanada - flack - František Bereň + - Jeremiah VALERIE - Mike Francis - Christoph Nissle (derstoffel) - Ionel Scutelnicu (ionelscutelnicu) @@ -1305,6 +1313,7 @@ Symfony is the result of the work of many people who made the code better - Andrew Zhilin (zhil) - Oleksii Zhurbytskyi - Andy Stanberry + - Felix Marezki - Luiz “Felds” Liscia - Thomas Rothe - nietonfir @@ -1352,7 +1361,6 @@ Symfony is the result of the work of many people who made the code better - Nicole Cordes - Martin Kirilov - Bram Van der Sype (brammm) - - Christopher Hertel (chertel) - Guile (guile) - Julien Moulin (lizjulien) - Mauro Foti (skler) @@ -1386,7 +1394,6 @@ Symfony is the result of the work of many people who made the code better - Bertalan Attila - Yannick Bensacq (cibou) - Freek Van der Herten (freekmurze) - - Gawain Lynch (gawain) - Luca Genuzio (genuzio) - Hans Nilsson (hansnilsson) - Andrew Marcinkevičius (ifdattic) @@ -1444,6 +1451,7 @@ Symfony is the result of the work of many people who made the code better - David Windell - Gabriel Birke - skafandri + - Derek Bonner - Alan Chen - Maerlyn - Even André Fiskvik @@ -1487,6 +1495,7 @@ Symfony is the result of the work of many people who made the code better - Ian Jenkins (jenkoian) - Jorge Martin (jorgemartind) - Joeri Verdeyen (jverdeyen) + - Dmitrii Poddubnyi (karser) - Kevin Verschaeve (keversc) - Kevin Herrera (kherge) - Luis Ramón López López (lrlopez) @@ -1500,6 +1509,7 @@ Symfony is the result of the work of many people who made the code better - Jimmy Leger (redpanda) - Marcin Szepczynski (szepczynski) - Cyrille Jouineau (tuxosaurus) + - Vladimir Chernyshev (volch) - Yorkie Chadwick (yorkie76) - GuillaumeVerdon - Ondrej Mirtes @@ -1582,9 +1592,11 @@ Symfony is the result of the work of many people who made the code better - Michael Schneider - Cédric Bertolini - n-aleha + - Anatol Belski - Şəhriyar İmanov - Kaipi Yann - Sam Williams + - Guillaume Aveline - Adrian Philipp - James Michael DuPont - Kasperki @@ -1744,6 +1756,7 @@ Symfony is the result of the work of many people who made the code better - Schuyler Jager (sjager) - Pascal Luna (skalpa) - Volker (skydiablo) + - Serkan Yildiz (srknyldz) - Julien Sanchez (sumbobyboys) - Guillermo Gisinger (t3chn0r) - Markus Tacker (tacker) diff --git a/LICENSE b/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/UPGRADE-2.2.md b/UPGRADE-2.2.md index ff3dc0a1860e0..b548fa4d79f40 100644 --- a/UPGRADE-2.2.md +++ b/UPGRADE-2.2.md @@ -26,7 +26,6 @@ * The `standalone` option is deprecated and will be replaced with the `strategy` option in 2.3. * The values `true`, `false`, `js` for the `standalone` option were deprecated and replaced respectively with the `esi`, `inline`, `hinclude` in 2.3. - Before: ```jinja @@ -43,7 +42,6 @@ {{ render(controller('BlogBundle:Post:list', { 'limit': 2 }), { 'strategy': 'hinclude'}) }} ``` - ### HttpFoundation * The MongoDbSessionHandler default field names and timestamp type have changed. diff --git a/UPGRADE-2.5.md b/UPGRADE-2.5.md index fc5ad61fadf7c..bbfd15cde9959 100644 --- a/UPGRADE-2.5.md +++ b/UPGRADE-2.5.md @@ -245,7 +245,6 @@ Validator ->getValidator(); ``` - Yaml Component -------------- diff --git a/UPGRADE-2.7.md b/UPGRADE-2.7.md index 533068b970b5e..0121a39e2057e 100644 --- a/UPGRADE-2.7.md +++ b/UPGRADE-2.7.md @@ -32,10 +32,10 @@ Router * The `getMatcherDumperInstance()` and `getGeneratorDumperInstance()` methods in the `Symfony\Component\Routing\Router` have been changed from `protected` to `public`. - If you override these methods in a subclass, you will need to change your + If you override these methods in a subclass, you will need to change your methods to `public` as well. Note however that this is a temporary change needed for PHP 5.3 compatibility only. It will be reverted in Symfony 3.0. - + Form ---- @@ -530,9 +530,9 @@ PropertyAccess Config ------ - * The `__toString()` method of the `\Symfony\Component\Config\ConfigCache` is marked as + * The `__toString()` method of the `\Symfony\Component\Config\ConfigCache` is marked as deprecated in favor of the new `getPath()` method. - + Validator --------- @@ -601,7 +601,7 @@ FrameworkBundle * The `templating.helper.assets` service was refactored and now returns an object of type `Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper` instead of `Symfony\Component\Templating\Helper\CoreAssetsHelper`. You can update your class definition - or use the `assets.packages` service instead. Using the `assets.packages` service is the recommended + or use the `assets.packages` service instead. Using the `assets.packages` service is the recommended way. Before: @@ -676,48 +676,48 @@ Form * In order to fix a few regressions in the new `ChoiceList` implementation, a few details had to be changed compared to 2.7. - - The legacy `Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface` + + The legacy `Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface` now does not extend the new `Symfony\Component\Form\ChoiceList\ChoiceListInterface` anymore. If you pass an implementation of the old interface in a context where the new interface is required, wrap the list into a `LegacyChoiceListAdapter`: - + Before: - + ```php use Symfony\Component\Form\ChoiceList\ChoiceListInterface; - + function doSomething(ChoiceListInterface $choiceList) { // ... } - + doSomething($legacyList); ``` - + After: - + ```php use Symfony\Component\Form\ChoiceList\ChoiceListInterface; use Symfony\Component\Form\ChoiceList\LegacyChoiceListAdapter; - + function doSomething(ChoiceListInterface $choiceList) { // ... } - + doSomething(new LegacyChoiceListAdapter($legacyList)); ``` - + The new `ChoiceListInterface` now has two additional methods `getStructuredValues()` and `getOriginalKeys()`. You should add these methods if you implement this interface. See their doc blocks and the implementation of the core choice lists for inspiration. - + The method `ArrayKeyChoiceList::toArrayKey()` was marked as internal. This method was never supposed to be used outside the class. - + The method `ChoiceListFactoryInterface::createView()` does not accept arrays and `Traversable` instances anymore for the `$groupBy` parameter. Pass a callable instead. diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php index 082206f60b889..2c226f50a0ad5 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php @@ -11,7 +11,7 @@ namespace Symfony\Bridge\Doctrine\Form\ChoiceList; -@trigger_error('The '.__NAMESPACE__.'\EntityChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\EntityChoiceList class is deprecated since Symfony 2.7 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader instead.', E_USER_DEPRECATED); use Doctrine\Common\Persistence\Mapping\ClassMetadata; use Doctrine\Common\Persistence\ObjectManager; @@ -312,7 +312,7 @@ public function getValuesForChoices(array $entities) */ public function getIndicesForChoices(array $entities) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); // Performance optimization if (empty($entities)) { @@ -355,7 +355,7 @@ public function getIndicesForChoices(array $entities) */ public function getIndicesForValues(array $values) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); // Performance optimization if (empty($values)) { diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php index 8d73c32d9e04b..c9a02fb38d764 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php @@ -57,14 +57,14 @@ public function __construct($queryBuilder, $manager = null, $class = null) } if ($queryBuilder instanceof \Closure) { - @trigger_error('Passing a QueryBuilder closure to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('Passing a QueryBuilder closure to '.__CLASS__.'::__construct() is deprecated since Symfony 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); if (!$manager instanceof ObjectManager) { throw new UnexpectedTypeException($manager, 'Doctrine\Common\Persistence\ObjectManager'); } - @trigger_error('Passing an EntityManager to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); - @trigger_error('Passing a class to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('Passing an EntityManager to '.__CLASS__.'::__construct() is deprecated since Symfony 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('Passing a class to '.__CLASS__.'::__construct() is deprecated since Symfony 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); $queryBuilder = $queryBuilder($manager->getRepository($class)); diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php index b6a7c7201b570..2acf7176f1eac 100644 --- a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php +++ b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php @@ -250,7 +250,7 @@ public function configureOptions(OptionsResolver $resolver) // deprecation note $propertyNormalizer = function (Options $options, $propertyName) { if ($propertyName) { - @trigger_error('The "property" option is deprecated since version 2.7 and will be removed in 3.0. Use "choice_label" instead.', E_USER_DEPRECATED); + @trigger_error('The "property" option is deprecated since Symfony 2.7 and will be removed in 3.0. Use "choice_label" instead.', E_USER_DEPRECATED); } return $propertyName; @@ -269,7 +269,7 @@ public function configureOptions(OptionsResolver $resolver) // deprecation note $loaderNormalizer = function (Options $options, $loader) { if ($loader) { - @trigger_error('The "loader" option is deprecated since version 2.7 and will be removed in 3.0. Override getLoader() instead.', E_USER_DEPRECATED); + @trigger_error('The "loader" option is deprecated since Symfony 2.7 and will be removed in 3.0. Override getLoader() instead.', E_USER_DEPRECATED); } return $loader; diff --git a/src/Symfony/Bridge/Doctrine/LICENSE b/src/Symfony/Bridge/Doctrine/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Bridge/Doctrine/LICENSE +++ b/src/Symfony/Bridge/Doctrine/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php b/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php index f67b4c9c3c8ac..7356ff2998cfa 100644 --- a/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php +++ b/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php @@ -55,7 +55,7 @@ public function loadUserByUsername($username) throw new \InvalidArgumentException(sprintf('You must either make the "%s" entity Doctrine Repository ("%s") implement "Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface" or set the "property" option in the corresponding entity provider configuration.', $this->classOrAlias, get_class($repository))); } - @trigger_error('Implementing Symfony\Component\Security\Core\User\UserProviderInterface in a Doctrine repository when using the entity provider is deprecated since version 2.8 and will not be supported in 3.0. Make the repository implement Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface instead.', E_USER_DEPRECATED); + @trigger_error('Implementing Symfony\Component\Security\Core\User\UserProviderInterface in a Doctrine repository when using the entity provider is deprecated since Symfony 2.8 and will not be supported in 3.0. Make the repository implement Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface instead.', E_USER_DEPRECATED); } $user = $repository->loadUserByUsername($username); diff --git a/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php b/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php index 567b5a240c300..04721d5de1b9b 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php @@ -11,7 +11,7 @@ namespace Symfony\Bridge\Doctrine\Tests; -@trigger_error('The '.__NAMESPACE__.'\DoctrineOrmTestCase class is deprecated since version 2.4 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\DoctrineOrmTestCase class is deprecated since Symfony 2.4 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper class instead.', E_USER_DEPRECATED); use Doctrine\ORM\EntityManager; use PHPUnit\Framework\TestCase; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php index 8a04480e73d39..a7ed239b43a9b 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php @@ -31,7 +31,6 @@ use Symfony\Component\Form\Forms; use Symfony\Component\Form\Tests\Extension\Core\Type\BaseTypeTest; use Symfony\Component\Form\Tests\Extension\Core\Type\FormTypeTest; -use Symfony\Component\PropertyAccess\PropertyAccess; use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleAssociationToIntIdEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity; @@ -1133,10 +1132,7 @@ public function testLoaderCaching() $repo = $this->em->getRepository(self::SINGLE_IDENT_CLASS); - $entityType = new EntityType( - $this->emRegistry, - PropertyAccess::createPropertyAccessor() - ); + $entityType = new EntityType($this->emRegistry); $entityTypeGuesser = new DoctrineOrmTypeGuesser($this->emRegistry); @@ -1196,10 +1192,7 @@ public function testLoaderCachingWithParameters() $repo = $this->em->getRepository(self::SINGLE_IDENT_CLASS); - $entityType = new EntityType( - $this->emRegistry, - PropertyAccess::createPropertyAccessor() - ); + $entityType = new EntityType($this->emRegistry); $entityTypeGuesser = new DoctrineOrmTypeGuesser($this->emRegistry); diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php index 4f5d8bbd5dc5c..139601710ede3 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Bridge\Doctrine\PropertyInfo\Tests; +namespace Symfony\Bridge\Doctrine\Tests\PropertyInfo; use Doctrine\DBAL\Types\Type as DBALType; use Doctrine\ORM\EntityManager; diff --git a/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php index df81edc5cc741..299138cf795d9 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php @@ -82,7 +82,7 @@ public function testLoadUserByUsernameWithUserLoaderRepositoryAndWithoutProperty /** * @group legacy - * @expectedDeprecation Implementing Symfony\Component\Security\Core\User\UserProviderInterface in a Doctrine repository when using the entity provider is deprecated since version 2.8 and will not be supported in 3.0. Make the repository implement Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface instead. + * @expectedDeprecation Implementing Symfony\Component\Security\Core\User\UserProviderInterface in a Doctrine repository when using the entity provider is deprecated since Symfony 2.8 and will not be supported in 3.0. Make the repository implement Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface instead. */ public function testLoadUserByUsernameWithUserProviderRepositoryAndWithoutProperty() { diff --git a/src/Symfony/Bridge/Monolog/LICENSE b/src/Symfony/Bridge/Monolog/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Bridge/Monolog/LICENSE +++ b/src/Symfony/Bridge/Monolog/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/Monolog/Logger.php b/src/Symfony/Bridge/Monolog/Logger.php index fbc2f5ff33296..60d18bfbe5715 100644 --- a/src/Symfony/Bridge/Monolog/Logger.php +++ b/src/Symfony/Bridge/Monolog/Logger.php @@ -27,7 +27,7 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface */ public function emerg($message, array $context = array()) { - @trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the emergency() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since Symfony 2.2 and will be removed in 3.0. Use the emergency() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); return parent::addRecord(BaseLogger::EMERGENCY, $message, $context); } @@ -37,7 +37,7 @@ public function emerg($message, array $context = array()) */ public function crit($message, array $context = array()) { - @trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the method critical() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since Symfony 2.2 and will be removed in 3.0. Use the method critical() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); return parent::addRecord(BaseLogger::CRITICAL, $message, $context); } @@ -47,7 +47,7 @@ public function crit($message, array $context = array()) */ public function err($message, array $context = array()) { - @trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the error() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since Symfony 2.2 and will be removed in 3.0. Use the error() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); return parent::addRecord(BaseLogger::ERROR, $message, $context); } @@ -57,7 +57,7 @@ public function err($message, array $context = array()) */ public function warn($message, array $context = array()) { - @trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the warning() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since Symfony 2.2 and will be removed in 3.0. Use the warning() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); return parent::addRecord(BaseLogger::WARNING, $message, $context); } diff --git a/src/Symfony/Bridge/PhpUnit/LICENSE b/src/Symfony/Bridge/PhpUnit/LICENSE index 207646a052dcd..15fc1c88d330b 100644 --- a/src/Symfony/Bridge/PhpUnit/LICENSE +++ b/src/Symfony/Bridge/PhpUnit/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2017 Fabien Potencier +Copyright (c) 2014-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/ProxyManager/LICENSE b/src/Symfony/Bridge/ProxyManager/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Bridge/ProxyManager/LICENSE +++ b/src/Symfony/Bridge/ProxyManager/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php b/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php index aaf114311cab7..fd33c34de2695 100644 --- a/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php +++ b/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php @@ -11,7 +11,7 @@ namespace Symfony\Bridge\Swiftmailer\DataCollector; -@trigger_error('The '.__NAMESPACE__.'\MessageDataCollector class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector class from SwiftmailerBundle instead. Require symfony/swiftmailer-bundle package to download SwiftmailerBundle with Composer.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\MessageDataCollector class is deprecated since Symfony 2.4 and will be removed in 3.0. Use the Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector class from SwiftmailerBundle instead. Require symfony/swiftmailer-bundle package to download SwiftmailerBundle with Composer.', E_USER_DEPRECATED); use Symfony\Component\HttpKernel\DataCollector\DataCollector; use Symfony\Component\HttpFoundation\Request; diff --git a/src/Symfony/Bridge/Swiftmailer/LICENSE b/src/Symfony/Bridge/Swiftmailer/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Bridge/Swiftmailer/LICENSE +++ b/src/Symfony/Bridge/Swiftmailer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/Twig/AppVariable.php b/src/Symfony/Bridge/Twig/AppVariable.php index 88d9835ce2399..dbbee30a471f9 100644 --- a/src/Symfony/Bridge/Twig/AppVariable.php +++ b/src/Symfony/Bridge/Twig/AppVariable.php @@ -68,7 +68,7 @@ public function setDebug($debug) */ public function getSecurity() { - @trigger_error('The "app.security" variable is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('The "app.security" variable is deprecated since Symfony 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); if (null === $this->container) { throw new \RuntimeException('The "app.security" variable is not available.'); diff --git a/src/Symfony/Bridge/Twig/LICENSE b/src/Symfony/Bridge/Twig/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Bridge/Twig/LICENSE +++ b/src/Symfony/Bridge/Twig/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig index e3c76349648e5..c61f28a2d302f 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig @@ -20,16 +20,21 @@ {%- endblock %} {% block money_widget -%} -
* +---------------+-----------------------+------------------+
* | ISBN | Title | Author |
* +---------------+-----------------------+------------------+
@@ -231,6 +232,7 @@ public function setRow($column, array $row)
* | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
* | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
* +---------------+-----------------------+------------------+
+ *
*/
public function render()
{
@@ -264,7 +266,7 @@ public function render()
/**
* Renders horizontal header separator.
*
- * Example: +-----+-----------+-------+
+ * Example: +-----+-----------+-------+
*/
private function renderRowSeparator()
{
@@ -295,7 +297,7 @@ private function renderColumnSeparator()
/**
* Renders table row.
*
- * Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
+ * Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
*
* @param array $row
* @param string $cellFormat
diff --git a/src/Symfony/Component/Console/Helper/TableHelper.php b/src/Symfony/Component/Console/Helper/TableHelper.php
index 91afbb133f0db..794803883944a 100644
--- a/src/Symfony/Component/Console/Helper/TableHelper.php
+++ b/src/Symfony/Component/Console/Helper/TableHelper.php
@@ -35,7 +35,7 @@ class TableHelper extends Helper
public function __construct($triggerDeprecationError = true)
{
if ($triggerDeprecationError) {
- @trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Console\Helper\Table class instead.', E_USER_DEPRECATED);
+ @trigger_error('The '.__CLASS__.' class is deprecated since Symfony 2.5 and will be removed in 3.0. Use the Symfony\Component\Console\Helper\Table class instead.', E_USER_DEPRECATED);
}
$this->table = new Table(new NullOutput());
diff --git a/src/Symfony/Component/Console/Input/ArgvInput.php b/src/Symfony/Component/Console/Input/ArgvInput.php
index e294d25a0e66e..a532e954cd290 100644
--- a/src/Symfony/Component/Console/Input/ArgvInput.php
+++ b/src/Symfony/Component/Console/Input/ArgvInput.php
@@ -286,6 +286,8 @@ public function hasParameterOption($values)
}
if (0 === strpos($token, '-') && 0 !== strpos($token, '--')) {
+ $noValue = explode('=', $token);
+ $token = $noValue[0];
$searchableToken = str_replace('-', '', $token);
$searchableValue = str_replace('-', '', $value);
if ('' !== $searchableToken && '' !== $searchableValue && false !== strpos($searchableToken, $searchableValue)) {
diff --git a/src/Symfony/Component/Console/Input/InputDefinition.php b/src/Symfony/Component/Console/Input/InputDefinition.php
index 7dadf2be29bb5..411a2a7df559f 100644
--- a/src/Symfony/Component/Console/Input/InputDefinition.php
+++ b/src/Symfony/Component/Console/Input/InputDefinition.php
@@ -412,7 +412,7 @@ public function getSynopsis($short = false)
*/
public function asText()
{
- @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
+ @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
$descriptor = new TextDescriptor();
$output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true);
@@ -432,7 +432,7 @@ public function asText()
*/
public function asXml($asDom = false)
{
- @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
+ @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
$descriptor = new XmlDescriptor();
diff --git a/src/Symfony/Component/Console/Input/InputInterface.php b/src/Symfony/Component/Console/Input/InputInterface.php
index 6044e92fee5f7..02d985dbcc93d 100644
--- a/src/Symfony/Component/Console/Input/InputInterface.php
+++ b/src/Symfony/Component/Console/Input/InputInterface.php
@@ -24,7 +24,7 @@ interface InputInterface
/**
* Returns the first argument from the raw parameters (not parsed).
*
- * @return string The value of the first argument or null otherwise
+ * @return string|null The value of the first argument or null otherwise
*/
public function getFirstArgument();
diff --git a/src/Symfony/Component/Console/LICENSE b/src/Symfony/Component/Console/LICENSE
index 17d16a13367dd..21d7fb9e2f29b 100644
--- a/src/Symfony/Component/Console/LICENSE
+++ b/src/Symfony/Component/Console/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2004-2017 Fabien Potencier
+Copyright (c) 2004-2018 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php
index d4dcc2dc20acc..5fe19caed29cc 100644
--- a/src/Symfony/Component/Console/Tests/ApplicationTest.php
+++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php
@@ -49,6 +49,8 @@ public static function setUpBeforeClass()
require_once self::$fixturesPath.'/BarBucCommand.php';
require_once self::$fixturesPath.'/FooSubnamespaced1Command.php';
require_once self::$fixturesPath.'/FooSubnamespaced2Command.php';
+ require_once self::$fixturesPath.'/TestTiti.php';
+ require_once self::$fixturesPath.'/TestToto.php';
}
protected function normalizeLineBreaks($text)
@@ -226,6 +228,14 @@ public function testFindAmbiguousNamespace()
$application->findNamespace('f');
}
+ public function testFindNonAmbiguous()
+ {
+ $application = new Application();
+ $application->add(new \TestTiti());
+ $application->add(new \TestToto());
+ $this->assertEquals('test-toto', $application->find('test')->getName());
+ }
+
/**
* @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException
* @expectedExceptionMessage There are no commands defined in the "bar" namespace.
diff --git a/src/Symfony/Component/Console/Tests/Fixtures/TestTiti.php b/src/Symfony/Component/Console/Tests/Fixtures/TestTiti.php
new file mode 100644
index 0000000000000..72e29d2a0a2dc
--- /dev/null
+++ b/src/Symfony/Component/Console/Tests/Fixtures/TestTiti.php
@@ -0,0 +1,21 @@
+setName('test-titi')
+ ->setDescription('The test:titi command')
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $output->write('test-titi');
+ }
+}
diff --git a/src/Symfony/Component/Console/Tests/Fixtures/TestToto.php b/src/Symfony/Component/Console/Tests/Fixtures/TestToto.php
new file mode 100644
index 0000000000000..f14805db68e6c
--- /dev/null
+++ b/src/Symfony/Component/Console/Tests/Fixtures/TestToto.php
@@ -0,0 +1,22 @@
+setName('test-toto')
+ ->setDescription('The test-toto command')
+ ->setAliases(array('test'))
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $output->write('test-toto');
+ }
+}
diff --git a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php
index 3538cbc0b7ac1..d9bdb606ac340 100644
--- a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php
@@ -84,6 +84,10 @@ public function testAskChoice()
$question->setMultiselect(true);
$this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question));
+
+ $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, 0);
+ // We are supposed to get the default value since we are not in interactive mode
+ $this->assertEquals('Superman', $questionHelper->ask($this->createInputInterfaceMock(true), $this->createOutputInterface(), $question));
}
public function testAsk()
diff --git a/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php b/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php
index 85fb533715b62..8ded178bbeb6b 100644
--- a/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php
+++ b/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php
@@ -299,6 +299,9 @@ public function testHasParameterOption()
$input = new ArgvInput(array('cli.php', '-fh'));
$this->assertTrue($input->hasParameterOption('-fh'), '->hasParameterOption() returns true if the given short option is in the raw input');
+ $input = new ArgvInput(array('cli.php', '-e=test'));
+ $this->assertFalse($input->hasParameterOption('-s'), '->hasParameterOption() returns true if the given short option is in the raw input');
+
$input = new ArgvInput(array('cli.php', '--foo', 'foo'));
$this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given short option is in the raw input');
diff --git a/src/Symfony/Component/CssSelector/CssSelector.php b/src/Symfony/Component/CssSelector/CssSelector.php
index c38c9e77a0a02..b4ac866b051b3 100644
--- a/src/Symfony/Component/CssSelector/CssSelector.php
+++ b/src/Symfony/Component/CssSelector/CssSelector.php
@@ -11,7 +11,7 @@
namespace Symfony\Component\CssSelector;
-@trigger_error('The '.__NAMESPACE__.'\CssSelector class is deprecated since version 2.8 and will be removed in 3.0. Use directly the \Symfony\Component\CssSelector\CssSelectorConverter class instead.', E_USER_DEPRECATED);
+@trigger_error('The '.__NAMESPACE__.'\CssSelector class is deprecated since Symfony 2.8 and will be removed in 3.0. Use directly the \Symfony\Component\CssSelector\CssSelectorConverter class instead.', E_USER_DEPRECATED);
/**
* CssSelector is the main entry point of the component and can convert CSS
diff --git a/src/Symfony/Component/CssSelector/LICENSE b/src/Symfony/Component/CssSelector/LICENSE
index 17d16a13367dd..21d7fb9e2f29b 100644
--- a/src/Symfony/Component/CssSelector/LICENSE
+++ b/src/Symfony/Component/CssSelector/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2004-2017 Fabien Potencier
+Copyright (c) 2004-2018 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/Symfony/Component/CssSelector/Parser/TokenStream.php b/src/Symfony/Component/CssSelector/Parser/TokenStream.php
index 7ebc0cf194250..24e8634ad6b86 100644
--- a/src/Symfony/Component/CssSelector/Parser/TokenStream.php
+++ b/src/Symfony/Component/CssSelector/Parser/TokenStream.php
@@ -31,11 +31,6 @@ class TokenStream
*/
private $tokens = array();
- /**
- * @var bool
- */
- private $frozen = false;
-
/**
* @var Token[]
*/
@@ -49,7 +44,7 @@ class TokenStream
/**
* @var Token|null
*/
- private $peeked = null;
+ private $peeked;
/**
* @var bool
@@ -75,8 +70,6 @@ public function push(Token $token)
*/
public function freeze()
{
- $this->frozen = true;
-
return $this;
}
diff --git a/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php b/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php
index 79e2da14bb249..218a3b43c1a78 100644
--- a/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php
+++ b/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php
@@ -37,7 +37,7 @@ public function testXmlLang($css, array $elementsId)
$translator = new Translator();
$document = new \SimpleXMLElement(file_get_contents(__DIR__.'/Fixtures/lang.xml'));
$elements = $document->xpath($translator->cssToXPath($css));
- $this->assertEquals(count($elementsId), count($elements));
+ $this->assertCount(count($elementsId), $elements);
foreach ($elements as $element) {
$this->assertTrue(in_array($element->attributes()->id, $elementsId));
}
diff --git a/src/Symfony/Component/Debug/DebugClassLoader.php b/src/Symfony/Component/Debug/DebugClassLoader.php
index ee0b248149a6a..b0ff397207507 100644
--- a/src/Symfony/Component/Debug/DebugClassLoader.php
+++ b/src/Symfony/Component/Debug/DebugClassLoader.php
@@ -142,7 +142,7 @@ public static function disable()
*/
public function findFile($class)
{
- @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
+ @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
if ($this->wasFinder) {
return $this->classLoader[0]->findFile($class);
diff --git a/src/Symfony/Component/Debug/ErrorHandler.php b/src/Symfony/Component/Debug/ErrorHandler.php
index ae3c2ff8fd24d..87f04258faf98 100644
--- a/src/Symfony/Component/Debug/ErrorHandler.php
+++ b/src/Symfony/Component/Debug/ErrorHandler.php
@@ -555,6 +555,7 @@ public function handleException($exception, array $error = null)
$exception = new FatalThrowableError($exception);
}
$type = $exception instanceof FatalErrorException ? $exception->getSeverity() : E_ERROR;
+ $handlerException = null;
if (($this->loggedErrors & $type) || $exception instanceof FatalThrowableError) {
$e = array(
@@ -599,18 +600,20 @@ public function handleException($exception, array $error = null)
}
}
}
- if (empty($this->exceptionHandler)) {
- throw $exception; // Give back $exception to the native handler
- }
try {
- call_user_func($this->exceptionHandler, $exception);
+ if (null !== $this->exceptionHandler) {
+ return \call_user_func($this->exceptionHandler, $exception);
+ }
+ $handlerException = $handlerException ?: $exception;
} catch (\Exception $handlerException) {
} catch (\Throwable $handlerException) {
}
- if (isset($handlerException)) {
- $this->exceptionHandler = null;
- $this->handleException($handlerException);
+ $this->exceptionHandler = null;
+ if ($exception === $handlerException) {
+ self::$reservedMemory = null; // Disable the fatal error handler
+ throw $exception; // Give back $exception to the native handler
}
+ $this->handleException($handlerException);
}
/**
@@ -626,15 +629,30 @@ public static function handleFatalError(array $error = null)
return;
}
- self::$reservedMemory = null;
+ $handler = self::$reservedMemory = null;
+ $handlers = array();
- $handler = set_error_handler('var_dump');
- $handler = is_array($handler) ? $handler[0] : null;
- restore_error_handler();
+ while (!is_array($handler) || !$handler[0] instanceof self) {
+ $handler = set_exception_handler('var_dump');
+ restore_exception_handler();
- if (!$handler instanceof self) {
+ if (!$handler) {
+ break;
+ }
+ restore_exception_handler();
+ array_unshift($handlers, $handler);
+ }
+ foreach ($handlers as $h) {
+ set_exception_handler($h);
+ }
+ if (!$handler) {
return;
}
+ if ($handler !== $h) {
+ $handler[0]->setExceptionHandler($h);
+ }
+ $handler = $handler[0];
+ $handlers = array();
if ($exit = null === $error) {
$error = error_get_last();
@@ -743,7 +761,7 @@ protected function getFatalErrorHandlers()
*/
public function setLevel($level)
{
- @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the throwAt() method instead.', E_USER_DEPRECATED);
+ @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the throwAt() method instead.', E_USER_DEPRECATED);
$level = null === $level ? error_reporting() : $level;
$this->throwAt($level, true);
@@ -758,7 +776,7 @@ public function setLevel($level)
*/
public function setDisplayErrors($displayErrors)
{
- @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the throwAt() method instead.', E_USER_DEPRECATED);
+ @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the throwAt() method instead.', E_USER_DEPRECATED);
if ($displayErrors) {
$this->throwAt($this->displayErrors, true);
@@ -779,7 +797,7 @@ public function setDisplayErrors($displayErrors)
*/
public static function setLogger(LoggerInterface $logger, $channel = 'deprecation')
{
- @trigger_error('The '.__METHOD__.' static method is deprecated since version 2.6 and will be removed in 3.0. Use the setLoggers() or setDefaultLogger() methods instead.', E_USER_DEPRECATED);
+ @trigger_error('The '.__METHOD__.' static method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the setLoggers() or setDefaultLogger() methods instead.', E_USER_DEPRECATED);
$handler = set_error_handler('var_dump');
$handler = is_array($handler) ? $handler[0] : null;
@@ -804,7 +822,7 @@ public static function setLogger(LoggerInterface $logger, $channel = 'deprecatio
*/
public function handle($level, $message, $file = 'unknown', $line = 0, $context = array())
{
- $this->handleError(E_USER_DEPRECATED, 'The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the handleError() method instead.', __FILE__, __LINE__, array());
+ $this->handleError(E_USER_DEPRECATED, 'The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the handleError() method instead.', __FILE__, __LINE__, array());
return $this->handleError($level, $message, $file, $line, (array) $context);
}
@@ -816,7 +834,7 @@ public function handle($level, $message, $file = 'unknown', $line = 0, $context
*/
public function handleFatal()
{
- @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the handleFatalError() method instead.', E_USER_DEPRECATED);
+ @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the handleFatalError() method instead.', E_USER_DEPRECATED);
static::handleFatalError();
}
diff --git a/src/Symfony/Component/Debug/Exception/DummyException.php b/src/Symfony/Component/Debug/Exception/DummyException.php
index c836f876d3d95..1b9082b61eabe 100644
--- a/src/Symfony/Component/Debug/Exception/DummyException.php
+++ b/src/Symfony/Component/Debug/Exception/DummyException.php
@@ -11,7 +11,7 @@
namespace Symfony\Component\Debug\Exception;
-@trigger_error('The '.__NAMESPACE__.'\DummyException class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
+@trigger_error('The '.__NAMESPACE__.'\DummyException class is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
/**
* @author Fabien Potencier getResponse(); $this->assertEquals('xml', $response->getContent()); } + + public function testCSPHeaderIsRemoved() + { + $dispatcher = new EventDispatcher(); + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $kernel->expects($this->once())->method('handle')->will($this->returnCallback(function (Request $request) { + return new Response($request->getRequestFormat()); + })); + + $listener = new ExceptionListener('foo', $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock()); + + $dispatcher->addSubscriber($listener); + + $request = Request::create('/'); + $event = new GetResponseForExceptionEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST, new \Exception('foo')); + $dispatcher->dispatch(KernelEvents::EXCEPTION, $event); + + $response = new Response('', 200, array('content-security-policy' => "style-src 'self'")); + $this->assertTrue($response->headers->has('content-security-policy')); + + $event = new FilterResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST, $response); + $dispatcher->dispatch(KernelEvents::RESPONSE, $event); + + $this->assertFalse($response->headers->has('content-security-policy'), 'CSP header has been removed'); + $this->assertFalse($dispatcher->hasListeners(KernelEvents::RESPONSE), 'CSP removal listener has been removed'); + } } class TestLogger extends Logger implements DebugLoggerInterface diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php index 32977cf387c24..d6902f4880abf 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php @@ -530,8 +530,8 @@ public function testHitsCachedResponsesWithExpiresHeader() $this->request('GET', '/'); $this->assertHttpKernelIsNotCalled(); $this->assertEquals(200, $this->response->getStatusCode()); - $this->assertTrue(strtotime($this->responses[0]->headers->get('Date')) - strtotime($this->response->headers->get('Date')) < 2); - $this->assertTrue($this->response->headers->get('Age') > 0); + $this->assertLessThan(2, strtotime($this->responses[0]->headers->get('Date')) - strtotime($this->response->headers->get('Date'))); + $this->assertGreaterThan(0, $this->response->headers->get('Age')); $this->assertNotNull($this->response->headers->get('X-Content-Digest')); $this->assertTraceContains('fresh'); $this->assertTraceNotContains('store'); @@ -554,8 +554,8 @@ public function testHitsCachedResponseWithMaxAgeDirective() $this->request('GET', '/'); $this->assertHttpKernelIsNotCalled(); $this->assertEquals(200, $this->response->getStatusCode()); - $this->assertTrue(strtotime($this->responses[0]->headers->get('Date')) - strtotime($this->response->headers->get('Date')) < 2); - $this->assertTrue($this->response->headers->get('Age') > 0); + $this->assertLessThan(2, strtotime($this->responses[0]->headers->get('Date')) - strtotime($this->response->headers->get('Date'))); + $this->assertGreaterThan(0, $this->response->headers->get('Age')); $this->assertNotNull($this->response->headers->get('X-Content-Digest')); $this->assertTraceContains('fresh'); $this->assertTraceNotContains('store'); @@ -578,8 +578,8 @@ public function testHitsCachedResponseWithSMaxAgeDirective() $this->request('GET', '/'); $this->assertHttpKernelIsNotCalled(); $this->assertEquals(200, $this->response->getStatusCode()); - $this->assertTrue(strtotime($this->responses[0]->headers->get('Date')) - strtotime($this->response->headers->get('Date')) < 2); - $this->assertTrue($this->response->headers->get('Age') > 0); + $this->assertLessThan(2, strtotime($this->responses[0]->headers->get('Date')) - strtotime($this->response->headers->get('Date'))); + $this->assertGreaterThan(0, $this->response->headers->get('Age')); $this->assertNotNull($this->response->headers->get('X-Content-Digest')); $this->assertTraceContains('fresh'); $this->assertTraceNotContains('store'); @@ -753,7 +753,7 @@ public function testFetchesFullResponseWhenCacheStaleAndNoValidatorsPresent() $this->request('GET', '/'); $this->assertHttpKernelIsCalled(); $this->assertEquals(200, $this->response->getStatusCode()); - $this->assertTrue($this->response->headers->get('Age') <= 1); + $this->assertLessThanOrEqual(1, $this->response->headers->get('Age')); $this->assertNotNull($this->response->headers->get('X-Content-Digest')); $this->assertTraceContains('stale'); $this->assertTraceNotContains('fresh'); @@ -791,7 +791,7 @@ public function testValidatesCachedResponsesWithLastModifiedAndNoFreshnessInform $this->assertEquals(200, $this->response->getStatusCode()); $this->assertNotNull($this->response->headers->get('Last-Modified')); $this->assertNotNull($this->response->headers->get('X-Content-Digest')); - $this->assertTrue($this->response->headers->get('Age') <= 1); + $this->assertLessThanOrEqual(1, $this->response->headers->get('Age')); $this->assertEquals('Hello World', $this->response->getContent()); $this->assertTraceContains('stale'); $this->assertTraceContains('valid'); @@ -841,7 +841,7 @@ public function testValidatesCachedResponsesWithETagAndNoFreshnessInformation() $this->assertEquals(200, $this->response->getStatusCode()); $this->assertNotNull($this->response->headers->get('ETag')); $this->assertNotNull($this->response->headers->get('X-Content-Digest')); - $this->assertTrue($this->response->headers->get('Age') <= 1); + $this->assertLessThanOrEqual(1, $this->response->headers->get('Age')); $this->assertEquals('Hello World', $this->response->getContent()); $this->assertTraceContains('stale'); $this->assertTraceContains('valid'); diff --git a/src/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php b/src/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php index f3557eedcb885..e9dfccbc51523 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php @@ -64,22 +64,22 @@ public function testStoreSpecialCharsInUrl() $profile = new Profile('simple_quote'); $profile->setUrl('http://foo.bar/\''); $this->getStorage()->write($profile); - $this->assertTrue(false !== $this->getStorage()->read('simple_quote'), '->write() accepts single quotes in URL'); + $this->assertNotFalse($this->getStorage()->read('simple_quote'), '->write() accepts single quotes in URL'); $profile = new Profile('double_quote'); $profile->setUrl('http://foo.bar/"'); $this->getStorage()->write($profile); - $this->assertTrue(false !== $this->getStorage()->read('double_quote'), '->write() accepts double quotes in URL'); + $this->assertNotFalse($this->getStorage()->read('double_quote'), '->write() accepts double quotes in URL'); $profile = new Profile('backslash'); $profile->setUrl('http://foo.bar/\\'); $this->getStorage()->write($profile); - $this->assertTrue(false !== $this->getStorage()->read('backslash'), '->write() accepts backslash in URL'); + $this->assertNotFalse($this->getStorage()->read('backslash'), '->write() accepts backslash in URL'); $profile = new Profile('comma'); $profile->setUrl('http://foo.bar/,'); $this->getStorage()->write($profile); - $this->assertTrue(false !== $this->getStorage()->read('comma'), '->write() accepts comma in URL'); + $this->assertNotFalse($this->getStorage()->read('comma'), '->write() accepts comma in URL'); } public function testStoreDuplicateToken() @@ -214,7 +214,7 @@ public function testPurge() $profile->setMethod('GET'); $this->getStorage()->write($profile); - $this->assertTrue(false !== $this->getStorage()->read('token1')); + $this->assertNotFalse($this->getStorage()->read('token1')); $this->assertCount(1, $this->getStorage()->find('127.0.0.1', '', 10, 'GET')); $profile = new Profile('token2'); @@ -223,7 +223,7 @@ public function testPurge() $profile->setMethod('GET'); $this->getStorage()->write($profile); - $this->assertTrue(false !== $this->getStorage()->read('token2')); + $this->assertNotFalse($this->getStorage()->read('token2')); $this->assertCount(2, $this->getStorage()->find('127.0.0.1', '', 10, 'GET')); $this->getStorage()->purge(); diff --git a/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php b/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php index 06de8902dc8cd..1304b219e7ae7 100644 --- a/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php @@ -36,7 +36,7 @@ public function testCheck() $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar'))); $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&0=integer'))); - $this->assertTrue($signer->sign('http://example.com/foo?foo=bar&bar=foo') === $signer->sign('http://example.com/foo?bar=foo&foo=bar')); + $this->assertSame($signer->sign('http://example.com/foo?foo=bar&bar=foo'), $signer->sign('http://example.com/foo?bar=foo&foo=bar')); } public function testCheckWithDifferentArgSeparator() diff --git a/src/Symfony/Component/Intl/Intl.php b/src/Symfony/Component/Intl/Intl.php index 3fc1974bfc775..3444c10f83435 100644 --- a/src/Symfony/Component/Intl/Intl.php +++ b/src/Symfony/Component/Intl/Intl.php @@ -234,7 +234,7 @@ public static function getIcuDataVersion() */ public static function getIcuStubVersion() { - return '60.1'; + return '60.2'; } /** diff --git a/src/Symfony/Component/Intl/LICENSE b/src/Symfony/Component/Intl/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Intl/LICENSE +++ b/src/Symfony/Component/Intl/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Intl/Resources/bin/icu.ini b/src/Symfony/Component/Intl/Resources/bin/icu.ini index f06bc753355da..da25128e2868c 100644 --- a/src/Symfony/Component/Intl/Resources/bin/icu.ini +++ b/src/Symfony/Component/Intl/Resources/bin/icu.ini @@ -15,4 +15,4 @@ 57 = http://source.icu-project.org/repos/icu/icu/tags/release-57-1/source 58 = http://source.icu-project.org/repos/icu/tags/release-58-2/icu4c/source 59 = http://source.icu-project.org/repos/icu/tags/release-59-1/icu4c/source -60 = http://source.icu-project.org/repos/icu/tags/release-60-1/icu4c/source +60 = http://source.icu-project.org/repos/icu/tags/release-60-2/icu4c/source diff --git a/src/Symfony/Component/Intl/Resources/data/currencies/de.json b/src/Symfony/Component/Intl/Resources/data/currencies/de.json index 0a0796435719a..015dfbd13899d 100644 --- a/src/Symfony/Component/Intl/Resources/data/currencies/de.json +++ b/src/Symfony/Component/Intl/Resources/data/currencies/de.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.11", + "Version": "2.1.37.96", "Names": { "ADP": [ "ADP", diff --git a/src/Symfony/Component/Intl/Resources/data/currencies/ur.json b/src/Symfony/Component/Intl/Resources/data/currencies/ur.json index bbe4edc0ea763..0a5ca9e1d34cb 100644 --- a/src/Symfony/Component/Intl/Resources/data/currencies/ur.json +++ b/src/Symfony/Component/Intl/Resources/data/currencies/ur.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.28", + "Version": "2.1.37.69", "Names": { "AED": [ "AED", diff --git a/src/Symfony/Component/Intl/Resources/data/languages/de.json b/src/Symfony/Component/Intl/Resources/data/languages/de.json index f4a01cd421633..58e7a7c571a70 100644 --- a/src/Symfony/Component/Intl/Resources/data/languages/de.json +++ b/src/Symfony/Component/Intl/Resources/data/languages/de.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.11", + "Version": "2.1.37.96", "Names": { "aa": "Afar", "ab": "Abchasisch", diff --git a/src/Symfony/Component/Intl/Resources/data/languages/ur.json b/src/Symfony/Component/Intl/Resources/data/languages/ur.json index 33871c2dee4d2..e28f6175c9c33 100644 --- a/src/Symfony/Component/Intl/Resources/data/languages/ur.json +++ b/src/Symfony/Component/Intl/Resources/data/languages/ur.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.28", + "Version": "2.1.37.69", "Names": { "aa": "افار", "ab": "ابقازیان", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/de.json b/src/Symfony/Component/Intl/Resources/data/regions/de.json index bd2259f58032e..1bc40b718aed4 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/de.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/de.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.11", + "Version": "2.1.37.96", "Names": { "AC": "Ascension", "AD": "Andorra", diff --git a/src/Symfony/Component/Intl/Resources/data/regions/ur.json b/src/Symfony/Component/Intl/Resources/data/regions/ur.json index a28f28f770236..89fbae8bf9059 100644 --- a/src/Symfony/Component/Intl/Resources/data/regions/ur.json +++ b/src/Symfony/Component/Intl/Resources/data/regions/ur.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.28", + "Version": "2.1.37.69", "Names": { "AC": "اسینشن آئلینڈ", "AD": "انڈورا", diff --git a/src/Symfony/Component/Intl/Resources/data/scripts/de.json b/src/Symfony/Component/Intl/Resources/data/scripts/de.json index 07898c2c2e95a..735ee0fdcf61d 100644 --- a/src/Symfony/Component/Intl/Resources/data/scripts/de.json +++ b/src/Symfony/Component/Intl/Resources/data/scripts/de.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.11", + "Version": "2.1.37.96", "Names": { "Afak": "Afaka", "Aghb": "Kaukasisch-Albanisch", diff --git a/src/Symfony/Component/Intl/Resources/data/scripts/ur.json b/src/Symfony/Component/Intl/Resources/data/scripts/ur.json index bedfaaae754e6..7c26e92044e05 100644 --- a/src/Symfony/Component/Intl/Resources/data/scripts/ur.json +++ b/src/Symfony/Component/Intl/Resources/data/scripts/ur.json @@ -1,5 +1,5 @@ { - "Version": "2.1.37.28", + "Version": "2.1.37.69", "Names": { "Arab": "عربی", "Armn": "آرمینیائی", diff --git a/src/Symfony/Component/Intl/Resources/data/svn-info.txt b/src/Symfony/Component/Intl/Resources/data/svn-info.txt index c452480e2f9cc..1bfc195f5bda1 100644 --- a/src/Symfony/Component/Intl/Resources/data/svn-info.txt +++ b/src/Symfony/Component/Intl/Resources/data/svn-info.txt @@ -1,7 +1,7 @@ SVN information =============== -URL: http://source.icu-project.org/repos/icu/tags/release-60-1/icu4c/source -Revision: 40662 +URL: http://source.icu-project.org/repos/icu/tags/release-60-2/icu4c/source +Revision: 40727 Author: yoshito -Date: 2017-10-31T15:14:15.305164Z +Date: 2017-12-13T20:01:38.026283Z diff --git a/src/Symfony/Component/Intl/Resources/data/version.txt b/src/Symfony/Component/Intl/Resources/data/version.txt index c4601b28ee754..76887d82ad20d 100644 --- a/src/Symfony/Component/Intl/Resources/data/version.txt +++ b/src/Symfony/Component/Intl/Resources/data/version.txt @@ -1 +1 @@ -60.1 +60.2 diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php index 76543d3f0aa99..34328770ef7a2 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php @@ -36,7 +36,7 @@ public function testReadReturnsArrayAccess() $this->assertInstanceOf('\ArrayAccess', $data); $this->assertSame('Bar', $data['Foo']); - $this->assertFalse(isset($data['ExistsNot'])); + $this->assertArrayNotHasKey('ExistsNot', $data); } public function testReadFollowsAlias() @@ -46,7 +46,7 @@ public function testReadFollowsAlias() $this->assertInstanceOf('\ArrayAccess', $data); $this->assertSame('Bar', $data['Foo']); - $this->assertFalse(isset($data['ExistsNot'])); + $this->assertArrayNotHasKey('ExistsNot', $data); } public function testReadDoesNotFollowFallback() @@ -64,9 +64,9 @@ public function testReadDoesNotFollowFallback() $this->assertInstanceOf('\ArrayAccess', $data); $this->assertSame('Bam', $data['Baz']); - $this->assertFalse(isset($data['Foo'])); + $this->assertArrayNotHasKey('Foo', $data); $this->assertNull($data['Foo']); - $this->assertFalse(isset($data['ExistsNot'])); + $this->assertArrayNotHasKey('ExistsNot', $data); } public function testReadDoesNotFollowFallbackAlias() @@ -84,9 +84,9 @@ public function testReadDoesNotFollowFallbackAlias() $this->assertInstanceOf('\ArrayAccess', $data); $this->assertSame('Bam', $data['Baz'], 'data from the aliased locale can be accessed'); - $this->assertFalse(isset($data['Foo'])); + $this->assertArrayNotHasKey('Foo', $data); $this->assertNull($data['Foo']); - $this->assertFalse(isset($data['ExistsNot'])); + $this->assertArrayNotHasKey('ExistsNot', $data); } /** diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/JsonBundleReaderTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/JsonBundleReaderTest.php index 2b6e6c4169e7f..dd0cf9cd872cd 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/JsonBundleReaderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/JsonBundleReaderTest.php @@ -35,7 +35,7 @@ public function testReadReturnsArray() $this->assertInternalType('array', $data); $this->assertSame('Bar', $data['Foo']); - $this->assertFalse(isset($data['ExistsNot'])); + $this->assertArrayNotHasKey('ExistsNot', $data); } /** diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.php index 954e2f04237c8..f6adae9b7de00 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/PhpBundleReaderTest.php @@ -35,7 +35,7 @@ public function testReadReturnsArray() $this->assertInternalType('array', $data); $this->assertSame('Bar', $data['Foo']); - $this->assertFalse(isset($data['ExistsNot'])); + $this->assertArrayNotHasKey('ExistsNot', $data); } /** diff --git a/src/Symfony/Component/Intl/Tests/Data/Util/RingBufferTest.php b/src/Symfony/Component/Intl/Tests/Data/Util/RingBufferTest.php index bbaecfcbd668f..f13bf36c96d19 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Util/RingBufferTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Util/RingBufferTest.php @@ -34,8 +34,8 @@ public function testWriteWithinBuffer() $this->buffer[0] = 'foo'; $this->buffer['bar'] = 'baz'; - $this->assertTrue(isset($this->buffer[0])); - $this->assertTrue(isset($this->buffer['bar'])); + $this->assertArrayHasKey(0, $this->buffer); + $this->assertArrayHasKey('bar', $this->buffer); $this->assertSame('foo', $this->buffer[0]); $this->assertSame('baz', $this->buffer['bar']); } @@ -46,8 +46,8 @@ public function testWritePastBuffer() $this->buffer['bar'] = 'baz'; $this->buffer[2] = 'bam'; - $this->assertTrue(isset($this->buffer['bar'])); - $this->assertTrue(isset($this->buffer[2])); + $this->assertArrayHasKey('bar', $this->buffer); + $this->assertArrayHasKey(2, $this->buffer); $this->assertSame('baz', $this->buffer['bar']); $this->assertSame('bam', $this->buffer[2]); } @@ -62,14 +62,14 @@ public function testReadNonExistingFails() public function testQueryNonExisting() { - $this->assertFalse(isset($this->buffer['foo'])); + $this->assertArrayNotHasKey('foo', $this->buffer); } public function testUnsetNonExistingSucceeds() { unset($this->buffer['foo']); - $this->assertFalse(isset($this->buffer['foo'])); + $this->assertArrayNotHasKey('foo', $this->buffer); } /** @@ -86,7 +86,7 @@ public function testReadOverwrittenFails() public function testQueryOverwritten() { - $this->assertFalse(isset($this->buffer[0])); + $this->assertArrayNotHasKey(0, $this->buffer); } public function testUnsetOverwrittenSucceeds() @@ -97,6 +97,6 @@ public function testUnsetOverwrittenSucceeds() unset($this->buffer[0]); - $this->assertFalse(isset($this->buffer[0])); + $this->assertArrayNotHasKey(0, $this->buffer); } } diff --git a/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php b/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php index d512b37d6db49..e47b5f6d48b1c 100644 --- a/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php +++ b/src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php @@ -231,7 +231,6 @@ public function formatProvider() array('s', 3601, '1'), array('s', 3630, '30'), array('s', 43200, '0'), // 12 hours - ); $dateTime = new \DateTime('@0'); @@ -936,7 +935,9 @@ public function testParseWithNullPositionValue() $position = null; $formatter = $this->getDefaultDateFormatter('y'); $this->assertSame(0, $formatter->parse('1970', $position)); - $this->assertNull($position); + // Since $position is not supported by the Symfony implementation, the following won't work. + // The intl implementation works this way since 60.2. + // $this->assertSame(4, $position); } public function testSetPattern() diff --git a/src/Symfony/Component/Ldap/LICENSE b/src/Symfony/Component/Ldap/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Ldap/LICENSE +++ b/src/Symfony/Component/Ldap/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php b/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php index f9529d3fc3fd0..4ca55b560eb3b 100644 --- a/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Exception; -@trigger_error('The '.__NAMESPACE__.'\MethodArgumentNotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\MethodArgumentNotImplementedException class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException as BaseMethodArgumentNotImplementedException; diff --git a/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php b/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php index 973f880f8aa25..1043984600c68 100644 --- a/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Exception; -@trigger_error('The '.__NAMESPACE__.'\MethodArgumentValueNotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\MethodArgumentValueNotImplementedException class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException as BaseMethodArgumentValueNotImplementedException; diff --git a/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php b/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php index fa4f82d98d28a..6d824f53e1965 100644 --- a/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Exception; -@trigger_error('The '.__NAMESPACE__.'\MethodNotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodNotImplementedException class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\MethodNotImplementedException class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodNotImplementedException class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Exception\MethodNotImplementedException as BaseMethodNotImplementedException; diff --git a/src/Symfony/Component/Locale/Exception/NotImplementedException.php b/src/Symfony/Component/Locale/Exception/NotImplementedException.php index fefade5aff71c..10698a275f6a4 100644 --- a/src/Symfony/Component/Locale/Exception/NotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/NotImplementedException.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Exception; -@trigger_error('The '.__NAMESPACE__.'\NotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\NotImplementedException class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\NotImplementedException class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\NotImplementedException class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Exception\NotImplementedException as BaseNotImplementedException; diff --git a/src/Symfony/Component/Locale/LICENSE b/src/Symfony/Component/Locale/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Locale/LICENSE +++ b/src/Symfony/Component/Locale/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Locale/Locale.php b/src/Symfony/Component/Locale/Locale.php index 06dc05ae4d70a..b5bbbdbecb37e 100644 --- a/src/Symfony/Component/Locale/Locale.php +++ b/src/Symfony/Component/Locale/Locale.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale; -@trigger_error('The '.__NAMESPACE__.'\Locale class is deprecated since version 2.7, to be removed in Symfony 3.0. Use the methods provided by the \Symfony\Component\Intl\Intl class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\Locale class is deprecated since Symfony 2.7, to be removed in Symfony 3.0. Use the methods provided by the \Symfony\Component\Intl\Intl class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Intl; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php index 80553d1c50da2..82615e1144a53 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\AmPmTransformer class is deprecated since version 2.3 and will be removed in Symfony 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\AmPmTransformer class is deprecated since Symfony 2.3 and will be removed in Symfony 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer as BaseAmPmTransformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php index d87f47852f0ea..c3f5c5f2a1fcd 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\DayOfWeekTransformer class is deprecated since version 2.3 and will be removed in Symfony 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\DayOfWeekTransformer class is deprecated since Symfony 2.3 and will be removed in Symfony 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer as BaseDayOfWeekTransformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php index 86bc95c6c54ec..e21223d0d4dc3 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\DayOfYearTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\DayOfYearTransformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer as BaseDayOfYearTransformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php index 1a711daa38a26..920af2b5e7859 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\DayTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\DayTransformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer as BaseDayTransformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php index 52fb05cff0434..8ac06c2e16332 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\FullTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\FullTransformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer as BaseFullTransformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php index 2a821e1f9e5d8..5149da08f29ed 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\Hour1200Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\Hour1200Transformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer as BaseHour1200Transformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php index 7872e8bccd5c9..df3320cbd6feb 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\Hour1201Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\Hour1201Transformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer as BaseHour1201Transformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php index 380f0e22687eb..f64b87a46cb9d 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\Hour2400Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\Hour2400Transformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer as BaseHour2400Transformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php index db05ecf0269c0..c9928ef451b7d 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\Hour2401Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\Hour2401Transformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer as BaseHour2401Transformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php index 0f9f43251ef38..15de87c687193 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\HourTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\HourTransformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer as BaseHourTransformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php index ef1f6eaa712a9..e5440bc786581 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\MinuteTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\MinuteTransformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer as BaseMinuteTransformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php index 41a8bb7ba8d65..e800374fdb28d 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\MonthTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\MonthTransformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer as BaseMonthTransformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php index 35c895c5801da..5329c20bb6ede 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\QuarterTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\QuarterTransformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer as BaseQuarterTransformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php index aba3018e9d9df..3b68f2cb0f07f 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\SecondTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\SecondTransformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer as BaseSecondTransformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php index 3eb21476b7499..8d8154dce12db 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\TimeZoneTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\TimeZoneTransformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer as BaseTimeZoneTransformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php index a3aef25ee980f..43208cf78cc0c 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Transformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\Transformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Transformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\Transformer as BaseTransformer; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php index d88bc5c4d235f..ff4aba0b3bc0f 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub\DateFormat; -@trigger_error('The '.__NAMESPACE__.'\YearTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\YearTransformer class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer as BaseYearTransformer; diff --git a/src/Symfony/Component/Locale/Stub/StubCollator.php b/src/Symfony/Component/Locale/Stub/StubCollator.php index 2c3b8af1c00d4..0c34aea8944e6 100644 --- a/src/Symfony/Component/Locale/Stub/StubCollator.php +++ b/src/Symfony/Component/Locale/Stub/StubCollator.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub; -@trigger_error('The '.__NAMESPACE__.'\StubCollator class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Collator\Collator class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\StubCollator class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Collator\Collator class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Collator\Collator; diff --git a/src/Symfony/Component/Locale/Stub/StubIntl.php b/src/Symfony/Component/Locale/Stub/StubIntl.php index d26c32d15ee06..abe9c32619def 100644 --- a/src/Symfony/Component/Locale/Stub/StubIntl.php +++ b/src/Symfony/Component/Locale/Stub/StubIntl.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub; -@trigger_error('The '.__NAMESPACE__.'\StubIntl class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Globals\IntlGlobals class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\StubIntl class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Globals\IntlGlobals class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Globals\IntlGlobals; diff --git a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php index 063464a02f298..bfc0f4106e49c 100644 --- a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub; -@trigger_error('The '.__NAMESPACE__.'\StubIntlDateFormatter class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\IntlDateFormatter class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\StubIntlDateFormatter class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\IntlDateFormatter class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\DateFormatter\IntlDateFormatter; diff --git a/src/Symfony/Component/Locale/Stub/StubLocale.php b/src/Symfony/Component/Locale/Stub/StubLocale.php index 30b266b223103..86897f47e4c04 100644 --- a/src/Symfony/Component/Locale/Stub/StubLocale.php +++ b/src/Symfony/Component/Locale/Stub/StubLocale.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub; -@trigger_error('The '.__NAMESPACE__.'\StubLocale class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Locale\Locale and Symfony\Component\Intl\Intl classes instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\StubLocale class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Locale\Locale and Symfony\Component\Intl\Intl classes instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Intl; use Symfony\Component\Intl\Locale\Locale; diff --git a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php b/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php index 2bc600a634c5a..7684c8e7cddef 100644 --- a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale\Stub; -@trigger_error('The '.__NAMESPACE__.'\StubNumberFormatter class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\NumberFormatter\NumberFormatter class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\StubNumberFormatter class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\NumberFormatter\NumberFormatter class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\NumberFormatter\NumberFormatter; diff --git a/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php b/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php index 4d82b42881fad..674472bd8ef9d 100644 --- a/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php +++ b/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php @@ -43,6 +43,6 @@ public function testGetDisplayCurrencies() public function testGetCurrencies() { $currencies = StubLocale::getCurrencies(); - $this->assertTrue(in_array('BRL', $currencies)); + $this->assertContains('BRL', $currencies); } } diff --git a/src/Symfony/Component/OptionsResolver/CHANGELOG.md b/src/Symfony/Component/OptionsResolver/CHANGELOG.md index 5f6d15b2c7ddc..c5bd1062bc421 100644 --- a/src/Symfony/Component/OptionsResolver/CHANGELOG.md +++ b/src/Symfony/Component/OptionsResolver/CHANGELOG.md @@ -25,7 +25,7 @@ CHANGELOG * deprecated OptionsResolver::isKnown() in favor of isDefined() * [BC BREAK] OptionsResolver::isRequired() returns true now if a required option has a default value set - * [BC BREAK] merged Options into OptionsResolver and turned Options into an + * [BC BREAK] merged Options into OptionsResolver and turned Options into an interface * deprecated Options::overload() (now in OptionsResolver) * deprecated Options::set() (now in OptionsResolver) @@ -36,7 +36,7 @@ CHANGELOG lazy option/normalizer closures now * [BC BREAK] removed Traversable interface from Options since using within lazy option/normalizer closures resulted in exceptions - * [BC BREAK] removed Options::all() since using within lazy option/normalizer + * [BC BREAK] removed Options::all() since using within lazy option/normalizer closures resulted in exceptions * [BC BREAK] OptionDefinitionException now extends LogicException instead of RuntimeException diff --git a/src/Symfony/Component/OptionsResolver/LICENSE b/src/Symfony/Component/OptionsResolver/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/OptionsResolver/LICENSE +++ b/src/Symfony/Component/OptionsResolver/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolver.php b/src/Symfony/Component/OptionsResolver/OptionsResolver.php index 656374c4d424a..316bbfda811c5 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolver.php @@ -420,7 +420,7 @@ public function setNormalizer($option, \Closure $normalizer) */ public function setNormalizers(array $normalizers) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use setNormalizer() instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use setNormalizer() instead.', E_USER_DEPRECATED); foreach ($normalizers as $option => $normalizer) { $this->setNormalizer($option, $normalizer); @@ -458,7 +458,7 @@ public function setAllowedValues($option, $allowedValues = null) // BC if (is_array($option) && null === $allowedValues) { - @trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since version 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED); + @trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since Symfony 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED); foreach ($option as $optionName => $optionValues) { $this->setAllowedValues($optionName, $optionValues); @@ -514,7 +514,7 @@ public function addAllowedValues($option, $allowedValues = null) // BC if (is_array($option) && null === $allowedValues) { - @trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since version 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED); + @trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since Symfony 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED); foreach ($option as $optionName => $optionValues) { $this->addAllowedValues($optionName, $optionValues); @@ -570,7 +570,7 @@ public function setAllowedTypes($option, $allowedTypes = null) // BC if (is_array($option) && null === $allowedTypes) { - @trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since version 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED); + @trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since Symfony 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED); foreach ($option as $optionName => $optionTypes) { $this->setAllowedTypes($optionName, $optionTypes); @@ -620,7 +620,7 @@ public function addAllowedTypes($option, $allowedTypes = null) // BC if (is_array($option) && null === $allowedTypes) { - @trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since version 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED); + @trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since Symfony 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED); foreach ($option as $optionName => $optionTypes) { $this->addAllowedTypes($optionName, $optionTypes); @@ -1029,7 +1029,7 @@ public function count() */ public function set($option, $value) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setDefaults() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the setDefaults() method instead.', E_USER_DEPRECATED); return $this->setDefault($option, $value); } @@ -1041,7 +1041,7 @@ public function set($option, $value) */ public function replace(array $defaults) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the clear() and setDefaults() methods instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the clear() and setDefaults() methods instead.', E_USER_DEPRECATED); $this->clear(); @@ -1055,7 +1055,7 @@ public function replace(array $defaults) */ public function overload($option, $value) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setDefault() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the setDefault() method instead.', E_USER_DEPRECATED); return $this->setDefault($option, $value); } @@ -1067,7 +1067,7 @@ public function overload($option, $value) */ public function get($option) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the ArrayAccess syntax instead to get an option value.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the ArrayAccess syntax instead to get an option value.', E_USER_DEPRECATED); return $this->offsetGet($option); } @@ -1079,7 +1079,7 @@ public function get($option) */ public function has($option) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the ArrayAccess syntax instead to get an option value.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the ArrayAccess syntax instead to get an option value.', E_USER_DEPRECATED); return $this->offsetExists($option); } @@ -1091,7 +1091,7 @@ public function has($option) */ public function replaceDefaults(array $defaultValues) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the clear() and setDefaults() methods instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the clear() and setDefaults() methods instead.', E_USER_DEPRECATED); $this->clear(); @@ -1105,7 +1105,7 @@ public function replaceDefaults(array $defaultValues) */ public function setOptional(array $optionNames) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setDefined() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the setDefined() method instead.', E_USER_DEPRECATED); return $this->setDefined($optionNames); } @@ -1117,7 +1117,7 @@ public function setOptional(array $optionNames) */ public function isKnown($option) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the isDefined() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the isDefined() method instead.', E_USER_DEPRECATED); return $this->isDefined($option); } diff --git a/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsResolverTest.php b/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsResolverTest.php index 44e07b7726c9b..1b42814ea7cfc 100644 --- a/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsResolverTest.php +++ b/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsResolverTest.php @@ -124,7 +124,7 @@ public function testResolveLazyDependencyOnMissingOptionalWithoutDefault() $this->resolver->setDefaults(array( 'two' => function (Options $options) use ($test) { /* @var TestCase $test */ - $test->assertFalse(isset($options['one'])); + $test->assertArrayNotHasKey('one', $options); return '2'; }, @@ -148,7 +148,7 @@ public function testResolveLazyDependencyOnOptionalWithoutDefault() $this->resolver->setDefaults(array( 'two' => function (Options $options) use ($test) { /* @var TestCase $test */ - $test->assertTrue(isset($options['one'])); + $test->assertArrayHasKey('one', $options); return $options['one'].'2'; }, diff --git a/src/Symfony/Component/OptionsResolver/Tests/OptionsResolver2Dot6Test.php b/src/Symfony/Component/OptionsResolver/Tests/OptionsResolver2Dot6Test.php index c548f16ba6d90..ffa2872243981 100644 --- a/src/Symfony/Component/OptionsResolver/Tests/OptionsResolver2Dot6Test.php +++ b/src/Symfony/Component/OptionsResolver/Tests/OptionsResolver2Dot6Test.php @@ -1419,12 +1419,12 @@ public function testArrayAccess() }); $this->resolver->setDefault('lazy2', function (Options $options) { - Assert::assertTrue(isset($options['default1'])); - Assert::assertTrue(isset($options['default2'])); - Assert::assertTrue(isset($options['required'])); - Assert::assertTrue(isset($options['lazy1'])); - Assert::assertTrue(isset($options['lazy2'])); - Assert::assertFalse(isset($options['defined'])); + Assert::assertArrayHasKey('default1', $options); + Assert::assertArrayHasKey('default2', $options); + Assert::assertArrayHasKey('required', $options); + Assert::assertArrayHasKey('lazy1', $options); + Assert::assertArrayHasKey('lazy2', $options); + Assert::assertArrayNotHasKey('defined', $options); Assert::assertSame(0, $options['default1']); Assert::assertSame(42, $options['default2']); diff --git a/src/Symfony/Component/Process/LICENSE b/src/Symfony/Component/Process/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Process/LICENSE +++ b/src/Symfony/Component/Process/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Process/Pipes/AbstractPipes.php b/src/Symfony/Component/Process/Pipes/AbstractPipes.php index d46a861388c9c..9a23d93c98688 100644 --- a/src/Symfony/Component/Process/Pipes/AbstractPipes.php +++ b/src/Symfony/Component/Process/Pipes/AbstractPipes.php @@ -94,7 +94,7 @@ protected function write() $w = array($this->pipes[0]); // let's have a look if something changed in streams - if (false === $n = @stream_select($r, $w, $e, 0, 0)) { + if (false === @stream_select($r, $w, $e, 0, 0)) { return; } diff --git a/src/Symfony/Component/Process/Pipes/UnixPipes.php b/src/Symfony/Component/Process/Pipes/UnixPipes.php index b5b88358a40c6..65f32ecf2735a 100644 --- a/src/Symfony/Component/Process/Pipes/UnixPipes.php +++ b/src/Symfony/Component/Process/Pipes/UnixPipes.php @@ -99,7 +99,7 @@ public function readAndWrite($blocking, $close = false) unset($r[0]); // let's have a look if something changed in streams - if (($r || $w) && false === $n = @stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { + if (($r || $w) && false === @stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { // if a system call has been interrupted, forget about it, let's try again // otherwise, an error occurred, let's reset pipes if (!$this->hasSystemCallBeenInterrupted()) { diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 05f7ecf833eac..c267f6896c266 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -1036,7 +1036,7 @@ public function setEnv(array $env) */ public function getStdin() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getInput() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the getInput() method instead.', E_USER_DEPRECATED); return $this->getInput(); } @@ -1066,7 +1066,7 @@ public function getInput() */ public function setStdin($stdin) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the setInput() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the setInput() method instead.', E_USER_DEPRECATED); return $this->setInput($stdin); } diff --git a/src/Symfony/Component/Process/ProcessUtils.php b/src/Symfony/Component/Process/ProcessUtils.php index c0fd9c12dba5a..c0558b76b3c4f 100644 --- a/src/Symfony/Component/Process/ProcessUtils.php +++ b/src/Symfony/Component/Process/ProcessUtils.php @@ -100,7 +100,7 @@ public static function validateInput($caller, $input) } // deprecated as of Symfony 2.5, to be removed in 3.0 if (is_object($input) && method_exists($input, '__toString')) { - @trigger_error('Passing an object as an input is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('Passing an object as an input is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); return (string) $input; } diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php index 3240aa7954d30..c614b3aa40089 100644 --- a/src/Symfony/Component/Process/Tests/ProcessTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -567,7 +567,7 @@ public function testUpdateStatus() { $process = $this->getProcess('echo foo'); $process->run(); - $this->assertTrue(strlen($process->getOutput()) > 0); + $this->assertGreaterThan(0, strlen($process->getOutput())); } public function testGetExitCodeIsNullOnStart() diff --git a/src/Symfony/Component/PropertyAccess/LICENSE b/src/Symfony/Component/PropertyAccess/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/PropertyAccess/LICENSE +++ b/src/Symfony/Component/PropertyAccess/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccess.php b/src/Symfony/Component/PropertyAccess/PropertyAccess.php index 8d36db2666539..eeb3752948697 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccess.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccess.php @@ -48,7 +48,7 @@ public static function createPropertyAccessorBuilder() */ public static function getPropertyAccessor() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the createPropertyAccessor() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.3 and will be removed in 3.0. Use the createPropertyAccessor() method instead.', E_USER_DEPRECATED); return self::createPropertyAccessor(); } diff --git a/src/Symfony/Component/PropertyInfo/LICENSE b/src/Symfony/Component/PropertyInfo/LICENSE index 2ca4d6305bf2a..24fa32c2e9b27 100644 --- a/src/Symfony/Component/PropertyInfo/LICENSE +++ b/src/Symfony/Component/PropertyInfo/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015-2017 Fabien Potencier +Copyright (c) 2015-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Routing/Annotation/Route.php b/src/Symfony/Component/Routing/Annotation/Route.php index aec320156b4e8..93ef00bbea286 100644 --- a/src/Symfony/Component/Routing/Annotation/Route.php +++ b/src/Symfony/Component/Routing/Annotation/Route.php @@ -57,7 +57,7 @@ public function __construct(array $data) */ public function setPattern($pattern) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Use the setPath() method instead and use the "path" option instead of the "pattern" option in the route definition.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.2 and will be removed in 3.0. Use the setPath() method instead and use the "path" option instead of the "pattern" option in the route definition.', E_USER_DEPRECATED); $this->path = $pattern; } @@ -67,7 +67,7 @@ public function setPattern($pattern) */ public function getPattern() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Use the getPath() method instead and use the "path" option instead of the "pattern" option in the route definition.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.2 and will be removed in 3.0. Use the getPath() method instead and use the "path" option instead of the "pattern" option in the route definition.', E_USER_DEPRECATED); return $this->path; } @@ -109,7 +109,7 @@ public function setRequirements($requirements) $this->methods = explode('|', $requirements['_method']); } - @trigger_error('The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the "methods" option instead.', E_USER_DEPRECATED); + @trigger_error('The "_method" requirement is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "methods" option instead.', E_USER_DEPRECATED); } if (isset($requirements['_scheme'])) { @@ -117,7 +117,7 @@ public function setRequirements($requirements) $this->schemes = explode('|', $requirements['_scheme']); } - @trigger_error('The "_scheme" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the "schemes" option instead.', E_USER_DEPRECATED); + @trigger_error('The "_scheme" requirement is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "schemes" option instead.', E_USER_DEPRECATED); } $this->requirements = $requirements; diff --git a/src/Symfony/Component/Routing/Generator/UrlGenerator.php b/src/Symfony/Component/Routing/Generator/UrlGenerator.php index d9fe7c52c4955..f07f9e4caea41 100644 --- a/src/Symfony/Component/Routing/Generator/UrlGenerator.php +++ b/src/Symfony/Component/Routing/Generator/UrlGenerator.php @@ -127,7 +127,7 @@ public function generate($name, $parameters = array(), $referenceType = self::AB protected function doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, array $requiredSchemes = array()) { if (is_bool($referenceType) || is_string($referenceType)) { - @trigger_error('The hardcoded value you are using for the $referenceType argument of the '.__CLASS__.'::generate method is deprecated since version 2.8 and will not be supported anymore in 3.0. Use the constants defined in the UrlGeneratorInterface instead.', E_USER_DEPRECATED); + @trigger_error('The hardcoded value you are using for the $referenceType argument of the '.__CLASS__.'::generate method is deprecated since Symfony 2.8 and will not be supported anymore in 3.0. Use the constants defined in the UrlGeneratorInterface instead.', E_USER_DEPRECATED); if (true === $referenceType) { $referenceType = self::ABSOLUTE_URL; @@ -195,63 +195,62 @@ protected function doGenerate($variables, $defaults, $requirements, $tokens, $pa } $schemeAuthority = ''; - if ($host = $this->context->getHost()) { - $scheme = $this->context->getScheme(); + $host = $this->context->getHost(); + $scheme = $this->context->getScheme(); - if ($requiredSchemes) { - if (!in_array($scheme, $requiredSchemes, true)) { - $referenceType = self::ABSOLUTE_URL; - $scheme = current($requiredSchemes); - } - } elseif (isset($requirements['_scheme']) && ($req = strtolower($requirements['_scheme'])) && $scheme !== $req) { - // We do this for BC; to be removed if _scheme is not supported anymore + if ($requiredSchemes) { + if (!in_array($scheme, $requiredSchemes, true)) { $referenceType = self::ABSOLUTE_URL; - $scheme = $req; + $scheme = current($requiredSchemes); } + } elseif (isset($requirements['_scheme']) && ($req = strtolower($requirements['_scheme'])) && $scheme !== $req) { + // We do this for BC; to be removed if _scheme is not supported anymore + $referenceType = self::ABSOLUTE_URL; + $scheme = $req; + } - if ($hostTokens) { - $routeHost = ''; - foreach ($hostTokens as $token) { - if ('variable' === $token[0]) { - if (null !== $this->strictRequirements && !preg_match('#^'.$token[2].'$#i', $mergedParams[$token[3]])) { - $message = sprintf('Parameter "%s" for route "%s" must match "%s" ("%s" given) to generate a corresponding URL.', $token[3], $name, $token[2], $mergedParams[$token[3]]); - - if ($this->strictRequirements) { - throw new InvalidParameterException($message); - } + if ($hostTokens) { + $routeHost = ''; + foreach ($hostTokens as $token) { + if ('variable' === $token[0]) { + if (null !== $this->strictRequirements && !preg_match('#^'.$token[2].'$#i', $mergedParams[$token[3]])) { + $message = sprintf('Parameter "%s" for route "%s" must match "%s" ("%s" given) to generate a corresponding URL.', $token[3], $name, $token[2], $mergedParams[$token[3]]); - if ($this->logger) { - $this->logger->error($message); - } + if ($this->strictRequirements) { + throw new InvalidParameterException($message); + } - return; + if ($this->logger) { + $this->logger->error($message); } - $routeHost = $token[1].$mergedParams[$token[3]].$routeHost; - } else { - $routeHost = $token[1].$routeHost; + return; } - } - if ($routeHost !== $host) { - $host = $routeHost; - if (self::ABSOLUTE_URL !== $referenceType) { - $referenceType = self::NETWORK_PATH; - } + $routeHost = $token[1].$mergedParams[$token[3]].$routeHost; + } else { + $routeHost = $token[1].$routeHost; } } - if (self::ABSOLUTE_URL === $referenceType || self::NETWORK_PATH === $referenceType) { - $port = ''; - if ('http' === $scheme && 80 != $this->context->getHttpPort()) { - $port = ':'.$this->context->getHttpPort(); - } elseif ('https' === $scheme && 443 != $this->context->getHttpsPort()) { - $port = ':'.$this->context->getHttpsPort(); + if ($routeHost !== $host) { + $host = $routeHost; + if (self::ABSOLUTE_URL !== $referenceType) { + $referenceType = self::NETWORK_PATH; } + } + } - $schemeAuthority = self::NETWORK_PATH === $referenceType ? '//' : "$scheme://"; - $schemeAuthority .= $host.$port; + if ((self::ABSOLUTE_URL === $referenceType || self::NETWORK_PATH === $referenceType) && !empty($host)) { + $port = ''; + if ('http' === $scheme && 80 != $this->context->getHttpPort()) { + $port = ':'.$this->context->getHttpPort(); + } elseif ('https' === $scheme && 443 != $this->context->getHttpsPort()) { + $port = ':'.$this->context->getHttpsPort(); } + + $schemeAuthority = self::NETWORK_PATH === $referenceType ? '//' : "$scheme://"; + $schemeAuthority .= $host.$port; } if (self::RELATIVE_PATH === $referenceType) { diff --git a/src/Symfony/Component/Routing/LICENSE b/src/Symfony/Component/Routing/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Routing/LICENSE +++ b/src/Symfony/Component/Routing/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php index e8713ccab8b2d..7dfd707ebcd5e 100644 --- a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php @@ -116,7 +116,7 @@ protected function parseRoute(RouteCollection $collection, \DOMElement $node, $p throw new \InvalidArgumentException(sprintf('Theelement in file "%s" cannot define both a "path" and a "pattern" attribute. Use only "path".', $path)); } - @trigger_error(sprintf('The "pattern" option in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "path" option in the route definition instead.', $path), E_USER_DEPRECATED); + @trigger_error(sprintf('The "pattern" option in file "%s" is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "path" option in the route definition instead.', $path), E_USER_DEPRECATED); $node->setAttribute('path', $node->getAttribute('pattern')); $node->removeAttribute('pattern'); @@ -133,7 +133,7 @@ protected function parseRoute(RouteCollection $collection, \DOMElement $node, $p } unset($requirements['_method']); - @trigger_error(sprintf('The "_method" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "methods" attribute instead.', $id, $path), E_USER_DEPRECATED); + @trigger_error(sprintf('The "_method" requirement of route "%s" in file "%s" is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "methods" attribute instead.', $id, $path), E_USER_DEPRECATED); } if (isset($requirements['_scheme'])) { @@ -142,7 +142,7 @@ protected function parseRoute(RouteCollection $collection, \DOMElement $node, $p } unset($requirements['_scheme']); - @trigger_error(sprintf('The "_scheme" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "schemes" attribute instead.', $id, $path), E_USER_DEPRECATED); + @trigger_error(sprintf('The "_scheme" requirement of route "%s" in file "%s" is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "schemes" attribute instead.', $id, $path), E_USER_DEPRECATED); } $route = new Route($node->getAttribute('path'), $defaults, $requirements, $options, $node->getAttribute('host'), $schemes, $methods, $condition); diff --git a/src/Symfony/Component/Routing/Loader/YamlFileLoader.php b/src/Symfony/Component/Routing/Loader/YamlFileLoader.php index 817714acc1ba6..4810ce409e80c 100644 --- a/src/Symfony/Component/Routing/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/YamlFileLoader.php @@ -82,7 +82,7 @@ public function load($file, $type = null) throw new \InvalidArgumentException(sprintf('The file "%s" cannot define both a "path" and a "pattern" attribute. Use only "path".', $path)); } - @trigger_error(sprintf('The "pattern" option in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "path" option in the route definition instead.', $path), E_USER_DEPRECATED); + @trigger_error(sprintf('The "pattern" option in file "%s" is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "path" option in the route definition instead.', $path), E_USER_DEPRECATED); $config['path'] = $config['pattern']; unset($config['pattern']); @@ -132,7 +132,7 @@ protected function parseRoute(RouteCollection $collection, $name, array $config, } unset($requirements['_method']); - @trigger_error(sprintf('The "_method" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "methods" option instead.', $name, $path), E_USER_DEPRECATED); + @trigger_error(sprintf('The "_method" requirement of route "%s" in file "%s" is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "methods" option instead.', $name, $path), E_USER_DEPRECATED); } if (isset($requirements['_scheme'])) { @@ -141,7 +141,7 @@ protected function parseRoute(RouteCollection $collection, $name, array $config, } unset($requirements['_scheme']); - @trigger_error(sprintf('The "_scheme" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "schemes" option instead.', $name, $path), E_USER_DEPRECATED); + @trigger_error(sprintf('The "_scheme" requirement of route "%s" in file "%s" is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "schemes" option instead.', $name, $path), E_USER_DEPRECATED); } $route = new Route($config['path'], $defaults, $requirements, $options, $host, $schemes, $methods, $condition); diff --git a/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php b/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php index c0474f22fd55a..d73c6277bd383 100644 --- a/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Routing\Matcher; -@trigger_error('The '.__NAMESPACE__.'\ApacheUrlMatcher class is deprecated since version 2.5 and will be removed in 3.0. It\'s hard to replicate the behaviour of the PHP implementation and the performance gains are minimal.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\ApacheUrlMatcher class is deprecated since Symfony 2.5 and will be removed in 3.0. It\'s hard to replicate the behaviour of the PHP implementation and the performance gains are minimal.', E_USER_DEPRECATED); use Symfony\Component\Routing\Exception\MethodNotAllowedException; diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php index 9b66014d6c6fa..22e2206c464a5 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Routing\Matcher\Dumper; -@trigger_error('The '.__NAMESPACE__.'\ApacheMatcherDumper class is deprecated since version 2.5 and will be removed in 3.0. It\'s hard to replicate the behaviour of the PHP implementation and the performance gains are minimal.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\ApacheMatcherDumper class is deprecated since Symfony 2.5 and will be removed in 3.0. It\'s hard to replicate the behaviour of the PHP implementation and the performance gains are minimal.', E_USER_DEPRECATED); use Symfony\Component\Routing\Route; diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php index 48187c0e3f8b2..016021e259c5f 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php @@ -96,10 +96,10 @@ private function generateMatchMethod($supportsRedirections) $code = rtrim($this->compileRoutes($this->getRoutes(), $supportsRedirections), "\n"); return << context; \$request = \$this->request; @@ -284,7 +284,7 @@ private function compileRoute(Route $route, $name, $supportsRedirections, $paren if ($hasTrailingSlash) { $code .= << redirect(\$pathinfo.'/', '$name'); + return \$this->redirect(\$rawPathinfo.'/', '$name'); } @@ -299,7 +299,7 @@ private function compileRoute(Route $route, $name, $supportsRedirections, $paren $code .= << context->getScheme()])) { - return \$this->redirect(\$pathinfo, '$name', key(\$requiredSchemes)); + return \$this->redirect(\$rawPathinfo, '$name', key(\$requiredSchemes)); } diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index 57a1c29faf638..41525e0d8166b 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -34,6 +34,8 @@ class Route implements \Serializable private $compiled; /** + * Constructor. + * * Available options: * * * compiler_class: A class name able to compile this route instance (RouteCompiler by default) @@ -114,7 +116,7 @@ public function unserialize($serialized) */ public function getPattern() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Use the getPath() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.2 and will be removed in 3.0. Use the getPath() method instead.', E_USER_DEPRECATED); return $this->path; } @@ -132,7 +134,7 @@ public function getPattern() */ public function setPattern($pattern) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Use the setPath() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.2 and will be removed in 3.0. Use the setPath() method instead.', E_USER_DEPRECATED); return $this->setPath($pattern); } @@ -508,9 +510,9 @@ public function addRequirements(array $requirements) public function getRequirement($key) { if ('_scheme' === $key) { - @trigger_error('The "_scheme" requirement is deprecated since version 2.2 and will be removed in 3.0. Use getSchemes() instead.', E_USER_DEPRECATED); + @trigger_error('The "_scheme" requirement is deprecated since Symfony 2.2 and will be removed in 3.0. Use getSchemes() instead.', E_USER_DEPRECATED); } elseif ('_method' === $key) { - @trigger_error('The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use getMethods() instead.', E_USER_DEPRECATED); + @trigger_error('The "_method" requirement is deprecated since Symfony 2.2 and will be removed in 3.0. Use getMethods() instead.', E_USER_DEPRECATED); } return isset($this->requirements[$key]) ? $this->requirements[$key] : null; @@ -612,11 +614,11 @@ private function sanitizeRequirement($key, $regex) // this is to keep BC and will be removed in a future version if ('_scheme' === $key) { - @trigger_error('The "_scheme" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the setSchemes() method instead.', E_USER_DEPRECATED); + @trigger_error('The "_scheme" requirement is deprecated since Symfony 2.2 and will be removed in 3.0. Use the setSchemes() method instead.', E_USER_DEPRECATED); $this->setSchemes(explode('|', $regex)); } elseif ('_method' === $key) { - @trigger_error('The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the setMethods() method instead.', E_USER_DEPRECATED); + @trigger_error('The "_method" requirement is deprecated since Symfony 2.2 and will be removed in 3.0. Use the setMethods() method instead.', E_USER_DEPRECATED); $this->setMethods(explode('|', $regex)); } diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php b/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php index 8ab42890aa006..6451192d1877e 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php @@ -15,10 +15,10 @@ public function __construct(RequestContext $context) $this->context = $context; } - public function match($pathinfo) + public function match($rawPathinfo) { $allow = array(); - $pathinfo = rawurldecode($pathinfo); + $pathinfo = rawurldecode($rawPathinfo); $context = $this->context; $request = $this->request; diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php b/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php index 0f4b33b3c1d70..9b44eb920deab 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php @@ -15,10 +15,10 @@ public function __construct(RequestContext $context) $this->context = $context; } - public function match($pathinfo) + public function match($rawPathinfo) { $allow = array(); - $pathinfo = rawurldecode($pathinfo); + $pathinfo = rawurldecode($rawPathinfo); $context = $this->context; $request = $this->request; @@ -67,7 +67,7 @@ public function match($pathinfo) // baz3 if ('/test/baz3' === rtrim($pathinfo, '/')) { if (substr($pathinfo, -1) !== '/') { - return $this->redirect($pathinfo.'/', 'baz3'); + return $this->redirect($rawPathinfo.'/', 'baz3'); } return array('_route' => 'baz3'); @@ -78,7 +78,7 @@ public function match($pathinfo) // baz4 if (preg_match('#^/test/(?P [^/]++)/?$#s', $pathinfo, $matches)) { if (substr($pathinfo, -1) !== '/') { - return $this->redirect($pathinfo.'/', 'baz4'); + return $this->redirect($rawPathinfo.'/', 'baz4'); } return $this->mergeDefaults(array_replace($matches, array('_route' => 'baz4')), array ()); @@ -171,7 +171,7 @@ public function match($pathinfo) // hey if ('/multi/hey' === rtrim($pathinfo, '/')) { if (substr($pathinfo, -1) !== '/') { - return $this->redirect($pathinfo.'/', 'hey'); + return $this->redirect($rawPathinfo.'/', 'hey'); } return array('_route' => 'hey'); @@ -318,7 +318,7 @@ public function match($pathinfo) if ('/secure' === $pathinfo) { $requiredSchemes = array ( 'https' => 0,); if (!isset($requiredSchemes[$this->context->getScheme()])) { - return $this->redirect($pathinfo, 'secure', key($requiredSchemes)); + return $this->redirect($rawPathinfo, 'secure', key($requiredSchemes)); } return array('_route' => 'secure'); @@ -328,7 +328,7 @@ public function match($pathinfo) if ('/nonsecure' === $pathinfo) { $requiredSchemes = array ( 'http' => 0,); if (!isset($requiredSchemes[$this->context->getScheme()])) { - return $this->redirect($pathinfo, 'nonsecure', key($requiredSchemes)); + return $this->redirect($rawPathinfo, 'nonsecure', key($requiredSchemes)); } return array('_route' => 'nonsecure'); diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php b/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php index 031b366b6ca22..04043273df740 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php @@ -15,10 +15,10 @@ public function __construct(RequestContext $context) $this->context = $context; } - public function match($pathinfo) + public function match($rawPathinfo) { $allow = array(); - $pathinfo = rawurldecode($pathinfo); + $pathinfo = rawurldecode($rawPathinfo); $context = $this->context; $request = $this->request; diff --git a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php index 30790084ed517..f3828838ebf9c 100644 --- a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php +++ b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php @@ -469,6 +469,38 @@ public function testHostIsCaseInsensitive() $this->assertSame('//EN.FooBar.com/app.php/', $generator->generate('test', array('locale' => 'EN'), UrlGeneratorInterface::NETWORK_PATH)); } + public function testDefaultHostIsUsedWhenContextHostIsEmpty() + { + $routes = $this->getRoutes('test', new Route('/route', array('domain' => 'my.fallback.host'), array('domain' => '.+'), array(), '{domain}', array('http'))); + + $generator = $this->getGenerator($routes); + $generator->getContext()->setHost(''); + + $this->assertSame('http://my.fallback.host/app.php/route', $generator->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL)); + } + + public function testDefaultHostIsUsedWhenContextHostIsEmptyAndSchemeIsNot() + { + $routes = $this->getRoutes('test', new Route('/route', array('domain' => 'my.fallback.host'), array('domain' => '.+'), array(), '{domain}', array('http', 'https'))); + + $generator = $this->getGenerator($routes); + $generator->getContext()->setHost(''); + $generator->getContext()->setScheme('https'); + + $this->assertSame('https://my.fallback.host/app.php/route', $generator->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL)); + } + + public function testAbsoluteUrlFallbackToRelativeIfHostIsEmptyAndSchemeIsNot() + { + $routes = $this->getRoutes('test', new Route('/route', array(), array(), array(), '', array('http', 'https'))); + + $generator = $this->getGenerator($routes); + $generator->getContext()->setHost(''); + $generator->getContext()->setScheme('https'); + + $this->assertSame('/app.php/route', $generator->generate('test', array(), UrlGeneratorInterface::ABSOLUTE_URL)); + } + /** * @group legacy */ diff --git a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php index cb3a1441656e4..69c394c67abf5 100644 --- a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php +++ b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php @@ -13,11 +13,39 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Routing\Matcher\Dumper\PhpMatcherDumper; +use Symfony\Component\Routing\Matcher\RedirectableUrlMatcherInterface; +use Symfony\Component\Routing\Matcher\UrlMatcher; +use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; class PhpMatcherDumperTest extends TestCase { + /** + * @var string + */ + private $matcherClass; + + /** + * @var string + */ + private $dumpPath; + + protected function setUp() + { + parent::setUp(); + + $this->matcherClass = uniqid('ProjectUrlMatcher'); + $this->dumpPath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'php_matcher.'.$this->matcherClass.'.php'; + } + + protected function tearDown() + { + parent::tearDown(); + + @unlink($this->dumpPath); + } + /** * @expectedException \LogicException */ @@ -36,6 +64,23 @@ public function testDumpWhenSchemeIsUsedWithoutAProperDumper() $dumper->dump(); } + public function testRedirectPreservesUrlEncoding() + { + $collection = new RouteCollection(); + $collection->add('foo', new Route('/foo:bar/')); + + $class = $this->generateDumpedMatcher($collection, true); + + $matcher = $this->getMockBuilder($class) + ->setMethods(array('redirect')) + ->setConstructorArgs(array(new RequestContext())) + ->getMock(); + + $matcher->expects($this->once())->method('redirect')->with('/foo%3Abar/', 'foo'); + + $matcher->match('/foo%3Abar'); + } + /** * @dataProvider getRouteCollections */ @@ -285,4 +330,31 @@ public function getRouteCollections() array($rootprefixCollection, 'url_matcher3.php', array()), ); } + + /** + * @param $dumper + */ + private function generateDumpedMatcher(RouteCollection $collection, $redirectableStub = false) + { + $options = array('class' => $this->matcherClass); + + if ($redirectableStub) { + $options['base_class'] = '\Symfony\Component\Routing\Tests\Matcher\Dumper\RedirectableUrlMatcherStub'; + } + + $dumper = new PhpMatcherDumper($collection); + $code = $dumper->dump($options); + + file_put_contents($this->dumpPath, $code); + include $this->dumpPath; + + return $this->matcherClass; + } +} + +abstract class RedirectableUrlMatcherStub extends UrlMatcher implements RedirectableUrlMatcherInterface +{ + public function redirect($path, $route, $scheme = null) + { + } } diff --git a/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php b/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php index ba4c6e972f19c..0b5bb0dc78cac 100644 --- a/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php +++ b/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php @@ -69,4 +69,14 @@ public function testNoSchemaRedirectIfOnOfMultipleSchemesMatches() ; $matcher->match('/foo'); } + + public function testRedirectPreservesUrlEncoding() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo:bar/')); + + $matcher = $this->getMockForAbstractClass('Symfony\Component\Routing\Matcher\RedirectableUrlMatcher', array($coll, new RequestContext())); + $matcher->expects($this->once())->method('redirect')->with('/foo%3Abar/'); + $matcher->match('/foo%3Abar'); + } } diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php index 9d9324e53ec8d..30b3e440e2d38 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php @@ -49,7 +49,7 @@ public function getCredentials() */ public function getKey() { - @trigger_error(__METHOD__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED); + @trigger_error(__METHOD__.'() is deprecated since Symfony 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED); return $this->getSecret(); } diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php index 90f46cbd6b0cf..9e85ad417409e 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php @@ -76,7 +76,7 @@ public function getProviderKey() */ public function getKey() { - @trigger_error(__METHOD__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED); + @trigger_error(__METHOD__.'() is deprecated since Symfony 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED); return $this->getSecret(); } diff --git a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php index 0f331b6fbc6fe..e5c17233b6531 100644 --- a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php +++ b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php @@ -75,7 +75,7 @@ public function decide(TokenInterface $token, array $attributes, $object = null) */ public function supportsAttribute($attribute) { - @trigger_error('The '.__METHOD__.' is deprecated since version 2.8 and will be removed in version 3.0.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' is deprecated since Symfony 2.8 and will be removed in version 3.0.', E_USER_DEPRECATED); foreach ($this->voters as $voter) { if ($voter->supportsAttribute($attribute)) { @@ -91,7 +91,7 @@ public function supportsAttribute($attribute) */ public function supportsClass($class) { - @trigger_error('The '.__METHOD__.' is deprecated since version 2.8 and will be removed in version 3.0.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' is deprecated since Symfony 2.8 and will be removed in version 3.0.', E_USER_DEPRECATED); foreach ($this->voters as $voter) { if ($voter->supportsClass($class)) { diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/AbstractVoter.php b/src/Symfony/Component/Security/Core/Authorization/Voter/AbstractVoter.php index aaa6fdac250c5..efed7416f9733 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/AbstractVoter.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/AbstractVoter.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Security\Core\Authorization\Voter; -@trigger_error('The '.__NAMESPACE__.'\AbstractVoter class is deprecated since version 2.8, to be removed in 3.0. Upgrade to Symfony\Component\Security\Core\Authorization\Voter\Voter instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\AbstractVoter class is deprecated since Symfony 2.8, to be removed in 3.0. Upgrade to Symfony\Component\Security\Core\Authorization\Voter\Voter instead.', E_USER_DEPRECATED); use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; diff --git a/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php b/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php index 00a03940fde58..2d2f372ee25fe 100644 --- a/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php +++ b/src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php @@ -68,7 +68,7 @@ public function encodePassword($raw, $salt) $options = array('cost' => $this->cost); if ($salt) { - @trigger_error('Passing a $salt to '.__METHOD__.'() is deprecated since version 2.8 and will be ignored in 3.0.', E_USER_DEPRECATED); + @trigger_error('Passing a $salt to '.__METHOD__.'() is deprecated since Symfony 2.8 and will be ignored in 3.0.', E_USER_DEPRECATED); $options['salt'] = $salt; } diff --git a/src/Symfony/Component/Security/Core/LICENSE b/src/Symfony/Component/Security/Core/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Security/Core/LICENSE +++ b/src/Symfony/Component/Security/Core/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Security/Core/SecurityContext.php b/src/Symfony/Component/Security/Core/SecurityContext.php index 6d408373a6cdd..a550aa8f2b0e3 100644 --- a/src/Symfony/Component/Security/Core/SecurityContext.php +++ b/src/Symfony/Component/Security/Core/SecurityContext.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Security\Core; -@trigger_error('The '.__NAMESPACE__.'\SecurityContext class is deprecated since version 2.6 and will be removed in 3.0. Use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage or Symfony\Component\Security\Core\Authorization\AuthorizationChecker instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\SecurityContext class is deprecated since Symfony 2.6 and will be removed in 3.0. Use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage or Symfony\Component\Security\Core\Authorization\AuthorizationChecker instead.', E_USER_DEPRECATED); use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php index ca28d53c5cc42..e3e1c447af3cd 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php @@ -61,9 +61,9 @@ public function testVoteAuthenticatesTokenIfNecessary() ->will($this->returnValue(true)); // first run the token has not been re-authenticated yet, after isGranted is called, it should be equal - $this->assertFalse($newToken === $this->tokenStorage->getToken()); + $this->assertNotSame($newToken, $this->tokenStorage->getToken()); $this->assertTrue($this->authorizationChecker->isGranted('foo')); - $this->assertTrue($newToken === $this->tokenStorage->getToken()); + $this->assertSame($newToken, $this->tokenStorage->getToken()); } /** @@ -90,7 +90,7 @@ public function testIsGranted($decide) ->method('decide') ->will($this->returnValue($decide)); $this->tokenStorage->setToken($token); - $this->assertTrue($decide === $this->authorizationChecker->isGranted('ROLE_FOO')); + $this->assertSame($decide, $this->authorizationChecker->isGranted('ROLE_FOO')); } public function isGrantedProvider() diff --git a/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php b/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php index 0ebaed7467906..403307a5a49fd 100644 --- a/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php +++ b/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php @@ -41,7 +41,7 @@ public function testGetTokenDelegation() ->method('getToken') ->will($this->returnValue($token)); - $this->assertTrue($token === $this->securityContext->getToken()); + $this->assertSame($token, $this->securityContext->getToken()); } public function testSetTokenDelegation() diff --git a/src/Symfony/Component/Security/Core/Util/ClassUtils.php b/src/Symfony/Component/Security/Core/Util/ClassUtils.php index cdf03470f1119..6a544e2c2240f 100644 --- a/src/Symfony/Component/Security/Core/Util/ClassUtils.php +++ b/src/Symfony/Component/Security/Core/Util/ClassUtils.php @@ -13,7 +13,7 @@ use Symfony\Component\Security\Acl\Util\ClassUtils as AclClassUtils; -@trigger_error('The '.__NAMESPACE__.'\ClassUtils class is deprecated since version 2.8, to be removed in 3.0. Use Symfony\Component\Security\Acl\Util\ClassUtils instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\ClassUtils class is deprecated since Symfony 2.8, to be removed in 3.0. Use Symfony\Component\Security\Acl\Util\ClassUtils instead.', E_USER_DEPRECATED); /** * Class related functionality for objects that diff --git a/src/Symfony/Component/Security/Core/Util/SecureRandom.php b/src/Symfony/Component/Security/Core/Util/SecureRandom.php index 06ed893ae771e..73ddc326feb85 100644 --- a/src/Symfony/Component/Security/Core/Util/SecureRandom.php +++ b/src/Symfony/Component/Security/Core/Util/SecureRandom.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Security\Core\Util; -@trigger_error('The '.__NAMESPACE__.'\SecureRandom class is deprecated since version 2.8 and will be removed in 3.0. Use the random_bytes() function instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\SecureRandom class is deprecated since Symfony 2.8 and will be removed in 3.0. Use the random_bytes() function instead.', E_USER_DEPRECATED); /** * A secure random number generator implementation. diff --git a/src/Symfony/Component/Security/Core/Util/StringUtils.php b/src/Symfony/Component/Security/Core/Util/StringUtils.php index bb0c8b23b547f..edf2f6df9fe9e 100644 --- a/src/Symfony/Component/Security/Core/Util/StringUtils.php +++ b/src/Symfony/Component/Security/Core/Util/StringUtils.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Security\Core\Util; -@trigger_error('The '.__NAMESPACE__.'\\StringUtils class is deprecated since version 2.8 and will be removed in 3.0. Use hash_equals() instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\\StringUtils class is deprecated since Symfony 2.8 and will be removed in 3.0. Use hash_equals() instead.', E_USER_DEPRECATED); use Symfony\Polyfill\Util\Binary; diff --git a/src/Symfony/Component/Security/Csrf/LICENSE b/src/Symfony/Component/Security/Csrf/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Security/Csrf/LICENSE +++ b/src/Symfony/Component/Security/Csrf/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Security/Guard/LICENSE b/src/Symfony/Component/Security/Guard/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Security/Guard/LICENSE +++ b/src/Symfony/Component/Security/Guard/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php b/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php index deb6366a5970c..a6050acb34661 100644 --- a/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php +++ b/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php @@ -69,7 +69,7 @@ public function start(Request $request, AuthenticationException $authException = */ public function getKey() { - @trigger_error(__METHOD__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED); + @trigger_error(__METHOD__.'() is deprecated since Symfony 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED); return $this->getSecret(); } diff --git a/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php b/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php index 01f1db7cf7167..a552f34cf6569 100644 --- a/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php @@ -60,7 +60,7 @@ public function __construct(TokenStorageInterface $tokenStorage, HttpUtils $http throw new \InvalidArgumentException(sprintf('You should only define an option for one of "intention" or "csrf_token_id" for the "%s". Use the "csrf_token_id" as it replaces "intention".', __CLASS__)); } - @trigger_error('The "intention" option for the '.__CLASS__.' is deprecated since version 2.8 and will be removed in 3.0. Use the "csrf_token_id" option instead.', E_USER_DEPRECATED); + @trigger_error('The "intention" option for the '.__CLASS__.' is deprecated since Symfony 2.8 and will be removed in 3.0. Use the "csrf_token_id" option instead.', E_USER_DEPRECATED); $options['csrf_token_id'] = $options['intention']; } diff --git a/src/Symfony/Component/Security/Http/Firewall/SimpleFormAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/SimpleFormAuthenticationListener.php index 4836b1e523d6c..77eabc5a266b2 100644 --- a/src/Symfony/Component/Security/Http/Firewall/SimpleFormAuthenticationListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/SimpleFormAuthenticationListener.php @@ -74,7 +74,7 @@ public function __construct(TokenStorageInterface $tokenStorage, AuthenticationM throw new \InvalidArgumentException(sprintf('You should only define an option for one of "intention" or "csrf_token_id" for the "%s". Use the "csrf_token_id" as it replaces "intention".', __CLASS__)); } - @trigger_error('The "intention" option for the '.__CLASS__.' is deprecated since version 2.8 and will be removed in 3.0. Use the "csrf_token_id" option instead.', E_USER_DEPRECATED); + @trigger_error('The "intention" option for the '.__CLASS__.' is deprecated since Symfony 2.8 and will be removed in 3.0. Use the "csrf_token_id" option instead.', E_USER_DEPRECATED); $options['csrf_token_id'] = $options['intention']; } diff --git a/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php index 866d0c32d9c8b..122a0520e7622 100644 --- a/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php @@ -54,7 +54,7 @@ public function __construct(TokenStorageInterface $tokenStorage, AuthenticationM throw new \InvalidArgumentException(sprintf('You should only define an option for one of "intention" or "csrf_token_id" for the "%s". Use the "csrf_token_id" as it replaces "intention".', __CLASS__)); } - @trigger_error('The "intention" option for the '.__CLASS__.' is deprecated since version 2.8 and will be removed in 3.0. Use the "csrf_token_id" option instead.', E_USER_DEPRECATED); + @trigger_error('The "intention" option for the '.__CLASS__.' is deprecated since Symfony 2.8 and will be removed in 3.0. Use the "csrf_token_id" option instead.', E_USER_DEPRECATED); $options['csrf_token_id'] = $options['intention']; } diff --git a/src/Symfony/Component/Security/Http/LICENSE b/src/Symfony/Component/Security/Http/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Security/Http/LICENSE +++ b/src/Symfony/Component/Security/Http/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php b/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php index e5274db192b40..2b17523fae3ca 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php +++ b/src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php @@ -87,7 +87,7 @@ public function getRememberMeParameter() */ public function getKey() { - @trigger_error(__METHOD__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED); + @trigger_error(__METHOD__.'() is deprecated since Symfony 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED); return $this->getSecret(); } diff --git a/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php b/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php index db7a186e8d43f..cd3f17b4a77a1 100644 --- a/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php +++ b/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php @@ -46,7 +46,7 @@ class PersistentTokenBasedRememberMeServices extends AbstractRememberMeServices public function __construct(array $userProviders, $secret, $providerKey, array $options = array(), LoggerInterface $logger = null, SecureRandomInterface $secureRandom = null) { if (null !== $secureRandom) { - @trigger_error('The $secureRandom parameter in '.__METHOD__.' is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('The $secureRandom parameter in '.__METHOD__.' is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED); } parent::__construct($userProviders, $secret, $providerKey, $options, $logger); diff --git a/src/Symfony/Component/Security/LICENSE b/src/Symfony/Component/Security/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Security/LICENSE +++ b/src/Symfony/Component/Security/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php index 5d3d125088c8c..3f44cce777589 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -49,7 +49,7 @@ public function __construct($associative = false, $depth = 512) */ public function getLastError() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the decode() method instead to get the last JSON decoding error.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Catch the exception raised by the decode() method instead to get the last JSON decoding error.', E_USER_DEPRECATED); return $this->lastError; } diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php index 9bc0f1c1e6eb0..fa98e5665ccfe 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -39,7 +39,7 @@ public function __construct($bitmask = 0) */ public function getLastError() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the encode() method instead to get the last JSON encoding error.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Catch the exception raised by the encode() method instead to get the last JSON encoding error.', E_USER_DEPRECATED); return $this->lastError; } diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php b/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php index 43d20e9e03190..b6aeaeba7ad46 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php @@ -38,7 +38,7 @@ public function __construct(JsonEncode $encodingImpl = null, JsonDecode $decodin */ public function getLastEncodingError() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the Symfony\Component\Serializer\Encoder\JsonEncode::encode() method instead to get the last JSON encoding error.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Catch the exception raised by the Symfony\Component\Serializer\Encoder\JsonEncode::encode() method instead to get the last JSON encoding error.', E_USER_DEPRECATED); return $this->encodingImpl->getLastError(); } @@ -52,7 +52,7 @@ public function getLastEncodingError() */ public function getLastDecodingError() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the Symfony\Component\Serializer\Encoder\JsonDecode::decode() method instead to get the last JSON decoding error.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Catch the exception raised by the Symfony\Component\Serializer\Encoder\JsonDecode::decode() method instead to get the last JSON decoding error.', E_USER_DEPRECATED); return $this->decodingImpl->getLastError(); } @@ -98,7 +98,7 @@ public function supportsDecoding($format) */ public static function getLastErrorMessage() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use json_last_error_msg() instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use json_last_error_msg() instead.', E_USER_DEPRECATED); return json_last_error_msg(); } diff --git a/src/Symfony/Component/Serializer/LICENSE b/src/Symfony/Component/Serializer/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Serializer/LICENSE +++ b/src/Symfony/Component/Serializer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php index 37ab24a075f51..031bcf7d08c5c 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php @@ -158,7 +158,7 @@ public function setIgnoredAttributes(array $ignoredAttributes) */ public function setCamelizedAttributes(array $camelizedAttributes) { - @trigger_error(sprintf('%s is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('%s is deprecated since Symfony 2.7 and will be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.', __METHOD__), E_USER_DEPRECATED); if ($this->nameConverter && !$this->nameConverter instanceof CamelCaseToSnakeCaseNameConverter) { throw new LogicException(sprintf('%s cannot be called if a custom Name Converter is defined.', __METHOD__)); @@ -237,7 +237,7 @@ protected function handleCircularReference($object) */ protected function formatAttribute($attributeName) { - @trigger_error(sprintf('%s is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('%s is deprecated since Symfony 2.7 and will be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.', __METHOD__), E_USER_DEPRECATED); return $this->nameConverter ? $this->nameConverter->normalize($attributeName) : $attributeName; } diff --git a/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php index b676b833ca26b..4515c5e0fde6d 100644 --- a/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php @@ -49,7 +49,7 @@ public function supportsNormalization($data, $format = null) } /** - * Checks if the given class implements the NormalizableInterface. + * Checks if the given class implements the DenormalizableInterface. * * @param mixed $data Data to denormalize from * @param string $type The class to which the data should be denormalized diff --git a/src/Symfony/Component/Stopwatch/LICENSE b/src/Symfony/Component/Stopwatch/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Stopwatch/LICENSE +++ b/src/Symfony/Component/Stopwatch/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Templating/Asset/Package.php b/src/Symfony/Component/Templating/Asset/Package.php index beb6a90648bd9..e7fcd4b931f19 100644 --- a/src/Symfony/Component/Templating/Asset/Package.php +++ b/src/Symfony/Component/Templating/Asset/Package.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Templating\Asset; -@trigger_error('The Symfony\Component\Templating\Asset\Package is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); +@trigger_error('The Symfony\Component\Templating\Asset\Package is deprecated since Symfony 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); /** * The basic package will add a version to asset URLs. diff --git a/src/Symfony/Component/Templating/Asset/PathPackage.php b/src/Symfony/Component/Templating/Asset/PathPackage.php index 0ec12eb940823..0365c0dc6a579 100644 --- a/src/Symfony/Component/Templating/Asset/PathPackage.php +++ b/src/Symfony/Component/Templating/Asset/PathPackage.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Templating\Asset; -@trigger_error('The Symfony\Component\Templating\Asset\PathPackage is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); +@trigger_error('The Symfony\Component\Templating\Asset\PathPackage is deprecated since Symfony 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); /** * The path packages adds a version and a base path to asset URLs. diff --git a/src/Symfony/Component/Templating/Asset/UrlPackage.php b/src/Symfony/Component/Templating/Asset/UrlPackage.php index 2c2a659a8261b..104dd3a00a23b 100644 --- a/src/Symfony/Component/Templating/Asset/UrlPackage.php +++ b/src/Symfony/Component/Templating/Asset/UrlPackage.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Templating\Asset; -@trigger_error('The Symfony\Component\Templating\Asset\UrlPackage is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); +@trigger_error('The Symfony\Component\Templating\Asset\UrlPackage is deprecated since Symfony 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); /** * The URL packages adds a version and a base URL to asset URLs. diff --git a/src/Symfony/Component/Templating/Helper/AssetsHelper.php b/src/Symfony/Component/Templating/Helper/AssetsHelper.php index f07e1c7d76a08..363b4aa6d1e16 100644 --- a/src/Symfony/Component/Templating/Helper/AssetsHelper.php +++ b/src/Symfony/Component/Templating/Helper/AssetsHelper.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Templating\Helper; -@trigger_error('The Symfony\Component\Templating\Helper\AssetsHelper is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); +@trigger_error('The Symfony\Component\Templating\Helper\AssetsHelper is deprecated since Symfony 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); use Symfony\Component\Templating\Asset\PathPackage; use Symfony\Component\Templating\Asset\UrlPackage; diff --git a/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php b/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php index be161a40e364e..a246a1b52251c 100644 --- a/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php +++ b/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Templating\Helper; -@trigger_error('The Symfony\Component\Templating\Helper\CoreAssetsHelper is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); +@trigger_error('The Symfony\Component\Templating\Helper\CoreAssetsHelper is deprecated since Symfony 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); use Symfony\Component\Templating\Asset\PackageInterface; diff --git a/src/Symfony/Component/Templating/LICENSE b/src/Symfony/Component/Templating/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Templating/LICENSE +++ b/src/Symfony/Component/Templating/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Templating/Loader/Loader.php b/src/Symfony/Component/Templating/Loader/Loader.php index e50106f03b007..d3d16dd47d0b6 100644 --- a/src/Symfony/Component/Templating/Loader/Loader.php +++ b/src/Symfony/Component/Templating/Loader/Loader.php @@ -48,7 +48,7 @@ public function setLogger(LoggerInterface $logger) */ public function setDebugger(DebuggerInterface $debugger) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. Use the setLogger() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.4 and will be removed in 3.0. Use the setLogger() method instead.', E_USER_DEPRECATED); $this->debugger = $debugger; } diff --git a/src/Symfony/Component/Templating/PhpEngine.php b/src/Symfony/Component/Templating/PhpEngine.php index 0e89cfcf117c1..377ee46a43058 100644 --- a/src/Symfony/Component/Templating/PhpEngine.php +++ b/src/Symfony/Component/Templating/PhpEngine.php @@ -495,7 +495,7 @@ function ($value) use ($that) { */ public function convertEncoding($string, $to, $from) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use iconv() instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use iconv() instead.', E_USER_DEPRECATED); return iconv($from, $to, $string); } diff --git a/src/Symfony/Component/Templating/Tests/Helper/HelperTest.php b/src/Symfony/Component/Templating/Tests/Helper/HelperTest.php index 8921ff19c81fc..dec9082efc30f 100644 --- a/src/Symfony/Component/Templating/Tests/Helper/HelperTest.php +++ b/src/Symfony/Component/Templating/Tests/Helper/HelperTest.php @@ -20,7 +20,7 @@ public function testGetSetCharset() { $helper = new ProjectTemplateHelper(); $helper->setCharset('ISO-8859-1'); - $this->assertTrue('ISO-8859-1' === $helper->getCharset(), '->setCharset() sets the charset set related to this helper'); + $this->assertSame('ISO-8859-1', $helper->getCharset(), '->setCharset() sets the charset set related to this helper'); } } diff --git a/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php b/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php index b4bf42b57240a..c889d21817a6d 100644 --- a/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php +++ b/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php @@ -23,7 +23,7 @@ class CacheLoaderTest extends TestCase public function testConstructor() { $loader = new ProjectTemplateLoader($varLoader = new ProjectTemplateLoaderVar(), sys_get_temp_dir()); - $this->assertTrue($loader->getLoader() === $varLoader, '__construct() takes a template loader as its first argument'); + $this->assertSame($loader->getLoader(), $varLoader, '__construct() takes a template loader as its first argument'); $this->assertEquals(sys_get_temp_dir(), $loader->getDir(), '__construct() takes a directory where to store the cache as its second argument'); } diff --git a/src/Symfony/Component/Templating/Tests/PhpEngineTest.php b/src/Symfony/Component/Templating/Tests/PhpEngineTest.php index 4481c2abf526c..abbb6b583cf64 100644 --- a/src/Symfony/Component/Templating/Tests/PhpEngineTest.php +++ b/src/Symfony/Component/Templating/Tests/PhpEngineTest.php @@ -65,7 +65,7 @@ public function testGetSetHas() $engine[$foo] = 'bar'; $this->assertEquals($foo, $engine->get('bar'), '->set() takes an alias as a second argument'); - $this->assertTrue(isset($engine['bar'])); + $this->assertArrayHasKey('bar', $engine); try { $engine->get('foobar'); @@ -75,7 +75,7 @@ public function testGetSetHas() $this->assertEquals('The helper "foobar" is not defined.', $e->getMessage(), '->get() throws an InvalidArgumentException if the helper is not defined'); } - $this->assertTrue(isset($engine['bar'])); + $this->assertArrayHasKey('bar', $engine); $this->assertTrue($engine->has('foo'), '->has() returns true if the helper exists'); $this->assertFalse($engine->has('foobar'), '->has() returns false if the helper does not exist'); } diff --git a/src/Symfony/Component/Translation/Catalogue/DiffOperation.php b/src/Symfony/Component/Translation/Catalogue/DiffOperation.php index cb9a6f5bce77c..f29447e611953 100644 --- a/src/Symfony/Component/Translation/Catalogue/DiffOperation.php +++ b/src/Symfony/Component/Translation/Catalogue/DiffOperation.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Translation\Catalogue; -@trigger_error('The '.__NAMESPACE__.'\DiffOperation class is deprecated since version 2.8 and will be removed in 3.0. Use the TargetOperation class in the same namespace instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\DiffOperation class is deprecated since Symfony 2.8 and will be removed in 3.0. Use the TargetOperation class in the same namespace instead.', E_USER_DEPRECATED); /** * Diff operation between two catalogues. diff --git a/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php b/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php index 5d7cdd29d3789..18caa3657d2f5 100644 --- a/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/CsvFileDumper.php @@ -28,7 +28,7 @@ class CsvFileDumper extends FileDumper */ public function format(MessageCatalogue $messages, $domain = 'messages') { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); return $this->formatCatalogue($messages, $domain); } diff --git a/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php b/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php index 0535fda201046..8e33a4b30c288 100644 --- a/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php @@ -30,7 +30,7 @@ class IcuResFileDumper extends FileDumper */ public function format(MessageCatalogue $messages, $domain = 'messages') { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); return $this->formatCatalogue($messages, $domain); } diff --git a/src/Symfony/Component/Translation/Dumper/IniFileDumper.php b/src/Symfony/Component/Translation/Dumper/IniFileDumper.php index 36be230b5079c..3e7a91c3dde19 100644 --- a/src/Symfony/Component/Translation/Dumper/IniFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/IniFileDumper.php @@ -25,7 +25,7 @@ class IniFileDumper extends FileDumper */ public function format(MessageCatalogue $messages, $domain = 'messages') { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); return $this->formatCatalogue($messages, $domain); } diff --git a/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php b/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php index 022e165d55b77..3e38beaab272c 100644 --- a/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/JsonFileDumper.php @@ -25,7 +25,7 @@ class JsonFileDumper extends FileDumper */ public function format(MessageCatalogue $messages, $domain = 'messages') { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); return $this->formatCatalogue($messages, $domain); } diff --git a/src/Symfony/Component/Translation/Dumper/MoFileDumper.php b/src/Symfony/Component/Translation/Dumper/MoFileDumper.php index c252795802edf..e38e858ca2e67 100644 --- a/src/Symfony/Component/Translation/Dumper/MoFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/MoFileDumper.php @@ -26,7 +26,7 @@ class MoFileDumper extends FileDumper */ public function format(MessageCatalogue $messages, $domain = 'messages') { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); return $this->formatCatalogue($messages, $domain); } diff --git a/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php b/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php index 891f2f978cf03..1d2aaac749bf9 100644 --- a/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php @@ -25,7 +25,7 @@ class PhpFileDumper extends FileDumper */ protected function format(MessageCatalogue $messages, $domain) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); return $this->formatCatalogue($messages, $domain); } diff --git a/src/Symfony/Component/Translation/Dumper/PoFileDumper.php b/src/Symfony/Component/Translation/Dumper/PoFileDumper.php index 9e27bc7d9146c..b83ab3f6de275 100644 --- a/src/Symfony/Component/Translation/Dumper/PoFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/PoFileDumper.php @@ -25,7 +25,7 @@ class PoFileDumper extends FileDumper */ public function format(MessageCatalogue $messages, $domain = 'messages') { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); return $this->formatCatalogue($messages, $domain); } diff --git a/src/Symfony/Component/Translation/Dumper/QtFileDumper.php b/src/Symfony/Component/Translation/Dumper/QtFileDumper.php index 5c2a4344f4641..d8a794ee8e486 100644 --- a/src/Symfony/Component/Translation/Dumper/QtFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/QtFileDumper.php @@ -25,7 +25,7 @@ class QtFileDumper extends FileDumper */ public function format(MessageCatalogue $messages, $domain) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); return $this->formatCatalogue($messages, $domain); } diff --git a/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php b/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php index 6a7f65563d74d..1ce06af27423d 100644 --- a/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/XliffFileDumper.php @@ -51,7 +51,7 @@ public function formatCatalogue(MessageCatalogue $messages, $domain, array $opti */ protected function format(MessageCatalogue $messages, $domain) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); return $this->formatCatalogue($messages, $domain); } diff --git a/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php b/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php index 8e496488e2a0f..b2164214c1312 100644 --- a/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/YamlFileDumper.php @@ -49,7 +49,7 @@ public function formatCatalogue(MessageCatalogue $messages, $domain, array $opti */ protected function format(MessageCatalogue $messages, $domain) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED); return $this->formatCatalogue($messages, $domain); } diff --git a/src/Symfony/Component/Translation/LICENSE b/src/Symfony/Component/Translation/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Translation/LICENSE +++ b/src/Symfony/Component/Translation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Translation/Translator.php b/src/Symfony/Component/Translation/Translator.php index e8e55e53eb2eb..137348b19b055 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -154,7 +154,7 @@ public function getLocale() */ public function setFallbackLocale($locales) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the setFallbackLocales() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.3 and will be removed in 3.0. Use the setFallbackLocales() method instead.', E_USER_DEPRECATED); $this->setFallbackLocales(is_array($locales) ? $locales : array($locales)); } @@ -263,7 +263,7 @@ protected function getLoaders() */ public function getMessages($locale = null) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use TranslatorBagInterface::getCatalogue() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use TranslatorBagInterface::getCatalogue() method instead.', E_USER_DEPRECATED); $catalogue = $this->getCatalogue($locale); $messages = $catalogue->all(); diff --git a/src/Symfony/Component/Validator/ConstraintValidator.php b/src/Symfony/Component/Validator/ConstraintValidator.php index c060e91723fd7..a675aa44f3966 100644 --- a/src/Symfony/Component/Validator/ConstraintValidator.php +++ b/src/Symfony/Component/Validator/ConstraintValidator.php @@ -59,7 +59,7 @@ public function initialize(ExecutionContextInterface $context) */ protected function buildViolation($message, array $parameters = array()) { - @trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); if ($this->context instanceof ExecutionContextInterface2Dot5) { return $this->context->buildViolation($message, $parameters); @@ -82,7 +82,7 @@ protected function buildViolation($message, array $parameters = array()) */ protected function buildViolationInContext(ExecutionContextInterface $context, $message, array $parameters = array()) { - @trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); if ($context instanceof ExecutionContextInterface2Dot5) { return $context->buildViolation($message, $parameters); diff --git a/src/Symfony/Component/Validator/ConstraintViolation.php b/src/Symfony/Component/Validator/ConstraintViolation.php index 804b6a8ccfaeb..239d01a79f479 100644 --- a/src/Symfony/Component/Validator/ConstraintViolation.php +++ b/src/Symfony/Component/Validator/ConstraintViolation.php @@ -108,7 +108,7 @@ public function getMessageTemplate() */ public function getMessageParameters() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.7, to be removed in 3.0. Use the ConstraintViolation::getParameters() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.7, to be removed in 3.0. Use the ConstraintViolation::getParameters() method instead.', E_USER_DEPRECATED); return $this->parameters; } @@ -129,7 +129,7 @@ public function getParameters() */ public function getMessagePluralization() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.7, to be removed in 3.0. Use the ConstraintViolation::getPlural() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.7, to be removed in 3.0. Use the ConstraintViolation::getPlural() method instead.', E_USER_DEPRECATED); return $this->plural; } diff --git a/src/Symfony/Component/Validator/Constraints/Callback.php b/src/Symfony/Component/Validator/Constraints/Callback.php index 36e6087e1e98e..dc124393b6cdd 100644 --- a/src/Symfony/Component/Validator/Constraints/Callback.php +++ b/src/Symfony/Component/Validator/Constraints/Callback.php @@ -44,7 +44,7 @@ public function __construct($options = null) } if (is_array($options) && isset($options['methods'])) { - @trigger_error('The "methods" option of the '.__CLASS__.' class is deprecated since version 2.4 and will be removed in 3.0. Use the "callback" option instead.', E_USER_DEPRECATED); + @trigger_error('The "methods" option of the '.__CLASS__.' class is deprecated since Symfony 2.4 and will be removed in 3.0. Use the "callback" option instead.', E_USER_DEPRECATED); } if (is_array($options) && !isset($options['callback']) && !isset($options['methods']) && !isset($options['groups']) && !isset($options['payload'])) { diff --git a/src/Symfony/Component/Validator/Constraints/Collection/Optional.php b/src/Symfony/Component/Validator/Constraints/Collection/Optional.php index 68471f925579a..fbd3d7a8461cb 100644 --- a/src/Symfony/Component/Validator/Constraints/Collection/Optional.php +++ b/src/Symfony/Component/Validator/Constraints/Collection/Optional.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Constraints\Collection; -@trigger_error('The '.__NAMESPACE__.'\Optional class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Validator\Constraints\Optional class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\Optional class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Validator\Constraints\Optional class instead.', E_USER_DEPRECATED); use Symfony\Component\Validator\Constraints\Optional as BaseOptional; diff --git a/src/Symfony/Component/Validator/Constraints/Collection/Required.php b/src/Symfony/Component/Validator/Constraints/Collection/Required.php index 4b062bb558db7..96f9bc2dded2f 100644 --- a/src/Symfony/Component/Validator/Constraints/Collection/Required.php +++ b/src/Symfony/Component/Validator/Constraints/Collection/Required.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Constraints\Collection; -@trigger_error('The '.__NAMESPACE__.'\Required class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Validator\Constraints\Required class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\Required class is deprecated since Symfony 2.3 and will be removed in 3.0. Use the Symfony\Component\Validator\Constraints\Required class instead.', E_USER_DEPRECATED); use Symfony\Component\Validator\Constraints\Required as BaseRequired; diff --git a/src/Symfony/Component/Validator/Constraints/False.php b/src/Symfony/Component/Validator/Constraints/False.php index 1e103ade514d6..40dcc8e9a7396 100644 --- a/src/Symfony/Component/Validator/Constraints/False.php +++ b/src/Symfony/Component/Validator/Constraints/False.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Constraints; -@trigger_error('The '.__NAMESPACE__.'\False class is deprecated since version 2.7 and will be removed in 3.0. Use the IsFalse class in the same namespace instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\False class is deprecated since Symfony 2.7 and will be removed in 3.0. Use the IsFalse class in the same namespace instead.', E_USER_DEPRECATED); /** * @Annotation diff --git a/src/Symfony/Component/Validator/Constraints/FalseValidator.php b/src/Symfony/Component/Validator/Constraints/FalseValidator.php index 9614c3037fe92..c54a347f77c1a 100644 --- a/src/Symfony/Component/Validator/Constraints/FalseValidator.php +++ b/src/Symfony/Component/Validator/Constraints/FalseValidator.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Constraints; -@trigger_error('The '.__NAMESPACE__.'\FalseValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsFalseValidator class in the same namespace instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\FalseValidator class is deprecated since Symfony 2.7 and will be removed in 3.0. Use the IsFalseValidator class in the same namespace instead.', E_USER_DEPRECATED); /** * @author Bernhard Schussek diff --git a/src/Symfony/Component/Validator/Constraints/GroupSequence.php b/src/Symfony/Component/Validator/Constraints/GroupSequence.php index 319eff0eda966..c055bd4551650 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -104,7 +104,7 @@ public function __construct(array $groups) */ public function getIterator() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); return new \ArrayIterator($this->groups); } @@ -122,7 +122,7 @@ public function getIterator() */ public function offsetExists($offset) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); return isset($this->groups[$offset]); } @@ -142,7 +142,7 @@ public function offsetExists($offset) */ public function offsetGet($offset) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); if (!isset($this->groups[$offset])) { throw new OutOfBoundsException(sprintf( @@ -166,7 +166,7 @@ public function offsetGet($offset) */ public function offsetSet($offset, $value) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); if (null !== $offset) { $this->groups[$offset] = $value; @@ -188,7 +188,7 @@ public function offsetSet($offset, $value) */ public function offsetUnset($offset) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); unset($this->groups[$offset]); } @@ -204,7 +204,7 @@ public function offsetUnset($offset) */ public function count() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); return count($this->groups); } diff --git a/src/Symfony/Component/Validator/Constraints/IsbnValidator.php b/src/Symfony/Component/Validator/Constraints/IsbnValidator.php index 6ca8488a5c725..d7fcb28b4b50e 100644 --- a/src/Symfony/Component/Validator/Constraints/IsbnValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IsbnValidator.php @@ -49,10 +49,10 @@ public function validate($value, Constraint $constraint) if (null === $constraint->type) { if ($constraint->isbn10 && !$constraint->isbn13) { - @trigger_error('The "isbn10" option of the Isbn constraint is deprecated since version 2.5 and will be removed in 3.0. Use the "type" option instead.', E_USER_DEPRECATED); + @trigger_error('The "isbn10" option of the Isbn constraint is deprecated since Symfony 2.5 and will be removed in 3.0. Use the "type" option instead.', E_USER_DEPRECATED); $constraint->type = 'isbn10'; } elseif ($constraint->isbn13 && !$constraint->isbn10) { - @trigger_error('The "isbn13" option of the Isbn constraint is deprecated since version 2.5 and will be removed in 3.0. Use the "type" option instead.', E_USER_DEPRECATED); + @trigger_error('The "isbn13" option of the Isbn constraint is deprecated since Symfony 2.5 and will be removed in 3.0. Use the "type" option instead.', E_USER_DEPRECATED); $constraint->type = 'isbn13'; } } diff --git a/src/Symfony/Component/Validator/Constraints/Null.php b/src/Symfony/Component/Validator/Constraints/Null.php index 705d93fc41f3c..eef08268bfdbe 100644 --- a/src/Symfony/Component/Validator/Constraints/Null.php +++ b/src/Symfony/Component/Validator/Constraints/Null.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Constraints; -@trigger_error('The '.__NAMESPACE__.'\Null class is deprecated since version 2.7 and will be removed in 3.0. Use the IsNull class in the same namespace instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\Null class is deprecated since Symfony 2.7 and will be removed in 3.0. Use the IsNull class in the same namespace instead.', E_USER_DEPRECATED); /** * @Annotation diff --git a/src/Symfony/Component/Validator/Constraints/NullValidator.php b/src/Symfony/Component/Validator/Constraints/NullValidator.php index bd17eab528c20..61b6521c836af 100644 --- a/src/Symfony/Component/Validator/Constraints/NullValidator.php +++ b/src/Symfony/Component/Validator/Constraints/NullValidator.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Constraints; -@trigger_error('The '.__NAMESPACE__.'\NullValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsNullValidator class in the same namespace instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\NullValidator class is deprecated since Symfony 2.7 and will be removed in 3.0. Use the IsNullValidator class in the same namespace instead.', E_USER_DEPRECATED); /** * @author Bernhard Schussek diff --git a/src/Symfony/Component/Validator/Constraints/True.php b/src/Symfony/Component/Validator/Constraints/True.php index b9efff375e1bf..9dbf4036614d7 100644 --- a/src/Symfony/Component/Validator/Constraints/True.php +++ b/src/Symfony/Component/Validator/Constraints/True.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Constraints; -@trigger_error('The '.__NAMESPACE__.'\True class is deprecated since version 2.7 and will be removed in 3.0. Use the IsTrue class in the same namespace instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\True class is deprecated since Symfony 2.7 and will be removed in 3.0. Use the IsTrue class in the same namespace instead.', E_USER_DEPRECATED); /** * @Annotation diff --git a/src/Symfony/Component/Validator/Constraints/TrueValidator.php b/src/Symfony/Component/Validator/Constraints/TrueValidator.php index 14d879808da02..c4a886b7cee99 100644 --- a/src/Symfony/Component/Validator/Constraints/TrueValidator.php +++ b/src/Symfony/Component/Validator/Constraints/TrueValidator.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Constraints; -@trigger_error('The '.__NAMESPACE__.'\TrueValidator class is deprecated since version 2.7 and will be removed in 3.0. Use the IsTrueValidator class in the same namespace instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\TrueValidator class is deprecated since Symfony 2.7 and will be removed in 3.0. Use the IsTrueValidator class in the same namespace instead.', E_USER_DEPRECATED); /** * @author Bernhard Schussek diff --git a/src/Symfony/Component/Validator/Constraints/Valid.php b/src/Symfony/Component/Validator/Constraints/Valid.php index 0fb7829065225..50e75dd904a52 100644 --- a/src/Symfony/Component/Validator/Constraints/Valid.php +++ b/src/Symfony/Component/Validator/Constraints/Valid.php @@ -39,7 +39,7 @@ public function __construct($options = null) } if (is_array($options) && array_key_exists('deep', $options)) { - @trigger_error('The "deep" option for the Valid constraint is deprecated since version 2.5 and will be removed in 3.0. When traversing arrays, nested arrays are always traversed. When traversing nested objects, their traversal strategy is used.', E_USER_DEPRECATED); + @trigger_error('The "deep" option for the Valid constraint is deprecated since Symfony 2.5 and will be removed in 3.0. When traversing arrays, nested arrays are always traversed. When traversing nested objects, their traversal strategy is used.', E_USER_DEPRECATED); } parent::__construct($options); diff --git a/src/Symfony/Component/Validator/Context/ExecutionContext.php b/src/Symfony/Component/Validator/Context/ExecutionContext.php index 721766a253383..5d04aa3050061 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContext.php @@ -187,7 +187,7 @@ public function addViolation($message, array $parameters = array(), $invalidValu // API, as they are not present in the new interface anymore. // You should use buildViolation() instead. if (func_num_args() > 2) { - @trigger_error('The parameters $invalidValue, $plural and $code in method '.__METHOD__.' are deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED); + @trigger_error('The parameters $invalidValue, $plural and $code in method '.__METHOD__.' are deprecated since Symfony 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED); $this ->buildViolation($message, $parameters) @@ -321,7 +321,7 @@ public function getPropertyPath($subPath = '') */ public function addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED); if (func_num_args() > 2) { $this @@ -348,7 +348,7 @@ public function addViolationAt($subPath, $message, array $parameters = array(), */ public function validate($value, $subPath = '', $groups = null, $traverse = false, $deep = false) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator() method instead.', E_USER_DEPRECATED); if (is_array($value)) { // The $traverse flag is ignored for arrays @@ -386,7 +386,7 @@ public function validate($value, $subPath = '', $groups = null, $traverse = fals */ public function validateValue($value, $constraints, $subPath = '', $groups = null) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator() method instead.', E_USER_DEPRECATED); return $this ->getValidator() @@ -401,7 +401,7 @@ public function validateValue($value, $constraints, $subPath = '', $groups = nul */ public function getMetadataFactory() { - @trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0. Use the new Symfony\Component\Validator\Context\ExecutionContext::getValidator method in combination with Symfony\Component\Validator\Validator\ValidatorInterface::getMetadataFor or Symfony\Component\Validator\Validator\ValidatorInterface::hasMetadataFor method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' is deprecated since Symfony 2.5 and will be removed in 3.0. Use the new Symfony\Component\Validator\Context\ExecutionContext::getValidator method in combination with Symfony\Component\Validator\Validator\ValidatorInterface::getMetadataFor or Symfony\Component\Validator\Validator\ValidatorInterface::hasMetadataFor method instead.', E_USER_DEPRECATED); $validator = $this->getValidator(); diff --git a/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php b/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php index 3d5181f09a6a0..8c49c708ed412 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Context; -@trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContext class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContext class is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\MetadataFactoryInterface; @@ -26,8 +26,6 @@ */ class LegacyExecutionContext extends ExecutionContext { - private $metadataFactory; - /** * Creates a new context. * @@ -44,7 +42,5 @@ public function __construct(ValidatorInterface $validator, $root, MetadataFactor $translator, $translationDomain ); - - $this->metadataFactory = $metadataFactory; } } diff --git a/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php index 5c541077bf169..3cd4f79198c1d 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Context; -@trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory class is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\MetadataFactoryInterface; diff --git a/src/Symfony/Component/Validator/DefaultTranslator.php b/src/Symfony/Component/Validator/DefaultTranslator.php index 15712d0d68e12..cd9b5d838542b 100644 --- a/src/Symfony/Component/Validator/DefaultTranslator.php +++ b/src/Symfony/Component/Validator/DefaultTranslator.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator; -@trigger_error('The class '.__NAMESPACE__.'\DefaultTranslator is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Translation\IdentityTranslator instead.', E_USER_DEPRECATED); +@trigger_error('The class '.__NAMESPACE__.'\DefaultTranslator is deprecated since Symfony 2.7 and will be removed in 3.0. Use Symfony\Component\Translation\IdentityTranslator instead.', E_USER_DEPRECATED); use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Exception\BadMethodCallException; diff --git a/src/Symfony/Component/Validator/ExecutionContext.php b/src/Symfony/Component/Validator/ExecutionContext.php index 0603ffb62f937..a33fb6ae6c161 100644 --- a/src/Symfony/Component/Validator/ExecutionContext.php +++ b/src/Symfony/Component/Validator/ExecutionContext.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator; -@trigger_error('The '.__NAMESPACE__.'\ExecutionContext class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Context\ExecutionContext class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\ExecutionContext class is deprecated since Symfony 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Context\ExecutionContext class instead.', E_USER_DEPRECATED); use Symfony\Component\Translation\TranslatorInterface; diff --git a/src/Symfony/Component/Validator/LICENSE b/src/Symfony/Component/Validator/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Validator/LICENSE +++ b/src/Symfony/Component/Validator/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php b/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php index 01b80138d590e..34a3b44e72f83 100644 --- a/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php +++ b/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Mapping; -@trigger_error('The '.__NAMESPACE__.'\BlackholeMetadataFactory class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\BlackholeMetadataFactory class is deprecated since Symfony 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory class instead.', E_USER_DEPRECATED); use Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory as MappingBlackHoleMetadataFactory; diff --git a/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php b/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php index 63fc8ac05a405..37dc1b4bafba4 100644 --- a/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php +++ b/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Mapping\Cache; -@trigger_error('The '.__NAMESPACE__.'\ApcCache class is deprecated since version 2.5 and will be removed in 3.0. Use DoctrineCache with the Doctrine\Common\Cache\ApcCache class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\ApcCache class is deprecated since Symfony 2.5 and will be removed in 3.0. Use DoctrineCache with the Doctrine\Common\Cache\ApcCache class instead.', E_USER_DEPRECATED); use Symfony\Component\Validator\Mapping\ClassMetadata; diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php index abaefcab299c5..c79f1259e7958 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -133,7 +133,7 @@ public function __construct($class) */ public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath, $propagatedGroup = null) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); if (null === $propagatedGroup && Constraint::DEFAULT_GROUP === $group && ($this->hasGroupSequence() || $this->isGroupSequenceProvider())) { @@ -423,7 +423,7 @@ public function mergeConstraints(ClassMetadata $source) */ protected function addMemberMetadata(MemberMetadata $metadata) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the addPropertyMetadata() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the addPropertyMetadata() method instead.', E_USER_DEPRECATED); $this->addPropertyMetadata($metadata); } @@ -439,7 +439,7 @@ protected function addMemberMetadata(MemberMetadata $metadata) */ public function hasMemberMetadatas($property) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the hasPropertyMetadata() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the hasPropertyMetadata() method instead.', E_USER_DEPRECATED); return $this->hasPropertyMetadata($property); } @@ -455,7 +455,7 @@ public function hasMemberMetadatas($property) */ public function getMemberMetadatas($property) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the getPropertyMetadata() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use the getPropertyMetadata() method instead.', E_USER_DEPRECATED); return $this->getPropertyMetadata($property); } diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php b/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php index 4069b3fbcad0e..17c459bc30011 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Mapping; -@trigger_error('The '.__NAMESPACE__.'\ClassMetadataFactory class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\ClassMetadataFactory class is deprecated since Symfony 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory class instead.', E_USER_DEPRECATED); use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; diff --git a/src/Symfony/Component/Validator/Mapping/ElementMetadata.php b/src/Symfony/Component/Validator/Mapping/ElementMetadata.php index 69fe8bfa73729..2c9b080903b79 100644 --- a/src/Symfony/Component/Validator/Mapping/ElementMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ElementMetadata.php @@ -24,7 +24,7 @@ abstract class ElementMetadata extends GenericMetadata public function __construct() { if (!$this instanceof MemberMetadata && !$this instanceof ClassMetadata) { - @trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\GenericMetadata class instead.', E_USER_DEPRECATED); + @trigger_error('The '.__CLASS__.' class is deprecated since Symfony 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\GenericMetadata class instead.', E_USER_DEPRECATED); } } } diff --git a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php index 612c45c06c8aa..3f9e539dbcf28 100644 --- a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php @@ -74,7 +74,7 @@ public function __construct($class, $name, $property) */ public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath, $propagatedGroup = null) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); $visitor->visit($this, $value, $group, $propertyPath); @@ -184,7 +184,7 @@ public function isPrivate($objectOrClassName) */ public function isCascaded() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getCascadingStrategy() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the getCascadingStrategy() method instead.', E_USER_DEPRECATED); return (bool) ($this->cascadingStrategy & CascadingStrategy::CASCADE); } @@ -200,7 +200,7 @@ public function isCascaded() */ public function isCollectionCascaded() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getTraversalStrategy() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the getTraversalStrategy() method instead.', E_USER_DEPRECATED); return (bool) ($this->traversalStrategy & (TraversalStrategy::IMPLICIT | TraversalStrategy::TRAVERSE)); } @@ -216,7 +216,7 @@ public function isCollectionCascaded() */ public function isCollectionCascadedDeeply() { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getTraversalStrategy() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the getTraversalStrategy() method instead.', E_USER_DEPRECATED); return !($this->traversalStrategy & TraversalStrategy::STOP_RECURSION); } diff --git a/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php b/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php index 6f4518cab39e4..a35a1cd171b54 100644 --- a/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php +++ b/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php @@ -89,16 +89,16 @@ public function testArrayAccess() $this->list[] = $violation; $this->assertSame($violation, $this->list[0]); - $this->assertTrue(isset($this->list[0])); + $this->assertArrayHasKey(0, $this->list); unset($this->list[0]); - $this->assertFalse(isset($this->list[0])); + $this->assertArrayNotHasKey(0, $this->list); $this->list[10] = $violation; $this->assertSame($violation, $this->list[10]); - $this->assertTrue(isset($this->list[10])); + $this->assertArrayHasKey(10, $this->list); } public function testToString() diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php index 7fd982cd1779f..f686d3351becc 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php @@ -256,7 +256,7 @@ protected function assertNoViolation() */ protected function assertViolation($message, array $parameters = array(), $propertyPath = 'property.path', $invalidValue = 'InvalidValue', $plural = null, $code = null) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the buildViolation() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.3 and will be removed in 3.0. Use the buildViolation() method instead.', E_USER_DEPRECATED); $this->buildViolation($message) ->setParameters($parameters) @@ -275,7 +275,7 @@ protected function assertViolation($message, array $parameters = array(), $prope */ protected function assertViolations(array $expected) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the buildViolation() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.3 and will be removed in 3.0. Use the buildViolation() method instead.', E_USER_DEPRECATED); $violations = $this->context->getViolations(); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php b/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php index f298cd27e6257..2b906a918f0f5 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php @@ -62,15 +62,15 @@ public function testLegacyArrayAccess() $this->assertSame('Group 1', $sequence[0]); $this->assertSame('Group 2', $sequence[1]); - $this->assertTrue(isset($sequence[0])); - $this->assertFalse(isset($sequence[2])); + $this->assertArrayHasKey(0, $sequence); + $this->assertArrayNotHasKey(2, $sequence); unset($sequence[0]); - $this->assertFalse(isset($sequence[0])); + $this->assertArrayNotHasKey(0, $sequence); $sequence[] = 'Group 3'; - $this->assertTrue(isset($sequence[2])); + $this->assertArrayHasKey(2, $sequence); $this->assertSame('Group 3', $sequence[2]); $sequence[0] = 'Group 1'; - $this->assertTrue(isset($sequence[0])); + $this->assertArrayHasKey(0, $sequence); $this->assertSame('Group 1', $sequence[0]); } diff --git a/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php b/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php index da4ef197ad605..c6f41c647b319 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php @@ -13,6 +13,7 @@ use Symfony\Component\Validator\Constraints\Callback; use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\Expression; use Symfony\Component\Validator\Constraints\GroupSequence; use Symfony\Component\Validator\Constraints\NotNull; use Symfony\Component\Validator\Constraints\Traverse; @@ -648,6 +649,7 @@ public function testAccessCurrentObject() $called = false; $entity = new Entity(); $entity->firstName = 'Bernhard'; + $entity->data = array('firstName' => 'Bernhard'); $callback = function ($value, ExecutionContextInterface $context) use ($test, $entity, &$called) { $called = true; @@ -656,6 +658,7 @@ public function testAccessCurrentObject() $this->metadata->addConstraint(new Callback($callback)); $this->metadata->addPropertyConstraint('firstName', new Callback($callback)); + $this->metadata->addPropertyConstraint('data', new Collection(array('firstName' => new Expression('value == this.firstName')))); $this->validator->validate($entity); diff --git a/src/Symfony/Component/Validator/ValidationVisitor.php b/src/Symfony/Component/Validator/ValidationVisitor.php index 8f1657083adf7..b64830121f8f4 100644 --- a/src/Symfony/Component/Validator/ValidationVisitor.php +++ b/src/Symfony/Component/Validator/ValidationVisitor.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator; -@trigger_error('The '.__NAMESPACE__.'\ValidationVisitor class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\ValidationVisitor class is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Exception\NoSuchMetadataException; diff --git a/src/Symfony/Component/Validator/Validator.php b/src/Symfony/Component/Validator/Validator.php index 27a2be8ad2506..50d41d4ab6974 100644 --- a/src/Symfony/Component/Validator/Validator.php +++ b/src/Symfony/Component/Validator/Validator.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator; -@trigger_error('The '.__NAMESPACE__.'\Validator class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Validator\RecursiveValidator class instead.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\Validator class is deprecated since Symfony 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Validator\RecursiveValidator class instead.', E_USER_DEPRECATED); use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Constraints\Valid; diff --git a/src/Symfony/Component/Validator/Validator/LegacyValidator.php b/src/Symfony/Component/Validator/Validator/LegacyValidator.php index 588baa90135e0..c4d818b39facc 100644 --- a/src/Symfony/Component/Validator/Validator/LegacyValidator.php +++ b/src/Symfony/Component/Validator/Validator/LegacyValidator.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Validator; -@trigger_error('The '.__NAMESPACE__.'\LegacyValidator class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\LegacyValidator class is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); /** * A validator that supports both the API of Symfony < 2.5 and Symfony 2.5+. diff --git a/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php b/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php index 00c1c4d6e480a..12a38e26ec19d 100644 --- a/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php +++ b/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php @@ -108,7 +108,7 @@ public function validate($value, $constraints = null, $groups = null) $this->validateGenericNode( $value, - null, + $previousObject, is_object($value) ? spl_object_hash($value) : null, $metadata, $this->defaultPropertyPath, diff --git a/src/Symfony/Component/Validator/ValidatorBuilder.php b/src/Symfony/Component/Validator/ValidatorBuilder.php index 05ccaac4fd435..eaf9acc1af0a7 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilder.php +++ b/src/Symfony/Component/Validator/ValidatorBuilder.php @@ -285,7 +285,7 @@ public function setTranslationDomain($translationDomain) */ public function setPropertyAccessor(PropertyAccessorInterface $propertyAccessor) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. The validator will function without a property accessor.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. The validator will function without a property accessor.', E_USER_DEPRECATED); if (null !== $this->validatorFactory) { throw new ValidatorException('You cannot set a property accessor after setting a custom validator factory. Configure your validator factory instead.'); diff --git a/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php b/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php index 7410b0a6fc2d7..324e9d1e4dd4d 100644 --- a/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php +++ b/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Violation; -@trigger_error('The '.__NAMESPACE__.'\LegacyConstraintViolationBuilder class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); +@trigger_error('The '.__NAMESPACE__.'\LegacyConstraintViolationBuilder class is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); use Symfony\Component\Validator\ExecutionContextInterface; diff --git a/src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php b/src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php index 3554becaea7dd..c39efafb58765 100644 --- a/src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php @@ -193,7 +193,7 @@ public static function castFrameStub(FrameStub $frame, array $a, Stub $stub, $is */ public static function filterTrace(&$trace, $dumpArgs, $offset = 0) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use the castTraceStub method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use the castTraceStub method instead.', E_USER_DEPRECATED); if (0 > $offset || empty($trace[$offset])) { return $trace = null; diff --git a/src/Symfony/Component/VarDumper/Exception/ThrowingCasterException.php b/src/Symfony/Component/VarDumper/Exception/ThrowingCasterException.php index ed77feaa7b287..67d1f7b6d3c69 100644 --- a/src/Symfony/Component/VarDumper/Exception/ThrowingCasterException.php +++ b/src/Symfony/Component/VarDumper/Exception/ThrowingCasterException.php @@ -22,7 +22,7 @@ class ThrowingCasterException extends \Exception public function __construct($prev, \Exception $e = null) { if (!$prev instanceof \Exception) { - @trigger_error('Providing $caster as the first argument of the '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Provide directly the $prev exception instead.', E_USER_DEPRECATED); + @trigger_error('Providing $caster as the first argument of the '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Provide directly the $prev exception instead.', E_USER_DEPRECATED); $prev = $e; } diff --git a/src/Symfony/Component/VarDumper/LICENSE b/src/Symfony/Component/VarDumper/LICENSE index 207646a052dcd..15fc1c88d330b 100644 --- a/src/Symfony/Component/VarDumper/LICENSE +++ b/src/Symfony/Component/VarDumper/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2017 Fabien Potencier +Copyright (c) 2014-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/VarDumper/VarDumper.php b/src/Symfony/Component/VarDumper/VarDumper.php index c728439df21bd..1f5ddc5b26ab2 100644 --- a/src/Symfony/Component/VarDumper/VarDumper.php +++ b/src/Symfony/Component/VarDumper/VarDumper.php @@ -29,7 +29,7 @@ public static function dump($var) { if (null === self::$handler) { $cloner = new VarCloner(); - $dumper = 'cli' === PHP_SAPI ? new CliDumper() : new HtmlDumper(); + $dumper = in_array(PHP_SAPI, array('cli', 'phpdbg')) ? new CliDumper() : new HtmlDumper(); self::$handler = function ($var) use ($cloner, $dumper) { $dumper->dump($cloner->cloneVar($var)); }; diff --git a/src/Symfony/Component/Yaml/LICENSE b/src/Symfony/Component/Yaml/LICENSE index 17d16a13367dd..21d7fb9e2f29b 100644 --- a/src/Symfony/Component/Yaml/LICENSE +++ b/src/Symfony/Component/Yaml/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Symfony/Component/Yaml/Yaml.php b/src/Symfony/Component/Yaml/Yaml.php index 7a579432ac09b..595fbef07f889 100644 --- a/src/Symfony/Component/Yaml/Yaml.php +++ b/src/Symfony/Component/Yaml/Yaml.php @@ -33,7 +33,7 @@ class Yaml * you must validate the input before calling this method. Passing a file * as an input is a deprecated feature and will be removed in 3.0. * - * Note: the ability to pass file names to the Yaml::parse method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead. + * Note: the ability to pass file names to the Yaml::parse method is deprecated since Symfony 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead. * * @param string $input Path to a YAML file or a string containing YAML * @param bool $exceptionOnInvalidType True if an exception must be thrown on invalid types false otherwise @@ -49,7 +49,7 @@ public static function parse($input, $exceptionOnInvalidType = false, $objectSup // if input is a file, process it $file = ''; if (false === strpos($input, "\n") && is_file($input)) { - @trigger_error('The ability to pass file names to the '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead.', E_USER_DEPRECATED); + @trigger_error('The ability to pass file names to the '.__METHOD__.' method is deprecated since Symfony 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead.', E_USER_DEPRECATED); if (false === is_readable($input)) { throw new ParseException(sprintf('Unable to parse "%s" as the file is not readable.', $input));