diff --git a/composer.json b/composer.json index 72cd6aceee41af35915ec43d1224af0684fec30a..d26dc4e7839bbc45fe14a8cc42f3b74ff0e47f52 100644 --- a/composer.json +++ b/composer.json @@ -9,8 +9,7 @@ "hab/solr": "dev-master", "hab/paginator": "dev-master", "twig/twig": "~1.0", - "symfony/twig-bridge": "^3.2", - "willdurand/negotiation": "^2.3" + "symfony/twig-bridge": "^3.2" }, "repositories": [ { diff --git a/composer.lock b/composer.lock index 3ea9fd5f998b621ac2baec0972b55cb7dcbb7d79..4dbcf9d2e43cce74e5252ce2f5e4db81538e2fbc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "67835838ac5a25695376b0648bd924e7", + "content-hash": "d908f7b1863f5836c88a010d83d20bb3", "packages": [ { "name": "guzzlehttp/guzzle", @@ -224,16 +224,16 @@ }, { "name": "pimple/pimple", - "version": "v3.2.0", + "version": "v3.2.2", "source": { "type": "git", "url": "https://github.com/silexphp/Pimple.git", - "reference": "729436408ef52f9845f9b60d60b2563f314bf1a9" + "reference": "4d45fb62d96418396ec58ba76e6f065bca16e10a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/729436408ef52f9845f9b60d60b2563f314bf1a9", - "reference": "729436408ef52f9845f9b60d60b2563f314bf1a9", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/4d45fb62d96418396ec58ba76e6f065bca16e10a", + "reference": "4d45fb62d96418396ec58ba76e6f065bca16e10a", "shasum": "" }, "require": { @@ -270,7 +270,7 @@ "container", "dependency injection" ], - "time": "2017-07-17T17:05:21+00:00" + "time": "2017-07-23T07:32:15+00:00" }, { "name": "psr/container", @@ -420,16 +420,16 @@ }, { "name": "silex/silex", - "version": "v2.1.0", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/silexphp/Silex.git", - "reference": "d5a9d9af14a1424ddecc3da481769cf64e7d3b34" + "reference": "ec7d5b5334465414952d4b2e935e73bd085dbbbb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Silex/zipball/d5a9d9af14a1424ddecc3da481769cf64e7d3b34", - "reference": "d5a9d9af14a1424ddecc3da481769cf64e7d3b34", + "url": "https://api.github.com/repos/silexphp/Silex/zipball/ec7d5b5334465414952d4b2e935e73bd085dbbbb", + "reference": "ec7d5b5334465414952d4b2e935e73bd085dbbbb", "shasum": "" }, "require": { @@ -440,6 +440,9 @@ "symfony/http-kernel": "~2.8|^3.0", "symfony/routing": "~2.8|^3.0" }, + "conflict": { + "phpunit/phpunit": "<4.8.35 || >= 5.0, <5.4.3" + }, "replace": { "silex/api": "self.version", "silex/providers": "self.version" @@ -475,7 +478,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "2.2.x-dev" } }, "autoload": { @@ -502,24 +505,24 @@ "keywords": [ "microframework" ], - "time": "2017-05-03T15:21:42+00:00" + "time": "2017-07-23T07:40:14+00:00" }, { "name": "symfony/debug", - "version": "v3.3.5", + "version": "v3.3.10", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "63b85a968486d95ff9542228dc2e4247f16f9743" + "reference": "eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/63b85a968486d95ff9542228dc2e4247f16f9743", - "reference": "63b85a968486d95ff9542228dc2e4247f16f9743", + "url": "https://api.github.com/repos/symfony/debug/zipball/eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd", + "reference": "eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/log": "~1.0" }, "conflict": { @@ -558,24 +561,24 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-07-05T13:02:37+00:00" + "time": "2017-10-02T06:42:24+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.3.5", + "version": "v3.3.10", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "67535f1e3fd662bdc68d7ba317c93eecd973617e" + "reference": "d7ba037e4b8221956ab1e221c73c9e27e05dd423" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/67535f1e3fd662bdc68d7ba317c93eecd973617e", - "reference": "67535f1e3fd662bdc68d7ba317c93eecd973617e", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d7ba037e4b8221956ab1e221c73c9e27e05dd423", + "reference": "d7ba037e4b8221956ab1e221c73c9e27e05dd423", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "conflict": { "symfony/dependency-injection": "<3.3" @@ -621,24 +624,24 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-06-09T14:53:08+00:00" + "time": "2017-10-02T06:42:24+00:00" }, { "name": "symfony/http-foundation", - "version": "v3.3.5", + "version": "v3.3.10", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e307abe4b79ccbbfdced9b91c132fd128f456bc5" + "reference": "22cf9c2b1d9f67cc8e75ae7f4eaa60e4c1eff1f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e307abe4b79ccbbfdced9b91c132fd128f456bc5", - "reference": "e307abe4b79ccbbfdced9b91c132fd128f456bc5", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/22cf9c2b1d9f67cc8e75ae7f4eaa60e4c1eff1f8", + "reference": "22cf9c2b1d9f67cc8e75ae7f4eaa60e4c1eff1f8", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { @@ -674,24 +677,24 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2017-07-17T14:07:10+00:00" + "time": "2017-10-05T23:10:23+00:00" }, { "name": "symfony/http-kernel", - "version": "v3.3.5", + "version": "v3.3.10", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "16ceea64d23abddf58797a782ae96a5242282cd8" + "reference": "654f047a78756964bf91b619554f956517394018" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/16ceea64d23abddf58797a782ae96a5242282cd8", - "reference": "16ceea64d23abddf58797a782ae96a5242282cd8", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/654f047a78756964bf91b619554f956517394018", + "reference": "654f047a78756964bf91b619554f956517394018", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/log": "~1.0", "symfony/debug": "~2.8|~3.0", "symfony/event-dispatcher": "~2.8|~3.0", @@ -760,20 +763,20 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2017-07-17T19:08:23+00:00" + "time": "2017-10-05T23:40:19+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "f29dca382a6485c3cbe6379f0c61230167681937" + "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937", - "reference": "f29dca382a6485c3cbe6379f0c61230167681937", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7c8fae0ac1d216eb54349e6a8baa57d515fe8803", + "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803", "shasum": "" }, "require": { @@ -785,7 +788,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -819,24 +822,24 @@ "portable", "shim" ], - "time": "2017-06-09T14:24:12+00:00" + "time": "2017-06-14T15:44:48+00:00" }, { "name": "symfony/routing", - "version": "v3.3.5", + "version": "v3.3.10", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "dc70bbd0ca7b19259f63cdacc8af370bc32a4728" + "reference": "2e26fa63da029dab49bf9377b3b4f60a8fecb009" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/dc70bbd0ca7b19259f63cdacc8af370bc32a4728", - "reference": "dc70bbd0ca7b19259f63cdacc8af370bc32a4728", + "url": "https://api.github.com/repos/symfony/routing/zipball/2e26fa63da029dab49bf9377b3b4f60a8fecb009", + "reference": "2e26fa63da029dab49bf9377b3b4f60a8fecb009", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "conflict": { "symfony/config": "<2.8", @@ -897,24 +900,24 @@ "uri", "url" ], - "time": "2017-06-24T09:29:48+00:00" + "time": "2017-10-02T07:25:00+00:00" }, { "name": "symfony/twig-bridge", - "version": "v3.3.5", + "version": "v3.3.10", "source": { "type": "git", "url": "https://github.com/symfony/twig-bridge.git", - "reference": "614e2140b5aaea9870c716a01e1eb017174c35e5" + "reference": "cc40b1ea0efd030d422c762328345883a0404de4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/614e2140b5aaea9870c716a01e1eb017174c35e5", - "reference": "614e2140b5aaea9870c716a01e1eb017174c35e5", + "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/cc40b1ea0efd030d422c762328345883a0404de4", + "reference": "cc40b1ea0efd030d422c762328345883a0404de4", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "twig/twig": "~1.34|~2.4" }, "conflict": { @@ -984,20 +987,20 @@ ], "description": "Symfony Twig Bridge", "homepage": "https://symfony.com", - "time": "2017-07-17T14:07:10+00:00" + "time": "2017-10-02T06:42:24+00:00" }, { "name": "twig/twig", - "version": "v1.34.4", + "version": "v1.35.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "f878bab48edb66ad9c6ed626bf817f60c6c096ee" + "reference": "daa657073e55b0a78cce8fdd22682fddecc6385f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/f878bab48edb66ad9c6ed626bf817f60c6c096ee", - "reference": "f878bab48edb66ad9c6ed626bf817f60c6c096ee", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/daa657073e55b0a78cce8fdd22682fddecc6385f", + "reference": "daa657073e55b0a78cce8fdd22682fddecc6385f", "shasum": "" }, "require": { @@ -1011,7 +1014,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.34-dev" + "dev-master": "1.35-dev" } }, "autoload": { @@ -1049,59 +1052,7 @@ "keywords": [ "templating" ], - "time": "2017-07-04T13:19:31+00:00" - }, - { - "name": "willdurand/negotiation", - "version": "v2.3.1", - "source": { - "type": "git", - "url": "https://github.com/willdurand/Negotiation.git", - "reference": "03436ededa67c6e83b9b12defac15384cb399dc9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/willdurand/Negotiation/zipball/03436ededa67c6e83b9b12defac15384cb399dc9", - "reference": "03436ededa67c6e83b9b12defac15384cb399dc9", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-4": { - "Negotiation\\": "src/Negotiation" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "William Durand", - "email": "will+git@drnd.me" - } - ], - "description": "Content Negotiation tools for PHP provided as a standalone library.", - "homepage": "http://williamdurand.fr/Negotiation/", - "keywords": [ - "accept", - "content", - "format", - "header", - "negotiation" - ], - "time": "2017-05-14T17:21:12+00:00" + "time": "2017-09-27T18:06:46+00:00" } ], "packages-dev": [], diff --git a/resources/daten/dienste.xml b/resources/daten/dienste.xml index 0365e94a3758c254998862e1243d0227711727dd..9cd29a2e309b9a0b4db753c5001839adfbc84096 100644 --- a/resources/daten/dienste.xml +++ b/resources/daten/dienste.xml @@ -52,11 +52,20 @@ target="https://creativecommons.org/publicdomain/zero/1.0/" >CC0</ref>-Lizenz (Public Domain Dedication). Sie können ohne Auflagen für beliebige Zwecke benutzt werden. Die Einträge des statischen Repository - können dem zugehörigen <ref target="http://selbstzeugnisse.hab.de/repertorium/repository.xsd" - >XML Schema</ref> geprüft werden.</p> + können gegen das zugehörige <ref + target="http://selbstzeugnisse.hab.de/repertorium/repository.xsd">XML + Schema</ref> geprüft werden.</p> </div> <div> <head>Edition</head> + <p>Die Edition des Diariums von Herzog August dem Jüngeren ist in TEI-P5 kodiert + und steht zusammen mit der Einleitung, den Kodierungsrichtlinien und dem + Register zum <ref + target="http://selbstzeugnisse.hab.de/edition/diarium/download" + >Download</ref> zur Verfügung. Eine <ref + target="http://selbstzeugnisse.hab.de/beacon.txt">Beacon-Datei</ref> + verlinkt alle in der Edition getaggten Personen mit GND-Eintrag (Stand: + Sommer 2017). </p> </div> </div> </body> diff --git a/resources/daten/edition/einleitung.xml b/resources/daten/edition/einleitung.xml index 930d17890bf3c5d911cca779df658727f1e03c03..2ed10d5acf04680fe26e43fb30b9201f2946efdc 100644 --- a/resources/daten/edition/einleitung.xml +++ b/resources/daten/edition/einleitung.xml @@ -22,47 +22,70 @@ <body> <div> <head>Diarium von Herzog August dem Jüngeren</head> - <p> Die <ref target="http://selbstzeugnisse.hab.de/edition/diarium/front">Edition</ref> präsentiert das Tagebuch mit dem Originaltitel „Ephemerides. Sive Diarium", welches von August dem Jüngeren (1579-1666), Herzog zu Braunschweig und Lüneburg, dem Namensgeber der Herzog August Bibliothek Wolfenbüttel (HAB), verfasst wurde. Es liegt im Handschriftenbestand der HAB als Autograph vor und wurde bisher weder vollständig transkribiert noch ediert. Das in - der Forschungsliteratur oft als Reisetagebuch bezeichnete Diarium wird unter Beibehaltung des diaristischen Charakters und mit Blick auf innovative - Darstellungs- und Editionsformen digital ediert. Durch die Einbindung des digitalen - Faksimiles können je nach Fragestellung visuelle, autographe und typographische Merkmale des Textes untersucht werden. Im - Kommentar werden u. a. die zahlreichen erwähnten <ref target="http://selbstzeugnisse.hab.de/edition/personen">Personen</ref> und <ref target="http://selbstzeugnisse.hab.de/edition/orte">Orte</ref> identifiziert sowie politische und private Ereignisse erläutert. - Fremdsprachige Passagen werden mit Übersetzung präsentiert. Die weiteren editorischen Entscheidungen zur Textbearbeitung und -darstellung werden in den <ref target="http://selbstzeugnisse.hab.de/edition/richtlinien">Editions- und Kodierungsrichtlinien</ref> erklärt.</p> - <div> - <head>Die Quellen</head> - <listBibl> - <head>Das Tagebuch</head> - <bibl>Herzog August der Jüngere von Braunschweig-Wolfenbüttel (1579-1666): - Ephemerides. Sive Diarium (1594-1635). Herzog August Bibliothek, Signatur: - Cod. Guelf. 42.19 Aug. 2°, <ref - target="http://diglib.hab.de/mss/42-19-aug-2f/start.htm " - >Digitalisat</ref></bibl> - </listBibl> - <listBibl> - <head>Weitere herangezogene Quellen zur inhaltlichen Erschließung des - Tagebuches</head> - <bibl>Drei dem Reisetagebuch beiliegende Briefe, davon zwei eigenhändig von Hz. - August an Bernhard Rülow (Rostock 13.04.1594 und 24.11.1594) und ein - Gegenbrief (22.10.1665), <ref - target="http://diglib.hab.de/mss/42-19-aug-2f-a/start.htm" - >Digitalisat</ref> - </bibl> - <bibl> „Des Herzogs August Verschickung auf Akademien und in die Fremde; die - Wahl der Präzeptoren und Hofmeister und sein Aufenthalt zu Rostock und - Tübingen, auch der von seinen älteren Brüdern Julius Ernst und Franz nach - Absterben ihres Vaters unterhandelte brüderliche Vergleich und - Regierungseinrichtung“ Niedersächsisches Landesarchiv - Staatsarchiv Wolfenbüttel: 1 Alt - 22, Nr. 113 </bibl> - <bibl> „Des Herzog August eigenhändig geführte Rechnung über die von seinen - Handgeldern bestrittenen Ausgaben. Angefangen zu Dannenberg“ - Niedersächsisches Landesarchiv - Staatsarchiv Wolfenbüttel: 1 Alt 22, Nr. 117 </bibl> - <bibl> „Volrad v. Watzdorfs Rechnung über die zu Hzg. August d. J. Reisen und - Aufenthalt zu Tübingen und Straßburg verwandten Gelder“ Niedersächsisches Landesarchiv - Staatsarchiv Wolfenbüttel: 1 Alt 22, Nr. 114</bibl> - <bibl>Kalender aus dem Jahr 1617 mit Notizen von Herzog August d. J. von Braunschweig-Wolfenbüttel, inhaltlich beziehen die Notizen sich auf einen Zeitraum von mindestens 1571-1663. Herzog August Bibliothek, Signatur: <ref target="293-2-extrav.xml">Extravagantes 293.2</ref></bibl> - <bibl>Zum Vergleich und zur Ergänzung der Jahre 1596-1598 kann das umfangreiche Tagebuch von Martin Crusius, der zusammen mit August Student in Tübingen war, herangezogen werden: <ref target="http://opac.lbs-braunschweig.gbv.de/DB=2/SET=1/TTL=1/SHW?FRST=2">Diarium Martini Crusii, hrsg. von Wilhelm Göz und Ernst Conrad, Tübingen 1927-1961.</ref></bibl> - </listBibl> - </div> -<!-- <div> + <p> Die <ref target="http://selbstzeugnisse.hab.de/edition/diarium/front" + >Edition</ref> präsentiert das Tagebuch mit dem Originaltitel „Ephemerides. + Sive Diarium", welches von August dem Jüngeren (1579-1666), Herzog zu + Braunschweig und Lüneburg, dem Namensgeber der Herzog August Bibliothek + Wolfenbüttel (HAB), verfasst wurde. Es liegt im Handschriftenbestand der HAB als + Autograph vor und wurde bisher weder vollständig transkribiert noch ediert. Das + in der Forschungsliteratur oft als Reisetagebuch bezeichnete Diarium wird unter + Beibehaltung des diaristischen Charakters und mit Blick auf innovative + Darstellungs- und Editionsformen digital ediert. Durch die Einbindung des + digitalen Faksimiles können je nach Fragestellung visuelle, autographe und + typographische Merkmale des Textes untersucht werden. Im Kommentar werden u. a. + die zahlreichen erwähnten <ref + target="http://selbstzeugnisse.hab.de/edition/personen">Personen</ref> und + <ref target="http://selbstzeugnisse.hab.de/edition/orte">Orte</ref> + identifiziert sowie politische und private Ereignisse erläutert. Fremdsprachige + Passagen werden mit Übersetzung präsentiert. Die weiteren editorischen + Entscheidungen zur Textbearbeitung und -darstellung werden in den <ref + target="http://selbstzeugnisse.hab.de/edition/richtlinien">Editions- und + Kodierungsrichtlinien</ref> erklärt.</p> + <div> + <head>Die Quellen</head> + <listBibl> + <head>Das Tagebuch</head> + <bibl>Herzog August der Jüngere von Braunschweig-Wolfenbüttel (1579-1666): + Ephemerides. Sive Diarium (1594-1635). Herzog August Bibliothek, + Signatur: Cod. Guelf. 42.19 Aug. 2°, <ref + target="http://diglib.hab.de/mss/42-19-aug-2f/start.htm " + >Digitalisat</ref></bibl> + </listBibl> + <listBibl> + <head>Weitere herangezogene Quellen zur inhaltlichen Erschließung des + Tagebuches</head> + <bibl>Drei dem Reisetagebuch beiliegende Briefe, davon zwei eigenhändig von + Hz. August an Bernhard Rülow (Rostock 13.04.1594 und 24.11.1594) und ein + Gegenbrief (22.10.1665), <ref + target="http://diglib.hab.de/mss/42-19-aug-2f-a/start.htm" + >Digitalisat</ref> + </bibl> + <bibl> „Des Herzogs August Verschickung auf Akademien und in die Fremde; die + Wahl der Präzeptoren und Hofmeister und sein Aufenthalt zu Rostock und + Tübingen, auch der von seinen älteren Brüdern Julius Ernst und Franz + nach Absterben ihres Vaters unterhandelte brüderliche Vergleich und + Regierungseinrichtung“ Niedersächsisches Landesarchiv - Staatsarchiv + Wolfenbüttel: 1 Alt 22, Nr. 113 </bibl> + <bibl> „Des Herzog August eigenhändig geführte Rechnung über die von seinen + Handgeldern bestrittenen Ausgaben. Angefangen zu Dannenberg“ + Niedersächsisches Landesarchiv - Staatsarchiv Wolfenbüttel: 1 Alt 22, + Nr. 117 </bibl> + <bibl> „Volrad v. Watzdorfs Rechnung über die zu Hzg. August d. J. Reisen + und Aufenthalt zu Tübingen und Straßburg verwandten Gelder“ + Niedersächsisches Landesarchiv - Staatsarchiv Wolfenbüttel: 1 Alt 22, + Nr. 114</bibl> + <bibl>Kalender aus dem Jahr 1617 mit Notizen von Herzog August d. J. von + Braunschweig-Wolfenbüttel, inhaltlich beziehen die Notizen sich auf + einen Zeitraum von mindestens 1571-1663. Herzog August Bibliothek, + Signatur: <ref target="http://diglib.hab.de?db=mss&id=293-2-extrav&list=ms">Cod. Guelf. 293.2 Extrav.</ref></bibl> + <bibl>Zum Vergleich und zur Ergänzung der Jahre 1596-1598 kann das + umfangreiche Tagebuch von Martin Crusius, der zusammen mit August + Student in Tübingen war, herangezogen werden: <ref type="opac" cRef="138009732"> + Diarium Martini Crusii, hrsg. von Wilhelm Göz und Ernst Conrad, + Tübingen 1927-1961.</ref></bibl> + </listBibl> + </div> + <!-- <div> <head>Zitierempfehlung</head> <bibl >Inga Hanna Ralle (Hg.): Digitale Edition des Diariums von Herzog August dem Jüngeren. Hrsg. von der Herzog August Bibliothek. Digitale Edition. Wolfenbüttel 2017. (=Wolfenbütteler Digitale Editionen ; 1)</bibl> diff --git a/resources/mets.xml b/resources/mets.xml index 7155dfe7b83e7d6760e6f76bfe6dee582e81e228..fcf05596bcb80aa9d45683719fe18083d4403c12 100644 --- a/resources/mets.xml +++ b/resources/mets.xml @@ -347,7 +347,7 @@ <div ID="bibliographie" LABEL="Bibliographie"> <fptr FILEID="bibliographie.xml"/> </div> - <div ID="dienste" LABEL="Datendienste" TYPE="hidden"> + <div ID="dienste" LABEL="Datendienste"> <fptr FILEID="dienste.xml"/> </div> <div ID="extern" LABEL="Themenspezifische Websites und Fachportale"> diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index fab888c448f0c7bf0a496cf456e1c1b39a25ce29..5628b712a64838ea120c3bfe1a4776ed90f0f0c4 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -18,7 +18,6 @@ return array( 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), - 'Negotiation\\' => array($vendorDir . '/willdurand/negotiation/src/Negotiation'), 'HAB\\Paginator\\' => array($vendorDir . '/hab/paginator/lib'), 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 2aeb6343f406febea0ab71bda1560fc6832d8444..199b65b2a9710969b05c76396a0d2ae4b6dd4015 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -35,10 +35,6 @@ class ComposerStaticInitc8703132b487e10223bc213e8736dd8b 'Psr\\Http\\Message\\' => 17, 'Psr\\Container\\' => 14, ), - 'N' => - array ( - 'Negotiation\\' => 12, - ), 'H' => array ( 'HAB\\Paginator\\' => 14, @@ -100,10 +96,6 @@ class ComposerStaticInitc8703132b487e10223bc213e8736dd8b array ( 0 => __DIR__ . '/..' . '/psr/container/src', ), - 'Negotiation\\' => - array ( - 0 => __DIR__ . '/..' . '/willdurand/negotiation/src/Negotiation', - ), 'HAB\\Paginator\\' => array ( 0 => __DIR__ . '/..' . '/hab/paginator/lib', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index bdf0374884ea6873b54d2cbb7aa0d6c10dcb5919..7c34ba6ca821a1cbd90073a9e15fc72c0ed4df5d 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -238,23 +238,162 @@ } } }, + { + "name": "psr/container", + "version": "1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2017-02-14T16:28:37+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ] + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.3.0", + "version_normalized": "6.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699", + "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.0 || ^5.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "time": "2017-06-22T18:50:49+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ] + }, + { + "name": "hab/solr", + "version": "dev-master", + "version_normalized": "9999999-dev", + "source": { + "type": "git", + "url": "git@github.com:dmj/php-solr.git", + "reference": "f16f0026296c6a4ea61601d51cf1b070ce1e0742" + }, + "require": { + "guzzlehttp/guzzle": "~6.0" + }, + "time": "2017-07-20T13:50:14+00:00", + "type": "library", + "installation-source": "source", + "autoload": { + "psr-0": { + "HAB": "src/" + } + } + }, { "name": "symfony/routing", - "version": "v3.3.5", - "version_normalized": "3.3.5.0", + "version": "v3.3.10", + "version_normalized": "3.3.10.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "dc70bbd0ca7b19259f63cdacc8af370bc32a4728" + "reference": "2e26fa63da029dab49bf9377b3b4f60a8fecb009" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/dc70bbd0ca7b19259f63cdacc8af370bc32a4728", - "reference": "dc70bbd0ca7b19259f63cdacc8af370bc32a4728", + "url": "https://api.github.com/repos/symfony/routing/zipball/2e26fa63da029dab49bf9377b3b4f60a8fecb009", + "reference": "2e26fa63da029dab49bf9377b3b4f60a8fecb009", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "conflict": { "symfony/config": "<2.8", @@ -279,7 +418,7 @@ "symfony/http-foundation": "For using a Symfony Request object", "symfony/yaml": "For using the YAML loader" }, - "time": "2017-06-24T09:29:48+00:00", + "time": "2017-10-02T07:25:00+00:00", "type": "library", "extra": { "branch-alias": { @@ -320,17 +459,17 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.4.0", - "version_normalized": "1.4.0.0", + "version": "v1.5.0", + "version_normalized": "1.5.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "f29dca382a6485c3cbe6379f0c61230167681937" + "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937", - "reference": "f29dca382a6485c3cbe6379f0c61230167681937", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7c8fae0ac1d216eb54349e6a8baa57d515fe8803", + "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803", "shasum": "" }, "require": { @@ -339,11 +478,11 @@ "suggest": { "ext-mbstring": "For best performance" }, - "time": "2017-06-09T14:24:12+00:00", + "time": "2017-06-14T15:44:48+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "installation-source": "dist", @@ -381,27 +520,27 @@ }, { "name": "symfony/http-foundation", - "version": "v3.3.5", - "version_normalized": "3.3.5.0", + "version": "v3.3.10", + "version_normalized": "3.3.10.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e307abe4b79ccbbfdced9b91c132fd128f456bc5" + "reference": "22cf9c2b1d9f67cc8e75ae7f4eaa60e4c1eff1f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e307abe4b79ccbbfdced9b91c132fd128f456bc5", - "reference": "e307abe4b79ccbbfdced9b91c132fd128f456bc5", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/22cf9c2b1d9f67cc8e75ae7f4eaa60e4c1eff1f8", + "reference": "22cf9c2b1d9f67cc8e75ae7f4eaa60e4c1eff1f8", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { "symfony/expression-language": "~2.8|~3.0" }, - "time": "2017-07-17T14:07:10+00:00", + "time": "2017-10-05T23:10:23+00:00", "type": "library", "extra": { "branch-alias": { @@ -436,21 +575,21 @@ }, { "name": "symfony/event-dispatcher", - "version": "v3.3.5", - "version_normalized": "3.3.5.0", + "version": "v3.3.10", + "version_normalized": "3.3.10.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "67535f1e3fd662bdc68d7ba317c93eecd973617e" + "reference": "d7ba037e4b8221956ab1e221c73c9e27e05dd423" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/67535f1e3fd662bdc68d7ba317c93eecd973617e", - "reference": "67535f1e3fd662bdc68d7ba317c93eecd973617e", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d7ba037e4b8221956ab1e221c73c9e27e05dd423", + "reference": "d7ba037e4b8221956ab1e221c73c9e27e05dd423", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "conflict": { "symfony/dependency-injection": "<3.3" @@ -466,7 +605,7 @@ "symfony/dependency-injection": "", "symfony/http-kernel": "" }, - "time": "2017-06-09T14:53:08+00:00", + "time": "2017-10-02T06:42:24+00:00", "type": "library", "extra": { "branch-alias": { @@ -501,21 +640,21 @@ }, { "name": "symfony/debug", - "version": "v3.3.5", - "version_normalized": "3.3.5.0", + "version": "v3.3.10", + "version_normalized": "3.3.10.0", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "63b85a968486d95ff9542228dc2e4247f16f9743" + "reference": "eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/63b85a968486d95ff9542228dc2e4247f16f9743", - "reference": "63b85a968486d95ff9542228dc2e4247f16f9743", + "url": "https://api.github.com/repos/symfony/debug/zipball/eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd", + "reference": "eb95d9ce8f18dcc1b3dfff00cb624c402be78ffd", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/log": "~1.0" }, "conflict": { @@ -524,7 +663,7 @@ "require-dev": { "symfony/http-kernel": "~2.8|~3.0" }, - "time": "2017-07-05T13:02:37+00:00", + "time": "2017-10-02T06:42:24+00:00", "type": "library", "extra": { "branch-alias": { @@ -559,21 +698,21 @@ }, { "name": "symfony/http-kernel", - "version": "v3.3.5", - "version_normalized": "3.3.5.0", + "version": "v3.3.10", + "version_normalized": "3.3.10.0", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "16ceea64d23abddf58797a782ae96a5242282cd8" + "reference": "654f047a78756964bf91b619554f956517394018" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/16ceea64d23abddf58797a782ae96a5242282cd8", - "reference": "16ceea64d23abddf58797a782ae96a5242282cd8", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/654f047a78756964bf91b619554f956517394018", + "reference": "654f047a78756964bf91b619554f956517394018", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/log": "~1.0", "symfony/debug": "~2.8|~3.0", "symfony/event-dispatcher": "~2.8|~3.0", @@ -612,7 +751,7 @@ "symfony/finder": "", "symfony/var-dumper": "" }, - "time": "2017-07-17T19:08:23+00:00", + "time": "2017-10-05T23:40:19+00:00", "type": "library", "extra": { "branch-alias": { @@ -645,70 +784,19 @@ "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com" }, - { - "name": "psr/container", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2017-02-14T16:28:37+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ] - }, { "name": "pimple/pimple", - "version": "v3.2.0", - "version_normalized": "3.2.0.0", + "version": "v3.2.2", + "version_normalized": "3.2.2.0", "source": { "type": "git", "url": "https://github.com/silexphp/Pimple.git", - "reference": "729436408ef52f9845f9b60d60b2563f314bf1a9" + "reference": "4d45fb62d96418396ec58ba76e6f065bca16e10a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/729436408ef52f9845f9b60d60b2563f314bf1a9", - "reference": "729436408ef52f9845f9b60d60b2563f314bf1a9", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/4d45fb62d96418396ec58ba76e6f065bca16e10a", + "reference": "4d45fb62d96418396ec58ba76e6f065bca16e10a", "shasum": "" }, "require": { @@ -718,7 +806,7 @@ "require-dev": { "symfony/phpunit-bridge": "^3.2" }, - "time": "2017-07-17T17:05:21+00:00", + "time": "2017-07-23T07:32:15+00:00", "type": "library", "extra": { "branch-alias": { @@ -750,17 +838,17 @@ }, { "name": "silex/silex", - "version": "v2.1.0", - "version_normalized": "2.1.0.0", + "version": "v2.2.0", + "version_normalized": "2.2.0.0", "source": { "type": "git", "url": "https://github.com/silexphp/Silex.git", - "reference": "d5a9d9af14a1424ddecc3da481769cf64e7d3b34" + "reference": "ec7d5b5334465414952d4b2e935e73bd085dbbbb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Silex/zipball/d5a9d9af14a1424ddecc3da481769cf64e7d3b34", - "reference": "d5a9d9af14a1424ddecc3da481769cf64e7d3b34", + "url": "https://api.github.com/repos/silexphp/Silex/zipball/ec7d5b5334465414952d4b2e935e73bd085dbbbb", + "reference": "ec7d5b5334465414952d4b2e935e73bd085dbbbb", "shasum": "" }, "require": { @@ -771,6 +859,9 @@ "symfony/http-kernel": "~2.8|^3.0", "symfony/routing": "~2.8|^3.0" }, + "conflict": { + "phpunit/phpunit": "<4.8.35 || >= 5.0, <5.4.3" + }, "replace": { "silex/api": "self.version", "silex/providers": "self.version" @@ -803,11 +894,11 @@ "symfony/web-link": "^3.3", "twig/twig": "~1.28|~2.0" }, - "time": "2017-05-03T15:21:42+00:00", + "time": "2017-07-23T07:40:14+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "2.2.x-dev" } }, "installation-source": "dist", @@ -838,17 +929,17 @@ }, { "name": "twig/twig", - "version": "v1.34.4", - "version_normalized": "1.34.4.0", + "version": "v1.35.0", + "version_normalized": "1.35.0.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "f878bab48edb66ad9c6ed626bf817f60c6c096ee" + "reference": "daa657073e55b0a78cce8fdd22682fddecc6385f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/f878bab48edb66ad9c6ed626bf817f60c6c096ee", - "reference": "f878bab48edb66ad9c6ed626bf817f60c6c096ee", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/daa657073e55b0a78cce8fdd22682fddecc6385f", + "reference": "daa657073e55b0a78cce8fdd22682fddecc6385f", "shasum": "" }, "require": { @@ -859,11 +950,11 @@ "symfony/debug": "~2.7", "symfony/phpunit-bridge": "~3.3@dev" }, - "time": "2017-07-04T13:19:31+00:00", + "time": "2017-09-27T18:06:46+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.34-dev" + "dev-master": "1.35-dev" } }, "installation-source": "dist", @@ -905,21 +996,21 @@ }, { "name": "symfony/twig-bridge", - "version": "v3.3.5", - "version_normalized": "3.3.5.0", + "version": "v3.3.10", + "version_normalized": "3.3.10.0", "source": { "type": "git", "url": "https://github.com/symfony/twig-bridge.git", - "reference": "614e2140b5aaea9870c716a01e1eb017174c35e5" + "reference": "cc40b1ea0efd030d422c762328345883a0404de4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/614e2140b5aaea9870c716a01e1eb017174c35e5", - "reference": "614e2140b5aaea9870c716a01e1eb017174c35e5", + "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/cc40b1ea0efd030d422c762328345883a0404de4", + "reference": "cc40b1ea0efd030d422c762328345883a0404de4", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "twig/twig": "~1.34|~2.4" }, "conflict": { @@ -959,7 +1050,7 @@ "symfony/web-link": "For using the WebLinkExtension", "symfony/yaml": "For using the YamlExtension" }, - "time": "2017-07-17T14:07:10+00:00", + "time": "2017-10-02T06:42:24+00:00", "type": "symfony-bridge", "extra": { "branch-alias": { @@ -991,147 +1082,5 @@ ], "description": "Symfony Twig Bridge", "homepage": "https://symfony.com" - }, - { - "name": "guzzlehttp/guzzle", - "version": "6.3.0", - "version_normalized": "6.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699", - "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699", - "shasum": "" - }, - "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", - "php": ">=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.0 || ^5.0", - "psr/log": "^1.0" - }, - "suggest": { - "psr/log": "Required for using the Log middleware" - }, - "time": "2017-06-22T18:50:49+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ] - }, - { - "name": "willdurand/negotiation", - "version": "v2.3.1", - "version_normalized": "2.3.1.0", - "source": { - "type": "git", - "url": "https://github.com/willdurand/Negotiation.git", - "reference": "03436ededa67c6e83b9b12defac15384cb399dc9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/willdurand/Negotiation/zipball/03436ededa67c6e83b9b12defac15384cb399dc9", - "reference": "03436ededa67c6e83b9b12defac15384cb399dc9", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.5" - }, - "time": "2017-05-14T17:21:12+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Negotiation\\": "src/Negotiation" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "William Durand", - "email": "will+git@drnd.me" - } - ], - "description": "Content Negotiation tools for PHP provided as a standalone library.", - "homepage": "http://williamdurand.fr/Negotiation/", - "keywords": [ - "accept", - "content", - "format", - "header", - "negotiation" - ] - }, - { - "name": "hab/solr", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "git@github.com:dmj/php-solr.git", - "reference": "f16f0026296c6a4ea61601d51cf1b070ce1e0742" - }, - "require": { - "guzzlehttp/guzzle": "~6.0" - }, - "time": "2017-07-20T13:50:14+00:00", - "type": "library", - "installation-source": "source", - "autoload": { - "psr-0": { - "HAB": "src/" - } - } } ] diff --git a/vendor/pimple/pimple/CHANGELOG b/vendor/pimple/pimple/CHANGELOG index 2f860d79ed59b261c23d91eb0920202abf8b8394..f277b969eac1a9bbad95dba0a38beaeda40edf8a 100644 --- a/vendor/pimple/pimple/CHANGELOG +++ b/vendor/pimple/pimple/CHANGELOG @@ -1,4 +1,12 @@ -* 3.2.0 (2017-XX-XX) +* 3.2.2 (2017-07-23) + + * reverted extending a protected closure throws an exception (deprecated it instead) + +* 3.2.1 (2017-07-17) + + * fixed PHP error + +* 3.2.0 (2017-07-17) * added a PSR-11 service locator * added a PSR-11 wrapper diff --git a/vendor/pimple/pimple/ext/pimple/php_pimple.h b/vendor/pimple/pimple/ext/pimple/php_pimple.h index 94aef1285418be8f71664afccd3614b4bc1992a4..258f3eeae9b6dd1a803f072fd52c61457df12502 100644 --- a/vendor/pimple/pimple/ext/pimple/php_pimple.h +++ b/vendor/pimple/pimple/ext/pimple/php_pimple.h @@ -41,7 +41,7 @@ extern zend_module_entry pimple_module_entry; #include "TSRM.h" #endif -#define PIMPLE_VERSION "3.2.0-DEV" +#define PIMPLE_VERSION "3.2.2-DEV" #define PIMPLE_NS "Pimple" #define PSR_CONTAINER_NS "Psr\\Container" diff --git a/vendor/pimple/pimple/ext/pimple/pimple.c b/vendor/pimple/pimple/ext/pimple/pimple.c index b2dd6176af1fa6ae99f33dbd3c48de8d97e1e3ff..c80499b3995684eaccfaf1017e662b54b6cd446f 100644 --- a/vendor/pimple/pimple/ext/pimple/pimple.c +++ b/vendor/pimple/pimple/ext/pimple/pimple.c @@ -715,10 +715,16 @@ PHP_METHOD(Pimple, extend) RETURN_NULL(); } - if (value->type != PIMPLE_IS_SERVICE || zend_hash_index_exists(&pobj->protected, value->handle_num)) { + if (value->type != PIMPLE_IS_SERVICE) { pimple_throw_exception_string(pimple_ce_InvalidServiceIdentifierException, Z_STRVAL_P(offset), Z_STRLEN_P(offset) TSRMLS_CC); RETURN_NULL(); } + if (zend_hash_index_exists(&pobj->protected, value->handle_num)) { + int er = EG(error_reporting); + EG(error_reporting) = 0; + php_error(E_DEPRECATED, "How Pimple behaves when extending protected closures will be fixed in Pimple 4. Are you sure \"%s\" should be protected?", Z_STRVAL_P(offset)); + EG(error_reporting) = er; + } break; case IS_DOUBLE: case IS_BOOL: @@ -733,11 +739,17 @@ PHP_METHOD(Pimple, extend) pimple_throw_exception_string(pimple_ce_UnknownIdentifierException, Z_STRVAL_P(offset), Z_STRLEN_P(offset) TSRMLS_CC); RETURN_NULL(); } - if (value->type != PIMPLE_IS_SERVICE || zend_hash_index_exists(&pobj->protected, value->handle_num)) { + if (value->type != PIMPLE_IS_SERVICE) { convert_to_string(offset); pimple_throw_exception_string(pimple_ce_InvalidServiceIdentifierException, Z_STRVAL_P(offset), Z_STRLEN_P(offset) TSRMLS_CC); RETURN_NULL(); } + if (zend_hash_index_exists(&pobj->protected, value->handle_num)) { + int er = EG(error_reporting); + EG(error_reporting) = 0; + php_error(E_DEPRECATED, "How Pimple behaves when extending protected closures will be fixed in Pimple 4. Are you sure \"%ld\" should be protected?", index); + EG(error_reporting) = er; + } break; case IS_NULL: default: diff --git a/vendor/pimple/pimple/src/Pimple/Container.php b/vendor/pimple/pimple/src/Pimple/Container.php index 73a4ebcdfa140621c85801b608c2155d003e6f48..e761964bec440921a53fddb15502b1e8c54533a9 100644 --- a/vendor/pimple/pimple/src/Pimple/Container.php +++ b/vendor/pimple/pimple/src/Pimple/Container.php @@ -241,10 +241,14 @@ class Container implements \ArrayAccess throw new FrozenServiceException($id); } - if (!is_object($this->values[$id]) || !method_exists($this->values[$id], '__invoke') || isset($this->protected[$this->values[$id]])) { + if (!is_object($this->values[$id]) || !method_exists($this->values[$id], '__invoke')) { throw new InvalidServiceIdentifierException($id); } + if (isset($this->protected[$this->values[$id]])) { + @trigger_error(sprintf('How Pimple behaves when extending protected closures will be fixed in Pimple 4. Are you sure "%s" should be protected?', $id), E_USER_DEPRECATED); + } + if (!is_object($callable) || !method_exists($callable, '__invoke')) { throw new ExpectedInvokableException('Extension service definition is not a Closure or invokable object.'); } diff --git a/vendor/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php b/vendor/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php index 535c5ede295d3721045ed2ef7987c24b843e0aed..61e49848a9683a18f2b55bcdfb7ca450fee94ad8 100644 --- a/vendor/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php +++ b/vendor/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php @@ -26,7 +26,7 @@ namespace Pimple\Psr11; -use Pimple\Container; +use Pimple\Container as PimpleContainer; use Pimple\Exception\UnknownIdentifierException; use Psr\Container\ContainerInterface; @@ -41,10 +41,10 @@ class ServiceLocator implements ContainerInterface private $aliases = array(); /** - * @param Container $container The Container instance used to locate services - * @param array $ids Array of service ids that can be located. String keys can be used to define aliases + * @param PimpleContainer $container The Container instance used to locate services + * @param array $ids Array of service ids that can be located. String keys can be used to define aliases */ - public function __construct(Container $container, array $ids) + public function __construct(PimpleContainer $container, array $ids) { $this->container = $container; diff --git a/vendor/pimple/pimple/src/Pimple/Tests/PimpleTest.php b/vendor/pimple/pimple/src/Pimple/Tests/PimpleTest.php index 09a640f7a8092e20c0043e45e84f8c3414d847f4..acb66e000261fd76e151cd2f2de3ad69dfc33ebf 100644 --- a/vendor/pimple/pimple/src/Pimple/Tests/PimpleTest.php +++ b/vendor/pimple/pimple/src/Pimple/Tests/PimpleTest.php @@ -392,17 +392,21 @@ class PimpleTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException \Pimple\Exception\InvalidServiceIdentifierException - * @expectedExceptionMessage Identifier "foo" does not contain an object definition. + * @group legacy + * @expectedDeprecation How Pimple behaves when extending protected closures will be fixed in Pimple 4. Are you sure "foo" should be protected? */ - public function testExtendFailsIfEntryIsProtected() + public function testExtendingProtectedClosureDeprecation() { $pimple = new Container(); $pimple['foo'] = $pimple->protect(function () { return 'bar'; }); - $pimple->extend('foo', function () {}); + $pimple->extend('foo', function ($value) { + return $value.'-baz'; + }); + + $this->assertSame('bar-baz', $pimple['foo']); } /** diff --git a/vendor/silex/silex/.travis.yml b/vendor/silex/silex/.travis.yml index fed522687aa2060a28cb73e5a0d075b01a0f055f..a2b7fe8c6e400eb1a915a08c826da00bc618a43e 100644 --- a/vendor/silex/silex/.travis.yml +++ b/vendor/silex/silex/.travis.yml @@ -9,18 +9,31 @@ env: cache: directories: - $HOME/.composer/cache/files + - .phpunit before_install: - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi before_script: - # symfony/* - - sh -c "if [ '$TWIG_VERSION' != '2.0' ]; then sed -i 's/~1.8|~2.0/~1.8/g' composer.json; composer update; fi" - - sh -c "if [ '$SYMFONY_DEPS_VERSION' = '3.0' ]; then sed -i 's/~2\.8|^3\.0/3.0.*@dev/g' composer.json; composer update; fi" - - sh -c "if [ '$SYMFONY_DEPS_VERSION' = '3.1' ]; then sed -i 's/~2\.8|^3\.0/3.1.*@dev/g' composer.json; composer update; fi" - - sh -c "if [ '$SYMFONY_DEPS_VERSION' = '3.2' ]; then sed -i 's/~2\.8|^3\.0/3.2.*@dev/g' composer.json; composer update; fi" - - sh -c "if [ '$SYMFONY_DEPS_VERSION' = '' ]; then sed -i 's/~2\.8|^3\.0/2.8.*@dev/g' composer.json; composer update; fi" - - composer install + # Twig 1.x + - if [[ $TWIG_VERSION != 2.0 ]]; then sed -i 's/~1.8|~2.0/~1.8/g' composer.json; fi + + # Symfony 2.8 + - if [[ $SYMFONY_DEPS_VERSION = 2.8 ]]; then sed -i 's/~2\.8|^3\.0/2.8.*@dev/g' composer.json; fi + # Symfony 3.0 + - if [[ $SYMFONY_DEPS_VERSION = 3.0 ]]; then sed -i 's/~2\.8|^3\.0/3.0.*@dev/g' composer.json; fi + # Symfony 3.1 + - if [[ $SYMFONY_DEPS_VERSION = 3.1 ]]; then sed -i 's/~2\.8|^3\.0/3.1.*@dev/g' composer.json; fi + # Symfony 3.2 + - if [[ $SYMFONY_DEPS_VERSION = 3.2 ]]; then sed -i 's/~2\.8|^3\.0/3.2.*@dev/g' composer.json; fi + # Symfony 3.3 + - | + if [[ $SYMFONY_DEPS_VERSION = 3.3 ]]; then + sed -i 's/~2\.8|^3\.0/3.3.*@dev/g' composer.json; + composer require --dev --no-update symfony/web-link:3.3.* + fi + + - composer update --no-suggest script: ./vendor/bin/simple-phpunit @@ -29,16 +42,18 @@ matrix: - php: 5.5 - php: 5.6 env: TWIG_VERSION=2.0 + - php: 5.6 + env: SYMFONY_DEPS_VERSION=2.8 - php: 5.6 env: SYMFONY_DEPS_VERSION=3.0 - php: 5.6 env: SYMFONY_DEPS_VERSION=3.1 - php: 5.6 env: SYMFONY_DEPS_VERSION=3.2 + - php: 5.6 + env: SYMFONY_DEPS_VERSION=3.3 + - php: 5.6 - php: 7.0 - php: 7.1 - php: hhvm - -cache: - directories: - - .phpunit + dist: trusty diff --git a/vendor/silex/silex/composer.json b/vendor/silex/silex/composer.json index aa2f24ee1084ac90078ede4093793fe6e555181b..935c51812bcd864685b43e340780c814ec04858d 100644 --- a/vendor/silex/silex/composer.json +++ b/vendor/silex/silex/composer.json @@ -50,6 +50,9 @@ "monolog/monolog": "^1.4.1", "symfony/web-link": "^3.3" }, + "conflict": { + "phpunit/phpunit": "<4.8.35 || >= 5.0, <5.4.3" + }, "replace": { "silex/api": "self.version", "silex/providers": "self.version" @@ -62,7 +65,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "2.2.x-dev" } }, "minimum-stability": "dev" diff --git a/vendor/silex/silex/doc/changelog.rst b/vendor/silex/silex/doc/changelog.rst index 81beee925fec018ce4a509843df9901da34601aa..a2917561a62f3e0014740387f20723222720fb68 100644 --- a/vendor/silex/silex/doc/changelog.rst +++ b/vendor/silex/silex/doc/changelog.rst @@ -1,6 +1,15 @@ Changelog ========= +2.2.0 (2017-07-23) +------------------ + +* added json manifest version strategy support +* fixed EsiFragment constructor +* fixed RedirectableUrlMatcher compatibility with Symfony +* fixed compatibility with Pimple 3.2 +* fixed WebTestCase compatibility with PHPUnit 6+ + 2.1.0 (2017-05-03) ------------------ diff --git a/vendor/silex/silex/doc/providers/csrf.rst b/vendor/silex/silex/doc/providers/csrf.rst index 3bd35f4b0bcb1d0df4ace8420e5481ddefc9d27b..a055c112ecf4c1f7236ccd5269d00d149c310b5c 100644 --- a/vendor/silex/silex/doc/providers/csrf.rst +++ b/vendor/silex/silex/doc/providers/csrf.rst @@ -13,10 +13,8 @@ Services -------- * **csrf.token_manager**: An instance of an implementation of the - `CsrfProviderInterface - <http://api.symfony.com/master/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.html>`_, - defaults to a `DefaultCsrfProvider - <http://api.symfony.com/master/Symfony/Component/Form/Extension/Csrf/CsrfProvider/DefaultCsrfProvider.html>`_. + `CsrfTokenManagerInterface + <http://api.symfony.com/master/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.html>`_, Registering ----------- @@ -43,10 +41,13 @@ Usage When the CSRF Service Provider is registered, all forms created via the Form Service Provider are protected against CSRF by default. -You can also use the CSRF protection even without using the Symfony Form -component. If, for example, you're doing a DELETE action, you can check the -CSRF token:: +You can also use the CSRF protection without using the Symfony Form component. +If, for example, you're doing a DELETE action, create a CSRF token to use in +your code:: use Symfony\Component\Security\Csrf\CsrfToken; + $csrfToken = $app['csrf.token_manager']->getToken('token_id'); //'TOKEN' + +Then check it:: $app['csrf.token_manager']->isTokenValid(new CsrfToken('token_id', 'TOKEN')); diff --git a/vendor/silex/silex/doc/providers/security.rst b/vendor/silex/silex/doc/providers/security.rst index f84d318025a8ecd12a67e12b4fd59737e2d3fbf3..49da81728f5bb3a5c6da87f8740644d6e841f48b 100644 --- a/vendor/silex/silex/doc/providers/security.rst +++ b/vendor/silex/silex/doc/providers/security.rst @@ -675,9 +675,7 @@ Traits .. code-block:: php - $user = $app->user(); - - $encoded = $app->encodePassword($user, 'foo'); + $encoded = $app->encodePassword($app['user'], 'foo'); ``Silex\Route\SecurityTrait`` adds the following methods to the controllers: diff --git a/vendor/silex/silex/doc/providers/serializer.rst b/vendor/silex/silex/doc/providers/serializer.rst index 162dbab6a3b48b184ca882a5e573b6c4d633af1b..be5847de2eb60117df81fdc67df2f81c7dcd3a9b 100644 --- a/vendor/silex/silex/doc/providers/serializer.rst +++ b/vendor/silex/silex/doc/providers/serializer.rst @@ -71,3 +71,15 @@ The ``SerializerServiceProvider`` provider provides a ``serializer`` service:: )); })->assert("_format", "xml|json") ->assert("id", "\d+"); + +Using a Cache +------------- + +To use a cache, register a class implementing ``Doctrine\Common\Cache\Cache``:: + + $app->register(new Silex\Provider\SerializerServiceProvider()); + $app['serializer.normalizers'] = function () use ($app) { + return [new \Symfony\Component\Serializer\Normalizer\CustomNormalizer(), + new \Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer(new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()), $app['my_custom_cache'])) + ]; + }; diff --git a/vendor/silex/silex/doc/services.rst b/vendor/silex/silex/doc/services.rst index 8f36e943fac5a6b7d0b8bdb99744fac1dac50da5..0b34ad35e5acc469622620c60556eb823ebd6a49 100644 --- a/vendor/silex/silex/doc/services.rst +++ b/vendor/silex/silex/doc/services.rst @@ -159,7 +159,12 @@ using the ``protect`` method:: // calling it now echo $add(2, 3); -Note that protected closures do not get access to the container. +Note that the container is not provided as an argument to protected closures. +However, you can inject it via `use($app)`:: + + $app['closure_parameter'] = $app->protect(function ($a, $b) use ($app) { + // ... + }); Core services ------------- diff --git a/vendor/silex/silex/doc/web_servers.rst b/vendor/silex/silex/doc/web_servers.rst index 4fd2dc74d128a6c7de1029871dab44cf9afd8d61..c3d43aa6a8f2918a296a80b385ed5ac8a3579deb 100644 --- a/vendor/silex/silex/doc/web_servers.rst +++ b/vendor/silex/silex/doc/web_servers.rst @@ -41,15 +41,15 @@ Or if you're using a VirtualHost, you can add the same directive to the VirtualH .. code-block:: apache -<VirtualHost *:80> - # other directives - - <Directory /var/www/domain.com/> - # other directives - - FallbackResource /index.php - </Directory> -</VirtualHost> + <VirtualHost *:80> + # other directives + + <Directory /var/www/domain.com/> + # other directives + + FallbackResource /index.php + </Directory> + </VirtualHost> .. note:: diff --git a/vendor/silex/silex/src/Silex/Api/composer.json b/vendor/silex/silex/src/Silex/Api/composer.json index 2cb90bcd403c0333de4285c5ec049ea9874557cc..7290988a36c9ff93cc8db5a7bbbb88916fd5657b 100644 --- a/vendor/silex/silex/src/Silex/Api/composer.json +++ b/vendor/silex/silex/src/Silex/Api/composer.json @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "2.2.x-dev" } } } diff --git a/vendor/silex/silex/src/Silex/Application.php b/vendor/silex/silex/src/Silex/Application.php index 07227682d1d1c1d785ca04923d7009a4789361f7..c3b751ba18695108b585ab50e9eafdd70a8d6f39 100644 --- a/vendor/silex/silex/src/Silex/Application.php +++ b/vendor/silex/silex/src/Silex/Application.php @@ -41,7 +41,7 @@ use Silex\Provider\HttpKernelServiceProvider; */ class Application extends Container implements HttpKernelInterface, TerminableInterface { - const VERSION = '2.1.0'; + const VERSION = '2.2.0-DEV'; const EARLY_EVENT = 512; const LATE_EVENT = -512; diff --git a/vendor/silex/silex/src/Silex/Provider/AssetServiceProvider.php b/vendor/silex/silex/src/Silex/Provider/AssetServiceProvider.php index 6793f67624b0ab7394d06af00670391dc318ad36..fa6033066eadcd65aa77cd4574d79f2802b77e8e 100644 --- a/vendor/silex/silex/src/Silex/Provider/AssetServiceProvider.php +++ b/vendor/silex/silex/src/Silex/Provider/AssetServiceProvider.php @@ -19,6 +19,7 @@ use Symfony\Component\Asset\PathPackage; use Symfony\Component\Asset\UrlPackage; use Symfony\Component\Asset\Context\RequestStackContext; use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy; +use Symfony\Component\Asset\VersionStrategy\JsonManifestVersionStrategy; use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; /** @@ -33,7 +34,7 @@ class AssetServiceProvider implements ServiceProviderInterface $app['assets.packages'] = function ($app) { $packages = array(); foreach ($app['assets.named_packages'] as $name => $package) { - $version = $app['assets.strategy_factory'](isset($package['version']) ? $package['version'] : '', isset($package['version_format']) ? $package['version_format'] : null); + $version = $app['assets.strategy_factory'](isset($package['version']) ? $package['version'] : null, isset($package['version_format']) ? $package['version_format'] : null, isset($package['json_manifest_path']) ? $package['json_manifest_path'] : null, $name); $packages[$name] = $app['assets.package_factory'](isset($package['base_path']) ? $package['base_path'] : '', isset($package['base_urls']) ? $package['base_urls'] : array(), $version, $name); } @@ -42,7 +43,7 @@ class AssetServiceProvider implements ServiceProviderInterface }; $app['assets.default_package'] = function ($app) { - $version = $app['assets.strategy_factory']($app['assets.version'], $app['assets.version_format']); + $version = $app['assets.strategy_factory']($app['assets.version'], $app['assets.version_format'], $app['assets.json_manifest_path'], 'default'); return $app['assets.package_factory']($app['assets.base_path'], $app['assets.base_urls'], $version, 'default'); }; @@ -55,17 +56,30 @@ class AssetServiceProvider implements ServiceProviderInterface $app['assets.base_urls'] = array(); $app['assets.version'] = null; $app['assets.version_format'] = null; + $app['assets.json_manifest_path'] = null; $app['assets.named_packages'] = array(); // prototypes - $app['assets.strategy_factory'] = $app->protect(function ($version, $format) use ($app) { - if (!$version) { - return new EmptyVersionStrategy(); + $app['assets.strategy_factory'] = $app->protect(function ($version, $format, $jsonManifestPath, $name) use ($app) { + if ($version && $jsonManifestPath) { + throw new \LogicException(sprintf('Asset package "%s" cannot have version and manifest.', $name)); } - return new StaticVersionStrategy($version, $format); + if ($version) { + return new StaticVersionStrategy($version, $format); + } + + if ($jsonManifestPath) { + if (!class_exists('Symfony\Component\Asset\VersionStrategy\JsonManifestVersionStrategy')) { + throw new \RuntimeException('You must require symfony/asset >= 3.3 to use JSON manifest version strategy.'); + } + + return new JsonManifestVersionStrategy($jsonManifestPath); + } + + return new EmptyVersionStrategy(); }); $app['assets.package_factory'] = $app->protect(function ($basePath, $baseUrls, $version, $name) use ($app) { diff --git a/vendor/silex/silex/src/Silex/Provider/HttpFragmentServiceProvider.php b/vendor/silex/silex/src/Silex/Provider/HttpFragmentServiceProvider.php index 9a641f40b457848f6def8660eb385da5ce87237e..fb1f4990a6546398bc4e5f7cf4a7a8a7100883fa 100644 --- a/vendor/silex/silex/src/Silex/Provider/HttpFragmentServiceProvider.php +++ b/vendor/silex/silex/src/Silex/Provider/HttpFragmentServiceProvider.php @@ -51,7 +51,7 @@ class HttpFragmentServiceProvider implements ServiceProviderInterface, EventList }; $app['fragment.renderer.esi'] = function ($app) { - $renderer = new EsiFragmentRenderer($app['http_cache.esi'], $app['fragment.renderer.inline']); + $renderer = new EsiFragmentRenderer($app['http_cache.esi'], $app['fragment.renderer.inline'], $app['uri_signer']); $renderer->setFragmentPath($app['fragment.path']); return $renderer; diff --git a/vendor/silex/silex/src/Silex/Provider/Routing/RedirectableUrlMatcher.php b/vendor/silex/silex/src/Silex/Provider/Routing/RedirectableUrlMatcher.php index d2fa39e8ad2241d0131ce6a9f502b7e8d300db48..8b4a4dae977e68f79dc2cc2c107ab29679601b93 100644 --- a/vendor/silex/silex/src/Silex/Provider/Routing/RedirectableUrlMatcher.php +++ b/vendor/silex/silex/src/Silex/Provider/Routing/RedirectableUrlMatcher.php @@ -48,6 +48,7 @@ class RedirectableUrlMatcher extends BaseRedirectableUrlMatcher return array( '_controller' => function ($url) { return new RedirectResponse($url, 301); }, + '_route' => $route, 'url' => $url, ); } diff --git a/vendor/silex/silex/src/Silex/Provider/TranslationServiceProvider.php b/vendor/silex/silex/src/Silex/Provider/TranslationServiceProvider.php index 0b8a89548046f57ee8d2a7b3fe18662415d8c61e..a9ee55c9963e1217592a32ba2b6779543f3476ef 100644 --- a/vendor/silex/silex/src/Silex/Provider/TranslationServiceProvider.php +++ b/vendor/silex/silex/src/Silex/Provider/TranslationServiceProvider.php @@ -80,9 +80,9 @@ class TranslationServiceProvider implements ServiceProviderInterface, EventListe return new MessageSelector(); }; - $app['translator.resources'] = $app->protect(function ($app) { + $app['translator.resources'] = function ($app) { return array(); - }); + }; $app['translator.domains'] = array(); $app['locale_fallbacks'] = array('en'); diff --git a/vendor/silex/silex/src/Silex/Provider/composer.json b/vendor/silex/silex/src/Silex/Provider/composer.json index 99b7a4911a79279c038d0f32bd38dab7d440b9a1..a1e9fbfe08df116f5299a8a8cee362d93fe2b8d4 100644 --- a/vendor/silex/silex/src/Silex/Provider/composer.json +++ b/vendor/silex/silex/src/Silex/Provider/composer.json @@ -18,14 +18,14 @@ "require": { "php": ">=5.5.9", "pimple/pimple": "~3.0", - "silex/api": "~2.1" + "silex/api": "~2.2" }, "autoload": { "psr-4": { "Silex\\Provider\\": "" } }, "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.2.x-dev" } } } diff --git a/vendor/silex/silex/src/Silex/WebTestCase.php b/vendor/silex/silex/src/Silex/WebTestCase.php index 644bb050e5dc172f4076f46f6de567ec38fd3a28..e72403a1c176a69b5aaebd46334f8e7303f06727 100644 --- a/vendor/silex/silex/src/Silex/WebTestCase.php +++ b/vendor/silex/silex/src/Silex/WebTestCase.php @@ -11,6 +11,7 @@ namespace Silex; +use PHPUnit\Framework\TestCase; use Symfony\Component\HttpKernel\Client; use Symfony\Component\HttpKernel\HttpKernelInterface; @@ -19,7 +20,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface; * * @author Igor Wiedler <igor@wiedler.ch> */ -abstract class WebTestCase extends \PHPUnit_Framework_TestCase +abstract class WebTestCase extends TestCase { /** * HttpKernelInterface instance. diff --git a/vendor/silex/silex/tests/Silex/Tests/Application/FormTraitTest.php b/vendor/silex/silex/tests/Silex/Tests/Application/FormTraitTest.php index 74e56c05395bbe44f146c0f7c5cc3c66b931bcec..1d36a0cb304555218e0c9960bd20986295ed4344 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Application/FormTraitTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Application/FormTraitTest.php @@ -11,18 +11,28 @@ namespace Silex\Tests\Application; +use PHPUnit\Framework\TestCase; use Silex\Provider\FormServiceProvider; +use Symfony\Component\Form\FormBuilder; /** * FormTrait test cases. * * @author Fabien Potencier <fabien@symfony.com> */ -class FormTraitTest extends \PHPUnit_Framework_TestCase +class FormTraitTest extends TestCase { public function testForm() { - $this->assertInstanceOf('Symfony\Component\Form\FormBuilder', $this->createApplication()->form()); + $this->assertInstanceOf(FormBuilder::class, $this->createApplication()->form()); + } + + public function testNamedForm() + { + $builder = $this->createApplication()->namedForm('foo'); + + $this->assertInstanceOf(FormBuilder::class, $builder); + $this->assertSame('foo', $builder->getName()); } public function createApplication() diff --git a/vendor/silex/silex/tests/Silex/Tests/Application/MonologTraitTest.php b/vendor/silex/silex/tests/Silex/Tests/Application/MonologTraitTest.php index a2e3acbf3164c42b864f37f61ca6eb5d856b3880..73dcda65bfcd814fe90d76e3c7f7b31da07662e8 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Application/MonologTraitTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Application/MonologTraitTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\Application; +use PHPUnit\Framework\TestCase; use Silex\Provider\MonologServiceProvider; use Monolog\Handler\TestHandler; use Monolog\Logger; @@ -20,7 +21,7 @@ use Monolog\Logger; * * @author Fabien Potencier <fabien@symfony.com> */ -class MonologTraitTest extends \PHPUnit_Framework_TestCase +class MonologTraitTest extends TestCase { public function testLog() { diff --git a/vendor/silex/silex/tests/Silex/Tests/Application/SecurityTraitTest.php b/vendor/silex/silex/tests/Silex/Tests/Application/SecurityTraitTest.php index e91eda7302f5fc9eb1b2c206ed1bd91a6f36056d..71cb3af628bf7d5fb0acf0c56fd0442c5fba0726 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Application/SecurityTraitTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Application/SecurityTraitTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\Application; +use PHPUnit\Framework\TestCase; use Silex\Provider\SecurityServiceProvider; use Symfony\Component\Security\Core\User\User; use Symfony\Component\HttpFoundation\Request; @@ -20,7 +21,7 @@ use Symfony\Component\HttpFoundation\Request; * * @author Fabien Potencier <fabien@symfony.com> */ -class SecurityTraitTest extends \PHPUnit_Framework_TestCase +class SecurityTraitTest extends TestCase { public function testEncodePassword() { diff --git a/vendor/silex/silex/tests/Silex/Tests/Application/SwiftmailerTraitTest.php b/vendor/silex/silex/tests/Silex/Tests/Application/SwiftmailerTraitTest.php index 923db39e3970b124158826bd19f5e2309a5d7867..34620b7190bcddcea59f8495537518fb97d7f4d9 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Application/SwiftmailerTraitTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Application/SwiftmailerTraitTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\Application; +use PHPUnit\Framework\TestCase; use Silex\Provider\SwiftmailerServiceProvider; /** @@ -18,7 +19,7 @@ use Silex\Provider\SwiftmailerServiceProvider; * * @author Fabien Potencier <fabien@symfony.com> */ -class SwiftmailerTraitTest extends \PHPUnit_Framework_TestCase +class SwiftmailerTraitTest extends TestCase { public function testMail() { diff --git a/vendor/silex/silex/tests/Silex/Tests/Application/TranslationTraitTest.php b/vendor/silex/silex/tests/Silex/Tests/Application/TranslationTraitTest.php index f2837c1439b8832e3529e978be25626984bb96e3..5c0546002b0988a3fd498909274d4227fa48bfbb 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Application/TranslationTraitTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Application/TranslationTraitTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\Application; +use PHPUnit\Framework\TestCase; use Silex\Provider\TranslationServiceProvider; /** @@ -18,7 +19,7 @@ use Silex\Provider\TranslationServiceProvider; * * @author Fabien Potencier <fabien@symfony.com> */ -class TranslationTraitTest extends \PHPUnit_Framework_TestCase +class TranslationTraitTest extends TestCase { public function testTrans() { diff --git a/vendor/silex/silex/tests/Silex/Tests/Application/TwigTraitTest.php b/vendor/silex/silex/tests/Silex/Tests/Application/TwigTraitTest.php index 9435f7c8afc13e411364e2b6f1a96d7b599059ab..250ebcfae50749d8fa10239961e0e23ba34fa69c 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Application/TwigTraitTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Application/TwigTraitTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\Application; +use PHPUnit\Framework\TestCase; use Silex\Provider\TwigServiceProvider; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\StreamedResponse; @@ -20,7 +21,7 @@ use Symfony\Component\HttpFoundation\StreamedResponse; * * @author Fabien Potencier <fabien@symfony.com> */ -class TwigTraitTest extends \PHPUnit_Framework_TestCase +class TwigTraitTest extends TestCase { public function testRender() { diff --git a/vendor/silex/silex/tests/Silex/Tests/Application/UrlGeneratorTraitTest.php b/vendor/silex/silex/tests/Silex/Tests/Application/UrlGeneratorTraitTest.php index 822c6eb3c0c8e7135137cd346f2cfed447e35c9b..df29d6e79583d791c7bd0337a2d9dbca7bc7d593 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Application/UrlGeneratorTraitTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Application/UrlGeneratorTraitTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\Application; +use PHPUnit\Framework\TestCase; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; /** @@ -18,7 +19,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface; * * @author Fabien Potencier <fabien@symfony.com> */ -class UrlGeneratorTraitTest extends \PHPUnit_Framework_TestCase +class UrlGeneratorTraitTest extends TestCase { public function testUrl() { diff --git a/vendor/silex/silex/tests/Silex/Tests/ApplicationTest.php b/vendor/silex/silex/tests/Silex/Tests/ApplicationTest.php index 9a23cd1df73c4a9767b6cd23f4b660063ac44ff0..57a1d637205255a09a6d68452f4f4a2e2ae6fcf4 100644 --- a/vendor/silex/silex/tests/Silex/Tests/ApplicationTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/ApplicationTest.php @@ -13,6 +13,7 @@ namespace Silex\Tests; use Fig\Link\GenericLinkProvider; use Fig\Link\Link; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\ControllerCollection; use Silex\Api\ControllerProviderInterface; @@ -24,13 +25,14 @@ use Symfony\Component\HttpFoundation\StreamedResponse; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\Routing\RouteCollection; +use Symfony\Component\WebLink\HttpHeaderSerializer; /** * Application test cases. * * @author Igor Wiedler <igor@wiedler.ch> */ -class ApplicationTest extends \PHPUnit_Framework_TestCase +class ApplicationTest extends TestCase { public function testMatchReturnValue() { @@ -659,6 +661,10 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase public function testWebLinkListener() { + if (!class_exists(HttpHeaderSerializer::class)) { + self::markTestSkipped('Symfony WebLink component is required.'); + } + $app = new Application(); $app->get('/', function () { diff --git a/vendor/silex/silex/tests/Silex/Tests/CallbackResolverTest.php b/vendor/silex/silex/tests/Silex/Tests/CallbackResolverTest.php index 80503b9776d2fdb768ca956ade1e68995695e784..b637a944e56614cabffc80decf347211d3da61ff 100644 --- a/vendor/silex/silex/tests/Silex/Tests/CallbackResolverTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/CallbackResolverTest.php @@ -11,10 +11,11 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Pimple\Container; use Silex\CallbackResolver; -class CallbackResolverTest extends \PHPUnit_Framework_Testcase +class CallbackResolverTest extends Testcase { private $app; private $resolver; diff --git a/vendor/silex/silex/tests/Silex/Tests/CallbackServicesTest.php b/vendor/silex/silex/tests/Silex/Tests/CallbackServicesTest.php index fe96317ef1de5751c4341ce965ebc18794b81be9..915c04965b3d9ab9e1e6c47700170ac06d663bea 100644 --- a/vendor/silex/silex/tests/Silex/Tests/CallbackServicesTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/CallbackServicesTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Silex\Application; use Symfony\Component\HttpFoundation\Request; use Silex\Provider\ServiceControllerServiceProvider; @@ -20,7 +21,7 @@ use Silex\Provider\ServiceControllerServiceProvider; * * @author Fabien Potencier <fabien@symfony.com> */ -class CallbackServicesTest extends \PHPUnit_Framework_TestCase +class CallbackServicesTest extends TestCase { public $called = array(); diff --git a/vendor/silex/silex/tests/Silex/Tests/ControllerCollectionTest.php b/vendor/silex/silex/tests/Silex/Tests/ControllerCollectionTest.php index d5c9889c6d4c364db3b8593c87b91f461b8d16cc..53e33844286803e4c4c29130598099e2b112a5e8 100644 --- a/vendor/silex/silex/tests/Silex/Tests/ControllerCollectionTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/ControllerCollectionTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\Controller; use Silex\ControllerCollection; @@ -23,7 +24,7 @@ use Symfony\Component\Routing\RouteCollection; * * @author Igor Wiedler <igor@wiedler.ch> */ -class ControllerCollectionTest extends \PHPUnit_Framework_TestCase +class ControllerCollectionTest extends TestCase { public function testGetRouteCollectionWithNoRoutes() { diff --git a/vendor/silex/silex/tests/Silex/Tests/ControllerResolverTest.php b/vendor/silex/silex/tests/Silex/Tests/ControllerResolverTest.php index e4483886f31f8a3e88367fc0e5df108c12237d4d..efc39c9999eafa3471fa74a6ea2b1f43d4b6ac8a 100644 --- a/vendor/silex/silex/tests/Silex/Tests/ControllerResolverTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/ControllerResolverTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Silex\ControllerResolver; use Silex\Application; use Symfony\Component\HttpFoundation\Request; @@ -20,7 +21,7 @@ use Symfony\Component\HttpFoundation\Request; * * @author Fabien Potencier <fabien@symfony.com> */ -class ControllerResolverTest extends \PHPUnit_Framework_TestCase +class ControllerResolverTest extends TestCase { /** * @group legacy diff --git a/vendor/silex/silex/tests/Silex/Tests/ControllerTest.php b/vendor/silex/silex/tests/Silex/Tests/ControllerTest.php index 791563f4e71658f21072a049aa5d7514ddbd480c..88c6f0a118439341347bc09f7ea6cb2b93e1a27d 100644 --- a/vendor/silex/silex/tests/Silex/Tests/ControllerTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/ControllerTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Silex\Controller; use Silex\Route; @@ -19,7 +20,7 @@ use Silex\Route; * * @author Igor Wiedler <igor@wiedler.ch> */ -class ControllerTest extends \PHPUnit_Framework_TestCase +class ControllerTest extends TestCase { public function testBind() { diff --git a/vendor/silex/silex/tests/Silex/Tests/EventListener/LogListenerTest.php b/vendor/silex/silex/tests/Silex/Tests/EventListener/LogListenerTest.php index 1937ab32cd314b30e6d0bb7758923d2ab6ef3a4e..b56082e09ca2163f577c2646b71e07a86db5b957 100644 --- a/vendor/silex/silex/tests/Silex/Tests/EventListener/LogListenerTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/EventListener/LogListenerTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\EventListener; +use PHPUnit\Framework\TestCase; use Psr\Log\LogLevel; use Silex\EventListener\LogListener; use Symfony\Component\HttpKernel\Event\GetResponseEvent; @@ -28,7 +29,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException; * * @author Jérôme Tamarelle <jerome@tamarelle.net> */ -class LogListenerTest extends \PHPUnit_Framework_TestCase +class LogListenerTest extends TestCase { public function testRequestListener() { diff --git a/vendor/silex/silex/tests/Silex/Tests/ExceptionHandlerTest.php b/vendor/silex/silex/tests/Silex/Tests/ExceptionHandlerTest.php index 24e9a0dd06ea1076c9e361b8d0e76fd08d4dc0a0..aea31b08f4135b2ffa36d00edf5bc3c0a06b14b9 100644 --- a/vendor/silex/silex/tests/Silex/Tests/ExceptionHandlerTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/ExceptionHandlerTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Silex\Application; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -21,7 +22,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * * @author Igor Wiedler <igor@wiedler.ch> */ -class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase +class ExceptionHandlerTest extends TestCase { public function testExceptionHandlerExceptionNoDebug() { @@ -34,7 +35,7 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase $request = Request::create('/foo'); $response = $app->handle($request); - $this->assertContains('<h1>Whoops, looks like something went wrong.</h1>', $response->getContent()); + $this->assertContains('Whoops, looks like something went wrong.', $response->getContent()); $this->assertEquals(500, $response->getStatusCode()); } @@ -61,7 +62,7 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase $request = Request::create('/foo'); $response = $app->handle($request); - $this->assertContains('<h1>Sorry, the page you are looking for could not be found.</h1>', $response->getContent()); + $this->assertContains('Sorry, the page you are looking for could not be found.', $response->getContent()); $this->assertEquals(404, $response->getStatusCode()); } @@ -85,7 +86,7 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase $request = Request::create('/foo', 'POST'); $response = $app->handle($request); - $this->assertContains('<h1>Whoops, looks like something went wrong.</h1>', $response->getContent()); + $this->assertContains('Whoops, looks like something went wrong.', $response->getContent()); $this->assertEquals(405, $response->getStatusCode()); $this->assertEquals('GET', $response->headers->get('Allow')); } @@ -307,7 +308,6 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase // Since we throw a standard Exception above only // the second error handler should fire $app->error(function (\LogicException $e) { // Extends \Exception - return 'Caught LogicException'; }); $app->error(function (\Exception $e) { @@ -333,7 +333,6 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase // Since we throw a LogicException above // the first error handler should fire $app->error(function (\LogicException $e) { // Extends \Exception - return 'Caught LogicException'; }); $app->error(function (\Exception $e) { @@ -364,7 +363,6 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase return 'Caught Exception'; }); $app->error(function (\LogicException $e) { // Extends \Exception - return 'Caught LogicException'; }); diff --git a/vendor/silex/silex/tests/Silex/Tests/Fixtures/manifest.json b/vendor/silex/silex/tests/Silex/Tests/Fixtures/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..78c3bd61a032a288b6ed52e8dfd54710558011c7 --- /dev/null +++ b/vendor/silex/silex/tests/Silex/Tests/Fixtures/manifest.json @@ -0,0 +1,3 @@ +{ + "app.js": "some-random-hash.js" +} \ No newline at end of file diff --git a/vendor/silex/silex/tests/Silex/Tests/FunctionalTest.php b/vendor/silex/silex/tests/Silex/Tests/FunctionalTest.php index f2af4ac3807ad2a784228270af811317dcacf6b3..c6ee3359b093ae590ed98bc8d7d5ad7c6e51cbab 100644 --- a/vendor/silex/silex/tests/Silex/Tests/FunctionalTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/FunctionalTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\Route; use Silex\ControllerCollection; @@ -22,7 +23,7 @@ use Symfony\Component\HttpFoundation\Response; * * @author Igor Wiedler <igor@wiedler.ch> */ -class FunctionalTest extends \PHPUnit_Framework_TestCase +class FunctionalTest extends TestCase { public function testBind() { diff --git a/vendor/silex/silex/tests/Silex/Tests/JsonTest.php b/vendor/silex/silex/tests/Silex/Tests/JsonTest.php index 5eb133621b967e83b3557809ceb71da4420fa622..950437c3755f5bcbdfc76ee8668e83199563430d 100644 --- a/vendor/silex/silex/tests/Silex/Tests/JsonTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/JsonTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Silex\Application; /** @@ -18,7 +19,7 @@ use Silex\Application; * * @author Igor Wiedler <igor@wiedler.ch> */ -class JsonTest extends \PHPUnit_Framework_TestCase +class JsonTest extends TestCase { public function testJsonReturnsJsonResponse() { diff --git a/vendor/silex/silex/tests/Silex/Tests/LazyDispatcherTest.php b/vendor/silex/silex/tests/Silex/Tests/LazyDispatcherTest.php index 1b4c580c74c8cf907a1fcd4a605aad90ff53bb3d..fcbbc62a9f8bce4b723f56911bd470ee53b6b3d8 100644 --- a/vendor/silex/silex/tests/Silex/Tests/LazyDispatcherTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/LazyDispatcherTest.php @@ -11,10 +11,11 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Silex\Application; use Symfony\Component\HttpFoundation\Request; -class LazyDispatcherTest extends \PHPUnit_Framework_TestCase +class LazyDispatcherTest extends TestCase { /** @test */ public function beforeMiddlewareShouldNotCreateDispatcherEarly() diff --git a/vendor/silex/silex/tests/Silex/Tests/LazyRequestMatcherTest.php b/vendor/silex/silex/tests/Silex/Tests/LazyRequestMatcherTest.php index 7ecb5b2f8e20c83ffe2defbfc0792d738232f4ef..879d46fac0f2f2354145eb7d34d822845808c172 100644 --- a/vendor/silex/silex/tests/Silex/Tests/LazyRequestMatcherTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/LazyRequestMatcherTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Silex\Provider\Routing\LazyRequestMatcher; @@ -19,10 +20,10 @@ use Silex\Provider\Routing\LazyRequestMatcher; * * @author Leszek Prabucki <leszek.prabucki@gmail.com> */ -class LazyRequestMatcherTest extends \PHPUnit_Framework_TestCase +class LazyRequestMatcherTest extends TestCase { /** - * @covers Silex\LazyRequestMatcher::getRequestMatcher + * @covers \Silex\LazyRequestMatcher::getRequestMatcher */ public function testUserMatcherIsCreatedLazily() { @@ -42,7 +43,7 @@ class LazyRequestMatcherTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException LogicException + * @expectedException \LogicException * @expectedExceptionMessage Factory supplied to LazyRequestMatcher must return implementation of Symfony\Component\Routing\RequestMatcherInterface. */ public function testThatCanInjectRequestMatcherOnly() @@ -56,7 +57,7 @@ class LazyRequestMatcherTest extends \PHPUnit_Framework_TestCase } /** - * @covers Silex\LazyRequestMatcher::matchRequest + * @covers \Silex\LazyRequestMatcher::matchRequest */ public function testMatchIsProxy() { diff --git a/vendor/silex/silex/tests/Silex/Tests/LocaleTest.php b/vendor/silex/silex/tests/Silex/Tests/LocaleTest.php index ada57be419e76309cbc29064aaa4ba5e55543f84..81bf04227d3b42d90aeb2df246d8052cc7d9d26d 100644 --- a/vendor/silex/silex/tests/Silex/Tests/LocaleTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/LocaleTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\Provider\LocaleServiceProvider; use Symfony\Component\HttpFoundation\Request; @@ -21,7 +22,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface; * * @author Fabien Potencier <fabien@symfony.com> */ -class LocaleTest extends \PHPUnit_Framework_TestCase +class LocaleTest extends TestCase { public function testLocale() { diff --git a/vendor/silex/silex/tests/Silex/Tests/MiddlewareTest.php b/vendor/silex/silex/tests/Silex/Tests/MiddlewareTest.php index 376a42c62780a3315200f59f4cb2fb6ffb98ba7d..6335dad3c9ca283a7128ce0a64111b4e9d4c4b7c 100644 --- a/vendor/silex/silex/tests/Silex/Tests/MiddlewareTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/MiddlewareTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Silex\Application; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -20,7 +21,7 @@ use Symfony\Component\HttpFoundation\Response; * * @author Igor Wiedler <igor@wiedler.ch> */ -class MiddlewareTest extends \PHPUnit_Framework_TestCase +class MiddlewareTest extends TestCase { public function testBeforeAndAfterFilter() { diff --git a/vendor/silex/silex/tests/Silex/Tests/Provider/AssetServiceProviderTest.php b/vendor/silex/silex/tests/Silex/Tests/Provider/AssetServiceProviderTest.php index 3dfb5d3f090e6d73b37b55a9bb56077c253a167d..940fdca3de339e5335509083238e6742549e2701 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Provider/AssetServiceProviderTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Provider/AssetServiceProviderTest.php @@ -11,10 +11,11 @@ namespace Silex\Tests\Provider; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\Provider\AssetServiceProvider; -class AssetServiceProviderTest extends \PHPUnit_Framework_TestCase +class AssetServiceProviderTest extends TestCase { public function testGenerateAssetUrl() { @@ -32,4 +33,20 @@ class AssetServiceProviderTest extends \PHPUnit_Framework_TestCase $this->assertEquals('/whatever-makes-sense/foo.css?css2', $app['assets.packages']->getUrl('foo.css', 'css')); $this->assertEquals('https://img.example.com/foo.png', $app['assets.packages']->getUrl('/foo.png', 'images')); } + + public function testJsonManifestVersionStrategy() + { + if (!class_exists('Symfony\Component\Asset\VersionStrategy\JsonManifestVersionStrategy')) { + $this->markTestSkipped('JsonManifestVersionStrategy class is not available.'); + + return; + } + + $app = new Application(); + $app->register(new AssetServiceProvider(), array( + 'assets.json_manifest_path' => __DIR__.'/../Fixtures/manifest.json', + )); + + $this->assertEquals('/some-random-hash.js', $app['assets.packages']->getUrl('app.js')); + } } diff --git a/vendor/silex/silex/tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php b/vendor/silex/silex/tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php index 5a7e9a2d4f6a9dababd390d4b8e1a59cac78355c..9da8b8e0c1cfb548b043dfe0f16a8911c45a9541 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Provider/DoctrineServiceProviderTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\Provider; +use PHPUnit\Framework\TestCase; use Pimple\Container; use Silex\Application; use Silex\Provider\DoctrineServiceProvider; @@ -20,7 +21,7 @@ use Silex\Provider\DoctrineServiceProvider; * * Fabien Potencier <fabien@symfony.com> */ -class DoctrineServiceProviderTest extends \PHPUnit_Framework_TestCase +class DoctrineServiceProviderTest extends TestCase { public function testOptionsInitializer() { @@ -43,7 +44,7 @@ class DoctrineServiceProviderTest extends \PHPUnit_Framework_TestCase $db = $app['db']; $params = $db->getParams(); - $this->assertTrue(array_key_exists('memory', $params)); + $this->assertArrayHasKey('memory', $params); $this->assertTrue($params['memory']); $this->assertInstanceof('Doctrine\DBAL\Driver\PDOSqlite\Driver', $db->getDriver()); $this->assertEquals(22, $app['db']->fetchColumn('SELECT 22')); @@ -67,7 +68,7 @@ class DoctrineServiceProviderTest extends \PHPUnit_Framework_TestCase $db = $app['db']; $params = $db->getParams(); - $this->assertTrue(array_key_exists('memory', $params)); + $this->assertArrayHasKey('memory', $params); $this->assertTrue($params['memory']); $this->assertInstanceof('Doctrine\DBAL\Driver\PDOSqlite\Driver', $db->getDriver()); $this->assertEquals(22, $app['db']->fetchColumn('SELECT 22')); @@ -76,7 +77,7 @@ class DoctrineServiceProviderTest extends \PHPUnit_Framework_TestCase $db2 = $app['dbs']['sqlite2']; $params = $db2->getParams(); - $this->assertTrue(array_key_exists('path', $params)); + $this->assertArrayHasKey('path', $params); $this->assertEquals(sys_get_temp_dir().'/silex', $params['path']); } diff --git a/vendor/silex/silex/tests/Silex/Tests/Provider/FormServiceProviderTest.php b/vendor/silex/silex/tests/Silex/Tests/Provider/FormServiceProviderTest.php index 0d32a8bf3378d806f75ef488a08a0648da3b7fc1..981826e6f3a85a06a23e3528c62228e085bc2fd2 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Provider/FormServiceProviderTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Provider/FormServiceProviderTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\Provider; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\Provider\FormServiceProvider; use Silex\Provider\CsrfServiceProvider; @@ -25,7 +26,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolverInterface; use Symfony\Component\Translation\Exception\NotFoundResourceException; -class FormServiceProviderTest extends \PHPUnit_Framework_TestCase +class FormServiceProviderTest extends TestCase { public function testFormFactoryServiceIsFormFactory() { diff --git a/vendor/silex/silex/tests/Silex/Tests/Provider/HttpCacheServiceProviderTest.php b/vendor/silex/silex/tests/Silex/Tests/Provider/HttpCacheServiceProviderTest.php index 93da4fe90fa61cd94c864761f6c8125adf30c8cb..dca3f6a848ddc643e9ee4aabebb05b4f53a8718c 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Provider/HttpCacheServiceProviderTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Provider/HttpCacheServiceProviderTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\Provider; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\Provider\HttpCacheServiceProvider; use Symfony\Component\HttpFoundation\Request; @@ -21,7 +22,7 @@ use Symfony\Component\HttpFoundation\Response; * * @author Igor Wiedler <igor@wiedler.ch> */ -class HttpCacheServiceProviderTest extends \PHPUnit_Framework_TestCase +class HttpCacheServiceProviderTest extends TestCase { public function testRegister() { diff --git a/vendor/silex/silex/tests/Silex/Tests/Provider/HttpFragmentServiceProviderTest.php b/vendor/silex/silex/tests/Silex/Tests/Provider/HttpFragmentServiceProviderTest.php index 1a7620c13b3d0add97341e19342c041b0a24870a..6e12fcc5d9a3541d6f4d5dbb8eaeb32d0c5af4da 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Provider/HttpFragmentServiceProviderTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Provider/HttpFragmentServiceProviderTest.php @@ -11,13 +11,14 @@ namespace Silex\Tests\Provider; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\Provider\HttpCacheServiceProvider; use Silex\Provider\HttpFragmentServiceProvider; use Silex\Provider\TwigServiceProvider; use Symfony\Component\HttpFoundation\Request; -class HttpFragmentServiceProviderTest extends \PHPUnit_Framework_TestCase +class HttpFragmentServiceProviderTest extends TestCase { public function testRenderFunction() { diff --git a/vendor/silex/silex/tests/Silex/Tests/Provider/MonologServiceProviderTest.php b/vendor/silex/silex/tests/Silex/Tests/Provider/MonologServiceProviderTest.php index 9d8c260a9eea95255f2ac19c76c4c39d91ebcc8d..4585378f04a097701839a6cce5f7cb3cb7f68365 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Provider/MonologServiceProviderTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Provider/MonologServiceProviderTest.php @@ -14,6 +14,7 @@ namespace Silex\Tests\Provider; use Monolog\Formatter\JsonFormatter; use Monolog\Handler\TestHandler; use Monolog\Logger; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\Provider\MonologServiceProvider; use Symfony\Component\HttpFoundation\RedirectResponse; @@ -26,7 +27,7 @@ use Symfony\Component\HttpKernel\Kernel; * * @author Igor Wiedler <igor@wiedler.ch> */ -class MonologServiceProviderTest extends \PHPUnit_Framework_TestCase +class MonologServiceProviderTest extends TestCase { private $currErrorHandler; diff --git a/vendor/silex/silex/tests/Silex/Tests/Provider/RoutingServiceProviderTest.php b/vendor/silex/silex/tests/Silex/Tests/Provider/RoutingServiceProviderTest.php index da2ca78cb72a83df39f89328a5632ac0d60654dc..2faaa683cdfa1bcd0aef0d6b1b0abb9eecf55b75 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Provider/RoutingServiceProviderTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Provider/RoutingServiceProviderTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\Provider; +use PHPUnit\Framework\TestCase; use Pimple\Container; use Silex\Application; use Silex\Provider\RoutingServiceProvider; @@ -22,7 +23,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface; * * @author Igor Wiedler <igor@wiedler.ch> */ -class RoutingServiceProviderTest extends \PHPUnit_Framework_TestCase +class RoutingServiceProviderTest extends TestCase { public function testRegister() { diff --git a/vendor/silex/silex/tests/Silex/Tests/Provider/SerializerServiceProviderTest.php b/vendor/silex/silex/tests/Silex/Tests/Provider/SerializerServiceProviderTest.php index 0b143f5f609ffdbceb00d686b4ec726c3a5cfc6e..c33cea7b01af9b69c0e0a2a478cce3272a1ffb8b 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Provider/SerializerServiceProviderTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Provider/SerializerServiceProviderTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\Provider; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\Provider\SerializerServiceProvider; @@ -19,7 +20,7 @@ use Silex\Provider\SerializerServiceProvider; * * @author Fabien Potencier <fabien@symfony.com> */ -class SerializerServiceProviderTest extends \PHPUnit_Framework_TestCase +class SerializerServiceProviderTest extends TestCase { public function testRegister() { diff --git a/vendor/silex/silex/tests/Silex/Tests/Provider/SwiftmailerServiceProviderTest.php b/vendor/silex/silex/tests/Silex/Tests/Provider/SwiftmailerServiceProviderTest.php index f9ddc4aae2dea68793c11a346df6dfa3c781912f..f80c2256b9486154b3b4967adc139dda8407010e 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Provider/SwiftmailerServiceProviderTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Provider/SwiftmailerServiceProviderTest.php @@ -11,11 +11,12 @@ namespace Silex\Tests\Provider; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\Provider\SwiftmailerServiceProvider; use Symfony\Component\HttpFoundation\Request; -class SwiftmailerServiceProviderTest extends \PHPUnit_Framework_TestCase +class SwiftmailerServiceProviderTest extends TestCase { public function testSwiftMailerServiceIsSwiftMailer() { diff --git a/vendor/silex/silex/tests/Silex/Tests/Provider/TranslationServiceProviderTest.php b/vendor/silex/silex/tests/Silex/Tests/Provider/TranslationServiceProviderTest.php index 6d893f98646ec502473c3675f8798b663945abaf..b4132f9e7677723a94420fcb483379802a5a91a8 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Provider/TranslationServiceProviderTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Provider/TranslationServiceProviderTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\Provider; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\Provider\TranslationServiceProvider; use Silex\Provider\LocaleServiceProvider; @@ -22,7 +23,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface; * * @author Daniel Tschinder <daniel@tschinder.de> */ -class TranslationServiceProviderTest extends \PHPUnit_Framework_TestCase +class TranslationServiceProviderTest extends TestCase { /** * @return Application diff --git a/vendor/silex/silex/tests/Silex/Tests/Provider/TwigServiceProviderTest.php b/vendor/silex/silex/tests/Silex/Tests/Provider/TwigServiceProviderTest.php index 501036c5468d66cbdc1cc2c08dd91069d031c2c5..1b5aef2c1ee55438558345324175d2b7e5ceca66 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Provider/TwigServiceProviderTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Provider/TwigServiceProviderTest.php @@ -12,6 +12,7 @@ namespace Silex\Tests\Provider; use Fig\Link\Link; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\Provider\CsrfServiceProvider; use Silex\Provider\FormServiceProvider; @@ -19,13 +20,14 @@ use Silex\Provider\TwigServiceProvider; use Silex\Provider\AssetServiceProvider; use Symfony\Bridge\Twig\Extension\WebLinkExtension; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\WebLink\HttpHeaderSerializer; /** * TwigProvider test cases. * * @author Igor Wiedler <igor@wiedler.ch> */ -class TwigServiceProviderTest extends \PHPUnit_Framework_TestCase +class TwigServiceProviderTest extends TestCase { public function testRegisterAndRender() { @@ -143,7 +145,7 @@ class TwigServiceProviderTest extends \PHPUnit_Framework_TestCase public function testWebLinkIntegration() { - if (!class_exists(WebLinkExtension::class)) { + if (!class_exists(HttpHeaderSerializer::class) || !class_exists(WebLinkExtension::class)) { $this->markTestSkipped('Twig WebLink extension not available.'); } diff --git a/vendor/silex/silex/tests/Silex/Tests/Provider/ValidatorServiceProviderTest.php b/vendor/silex/silex/tests/Silex/Tests/Provider/ValidatorServiceProviderTest.php index a28ccf781978aa3316cc816e1f4eeb678c6a5bb1..6abb264419d9694bbcd95671767634a4eb971a28 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Provider/ValidatorServiceProviderTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Provider/ValidatorServiceProviderTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\Provider; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\Provider\TranslationServiceProvider; use Silex\Provider\ValidatorServiceProvider; @@ -27,7 +28,7 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; * * Javier Lopez <f12loalf@gmail.com> */ -class ValidatorServiceProviderTest extends \PHPUnit_Framework_TestCase +class ValidatorServiceProviderTest extends TestCase { public function testRegister() { @@ -81,7 +82,7 @@ class ValidatorServiceProviderTest extends \PHPUnit_Framework_TestCase */ public function testValidatorServiceIsAValidator($app) { - $this->assertTrue($app['validator'] instanceof ValidatorInterface || $app['validator'] instanceof LegacyValidatorInterface ); + $this->assertTrue($app['validator'] instanceof ValidatorInterface || $app['validator'] instanceof LegacyValidatorInterface); } /** @@ -191,4 +192,15 @@ class ValidatorServiceProviderTest extends \PHPUnit_Framework_TestCase $this->assertEquals('Pas vide', $app['translator']->trans('This value should not be blank.', array(), 'validators', 'fr')); } + + public function testTranslatorResourcesIsArray() + { + $app = new Application(); + $app['locale'] = 'fr'; + + $app->register(new ValidatorServiceProvider()); + $app->register(new TranslationServiceProvider()); + + $this->assertInternalType('array', $app['translator.resources']); + } } diff --git a/vendor/silex/silex/tests/Silex/Tests/Route/SecurityTraitTest.php b/vendor/silex/silex/tests/Silex/Tests/Route/SecurityTraitTest.php index 352a77bd602b22d1ad7c1c151f4bd3efbd164290..e984fefb5fe143ef42a7d3531beef8dc20402d3f 100644 --- a/vendor/silex/silex/tests/Silex/Tests/Route/SecurityTraitTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/Route/SecurityTraitTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests\Route; +use PHPUnit\Framework\TestCase; use Silex\Application; use Silex\Provider\SecurityServiceProvider; use Symfony\Component\HttpFoundation\Request; @@ -20,7 +21,7 @@ use Symfony\Component\HttpFoundation\Request; * * @author Fabien Potencier <fabien@symfony.com> */ -class SecurityTraitTest extends \PHPUnit_Framework_TestCase +class SecurityTraitTest extends TestCase { public function testSecureWithNoAuthenticatedUser() { diff --git a/vendor/silex/silex/tests/Silex/Tests/RouterTest.php b/vendor/silex/silex/tests/Silex/Tests/RouterTest.php index 665891eaa35efd53402b017e63746b61e9202102..0d0bf518b135031c25bbb22cac917b0352bf80fc 100644 --- a/vendor/silex/silex/tests/Silex/Tests/RouterTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/RouterTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Silex\Application; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -21,7 +22,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse; * * @author Igor Wiedler <igor@wiedler.ch> */ -class RouterTest extends \PHPUnit_Framework_TestCase +class RouterTest extends TestCase { public function testMapRouting() { diff --git a/vendor/silex/silex/tests/Silex/Tests/ServiceControllerResolverTest.php b/vendor/silex/silex/tests/Silex/Tests/ServiceControllerResolverTest.php index f732c7de7617a3428542f5dbe5f90e02ac14cd1e..398e2ceffb3066d9aa7b12c36dcdaea6396a5e0d 100644 --- a/vendor/silex/silex/tests/Silex/Tests/ServiceControllerResolverTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/ServiceControllerResolverTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Silex\ServiceControllerResolver; use Silex\Application; use Symfony\Component\HttpFoundation\Request; @@ -19,7 +20,7 @@ use Symfony\Component\HttpFoundation\Request; * Unit tests for ServiceControllerResolver, see ServiceControllerResolverRouterTest for some * integration tests. */ -class ServiceControllerResolverTest extends \PHPUnit_Framework_Testcase +class ServiceControllerResolverTest extends Testcase { private $app; private $mockCallbackResolver; diff --git a/vendor/silex/silex/tests/Silex/Tests/StreamTest.php b/vendor/silex/silex/tests/Silex/Tests/StreamTest.php index 601f0e60290499013ea5d47187363560829e12ef..c494d5b42a376e5c3cd9882d0194c37c07a7c5cf 100644 --- a/vendor/silex/silex/tests/Silex/Tests/StreamTest.php +++ b/vendor/silex/silex/tests/Silex/Tests/StreamTest.php @@ -11,6 +11,7 @@ namespace Silex\Tests; +use PHPUnit\Framework\TestCase; use Silex\Application; use Symfony\Component\HttpFoundation\Request; @@ -19,7 +20,7 @@ use Symfony\Component\HttpFoundation\Request; * * @author Igor Wiedler <igor@wiedler.ch> */ -class StreamTest extends \PHPUnit_Framework_TestCase +class StreamTest extends TestCase { public function testStreamReturnsStreamingResponse() { diff --git a/vendor/symfony/debug/DebugClassLoader.php b/vendor/symfony/debug/DebugClassLoader.php index 2e1d71808e132bb5bd3e68b89e5e249fe05bdaf1..eb48baf897d719301e280191dad31f4cefc144ae 100644 --- a/vendor/symfony/debug/DebugClassLoader.php +++ b/vendor/symfony/debug/DebugClassLoader.php @@ -26,6 +26,7 @@ class DebugClassLoader { private $classLoader; private $isFinder; + private $loaded = array(); private static $caseCheck; private static $final = array(); private static $finalMethods = array(); @@ -33,11 +34,6 @@ class DebugClassLoader private static $php7Reserved = array('int', 'float', 'bool', 'string', 'true', 'false', 'null'); private static $darwinCache = array('/' => array('/', array())); - /** - * Constructor. - * - * @param callable $classLoader A class loader - */ public function __construct(callable $classLoader) { $this->classLoader = $classLoader; @@ -139,9 +135,10 @@ class DebugClassLoader ErrorHandler::stackErrors(); try { - if ($this->isFinder) { + if ($this->isFinder && !isset($this->loaded[$class])) { + $this->loaded[$class] = true; if ($file = $this->classLoader[0]->findFile($class)) { - require_once $file; + require $file; } } else { call_user_func($this->classLoader, $class); diff --git a/vendor/symfony/debug/ExceptionHandler.php b/vendor/symfony/debug/ExceptionHandler.php index 5c399ef089e3b2c01a14892459d1bd8da3109b9f..a82a3246d9eaa4e9a4e83b172427a6e677f32815 100644 --- a/vendor/symfony/debug/ExceptionHandler.php +++ b/vendor/symfony/debug/ExceptionHandler.php @@ -310,8 +310,8 @@ EOF; .exception-message { flex-grow: 1; padding: 30px 0; } .exception-message, .exception-message a { color: #FFF; font-size: 21px; font-weight: 400; margin: 0; } .exception-message.long { font-size: 18px; } - .exception-message a { text-decoration: none; } - .exception-message a:hover { text-decoration: underline; } + .exception-message a { border-bottom: 1px solid rgba(255, 255, 255, 0.5); font-size: inherit; text-decoration: none; } + .exception-message a:hover { border-bottom-color: #ffffff; } .exception-illustration { flex-basis: 111px; flex-shrink: 0; height: 66px; margin-left: 15px; opacity: .7; } @@ -320,11 +320,11 @@ EOF; .trace-message { font-size: 14px; font-weight: normal; margin: .5em 0 0; } - .trace-file-path, .trace-file-path a { margin-top: 3px; color: #999; color: #795da3; color: #B0413E; color: #222; font-size: 13px; } + .trace-file-path, .trace-file-path a { color: #222; margin-top: 3px; font-size: 13px; } .trace-class { color: #B0413E; } .trace-type { padding: 0 2px; } - .trace-method { color: #B0413E; color: #222; font-weight: bold; color: #B0413E; } - .trace-arguments { color: #222; color: #999; font-weight: normal; color: #795da3; color: #777; padding-left: 2px; } + .trace-method { color: #B0413E; font-weight: bold; } + .trace-arguments { color: #777; font-weight: normal; padding-left: 2px; } @media (min-width: 575px) { .hidden-xs-down { display: initial; } @@ -393,7 +393,7 @@ EOF; $formattedValue = str_replace("\n", '', $this->escapeHtml(var_export($item[1], true))); } - $result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $key, $formattedValue); + $result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $this->escapeHtml($key), $formattedValue); } return implode(', ', $result); diff --git a/vendor/symfony/debug/Tests/DebugClassLoaderTest.php b/vendor/symfony/debug/Tests/DebugClassLoaderTest.php index f1e3fb7c611b5e70e8ffb4e85c93059a08bc9793..7145951f8c33a3a3b079e5644b4393a52cdd30d4 100644 --- a/vendor/symfony/debug/Tests/DebugClassLoaderTest.php +++ b/vendor/symfony/debug/Tests/DebugClassLoaderTest.php @@ -59,6 +59,23 @@ class DebugClassLoaderTest extends TestCase $this->fail('DebugClassLoader did not register'); } + /** + * @expectedException \Exception + * @expectedExceptionMessage boo + */ + public function testThrowingClass() + { + try { + class_exists(__NAMESPACE__.'\Fixtures\Throwing'); + $this->fail('Exception expected'); + } catch (\Exception $e) { + $this->assertSame('boo', $e->getMessage()); + } + + // the second call also should throw + class_exists(__NAMESPACE__.'\Fixtures\Throwing'); + } + public function testUnsilencing() { if (\PHP_VERSION_ID >= 70000) { @@ -124,6 +141,7 @@ class DebugClassLoaderTest extends TestCase /** * @expectedException \RuntimeException + * @expectedExceptionMessage Case mismatch between loaded and declared class names */ public function testNameCaseMismatch() { @@ -145,6 +163,7 @@ class DebugClassLoaderTest extends TestCase /** * @expectedException \RuntimeException + * @expectedExceptionMessage Case mismatch between loaded and declared class names */ public function testPsr4CaseMismatch() { @@ -185,7 +204,7 @@ class DebugClassLoaderTest extends TestCase $xError = array( 'type' => E_USER_DEPRECATED, - 'message' => 'The "Test\Symfony\Component\Debug\Tests\\'.$class.'" class '.$type.' "Symfony\Component\Debug\Tests\Fixtures\\'.$super.'" that is deprecated but this is a test deprecation notice.', + 'message' => 'The "Test\Symfony\Component\Debug\Tests\\'.$class.'" class '.$type.' "Symfony\Component\Debug\Tests\Fixtures\\'.$super.'" that is deprecated but this is a test deprecation notice', ); $this->assertSame($xError, $lastError); diff --git a/vendor/symfony/debug/Tests/Fixtures/DeprecatedClass.php b/vendor/symfony/debug/Tests/Fixtures/DeprecatedClass.php index b4c78cd140f13c927e58b3b81b55beb959af3ca2..51fde5af8a1d05246fefd466c0655598298dea4e 100644 --- a/vendor/symfony/debug/Tests/Fixtures/DeprecatedClass.php +++ b/vendor/symfony/debug/Tests/Fixtures/DeprecatedClass.php @@ -4,7 +4,7 @@ namespace Symfony\Component\Debug\Tests\Fixtures; /** * @deprecated but this is a test - * deprecation notice. + * deprecation notice * @foobar */ class DeprecatedClass diff --git a/vendor/symfony/debug/Tests/Fixtures/DeprecatedInterface.php b/vendor/symfony/debug/Tests/Fixtures/DeprecatedInterface.php index 505eccae751b9111bcda78d16df8f16c81323973..6bab62f9563b83dc3d2eaac92b3ed19ee6024587 100644 --- a/vendor/symfony/debug/Tests/Fixtures/DeprecatedInterface.php +++ b/vendor/symfony/debug/Tests/Fixtures/DeprecatedInterface.php @@ -4,7 +4,7 @@ namespace Symfony\Component\Debug\Tests\Fixtures; /** * @deprecated but this is a test - * deprecation notice. + * deprecation notice * @foobar */ interface DeprecatedInterface diff --git a/vendor/symfony/debug/Tests/Fixtures/Throwing.php b/vendor/symfony/debug/Tests/Fixtures/Throwing.php new file mode 100644 index 0000000000000000000000000000000000000000..21e0aba17d35869f12cc97577e4f3374aa4dddb8 --- /dev/null +++ b/vendor/symfony/debug/Tests/Fixtures/Throwing.php @@ -0,0 +1,3 @@ +<?php + +throw new \Exception('boo'); diff --git a/vendor/symfony/debug/composer.json b/vendor/symfony/debug/composer.json index 6531eefd999eef1ebee9400de88d8e596a8c4f7c..38323dd41c11aad800aedf998702a38d6bba73fa 100644 --- a/vendor/symfony/debug/composer.json +++ b/vendor/symfony/debug/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/log": "~1.0" }, "conflict": { diff --git a/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php b/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php index fc7b30f9ccc650693971234c1a7a07191bd43e81..bfbccf9ccd727084c24a153f6a1851d54d4d7cce 100644 --- a/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php +++ b/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php @@ -47,8 +47,6 @@ class ContainerAwareEventDispatcher extends EventDispatcher private $listeners = array(); /** - * Constructor. - * * @param ContainerInterface $container A ContainerInterface instance */ public function __construct(ContainerInterface $container) @@ -199,7 +197,7 @@ class ContainerAwareEventDispatcher extends EventDispatcher $key = $serviceId.'.'.$method; if (!isset($this->listeners[$eventName][$key])) { $this->addListener($eventName, array($listener, $method), $priority); - } elseif ($listener !== $this->listeners[$eventName][$key]) { + } elseif ($this->listeners[$eventName][$key] !== $listener) { parent::removeListener($eventName, array($this->listeners[$eventName][$key], $method)); $this->addListener($eventName, array($listener, $method), $priority); } diff --git a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php index 988cf112f71601bed4da0001bdb6a9fcfa0c3810..3f1035e13dd98356ac6ba39aa7c20d86738da395 100644 --- a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php +++ b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php @@ -34,8 +34,6 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface private $wrappedListeners; /** - * Constructor. - * * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance * @param Stopwatch $stopwatch A Stopwatch instance * @param LoggerInterface $logger A LoggerInterface instance diff --git a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php index 50e466a3983c6dc471d156202a70adf210cea0fc..887a7ec328efc44d4eb9db103aa7f078bc6c75b9 100644 --- a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php +++ b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php @@ -40,8 +40,6 @@ class RegisterListenersPass implements CompilerPassInterface protected $subscriberTag; /** - * Constructor. - * * @param string $dispatcherService Service name of the event dispatcher in processed container * @param string $listenerTag Tag name used for listener * @param string $subscriberTag Tag name used for subscribers @@ -62,8 +60,6 @@ class RegisterListenersPass implements CompilerPassInterface $definition = $container->findDefinition($this->dispatcherService); foreach ($container->findTaggedServiceIds($this->listenerTag, true) as $id => $events) { - $def = $container->getDefinition($id); - foreach ($events as $event) { $priority = isset($event['priority']) ? $event['priority'] : 0; diff --git a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php index 08ebf3400e98f1a27a05d5c344df2068abc088bc..6e0b11fce2ab5203d02720007c5ccf1d1f1ea886 100644 --- a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php +++ b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php @@ -26,8 +26,8 @@ interface EventDispatcherInterface * @param string $eventName The name of the event to dispatch. The name of * the event is the name of the method that is * invoked on listeners. - * @param Event $event The event to pass to the event handlers/listeners - * If not supplied, an empty Event instance is created. + * @param Event $event the event to pass to the event handlers/listeners + * If not supplied, an empty Event instance is created * * @return Event */ diff --git a/vendor/symfony/event-dispatcher/GenericEvent.php b/vendor/symfony/event-dispatcher/GenericEvent.php index e8e4cc050266ee0762585c27ee11d21ec84d6faf..a7520a0f345671462b49c19f5dee6ca89f8f80a7 100644 --- a/vendor/symfony/event-dispatcher/GenericEvent.php +++ b/vendor/symfony/event-dispatcher/GenericEvent.php @@ -63,7 +63,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate * * @return mixed Contents of array key * - * @throws \InvalidArgumentException If key is not found. + * @throws \InvalidArgumentException if key is not found */ public function getArgument($key) { @@ -132,7 +132,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate * * @return mixed * - * @throws \InvalidArgumentException If key does not exist in $this->args. + * @throws \InvalidArgumentException if key does not exist in $this->args */ public function offsetGet($key) { diff --git a/vendor/symfony/event-dispatcher/composer.json b/vendor/symfony/event-dispatcher/composer.json index faa0429e2d1a02b4a4021aaabb120d76b997cfe6..994e8ca64ad3c87295753433a141cedcaf78d345 100644 --- a/vendor/symfony/event-dispatcher/composer.json +++ b/vendor/symfony/event-dispatcher/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "require-dev": { "symfony/dependency-injection": "~3.3", diff --git a/vendor/symfony/http-foundation/AcceptHeader.php b/vendor/symfony/http-foundation/AcceptHeader.php index 2aa91dc44cb47d8415d873e10b9b57951191135b..99be6768f9b720534bd29b580b0db2b63a7a41d7 100644 --- a/vendor/symfony/http-foundation/AcceptHeader.php +++ b/vendor/symfony/http-foundation/AcceptHeader.php @@ -32,8 +32,6 @@ class AcceptHeader private $sorted = true; /** - * Constructor. - * * @param AcceptHeaderItem[] $items */ public function __construct(array $items) diff --git a/vendor/symfony/http-foundation/AcceptHeaderItem.php b/vendor/symfony/http-foundation/AcceptHeaderItem.php index fb54b4935a9f3e033c80128fd1d95bbe1a777c5b..e07a48aa953329bd614a1c5a00286b545b92afba 100644 --- a/vendor/symfony/http-foundation/AcceptHeaderItem.php +++ b/vendor/symfony/http-foundation/AcceptHeaderItem.php @@ -39,8 +39,6 @@ class AcceptHeaderItem private $attributes = array(); /** - * Constructor. - * * @param string $value * @param array $attributes */ @@ -67,7 +65,7 @@ class AcceptHeaderItem $lastNullAttribute = null; foreach ($bits as $bit) { - if (($start = substr($bit, 0, 1)) === ($end = substr($bit, -1)) && ($start === '"' || $start === '\'')) { + if (($start = substr($bit, 0, 1)) === ($end = substr($bit, -1)) && ('"' === $start || '\'' === $start)) { $attributes[$lastNullAttribute] = substr($bit, 1, -1); } elseif ('=' === $end) { $lastNullAttribute = $bit = substr($bit, 0, -1); @@ -78,7 +76,7 @@ class AcceptHeaderItem } } - return new self(($start = substr($value, 0, 1)) === ($end = substr($value, -1)) && ($start === '"' || $start === '\'') ? substr($value, 1, -1) : $value, $attributes); + return new self(($start = substr($value, 0, 1)) === ($end = substr($value, -1)) && ('"' === $start || '\'' === $start) ? substr($value, 1, -1) : $value, $attributes); } /** diff --git a/vendor/symfony/http-foundation/BinaryFileResponse.php b/vendor/symfony/http-foundation/BinaryFileResponse.php index 5f18aa93094ecf95504ffa6817cda923288be0f7..4394863e9e402b8c2c9e4e57249252b24208a77e 100644 --- a/vendor/symfony/http-foundation/BinaryFileResponse.php +++ b/vendor/symfony/http-foundation/BinaryFileResponse.php @@ -36,8 +36,6 @@ class BinaryFileResponse extends Response protected $deleteFileAfterSend = false; /** - * Constructor. - * * @param \SplFileInfo|string $file The file to stream * @param int $status The response status code * @param array $headers An array of response headers @@ -150,19 +148,19 @@ class BinaryFileResponse extends Response * Sets the Content-Disposition header with the given filename. * * @param string $disposition ResponseHeaderBag::DISPOSITION_INLINE or ResponseHeaderBag::DISPOSITION_ATTACHMENT - * @param string $filename Optionally use this filename instead of the real name of the file + * @param string $filename Optionally use this UTF-8 encoded filename instead of the real name of the file * @param string $filenameFallback A fallback filename, containing only ASCII characters. Defaults to an automatically encoded filename * * @return $this */ public function setContentDisposition($disposition, $filename = '', $filenameFallback = '') { - if ($filename === '') { + if ('' === $filename) { $filename = $this->file->getFilename(); } if ('' === $filenameFallback && (!preg_match('/^[\x20-\x7e]*$/', $filename) || false !== strpos($filename, '%'))) { - $encoding = mb_detect_encoding($filename, null, true); + $encoding = mb_detect_encoding($filename, null, true) ?: '8bit'; for ($i = 0, $filenameLength = mb_strlen($filename, $encoding); $i < $filenameLength; ++$i) { $char = mb_substr($filename, $i, 1, $encoding); @@ -217,7 +215,7 @@ class BinaryFileResponse extends Response if (false === $path) { $path = $this->file->getPathname(); } - if (strtolower($type) === 'x-accel-redirect') { + if ('x-accel-redirect' === strtolower($type)) { // Do X-Accel-Mapping substitutions. // @link http://wiki.nginx.org/X-accel#X-Accel-Redirect foreach (explode(',', $request->headers->get('X-Accel-Mapping', '')) as $mapping) { @@ -256,7 +254,7 @@ class BinaryFileResponse extends Response if ($start < 0 || $end > $fileSize - 1) { $this->setStatusCode(416); $this->headers->set('Content-Range', sprintf('bytes */%s', $fileSize)); - } elseif ($start !== 0 || $end !== $fileSize - 1) { + } elseif (0 !== $start || $end !== $fileSize - 1) { $this->maxlen = $end < $fileSize ? $end - $start + 1 : -1; $this->offset = $start; diff --git a/vendor/symfony/http-foundation/Cookie.php b/vendor/symfony/http-foundation/Cookie.php index 4d709c0e91aa38290dc6c268c167582350c5aa89..4519a6adaeda59aee7b3c48eb7b2b213965fca82 100644 --- a/vendor/symfony/http-foundation/Cookie.php +++ b/vendor/symfony/http-foundation/Cookie.php @@ -81,8 +81,6 @@ class Cookie } /** - * Constructor. - * * @param string $name The name of the cookie * @param string|null $value The value of the cookie * @param int|string|\DateTimeInterface $expire The time the cookie expires @@ -126,6 +124,10 @@ class Cookie $this->httpOnly = (bool) $httpOnly; $this->raw = (bool) $raw; + if (null !== $sameSite) { + $sameSite = strtolower($sameSite); + } + if (!in_array($sameSite, array(self::SAMESITE_LAX, self::SAMESITE_STRICT, null), true)) { throw new \InvalidArgumentException('The "sameSite" parameter value is not valid.'); } diff --git a/vendor/symfony/http-foundation/File/Exception/AccessDeniedException.php b/vendor/symfony/http-foundation/File/Exception/AccessDeniedException.php index 41f7a462506b76b9bd9977504fe2cae0062709a6..3b8e41d4a2cf99f40a99fed96a4fa660f8213885 100644 --- a/vendor/symfony/http-foundation/File/Exception/AccessDeniedException.php +++ b/vendor/symfony/http-foundation/File/Exception/AccessDeniedException.php @@ -19,8 +19,6 @@ namespace Symfony\Component\HttpFoundation\File\Exception; class AccessDeniedException extends FileException { /** - * Constructor. - * * @param string $path The path to the accessed file */ public function __construct($path) diff --git a/vendor/symfony/http-foundation/File/Exception/FileNotFoundException.php b/vendor/symfony/http-foundation/File/Exception/FileNotFoundException.php index ac90d4035b8ce1d3b94da08dce43c98095d824cd..bfcc37ec66ea04583d11de82a10f3294d875f13f 100644 --- a/vendor/symfony/http-foundation/File/Exception/FileNotFoundException.php +++ b/vendor/symfony/http-foundation/File/Exception/FileNotFoundException.php @@ -19,8 +19,6 @@ namespace Symfony\Component\HttpFoundation\File\Exception; class FileNotFoundException extends FileException { /** - * Constructor. - * * @param string $path The path to the file that was not found */ public function __construct($path) diff --git a/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php b/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php index f917a06d6ccbf421ffc8d98ae05a9dca8ce729c7..c2ac6768c30133db07434dc10d51610a862ff1f2 100644 --- a/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php @@ -24,8 +24,6 @@ class FileBinaryMimeTypeGuesser implements MimeTypeGuesserInterface private $cmd; /** - * Constructor. - * * The $cmd pattern must contain a "%s" string that will be replaced * with the file name to guess. * diff --git a/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php b/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php index 6fee94798c9cd9fdc3981656790016fa341ad06f..9b42835e4304418e4b9211307f9726cb5f6d221a 100644 --- a/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php @@ -24,8 +24,6 @@ class FileinfoMimeTypeGuesser implements MimeTypeGuesserInterface private $magicFile; /** - * Constructor. - * * @param string $magicFile A magic file to use with the finfo instance * * @see http://www.php.net/manual/en/function.finfo-open.php diff --git a/vendor/symfony/http-foundation/File/UploadedFile.php b/vendor/symfony/http-foundation/File/UploadedFile.php index 10837726cde5c24a224da0069f147bf2a476431e..9a2d28491a1fd44f99bfc1fd899cbc049d5ad008 100644 --- a/vendor/symfony/http-foundation/File/UploadedFile.php +++ b/vendor/symfony/http-foundation/File/UploadedFile.php @@ -198,7 +198,7 @@ class UploadedFile extends File */ public function isValid() { - $isOk = $this->error === UPLOAD_ERR_OK; + $isOk = UPLOAD_ERR_OK === $this->error; return $this->test ? $isOk : $isOk && is_uploaded_file($this->getPathname()); } @@ -259,8 +259,11 @@ class UploadedFile extends File switch (substr($iniMax, -1)) { case 't': $max *= 1024; + // no break case 'g': $max *= 1024; + // no break case 'm': $max *= 1024; + // no break case 'k': $max *= 1024; } @@ -285,7 +288,7 @@ class UploadedFile extends File ); $errorCode = $this->error; - $maxFilesize = $errorCode === UPLOAD_ERR_INI_SIZE ? self::getMaxFilesize() / 1024 : 0; + $maxFilesize = UPLOAD_ERR_INI_SIZE === $errorCode ? self::getMaxFilesize() / 1024 : 0; $message = isset($errors[$errorCode]) ? $errors[$errorCode] : 'The file "%s" was not uploaded due to an unknown error.'; return sprintf($message, $this->getClientOriginalName(), $maxFilesize); diff --git a/vendor/symfony/http-foundation/FileBag.php b/vendor/symfony/http-foundation/FileBag.php index e17a9057b71579fc5b159aec0e489bffbd776975..722ec2a9c4a920a540335b3d9e76be5e105c9de6 100644 --- a/vendor/symfony/http-foundation/FileBag.php +++ b/vendor/symfony/http-foundation/FileBag.php @@ -24,8 +24,6 @@ class FileBag extends ParameterBag private static $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type'); /** - * Constructor. - * * @param array $parameters An array of HTTP files */ public function __construct(array $parameters = array()) @@ -69,7 +67,7 @@ class FileBag extends ParameterBag * * @param array|UploadedFile $file A (multi-dimensional) array of uploaded file information * - * @return UploadedFile|UploadedFile[] A (multi-dimensional) array of UploadedFile instances + * @return UploadedFile[]|UploadedFile|null A (multi-dimensional) array of UploadedFile instances */ protected function convertFileInformation($file) { @@ -89,7 +87,7 @@ class FileBag extends ParameterBag $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['size'], $file['error']); } } else { - $file = array_map(array($this, 'convertFileInformation'), $file); + $file = array_filter(array_map(array($this, 'convertFileInformation'), $file)); } } diff --git a/vendor/symfony/http-foundation/HeaderBag.php b/vendor/symfony/http-foundation/HeaderBag.php index 3cc9e70243bca2af71181e14bef243ef337d471c..e0b51ad125609f3921419a77a948d7b199b59191 100644 --- a/vendor/symfony/http-foundation/HeaderBag.php +++ b/vendor/symfony/http-foundation/HeaderBag.php @@ -22,8 +22,6 @@ class HeaderBag implements \IteratorAggregate, \Countable protected $cacheControl = array(); /** - * Constructor. - * * @param array $headers An array of HTTP headers */ public function __construct(array $headers = array()) diff --git a/vendor/symfony/http-foundation/IpUtils.php b/vendor/symfony/http-foundation/IpUtils.php index eba603b15df016d357973e4631863b73831b3ab9..dc6d3ec818a32053ea7593975dcd3fb9c8468f91 100644 --- a/vendor/symfony/http-foundation/IpUtils.php +++ b/vendor/symfony/http-foundation/IpUtils.php @@ -75,7 +75,7 @@ class IpUtils if (false !== strpos($ip, '/')) { list($address, $netmask) = explode('/', $ip, 2); - if ($netmask === '0') { + if ('0' === $netmask) { return self::$checkedIps[$cacheKey] = filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4); } diff --git a/vendor/symfony/http-foundation/JsonResponse.php b/vendor/symfony/http-foundation/JsonResponse.php index cf1a11ea2c07b690939d7b19600c5b668c0ee54b..137ac33c46ed0c57734d3746e3a8a59bef86d804 100644 --- a/vendor/symfony/http-foundation/JsonResponse.php +++ b/vendor/symfony/http-foundation/JsonResponse.php @@ -145,16 +145,22 @@ class JsonResponse extends Response // If only PHP did the same... $data = json_encode($data, $this->encodingOptions); } else { - try { - // PHP 5.4 and up wrap exceptions thrown by JsonSerializable - // objects in a new exception that needs to be removed. - // Fortunately, PHP 5.5 and up do not trigger any warning anymore. - $data = json_encode($data, $this->encodingOptions); - } catch (\Exception $e) { - if ('Exception' === get_class($e) && 0 === strpos($e->getMessage(), 'Failed calling ')) { - throw $e->getPrevious() ?: $e; + if (!interface_exists('JsonSerializable', false)) { + set_error_handler(function () { return false; }); + try { + $data = @json_encode($data, $this->encodingOptions); + } finally { + restore_error_handler(); + } + } else { + try { + $data = json_encode($data, $this->encodingOptions); + } catch (\Exception $e) { + if ('Exception' === get_class($e) && 0 === strpos($e->getMessage(), 'Failed calling ')) { + throw $e->getPrevious() ?: $e; + } + throw $e; } - throw $e; } } diff --git a/vendor/symfony/http-foundation/ParameterBag.php b/vendor/symfony/http-foundation/ParameterBag.php index c0b36479f5b67c96c504b4deaa3d95e0566d7f66..3d278914e6f09ad13cb6890044ff9ad80f76fae4 100644 --- a/vendor/symfony/http-foundation/ParameterBag.php +++ b/vendor/symfony/http-foundation/ParameterBag.php @@ -26,8 +26,6 @@ class ParameterBag implements \IteratorAggregate, \Countable protected $parameters; /** - * Constructor. - * * @param array $parameters An array of parameters */ public function __construct(array $parameters = array()) diff --git a/vendor/symfony/http-foundation/Request.php b/vendor/symfony/http-foundation/Request.php index 6fd0707b059ff0d06fd66f02c1de134d8660e315..28e78c0a208f2ccf53789c400f5dc07624e79278 100644 --- a/vendor/symfony/http-foundation/Request.php +++ b/vendor/symfony/http-foundation/Request.php @@ -243,8 +243,6 @@ class Request ); /** - * Constructor. - * * @param array $query The GET parameters * @param array $request The POST parameters * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) @@ -463,22 +461,22 @@ class Request public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null) { $dup = clone $this; - if ($query !== null) { + if (null !== $query) { $dup->query = new ParameterBag($query); } - if ($request !== null) { + if (null !== $request) { $dup->request = new ParameterBag($request); } - if ($attributes !== null) { + if (null !== $attributes) { $dup->attributes = new ParameterBag($attributes); } - if ($cookies !== null) { + if (null !== $cookies) { $dup->cookies = new ParameterBag($cookies); } - if ($files !== null) { + if (null !== $files) { $dup->files = new FileBag($files); } - if ($server !== null) { + if (null !== $server) { $dup->server = new ServerBag($server); $dup->headers = new HeaderBag($dup->server->getHeaders()); } @@ -1022,7 +1020,7 @@ class Request return $this->server->get('SERVER_PORT'); } - if ($host[0] === '[') { + if ('[' === $host[0]) { $pos = strpos($host, ':', strrpos($host, ']')); } else { $pos = strrpos($host, ':'); @@ -1084,7 +1082,7 @@ class Request $scheme = $this->getScheme(); $port = $this->getPort(); - if (('http' == $scheme && $port == 80) || ('https' == $scheme && $port == 443)) { + if (('http' == $scheme && 80 == $port) || ('https' == $scheme && 443 == $port)) { return $this->getHost(); } @@ -1709,7 +1707,7 @@ class Request } } else { for ($i = 0, $max = count($codes); $i < $max; ++$i) { - if ($i === 0) { + if (0 === $i) { $lang = strtolower($codes[0]); } else { $lang .= '_'.strtoupper($codes[$i]); @@ -1804,7 +1802,7 @@ class Request // IIS with ISAPI_Rewrite $requestUri = $this->headers->get('X_REWRITE_URL'); $this->headers->remove('X_REWRITE_URL'); - } elseif ($this->server->get('IIS_WasUrlRewritten') == '1' && $this->server->get('UNENCODED_URL') != '') { + } elseif ('1' == $this->server->get('IIS_WasUrlRewritten') && '' != $this->server->get('UNENCODED_URL')) { // IIS7 with URL Rewrite: make sure we get the unencoded URL (double slash problem) $requestUri = $this->server->get('UNENCODED_URL'); $this->server->remove('UNENCODED_URL'); @@ -1813,7 +1811,7 @@ class Request $requestUri = $this->server->get('REQUEST_URI'); // HTTP proxy reqs setup request URI with scheme and host [and port] + the URL path, only use URL path $schemeAndHttpHost = $this->getSchemeAndHttpHost(); - if (strpos($requestUri, $schemeAndHttpHost) === 0) { + if (0 === strpos($requestUri, $schemeAndHttpHost)) { $requestUri = substr($requestUri, strlen($schemeAndHttpHost)); } } elseif ($this->server->has('ORIG_PATH_INFO')) { @@ -1890,7 +1888,7 @@ class Request // If using mod_rewrite or ISAPI_Rewrite strip the script filename // out of baseUrl. $pos !== 0 makes sure it is not matching a value // from PATH_INFO or QUERY_STRING - if (strlen($requestUri) >= strlen($baseUrl) && (false !== $pos = strpos($requestUri, $baseUrl)) && $pos !== 0) { + if (strlen($requestUri) >= strlen($baseUrl) && (false !== $pos = strpos($requestUri, $baseUrl)) && 0 !== $pos) { $baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl)); } diff --git a/vendor/symfony/http-foundation/RequestMatcher.php b/vendor/symfony/http-foundation/RequestMatcher.php index aa4f67b58bb4313659dace783477ba45c23483b8..076d077c7d0728a399dc8e822d35b83dcb85f931 100644 --- a/vendor/symfony/http-foundation/RequestMatcher.php +++ b/vendor/symfony/http-foundation/RequestMatcher.php @@ -173,6 +173,6 @@ class RequestMatcher implements RequestMatcherInterface // Note to future implementors: add additional checks above the // foreach above or else your check might not be run! - return count($this->ips) === 0; + return 0 === count($this->ips); } } diff --git a/vendor/symfony/http-foundation/Response.php b/vendor/symfony/http-foundation/Response.php index 4af1e0bae2ecfe7ecf4225f28a3d99bc9777580a..ced0afa6ca917d708f2d29b2be2f06f58864c1e4 100644 --- a/vendor/symfony/http-foundation/Response.php +++ b/vendor/symfony/http-foundation/Response.php @@ -187,8 +187,6 @@ class Response ); /** - * Constructor. - * * @param mixed $content The response content, see setContent() * @param int $status The response status code * @param array $headers An array of response headers @@ -455,12 +453,12 @@ class Response /** * Sets the response status code. * - * @param int $code HTTP status code - * @param mixed $text HTTP status text - * * If the status text is null it will be automatically populated for the known * status codes and left empty otherwise. * + * @param int $code HTTP status code + * @param mixed $text HTTP status text + * * @return $this * * @throws \InvalidArgumentException When the HTTP status code is not valid @@ -1261,7 +1259,7 @@ class Response // PHP_OUTPUT_HANDLER_* are not defined on HHVM 3.3 $flags = defined('PHP_OUTPUT_HANDLER_REMOVABLE') ? PHP_OUTPUT_HANDLER_REMOVABLE | ($flush ? PHP_OUTPUT_HANDLER_FLUSHABLE : PHP_OUTPUT_HANDLER_CLEANABLE) : -1; - while ($level-- > $targetLevel && ($s = $status[$level]) && (!isset($s['del']) ? !isset($s['flags']) || $flags === ($s['flags'] & $flags) : $s['del'])) { + while ($level-- > $targetLevel && ($s = $status[$level]) && (!isset($s['del']) ? !isset($s['flags']) || ($s['flags'] & $flags) === $flags : $s['del'])) { if ($flush) { ob_end_flush(); } else { @@ -1279,7 +1277,7 @@ class Response */ protected function ensureIEOverSSLCompatibility(Request $request) { - if (false !== stripos($this->headers->get('Content-Disposition'), 'attachment') && preg_match('/MSIE (.*?);/i', $request->server->get('HTTP_USER_AGENT'), $match) == 1 && true === $request->isSecure()) { + if (false !== stripos($this->headers->get('Content-Disposition'), 'attachment') && 1 == preg_match('/MSIE (.*?);/i', $request->server->get('HTTP_USER_AGENT'), $match) && true === $request->isSecure()) { if ((int) preg_replace('/(MSIE )(.*?);/', '$2', $match[0]) < 9) { $this->headers->remove('Cache-Control'); } diff --git a/vendor/symfony/http-foundation/ResponseHeaderBag.php b/vendor/symfony/http-foundation/ResponseHeaderBag.php index df2931be05a2e6621eda4f0b83e0a94c33d89c16..7b91e4f136f6eed84026a59f55356ebdaad2bd82 100644 --- a/vendor/symfony/http-foundation/ResponseHeaderBag.php +++ b/vendor/symfony/http-foundation/ResponseHeaderBag.php @@ -40,8 +40,6 @@ class ResponseHeaderBag extends HeaderBag protected $headerNames = array(); /** - * Constructor. - * * @param array $headers An array of HTTP headers */ public function __construct(array $headers = array()) diff --git a/vendor/symfony/http-foundation/ServerBag.php b/vendor/symfony/http-foundation/ServerBag.php index 0d38c08ac0544e0aa62a38889577f54137447dbf..19d2022ef7ddb4ccb91651a34547bf20458830cb 100644 --- a/vendor/symfony/http-foundation/ServerBag.php +++ b/vendor/symfony/http-foundation/ServerBag.php @@ -68,7 +68,7 @@ class ServerBag extends ParameterBag if (0 === stripos($authorizationHeader, 'basic ')) { // Decode AUTHORIZATION header into PHP_AUTH_USER and PHP_AUTH_PW when authorization header is basic $exploded = explode(':', base64_decode(substr($authorizationHeader, 6)), 2); - if (count($exploded) == 2) { + if (2 == count($exploded)) { list($headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']) = $exploded; } } elseif (empty($this->parameters['PHP_AUTH_DIGEST']) && (0 === stripos($authorizationHeader, 'digest '))) { diff --git a/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php b/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php index af292e37a4fe47cfff65e7bc995f23371035e626..57c297197b86220bde146a24ca3bc9fa5406eb5d 100644 --- a/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php +++ b/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php @@ -29,8 +29,6 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta protected $attributes = array(); /** - * Constructor. - * * @param string $storageKey The key used to store attributes in the session */ public function __construct($storageKey = '_sf2_attributes') diff --git a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php index d797a6f23886e9db8d44acba1b9d5cd848894c4a..e149801aad9d8ae4fa094cdd2dc4b3fd426980a7 100644 --- a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php +++ b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php @@ -27,8 +27,6 @@ class NamespacedAttributeBag extends AttributeBag private $namespaceCharacter; /** - * Constructor. - * * @param string $storageKey Session storage key * @param string $namespaceCharacter Namespace character to use in keys */ @@ -109,7 +107,7 @@ class NamespacedAttributeBag extends AttributeBag protected function &resolveAttributePath($name, $writeContext = false) { $array = &$this->attributes; - $name = (strpos($name, $this->namespaceCharacter) === 0) ? substr($name, 1) : $name; + $name = (0 === strpos($name, $this->namespaceCharacter)) ? substr($name, 1) : $name; // Check if there is anything to do, else return if (!$name) { diff --git a/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php b/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php index ddd603fdd1efb63d4ee803d1d91c331aabb64265..8110aee0cffc17120a4293cb93ab0da00d2fe7ce 100644 --- a/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php +++ b/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php @@ -35,8 +35,6 @@ class AutoExpireFlashBag implements FlashBagInterface private $storageKey; /** - * Constructor. - * * @param string $storageKey The key used to store flashes in the session */ public function __construct($storageKey = '_sf2_flashes') diff --git a/vendor/symfony/http-foundation/Session/Flash/FlashBag.php b/vendor/symfony/http-foundation/Session/Flash/FlashBag.php index 85b4f00b00f56c8cd85b3417e48c55a6e2dff4b1..a86dc6c1a2a046611c817ae9ab30799f16562c07 100644 --- a/vendor/symfony/http-foundation/Session/Flash/FlashBag.php +++ b/vendor/symfony/http-foundation/Session/Flash/FlashBag.php @@ -35,8 +35,6 @@ class FlashBag implements FlashBagInterface private $storageKey; /** - * Constructor. - * * @param string $storageKey The key used to store flashes in the session */ public function __construct($storageKey = '_sf2_flashes') diff --git a/vendor/symfony/http-foundation/Session/Session.php b/vendor/symfony/http-foundation/Session/Session.php index 70bcf3e0905c734584010859a5e67f1e8ae22ba7..f063651a18ebf4d24cae83455c955b1e548f1beb 100644 --- a/vendor/symfony/http-foundation/Session/Session.php +++ b/vendor/symfony/http-foundation/Session/Session.php @@ -19,8 +19,6 @@ use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; /** - * Session. - * * @author Fabien Potencier <fabien@symfony.com> * @author Drak <drak@zikula.org> */ @@ -44,8 +42,6 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable private $attributeName; /** - * Constructor. - * * @param SessionStorageInterface $storage A SessionStorageInterface instance * @param AttributeBagInterface $attributes An AttributeBagInterface instance, (defaults null for default AttributeBag) * @param FlashBagInterface $flashes A FlashBagInterface instance (defaults null for default FlashBag) diff --git a/vendor/symfony/http-foundation/Session/SessionInterface.php b/vendor/symfony/http-foundation/Session/SessionInterface.php index d3fcd2eec4e730456f7712aad6fbeb65968c2a00..172c9b457fb155ecfbc4b8f6453c98ca92c76fc0 100644 --- a/vendor/symfony/http-foundation/Session/SessionInterface.php +++ b/vendor/symfony/http-foundation/Session/SessionInterface.php @@ -25,7 +25,7 @@ interface SessionInterface * * @return bool True if session started * - * @throws \RuntimeException If session fails to start. + * @throws \RuntimeException if session fails to start */ public function start(); diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php index 962a3878d9767a92e206ff40d1ffc4a7e6cb02bf..d31aa7667e657e514856506f9a6ed026ea512daa 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php @@ -12,8 +12,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; /** - * MemcacheSessionHandler. - * * @author Drak <drak@zikula.org> */ class MemcacheSessionHandler implements \SessionHandlerInterface @@ -34,8 +32,6 @@ class MemcacheSessionHandler implements \SessionHandlerInterface private $prefix; /** - * Constructor. - * * List of available options: * * prefix: The prefix to use for the memcache keys in order to avoid collision * * expiretime: The time to live in seconds @@ -95,7 +91,9 @@ class MemcacheSessionHandler implements \SessionHandlerInterface */ public function destroy($sessionId) { - return $this->memcache->delete($this->prefix.$sessionId); + $this->memcache->delete($this->prefix.$sessionId); + + return true; } /** diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php index 76b08e2db944c7477e98be5df1c6f2049a0e5982..3bbde5420d16afdbbd35a8d0670d8fb55db2a506 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php @@ -12,8 +12,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; /** - * MemcachedSessionHandler. - * * Memcached based session storage handler based on the Memcached class * provided by the PHP memcached extension. * @@ -39,8 +37,6 @@ class MemcachedSessionHandler implements \SessionHandlerInterface private $prefix; /** - * Constructor. - * * List of available options: * * prefix: The prefix to use for the memcached keys in order to avoid collision * * expiretime: The time to live in seconds @@ -101,7 +97,9 @@ class MemcachedSessionHandler implements \SessionHandlerInterface */ public function destroy($sessionId) { - return $this->memcached->delete($this->prefix.$sessionId); + $result = $this->memcached->delete($this->prefix.$sessionId); + + return $result || \Memcached::RES_NOTFOUND == $this->memcached->getResultCode(); } /** diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php index 8408f000cdbf8627e23844b2906c5781746c5e44..f140939dbd49a13fd5e07f3b1138d0303f2404b9 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -12,8 +12,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; /** - * MongoDB session handler. - * * @author Markus Bachmann <markus.bachmann@bachi.biz> */ class MongoDbSessionHandler implements \SessionHandlerInterface @@ -34,8 +32,6 @@ class MongoDbSessionHandler implements \SessionHandlerInterface private $options; /** - * Constructor. - * * List of available options: * * database: The name of the database [required] * * collection: The name of the collection [required] @@ -122,7 +118,7 @@ class MongoDbSessionHandler implements \SessionHandlerInterface */ public function gc($maxlifetime) { - $methodName = $this->mongo instanceof \MongoDB\Client ? 'deleteOne' : 'remove'; + $methodName = $this->mongo instanceof \MongoDB\Client ? 'deleteMany' : 'remove'; $this->getCollection()->$methodName(array( $this->options['expiry_field'] => array('$lt' => $this->createDateTime()), diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php index 1be0a398373336163086e0cf0306a4b4f24de14d..d6ad93749f048dc1ad4df8fce5a2c471547bd76f 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php @@ -12,8 +12,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; /** - * NativeFileSessionHandler. - * * Native session handler using PHP's built in file storage. * * @author Drak <drak@zikula.org> @@ -21,8 +19,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; class NativeFileSessionHandler extends NativeSessionHandler { /** - * Constructor. - * * @param string $savePath Path of directory to save session files * Default null will leave setting as defined by PHP. * '/path', 'N;/path', or 'N;octal-mode;/path diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php index 8909a5f401fdc1123ccf244628df4807ddb137bb..5cdac639399f0b6a86d22d82a17e53da03ec9b4b 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php @@ -148,8 +148,6 @@ class PdoSessionHandler implements \SessionHandlerInterface private $gcCalled = false; /** - * Constructor. - * * You can either pass an existing database connection as PDO instance or * pass a DSN string that will be used to lazy-connect to the database * when the session is actually used. Furthermore it's possible to pass null @@ -580,11 +578,11 @@ class PdoSessionHandler implements \SessionHandlerInterface return $releaseStmt; case 'pgsql': // Obtaining an exclusive session level advisory lock requires an integer key. - // So we convert the HEX representation of the session id to an integer. - // Since integers are signed, we have to skip one hex char to fit in the range. - if (4 === PHP_INT_SIZE) { - $sessionInt1 = hexdec(substr($sessionId, 0, 7)); - $sessionInt2 = hexdec(substr($sessionId, 7, 7)); + // When session.sid_bits_per_character > 4, the session id can contain non-hex-characters. + // So we cannot just use hexdec(). + if (4 === \PHP_INT_SIZE) { + $sessionInt1 = $this->convertStringToInt($sessionId); + $sessionInt2 = $this->convertStringToInt(substr($sessionId, 4, 4)); $stmt = $this->pdo->prepare('SELECT pg_advisory_lock(:key1, :key2)'); $stmt->bindValue(':key1', $sessionInt1, \PDO::PARAM_INT); @@ -595,7 +593,7 @@ class PdoSessionHandler implements \SessionHandlerInterface $releaseStmt->bindValue(':key1', $sessionInt1, \PDO::PARAM_INT); $releaseStmt->bindValue(':key2', $sessionInt2, \PDO::PARAM_INT); } else { - $sessionBigInt = hexdec(substr($sessionId, 0, 15)); + $sessionBigInt = $this->convertStringToInt($sessionId); $stmt = $this->pdo->prepare('SELECT pg_advisory_lock(:key)'); $stmt->bindValue(':key', $sessionBigInt, \PDO::PARAM_INT); @@ -613,6 +611,27 @@ class PdoSessionHandler implements \SessionHandlerInterface } } + /** + * Encodes the first 4 (when PHP_INT_SIZE == 4) or 8 characters of the string as an integer. + * + * Keep in mind, PHP integers are signed. + * + * @param string $string + * + * @return int + */ + private function convertStringToInt($string) + { + if (4 === \PHP_INT_SIZE) { + return (ord($string[3]) << 24) + (ord($string[2]) << 16) + (ord($string[1]) << 8) + ord($string[0]); + } + + $int1 = (ord($string[7]) << 24) + (ord($string[6]) << 16) + (ord($string[5]) << 8) + ord($string[4]); + $int2 = (ord($string[3]) << 24) + (ord($string[2]) << 16) + (ord($string[1]) << 8) + ord($string[0]); + + return $int2 + ($int1 << 32); + } + /** * Return a locking or nonlocking SQL query to read session information. * diff --git a/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php b/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php index 322dd560f80879c67aef47904ebae81ae6c2e222..6f59af486981ebb1b2cb9c2687cc3ef2d40250d4 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php +++ b/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php @@ -54,8 +54,6 @@ class MetadataBag implements SessionBagInterface private $updateThreshold; /** - * Constructor. - * * @param string $storageKey The key used to store bag in the session * @param int $updateThreshold The time to wait between two UPDATED updates */ diff --git a/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php index 348fd23018a037a9b690a07af053ae31ef2b3080..0349a43367d76364aeded429c9f93ec5731aa8f5 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php @@ -63,8 +63,6 @@ class MockArraySessionStorage implements SessionStorageInterface protected $bags = array(); /** - * Constructor. - * * @param string $name Session name * @param MetadataBag $metaBag MetadataBag instance */ diff --git a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php index 71f9e555121fa38a4ff97eb332573ffd195336d6..8c1bf73caefb312a006b4a25819f915fb458b68d 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php @@ -30,8 +30,6 @@ class MockFileSessionStorage extends MockArraySessionStorage private $savePath; /** - * Constructor. - * * @param string $savePath Path of directory to save session files * @param string $name Session name * @param MetadataBag $metaBag MetadataBag instance diff --git a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php index 97161b8d0f8a16b8d1d26ed0cb4bd9bc655c478c..8f4ebefaabd9d123f3a44991c9a0419eeb495667 100644 --- a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php @@ -52,8 +52,6 @@ class NativeSessionStorage implements SessionStorageInterface protected $metadataBag; /** - * Constructor. - * * Depending on how you want the storage driver to behave you probably * want to override this constructor entirely. * diff --git a/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php index 6f02a7fd73d23cd407dc62120c26cdd40db8801d..9420d086cad28712988eeaaa69e4c9c6c36d5a99 100644 --- a/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php @@ -22,8 +22,6 @@ use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandle class PhpBridgeSessionStorage extends NativeSessionStorage { /** - * Constructor. - * * @param AbstractProxy|NativeSessionHandler|\SessionHandlerInterface|null $handler * @param MetadataBag $metaBag MetadataBag */ diff --git a/vendor/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php b/vendor/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php index 0db34aa28d38546afc979b9e7a32be121c1fc912..21ed1ada04b4f0ed5ec15c124e0d53e4481a4476 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php +++ b/vendor/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php @@ -12,17 +12,12 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; /** - * NativeProxy. - * * This proxy is built-in session handlers in PHP 5.3.x * * @author Drak <drak@zikula.org> */ class NativeProxy extends AbstractProxy { - /** - * Constructor. - */ public function __construct() { // this makes an educated guess as to what the handler is since it should already be set. diff --git a/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php b/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php index 68ed713c22ffed8896af431220c2a3c854e9f436..be39f6baeb1f7b4fa0ac156d6822ccd7ef6c43c9 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php +++ b/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php @@ -12,8 +12,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; /** - * SessionHandler proxy. - * * @author Drak <drak@zikula.org> */ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterface @@ -24,8 +22,6 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf protected $handler; /** - * Constructor. - * * @param \SessionHandlerInterface $handler */ public function __construct(\SessionHandlerInterface $handler) diff --git a/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php b/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php index 34f6c4633f4771e9d0f0032f97da039dd5305e13..097583d5a51eba1bf099b7d29faceccf72cd5b32 100644 --- a/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php +++ b/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php @@ -26,7 +26,7 @@ interface SessionStorageInterface * * @return bool True if started * - * @throws \RuntimeException If something goes wrong starting the session. + * @throws \RuntimeException if something goes wrong starting the session */ public function start(); @@ -104,8 +104,8 @@ interface SessionStorageInterface * a real PHP session would interfere with testing, in which case * it should actually persist the session data if required. * - * @throws \RuntimeException If the session is saved without being started, or if the session - * is already closed. + * @throws \RuntimeException if the session is saved without being started, or if the session + * is already closed */ public function save(); diff --git a/vendor/symfony/http-foundation/StreamedResponse.php b/vendor/symfony/http-foundation/StreamedResponse.php index 928531309ad0a5bcf7beaa6da9dc4639b320d327..3cbbfc5f4f7eac773dd2a59d89382cd51809efd1 100644 --- a/vendor/symfony/http-foundation/StreamedResponse.php +++ b/vendor/symfony/http-foundation/StreamedResponse.php @@ -31,8 +31,6 @@ class StreamedResponse extends Response private $headersSent; /** - * Constructor. - * * @param callable|null $callback A valid PHP callback or null to set it later * @param int $status The response status code * @param array $headers An array of response headers diff --git a/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php b/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php index 89e078ca2a935e75cd8573f058e8d21ba8e2659a..1b9e58991cc6d5ba033d7c753ee9391c942fadc5 100644 --- a/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php +++ b/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php @@ -69,6 +69,17 @@ class BinaryFileResponseTest extends ResponseTestCase $this->assertSame('attachment; filename="f__.html"; filename*=utf-8\'\'f%C3%B6%C3%B6.html', $response->headers->get('Content-Disposition')); } + public function testSetContentDispositionGeneratesSafeFallbackFilenameForWronglyEncodedFilename() + { + $response = new BinaryFileResponse(__FILE__); + + $iso88591EncodedFilename = utf8_decode('föö.html'); + $response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT, $iso88591EncodedFilename); + + // the parameter filename* is invalid in this case (rawurldecode('f%F6%F6') does not provide a UTF-8 string but an ISO-8859-1 encoded one) + $this->assertSame('attachment; filename="f__.html"; filename*=utf-8\'\'f%F6%F6.html', $response->headers->get('Content-Disposition')); + } + /** * @dataProvider provideRanges */ diff --git a/vendor/symfony/http-foundation/Tests/CookieTest.php b/vendor/symfony/http-foundation/Tests/CookieTest.php index 56f871e7b6fffd2f945f0cd65e2d9b9d500901d6..070b7dd4290e64271a440674efb7da53c86b9c5d 100644 --- a/vendor/symfony/http-foundation/Tests/CookieTest.php +++ b/vendor/symfony/http-foundation/Tests/CookieTest.php @@ -214,4 +214,10 @@ class CookieTest extends TestCase $cookie = Cookie::fromString('foo=bar; expires=Fri, 20-May-2011 15:25:52 GMT; path=/; domain=.myfoodomain.com; secure'); $this->assertFalse($cookie->isHttpOnly()); } + + public function testSameSiteAttributeIsCaseInsensitive() + { + $cookie = new Cookie('foo', 'bar', 0, '/', null, false, true, false, 'Lax'); + $this->assertEquals('lax', $cookie->getSameSite()); + } } diff --git a/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php b/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php index 5a2b7a21c325efed6092941388a38ee7a465f5ea..b3f1f026a558fafdf304286a9093d0463437e183 100644 --- a/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php +++ b/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php @@ -71,7 +71,7 @@ class MimeTypeTest extends TestCase touch($path); @chmod($path, 0333); - if (substr(sprintf('%o', fileperms($path)), -4) == '0333') { + if ('0333' == substr(sprintf('%o', fileperms($path)), -4)) { $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException'); MimeTypeGuesser::getInstance()->guess($path); } else { diff --git a/vendor/symfony/http-foundation/Tests/FileBagTest.php b/vendor/symfony/http-foundation/Tests/FileBagTest.php index e7defa677713b003bed7c5d8ae5793fcaa8f2048..7d2902d325d462cf09c79c8950d3a54169e34c73 100644 --- a/vendor/symfony/http-foundation/Tests/FileBagTest.php +++ b/vendor/symfony/http-foundation/Tests/FileBagTest.php @@ -60,6 +60,19 @@ class FileBagTest extends TestCase $this->assertNull($bag->get('file')); } + public function testShouldRemoveEmptyUploadedFilesForMultiUpload() + { + $bag = new FileBag(array('file' => array( + 'name' => array(''), + 'type' => array(''), + 'tmp_name' => array(''), + 'error' => array(UPLOAD_ERR_NO_FILE), + 'size' => array(0), + ))); + + $this->assertSame(array(), $bag->get('file')); + } + public function testShouldConvertUploadedFilesWithPhpBug() { $tmpFile = $this->createTempFile(); diff --git a/vendor/symfony/http-foundation/Tests/JsonResponseTest.php b/vendor/symfony/http-foundation/Tests/JsonResponseTest.php index c8b93778954a8d4c4050a35f59fc15a54fbc06a8..201839f89c521f0f0dca61decd08f8cb206ece6f 100644 --- a/vendor/symfony/http-foundation/Tests/JsonResponseTest.php +++ b/vendor/symfony/http-foundation/Tests/JsonResponseTest.php @@ -228,6 +228,10 @@ class JsonResponseTest extends TestCase */ public function testSetContentJsonSerializeError() { + if (!interface_exists('JsonSerializable', false)) { + $this->markTestSkipped('JsonSerializable is required.'); + } + $serializable = new JsonSerializableObject(); JsonResponse::create($serializable); @@ -242,7 +246,7 @@ class JsonResponseTest extends TestCase } } -if (interface_exists('JsonSerializable')) { +if (interface_exists('JsonSerializable', false)) { class JsonSerializableObject implements \JsonSerializable { public function jsonSerialize() diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php index 74366863f712641f40f05b7a7a0c962ad747af80..b5fee8eba425f958e654138e0388f480ff73db51 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php @@ -285,7 +285,7 @@ class MongoDbSessionHandlerTest extends TestCase ->with($this->options['database'], $this->options['collection']) ->will($this->returnValue($collection)); - $methodName = phpversion('mongodb') ? 'deleteOne' : 'remove'; + $methodName = phpversion('mongodb') ? 'deleteMany' : 'remove'; $collection->expects($this->once()) ->method($methodName) diff --git a/vendor/symfony/http-foundation/composer.json b/vendor/symfony/http-foundation/composer.json index dfa25f79ec4059802ef9c58be3d4f165235ff2a9..a964975ecb3f2456f398a7df4ba307bdf8c8abad 100644 --- a/vendor/symfony/http-foundation/composer.json +++ b/vendor/symfony/http-foundation/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { diff --git a/vendor/symfony/http-kernel/Client.php b/vendor/symfony/http-kernel/Client.php index 94f70cd6f7a021eda45510c2d589ecf8196b817c..c10b24342a2646d80a3b6dd67431ca6ff7a4e5a3 100644 --- a/vendor/symfony/http-kernel/Client.php +++ b/vendor/symfony/http-kernel/Client.php @@ -33,8 +33,6 @@ class Client extends BaseClient protected $kernel; /** - * Constructor. - * * @param HttpKernelInterface $kernel An HttpKernel instance * @param array $server The server parameters (equivalent of $_SERVER) * @param History $history A History instance to store the browser history diff --git a/vendor/symfony/http-kernel/Config/EnvParametersResource.php b/vendor/symfony/http-kernel/Config/EnvParametersResource.php index 0fe6aca8c1d8db94e09d81a24c54666a9fec2f1a..e7f48718ca15ea3dd93a0d5020548375ec5a84d6 100644 --- a/vendor/symfony/http-kernel/Config/EnvParametersResource.php +++ b/vendor/symfony/http-kernel/Config/EnvParametersResource.php @@ -31,8 +31,6 @@ class EnvParametersResource implements SelfCheckingResourceInterface, \Serializa private $variables; /** - * Constructor. - * * @param string $prefix */ public function __construct($prefix) diff --git a/vendor/symfony/http-kernel/Config/FileLocator.php b/vendor/symfony/http-kernel/Config/FileLocator.php index 169c9ad6e502a1b06c5a2312f1998f4d4f68f500..fb1f913bdff5d1ae348cd4611d3529215b7a1be9 100644 --- a/vendor/symfony/http-kernel/Config/FileLocator.php +++ b/vendor/symfony/http-kernel/Config/FileLocator.php @@ -25,8 +25,6 @@ class FileLocator extends BaseFileLocator private $path; /** - * Constructor. - * * @param KernelInterface $kernel A KernelInterface instance * @param null|string $path The path the global resource directory * @param array $paths An array of paths where to look for resources diff --git a/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php b/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php index 1a107c62f60b1538d5dc476fdd5d8fbb4bd8bc18..fbcecad25e18a0e3f1ab1997019a2165031a6ba9 100644 --- a/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php +++ b/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php @@ -13,6 +13,7 @@ namespace Symfony\Component\HttpKernel\Controller; use Psr\Container\ContainerInterface; use Psr\Log\LoggerInterface; +use Symfony\Component\HttpFoundation\Request; /** * A controller resolver searching for a controller in a psr-11 container when using the "service:method" notation. @@ -31,6 +32,20 @@ class ContainerControllerResolver extends ControllerResolver parent::__construct($logger); } + /** + * {@inheritdoc} + */ + public function getController(Request $request) + { + $controller = parent::getController($request); + + if (is_array($controller) && isset($controller[0]) && is_string($controller[0]) && $this->container->has($controller[0])) { + $controller[0] = $this->instantiateController($controller[0]); + } + + return $controller; + } + /** * Returns a callable for the given controller. * diff --git a/vendor/symfony/http-kernel/Controller/ControllerReference.php b/vendor/symfony/http-kernel/Controller/ControllerReference.php index 3d1592e83aee1fcb71862ee72bd49667cb86f61e..fae4e7fa449bc572be27c602fd3d01ef4eb10f6e 100644 --- a/vendor/symfony/http-kernel/Controller/ControllerReference.php +++ b/vendor/symfony/http-kernel/Controller/ControllerReference.php @@ -31,8 +31,6 @@ class ControllerReference public $query = array(); /** - * Constructor. - * * @param string $controller The controller name * @param array $attributes An array of parameters to add to the Request attributes * @param array $query An array of parameters to add to the Request query string diff --git a/vendor/symfony/http-kernel/Controller/ControllerResolver.php b/vendor/symfony/http-kernel/Controller/ControllerResolver.php index f51a5a8efb1c17ce65acd9dd1afa8a72e78d2311..7d93cc56c75631e910610cc019b4318e4c02d6ca 100644 --- a/vendor/symfony/http-kernel/Controller/ControllerResolver.php +++ b/vendor/symfony/http-kernel/Controller/ControllerResolver.php @@ -15,8 +15,6 @@ use Psr\Log\LoggerInterface; use Symfony\Component\HttpFoundation\Request; /** - * ControllerResolver. - * * This implementation uses the '_controller' request attribute to determine * the controller to execute and uses the request attributes to determine * the controller method arguments. @@ -44,8 +42,6 @@ class ControllerResolver implements ArgumentResolverInterface, ControllerResolve private $supportsScalarTypes; /** - * Constructor. - * * @param LoggerInterface $logger A LoggerInterface instance */ public function __construct(LoggerInterface $logger = null) diff --git a/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php b/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php index ce291b1e3e26907debd17816693947b1cef8d48c..e7471b457b80e670046e3236926c75bd12883766 100644 --- a/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php +++ b/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php @@ -15,8 +15,6 @@ use Symfony\Component\Stopwatch\Stopwatch; use Symfony\Component\HttpFoundation\Request; /** - * TraceableControllerResolver. - * * @author Fabien Potencier <fabien@symfony.com> */ class TraceableControllerResolver implements ControllerResolverInterface, ArgumentResolverInterface @@ -26,8 +24,6 @@ class TraceableControllerResolver implements ControllerResolverInterface, Argume private $argumentResolver; /** - * Constructor. - * * @param ControllerResolverInterface $resolver A ControllerResolverInterface instance * @param Stopwatch $stopwatch A Stopwatch instance * @param ArgumentResolverInterface $argumentResolver Only required for BC diff --git a/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php b/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php index 87c4c08e69b2255b1df9710b61af808a8b4393bd..965342191b4cf6b0c45506fc8931a72f158aebfe 100644 --- a/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php @@ -18,8 +18,6 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\VarDumper\Caster\LinkStub; /** - * ConfigDataCollector. - * * @author Fabien Potencier <fabien@symfony.com> */ class ConfigDataCollector extends DataCollector implements LateDataCollectorInterface @@ -33,8 +31,6 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte private $hasVarDumper; /** - * Constructor. - * * @param string $name The name of the application using the web profiler * @param string $version The version of the application using the web profiler */ diff --git a/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php b/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php index 93850108444a0d136bf3bb260b9f3ddc32e90fd0..b7f61f46fd19bc2d8cd4433f1db2770d9722bed5 100644 --- a/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php @@ -99,8 +99,11 @@ class MemoryDataCollector extends DataCollector implements LateDataCollectorInte switch (substr($memoryLimit, -1)) { case 't': $max *= 1024; + // no break case 'g': $max *= 1024; + // no break case 'm': $max *= 1024; + // no break case 'k': $max *= 1024; } diff --git a/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php b/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php index 9235ae4e96f0849500c35d6deda3091cab21fcc6..b1ecebdc969a259186e87e99d657b8dea3849ee3 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php @@ -71,7 +71,7 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface // Explicit classes declared in the patterns are returned directly foreach ($patterns as $key => $pattern) { - if (substr($pattern, -1) !== '\\' && false === strpos($pattern, '*')) { + if ('\\' !== substr($pattern, -1) && false === strpos($pattern, '*')) { unset($patterns[$key]); $expanded[] = ltrim($pattern, '\\'); } @@ -124,7 +124,7 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface $regex = strtr($regex, array('\\*\\*' => '.*?', '\\*' => '[^\\\\]*?')); // If this class does not end by a slash, anchor the end - if (substr($regex, -1) !== '\\') { + if ('\\' !== substr($regex, -1)) { $regex .= '$'; } diff --git a/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php b/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php index d6f4dab1418c02f05298f8de1abba618f6497bad..314217acbd9d47d2daa0ed3025462a413941d516 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php +++ b/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php @@ -30,8 +30,6 @@ class LazyLoadingFragmentHandler extends FragmentHandler private $initialized = array(); /** - * Constructor. - * * @param ContainerInterface $container A container * @param RequestStack $requestStack The Request stack that controls the lifecycle of requests * @param bool $debug Whether the debug mode is enabled or not diff --git a/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php index 222185f52766f66a62d851f01911564143ea1a05..9c00f99b7b003fc0d2b8d897ededce740b4dcbe1 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php @@ -50,6 +50,7 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface foreach ($container->findTaggedServiceIds($this->controllerTag, true) as $id => $tags) { $def = $container->getDefinition($id); + $def->setPublic(true); $class = $def->getClass(); $autowire = $def->isAutowired(); diff --git a/vendor/symfony/http-kernel/EventListener/FragmentListener.php b/vendor/symfony/http-kernel/EventListener/FragmentListener.php index 37bf15c3a084f0181a3bb1848c67924273e4a14f..4e814525acf4a8a3a05edacde50d888076435b27 100644 --- a/vendor/symfony/http-kernel/EventListener/FragmentListener.php +++ b/vendor/symfony/http-kernel/EventListener/FragmentListener.php @@ -35,8 +35,6 @@ class FragmentListener implements EventSubscriberInterface private $fragmentPath; /** - * Constructor. - * * @param UriSigner $signer A UriSigner instance * @param string $fragmentPath The path that triggers this listener */ @@ -51,7 +49,7 @@ class FragmentListener implements EventSubscriberInterface * * @param GetResponseEvent $event A GetResponseEvent instance * - * @throws AccessDeniedHttpException if the request does not come from a trusted IP. + * @throws AccessDeniedHttpException if the request does not come from a trusted IP */ public function onKernelRequest(GetResponseEvent $event) { diff --git a/vendor/symfony/http-kernel/EventListener/LocaleListener.php b/vendor/symfony/http-kernel/EventListener/LocaleListener.php index 99fc78679390cd55766620cd6345c2d2c81a5e38..427ea82fc8bf7370989b447e9c10b86b7f36ae7e 100644 --- a/vendor/symfony/http-kernel/EventListener/LocaleListener.php +++ b/vendor/symfony/http-kernel/EventListener/LocaleListener.php @@ -31,8 +31,6 @@ class LocaleListener implements EventSubscriberInterface private $requestStack; /** - * Constructor. - * * @param RequestStack $requestStack A RequestStack instance * @param string $defaultLocale The default locale * @param RequestContextAwareInterface|null $router The router diff --git a/vendor/symfony/http-kernel/EventListener/ProfilerListener.php b/vendor/symfony/http-kernel/EventListener/ProfilerListener.php index c3772b688e548a3a21325b16db9e8cd283acaaaa..8886da01d4fd03a5bd221b0b476d2411004ad98a 100644 --- a/vendor/symfony/http-kernel/EventListener/ProfilerListener.php +++ b/vendor/symfony/http-kernel/EventListener/ProfilerListener.php @@ -37,8 +37,6 @@ class ProfilerListener implements EventSubscriberInterface protected $parents; /** - * Constructor. - * * @param Profiler $profiler A Profiler instance * @param RequestStack $requestStack A RequestStack instance * @param RequestMatcherInterface|null $matcher A RequestMatcher instance @@ -107,8 +105,7 @@ class ProfilerListener implements EventSubscriberInterface { // attach children to parents foreach ($this->profiles as $request) { - // isset call should be removed when requestStack is required - if (isset($this->parents[$request]) && null !== $parentRequest = $this->parents[$request]) { + if (null !== $parentRequest = $this->parents[$request]) { if (isset($this->profiles[$parentRequest])) { $this->profiles[$parentRequest]->addChild($this->profiles[$request]); } diff --git a/vendor/symfony/http-kernel/EventListener/RouterListener.php b/vendor/symfony/http-kernel/EventListener/RouterListener.php index 3c46be860810f3ec2012491c73dbde97680ac464..16f31a2d947a7015ffbeabd9869504c4f207b509 100644 --- a/vendor/symfony/http-kernel/EventListener/RouterListener.php +++ b/vendor/symfony/http-kernel/EventListener/RouterListener.php @@ -40,8 +40,6 @@ class RouterListener implements EventSubscriberInterface private $requestStack; /** - * Constructor. - * * @param UrlMatcherInterface|RequestMatcherInterface $matcher The Url or Request matcher * @param RequestStack $requestStack A RequestStack instance * @param RequestContext|null $context The RequestContext (can be null when $matcher implements RequestContextAwareInterface) diff --git a/vendor/symfony/http-kernel/EventListener/SurrogateListener.php b/vendor/symfony/http-kernel/EventListener/SurrogateListener.php index a207ab673171badd69964b470706e21c2c6cbe0c..358fc9776154fcbbc72439e276d1c0f822e711ae 100644 --- a/vendor/symfony/http-kernel/EventListener/SurrogateListener.php +++ b/vendor/symfony/http-kernel/EventListener/SurrogateListener.php @@ -27,8 +27,6 @@ class SurrogateListener implements EventSubscriberInterface private $surrogate; /** - * Constructor. - * * @param SurrogateInterface $surrogate An SurrogateInterface instance */ public function __construct(SurrogateInterface $surrogate = null) diff --git a/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php b/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php index 79d8639a5f7d303f8f8fad57f1721d8d5e33f3d2..39418842666b2f8a9fca09df20fa876efbf15416 100644 --- a/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php +++ b/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php @@ -12,16 +12,12 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * AccessDeniedHttpException. - * * @author Fabien Potencier <fabien@symfony.com> * @author Christophe Coevoet <stof@notk.org> */ class AccessDeniedHttpException extends HttpException { /** - * Constructor. - * * @param string $message The internal exception message * @param \Exception $previous The previous exception * @param int $code The internal exception code diff --git a/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php b/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php index 5f68172a8d44ef34b730b13bea912f773e81499b..c28d83739c7a54e043fa050dad50ee9ddfd8794a 100644 --- a/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php +++ b/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php @@ -12,15 +12,11 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * BadRequestHttpException. - * * @author Ben Ramsey <ben@benramsey.com> */ class BadRequestHttpException extends HttpException { /** - * Constructor. - * * @param string $message The internal exception message * @param \Exception $previous The previous exception * @param int $code The internal exception code diff --git a/vendor/symfony/http-kernel/Exception/ConflictHttpException.php b/vendor/symfony/http-kernel/Exception/ConflictHttpException.php index 34d738ed12030586fc99f85aa1375ee8af08bbed..79f24f2e56dc0a52e63b8ed50c0c8644b5c21de6 100644 --- a/vendor/symfony/http-kernel/Exception/ConflictHttpException.php +++ b/vendor/symfony/http-kernel/Exception/ConflictHttpException.php @@ -12,15 +12,11 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * ConflictHttpException. - * * @author Ben Ramsey <ben@benramsey.com> */ class ConflictHttpException extends HttpException { /** - * Constructor. - * * @param string $message The internal exception message * @param \Exception $previous The previous exception * @param int $code The internal exception code diff --git a/vendor/symfony/http-kernel/Exception/GoneHttpException.php b/vendor/symfony/http-kernel/Exception/GoneHttpException.php index 16ea223fae55857fda6abac5f93d24513be0d6d0..84e6915df70f7acd8563a006cb262f9a7bf2a9a0 100644 --- a/vendor/symfony/http-kernel/Exception/GoneHttpException.php +++ b/vendor/symfony/http-kernel/Exception/GoneHttpException.php @@ -12,15 +12,11 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * GoneHttpException. - * * @author Ben Ramsey <ben@benramsey.com> */ class GoneHttpException extends HttpException { /** - * Constructor. - * * @param string $message The internal exception message * @param \Exception $previous The previous exception * @param int $code The internal exception code diff --git a/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php b/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php index 0c4b9431f4b9f793c317f24c1c18a2ed75600490..645efe87d7c23f1c85f94311e794a0d9547c1420 100644 --- a/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php +++ b/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php @@ -12,15 +12,11 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * LengthRequiredHttpException. - * * @author Ben Ramsey <ben@benramsey.com> */ class LengthRequiredHttpException extends HttpException { /** - * Constructor. - * * @param string $message The internal exception message * @param \Exception $previous The previous exception * @param int $code The internal exception code diff --git a/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php b/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php index 78dd26bf0fd8f0fd6c6922f9e62dc27b67a8b8a0..e308a5fee2767ecaf077d1127598f1307eb3c062 100644 --- a/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php +++ b/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php @@ -12,15 +12,11 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * MethodNotAllowedHttpException. - * * @author Kris Wallsmith <kris@symfony.com> */ class MethodNotAllowedHttpException extends HttpException { /** - * Constructor. - * * @param array $allow An array of allowed methods * @param string $message The internal exception message * @param \Exception $previous The previous exception diff --git a/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php b/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php index cc6be4ba45a7d36edc3e1370af5a51a254662493..097a13fd9bc05aaa8169db436c8534081ff0a434 100644 --- a/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php +++ b/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php @@ -12,15 +12,11 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * NotAcceptableHttpException. - * * @author Ben Ramsey <ben@benramsey.com> */ class NotAcceptableHttpException extends HttpException { /** - * Constructor. - * * @param string $message The internal exception message * @param \Exception $previous The previous exception * @param int $code The internal exception code diff --git a/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php b/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php index 4639e379b90fc94d780f793fc493b5dd71a6d9a4..878173cc7b9ace62fe3b035ecd2a35f6eca1058b 100644 --- a/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php +++ b/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php @@ -12,15 +12,11 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * NotFoundHttpException. - * * @author Fabien Potencier <fabien@symfony.com> */ class NotFoundHttpException extends HttpException { /** - * Constructor. - * * @param string $message The internal exception message * @param \Exception $previous The previous exception * @param int $code The internal exception code diff --git a/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php b/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php index 9df0e7b49aa9ba8d09917f3414469449c8d5b73e..9f13a624cc0fb487594fb38c2ef1d07fd8f175f2 100644 --- a/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php +++ b/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php @@ -12,15 +12,11 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * PreconditionFailedHttpException. - * * @author Ben Ramsey <ben@benramsey.com> */ class PreconditionFailedHttpException extends HttpException { /** - * Constructor. - * * @param string $message The internal exception message * @param \Exception $previous The previous exception * @param int $code The internal exception code diff --git a/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php b/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php index 08ebca2241e0078e29f52ad5521e76acf9e31c68..9d0a36d7d34d600b26b32eac42e11f28dbb9a114 100644 --- a/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php +++ b/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php @@ -12,8 +12,6 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * PreconditionRequiredHttpException. - * * @author Ben Ramsey <ben@benramsey.com> * * @see http://tools.ietf.org/html/rfc6585 @@ -21,8 +19,6 @@ namespace Symfony\Component\HttpKernel\Exception; class PreconditionRequiredHttpException extends HttpException { /** - * Constructor. - * * @param string $message The internal exception message * @param \Exception $previous The previous exception * @param int $code The internal exception code diff --git a/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php b/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php index 32b9e2d26121829a42cc98c667172468c793a434..b2767c3fd5bccc809f5efa55e59d0b7d65bb302b 100644 --- a/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php +++ b/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php @@ -12,15 +12,11 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * ServiceUnavailableHttpException. - * * @author Ben Ramsey <ben@benramsey.com> */ class ServiceUnavailableHttpException extends HttpException { /** - * Constructor. - * * @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried * @param string $message The internal exception message * @param \Exception $previous The previous exception diff --git a/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php b/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php index ab86e0920bc69a8ea4ff5bf353a77d183cccebec..7d8a803323b7c4d4c428f205749160d5d523e8a5 100644 --- a/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php +++ b/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php @@ -12,8 +12,6 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * TooManyRequestsHttpException. - * * @author Ben Ramsey <ben@benramsey.com> * * @see http://tools.ietf.org/html/rfc6585 @@ -21,8 +19,6 @@ namespace Symfony\Component\HttpKernel\Exception; class TooManyRequestsHttpException extends HttpException { /** - * Constructor. - * * @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried * @param string $message The internal exception message * @param \Exception $previous The previous exception diff --git a/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php b/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php index 0dfe42db972809cf2582c8b646eecfa545a226de..05ac875c552e210bc8d9ea42692f9986a8193fd7 100644 --- a/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php +++ b/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php @@ -12,15 +12,11 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * UnauthorizedHttpException. - * * @author Ben Ramsey <ben@benramsey.com> */ class UnauthorizedHttpException extends HttpException { /** - * Constructor. - * * @param string $challenge WWW-Authenticate challenge string * @param string $message The internal exception message * @param \Exception $previous The previous exception diff --git a/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php b/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php index eb13f563f6cbbbc1fbd090295eccfabb135b59c5..01b8b8465a1a3aed60ba08ae3f1b2ffd2024c337 100644 --- a/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php +++ b/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php @@ -12,15 +12,11 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * UnprocessableEntityHttpException. - * * @author Steve Hutchins <hutchinsteve@gmail.com> */ class UnprocessableEntityHttpException extends HttpException { /** - * Constructor. - * * @param string $message The internal exception message * @param \Exception $previous The previous exception * @param int $code The internal exception code diff --git a/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php b/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php index a9d8fa086f13cdfe1280742623e9d987619bea2c..6913504e832dc41c75616884035b1e3b895d0280 100644 --- a/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php +++ b/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php @@ -12,15 +12,11 @@ namespace Symfony\Component\HttpKernel\Exception; /** - * UnsupportedMediaTypeHttpException. - * * @author Ben Ramsey <ben@benramsey.com> */ class UnsupportedMediaTypeHttpException extends HttpException { /** - * Constructor. - * * @param string $message The internal exception message * @param \Exception $previous The previous exception * @param int $code The internal exception code diff --git a/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php index 0d4d26b6765c6b5c4f9124d66cb580a23b69b1b9..e955cd0d43c6f16196de5017bf0d59f035ed3028 100644 --- a/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php @@ -29,8 +29,6 @@ abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRendere private $signer; /** - * Constructor. - * * The "fallback" strategy when surrogate is not available should always be an * instance of InlineFragmentRenderer. * diff --git a/vendor/symfony/http-kernel/Fragment/FragmentHandler.php b/vendor/symfony/http-kernel/Fragment/FragmentHandler.php index 0d0a0424607c1864caae202a379bec0aaab3bb32..3ea27e61263641ab3a3d1d274c79fdb1a5a73f49 100644 --- a/vendor/symfony/http-kernel/Fragment/FragmentHandler.php +++ b/vendor/symfony/http-kernel/Fragment/FragmentHandler.php @@ -33,8 +33,6 @@ class FragmentHandler private $requestStack; /** - * Constructor. - * * @param RequestStack $requestStack The Request stack that controls the lifecycle of requests * @param FragmentRendererInterface[] $renderers An array of FragmentRendererInterface instances * @param bool $debug Whether the debug mode is enabled or not diff --git a/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php index ec2a40716ab7235b149050e010e7100ea01649c0..7e957d4c95f71ea579a537598fcc458c20953fc7 100644 --- a/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php @@ -33,8 +33,6 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer private $charset; /** - * Constructor. - * * @param EngineInterface|Environment $templating An EngineInterface or a Twig instance * @param UriSigner $signer A UriSigner instance * @param string $globalDefaultTemplate The global default content (it can be a template name or the content) diff --git a/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php index 437b40bf959535922365528ee7d6549343ec1705..8ed81f9a98edfaad10d6682610b6c03f0f9b2472 100644 --- a/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php @@ -30,8 +30,6 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer private $dispatcher; /** - * Constructor. - * * @param HttpKernelInterface $kernel A HttpKernelInterface instance * @param EventDispatcherInterface $dispatcher A EventDispatcherInterface instance */ diff --git a/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php b/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php index af94bea9ba2c77f83091e8d99e42667bb8becf04..0999827888302337ae1be515b2e1f36873e09acc 100644 --- a/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php +++ b/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php @@ -30,8 +30,6 @@ abstract class AbstractSurrogate implements SurrogateInterface ); /** - * Constructor. - * * @param array $contentTypes An array of content-type that should be parsed for Surrogate information * (default: text/html, text/xml, application/xhtml+xml, and application/xml) */ diff --git a/vendor/symfony/http-kernel/HttpCache/HttpCache.php b/vendor/symfony/http-kernel/HttpCache/HttpCache.php index be2bc63dda6de63301ed2dd62b91cfa612461641..41f95a47d9818eb3ebbda7c45b1a519e22c4a942 100644 --- a/vendor/symfony/http-kernel/HttpCache/HttpCache.php +++ b/vendor/symfony/http-kernel/HttpCache/HttpCache.php @@ -36,8 +36,6 @@ class HttpCache implements HttpKernelInterface, TerminableInterface private $traces = array(); /** - * Constructor. - * * The available options are: * * * debug: If true, the traces are added as a HTTP header to ease debugging @@ -607,14 +605,6 @@ class HttpCache implements HttpKernelInterface, TerminableInterface */ private function restoreResponseBody(Request $request, Response $response) { - if ($request->isMethod('HEAD') || 304 === $response->getStatusCode()) { - $response->setContent(null); - $response->headers->remove('X-Body-Eval'); - $response->headers->remove('X-Body-File'); - - return; - } - if ($response->headers->has('X-Body-Eval')) { ob_start(); @@ -630,7 +620,11 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $response->headers->set('Content-Length', strlen($response->getContent())); } } elseif ($response->headers->has('X-Body-File')) { - $response->setContent(file_get_contents($response->headers->get('X-Body-File'))); + // Response does not include possibly dynamic content (ESI, SSI), so we need + // not handle the content for HEAD requests + if (!$request->isMethod('HEAD')) { + $response->setContent(file_get_contents($response->headers->get('X-Body-File'))); + } } else { return; } @@ -704,7 +698,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface * * @param Response $entry * - * @return bool True when the stale response may be served, false otherwise. + * @return bool true when the stale response may be served, false otherwise */ private function mayServeStaleWhileRevalidate(Response $entry) { @@ -722,7 +716,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface * * @param Request $request The request to wait for * - * @return bool True if the lock was released before the internal timeout was hit; false if the wait timeout was exceeded. + * @return bool true if the lock was released before the internal timeout was hit; false if the wait timeout was exceeded */ private function waitForLock(Request $request) { diff --git a/vendor/symfony/http-kernel/HttpCache/Store.php b/vendor/symfony/http-kernel/HttpCache/Store.php index c4d961e68f04318d29851bdec8338056a468454d..83c3a9ae139d9f2cd02bac30e63f0104fcd054db 100644 --- a/vendor/symfony/http-kernel/HttpCache/Store.php +++ b/vendor/symfony/http-kernel/HttpCache/Store.php @@ -29,8 +29,6 @@ class Store implements StoreInterface private $locks; /** - * Constructor. - * * @param string $root The path to the cache directory * * @throws \RuntimeException @@ -210,7 +208,7 @@ class Store implements StoreInterface $entry[1]['vary'] = array(''); } - if ($vary != $entry[1]['vary'][0] || !$this->requestsMatch($vary, $entry[0], $storedEnv)) { + if ($entry[1]['vary'][0] != $vary || !$this->requestsMatch($vary, $entry[0], $storedEnv)) { $entries[] = $entry; } } diff --git a/vendor/symfony/http-kernel/Kernel.php b/vendor/symfony/http-kernel/Kernel.php index d73ad52a0e6485b7c358e33746c50e26750e0369..3a29e7b0bb4bd83990adf3c62ffb2c15a36feac4 100644 --- a/vendor/symfony/http-kernel/Kernel.php +++ b/vendor/symfony/http-kernel/Kernel.php @@ -61,19 +61,17 @@ abstract class Kernel implements KernelInterface, TerminableInterface private $projectDir; - const VERSION = '3.3.5'; - const VERSION_ID = 30305; + const VERSION = '3.3.10'; + const VERSION_ID = 30310; const MAJOR_VERSION = 3; const MINOR_VERSION = 3; - const RELEASE_VERSION = 5; + const RELEASE_VERSION = 10; const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '01/2018'; const END_OF_LIFE = '07/2018'; /** - * Constructor. - * * @param string $environment The environment * @param bool $debug Whether to enable debugging or not */ @@ -814,7 +812,7 @@ abstract class Kernel implements KernelInterface, TerminableInterface do { $token = $tokens[++$i]; $output .= isset($token[1]) && 'b"' !== $token ? $token[1] : $token; - } while ($token[0] !== T_END_HEREDOC); + } while (T_END_HEREDOC !== $token[0]); $rawChunk = ''; } elseif (T_WHITESPACE === $token[0]) { if ($ignoreSpace) { diff --git a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php index bd8761f5dd8a85d4d5f2ec24cb90c087415b8b56..e24b2e018368407d297035da6e9bfba42d720093 100644 --- a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php +++ b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php @@ -142,11 +142,19 @@ class FileProfilerStorage implements ProfilerStorageInterface } } + $profileToken = $profile->getToken(); + // when there are errors in sub-requests, the parent and/or children tokens + // may equal the profile token, resulting in infinite loops + $parentToken = $profile->getParentToken() !== $profileToken ? $profile->getParentToken() : null; + $childrenToken = array_filter(array_map(function ($p) use ($profileToken) { + return $profileToken !== $p->getToken() ? $p->getToken() : null; + }, $profile->getChildren())); + // Store profile $data = array( - 'token' => $profile->getToken(), - 'parent' => $profile->getParentToken(), - 'children' => array_map(function ($p) { return $p->getToken(); }, $profile->getChildren()), + 'token' => $profileToken, + 'parent' => $parentToken, + 'children' => $childrenToken, 'data' => $profile->getCollectors(), 'ip' => $profile->getIp(), 'method' => $profile->getMethod(), diff --git a/vendor/symfony/http-kernel/Profiler/Profile.php b/vendor/symfony/http-kernel/Profiler/Profile.php index fab8b41da4d3ec43c4619ce075d117e04ce6caef..fba74ed846443f6918a3e0706e44b58330f0f310 100644 --- a/vendor/symfony/http-kernel/Profiler/Profile.php +++ b/vendor/symfony/http-kernel/Profiler/Profile.php @@ -44,8 +44,6 @@ class Profile private $children = array(); /** - * Constructor. - * * @param string $token The token */ public function __construct($token) diff --git a/vendor/symfony/http-kernel/Profiler/Profiler.php b/vendor/symfony/http-kernel/Profiler/Profiler.php index f31e243770cbf35bc8f8f37fc3230306bd7f5374..2580b4fffa0028e88a1bcbeb6ecb11323de610e7 100644 --- a/vendor/symfony/http-kernel/Profiler/Profiler.php +++ b/vendor/symfony/http-kernel/Profiler/Profiler.php @@ -46,8 +46,6 @@ class Profiler private $enabled = true; /** - * Constructor. - * * @param ProfilerStorageInterface $storage A ProfilerStorageInterface instance * @param LoggerInterface $logger A LoggerInterface instance */ diff --git a/vendor/symfony/http-kernel/Tests/Controller/ContainerControllerResolverTest.php b/vendor/symfony/http-kernel/Tests/Controller/ContainerControllerResolverTest.php index 30b535e825f67c5e5c60bb9f7d7e231baf1ecc1d..b3deb03c9138a2b00c09778bed245519d0454e71 100644 --- a/vendor/symfony/http-kernel/Tests/Controller/ContainerControllerResolverTest.php +++ b/vendor/symfony/http-kernel/Tests/Controller/ContainerControllerResolverTest.php @@ -88,6 +88,49 @@ class ContainerControllerResolverTest extends ControllerResolverTest $this->assertEquals($invokableController, $controller); } + public function testNonInstantiableController() + { + $container = $this->createMockContainer(); + $container->expects($this->once()) + ->method('has') + ->with(NonInstantiableController::class) + ->will($this->returnValue(false)) + ; + + $resolver = $this->createControllerResolver(null, $container); + $request = Request::create('/'); + $request->attributes->set('_controller', array(NonInstantiableController::class, 'action')); + + $controller = $resolver->getController($request); + + $this->assertSame(array(NonInstantiableController::class, 'action'), $controller); + } + + public function testNonInstantiableControllerWithCorrespondingService() + { + $service = new \stdClass(); + + $container = $this->createMockContainer(); + $container->expects($this->atLeastOnce()) + ->method('has') + ->with(NonInstantiableController::class) + ->will($this->returnValue(true)) + ; + $container->expects($this->atLeastOnce()) + ->method('get') + ->with(NonInstantiableController::class) + ->will($this->returnValue($service)) + ; + + $resolver = $this->createControllerResolver(null, $container); + $request = Request::create('/'); + $request->attributes->set('_controller', array(NonInstantiableController::class, 'action')); + + $controller = $resolver->getController($request); + + $this->assertSame(array($service, 'action'), $controller); + } + /** * @dataProvider getUndefinedControllers */ @@ -146,3 +189,10 @@ class InvokableController { } } + +abstract class NonInstantiableController +{ + public static function action() + { + } +} diff --git a/vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php b/vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php index 0542698d694efe0b45b94d3aca76c3dbd0cc4137..83a07cb4663d23784d85419a386f6da1a0c99ca7 100644 --- a/vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php +++ b/vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php @@ -266,6 +266,21 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase $locator = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0); $this->assertEmpty(array_keys($locator)); } + + public function testControllersAreMadePublic() + { + $container = new ContainerBuilder(); + $resolver = $container->register('argument_resolver.service')->addArgument(array()); + + $container->register('foo', ArgumentWithoutTypeController::class) + ->setPublic(false) + ->addTag('controller.service_arguments'); + + $pass = new RegisterControllerArgumentLocatorsPass(); + $pass->process($container); + + $this->assertTrue($container->getDefinition('foo')->isPublic()); + } } class RegisterTestController diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php b/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php index a24380c406863ec801164a939f2d1e0a766defd7..4664ea9011eb4a3ca95a8764d6ac29cdc167e421 100644 --- a/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php +++ b/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php @@ -1168,7 +1168,7 @@ class HttpCacheTest extends HttpCacheTestCase array( 'status' => 200, 'body' => 'Hello World!', - 'headers' => array('Cache-Control' => 's-maxage=300'), + 'headers' => array('Cache-Control' => 's-maxage=200'), ), array( 'status' => 200, @@ -1182,8 +1182,33 @@ class HttpCacheTest extends HttpCacheTestCase $this->request('GET', '/', array(), array(), true); $this->assertEquals('Hello World! My name is Bobby.', $this->response->getContent()); - // check for 100 or 99 as the test can be executed after a second change - $this->assertTrue(in_array($this->response->getTtl(), array(99, 100))); + $this->assertEquals(100, $this->response->getTtl()); + } + + public function testEsiCacheSendsTheLowestTtlForHeadRequests() + { + $responses = array( + array( + 'status' => 200, + 'body' => 'I am a long-lived master response, but I embed a short-lived resource: <esi:include src="/foo" />', + 'headers' => array( + 'Cache-Control' => 's-maxage=300', + 'Surrogate-Control' => 'content="ESI/1.0"', + ), + ), + array( + 'status' => 200, + 'body' => 'I am a short-lived resource', + 'headers' => array('Cache-Control' => 's-maxage=100'), + ), + ); + + $this->setNextResponses($responses); + + $this->request('HEAD', '/', array(), array(), true); + + $this->assertEmpty($this->response->getContent()); + $this->assertEquals(100, $this->response->getTtl()); } public function testEsiCacheForceValidation() @@ -1219,6 +1244,37 @@ class HttpCacheTest extends HttpCacheTestCase $this->assertTrue($this->response->headers->hasCacheControlDirective('no-cache')); } + public function testEsiCacheForceValidationForHeadRequests() + { + $responses = array( + array( + 'status' => 200, + 'body' => 'I am the master response and use expiration caching, but I embed another resource: <esi:include src="/foo" />', + 'headers' => array( + 'Cache-Control' => 's-maxage=300', + 'Surrogate-Control' => 'content="ESI/1.0"', + ), + ), + array( + 'status' => 200, + 'body' => 'I am the embedded resource and use validation caching', + 'headers' => array('ETag' => 'foobar'), + ), + ); + + $this->setNextResponses($responses); + + $this->request('HEAD', '/', array(), array(), true); + + // The response has been assembled from expiration and validation based resources + // This can neither be cached nor revalidated, so it should be private/no cache + $this->assertEmpty($this->response->getContent()); + $this->assertNull($this->response->getTtl()); + $this->assertTrue($this->response->mustRevalidate()); + $this->assertTrue($this->response->headers->hasCacheControlDirective('private')); + $this->assertTrue($this->response->headers->hasCacheControlDirective('no-cache')); + } + public function testEsiRecalculateContentLengthHeader() { $responses = array( @@ -1227,7 +1283,6 @@ class HttpCacheTest extends HttpCacheTestCase 'body' => '<esi:include src="/foo" />', 'headers' => array( 'Content-Length' => 26, - 'Cache-Control' => 's-maxage=300', 'Surrogate-Control' => 'content="ESI/1.0"', ), ), @@ -1245,6 +1300,37 @@ class HttpCacheTest extends HttpCacheTestCase $this->assertEquals(12, $this->response->headers->get('Content-Length')); } + public function testEsiRecalculateContentLengthHeaderForHeadRequest() + { + $responses = array( + array( + 'status' => 200, + 'body' => '<esi:include src="/foo" />', + 'headers' => array( + 'Content-Length' => 26, + 'Surrogate-Control' => 'content="ESI/1.0"', + ), + ), + array( + 'status' => 200, + 'body' => 'Hello World!', + 'headers' => array(), + ), + ); + + $this->setNextResponses($responses); + + $this->request('HEAD', '/', array(), array(), true); + + // https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13 + // "The Content-Length entity-header field indicates the size of the entity-body, + // in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD + // method, the size of the entity-body that would have been sent had the request + // been a GET." + $this->assertEmpty($this->response->getContent()); + $this->assertEquals(12, $this->response->headers->get('Content-Length')); + } + public function testClientIpIsAlwaysLocalhostForForwardedRequests() { $this->setNextResponse(); @@ -1336,6 +1422,35 @@ class HttpCacheTest extends HttpCacheTestCase $this->assertNull($this->response->getLastModified()); } + public function testEsiCacheRemoveValidationHeadersIfEmbeddedResponsesAndHeadRequest() + { + $time = \DateTime::createFromFormat('U', time()); + + $responses = array( + array( + 'status' => 200, + 'body' => '<esi:include src="/hey" />', + 'headers' => array( + 'Surrogate-Control' => 'content="ESI/1.0"', + 'ETag' => 'hey', + 'Last-Modified' => $time->format(DATE_RFC2822), + ), + ), + array( + 'status' => 200, + 'body' => 'Hey!', + 'headers' => array(), + ), + ); + + $this->setNextResponses($responses); + + $this->request('HEAD', '/', array(), array(), true); + $this->assertEmpty($this->response->getContent()); + $this->assertNull($this->response->getETag()); + $this->assertNull($this->response->getLastModified()); + } + public function testDoesNotCacheOptionsRequest() { $this->setNextResponse(200, array('Cache-Control' => 'public, s-maxage=60'), 'get'); diff --git a/vendor/symfony/http-kernel/Tests/KernelTest.php b/vendor/symfony/http-kernel/Tests/KernelTest.php index d2a27d03aaf37a31da37da7702bb21b36ae7617b..052e5766d6c7c3694ec9f1f9d1a7aa6a24e63d2f 100644 --- a/vendor/symfony/http-kernel/Tests/KernelTest.php +++ b/vendor/symfony/http-kernel/Tests/KernelTest.php @@ -14,6 +14,7 @@ namespace Symfony\Component\HttpKernel\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpKernel\Bundle\BundleInterface; use Symfony\Component\HttpKernel\Config\EnvParametersResource; use Symfony\Component\HttpKernel\Kernel; @@ -26,6 +27,12 @@ use Symfony\Component\HttpKernel\Tests\Fixtures\KernelWithoutBundles; class KernelTest extends TestCase { + public static function tearDownAfterClass() + { + $fs = new Filesystem(); + $fs->remove(__DIR__.'/Fixtures/cache'); + } + public function testConstructor() { $env = 'test_env'; diff --git a/vendor/symfony/http-kernel/UriSigner.php b/vendor/symfony/http-kernel/UriSigner.php index 6f4f8865e2011169616d496ba1f6d66f34e0796c..c3df23197cc6255f604c982225c31766ff23efc2 100644 --- a/vendor/symfony/http-kernel/UriSigner.php +++ b/vendor/symfony/http-kernel/UriSigner.php @@ -22,8 +22,6 @@ class UriSigner private $parameter; /** - * Constructor. - * * @param string $secret A secret * @param string $parameter Query string parameter to use */ diff --git a/vendor/symfony/http-kernel/composer.json b/vendor/symfony/http-kernel/composer.json index babc8663b64871d24dd66a0f72d60849dd899f60..cc543c6d854fbf57df97a65c563f64bf1cbc1529 100644 --- a/vendor/symfony/http-kernel/composer.json +++ b/vendor/symfony/http-kernel/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "symfony/event-dispatcher": "~2.8|~3.0", "symfony/http-foundation": "~3.3", "symfony/debug": "~2.8|~3.0", diff --git a/vendor/symfony/polyfill-mbstring/composer.json b/vendor/symfony/polyfill-mbstring/composer.json index 48fc3ddf3ad431c1322043032ea2e90afb771a61..e184b2104162593f72de5ac34fc47d468561be14 100644 --- a/vendor/symfony/polyfill-mbstring/composer.json +++ b/vendor/symfony/polyfill-mbstring/composer.json @@ -28,7 +28,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } } } diff --git a/vendor/symfony/routing/Annotation/Route.php b/vendor/symfony/routing/Annotation/Route.php index e3d515702c3d88943456c98d2104308aa372b1bb..5b3cbeaab1848223d9f179095e2e26b3c45abb13 100644 --- a/vendor/symfony/routing/Annotation/Route.php +++ b/vendor/symfony/routing/Annotation/Route.php @@ -32,8 +32,6 @@ class Route private $condition; /** - * Constructor. - * * @param array $data An array of key/value parameters * * @throws \BadMethodCallException diff --git a/vendor/symfony/routing/CompiledRoute.php b/vendor/symfony/routing/CompiledRoute.php index f52e3aa06ee3556eafdb0d7b0ae053ab23dce437..8ecf5153ce2f73d2a368d6a9ac19df889c7dc7a7 100644 --- a/vendor/symfony/routing/CompiledRoute.php +++ b/vendor/symfony/routing/CompiledRoute.php @@ -28,8 +28,6 @@ class CompiledRoute implements \Serializable private $hostTokens; /** - * Constructor. - * * @param string $staticPrefix The static prefix of the compiled route * @param string $regex The regular expression to use to match this route * @param array $tokens An array of tokens to use to generate URL for this route diff --git a/vendor/symfony/routing/Generator/Dumper/GeneratorDumper.php b/vendor/symfony/routing/Generator/Dumper/GeneratorDumper.php index 4739bd8365cea4d2d94542ae76f5880771eb35f3..4a7051b5ae797732103edaa7d2909d4e152ca9aa 100644 --- a/vendor/symfony/routing/Generator/Dumper/GeneratorDumper.php +++ b/vendor/symfony/routing/Generator/Dumper/GeneratorDumper.php @@ -26,8 +26,6 @@ abstract class GeneratorDumper implements GeneratorDumperInterface private $routes; /** - * Constructor. - * * @param RouteCollection $routes The RouteCollection to dump */ public function __construct(RouteCollection $routes) diff --git a/vendor/symfony/routing/Generator/Dumper/PhpGeneratorDumper.php b/vendor/symfony/routing/Generator/Dumper/PhpGeneratorDumper.php index 9fd35ea112559499010eaf88f6a452fcdf172a19..60bdf1da3522c19ab982401e59cf5f54f63cc64e 100644 --- a/vendor/symfony/routing/Generator/Dumper/PhpGeneratorDumper.php +++ b/vendor/symfony/routing/Generator/Dumper/PhpGeneratorDumper.php @@ -46,8 +46,6 @@ use Symfony\Component\Routing\Exception\RouteNotFoundException; use Psr\Log\LoggerInterface; /** - * {$options['class']} - * * This class has been auto-generated * by the Symfony Routing Component. */ @@ -55,9 +53,6 @@ class {$options['class']} extends {$options['base_class']} { private static \$declaredRoutes; - /** - * Constructor. - */ public function __construct(RequestContext \$context, LoggerInterface \$logger = null) { \$this->context = \$context; diff --git a/vendor/symfony/routing/Generator/UrlGenerator.php b/vendor/symfony/routing/Generator/UrlGenerator.php index 342161e1243a550cf4e19dece1b1a6e88ac2debb..7e4fa34736e82c8a4c1c7f4c1388b1a117f00581 100644 --- a/vendor/symfony/routing/Generator/UrlGenerator.php +++ b/vendor/symfony/routing/Generator/UrlGenerator.php @@ -76,8 +76,6 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt ); /** - * Constructor. - * * @param RouteCollection $routes A RouteCollection instance * @param RequestContext $context The context * @param LoggerInterface|null $logger A logger instance diff --git a/vendor/symfony/routing/Loader/AnnotationClassLoader.php b/vendor/symfony/routing/Loader/AnnotationClassLoader.php index c91a7f7d5b148129bc41bf472526c74472d7d19d..d3ca72f79194fa6adb394ee1e1d618de34180957 100644 --- a/vendor/symfony/routing/Loader/AnnotationClassLoader.php +++ b/vendor/symfony/routing/Loader/AnnotationClassLoader.php @@ -73,8 +73,6 @@ abstract class AnnotationClassLoader implements LoaderInterface protected $defaultRouteIndex = 0; /** - * Constructor. - * * @param Reader $reader */ public function __construct(Reader $reader) diff --git a/vendor/symfony/routing/Loader/AnnotationFileLoader.php b/vendor/symfony/routing/Loader/AnnotationFileLoader.php index 22edc867137656483ea9dcb67c08a6cd0be0cf3e..f85fac74ef2461487bf80dd69a23c5e12b8c6d29 100644 --- a/vendor/symfony/routing/Loader/AnnotationFileLoader.php +++ b/vendor/symfony/routing/Loader/AnnotationFileLoader.php @@ -27,8 +27,6 @@ class AnnotationFileLoader extends FileLoader protected $loader; /** - * Constructor. - * * @param FileLocatorInterface $locator A FileLocator instance * @param AnnotationClassLoader $loader An AnnotationClassLoader instance * diff --git a/vendor/symfony/routing/Loader/ObjectRouteLoader.php b/vendor/symfony/routing/Loader/ObjectRouteLoader.php index 4d79b6cfc3640a03e91d4eca7efdad26e9b67ef2..0899a818129be5008111eff3b8c7d2d4b69395df 100644 --- a/vendor/symfony/routing/Loader/ObjectRouteLoader.php +++ b/vendor/symfony/routing/Loader/ObjectRouteLoader.php @@ -45,7 +45,7 @@ abstract class ObjectRouteLoader extends Loader public function load($resource, $type = null) { $parts = explode(':', $resource); - if (count($parts) != 2) { + if (2 != count($parts)) { throw new \InvalidArgumentException(sprintf('Invalid resource "%s" passed to the "service" route loader: use the format "service_name:methodName"', $resource)); } diff --git a/vendor/symfony/routing/Loader/XmlFileLoader.php b/vendor/symfony/routing/Loader/XmlFileLoader.php index 8a6e8ce35989f8a8783a081ba4c11a43ffa7d319..396047e74fe2981e356e6d1bccd7fd6e80f46149 100644 --- a/vendor/symfony/routing/Loader/XmlFileLoader.php +++ b/vendor/symfony/routing/Loader/XmlFileLoader.php @@ -36,8 +36,8 @@ class XmlFileLoader extends FileLoader * * @return RouteCollection A RouteCollection instance * - * @throws \InvalidArgumentException When the file cannot be loaded or when the XML cannot be - * parsed because it does not validate against the scheme. + * @throws \InvalidArgumentException when the file cannot be loaded or when the XML cannot be + * parsed because it does not validate against the scheme */ public function load($file, $type = null) { diff --git a/vendor/symfony/routing/Loader/YamlFileLoader.php b/vendor/symfony/routing/Loader/YamlFileLoader.php index 7ae5e84d109aaa90cbd92a77d68d26b1e421c40d..72935fa5589f4707b80e728ab742a4907f70fd72 100644 --- a/vendor/symfony/routing/Loader/YamlFileLoader.php +++ b/vendor/symfony/routing/Loader/YamlFileLoader.php @@ -58,10 +58,18 @@ class YamlFileLoader extends FileLoader $this->yamlParser = new YamlParser(); } + $prevErrorHandler = set_error_handler(function ($level, $message, $script, $line) use ($file, &$prevErrorHandler) { + $message = E_USER_DEPRECATED === $level ? preg_replace('/ on line \d+/', ' in "'.$file.'"$0', $message) : $message; + + return $prevErrorHandler ? $prevErrorHandler($level, $message, $script, $line) : false; + }); + try { $parsedConfig = $this->yamlParser->parse(file_get_contents($path), Yaml::PARSE_KEYS_AS_STRINGS); } catch (ParseException $e) { throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $path), 0, $e); + } finally { + restore_error_handler(); } $collection = new RouteCollection(); diff --git a/vendor/symfony/routing/Matcher/Dumper/DumperRoute.php b/vendor/symfony/routing/Matcher/Dumper/DumperRoute.php index 3ad08c2006f24d221acad08e42bb018c5daaae36..c2e2a116d12d063ead47d3c77f79938e09870223 100644 --- a/vendor/symfony/routing/Matcher/Dumper/DumperRoute.php +++ b/vendor/symfony/routing/Matcher/Dumper/DumperRoute.php @@ -33,8 +33,6 @@ class DumperRoute private $route; /** - * Constructor. - * * @param string $name The route name * @param Route $route The route */ diff --git a/vendor/symfony/routing/Matcher/Dumper/MatcherDumper.php b/vendor/symfony/routing/Matcher/Dumper/MatcherDumper.php index 52edc017e84732b22187c1995ca936faace3b957..70c23f647d91d13d81ec1acecce962f5d44bc148 100644 --- a/vendor/symfony/routing/Matcher/Dumper/MatcherDumper.php +++ b/vendor/symfony/routing/Matcher/Dumper/MatcherDumper.php @@ -26,8 +26,6 @@ abstract class MatcherDumper implements MatcherDumperInterface private $routes; /** - * Constructor. - * * @param RouteCollection $routes The RouteCollection to dump */ public function __construct(RouteCollection $routes) diff --git a/vendor/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php b/vendor/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php index 8eae68c4c280e0275cceb84d2c1e976238ad15c9..e172135ebf5d6635235be5fbe5425e05d5f20ace 100644 --- a/vendor/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/vendor/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php @@ -63,16 +63,11 @@ use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\RequestContext; /** - * {$options['class']}. - * * This class has been auto-generated * by the Symfony Routing Component. */ class {$options['class']} extends {$options['base_class']} { - /** - * Constructor. - */ public function __construct(RequestContext \$context) { \$this->context = \$context; @@ -182,7 +177,7 @@ EOF; * * @param StaticPrefixCollection $collection A StaticPrefixCollection instance * @param bool $supportsRedirections Whether redirections are supported by the base class - * @param string $ifOrElseIf Either "if" or "elseif" to influence chaining. + * @param string $ifOrElseIf either "if" or "elseif" to influence chaining * * @return string PHP code */ @@ -241,8 +236,8 @@ EOF; $supportsTrailingSlash = $supportsRedirections && (!$methods || in_array('HEAD', $methods) || in_array('GET', $methods)); $regex = $compiledRoute->getRegex(); - if (!count($compiledRoute->getPathVariables()) && false !== preg_match('#^(.)\^(?P<url>.*?)\$\1#'.(substr($regex, -1) === 'u' ? 'u' : ''), $regex, $m)) { - if ($supportsTrailingSlash && substr($m['url'], -1) === '/') { + if (!count($compiledRoute->getPathVariables()) && false !== preg_match('#^(.)\^(?P<url>.*?)\$\1#'.('u' === substr($regex, -1) ? 'u' : ''), $regex, $m)) { + if ($supportsTrailingSlash && '/' === substr($m['url'], -1)) { $conditions[] = sprintf('%s === $trimmedPathinfo', var_export(rtrim(str_replace('\\', '', $m['url']), '/'), true)); $hasTrailingSlash = true; } else { @@ -282,7 +277,7 @@ EOF; if ($methods) { if (1 === count($methods)) { - if ($methods[0] === 'HEAD') { + if ('HEAD' === $methods[0]) { $code .= <<<EOF if ('HEAD' !== \$requestMethod) { \$allow[] = 'HEAD'; @@ -307,7 +302,7 @@ EOF; if (in_array('GET', $methods)) { // Since we treat HEAD requests like GET requests we don't need to match it. $methodVariable = 'canonicalMethod'; - $methods = array_filter($methods, function ($method) { return 'HEAD' !== $method; }); + $methods = array_values(array_filter($methods, function ($method) { return 'HEAD' !== $method; })); } if (1 === count($methods)) { diff --git a/vendor/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php b/vendor/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php index b2bfa343764cc99f53ce5cd1d5b4874268cdabab..73658086189a07fe2fcc8b2a593e6ed27ecdd210 100644 --- a/vendor/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php +++ b/vendor/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php @@ -139,7 +139,7 @@ class StaticPrefixCollection */ private function accepts($prefix) { - return '' === $this->prefix || strpos($prefix, $this->prefix) === 0; + return '' === $this->prefix || 0 === strpos($prefix, $this->prefix); } /** @@ -225,7 +225,7 @@ class StaticPrefixCollection * * @param string $prefix * - * @throws \LogicException When a prefix does not belong in a group. + * @throws \LogicException when a prefix does not belong in a group */ private function guardAgainstAddingNotAcceptedRoutes($prefix) { diff --git a/vendor/symfony/routing/Matcher/UrlMatcher.php b/vendor/symfony/routing/Matcher/UrlMatcher.php index c646723b3ab08efeb668c9b73a0e4cab4cbc0d5b..62bb74a8d6780a0d7819b3aed6ecab32c2d2c243 100644 --- a/vendor/symfony/routing/Matcher/UrlMatcher.php +++ b/vendor/symfony/routing/Matcher/UrlMatcher.php @@ -55,8 +55,6 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface protected $expressionLanguageProviders = array(); /** - * Constructor. - * * @param RouteCollection $routes A RouteCollection instance * @param RequestContext $context The context */ diff --git a/vendor/symfony/routing/RequestContext.php b/vendor/symfony/routing/RequestContext.php index 9b15cd07d54a3ee201baa57c858e8211e995c9ea..d522189cb0d51ead34ffc3a8e98f27948d2bc4da 100644 --- a/vendor/symfony/routing/RequestContext.php +++ b/vendor/symfony/routing/RequestContext.php @@ -38,8 +38,6 @@ class RequestContext private $parameters = array(); /** - * Constructor. - * * @param string $baseUrl The base URL * @param string $method The HTTP method * @param string $host The HTTP host name diff --git a/vendor/symfony/routing/Route.php b/vendor/symfony/routing/Route.php index 69a7cade10c334aad45e41bc4aad01284d06d900..dd4eb840c238583eb0a6586ae866ddd5fbb2a79e 100644 --- a/vendor/symfony/routing/Route.php +++ b/vendor/symfony/routing/Route.php @@ -30,12 +30,12 @@ class Route implements \Serializable private $host = ''; /** - * @var array + * @var string[] */ private $schemes = array(); /** - * @var array + * @var string[] */ private $methods = array(); @@ -65,21 +65,19 @@ class Route implements \Serializable private $condition = ''; /** - * Constructor. - * * Available options: * * * compiler_class: A class name able to compile this route instance (RouteCompiler by default) * * utf8: Whether UTF-8 matching is enforced ot not * - * @param string $path The path pattern to match - * @param array $defaults An array of default parameter values - * @param array $requirements An array of requirements for parameters (regexes) - * @param array $options An array of options - * @param string $host The host pattern to match - * @param string|array $schemes A required URI scheme or an array of restricted schemes - * @param string|array $methods A required HTTP method or an array of restricted methods - * @param string $condition A condition that should evaluate to true for the route to match + * @param string $path The path pattern to match + * @param array $defaults An array of default parameter values + * @param array $requirements An array of requirements for parameters (regexes) + * @param array $options An array of options + * @param string $host The host pattern to match + * @param string|string[] $schemes A required URI scheme or an array of restricted schemes + * @param string|string[] $methods A required HTTP method or an array of restricted methods + * @param string $condition A condition that should evaluate to true for the route to match */ public function __construct($path, array $defaults = array(), array $requirements = array(), array $options = array(), $host = '', $schemes = array(), $methods = array(), $condition = '') { @@ -193,7 +191,7 @@ class Route implements \Serializable * Returns the lowercased schemes this route is restricted to. * So an empty array means that any scheme is allowed. * - * @return array The schemes + * @return string[] The schemes */ public function getSchemes() { @@ -206,7 +204,7 @@ class Route implements \Serializable * * This method implements a fluent interface. * - * @param string|array $schemes The scheme or an array of schemes + * @param string|string[] $schemes The scheme or an array of schemes * * @return $this */ @@ -234,7 +232,7 @@ class Route implements \Serializable * Returns the uppercased HTTP methods this route is restricted to. * So an empty array means that any method is allowed. * - * @return array The methods + * @return string[] The methods */ public function getMethods() { @@ -247,7 +245,7 @@ class Route implements \Serializable * * This method implements a fluent interface. * - * @param string|array $methods The method or an array of methods + * @param string|string[] $methods The method or an array of methods * * @return $this */ diff --git a/vendor/symfony/routing/RouteCollection.php b/vendor/symfony/routing/RouteCollection.php index 2ccb90f3b096696963487f9a726cf83d63341a48..f8b18084be126a3f7ff0337e1394df4678ce9264 100644 --- a/vendor/symfony/routing/RouteCollection.php +++ b/vendor/symfony/routing/RouteCollection.php @@ -104,7 +104,7 @@ class RouteCollection implements \IteratorAggregate, \Countable /** * Removes a route or an array of routes by name from the collection. * - * @param string|array $name The route name or an array of route names + * @param string|string[] $name The route name or an array of route names */ public function remove($name) { @@ -234,7 +234,7 @@ class RouteCollection implements \IteratorAggregate, \Countable /** * Sets the schemes (e.g. 'https') all child routes are restricted to. * - * @param string|array $schemes The scheme or an array of schemes + * @param string|string[] $schemes The scheme or an array of schemes */ public function setSchemes($schemes) { @@ -246,7 +246,7 @@ class RouteCollection implements \IteratorAggregate, \Countable /** * Sets the HTTP methods (e.g. 'POST') all child routes are restricted to. * - * @param string|array $methods The method or an array of methods + * @param string|string[] $methods The method or an array of methods */ public function setMethods($methods) { diff --git a/vendor/symfony/routing/RouteCompiler.php b/vendor/symfony/routing/RouteCompiler.php index a64776a01ae2ecaf6d51c032db08a79230461fb3..fc6a182b4267fb48551a47fcc31e5cf9275ab11a 100644 --- a/vendor/symfony/routing/RouteCompiler.php +++ b/vendor/symfony/routing/RouteCompiler.php @@ -39,10 +39,10 @@ class RouteCompiler implements RouteCompilerInterface /** * {@inheritdoc} * - * @throws \InvalidArgumentException If a path variable is named _fragment - * @throws \LogicException If a variable is referenced more than once - * @throws \DomainException If a variable name starts with a digit or if it is too long to be successfully used as - * a PCRE subpattern. + * @throws \InvalidArgumentException if a path variable is named _fragment + * @throws \LogicException if a variable is referenced more than once + * @throws \DomainException if a variable name starts with a digit or if it is too long to be successfully used as + * a PCRE subpattern */ public static function compile(Route $route) { diff --git a/vendor/symfony/routing/Router.php b/vendor/symfony/routing/Router.php index 6ac4205a598fcaf46611fb48353c90a7ebad9717..e93cd65ca2b840a2f8a5f42532d8dcbb67c1befe 100644 --- a/vendor/symfony/routing/Router.php +++ b/vendor/symfony/routing/Router.php @@ -84,8 +84,6 @@ class Router implements RouterInterface, RequestMatcherInterface private $expressionLanguageProviders = array(); /** - * Constructor. - * * @param LoaderInterface $loader A LoaderInterface instance * @param mixed $resource The main resource to load * @param array $options An array of options diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.apache b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.apache deleted file mode 100644 index 26a561cc911807fa65c5a62b08b9c21d2153348d..0000000000000000000000000000000000000000 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.apache +++ /dev/null @@ -1,163 +0,0 @@ -# skip "real" requests -RewriteCond %{REQUEST_FILENAME} -f -RewriteRule .* - [QSA,L] - -# foo -RewriteCond %{REQUEST_URI} ^/foo/(baz|symfony)$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:foo,E=_ROUTING_param_bar:%1,E=_ROUTING_default_def:test] - -# foobar -RewriteCond %{REQUEST_URI} ^/foo(?:/([^/]++))?$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:foobar,E=_ROUTING_param_bar:%1,E=_ROUTING_default_bar:toto] - -# bar -RewriteCond %{REQUEST_URI} ^/bar/([^/]++)$ -RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [NC] -RewriteRule .* - [S=1,E=_ROUTING_allow_GET:1,E=_ROUTING_allow_HEAD:1] -RewriteCond %{REQUEST_URI} ^/bar/([^/]++)$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:bar,E=_ROUTING_param_foo:%1] - -# baragain -RewriteCond %{REQUEST_URI} ^/baragain/([^/]++)$ -RewriteCond %{REQUEST_METHOD} !^(GET|POST|HEAD)$ [NC] -RewriteRule .* - [S=1,E=_ROUTING_allow_GET:1,E=_ROUTING_allow_POST:1,E=_ROUTING_allow_HEAD:1] -RewriteCond %{REQUEST_URI} ^/baragain/([^/]++)$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baragain,E=_ROUTING_param_foo:%1] - -# baz -RewriteCond %{REQUEST_URI} ^/test/baz$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz] - -# baz2 -RewriteCond %{REQUEST_URI} ^/test/baz\.html$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz2] - -# baz3 -RewriteCond %{REQUEST_URI} ^/test/baz3$ -RewriteRule .* $0/ [QSA,L,R=301] -RewriteCond %{REQUEST_URI} ^/test/baz3/$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz3] - -# baz4 -RewriteCond %{REQUEST_URI} ^/test/([^/]++)$ -RewriteRule .* $0/ [QSA,L,R=301] -RewriteCond %{REQUEST_URI} ^/test/([^/]++)/$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz4,E=_ROUTING_param_foo:%1] - -# baz5 -RewriteCond %{REQUEST_URI} ^/test/([^/]++)/$ -RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [NC] -RewriteRule .* - [S=2,E=_ROUTING_allow_GET:1,E=_ROUTING_allow_HEAD:1] -RewriteCond %{REQUEST_URI} ^/test/([^/]++)$ -RewriteRule .* $0/ [QSA,L,R=301] -RewriteCond %{REQUEST_URI} ^/test/([^/]++)/$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz5,E=_ROUTING_param_foo:%1] - -# baz5unsafe -RewriteCond %{REQUEST_URI} ^/testunsafe/([^/]++)/$ -RewriteCond %{REQUEST_METHOD} !^(POST)$ [NC] -RewriteRule .* - [S=1,E=_ROUTING_allow_POST:1] -RewriteCond %{REQUEST_URI} ^/testunsafe/([^/]++)/$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz5unsafe,E=_ROUTING_param_foo:%1] - -# baz6 -RewriteCond %{REQUEST_URI} ^/test/baz$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz6,E=_ROUTING_default_foo:bar\ baz] - -# baz7 -RewriteCond %{REQUEST_URI} ^/te\ st/baz$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz7] - -# baz8 -RewriteCond %{REQUEST_URI} ^/te\\\ st/baz$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz8] - -# baz9 -RewriteCond %{REQUEST_URI} ^/test/(te\\\ st)$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:baz9,E=_ROUTING_param_baz:%1] - -RewriteCond %{HTTP:Host} ^a\.example\.com$ -RewriteRule .? - [E=__ROUTING_host_1:1] - -# route1 -RewriteCond %{ENV:__ROUTING_host_1} =1 -RewriteCond %{REQUEST_URI} ^/route1$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route1] - -# route2 -RewriteCond %{ENV:__ROUTING_host_1} =1 -RewriteCond %{REQUEST_URI} ^/c2/route2$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route2] - -RewriteCond %{HTTP:Host} ^b\.example\.com$ -RewriteRule .? - [E=__ROUTING_host_2:1] - -# route3 -RewriteCond %{ENV:__ROUTING_host_2} =1 -RewriteCond %{REQUEST_URI} ^/c2/route3$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route3] - -RewriteCond %{HTTP:Host} ^a\.example\.com$ -RewriteRule .? - [E=__ROUTING_host_3:1] - -# route4 -RewriteCond %{ENV:__ROUTING_host_3} =1 -RewriteCond %{REQUEST_URI} ^/route4$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route4] - -RewriteCond %{HTTP:Host} ^c\.example\.com$ -RewriteRule .? - [E=__ROUTING_host_4:1] - -# route5 -RewriteCond %{ENV:__ROUTING_host_4} =1 -RewriteCond %{REQUEST_URI} ^/route5$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route5] - -# route6 -RewriteCond %{REQUEST_URI} ^/route6$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route6] - -RewriteCond %{HTTP:Host} ^([^\.]++)\.example\.com$ -RewriteRule .? - [E=__ROUTING_host_5:1,E=__ROUTING_host_5_var1:%1] - -# route11 -RewriteCond %{ENV:__ROUTING_host_5} =1 -RewriteCond %{REQUEST_URI} ^/route11$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route11,E=_ROUTING_param_var1:%{ENV:__ROUTING_host_5_var1}] - -# route12 -RewriteCond %{ENV:__ROUTING_host_5} =1 -RewriteCond %{REQUEST_URI} ^/route12$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route12,E=_ROUTING_param_var1:%{ENV:__ROUTING_host_5_var1},E=_ROUTING_default_var1:val] - -# route13 -RewriteCond %{ENV:__ROUTING_host_5} =1 -RewriteCond %{REQUEST_URI} ^/route13/([^/]++)$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route13,E=_ROUTING_param_var1:%{ENV:__ROUTING_host_5_var1},E=_ROUTING_param_name:%1] - -# route14 -RewriteCond %{ENV:__ROUTING_host_5} =1 -RewriteCond %{REQUEST_URI} ^/route14/([^/]++)$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route14,E=_ROUTING_param_var1:%{ENV:__ROUTING_host_5_var1},E=_ROUTING_param_name:%1,E=_ROUTING_default_var1:val] - -RewriteCond %{HTTP:Host} ^c\.example\.com$ -RewriteRule .? - [E=__ROUTING_host_6:1] - -# route15 -RewriteCond %{ENV:__ROUTING_host_6} =1 -RewriteCond %{REQUEST_URI} ^/route15/([^/]++)$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route15,E=_ROUTING_param_name:%1] - -# route16 -RewriteCond %{REQUEST_URI} ^/route16/([^/]++)$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route16,E=_ROUTING_param_name:%1,E=_ROUTING_default_var1:val] - -# route17 -RewriteCond %{REQUEST_URI} ^/route17$ -RewriteRule .* app.php [QSA,L,E=_ROUTING_route:route17] - -# 405 Method Not Allowed -RewriteCond %{ENV:_ROUTING__allow_GET} =1 [OR] -RewriteCond %{ENV:_ROUTING__allow_HEAD} =1 [OR] -RewriteCond %{ENV:_ROUTING__allow_POST} =1 -RewriteRule .* app.php [QSA,L] diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.php index 8ae0ee96f563887da5168bf22c1012c2dd66c8ed..51fd29e8629f1c50eb3e3feeaeec8f068508398f 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.php @@ -5,16 +5,11 @@ use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\RequestContext; /** - * ProjectUrlMatcher. - * * This class has been auto-generated * by the Symfony Routing Component. */ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher { - /** - * Constructor. - */ public function __construct(RequestContext $context) { $this->context = $context; diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.apache b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.apache deleted file mode 100644 index 309f2ff0e53947cb307306547aa9ccd999101844..0000000000000000000000000000000000000000 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.apache +++ /dev/null @@ -1,7 +0,0 @@ -# skip "real" requests -RewriteCond %{REQUEST_FILENAME} -f -RewriteRule .* - [QSA,L] - -# foo -RewriteCond %{REQUEST_URI} ^/foo$ -RewriteRule .* ap\ p_d\ ev.php [QSA,L,E=_ROUTING_route:foo] diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.php index 91ec47899e4eb36e1f412fb0552fbe2162d847b9..008f7c3a410f0ae1322b1bf8d6aaa1e21185bead 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.php @@ -5,16 +5,11 @@ use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\RequestContext; /** - * ProjectUrlMatcher. - * * This class has been auto-generated * by the Symfony Routing Component. */ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\RedirectableUrlMatcher { - /** - * Constructor. - */ public function __construct(RequestContext $context) { $this->context = $context; diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher3.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher3.php index 48cd6dfac6c1c69fae5b0305d688a9925c07812f..c982a454347adf7b0f8cf9c67eab80c39d6f058a 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher3.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher3.php @@ -5,16 +5,11 @@ use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\RequestContext; /** - * ProjectUrlMatcher. - * * This class has been auto-generated * by the Symfony Routing Component. */ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher { - /** - * Constructor. - */ public function __construct(RequestContext $context) { $this->context = $context; diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher4.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher4.php index b90e49af89d9c1e45b8dc7f7bddcab924b2f018f..6aefd6938272cb575f5f86fa84291e59816eb142 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher4.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher4.php @@ -5,16 +5,11 @@ use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\RequestContext; /** - * ProjectUrlMatcher. - * * This class has been auto-generated * by the Symfony Routing Component. */ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher { - /** - * Constructor. - */ public function __construct(RequestContext $context) { $this->context = $context; @@ -57,6 +52,17 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher } not_head_and_get: + // get_and_head + if ('/get_and_head' === $pathinfo) { + if ('GET' !== $canonicalMethod) { + $allow[] = 'GET'; + goto not_get_and_head; + } + + return array('_route' => 'get_and_head'); + } + not_get_and_head: + // post_and_head if ('/post_and_get' === $pathinfo) { if (!in_array($requestMethod, array('POST', 'HEAD'))) { diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher5.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher5.php index 1e6824b341b7e9c6b341f17f0172a97b6767aacf..1884df1c45e27bcb3c55d1906452f3524ceabbcb 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher5.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher5.php @@ -5,16 +5,11 @@ use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\RequestContext; /** - * ProjectUrlMatcher. - * * This class has been auto-generated * by the Symfony Routing Component. */ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\RedirectableUrlMatcher { - /** - * Constructor. - */ public function __construct(RequestContext $context) { $this->context = $context; diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher6.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher6.php index c7645521f5a6eb9ac9d30eab726ba06dd327984a..bb9d80b55181ba41a42f5338daf714731f8aea2d 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher6.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher6.php @@ -5,16 +5,11 @@ use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\RequestContext; /** - * ProjectUrlMatcher. - * * This class has been auto-generated * by the Symfony Routing Component. */ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher { - /** - * Constructor. - */ public function __construct(RequestContext $context) { $this->context = $context; diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher7.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher7.php index 876a90f2da468b6faa23cf32721be6c0075f53be..404d462ed5415fb25df4b07d6e1bf3effb55828a 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher7.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher7.php @@ -5,16 +5,11 @@ use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\RequestContext; /** - * ProjectUrlMatcher. - * * This class has been auto-generated * by the Symfony Routing Component. */ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\RedirectableUrlMatcher { - /** - * Constructor. - */ public function __construct(RequestContext $context) { $this->context = $context; diff --git a/vendor/symfony/routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php b/vendor/symfony/routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php index 9d4f086be77025d1e03b2cc9b4676af327104a66..4fb65f4a11a47ed2ead5a9afa5e8f6ead1324454 100644 --- a/vendor/symfony/routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php +++ b/vendor/symfony/routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php @@ -297,6 +297,15 @@ class PhpMatcherDumperTest extends TestCase array(), '', array(), + array('HEAD', 'GET') + )); + $headMatchCasesCollection->add('get_and_head', new Route( + '/get_and_head', + array(), + array(), + array(), + '', + array(), array('GET', 'HEAD') )); $headMatchCasesCollection->add('post_and_head', new Route( diff --git a/vendor/symfony/routing/composer.json b/vendor/symfony/routing/composer.json index 38069dc4e9ab0373f877598993f86231136fb5cb..bb4f6a554bd7ba6f124ad9bb607817aacfa4d63c 100644 --- a/vendor/symfony/routing/composer.json +++ b/vendor/symfony/routing/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "require-dev": { "symfony/config": "~2.8|~3.0", diff --git a/vendor/symfony/twig-bridge/Command/DebugCommand.php b/vendor/symfony/twig-bridge/Command/DebugCommand.php index e6357df51ea8e38e11a3eacf2fb02b6a111df409..010404c1bab01b20b44ddc33a7be04c35dba9fe6 100644 --- a/vendor/symfony/twig-bridge/Command/DebugCommand.php +++ b/vendor/symfony/twig-bridge/Command/DebugCommand.php @@ -88,7 +88,7 @@ EOF $types = array('functions', 'filters', 'tests', 'globals'); - if ($input->getOption('format') === 'json') { + if ('json' === $input->getOption('format')) { $data = array(); foreach ($types as $type) { foreach ($twig->{'get'.ucfirst($type)}() as $name => $entity) { @@ -126,13 +126,13 @@ EOF private function getMetadata($type, $entity) { - if ($type === 'globals') { + if ('globals' === $type) { return $entity; } - if ($type === 'tests') { + if ('tests' === $type) { return; } - if ($type === 'functions' || $type === 'filters') { + if ('functions' === $type || 'filters' === $type) { $cb = $entity->getCallable(); if (null === $cb) { return; @@ -162,7 +162,7 @@ EOF array_shift($args); } - if ($type === 'filters') { + if ('filters' === $type) { // remove the value the filter is applied on array_shift($args); } @@ -182,20 +182,20 @@ EOF private function getPrettyMetadata($type, $entity) { - if ($type === 'tests') { + if ('tests' === $type) { return ''; } try { $meta = $this->getMetadata($type, $entity); - if ($meta === null) { + if (null === $meta) { return '(unknown?)'; } } catch (\UnexpectedValueException $e) { return ' <error>'.$e->getMessage().'</error>'; } - if ($type === 'globals') { + if ('globals' === $type) { if (is_object($meta)) { return ' = object('.get_class($meta).')'; } @@ -203,11 +203,11 @@ EOF return ' = '.substr(@json_encode($meta), 0, 50); } - if ($type === 'functions') { + if ('functions' === $type) { return '('.implode(', ', $meta).')'; } - if ($type === 'filters') { + if ('filters' === $type) { return $meta ? '('.implode(', ', $meta).')' : ''; } } diff --git a/vendor/symfony/twig-bridge/Command/LintCommand.php b/vendor/symfony/twig-bridge/Command/LintCommand.php index d20b9cf1934caa9a0f9410b745b3cd4594bcc9d6..8c8dde413f70dcb565ef66592e46e8fced848220 100644 --- a/vendor/symfony/twig-bridge/Command/LintCommand.php +++ b/vendor/symfony/twig-bridge/Command/LintCommand.php @@ -176,7 +176,7 @@ EOF } } - if ($errors === 0) { + if (0 === $errors) { $io->success(sprintf('All %d Twig files contain valid syntax.', count($filesInfo))); } else { $io->warning(sprintf('%d Twig files have valid syntax and %d contain errors.', count($filesInfo) - $errors, $errors)); diff --git a/vendor/symfony/twig-bridge/Extension/CodeExtension.php b/vendor/symfony/twig-bridge/Extension/CodeExtension.php index 83a8f7eed44d116fb8d294bcdb1b66c106310d45..c2866abb857a7f9f23ee14efc08538864a6a9844 100644 --- a/vendor/symfony/twig-bridge/Extension/CodeExtension.php +++ b/vendor/symfony/twig-bridge/Extension/CodeExtension.php @@ -27,8 +27,6 @@ class CodeExtension extends AbstractExtension private $charset; /** - * Constructor. - * * @param string|FileLinkFormatter $fileLinkFormat The format for links to source files * @param string $rootDir The project root directory * @param string $charset The charset diff --git a/vendor/symfony/twig-bridge/Extension/StopwatchExtension.php b/vendor/symfony/twig-bridge/Extension/StopwatchExtension.php index 635188b7389e42e7a4cfac454676670b0da84d50..cb91ff428b0a2a54a599ae32d1db99fe2a02b3e9 100644 --- a/vendor/symfony/twig-bridge/Extension/StopwatchExtension.php +++ b/vendor/symfony/twig-bridge/Extension/StopwatchExtension.php @@ -48,7 +48,7 @@ class StopwatchExtension extends AbstractExtension * Some stuff which will be recorded on the timeline * {% endstopwatch %} */ - new StopwatchTokenParser($this->stopwatch !== null && $this->enabled), + new StopwatchTokenParser(null !== $this->stopwatch && $this->enabled), ); } diff --git a/vendor/symfony/twig-bridge/NodeVisitor/TranslationDefaultDomainNodeVisitor.php b/vendor/symfony/twig-bridge/NodeVisitor/TranslationDefaultDomainNodeVisitor.php index b3c89d18eb2bdc352d12c4fbd3245e1ca46d75fb..c04ce13a1881b69c270dfea4672eb88399ef4fca 100644 --- a/vendor/symfony/twig-bridge/NodeVisitor/TranslationDefaultDomainNodeVisitor.php +++ b/vendor/symfony/twig-bridge/NodeVisitor/TranslationDefaultDomainNodeVisitor.php @@ -26,8 +26,6 @@ use Twig\Node\SetNode; use Twig\NodeVisitor\AbstractNodeVisitor; /** - * TranslationDefaultDomainNodeVisitor. - * * @author Fabien Potencier <fabien@symfony.com> */ class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor @@ -37,9 +35,6 @@ class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor */ private $scope; - /** - * Constructor. - */ public function __construct() { $this->scope = new Scope(); diff --git a/vendor/symfony/twig-bridge/Resources/views/Form/form_div_layout.html.twig b/vendor/symfony/twig-bridge/Resources/views/Form/form_div_layout.html.twig index f70ca33809a78bad0fdd3177d7cae7beaa2668c9..3d8afe2cba60229711ce1d496fbaf200f1101390 100644 --- a/vendor/symfony/twig-bridge/Resources/views/Form/form_div_layout.html.twig +++ b/vendor/symfony/twig-bridge/Resources/views/Form/form_div_layout.html.twig @@ -339,7 +339,7 @@ {% endif %} {%- endfor %} - {% if not form.methodRendered %} + {% if not form.methodRendered and form.parent is null %} {%- do form.setMethodRendered() -%} {% set method = method|upper %} {%- if method in ["GET", "POST"] -%} diff --git a/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php b/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php index f82a5d2e33ea41942f81720c143d9db883e195fd..eb53b1282bf5ff89f094e7c9a42e490beeb1bc2c 100644 --- a/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php +++ b/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php @@ -59,7 +59,7 @@ class FormExtensionBootstrap3HorizontalLayoutTest extends AbstractBootstrap3Hori protected function renderLabel(FormView $view, $label = null, array $vars = array()) { - if ($label !== null) { + if (null !== $label) { $vars += array('label' => $label); } diff --git a/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionBootstrap3LayoutTest.php b/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionBootstrap3LayoutTest.php index 93f08ed252bbecb4348e893af522e754e7dee24a..03d9c98fa64acad221396cc4c926ccdf3905ba74 100644 --- a/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionBootstrap3LayoutTest.php +++ b/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionBootstrap3LayoutTest.php @@ -79,7 +79,7 @@ class FormExtensionBootstrap3LayoutTest extends AbstractBootstrap3LayoutTest protected function renderLabel(FormView $view, $label = null, array $vars = array()) { - if ($label !== null) { + if (null !== $label) { $vars += array('label' => $label); } diff --git a/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionDivLayoutTest.php b/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionDivLayoutTest.php index 5367650e9dcc65b9f61b1cb3c99cd6d20df32402..27a8ee3c5b4e928179172aa66470172d61f0a364 100644 --- a/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionDivLayoutTest.php +++ b/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionDivLayoutTest.php @@ -153,7 +153,7 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest protected function renderLabel(FormView $view, $label = null, array $vars = array()) { - if ($label !== null) { + if (null !== $label) { $vars += array('label' => $label); } diff --git a/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionTableLayoutTest.php b/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionTableLayoutTest.php index 5868e42ca539538fba01a0747f87c3047c0acb00..f05093667b4e569b314d7b2b1f7fd1903eb8ff29 100644 --- a/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionTableLayoutTest.php +++ b/vendor/symfony/twig-bridge/Tests/Extension/FormExtensionTableLayoutTest.php @@ -80,7 +80,7 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest protected function renderLabel(FormView $view, $label = null, array $vars = array()) { - if ($label !== null) { + if (null !== $label) { $vars += array('label' => $label); } diff --git a/vendor/symfony/twig-bridge/Tests/Extension/WorkflowExtensionTest.php b/vendor/symfony/twig-bridge/Tests/Extension/WorkflowExtensionTest.php index e134434c9b4e71c855d9845a815c76b6448a4d84..60934c1c2df84cf82d12412cf481db79dc964b18 100644 --- a/vendor/symfony/twig-bridge/Tests/Extension/WorkflowExtensionTest.php +++ b/vendor/symfony/twig-bridge/Tests/Extension/WorkflowExtensionTest.php @@ -14,7 +14,6 @@ namespace Symfony\Bridge\Twig\Tests\Extension; use PHPUnit\Framework\TestCase; use Symfony\Bridge\Twig\Extension\WorkflowExtension; use Symfony\Component\Workflow\Definition; -use Symfony\Component\Workflow\Marking; use Symfony\Component\Workflow\Registry; use Symfony\Component\Workflow\SupportStrategy\ClassInstanceSupportStrategy; use Symfony\Component\Workflow\Transition; diff --git a/vendor/symfony/twig-bridge/composer.json b/vendor/symfony/twig-bridge/composer.json index 8fe41945b72aae9e1071f087865882bb0ba18757..e00e3dc7fad35ba95de5a05ac24cd616ee3f72e0 100644 --- a/vendor/symfony/twig-bridge/composer.json +++ b/vendor/symfony/twig-bridge/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "twig/twig": "~1.34|~2.4" }, "require-dev": { diff --git a/vendor/twig/twig/.travis.yml b/vendor/twig/twig/.travis.yml index c479e324bf697805092a913005f5a5f2bb7376d6..147eb7df3f3327e6a2476ef83ca89ab39d7f89dc 100644 --- a/vendor/twig/twig/.travis.yml +++ b/vendor/twig/twig/.travis.yml @@ -21,7 +21,8 @@ env: - TWIG_EXT=yes before_install: - - phpenv config-rm xdebug.ini + # turn off XDebug + - phpenv config-rm xdebug.ini || return 0 install: - travis_retry composer install diff --git a/vendor/twig/twig/CHANGELOG b/vendor/twig/twig/CHANGELOG index e92da05002985764683fa6424f014a0b65d01c93..f738c841ccd200a83d452f9c6284503f91275986 100644 --- a/vendor/twig/twig/CHANGELOG +++ b/vendor/twig/twig/CHANGELOG @@ -1,3 +1,10 @@ +* 1.35.0 (2017-09-27) + + * added Twig_Profiler_Profile::reset() + * fixed use TokenParser to return an empty Node + * added RuntimeExtensionInterface + * added circular reference detection when loading templates + * 1.34.4 (2017-07-04) * added support for runtime loaders in IntegrationTestCase @@ -142,7 +149,7 @@ * fixed reserved keywords (forbids true, false, null and none keywords for variables names) * fixed support for PHP7 (Throwable support) - * marked the following methods as being internals on Twig_Environment: + * marked the following methods as being internals on Twig_Environment: getFunctions(), getFilters(), getTests(), getFunction(), getFilter(), getTest(), getTokenParsers(), getTags(), getNodeVisitors(), getUnaryOperators(), getBinaryOperators(), getFunctions(), getFilters(), getGlobals(), initGlobals(), initExtensions(), and initExtension() @@ -226,7 +233,7 @@ * fixed limited RCEs when in sandbox mode * deprecated Twig_Template::getEnvironment() * deprecated the _self variable for usage outside of the from and import tags - * added Twig_BaseNodeVisitor to ease the compatibility of node visitors + * added Twig_BaseNodeVisitor to ease the compatibility of node visitors between 1.x and 2.x * 1.19.0 (2015-07-31) diff --git a/vendor/twig/twig/composer.json b/vendor/twig/twig/composer.json index 71ceed8d2a4f00a4be07b9eb5989888f48dce971..09c1ea5e9f7422d6359da72b24abb5697f9bd237 100644 --- a/vendor/twig/twig/composer.json +++ b/vendor/twig/twig/composer.json @@ -44,7 +44,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.34-dev" + "dev-master": "1.35-dev" } } } diff --git a/vendor/twig/twig/doc/templates.rst b/vendor/twig/twig/doc/templates.rst index d4dbe32d671f964486d897aa6d053bb92923ba1c..3d60779a09b2df75051f06aa29651fa6841ec681 100644 --- a/vendor/twig/twig/doc/templates.rst +++ b/vendor/twig/twig/doc/templates.rst @@ -611,7 +611,8 @@ exist: { 2: 'foo', 4: 'bar' } {# keys as expressions (the expression must be enclosed into parentheses) -- as of Twig 1.5 #} - { (1 + 1): 'foo', (a ~ 'b'): 'bar' } + {% set foo = 'foo' %} + { (foo): 'foo', (1 + 1): 'bar', (foo ~ 'b'): 'baz' } * ``true`` / ``false``: ``true`` represents the true value, ``false`` represents the false value. diff --git a/vendor/twig/twig/ext/twig/php_twig.h b/vendor/twig/twig/ext/twig/php_twig.h index 4eea1bb88ae05d242457d3f3a5fb0de78e403310..7fc1601e8c1e2576f18644fb2a6ff8f387aa90da 100644 --- a/vendor/twig/twig/ext/twig/php_twig.h +++ b/vendor/twig/twig/ext/twig/php_twig.h @@ -15,7 +15,7 @@ #ifndef PHP_TWIG_H #define PHP_TWIG_H -#define PHP_TWIG_VERSION "1.34.4" +#define PHP_TWIG_VERSION "1.35.0" #include "php.h" diff --git a/vendor/twig/twig/lib/Twig/Environment.php b/vendor/twig/twig/lib/Twig/Environment.php index e22e5de8e9e8ec759d43b9caef0fe383adda919a..5de2f27fd37333d08d28bb8472ad59392797d2e5 100644 --- a/vendor/twig/twig/lib/Twig/Environment.php +++ b/vendor/twig/twig/lib/Twig/Environment.php @@ -16,11 +16,11 @@ */ class Twig_Environment { - const VERSION = '1.34.4'; - const VERSION_ID = 13404; + const VERSION = '1.35.0'; + const VERSION_ID = 13500; const MAJOR_VERSION = 1; - const MINOR_VERSION = 34; - const RELEASE_VERSION = 4; + const MINOR_VERSION = 35; + const RELEASE_VERSION = 0; const EXTRA_VERSION = ''; protected $charset; @@ -58,6 +58,7 @@ class Twig_Environment private $runtimeLoaders = array(); private $runtimes = array(); private $optionsHash; + private $loading = array(); /** * Constructor. @@ -382,6 +383,10 @@ class Twig_Environment * * @param string|Twig_TemplateWrapper|Twig_Template $name The template name * + * @throws Twig_Error_Loader When the template cannot be found + * @throws Twig_Error_Runtime When a previously generated cache is corrupted + * @throws Twig_Error_Syntax When an error occurred during compilation + * * @return Twig_TemplateWrapper */ public function load($name) @@ -472,7 +477,22 @@ class Twig_Environment $this->initRuntime(); } - return $this->loadedTemplates[$cls] = new $cls($this); + if (isset($this->loading[$cls])) { + throw new Twig_Error_Runtime(sprintf('Circular reference detected for Twig template "%s", path: %s.', $name, implode(' -> ', array_merge($this->loading, array($name))))); + } + + $this->loading[$cls] = $name; + + try { + $this->loadedTemplates[$cls] = new $cls($this); + unset($this->loading[$cls]); + } catch (\Exception $e) { + unset($this->loading[$cls]); + + throw $e; + } + + return $this->loadedTemplates[$cls]; } /** diff --git a/vendor/twig/twig/lib/Twig/Profiler/Profile.php b/vendor/twig/twig/lib/Twig/Profiler/Profile.php index 60b9103c8be0cf426a83fe4e7cabc9c710d012e2..3fdc1a8ae2dbeff29142264e187dae0646ceed41 100644 --- a/vendor/twig/twig/lib/Twig/Profiler/Profile.php +++ b/vendor/twig/twig/lib/Twig/Profiler/Profile.php @@ -145,6 +145,12 @@ class Twig_Profiler_Profile implements IteratorAggregate, Serializable ); } + public function reset() + { + $this->starts = $this->ends = $this->profiles = array(); + $this->enter(); + } + public function getIterator() { return new ArrayIterator($this->profiles); diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Use.php b/vendor/twig/twig/lib/Twig/TokenParser/Use.php index 154c0ad12887bb75e0b4f9fa60878be685f817d5..f15a91ea0dfaa61f983da8a90a0d8881a3fa2eef 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/Use.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/Use.php @@ -57,6 +57,8 @@ class Twig_TokenParser_Use extends Twig_TokenParser $stream->expect(Twig_Token::BLOCK_END_TYPE); $this->parser->addTrait(new Twig_Node(array('template' => $template, 'targets' => new Twig_Node($targets)))); + + return new Twig_Node(); } public function getTag() diff --git a/vendor/twig/twig/phpunit.xml.dist b/vendor/twig/twig/phpunit.xml.dist index d800c57698eacc35d96aba8f97f3415021e0963d..ce773278553adac1f7f150e41cd9531d62f3b10d 100644 --- a/vendor/twig/twig/phpunit.xml.dist +++ b/vendor/twig/twig/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="test/bootstrap.php" + bootstrap="vendor/autoload.php" > <testsuites> <testsuite name="Twig Test Suite"> diff --git a/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php b/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..63bc3b1ab10847be082a8d7206fde3c135fef96f --- /dev/null +++ b/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php @@ -0,0 +1,19 @@ +<?php + +/* + * This file is part of Twig. + * + * (c) Fabien Potencier + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Twig\Extension; + +/** + * @author Grégoire Pineau <lyrixx@lyrixx.info> + */ +interface RuntimeExtensionInterface +{ +} diff --git a/vendor/twig/twig/test/Twig/Tests/AutoloaderTest.php b/vendor/twig/twig/test/Twig/Tests/AutoloaderTest.php index 52107c0c174cc155056cd6d3d1d5121abf0459cb..42529402e417dc4b6c4f3d36593924e1ce13c4b4 100644 --- a/vendor/twig/twig/test/Twig/Tests/AutoloaderTest.php +++ b/vendor/twig/twig/test/Twig/Tests/AutoloaderTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_AutoloaderTest extends PHPUnit_Framework_TestCase +class Twig_Tests_AutoloaderTest extends \PHPUnit\Framework\TestCase { /** * @group legacy diff --git a/vendor/twig/twig/test/Twig/Tests/Cache/FilesystemTest.php b/vendor/twig/twig/test/Twig/Tests/Cache/FilesystemTest.php index aca68ce0b953128f7fe77936fb2935d5c56909e4..e9e600c1f23263b67ec65d7cb436c7c63519e0f3 100644 --- a/vendor/twig/twig/test/Twig/Tests/Cache/FilesystemTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Cache/FilesystemTest.php @@ -11,7 +11,7 @@ require_once dirname(dirname(__FILE__)).'/FilesystemHelper.php'; -class Twig_Tests_Cache_FilesystemTest extends PHPUnit_Framework_TestCase +class Twig_Tests_Cache_FilesystemTest extends \PHPUnit\Framework\TestCase { private $classname; private $directory; diff --git a/vendor/twig/twig/test/Twig/Tests/CompilerTest.php b/vendor/twig/twig/test/Twig/Tests/CompilerTest.php index da7f53315f3cab289ae67fb93b260111ba15d973..4d4b8df9e375786d4cae374fbda16c062dc13b11 100644 --- a/vendor/twig/twig/test/Twig/Tests/CompilerTest.php +++ b/vendor/twig/twig/test/Twig/Tests/CompilerTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_CompilerTest extends PHPUnit_Framework_TestCase +class Twig_Tests_CompilerTest extends \PHPUnit\Framework\TestCase { public function testReprNumericValueWithLocale() { diff --git a/vendor/twig/twig/test/Twig/Tests/ContainerRuntimeLoaderTest.php b/vendor/twig/twig/test/Twig/Tests/ContainerRuntimeLoaderTest.php index 558edf22747ec76a39404f5b815429fcc6897b43..c111f9284b39d6b596185de60e134fdd8711f263 100644 --- a/vendor/twig/twig/test/Twig/Tests/ContainerRuntimeLoaderTest.php +++ b/vendor/twig/twig/test/Twig/Tests/ContainerRuntimeLoaderTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_ContainerRuntimeLoaderTest extends PHPUnit_Framework_TestCase +class Twig_Tests_ContainerRuntimeLoaderTest extends \PHPUnit\Framework\TestCase { /** * @requires PHP 5.3 diff --git a/vendor/twig/twig/test/Twig/Tests/CustomExtensionTest.php b/vendor/twig/twig/test/Twig/Tests/CustomExtensionTest.php index c706df264fed8bcf4142bd7b112c2b64a9ae37cf..f9d44fda5e248a0293807c37197a4e94d48c6419 100644 --- a/vendor/twig/twig/test/Twig/Tests/CustomExtensionTest.php +++ b/vendor/twig/twig/test/Twig/Tests/CustomExtensionTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class CustomExtensionTest extends PHPUnit_Framework_TestCase +class CustomExtensionTest extends \PHPUnit\Framework\TestCase { /** * @requires PHP 5.3 diff --git a/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php b/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php index 5b07c40e8e7419097c95ff106c4769cea3dc6fb2..ca9f2cf8aced58799bfe03dbb0c9070f9e68dcf5 100644 --- a/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php +++ b/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php @@ -11,7 +11,7 @@ require_once dirname(__FILE__).'/FilesystemHelper.php'; -class Twig_Tests_EnvironmentTest extends PHPUnit_Framework_TestCase +class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase { private $deprecations = array(); @@ -480,6 +480,33 @@ EOF $this->assertEquals('foo', $twig->render('func_string_named_args')); } + /** + * @expectedException Twig_Error_Runtime + * @expectedExceptionMessage Circular reference detected for Twig template "base.html.twig", path: base.html.twig -> base.html.twig in "base.html.twig" at line 1 + */ + public function testFailLoadTemplateOnCircularReference() + { + $twig = new Twig_Environment(new Twig_Loader_Array(array( + 'base.html.twig' => '{% extends "base.html.twig" %}', + ))); + + $twig->loadTemplate('base.html.twig'); + } + + /** + * @expectedException Twig_Error_Runtime + * @expectedExceptionMessage Circular reference detected for Twig template "base1.html.twig", path: base1.html.twig -> base2.html.twig -> base1.html.twig in "base1.html.twig" at line 1 + */ + public function testFailLoadTemplateOnComplexCircularReference() + { + $twig = new Twig_Environment(new Twig_Loader_Array(array( + 'base1.html.twig' => '{% extends "base2.html.twig" %}', + 'base2.html.twig' => '{% extends "base1.html.twig" %}', + ))); + + $twig->loadTemplate('base1.html.twig'); + } + protected function getMockLoader($templateName, $templateContent) { // to be removed in 2.0 diff --git a/vendor/twig/twig/test/Twig/Tests/ErrorTest.php b/vendor/twig/twig/test/Twig/Tests/ErrorTest.php index b0eeca2e63f67ee3f467054af238a2396f0f9e48..3ec572ab2deaaf7cf4e878401c02e605bc654ef8 100644 --- a/vendor/twig/twig/test/Twig/Tests/ErrorTest.php +++ b/vendor/twig/twig/test/Twig/Tests/ErrorTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_ErrorTest extends PHPUnit_Framework_TestCase +class Twig_Tests_ErrorTest extends \PHPUnit\Framework\TestCase { public function testErrorWithObjectFilename() { diff --git a/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php b/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php index 54f2ecc967289efe3433e105d09a3595eb9f0142..3a173f035f7c4f28d09131749a343f1774e6254b 100644 --- a/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php +++ b/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase +class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase { /** * @expectedException Twig_Error_Syntax diff --git a/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php b/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php index c5429d48773f84e6d5666d807259836b104792ea..ca69b4af65034f6c090b4256cb9ce9b43900f865 100644 --- a/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_Extension_CoreTest extends PHPUnit_Framework_TestCase +class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider getRandomFunctionTestData @@ -264,7 +264,7 @@ class Twig_Tests_Extension_CoreTest extends PHPUnit_Framework_TestCase array(array(), new CoreTestIterator($i, $keys, true), count($keys) + 10), array('de', 'abcdef', 3, 2), array(array(), new SimpleXMLElement('<items><item>1</item><item>2</item></items>'), 3), - array(array(), new ArrayIterator(array(1, 2)), 3) + array(array(), new ArrayIterator(array(1, 2)), 3), ); } } @@ -344,7 +344,7 @@ final class CoreTestIterator implements Iterator { ++$this->position; if ($this->position === $this->maxPosition) { - throw new LogicException(sprintf('Code should not iterate beyond %d.', $this->maxPosition)); + throw new LogicException(sprintf('Code should not iterate beyond %d.', $this->maxPosition)); } } diff --git a/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php b/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php index 0b2158269f2774c2ca432585d70cfe867db3f977..9d90e0ea7467bb735647c615210714345f070337 100644 --- a/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_Extension_SandboxTest extends PHPUnit_Framework_TestCase +class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase { protected static $params; protected static $templates; diff --git a/vendor/twig/twig/test/Twig/Tests/FactoryRuntimeLoaderTest.php b/vendor/twig/twig/test/Twig/Tests/FactoryRuntimeLoaderTest.php index f418edf7863e0691bb5f4423ed693fda51cfcf77..f97d30694b9584f35d42f04bb32e28bd5090680d 100644 --- a/vendor/twig/twig/test/Twig/Tests/FactoryRuntimeLoaderTest.php +++ b/vendor/twig/twig/test/Twig/Tests/FactoryRuntimeLoaderTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_FactoryRuntimeLoaderTest extends PHPUnit_Framework_TestCase +class Twig_Tests_FactoryRuntimeLoaderTest extends \PHPUnit\Framework\TestCase { public function testLoad() { diff --git a/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php b/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php index f7ff53c3f3ecba017fea1ce2d9e4d9f9e7d3d2b9..e8a23eade978b382d255a1ec53a9bdde62bd1cac 100644 --- a/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php +++ b/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php @@ -11,7 +11,7 @@ require_once dirname(__FILE__).'/FilesystemHelper.php'; -class Twig_Tests_FileCachingTest extends PHPUnit_Framework_TestCase +class Twig_Tests_FileCachingTest extends \PHPUnit\Framework\TestCase { private $env; private $tmpDir; diff --git a/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php b/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php index b310a5be3533ef2f96451ab257e28e3c0728726b..a983a47c85877727e299f5f39b603723fd4b0c06 100644 --- a/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php +++ b/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_FileExtensionEscapingStrategyTest extends PHPUnit_Framework_TestCase +class Twig_Tests_FileExtensionEscapingStrategyTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider getGuessData diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/use_with_parent.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/use_with_parent.test new file mode 100644 index 0000000000000000000000000000000000000000..3fe2ad83cf3c59114d8c81fb4d3b790687dd01eb --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/use_with_parent.test @@ -0,0 +1,24 @@ +--TEST-- +"use" tag with a parent block +--TEMPLATE-- +{% extends "parent.twig" %} + +{% use 'blocks.twig' %} + +{% block body %} + {{ parent() -}} + CHILD + {{ block('content') }} +{% endblock %} +--TEMPLATE(parent.twig)-- +{% block body %} + PARENT +{% endblock %} +--TEMPLATE(blocks.twig)-- +{% block content 'BLOCK' %} +--DATA-- +return array() +--EXPECT-- +PARENT +CHILD + BLOCK diff --git a/vendor/twig/twig/test/Twig/Tests/LexerTest.php b/vendor/twig/twig/test/Twig/Tests/LexerTest.php index c460449712fc7c857d03769e2058c7569fdbf639..ffe9a235bf39077609cce3e408cd0a7093883e05 100644 --- a/vendor/twig/twig/test/Twig/Tests/LexerTest.php +++ b/vendor/twig/twig/test/Twig/Tests/LexerTest.php @@ -8,7 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -class Twig_Tests_LexerTest extends PHPUnit_Framework_TestCase +class Twig_Tests_LexerTest extends \PHPUnit\Framework\TestCase { /** * @group legacy diff --git a/vendor/twig/twig/test/Twig/Tests/Loader/ArrayTest.php b/vendor/twig/twig/test/Twig/Tests/Loader/ArrayTest.php index 7e1ea812925f585858d8f78af025174016af5b88..593063933e52e5026c30247f416e9ff7972f7b93 100644 --- a/vendor/twig/twig/test/Twig/Tests/Loader/ArrayTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Loader/ArrayTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_Loader_ArrayTest extends PHPUnit_Framework_TestCase +class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase { /** * @group legacy diff --git a/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php b/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php index 733de4f021bbc234170527c651fec32f1bb5bcbf..8a8a84a5a03101c3440de405ae78513c801ed8d1 100644 --- a/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_Loader_ChainTest extends PHPUnit_Framework_TestCase +class Twig_Tests_Loader_ChainTest extends \PHPUnit\Framework\TestCase { /** * @group legacy diff --git a/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php b/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php index c8cbaf7184c8fdac2c5c565978c0c1da4b5d538a..bd2acbd75f45c83d7e23a6b4eae3e555ad106946 100644 --- a/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_Loader_FilesystemTest extends PHPUnit_Framework_TestCase +class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase { public function testGetSourceContext() { diff --git a/vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php b/vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php index f1278eec30e3fbd1b793efd60e7e41e9a30d595b..50736dc22df78a45298c0b21ffa2b321ccab079f 100644 --- a/vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php +++ b/vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_NativeExtensionTest extends PHPUnit_Framework_TestCase +class Twig_Tests_NativeExtensionTest extends \PHPUnit\Framework\TestCase { /** * @requires PHP 5.3 diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php index be7b417b9ab7c075b45a893c17e3beae844527ad..883bb61273ccacda639eb2f5808d4f95d8f25e62 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_Node_Expression_CallTest extends PHPUnit_Framework_TestCase +class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase { public function testGetArguments() { diff --git a/vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php b/vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php index 0a48e6dd7f3f3546455dbceac2c374b558efdab8..92c0ecac79d1501f046184c6c42e197c016fabe3 100644 --- a/vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php +++ b/vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php @@ -8,7 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -class Twig_Tests_NodeVisitor_OptimizerTest extends PHPUnit_Framework_TestCase +class Twig_Tests_NodeVisitor_OptimizerTest extends \PHPUnit\Framework\TestCase { public function testRenderBlockOptimizer() { diff --git a/vendor/twig/twig/test/Twig/Tests/ParserTest.php b/vendor/twig/twig/test/Twig/Tests/ParserTest.php index 1bc2b0965218c1abe5f02c92c6ad205f23978b0f..342fb7bab78bcd69b3ef09d1ebe5b933f9c53f5f 100644 --- a/vendor/twig/twig/test/Twig/Tests/ParserTest.php +++ b/vendor/twig/twig/test/Twig/Tests/ParserTest.php @@ -8,7 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -class Twig_Tests_ParserTest extends PHPUnit_Framework_TestCase +class Twig_Tests_ParserTest extends \PHPUnit\Framework\TestCase { /** * @expectedException Twig_Error_Syntax diff --git a/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php b/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php index da97f478aac4cb27899c69ca1c9d51374d64b2ee..a71b97b972d5976a06b2cf7508315a3b2f8ea5e8 100644 --- a/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -abstract class Twig_Tests_Profiler_Dumper_AbstractTest extends PHPUnit_Framework_TestCase +abstract class Twig_Tests_Profiler_Dumper_AbstractTest extends \PHPUnit\Framework\TestCase { protected function getProfile() { diff --git a/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php b/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php index f786f06ca05a8252bfb431cbcc2a58bd49c3e943..08db96a90ce538d157f08be8f03f4322c3c837ef 100644 --- a/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_Profiler_ProfileTest extends PHPUnit_Framework_TestCase +class Twig_Tests_Profiler_ProfileTest extends \PHPUnit\Framework\TestCase { public function testConstructor() { @@ -97,4 +97,14 @@ class Twig_Tests_Profiler_ProfileTest extends PHPUnit_Framework_TestCase $this->assertEquals($profile1->getType(), $profile3->getType()); $this->assertEquals($profile1->getName(), $profile3->getName()); } + + public function testReset() + { + $profile = new Twig_Profiler_Profile(); + usleep(1); + $profile->leave(); + $profile->reset(); + + $this->assertEquals(0, $profile->getDuration()); + } } diff --git a/vendor/twig/twig/test/Twig/Tests/TemplateTest.php b/vendor/twig/twig/test/Twig/Tests/TemplateTest.php index 4da2d57500eb5b49398aada87f1252d1a1c5abb4..c22a433361e3d858c1ca9d0d398a01c64cc47ad4 100644 --- a/vendor/twig/twig/test/Twig/Tests/TemplateTest.php +++ b/vendor/twig/twig/test/Twig/Tests/TemplateTest.php @@ -8,7 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -class Twig_Tests_TemplateTest extends PHPUnit_Framework_TestCase +class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase { /** * @expectedException LogicException diff --git a/vendor/twig/twig/test/Twig/Tests/TemplateWrapperTest.php b/vendor/twig/twig/test/Twig/Tests/TemplateWrapperTest.php index 9cd1ced9a48fb4416ca055a7b2844980ce73c302..cc71052c412604352cbb7ba6115c85a153baa765 100644 --- a/vendor/twig/twig/test/Twig/Tests/TemplateWrapperTest.php +++ b/vendor/twig/twig/test/Twig/Tests/TemplateWrapperTest.php @@ -8,7 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -class Twig_Tests_TemplateWrapperTest extends PHPUnit_Framework_TestCase +class Twig_Tests_TemplateWrapperTest extends \PHPUnit\Framework\TestCase { public function testHasGetBlocks() { diff --git a/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php b/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php index 88f39a1fa8f6201e0f593c6714b8905461a65383..f219c9554b280d510c22c06d9d67af4f35fa9c71 100644 --- a/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php +++ b/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_TokenStreamTest extends PHPUnit_Framework_TestCase +class Twig_Tests_TokenStreamTest extends \PHPUnit\Framework\TestCase { protected static $tokens; diff --git a/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php b/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php index 9f7d14d17371b7a4ecf2abeb96cd2a020736ec10..887a90afaa1600bdb3a830beb597903581fc853c 100644 --- a/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -class Twig_Tests_Util_DeprecationCollectorTest extends PHPUnit_Framework_TestCase +class Twig_Tests_Util_DeprecationCollectorTest extends \PHPUnit\Framework\TestCase { /** * @requires PHP 5.3 diff --git a/vendor/twig/twig/test/Twig/Tests/escapingTest.php b/vendor/twig/twig/test/Twig/Tests/escapingTest.php index e5b90935afc9ffc471e61f582879c0e1a558a04d..9b98dddcf132379501969c06079524207e83059a 100644 --- a/vendor/twig/twig/test/Twig/Tests/escapingTest.php +++ b/vendor/twig/twig/test/Twig/Tests/escapingTest.php @@ -6,7 +6,7 @@ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class Twig_Test_EscapingTest extends PHPUnit_Framework_TestCase +class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase { /** * All character encodings supported by htmlspecialchars(). diff --git a/vendor/twig/twig/test/bootstrap.php b/vendor/twig/twig/test/bootstrap.php deleted file mode 100644 index d167b67defc2416ad2327d38c942eeb5b029e3e2..0000000000000000000000000000000000000000 --- a/vendor/twig/twig/test/bootstrap.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of Twig. - * - * (c) Fabien Potencier - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (PHP_VERSION_ID < 50300) { - require_once dirname(__FILE__).'/../lib/Twig/Autoloader.php'; - Twig_Autoloader::register(true); -} else { - require __DIR__.'/../vendor/autoload.php'; - - if (!class_exists('\PHPUnit_Framework_TestCase') && class_exists('\PHPUnit\Framework\TestCase')) { - class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase'); - } -} diff --git a/vendor/willdurand/negotiation/.gitignore b/vendor/willdurand/negotiation/.gitignore deleted file mode 100644 index 3a9875b460f3bab5c185900528ba5efe1a18de33..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/vendor/ -composer.lock diff --git a/vendor/willdurand/negotiation/.travis.yml b/vendor/willdurand/negotiation/.travis.yml deleted file mode 100644 index d4eacb7e3ffe15fa69cd9fcc3b0256a2e5fe7be6..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -sudo: false -language: php - -php: - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - hhvm - -matrix: - allow_failures: - - php: hhvm - -before_script: - - composer self-update - - composer install --prefer-dist --no-interaction - -script: phpunit --coverage-text diff --git a/vendor/willdurand/negotiation/CONTRIBUTING.md b/vendor/willdurand/negotiation/CONTRIBUTING.md deleted file mode 100644 index 3677a2cf095d6a0dff61d06c30013894c942a0d9..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/CONTRIBUTING.md +++ /dev/null @@ -1,33 +0,0 @@ -Contributing -============ - -First of all, **thank you** for contributing, **you are awesome**! - -Here are a few rules to follow in order to ease code reviews, and discussions before -maintainers accept and merge your work. - -You MUST follow the [PSR-1](http://www.php-fig.org/psr/1/) and -[PSR-2](http://www.php-fig.org/psr/2/). If you don't know about any of them, you -should really read the recommendations. Can't wait? Use the [PHP-CS-Fixer -tool](http://cs.sensiolabs.org/). - -You MUST run the test suite. - -You MUST write (or update) unit tests. - -You SHOULD write documentation. - -Please, write [commit messages that make -sense](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), -and [rebase your branch](http://git-scm.com/book/en/Git-Branching-Rebasing) -before submitting your Pull Request. - -One may ask you to [squash your -commits](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html) -too. This is used to "clean" your Pull Request before merging it (we don't want -commits such as `fix tests`, `fix 2`, `fix 3`, etc.). - -Also, while creating your Pull Request on GitHub, you MUST write a description -which gives the context and/or explains why you are creating it. - -Thank you! diff --git a/vendor/willdurand/negotiation/LICENSE b/vendor/willdurand/negotiation/LICENSE deleted file mode 100644 index 3546ac1b597ea629eb27376aeaf6e4cd661623e3..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) William Durand <will+git@drnd.me> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/willdurand/negotiation/README.md b/vendor/willdurand/negotiation/README.md deleted file mode 100644 index 1e7032fbbaa2cbde818b51c702f092caff602209..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/README.md +++ /dev/null @@ -1,162 +0,0 @@ -Negotiation -=========== - -[](http://travis-ci.org/willdurand/Negotiation) -[](https://ci.appveyor.com/project/willdurand/negotiation) -[](https://packagist.org/packages/willdurand/Negotiation) -[](https://packagist.org/packages/willdurand/Negotiation) - - -**Negotiation** is a standalone library without any dependencies that allows you -to implement [content -negotiation](https://tools.ietf.org/html/rfc7231#section-5.3) in your -application, whatever framework you use. This library is based on [RFC -7231](https://tools.ietf.org/html/rfc7231). Negotiation is easy to use, and -extensively unit tested! - -> **Important:** You are browsing the documentation of Negotiation **2.x**. -Documentation for version **1.x** is available here: [Negotiation 1.x -documentation](https://github.com/willdurand/Negotiation/blob/1.x/README.md#usage). -You might also be interested in this: [**What's new in Negotiation 2?**](https://github.com/willdurand/Negotiation/releases/tag/v2.0.0-alpha1) - - -Installation ------------- - -The recommended way to install Negotiation is through -[Composer](http://getcomposer.org/): - -```bash -$ composer require willdurand/negotiation -``` - - -Usage Examples --------------- - -### Media Type Negotiation - -``` php -$negotiator = new \Negotiation\Negotiator(); - -$acceptHeader = 'text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8'; -$priorities = array('text/html; charset=UTF-8', 'application/json', 'application/xml;q=0.5'); - -$mediaType = $negotiator->getBest($acceptHeader, $priorities); - -$value = $mediaType->getValue(); -// $value == 'text/html; charset=UTF-8' -``` - -The `Negotiator` returns an instance of `Accept`, or `null` if negotiating the -best media type has failed. - -### Language Negotiation - -``` php -<?php - -$negotiator = new \Negotiation\LanguageNegotiator(); - -$acceptLangageHeader = 'en; q=0.1, fr; q=0.4, fu; q=0.9, de; q=0.2'; -$priorities = array('de', 'fu', 'en'); - -$bestLanguage = $negotiator->getBest($acceptLangageHeader, $priorities); - -$type = $bestLanguage->getType(); -// $type == 'fu'; - -$quality = $bestLanguage->getQuality(); -// $quality == 0.9 -``` - -The `LanguageNegotiator` returns an instance of `AcceptLanguage`. - -### Encoding Negotiation - -``` php -<?php - -$negotiator = new \Negotiation\EncodingNegotiator(); -$encoding = $negotiator->getBest($acceptHeader, $priorities); -``` - -The `EncodingNegotiator` returns an instance of `AcceptEncoding`. - -### Charset Negotiation - -``` php -<?php - -$negotiator = new \Negotiation\CharsetNegotiator(); - -$acceptCharsetHeader = 'ISO-8859-1, UTF-8; q=0.9'; -$priorities = array('iso-8859-1;q=0.3', 'utf-8;q=0.9', 'utf-16;q=1.0'); - -$bestCharset = $negotiator->getBest($acceptCharsetHeader, $priorities); - -$type = $bestCharset->getType(); -// $type == 'utf-8'; - -$quality = $bestCharset->getQuality(); -// $quality == 0.81 -``` - -The `CharsetNegotiator` returns an instance of `AcceptCharset`. - -### `Accept*` Classes - -`Accept` and `Accept*` classes share common methods such as: - -* `getValue()` returns the accept value (e.g. `text/html; z=y; a=b; c=d`) -* `getNormalizedValue()` returns the value with parameters sorted (e.g. - `text/html; a=b; c=d; z=y`) -* `getQuality()` returns the quality if available (`q` parameter) -* `getType()` returns the accept type (e.g. `text/html`) -* `getParameters()` returns the set of parameters (excluding the `q` parameter - if provided) -* `getParameter()` allows to retrieve a given parameter by its name. Fallback to - a `$default` (nullable) value otherwise. -* `hasParameter()` indicates whether a parameter exists. - - -Unit Tests ----------- - -Setup the test suite using Composer: - - $ composer install --dev - -Run it using PHPUnit: - - $ phpunit - - -Contributing ------------- - -See [CONTRIBUTING](CONTRIBUTING.md) file. - - -Credits -------- - -* Some parts of this library are inspired by: - - * [Symfony](http://github.com/symfony/symfony) framework; - * [FOSRest](http://github.com/FriendsOfSymfony/FOSRest); - * [PEAR HTTP2](https://github.com/pear/HTTP2). - -* William Durand <will+git@drnd.me> -* [@neural-wetware](https://github.com/neural-wetware) - - -License -------- - -Negotiation is released under the MIT License. See the bundled LICENSE file for -details. diff --git a/vendor/willdurand/negotiation/appveyor.yml b/vendor/willdurand/negotiation/appveyor.yml deleted file mode 100644 index 7280bcce5f6941837dd00d889b1c04f020a0cc3f..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/appveyor.yml +++ /dev/null @@ -1,30 +0,0 @@ -build: false -shallow_clone: true -platform: x86 -clone_folder: c:\projects\willdurand\negotiation - -cache: - - '%LOCALAPPDATA%\Composer\files' - -init: - - SET PATH=C:\Program Files\OpenSSL;c:\tools\php;c:\tools\php71;%PATH% - -install: - - ps: Set-Service wuauserv -StartupType Manual - - cinst -y OpenSSL.Light - - cinst -y php - - cd c:\tools\php71 - - copy php.ini-production php.ini /Y - - echo date.timezone="UTC" >> php.ini - - echo extension_dir=ext >> php.ini - - echo extension=php_openssl.dll >> php.ini - - echo extension=php_mbstring.dll >> php.ini - - echo extension=php_fileinfo.dll >> php.ini - - echo memory_limit=1G >> php.ini - - cd c:\projects\willdurand\negotiation - - php -r "readfile('http://getcomposer.org/installer');" | php - - php composer.phar update --no-interaction --no-progress - -test_script: - - cd c:\projects\willdurand\negotiation - - vendor\bin\phpunit.bat --verbose diff --git a/vendor/willdurand/negotiation/composer.json b/vendor/willdurand/negotiation/composer.json deleted file mode 100644 index 6418b4181a93be616ff438167316d2723c87cbd9..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "willdurand/negotiation", - "description": "Content Negotiation tools for PHP provided as a standalone library.", - "keywords": [ "content", "negotiation", "format", "accept", "header" ], - "license": "MIT", - "homepage": "http://williamdurand.fr/Negotiation/", - "authors": [ - { - "name": "William Durand", - "email": "will+git@drnd.me" - } - ], - "require": { - "php": ">=5.4.0" - }, - "autoload": { - "psr-4": { "Negotiation\\": "src/Negotiation" } - }, - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "require-dev": { - "phpunit/phpunit": "~4.5" - } -} diff --git a/vendor/willdurand/negotiation/phpunit.xml.dist b/vendor/willdurand/negotiation/phpunit.xml.dist deleted file mode 100644 index ac6f0f92e739ee7093b59b6a6873e2eee7a4d530..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/phpunit.xml.dist +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<phpunit backupGlobals="false" - backupStaticAttributes="false" - colors="true" - convertErrorsToExceptions="true" - convertNoticesToExceptions="true" - convertWarningsToExceptions="true" - processIsolation="false" - stopOnFailure="false" - syntaxCheck="false" - bootstrap="tests/bootstrap.php" - > - <testsuites> - <testsuite name="Negotiation Test Suite"> - <directory>./tests/</directory> - </testsuite> - </testsuites> - <filter> - <whitelist> - <directory>./src/Negotiation/</directory> - </whitelist> - </filter> -</phpunit> diff --git a/vendor/willdurand/negotiation/src/Negotiation/AbstractNegotiator.php b/vendor/willdurand/negotiation/src/Negotiation/AbstractNegotiator.php deleted file mode 100644 index 2cd839e53a7d2630292465b240d501affe9589cc..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/AbstractNegotiator.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php - -namespace Negotiation; - -use Negotiation\Exception\InvalidArgument; -use Negotiation\Exception\InvalidHeader; - -abstract class AbstractNegotiator -{ - /** - * @param string $header A string containing an `Accept|Accept-*` header. - * @param array $priorities A set of server priorities. - * - * @return AcceptHeader|null best matching type - */ - public function getBest($header, array $priorities) - { - if (empty($priorities)) { - throw new InvalidArgument('A set of server priorities should be given.'); - } - - if (!$header) { - throw new InvalidArgument('The header string should not be empty.'); - } - - // Once upon a time, two `array_map` calls were sitting there, but for - // some reasons, they triggered `E_WARNING` time to time (because of - // PHP bug [55416](https://bugs.php.net/bug.php?id=55416). Now, they - // are gone. - // See: https://github.com/willdurand/Negotiation/issues/81 - $acceptedHeaders = array(); - foreach ($this->parseHeader($header) as $h) { - try { - $acceptedHeaders[] = $this->acceptFactory($h); - } catch (Exception\Exception $e) { - // silently skip in case of invalid headers coming in from a client - } - } - $acceptedPriorities = array(); - foreach ($priorities as $p) { - $acceptedPriorities[] = $this->acceptFactory($p); - } - $matches = $this->findMatches($acceptedHeaders, $acceptedPriorities); - $specificMatches = array_reduce($matches, 'Negotiation\Match::reduce', []); - - usort($specificMatches, 'Negotiation\Match::compare'); - - $match = array_shift($specificMatches); - - return null === $match ? null : $acceptedPriorities[$match->index]; - } - - /** - * @param string $header accept header part or server priority - * - * @return AcceptHeader Parsed header object - */ - abstract protected function acceptFactory($header); - - /** - * @param AcceptHeader $header - * @param AcceptHeader $priority - * @param integer $index - * - * @return Match|null Headers matched - */ - protected function match(AcceptHeader $header, AcceptHeader $priority, $index) - { - $ac = $header->getType(); - $pc = $priority->getType(); - - $equal = !strcasecmp($ac, $pc); - - if ($equal || $ac === '*') { - $score = 1 * $equal; - - return new Match($header->getQuality() * $priority->getQuality(), $score, $index); - } - - return null; - } - - /** - * @param string $header A string that contains an `Accept*` header. - * - * @return AcceptHeader[] - */ - private function parseHeader($header) - { - $res = preg_match_all('/(?:[^,"]*+(?:"[^"]*+")?)+[^,"]*+/', $header, $matches); - - if (!$res) { - throw new InvalidHeader(sprintf('Failed to parse accept header: "%s"', $header)); - } - - return array_values(array_filter(array_map('trim', $matches[0]))); - } - - /** - * @param AcceptHeader[] $headerParts - * @param Priority[] $priorities Configured priorities - * - * @return Match[] Headers matched - */ - private function findMatches(array $headerParts, array $priorities) - { - $matches = []; - foreach ($priorities as $index => $p) { - foreach ($headerParts as $h) { - if (null !== $match = $this->match($h, $p, $index)) { - $matches[] = $match; - } - } - } - - return $matches; - } -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/Accept.php b/vendor/willdurand/negotiation/src/Negotiation/Accept.php deleted file mode 100644 index 281ae27d76160bcb2103a2809ef5f0d7624eed7b..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/Accept.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -namespace Negotiation; - -use Negotiation\Exception\InvalidMediaType; - -final class Accept extends BaseAccept implements AcceptHeader -{ - private $basePart; - - private $subPart; - - public function __construct($value) - { - parent::__construct($value); - - if ($this->type === '*') { - $this->type = '*/*'; - } - - $parts = explode('/', $this->type); - - if (count($parts) !== 2 || !$parts[0] || !$parts[1]) { - throw new InvalidMediaType(); - } - - $this->basePart = $parts[0]; - $this->subPart = $parts[1]; - } - - /** - * @return string - */ - public function getSubPart() - { - return $this->subPart; - } - - /** - * @return string - */ - public function getBasePart() - { - return $this->basePart; - } -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/AcceptCharset.php b/vendor/willdurand/negotiation/src/Negotiation/AcceptCharset.php deleted file mode 100644 index 7ce34908e34f3bc4628622595513772307526513..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/AcceptCharset.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -namespace Negotiation; - -final class AcceptCharset extends BaseAccept implements AcceptHeader -{ -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/AcceptEncoding.php b/vendor/willdurand/negotiation/src/Negotiation/AcceptEncoding.php deleted file mode 100644 index 8165a7f8505df023927132ac8d940414d622d9fc..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/AcceptEncoding.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -namespace Negotiation; - -final class AcceptEncoding extends BaseAccept implements AcceptHeader -{ -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/AcceptHeader.php b/vendor/willdurand/negotiation/src/Negotiation/AcceptHeader.php deleted file mode 100644 index 3f5f8c5798a68520f4ac1937fa546506400b1648..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/AcceptHeader.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -namespace Negotiation; - -interface AcceptHeader -{ -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/AcceptLanguage.php b/vendor/willdurand/negotiation/src/Negotiation/AcceptLanguage.php deleted file mode 100644 index ad1c0323631206c33892d588d0e4e794c1f32534..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/AcceptLanguage.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php - -namespace Negotiation; - -use Negotiation\Exception\InvalidLanguage; - -final class AcceptLanguage extends BaseAccept implements AcceptHeader -{ - private $language; - private $script; - private $region; - - public function __construct($value) - { - parent::__construct($value); - - $parts = explode('-', $this->type); - - if (2 === count($parts)) { - $this->language = $parts[0]; - $this->region = $parts[1]; - } elseif (1 === count($parts)) { - $this->language = $parts[0]; - } elseif (3 === count($parts)) { - $this->language = $parts[0]; - $this->script = $parts[1]; - $this->region = $parts[2]; - } else { - // TODO: this part is never reached... - throw new InvalidLanguage(); - } - } - - /** - * @return string - */ - public function getSubPart() - { - return $this->region; - } - - /** - * @return string - */ - public function getBasePart() - { - return $this->language; - } -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/BaseAccept.php b/vendor/willdurand/negotiation/src/Negotiation/BaseAccept.php deleted file mode 100644 index 3c584479c48c34b1c35661cfbae8d2dcf4bca63c..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/BaseAccept.php +++ /dev/null @@ -1,154 +0,0 @@ -<?php - -namespace Negotiation; - -abstract class BaseAccept -{ - /** - * @var float - */ - private $quality = 1.0; - - /** - * @var string - */ - private $normalized; - - /** - * @var string - */ - private $value; - - /** - * @var array - */ - private $parameters; - - /** - * @var string - */ - protected $type; - - /** - * @param string $value - */ - public function __construct($value) - { - list($type, $parameters) = $this->parseParameters($value); - - if (isset($parameters['q'])) { - $this->quality = (float) $parameters['q']; - unset($parameters['q']); - } - - $type = trim(strtolower($type)); - - $this->value = $value; - $this->normalized = $type . ($parameters ? "; " . $this->buildParametersString($parameters) : ''); - $this->type = $type; - $this->parameters = $parameters; - } - - /** - * @return string - */ - public function getNormalizedValue() - { - return $this->normalized; - } - - /** - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * @return float - */ - public function getQuality() - { - return $this->quality; - } - - /** - * @return array - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * @param string $key - * @param mixed $default - * - * @return string|null - */ - public function getParameter($key, $default = null) - { - return isset($this->parameters[$key]) ? $this->parameters[$key] : $default; - } - - /** - * @param string $key - * - * @return boolean - */ - public function hasParameter($key) - { - return isset($this->parameters[$key]); - } - - /** - * - * @param string $acceptPart - * @return array - */ - private function parseParameters($acceptPart) - { - $parts = explode(';', $acceptPart); - $type = array_shift($parts); - - $parameters = []; - foreach ($parts as $part) { - $part = explode('=', $part); - - if (2 !== count($part)) { - continue; // TODO: throw exception here? - } - - $key = strtolower(trim($part[0])); // TODO: technically not allowed space around "=". throw exception? - $parameters[$key] = trim($part[1], ' "'); - } - - return [ $type, $parameters ]; - } - - /** - * @param string $parameters - * - * @return string - */ - private function buildParametersString($parameters) - { - $parts = []; - - ksort($parameters); - foreach ($parameters as $key => $val) { - $parts[] = sprintf('%s=%s', $key, $val); - } - - return implode('; ', $parts); - } -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/CharsetNegotiator.php b/vendor/willdurand/negotiation/src/Negotiation/CharsetNegotiator.php deleted file mode 100644 index c1f9a4b66da37cd0d6499922e2a33fac8287410b..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/CharsetNegotiator.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -namespace Negotiation; - -class CharsetNegotiator extends AbstractNegotiator -{ - /** - * {@inheritdoc} - */ - protected function acceptFactory($accept) - { - return new AcceptCharset($accept); - } -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/EncodingNegotiator.php b/vendor/willdurand/negotiation/src/Negotiation/EncodingNegotiator.php deleted file mode 100644 index 6b97fb738a106460b76e94b57e614c955ad077db..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/EncodingNegotiator.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -namespace Negotiation; - -class EncodingNegotiator extends AbstractNegotiator -{ - /** - * {@inheritdoc} - */ - protected function acceptFactory($accept) - { - return new AcceptEncoding($accept); - } -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/Exception/Exception.php b/vendor/willdurand/negotiation/src/Negotiation/Exception/Exception.php deleted file mode 100644 index aca5d784a352a82eedcb1d221948a53c7d2ac6ee..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/Exception/Exception.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -namespace Negotiation\Exception; - -interface Exception -{ -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/Exception/InvalidArgument.php b/vendor/willdurand/negotiation/src/Negotiation/Exception/InvalidArgument.php deleted file mode 100644 index c84e7e486f723cd261246bcff7c32b0433f054c9..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/Exception/InvalidArgument.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -namespace Negotiation\Exception; - -class InvalidArgument extends \InvalidArgumentException implements Exception -{ -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/Exception/InvalidHeader.php b/vendor/willdurand/negotiation/src/Negotiation/Exception/InvalidHeader.php deleted file mode 100644 index eed3efe82866e0f52157660a57a9ea3a303dcfa1..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/Exception/InvalidHeader.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -namespace Negotiation\Exception; - -class InvalidHeader extends \RuntimeException implements Exception -{ -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/Exception/InvalidLanguage.php b/vendor/willdurand/negotiation/src/Negotiation/Exception/InvalidLanguage.php deleted file mode 100644 index 2285a7144f3c88968e345f3680b72483c04f238e..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/Exception/InvalidLanguage.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -namespace Negotiation\Exception; - -class InvalidLanguage extends \RuntimeException implements Exception -{ -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/Exception/InvalidMediaType.php b/vendor/willdurand/negotiation/src/Negotiation/Exception/InvalidMediaType.php deleted file mode 100644 index 6c6a4799712d1781ae19ab8d6871a334a0be2e7f..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/Exception/InvalidMediaType.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -namespace Negotiation\Exception; - -class InvalidMediaType extends \RuntimeException implements Exception -{ -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/LanguageNegotiator.php b/vendor/willdurand/negotiation/src/Negotiation/LanguageNegotiator.php deleted file mode 100644 index ac938140377498a803a30dd7a5fb9dabde51a252..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/LanguageNegotiator.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -namespace Negotiation; - -class LanguageNegotiator extends AbstractNegotiator -{ - /** - * {@inheritdoc} - */ - protected function acceptFactory($accept) - { - return new AcceptLanguage($accept); - } - - /** - * {@inheritdoc} - */ - protected function match(AcceptHeader $acceptLanguage, AcceptHeader $priority, $index) - { - if (!$acceptLanguage instanceof AcceptLanguage || !$priority instanceof AcceptLanguage) { - return null; - } - - $ab = $acceptLanguage->getBasePart(); - $pb = $priority->getBasePart(); - - $as = $acceptLanguage->getSubPart(); - $ps = $priority->getSubPart(); - - $baseEqual = !strcasecmp($ab, $pb); - $subEqual = !strcasecmp($as, $ps); - - if (($ab == '*' || $baseEqual) && ($as === null || $subEqual)) { - $score = 10 * $baseEqual + $subEqual; - - return new Match($acceptLanguage->getQuality() * $priority->getQuality(), $score, $index); - } - - return null; - } -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/Match.php b/vendor/willdurand/negotiation/src/Negotiation/Match.php deleted file mode 100644 index 5b0e014e2d0df8b3bbbc9c6e232075c5a3118535..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/Match.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -namespace Negotiation; - -final class Match -{ - /** - * @var float - */ - public $quality; - - /** - * @var int - */ - public $score; - - /** - * @var int - */ - public $index; - - public function __construct($quality, $score, $index) - { - $this->quality = $quality; - $this->score = $score; - $this->index = $index; - } - - /** - * @param Match $a - * @param Match $b - * - * @return int - */ - public static function compare(Match $a, Match $b) - { - if ($a->quality !== $b->quality) { - return $a->quality > $b->quality ? -1 : 1; - } - - if ($a->index !== $b->index) { - return $a->index > $b->index ? 1 : -1; - } - - return 0; - } - - /** - * @param array $carry reduced array - * @param Match $match match to be reduced - * - * @return Match[] - */ - public static function reduce(array $carry, Match $match) - { - if (!isset($carry[$match->index]) || $carry[$match->index]->score < $match->score) { - $carry[$match->index] = $match; - } - - return $carry; - } -} diff --git a/vendor/willdurand/negotiation/src/Negotiation/Negotiator.php b/vendor/willdurand/negotiation/src/Negotiation/Negotiator.php deleted file mode 100644 index d083fa1e0e45372d991215b052b51c02e439899f..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/src/Negotiation/Negotiator.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php - -namespace Negotiation; - -class Negotiator extends AbstractNegotiator -{ - /** - * {@inheritdoc} - */ - protected function acceptFactory($accept) - { - return new Accept($accept); - } - - /** - * {@inheritdoc} - */ - protected function match(AcceptHeader $accept, AcceptHeader $priority, $index) - { - if (!$accept instanceof Accept || !$priority instanceof Accept) { - return null; - } - - $acceptBase = $accept->getBasePart(); - $priorityBase = $priority->getBasePart(); - - $acceptSub = $accept->getSubPart(); - $prioritySub = $priority->getSubPart(); - - $intersection = array_intersect_assoc($accept->getParameters(), $priority->getParameters()); - - $baseEqual = !strcasecmp($acceptBase, $priorityBase); - $subEqual = !strcasecmp($acceptSub, $prioritySub); - - if (($acceptBase === '*' || $baseEqual) - && ($acceptSub === '*' || $subEqual) - && count($intersection) === count($accept->getParameters()) - ) { - $score = 100 * $baseEqual + 10 * $subEqual + count($intersection); - - return new Match($accept->getQuality() * $priority->getQuality(), $score, $index); - } - - if (!strstr($acceptSub, '+') || !strstr($prioritySub, '+')) { - return null; - } - - // Handle "+" segment wildcards - list($acceptSub, $acceptPlus) = $this->splitSubPart($acceptSub); - list($prioritySub, $priorityPlus) = $this->splitSubPart($prioritySub); - - // If no wildcards in either the subtype or + segment, do nothing. - if (!($acceptBase === '*' || $baseEqual) - || !($acceptSub === '*' || $prioritySub === '*' || $acceptPlus === '*' || $priorityPlus === '*') - ) { - return null; - } - - $subEqual = !strcasecmp($acceptSub, $prioritySub); - $plusEqual = !strcasecmp($acceptPlus, $priorityPlus); - - if (($acceptSub === '*' || $prioritySub === '*' || $subEqual) - && ($acceptPlus === '*' || $priorityPlus === '*' || $plusEqual) - && count($intersection) === count($accept->getParameters()) - ) { - $score = 100 * $baseEqual + 10 * $subEqual + $plusEqual + count($intersection); - - return new Match($accept->getQuality() * $priority->getQuality(), $score, $index); - } - - return null; - } - - /** - * Split a subpart into the subpart and "plus" part. - * - * For media-types of the form "application/vnd.example+json", matching - * should allow wildcards for either the portion before the "+" or - * after. This method splits the subpart to allow such matching. - */ - protected function splitSubPart($subPart) - { - if (!strstr($subPart, '+')) { - return [$subPart, '']; - } - - return explode('+', $subPart, 2); - } -} diff --git a/vendor/willdurand/negotiation/tests/Negotiation/Tests/AcceptLanguageTest.php b/vendor/willdurand/negotiation/tests/Negotiation/Tests/AcceptLanguageTest.php deleted file mode 100644 index bc8ab2489cc60e9477a8411ab397f2ca33572bd2..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/tests/Negotiation/Tests/AcceptLanguageTest.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -namespace Negotiation\Tests; - -use Negotiation\AcceptLanguage; - -class AcceptLanguageTest extends TestCase -{ - - /** - * @dataProvider dataProviderForGetType - */ - public function testGetType($header, $expected) - { - $accept = new AcceptLanguage($header); - $actual = $accept->getType(); - $this->assertEquals($expected, $actual); - } - - public static function dataProviderForGetType() - { - return array( - array('en;q=0.7', 'en'), - array('en-GB;q=0.8', 'en-gb'), - array('da', 'da'), - array('en-gb;q=0.8', 'en-gb'), - array('es;q=0.7', 'es'), - array('fr ; q= 0.1', 'fr'), - array('', null), - array(null, null), - ); - } - - /** - * @dataProvider dataProviderForGetValue - */ - public function testGetValue($header, $expected) - { - $accept = new AcceptLanguage($header); - $actual = $accept->getValue(); - $this->assertEquals($expected, $actual); - - } - - public static function dataProviderForGetValue() - { - return array( - array('en;q=0.7', 'en;q=0.7'), - array('en-GB;q=0.8', 'en-GB;q=0.8'), - ); - } -} diff --git a/vendor/willdurand/negotiation/tests/Negotiation/Tests/AcceptTest.php b/vendor/willdurand/negotiation/tests/Negotiation/Tests/AcceptTest.php deleted file mode 100644 index f76219e858c3517dd3e0ffedb338c2b827b4d89e..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/tests/Negotiation/Tests/AcceptTest.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php - -namespace Negotiation\Tests; - -use Negotiation\Accept; - -class AcceptTest extends TestCase -{ - public function testGetParameter() - { - $accept = new Accept('foo/bar; q=1; hello=world'); - - $this->assertTrue($accept->hasParameter('hello')); - $this->assertEquals('world', $accept->getParameter('hello')); - $this->assertFalse($accept->hasParameter('unknown')); - $this->assertNull($accept->getParameter('unknown')); - $this->assertFalse($accept->getParameter('unknown', false)); - $this->assertSame('world', $accept->getParameter('hello', 'goodbye')); - } - - /** - * @dataProvider dataProviderForTestGetNormalizedValue - */ - public function testGetNormalizedValue($header, $expected) - { - $accept = new Accept($header); - $actual = $accept->getNormalizedValue(); - $this->assertEquals($expected, $actual); - } - - public static function dataProviderForTestGetNormalizedValue() - { - return array( - array('text/html; z=y; a=b; c=d', 'text/html; a=b; c=d; z=y'), - array('application/pdf; q=1; param=p', 'application/pdf; param=p') - ); - } - - /** - * @dataProvider dataProviderForGetType - */ - public function testGetType($header, $expected) - { - $accept = new Accept($header); - $actual = $accept->getType(); - $this->assertEquals($expected, $actual); - } - - public static function dataProviderForGetType() - { - return array( - array('text/html;hello=world', 'text/html'), - array('application/pdf', 'application/pdf'), - array('application/xhtml+xml;q=0.9', 'application/xhtml+xml'), - array('text/plain; q=0.5', 'text/plain'), - array('text/html;level=2;q=0.4', 'text/html'), - array('text/html ; level = 2 ; q = 0.4', 'text/html'), - array('text/*', 'text/*'), - array('text/* ;q=1 ;level=2', 'text/*'), - array('*/*', '*/*'), - array('*', '*/*'), - array('*/* ; param=555', '*/*'), - array('* ; param=555', '*/*'), - array('TEXT/hTmL;leVel=2; Q=0.4', 'text/html'), - ); - } - - /** - * @dataProvider dataProviderForGetValue - */ - public function testGetValue($header, $expected) - { - $accept = new Accept($header); - $actual = $accept->getValue(); - $this->assertEquals($expected, $actual); - - } - - public static function dataProviderForGetValue() - { - return array( - array('text/html;hello=world ;q=0.5', 'text/html;hello=world ;q=0.5'), - array('application/pdf', 'application/pdf'), - ); - } -} diff --git a/vendor/willdurand/negotiation/tests/Negotiation/Tests/BaseAcceptTest.php b/vendor/willdurand/negotiation/tests/Negotiation/Tests/BaseAcceptTest.php deleted file mode 100644 index 3fcf1f98614fbcd2885512ed946d7212481921af..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/tests/Negotiation/Tests/BaseAcceptTest.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php - -namespace Negotiation\Tests; - -use Negotiation\BaseAccept; - -class BaseAcceptTest extends TestCase -{ - /** - * @dataProvider dataProviderForParseParameters - */ - public function testParseParameters($value, $expected) - { - $accept = new DummyAccept($value); - $parameters = $accept->getParameters(); - - // TODO: hack-ish... this is needed because logic in BaseAccept - //constructor drops the quality from the parameter set. - if (false !== strpos($value, 'q')) { - $parameters['q'] = $accept->getQuality(); - } - - $this->assertCount(count($expected), $parameters); - - foreach ($expected as $key => $value) { - $this->assertArrayHasKey($key, $parameters); - $this->assertEquals($value, $parameters[$key]); - } - } - - public static function dataProviderForParseParameters() - { - return array( - array( - 'application/json ;q=1.0; level=2;foo= bar', - array( - 'q' => 1.0, - 'level' => 2, - 'foo' => 'bar', - ), - ), - array( - 'application/json ;q = 1.0; level = 2; FOO = bAr', - array( - 'q' => 1.0, - 'level' => 2, - 'foo' => 'bAr', - ), - ), - array( - 'application/json;q=1.0', - array( - 'q' => 1.0, - ), - ), - array( - 'application/json;foo', - array(), - ), - ); - } - - /** - * @dataProvider dataProviderBuildParametersString - */ - - public function testBuildParametersString($value, $expected) - { - $accept = new DummyAccept($value); - - $this->assertEquals($expected, $accept->getNormalizedValue()); - } - - public static function dataProviderBuildParametersString() - { - return array( - array('media/type; xxx = 1.0;level=2;foo=bar', 'media/type; foo=bar; level=2; xxx=1.0'), - ); - } -} - -class DummyAccept extends BaseAccept -{ -} diff --git a/vendor/willdurand/negotiation/tests/Negotiation/Tests/CharsetNegotiatorTest.php b/vendor/willdurand/negotiation/tests/Negotiation/Tests/CharsetNegotiatorTest.php deleted file mode 100644 index 832a067c0a4cc6c76f35918efbc6f9dbeb147133..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/tests/Negotiation/Tests/CharsetNegotiatorTest.php +++ /dev/null @@ -1,121 +0,0 @@ -<?php - -namespace Negotiation\Tests; - -use Negotiation\CharsetNegotiator; - -class CharsetNegotiatorTest extends TestCase -{ - - /** - * @var CharsetNegotiator - */ - private $negotiator; - - protected function setUp() - { - $this->negotiator = new CharsetNegotiator(); - } - - public function testGetBestReturnsNullWithUnmatchedHeader() - { - $this->assertNull($this->negotiator->getBest('foo, bar, yo', array('baz'))); - } - - /** - * 'bu' has the highest quality rating, but is non-existent, - * so we expect the next highest rated 'fr' content to be returned. - * - * See: http://svn.apache.org/repos/asf/httpd/test/framework/trunk/t/modules/negotiation.t - */ - public function testGetBestIgnoresNonExistentContent() - { - $acceptCharset = 'en; q=0.1, fr; q=0.4, bu; q=1.0'; - $accept = $this->negotiator->getBest($acceptCharset, array('en', 'fr')); - - $this->assertInstanceOf('Negotiation\AcceptCharset', $accept); - $this->assertEquals('fr', $accept->getValue()); - } - - /** - * @dataProvider dataProviderForTestGetBest - */ - public function testGetBest($accept, $priorities, $expected) - { - if (is_null($expected)) - $this->setExpectedException('Negotiation\Exception\InvalidArgument'); - - $accept = $this->negotiator->getBest($accept, $priorities); - if (null === $accept) { - $this->assertNull($expected); - } else { - $this->assertInstanceOf('Negotiation\AcceptCharset', $accept); - $this->assertSame($expected, $accept->getValue()); - } - } - - public static function dataProviderForTestGetBest() - { - $pearCharset = 'ISO-8859-1, Big5;q=0.6,utf-8;q=0.7, *;q=0.5'; - $pearCharset2 = 'ISO-8859-1, Big5;q=0.6,utf-8;q=0.7'; - - return array( - array($pearCharset, array( 'utf-8', 'big5', 'iso-8859-1', 'shift-jis',), 'iso-8859-1'), - array($pearCharset, array( 'utf-8', 'big5', 'shift-jis',), 'utf-8'), - array($pearCharset, array( 'Big5', 'shift-jis',), 'Big5'), - array($pearCharset, array( 'shift-jis',), 'shift-jis'), - array($pearCharset2, array( 'utf-8', 'big5', 'iso-8859-1', 'shift-jis',), 'iso-8859-1'), - array($pearCharset2, array( 'utf-8', 'big5', 'shift-jis',), 'utf-8'), - array($pearCharset2, array( 'Big5', 'shift-jis',), 'Big5'), - array('utf-8;q=0.6,iso-8859-5;q=0.9', array( 'iso-8859-5', 'utf-8',), 'iso-8859-5'), - array('', array( 'iso-8859-5', 'utf-8',), null), - array('en, *;q=0.9', array('fr'), 'fr'), - # Quality of source factors - array($pearCharset, array('iso-8859-1;q=0.5', 'utf-8', 'utf-16;q=1.0'), 'utf-8'), - array($pearCharset, array('iso-8859-1;q=0.8', 'utf-8', 'utf-16;q=1.0'), 'iso-8859-1;q=0.8'), - ); - } - - public function testGetBestRespectsPriorities() - { - $accept = $this->negotiator->getBest('foo, bar, yo', array('yo')); - - $this->assertInstanceOf('Negotiation\AcceptCharset', $accept); - $this->assertEquals('yo', $accept->getValue()); - } - - public function testGetBestDoesNotMatchPriorities() - { - $acceptCharset = 'en, de'; - $priorities = array('fr'); - - $this->assertNull($this->negotiator->getBest($acceptCharset, $priorities)); - } - - public function testGetBestRespectsQualityOfSource() - { - $accept = $this->negotiator->getBest('utf-8;q=0.5,iso-8859-1', array('iso-8859-1;q=0.3', 'utf-8;q=0.9', 'utf-16;q=1.0')); - $this->assertInstanceOf('Negotiation\AcceptCharset', $accept); - $this->assertEquals('utf-8', $accept->getType()); - } - - /** - * @dataProvider dataProviderForTestParseHeader - */ - public function testParseHeader($header, $expected) - { - $accepts = $this->call_private_method('Negotiation\CharsetNegotiator', 'parseHeader', $this->negotiator, array($header)); - - $this->assertSame($expected, $accepts); - } - - public static function dataProviderForTestParseHeader() - { - return array( - array('*;q=0.3,ISO-8859-1,utf-8;q=0.7', array('*;q=0.3', 'ISO-8859-1', 'utf-8;q=0.7')), - array('*;q=0.3,ISO-8859-1;q=0.7,utf-8;q=0.7', array('*;q=0.3', 'ISO-8859-1;q=0.7', 'utf-8;q=0.7')), - array('*;q=0.3,utf-8;q=0.7,ISO-8859-1;q=0.7', array('*;q=0.3', 'utf-8;q=0.7', 'ISO-8859-1;q=0.7')), - array('iso-8859-5, unicode-1-1;q=0.8', array('iso-8859-5', 'unicode-1-1;q=0.8')), - ); - } -} diff --git a/vendor/willdurand/negotiation/tests/Negotiation/Tests/EncodingNegotiatorTest.php b/vendor/willdurand/negotiation/tests/Negotiation/Tests/EncodingNegotiatorTest.php deleted file mode 100644 index 3a2a2c994eaac57f21d97010990780158f25f802..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/tests/Negotiation/Tests/EncodingNegotiatorTest.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -namespace Negotiation\Tests; - -use Negotiation\EncodingNegotiator; - -class EncodingNegotiatorTest extends TestCase -{ - - /** - * @var EncodingNegotiator - */ - private $negotiator; - - protected function setUp() - { - $this->negotiator = new EncodingNegotiator(); - } - - public function testGetBestReturnsNullWithUnmatchedHeader() - { - $this->assertNull($this->negotiator->getBest('foo, bar, yo', array('baz'))); - } - - /** - * @dataProvider dataProviderForTestGetBest - */ - public function testGetBest($accept, $priorities, $expected) - { - $accept = $this->negotiator->getBest($accept, $priorities); - - if (null === $accept) { - $this->assertNull($expected); - } else { - $this->assertInstanceOf('Negotiation\AcceptEncoding', $accept); - $this->assertEquals($expected, $accept->getValue()); - } - } - - public static function dataProviderForTestGetBest() - { - return array( - array('gzip;q=1.0, identity; q=0.5, *;q=0', array('identity'), 'identity'), - array('gzip;q=0.5, identity; q=0.5, *;q=0.7', array('bzip', 'foo'), 'bzip'), - array('gzip;q=0.7, identity; q=0.5, *;q=0.7', array('gzip', 'foo'), 'gzip'), - # Quality of source factors - array('gzip;q=0.7,identity', array('identity;q=0.5', 'gzip;q=0.9'), 'gzip;q=0.9'), - ); - } - - public function testGetBestRespectsQualityOfSource() - { - $accept = $this->negotiator->getBest('gzip;q=0.7,identity', array('identity;q=0.5', 'gzip;q=0.9')); - $this->assertInstanceOf('Negotiation\AcceptEncoding', $accept); - $this->assertEquals('gzip', $accept->getType()); - } - - /** - * @dataProvider dataProviderForTestParseAcceptHeader - */ - public function testParseAcceptHeader($header, $expected) - { - $accepts = $this->call_private_method('Negotiation\Negotiator', 'parseHeader', $this->negotiator, array($header)); - - $this->assertSame($expected, $accepts); - } - - public static function dataProviderForTestParseAcceptHeader() - { - return array( - array('gzip,deflate,sdch', array('gzip', 'deflate', 'sdch')), - array("gzip, deflate\t,sdch", array('gzip', 'deflate', 'sdch')), - array('gzip;q=1.0, identity; q=0.5, *;q=0', array('gzip;q=1.0', 'identity; q=0.5', '*;q=0')), - ); - } -} diff --git a/vendor/willdurand/negotiation/tests/Negotiation/Tests/LanguageNegotiatorTest.php b/vendor/willdurand/negotiation/tests/Negotiation/Tests/LanguageNegotiatorTest.php deleted file mode 100644 index d11f3dcbec0598c5af93a5cfdcfdc24183c80991..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/tests/Negotiation/Tests/LanguageNegotiatorTest.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php - -namespace Negotiation\Tests; - -use Negotiation\Exception\InvalidArgument; -use Negotiation\LanguageNegotiator; - -class LanguageNegotiatorTest extends TestCase -{ - - /** - * @var LanguageNegotiator - */ - private $negotiator; - - protected function setUp() - { - $this->negotiator = new LanguageNegotiator(); - } - - /** - * @dataProvider dataProviderForTestGetBest - */ - public function testGetBest($accept, $priorities, $expected) - { - try { - $accept = $this->negotiator->getBest($accept, $priorities); - - if (null === $accept) { - $this->assertNull($expected); - } else { - $this->assertInstanceOf('Negotiation\AcceptLanguage', $accept); - $this->assertEquals($expected, $accept->getValue()); - } - } catch (\Exception $e) { - $this->assertEquals($expected, $e); - } - } - - public static function dataProviderForTestGetBest() - { - return array( - array('en, de', array('fr'), null), - array('foo, bar, yo', array('baz', 'biz'), null), - array('fr-FR, en;q=0.8', array('en-US', 'de-DE'), 'en-US'), - array('en, *;q=0.9', array('fr'), 'fr'), - array('foo, bar, yo', array('yo'), 'yo'), - array('en; q=0.1, fr; q=0.4, bu; q=1.0', array('en', 'fr'), 'fr'), - array('en; q=0.1, fr; q=0.4, fu; q=0.9, de; q=0.2', array('en', 'fu'), 'fu'), - array('', array('en', 'fu'), new InvalidArgument('The header string should not be empty.')), - array('fr, zh-Hans-CN;q=0.3', array('fr'), 'fr'), - # Quality of source factors - array('en;q=0.5,de', array('de;q=0.3', 'en;q=0.9'), 'en;q=0.9'), - ); - } - - public function testGetBestRespectsQualityOfSource() - { - $accept = $this->negotiator->getBest('en;q=0.5,de', array('de;q=0.3', 'en;q=0.9')); - $this->assertInstanceOf('Negotiation\AcceptLanguage', $accept); - $this->assertEquals('en', $accept->getType()); - } - - /** - * @dataProvider dataProviderForTestParseHeader - */ - public function testParseHeader($header, $expected) - { - $accepts = $this->call_private_method('Negotiation\Negotiator', 'parseHeader', $this->negotiator, array($header)); - - $this->assertSame($expected, $accepts); - } - - public static function dataProviderForTestParseHeader() - { - return array( - array('en; q=0.1, fr; q=0.4, bu; q=1.0', array('en; q=0.1', 'fr; q=0.4', 'bu; q=1.0')), - array('en; q=0.1, fr; q=0.4, fu; q=0.9, de; q=0.2', array('en; q=0.1', 'fr; q=0.4', 'fu; q=0.9', 'de; q=0.2')), - ); - } -} diff --git a/vendor/willdurand/negotiation/tests/Negotiation/Tests/MatchTest.php b/vendor/willdurand/negotiation/tests/Negotiation/Tests/MatchTest.php deleted file mode 100644 index c570a0a587e0a37dbe2f09c69a941d85b2592c18..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/tests/Negotiation/Tests/MatchTest.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -namespace Negotiation\Tests; - -use Negotiation\Match; - -class MatchTest extends TestCase -{ - /** - * @dataProvider dataProviderForTestCompare - */ - public function testCompare($match1, $match2, $expected) - { - $this->assertEquals($expected, Match::compare($match1, $match2)); - } - - public static function dataProviderForTestCompare() - { - return array( - array(new Match(1.0, 110, 1), new Match(1.0, 111, 1), 0), - array(new Match(0.1, 10, 1), new Match(0.1, 10, 2), -1), - array(new Match(0.5, 110, 5), new Match(0.5, 11, 4), 1), - array(new Match(0.4, 110, 1), new Match(0.6, 111, 3), 1), - array(new Match(0.6, 110, 1), new Match(0.4, 111, 3), -1), - ); - } - - /** - * @dataProvider dataProviderForTestReduce - */ - public function testReduce($carry, $match, $expected) - { - $this->assertEquals($expected, Match::reduce($carry, $match)); - } - - public static function dataProviderForTestReduce() - { - return array( - array( - array(1 => new Match(1.0, 10, 1)), - new Match(0.5, 111, 1), - array(1 => new Match(0.5, 111, 1)), - ), - array( - array(1 => new Match(1.0, 110, 1)), - new Match(0.5, 11, 1), - array(1 => new Match(1.0, 110, 1)), - ), - array( - array(0 => new Match(1.0, 10, 1)), - new Match(0.5, 111, 1), - array(0 => new Match(1.0, 10, 1), 1 => new Match(0.5, 111, 1)), - ), - ); - } -} diff --git a/vendor/willdurand/negotiation/tests/Negotiation/Tests/NegotiatorTest.php b/vendor/willdurand/negotiation/tests/Negotiation/Tests/NegotiatorTest.php deleted file mode 100644 index fe3ff767ae7edd15d80017c8934e76bf4ff57e5c..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/tests/Negotiation/Tests/NegotiatorTest.php +++ /dev/null @@ -1,195 +0,0 @@ -<?php - -namespace Negotiation\Tests; - -use Negotiation\Exception\InvalidArgument; -use Negotiation\Exception\InvalidMediaType; -use Negotiation\Negotiator; -use Negotiation\Accept; -use Negotiation\Match; - -class NegotiatorTest extends TestCase -{ - - /** - * @var Negotiator - */ - private $negotiator; - - protected function setUp() - { - $this->negotiator = new Negotiator(); - } - - /** - * @dataProvider dataProviderForTestGetBest - */ - public function testGetBest($header, $priorities, $expected) - { - try { - $acceptHeader = $this->negotiator->getBest($header, $priorities); - } catch (\Exception $e) { - $this->assertEquals($expected, $e); - - return; - } - - if ($acceptHeader === null) { - $this->assertNull($expected); - - return; - } - - $this->assertInstanceOf('Negotiation\Accept', $acceptHeader); - - $this->assertSame($expected[0], $acceptHeader->getType()); - $this->assertSame($expected[1], $acceptHeader->getParameters()); - } - - public static function dataProviderForTestGetBest() - { - $pearAcceptHeader = 'text/html,application/xhtml+xml,application/xml;q=0.9,text/*;q=0.7,*/*,image/gif; q=0.8, image/jpeg; q=0.6, image/*'; - $rfcHeader = 'text/*;q=0.3, text/html;q=0.7, text/html;level=1, text/html;level=2;q=0.4, */*;q=0.5'; - - return array( - # exceptions - array('/qwer', array('f/g'), null), - array('/qwer,f/g', array('f/g'), array('f/g', array())), - array('foo/bar', array('/qwer'), new InvalidMediaType()), - array('', array('foo/bar'), new InvalidArgument('The header string should not be empty.')), - array('*/*', array(), new InvalidArgument('A set of server priorities should be given.')), - - # See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html - array($rfcHeader, array('text/html;level=1'), array('text/html', array('level' => '1'))), - array($rfcHeader, array('text/html'), array('text/html', array())), - array($rfcHeader, array('text/plain'), array('text/plain', array())), - array($rfcHeader, array('image/jpeg',), array('image/jpeg', array())), - array($rfcHeader, array('text/html;level=2'), array('text/html', array('level' => '2'))), - array($rfcHeader, array('text/html;level=3'), array('text/html', array( 'level' => '3'))), - - array('text/*;q=0.7, text/html;q=0.3, */*;q=0.5, image/png;q=0.4', array('text/html', 'image/png'), array('image/png', array())), - array('image/png;q=0.1, text/plain, audio/ogg;q=0.9', array('image/png', 'text/plain', 'audio/ogg'), array('text/plain', array())), - array('image/png, text/plain, audio/ogg', array('baz/asdf'), null), - array('image/png, text/plain, audio/ogg', array('audio/ogg'), array('audio/ogg', array())), - array('image/png, text/plain, audio/ogg', array('YO/SuP'), null), - array('text/html; charset=UTF-8, application/pdf', array('text/html; charset=UTF-8'), array('text/html', array('charset' => 'UTF-8'))), - array('text/html; charset=UTF-8, application/pdf', array('text/html'), null), - array('text/html, application/pdf', array('text/html; charset=UTF-8'), array('text/html', array('charset' => 'UTF-8'))), - # PEAR HTTP2 tests - have been altered from original! - array($pearAcceptHeader, array('image/gif', 'image/png', 'application/xhtml+xml', 'application/xml', 'text/html', 'image/jpeg', 'text/plain',), array('image/png', array())), - array($pearAcceptHeader, array('image/gif', 'application/xhtml+xml', 'application/xml', 'image/jpeg', 'text/plain',), array('application/xhtml+xml', array())), - array($pearAcceptHeader, array('image/gif', 'application/xml', 'image/jpeg', 'text/plain',), array('application/xml', array())), - array($pearAcceptHeader, array('image/gif', 'image/jpeg', 'text/plain'), array('image/gif', array())), - array($pearAcceptHeader, array('text/plain', 'image/png', 'image/jpeg'), array('image/png', array())), - array($pearAcceptHeader, array('image/jpeg', 'image/gif',), array('image/gif', array())), - array($pearAcceptHeader, array('image/png',), array('image/png', array())), - array($pearAcceptHeader, array('audio/midi',), array('audio/midi', array())), - array('text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', array( 'application/rss+xml'), array('application/rss+xml', array())), - # LWS / case sensitivity - array('text/* ; q=0.3, TEXT/html ;Q=0.7, text/html ; level=1, texT/Html ;leVel = 2 ;q=0.4, */* ; q=0.5', array( 'text/html; level=2'), array('text/html', array( 'level' => '2'))), - array('text/* ; q=0.3, text/html;Q=0.7, text/html ;level=1, text/html; level=2;q=0.4, */*;q=0.5', array( 'text/HTML; level=3'), array('text/html', array( 'level' => '3'))), - # Incompatible - array('text/html', array( 'application/rss'), null), - # IE8 Accept header - array('image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, */*', array( 'text/html', 'application/xhtml+xml'), array('text/html', array())), - # Quality of source factors - array($rfcHeader, array('text/html;q=0.4', 'text/plain'), array('text/plain', array())), - # Wildcard "plus" parts (e.g., application/vnd.api+json) - array('application/vnd.api+json', array('application/json', 'application/*+json'), array('application/*+json', array())), - array('application/json;q=0.7, application/*+json;q=0.7', array('application/hal+json', 'application/problem+json'), array('application/hal+json', array())), - array('application/json;q=0.7, application/problem+*;q=0.7', array('application/hal+xml', 'application/problem+xml'), array('application/problem+xml', array())), - array($pearAcceptHeader, array('application/*+xml'), array('application/*+xml', array())), - # @see https://github.com/willdurand/Negotiation/issues/93 - array('application/hal+json', array('application/ld+json', 'application/hal+json', 'application/xml', 'text/xml', 'application/json', 'text/html'), array('application/hal+json', array())), - ); - } - - public function testGetBestRespectsQualityOfSource() - { - $accept = $this->negotiator->getBest('text/html,text/*;q=0.7', array('text/html;q=0.5', 'text/plain;q=0.9')); - $this->assertInstanceOf('Negotiation\Accept', $accept); - $this->assertEquals('text/plain', $accept->getType()); - } - - /** - * @dataProvider dataProviderForTestParseHeader - */ - public function testParseHeader($header, $expected) - { - $accepts = $this->call_private_method('Negotiation\Negotiator', 'parseHeader', $this->negotiator, array($header)); - - $this->assertSame($expected, $accepts); - } - - public static function dataProviderForTestParseHeader() - { - return array( - array('text/html ; q=0.9', array('text/html ; q=0.9')), - array('text/html,application/xhtml+xml', array('text/html', 'application/xhtml+xml')), - array(',,text/html;q=0.8 , , ', array('text/html;q=0.8')), - array('text/html;charset=utf-8; q=0.8', array('text/html;charset=utf-8; q=0.8')), - array('text/html; foo="bar"; q=0.8 ', array('text/html; foo="bar"; q=0.8')), - array('text/html; foo="bar"; qwer="asdf", image/png', array('text/html; foo="bar"; qwer="asdf"', "image/png")), - array('text/html ; quoted_comma="a,b ,c,",application/xml;q=0.9,*/*;charset=utf-8; q=0.8', array('text/html ; quoted_comma="a,b ,c,"', 'application/xml;q=0.9', '*/*;charset=utf-8; q=0.8')), - array('text/html, application/json;q=0.8, text/csv;q=0.7', array('text/html', 'application/json;q=0.8', 'text/csv;q=0.7')) - ); - } - - /** - * @dataProvider dataProviderForTestFindMatches - */ - public function testFindMatches($headerParts, $priorities, $expected) - { - $neg = new Negotiator(); - - $matches = $this->call_private_method('Negotiation\Negotiator', 'findMatches', $neg, array($headerParts, $priorities)); - - $this->assertEquals($expected, $matches); - } - - public static function dataProviderForTestFindMatches() - { - return array( - array( - array(new Accept('text/html; charset=UTF-8'), new Accept('image/png; foo=bar; q=0.7'), new Accept('*/*; foo=bar; q=0.4')), - array(new Accept('text/html; charset=UTF-8'), new Accept('image/png; foo=bar'), new Accept('application/pdf')), - array( - new Match(1.0, 111, 0), - new Match(0.7, 111, 1), - new Match(0.4, 1, 1), - ) - ), - array( - array(new Accept('text/html'), new Accept('image/*; q=0.7')), - array(new Accept('text/html; asfd=qwer'), new Accept('image/png'), new Accept('application/pdf')), - array( - new Match(1.0, 110, 0), - new Match(0.7, 100, 1), - ) - ), - array( # https://tools.ietf.org/html/rfc7231#section-5.3.2 - array(new Accept('text/*; q=0.3'), new Accept('text/html; q=0.7'), new Accept('text/html; level=1'), new Accept('text/html; level=2; q=0.4'), new Accept('*/*; q=0.5')), - array(new Accept('text/html; level=1'), new Accept('text/html'), new Accept('text/plain'), new Accept('image/jpeg'), new Accept('text/html; level=2'), new Accept('text/html; level=3')), - array( - new Match(0.3, 100, 0), - new Match(0.7, 110, 0), - new Match(1.0, 111, 0), - new Match(0.5, 0, 0), - new Match(0.3, 100, 1), - new Match(0.7, 110, 1), - new Match(0.5, 0, 1), - new Match(0.3, 100, 2), - new Match(0.5, 0, 2), - new Match(0.5, 0, 3), - new Match(0.3, 100, 4), - new Match(0.7, 110, 4), - new Match(0.4, 111, 4), - new Match(0.5, 0, 4), - new Match(0.3, 100, 5), - new Match(0.7, 110, 5), - new Match(0.5, 0, 5), - ) - ) - ); - } -} diff --git a/vendor/willdurand/negotiation/tests/Negotiation/Tests/TestCase.php b/vendor/willdurand/negotiation/tests/Negotiation/Tests/TestCase.php deleted file mode 100644 index 37f936404e44bba621b900ee60b54e3bec330e8d..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/tests/Negotiation/Tests/TestCase.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -namespace Negotiation\Tests; - -abstract class TestCase extends \PHPUnit_Framework_TestCase -{ - protected function call_private_method($class, $method, $object, $params) - { - $method = new \ReflectionMethod($class, $method); - - $method->setAccessible(true); - - return $method->invokeArgs($object, $params); - } -} diff --git a/vendor/willdurand/negotiation/tests/bootstrap.php b/vendor/willdurand/negotiation/tests/bootstrap.php deleted file mode 100644 index c63e17a682012eb66cc2d829ea8999a6757b3bd7..0000000000000000000000000000000000000000 --- a/vendor/willdurand/negotiation/tests/bootstrap.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -if (! ($loader = @include __DIR__ . '/../vendor/autoload.php')) { - die(<<<EOT -You need to install the project dependencies using Composer: -$ wget http://getcomposer.org/composer.phar -OR -$ curl -s https://getcomposer.org/installer | php -$ php composer.phar install --dev -$ phpunit -EOT - ); -} - -$loader->add('Negotiation\Tests', __DIR__);