diff --git a/.gitattributes b/.gitattributes index cf8890eefbda8..d1570aff1cd79 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,4 +6,3 @@ /src/Symfony/Component/Runtime export-ignore /src/Symfony/Component/Translation/Bridge export-ignore /src/Symfony/Component/Intl/Resources/data/*/* linguist-generated=true -/.git* export-ignore diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 00a24cbcfc13c..f749de5e0d82a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ | Q | A | ------------- | --- -| Branch? | 7.1 for features / 5.4, 6.4, or 7.0 for bug fixes +| Branch? | 7.2 for features / 5.4, 6.4, 7.0, and 7.1 for bug fixes | Bug fix? | yes/no | New feature? | yes/no | Deprecations? | yes/no diff --git a/.github/sync-packages.php b/.github/sync-packages.php deleted file mode 100644 index d947c586d0c91..0000000000000 --- a/.github/sync-packages.php +++ /dev/null @@ -1,80 +0,0 @@ -> $GITHUB_OUTPUT + + - name: Check Translation Status + if: steps.changed-translation-files.outputs.changed == 'true' + run: | + php src/Symfony/Component/Translation/Resources/bin/translation-status.php -v + php .github/sync-translations.php + git diff --exit-code src/ || (echo '::error::Run "php .github/sync-translations.php" to fix XLIFF files.' && exit 1) + - name: Run tests run: ./phpunit --group integration -v env: @@ -216,15 +233,3 @@ jobs: # docker run --rm -e COMPOSER_ROOT_VERSION -v $(pwd):/app -v $(which composer):/usr/local/bin/composer -v $(which vulcain):/usr/local/bin/vulcain -w /app php:8.1-alpine ./phpunit src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php --filter testHttp2Push # sudo rm -rf .phpunit # [ -d .phpunit.bak ] && mv .phpunit.bak .phpunit - - - name: Check for changes in translation files - id: changed-translation-files - run: | - echo 'changed='$((git diff --quiet HEAD~1 HEAD -- 'src/**/Resources/translations/*.xlf' || (echo 'true' && exit 1)) && echo 'false') >> $GITHUB_OUTPUT - - - name: Check Translation Status - if: steps.changed-translation-files.outputs.changed == 'true' - run: | - php src/Symfony/Component/Translation/Resources/bin/translation-status.php -v - php .github/sync-translations.php - git diff --exit-code src/ || (echo '::error::Run "php .github/sync-translations.php" to fix XLIFF files.' && exit 1) diff --git a/.github/workflows/package-tests.yml b/.github/workflows/package-tests.yml index 0792f4e8d6da5..96b7451b7f945 100644 --- a/.github/workflows/package-tests.yml +++ b/.github/workflows/package-tests.yml @@ -101,7 +101,6 @@ jobs: done exit $ok - - name: Verify symfony/deprecation-contracts requirements run: | set +e @@ -142,9 +141,3 @@ jobs: done exit $ok - - - name: Verify subtree-splits are auto-closed - run: | - php .github/sync-packages.php - git add src/ - git diff --staged --exit-code || (echo '::error::Please run "php .github/sync-packages.php".' && exit 1) diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 0753dc03e2789..796590882f30f 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -6,7 +6,7 @@ on: schedule: - cron: '34 4 * * 6' push: - branches: [ "7.1" ] + branches: [ "7.2" ] # Declare default permissions as read only. permissions: read-all diff --git a/CHANGELOG-6.4.md b/CHANGELOG-6.4.md index 72e7ab9352c8d..5fac4dddffe18 100644 --- a/CHANGELOG-6.4.md +++ b/CHANGELOG-6.4.md @@ -7,6 +7,49 @@ in 6.4 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v6.4.0...v6.4.1 +* 6.4.8 (2024-06-02) + + * bug #57284 [Mime] Fix TextPart using an unknown File (fabpot) + * bug #57282 [Scheduler] Throw an exception when no dispatcher has been passed to a Schedule (fabpot) + * bug #57275 Fix autoload configs to avoid warnings when building optimized autoloaders (Seldaek) + * bug #54572 [Mailer] Fix sendmail transport failure handling and interactive mode (bobvandevijver) + * bug #57228 [Mime] fix PHP 7 compatibility (xabbuh) + * bug #57065 [Mime] Fixed `Mime\Message::ensureValidity()` when a required header is set, but has an empty body (rhertogh) + * bug #57109 [Notifier] keep boolean options when their value is false (xabbuh) + * bug #54971 [Serializer] Cache readability/writability computation (mtarld) + * bug #56488 [VarExporter] Fix exporting default values involving global constants (kylekatarnls) + * bug #49186 [Serializer] Improve exception message in UnwrappingDenormalizer (andersonamuller) + * bug #54694 [PropertyInfo] Update DoctrineExtractor for new DBAL 4 BIGINT type (llupa) + * bug #54913 [Serializer] Fix CurrentType for missing property (ElisDN) + * bug #54797 [PhpUnitBridge] Fix `DeprecationErrorHandler` with PhpUnit 10 (HypeMC) + * bug #54878 [Filesystem] Fix dumpFile `stat failed` error hitting custom handler (acoulton) + * bug #54924 [Validator] IBAN Check digits should always between 2 and 98 (karstennilsen) + * bug #54919 [ErrorHandler] Do not call xdebug_get_function_stack() with xdebug >= 3.0 when not in develop mode (fmata) + * bug #54910 [HttpFoundation]  filter out empty HTTP header parts (xabbuh) + * bug #54888 [String] Fix folded in compat mode (smnandre) + * bug #54863 [Process] Return `false` when `open_basedir` prevents access to `/dev/tty` (mjauvin) + * bug #54860 [HttpClient] Revert fixing curl default options (alexandre-daubois) + * bug #54850 [VarExporter] fix `ProxyHelper::generateLazyProxy()` when a method returns null (nikophil) + * bug #54842 [Messenger] Don't drop stamps when message validation fails (valtzu) + * bug #54838 [WebProfilerBundle] Fix assignment to constant variable (HypeMC) + * bug #54837 [Mailer] [Sendgrid] Use `DataPart::getContentId()` when `DataPart::setContentId()` is used (SherinBloemendaal) + * bug #54839 Fix exception thrown during `LDAP_MODIFY_BATCH_REMOVE_ALL` batch operations (phasdev) + * bug #54834 [Validator] Check `Locale` class existence before using it (alexandre-daubois) + * bug #54830 [HttpClient] Fix cURL default options for PHP 8.4 (alexandre-daubois) + * bug #54828 [Serializer] Fix `GetSetMethodNormalizer` not working with setters with optional args (HypeMC) + * bug #54816 [Cache] Fix support for predis/predis:^2.0 (mfettig) + * bug #54804 [Serializer] separate the property info and write info extractors (xabbuh) + * bug #54800 [WebProfilerBundle] fix compatibility with Twig 3.10 (xabbuh) + * bug #54794 [Strings][EnglishInflector] Fix incorrect pluralisation of 'Album' (timporter) + * bug #54714 [Serializer] convert empty CSV header names into numeric keys (xabbuh) + * bug #54775 [Messenger] accept AbstractAsset instances when filtering schemas (xabbuh) + * bug #54758 [Validator] handle edge cases when constructing constraints with named arguments (xabbuh) + * bug #54759 [Filesystem] better distinguish URL schemes and Windows drive letters (xabbuh) + * bug #54791 [FrameworkBundle] move wiring of the property info extractor to the ObjectNormalizer (xabbuh) + * bug #54760 [Validator] handle union and intersection types for cascaded validations (xabbuh) + * bug #54776 [Cache] fix: remove unwanted cast to int (Arend Hummeling) + * bug #54700 [Dotenv] show overridden vars too when running debug:dotenv (HMRDevil) + * 6.4.7 (2024-04-29) * bug #54699 [DoctrineBridge] Update AbstractSchemaListener to adjust more database params (ywisax) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 04ba9eca15947..2c65442650d09 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -14,8 +14,8 @@ The Symfony Connect username in parenthesis allows to get more information - Grégoire Pineau (lyrixx) - Thomas Calvet (fancyweb) - Christophe Coevoet (stof) - - Wouter de Jong (wouterj) - Alexandre Daubois (alexandre-daubois) + - Wouter de Jong (wouterj) - Jordi Boggiano (seldaek) - Maxime Steinhausser (ogizanagi) - Kévin Dunglas (dunglas) @@ -34,8 +34,8 @@ The Symfony Connect username in parenthesis allows to get more information - Tobias Nyholm (tobias) - Jérôme Tamarelle (gromnan) - Samuel ROZE (sroze) - - Pascal Borreli (pborreli) - Antoine Lamirault (alamirault) + - Pascal Borreli (pborreli) - Romain Neutron - HypeMC (hypemc) - Joseph Bielawski (stloyd) @@ -51,14 +51,14 @@ The Symfony Connect username in parenthesis allows to get more information - Igor Wiedler - Jan Schädlich (jschaedl) - Mathieu Lechat (mat_the_cat) - - Matthias Pigulla (mpdude) - Gabriel Ostrolucký (gadelat) + - Matthias Pigulla (mpdude) - Jonathan Wage (jwage) - Valentin Udaltsov (vudaltsov) + - Vincent Langlet (deviling) - Alexandre Salomé (alexandresalome) - Grégoire Paris (greg0ire) - William DURAND - - Vincent Langlet (deviling) - ornicar - Dany Maillard (maidmaid) - Eriksen Costa @@ -69,6 +69,7 @@ The Symfony Connect username in parenthesis allows to get more information - Francis Besset (francisbesset) - Titouan Galopin (tgalopin) - Pierre du Plessis (pierredup) + - Simon André (simonandre) - David Maicher (dmaicher) - Bulat Shakirzyanov (avalanche123) - Iltar van der Berg @@ -77,18 +78,17 @@ The Symfony Connect username in parenthesis allows to get more information - Saša Stamenković (umpirsky) - Allison Guilhem (a_guilhem) - Mathieu Piot (mpiot) - - Simon André (simonandre) - Mathieu Santostefano (welcomattic) - Alexander Schranz (alexander-schranz) - Vasilij Duško (staff) + - Tomasz Kowalczyk (thunderer) + - Mathias Arlaud (mtarld) - Sarah Khalil (saro0h) - Laurent VOULLEMIER (lvo) - Konstantin Kudryashov (everzet) - - Tomasz Kowalczyk (thunderer) - Guilhem N (guilhemn) - Bilal Amarni (bamarni) - Eriksen Costa - - Mathias Arlaud (mtarld) - Florin Patan (florinpatan) - Vladimir Reznichenko (kalessil) - Peter Rehm (rpet) @@ -96,8 +96,8 @@ The Symfony Connect username in parenthesis allows to get more information - Henrik Bjørnskov (henrikbjorn) - David Buchmann (dbu) - Andrej Hudec (pulzarraider) - - Jáchym Toušek (enumag) - Ruud Kamphuis (ruudk) + - Jáchym Toušek (enumag) - Christian Raue - Eric Clemmons (ericclemmons) - Denis (yethee) @@ -130,6 +130,7 @@ The Symfony Connect username in parenthesis allows to get more information - Vasilij Dusko | CREATION - Jordan Alliot (jalliot) - Phil E. Taylor (philetaylor) + - Joel Wurtz (brouznouf) - John Wards (johnwards) - Théo FIDRY - Antoine Hérault (herzult) @@ -137,7 +138,6 @@ The Symfony Connect username in parenthesis allows to get more information - Yanick Witschi (toflar) - Jeroen Spee (jeroens) - Arnaud Le Blanc (arnaud-lb) - - Joel Wurtz (brouznouf) - Sebastiaan Stok (sstok) - Maxime STEINHAUSSER - Rokas Mikalkėnas (rokasm) @@ -198,6 +198,7 @@ The Symfony Connect username in parenthesis allows to get more information - Daniel Gomes (danielcsgomes) - Hidenori Goto (hidenorigoto) - Niels Keurentjes (curry684) + - Dāvis Zālītis (k0d3r1s) - Arnaud Kleinpeter (nanocom) - Guilherme Blanco (guilhermeblanco) - Saif Eddin Gmati (azjezz) @@ -211,7 +212,6 @@ The Symfony Connect username in parenthesis allows to get more information - Pablo Godel (pgodel) - Florent Mata (fmata) - Alessandro Chitolina (alekitto) - - Dāvis Zālītis (k0d3r1s) - Rafael Dohms (rdohms) - Roman Martinuk (a2a4) - Thomas Landauer (thomas-landauer) @@ -262,6 +262,7 @@ The Symfony Connect username in parenthesis allows to get more information - Tyson Andre - GDIBass - Samuel NELA (snela) + - Florent Morselli (spomky_) - Vincent AUBERT (vincent) - Michael Voříšek - zairig imad (zairigimad) @@ -269,6 +270,7 @@ The Symfony Connect username in parenthesis allows to get more information - Sébastien Alfaiate (seb33300) - James Halsall (jaitsu) - Christian Scheb + - Bob van de Vijver (bobvandevijver) - Guillaume (guill) - Mikael Pajunen - Warnar Boekkooi (boekkooi) @@ -294,10 +296,10 @@ The Symfony Connect username in parenthesis allows to get more information - Chi-teck - Andre Rømcke (andrerom) - Baptiste Leduc (korbeil) + - Karoly Gossler (connorhu) - Timo Bakx (timobakx) - soyuka - Ruben Gonzalez (rubenrua) - - Bob van de Vijver (bobvandevijver) - Benjamin Dulau (dbenjamin) - Markus Fasselt (digilist) - Denis Brumann (dbrumann) @@ -308,6 +310,7 @@ The Symfony Connect username in parenthesis allows to get more information - Andreas Hucks (meandmymonkey) - Noel Guilbert (noel) - Bastien Jaillot (bastnic) + - Soner Sayakci - Stadly - Stepan Anchugov (kix) - bronze1man @@ -323,7 +326,6 @@ The Symfony Connect username in parenthesis allows to get more information - Pierre Minnieur (pminnieur) - Dominique Bongiraud - Hugo Monteiro (monteiro) - - Karoly Gossler (connorhu) - Bram Leeda (bram123) - Dmitrii Poddubnyi (karser) - Julien Pauli @@ -334,6 +336,7 @@ The Symfony Connect username in parenthesis allows to get more information - Leszek Prabucki (l3l0) - Giorgio Premi - Thomas Lallement (raziel057) + - Yassine Guedidi (yguedidi) - François Zaninotto (fzaninotto) - Dustin Whittle (dustinwhittle) - Timothée Barray (tyx) @@ -348,7 +351,6 @@ The Symfony Connect username in parenthesis allows to get more information - Michele Orselli (orso) - Sven Paulus (subsven) - Maxime Veber (nek-) - - Soner Sayakci - Valentine Boineau (valentineboineau) - Rui Marinho (ruimarinho) - Patrick Landolt (scube) @@ -367,7 +369,6 @@ The Symfony Connect username in parenthesis allows to get more information - Mantis Development - Marko Kaznovac (kaznovac) - Hidde Wieringa (hiddewie) - - Florent Morselli (spomky_) - dFayet - Rob Frawley 2nd (robfrawley) - Renan (renanbr) @@ -377,7 +378,6 @@ The Symfony Connect username in parenthesis allows to get more information - Daniel Tschinder - Christian Schmidt - Alexander Kotynia (olden) - - Yassine Guedidi (yguedidi) - Elnur Abdurrakhimov (elnur) - Manuel Reinhard (sprain) - BoShurik @@ -418,6 +418,7 @@ The Symfony Connect username in parenthesis allows to get more information - Marvin Petker - GordonsLondon - Ray + - Asis Pattisahusiwa - Philipp Cordes (corphi) - Chekote - Thomas Adam @@ -477,6 +478,7 @@ The Symfony Connect username in parenthesis allows to get more information - Thomas Bisignani (toma) - Florian Klein (docteurklein) - Damien Alexandre (damienalexandre) + - javaDeveloperKid - Manuel Kießling (manuelkiessling) - Alexey Kopytko (sanmai) - Warxcell (warxcell) @@ -487,7 +489,6 @@ The Symfony Connect username in parenthesis allows to get more information - Bertrand Zuchuat (garfield-fr) - Marc Morera (mmoreram) - Quynh Xuan Nguyen (seriquynh) - - Asis Pattisahusiwa - Gabor Toth (tgabi333) - realmfoo - Fabien S (bafs) @@ -518,6 +519,7 @@ The Symfony Connect username in parenthesis allows to get more information - Thierry T (lepiaf) - Lorenz Schori - Lukáš Holeczy (holicz) + - Jonathan H. Wage - Jeremy Livingston (jeremylivingston) - ivan - SUMIDA, Ippei (ippey_s) @@ -550,6 +552,7 @@ The Symfony Connect username in parenthesis allows to get more information - Artur Eshenbrener - Harm van Tilborg (hvt) - Thomas Perez (scullwm) + - Gwendolen Lynch - Cédric Anne - smoench - Felix Labrecque @@ -588,7 +591,6 @@ The Symfony Connect username in parenthesis allows to get more information - Kirill chEbba Chebunin - Pol Dellaiera (drupol) - Alex (aik099) - - javaDeveloperKid - Fabien Villepinte - SiD (plbsid) - Greg Thornton (xdissent) @@ -668,9 +670,9 @@ The Symfony Connect username in parenthesis allows to get more information - Dmitriy Mamontov (mamontovdmitriy) - Jan Schumann - Matheo Daninos (mathdns) + - Neil Peyssard (nepey) - Niklas Fiekas - Mark Challoner (markchalloner) - - Jonathan H. Wage - Markus Bachmann (baachi) - Matthieu Lempereur (mryamous) - Gunnstein Lye (glye) @@ -710,7 +712,6 @@ The Symfony Connect username in parenthesis allows to get more information - DerManoMann - Jérôme Tanghe (deuchnord) - Mathias STRASSER (roukmoute) - - Gwendolen Lynch - simon chrzanowski (simonch) - Kamil Kokot (pamil) - Seb Koelen @@ -905,6 +906,7 @@ The Symfony Connect username in parenthesis allows to get more information - Ramunas Pabreza (doobas) - Yuriy Vilks (igrizzli) - Terje Bråten + - Andrey Lebedev (alebedev) - Sebastian Krebs - Piotr Stankowski - Pierre-Emmanuel Tanguy (petanguy) @@ -970,7 +972,6 @@ The Symfony Connect username in parenthesis allows to get more information - Christophe Villeger (seragan) - Krystian Marcisz (simivar) - Julien Fredon - - Neil Peyssard (nepey) - Xavier Leune (xleune) - Hany el-Kerdany - Wang Jingyu @@ -1065,6 +1066,7 @@ The Symfony Connect username in parenthesis allows to get more information - Robin Lehrmann - Szijarto Tamas - Thomas P + - Stephan Vock (glaubinix) - Jaroslav Kuba - Benjamin Zikarsky (bzikarsky) - Kristijan Kanalaš (kristijan_kanalas_infostud) @@ -1149,6 +1151,7 @@ The Symfony Connect username in parenthesis allows to get more information - Ворожцов Максим (myks92) - Dalibor Karlović - Randy Geraads + - Jay Klehr - Andreas Leathley (iquito) - Vladimir Luchaninov (luchaninov) - Sebastian Grodzicki (sgrodzicki) @@ -1225,6 +1228,7 @@ The Symfony Connect username in parenthesis allows to get more information - Felds Liscia (felds) - Jérémy DECOOL (jdecool) - Sergey Panteleev + - Alexander Grimalovsky (flying) - Andrew Hilobok (hilobok) - Noah Heck (myesain) - Christian Soronellas (theunic) @@ -1421,6 +1425,7 @@ The Symfony Connect username in parenthesis allows to get more information - Michael Roterman (wtfzdotnet) - Philipp Keck - Pavol Tuka + - Shyim - Arno Geurts - Adán Lobato (adanlobato) - Ian Jenkins (jenkoian) @@ -1482,6 +1487,7 @@ The Symfony Connect username in parenthesis allows to get more information - MrMicky - Stewart Malik - Renan Taranto (renan-taranto) + - Ninos Ego - Stefan Graupner (efrane) - Gemorroj (gemorroj) - Adrien Chinour @@ -1492,6 +1498,7 @@ The Symfony Connect username in parenthesis allows to get more information - Uladzimir Tsykun - iamvar - Amaury Leroux de Lens (amo__) + - Rene de Lima Barbosa (renedelima) - Christian Jul Jensen - Alexandre GESLIN - The Whole Life to Learn @@ -1675,6 +1682,7 @@ The Symfony Connect username in parenthesis allows to get more information - Goran Juric - Laurent G. (laurentg) - Jean-Baptiste Nahan + - Thomas Decaux - Nicolas Macherey - Asil Barkin Elik (asilelik) - Bhujagendra Ishaya @@ -1740,7 +1748,6 @@ The Symfony Connect username in parenthesis allows to get more information - Denis Kop - Fabrice Locher - Kamil Szalewski (szal1k) - - Andrey Lebedev (alebedev) - Jean-Guilhem Rouel (jean-gui) - Yoann MOROCUTTI - Ivan Yivoff @@ -1769,6 +1776,7 @@ The Symfony Connect username in parenthesis allows to get more information - Hans Mackowiak - Hugo Fonseca (fonsecas72) - Marc Duboc (icemad) + - uncaught - Martynas Narbutas - Timothée BARRAY - Nilmar Sanchez Muguercia @@ -1875,6 +1883,7 @@ The Symfony Connect username in parenthesis allows to get more information - Clément - Gustavo Adrian - Jorrit Schippers (jorrit) + - Yann (yann_eugone) - Matthias Neid - Yannick - Kuzia @@ -1908,7 +1917,6 @@ The Symfony Connect username in parenthesis allows to get more information - Jason Schilling (chapterjason) - David de Boer (ddeboer) - Eno Mullaraj (emullaraj) - - Stephan Vock (glaubinix) - Guillem Fondin (guillemfondin) - Nathan PAGE (nathix) - Ryan Rogers @@ -2005,7 +2013,6 @@ The Symfony Connect username in parenthesis allows to get more information - Stefano A. (stefano93) - PierreRebeilleau - AlbinoDrought - - Jay Klehr - Sergey Yuferev - Monet Emilien - voodooism @@ -2166,7 +2173,6 @@ The Symfony Connect username in parenthesis allows to get more information - ShiraNai7 - Cedrick Oka - Antal Áron (antalaron) - - Alexander Grimalovsky (flying) - Guillaume Sainthillier (guillaume-sainthillier) - Ivan Pepelko (pepelko) - Vašek Purchart (vasek-purchart) @@ -2273,6 +2279,7 @@ The Symfony Connect username in parenthesis allows to get more information - roog - parinz1234 - Romain Geissler + - Martin Auswöger - Adrien Moiruad - Viktoriia Zolotova - Tomaz Ahlin @@ -2351,6 +2358,7 @@ The Symfony Connect username in parenthesis allows to get more information - Wouter Diesveld - Romain - Matěj Humpál + - Kasper Hansen - Amine Matmati - Kristen Gilden - caalholm @@ -2501,6 +2509,7 @@ The Symfony Connect username in parenthesis allows to get more information - Tiago Garcia (tiagojsag) - Artiom - Jakub Simon + - Eviljeks - robin.de.croock - Brandon Antonio Lorenzo - Bouke Haarsma @@ -2722,6 +2731,7 @@ The Symfony Connect username in parenthesis allows to get more information - Thomas Rothe - Edwin - Troy Crawford + - Kirill Roskolii - Jeroen van den Nieuwenhuisen - nietonfir - Andriy @@ -2933,6 +2943,7 @@ The Symfony Connect username in parenthesis allows to get more information - Joel Marcey - zolikonta - Daniel Bartoníček + - Michael Hüneburg - David Christmann - root - pf @@ -3314,6 +3325,7 @@ The Symfony Connect username in parenthesis allows to get more information - cmfcmf - sarah-eit - Michal Forbak + - CarolienBEER - Drew Butler - Alexey Berezuev - pawel-lewtak @@ -3330,7 +3342,6 @@ The Symfony Connect username in parenthesis allows to get more information - Anatol Belski - Javier - Alexis BOYER - - Shyim - bch36 - Kaipi Yann - wiseguy1394 @@ -3413,6 +3424,7 @@ The Symfony Connect username in parenthesis allows to get more information - Alex Nostadt - Michael Squires - Egor Gorbachev + - Julian Krzefski - Derek Stephen McLean - Norman Soetbeer - zorn @@ -3550,6 +3562,7 @@ The Symfony Connect username in parenthesis allows to get more information - Arkadiusz Kondas (itcraftsmanpl) - j0k (j0k) - joris de wit (jdewit) + - JG (jege) - Jérémy CROMBEZ (jeremy) - Jose Manuel Gonzalez (jgonzalez) - Joachim Krempel (jkrempel) diff --git a/composer.json b/composer.json index eae0d1cafe807..71640dcd63929 100644 --- a/composer.json +++ b/composer.json @@ -190,7 +190,8 @@ "Symfony\\Bridge\\PsrHttpMessage\\": "src/Symfony/Bridge/PsrHttpMessage/", "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", "Symfony\\Bundle\\": "src/Symfony/Bundle/", - "Symfony\\Component\\": "src/Symfony/Component/" + "Symfony\\Component\\": "src/Symfony/Component/", + "Symfony\\Runtime\\Symfony\\Component\\": "src/Symfony/Component/Runtime/Internal/" }, "files": [ "src/Symfony/Component/String/Resources/functions.php" @@ -199,7 +200,8 @@ "src/Symfony/Component/Cache/Traits/ValueWrapper.php" ], "exclude-from-classmap": [ - "**/Tests/" + "**/Tests/", + "**/bin/" ] }, "autoload-dev": { diff --git a/src/Symfony/Bridge/Doctrine/.gitattributes b/src/Symfony/Bridge/Doctrine/.gitattributes index 14c3c35940427..84c7add058fb5 100644 --- a/src/Symfony/Bridge/Doctrine/.gitattributes +++ b/src/Symfony/Bridge/Doctrine/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.git* export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore diff --git a/src/Symfony/Bridge/Doctrine/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bridge/Doctrine/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4689c4dad430e..0000000000000 --- a/src/Symfony/Bridge/Doctrine/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -Please do not submit any Pull Requests here. They will be closed. ---- - -Please submit your PR here instead: -https://github.com/symfony/symfony - -This repository is what we call a "subtree split": a read-only subset of that main repository. -We're looking forward to your PR there! diff --git a/src/Symfony/Bridge/Doctrine/.github/workflows/check-subtree-split.yml b/src/Symfony/Bridge/Doctrine/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48bae3113..0000000000000 --- a/src/Symfony/Bridge/Doctrine/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } diff --git a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php index 14d691f485a3b..b895339bd1dd7 100644 --- a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php +++ b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php @@ -12,6 +12,7 @@ namespace Symfony\Bridge\Doctrine\PropertyInfo; use Doctrine\Common\Collections\Collection; +use Doctrine\DBAL\Types\BigIntType; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Mapping\AssociationMapping; @@ -132,6 +133,15 @@ public function getTypes(string $class, string $property, array $context = []): } $nullable = $metadata instanceof ClassMetadata && $metadata->isNullable($property); + + // DBAL 4 has a special fallback strategy for BINGINT (int -> string) + if (Types::BIGINT === $typeOfField && !method_exists(BigIntType::class, 'getName')) { + return [ + new Type(Type::BUILTIN_TYPE_INT, $nullable), + new Type(Type::BUILTIN_TYPE_STRING, $nullable), + ]; + } + $enumType = null; if (null !== $enumClass = self::getMappingValue($metadata->getFieldMapping($property), 'enumType') ?? null) { $enumType = new Type(Type::BUILTIN_TYPE_OBJECT, $nullable, $enumClass); diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/MockableRepository.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/MockableRepository.php new file mode 100644 index 0000000000000..4ca59949345c3 --- /dev/null +++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/MockableRepository.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\Doctrine\Tests\Fixtures; + +use Doctrine\ORM\EntityRepository; + +class MockableRepository extends EntityRepository +{ + public function findByCustom() + { + } +} diff --git a/src/Symfony/Bridge/Doctrine/Tests/Messenger/DoctrineOpenTransactionLoggerMiddlewareTest.php b/src/Symfony/Bridge/Doctrine/Tests/Messenger/DoctrineOpenTransactionLoggerMiddlewareTest.php index 73b247ecc7f87..8d49caa38fa7e 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Messenger/DoctrineOpenTransactionLoggerMiddlewareTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Messenger/DoctrineOpenTransactionLoggerMiddlewareTest.php @@ -53,7 +53,7 @@ public function testMiddlewareWrapsInTransactionAndFlushes() { $this->connection->expects($this->exactly(1)) ->method('isTransactionActive') - ->will($this->onConsecutiveCalls(true, true, false)) + ->willReturn(true, true, false) ; $this->middleware->handle(new Envelope(new \stdClass()), $this->getStackMock()); diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php index b3e9f25413ba5..151a983fce5b0 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php @@ -15,6 +15,7 @@ use Doctrine\Common\EventManager; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; +use Doctrine\DBAL\Types\BigIntType; use Doctrine\DBAL\Types\Type as DBALType; use Doctrine\ORM\EntityManager; use Doctrine\ORM\Mapping\Driver\AttributeDriver; @@ -143,10 +144,17 @@ public function testExtractEnum() public static function typesProvider(): array { + // DBAL 4 has a special fallback strategy for BINGINT (int -> string) + if (!method_exists(BigIntType::class, 'getName')) { + $expectedBingIntType = [new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING)]; + } else { + $expectedBingIntType = [new Type(Type::BUILTIN_TYPE_STRING)]; + } + return [ ['id', [new Type(Type::BUILTIN_TYPE_INT)]], ['guid', [new Type(Type::BUILTIN_TYPE_STRING)]], - ['bigint', [new Type(Type::BUILTIN_TYPE_STRING)]], + ['bigint', $expectedBingIntType], ['time', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTime')]], ['timeImmutable', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateTimeImmutable')]], ['dateInterval', [new Type(Type::BUILTIN_TYPE_OBJECT, false, 'DateInterval')]], diff --git a/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php index aadc837aa4e72..a89ac84a7a9c1 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php @@ -236,14 +236,11 @@ private function getManager($em, $name = null) private function getObjectManager($repository) { - $em = $this->getMockBuilder(ObjectManager::class) - ->onlyMethods(['getClassMetadata', 'getRepository']) - ->getMockForAbstractClass(); - $em->expects($this->any()) - ->method('getRepository') + $objectManager = $this->createMock(ObjectManager::class); + $objectManager->method('getRepository') ->willReturn($repository); - return $em; + return $objectManager; } private function createSchema($em) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php index 5e29439368517..82c122c4ef486 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php @@ -28,6 +28,7 @@ use Symfony\Bridge\Doctrine\Tests\Fixtures\DoubleNameEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\DoubleNullableNameEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\Employee; +use Symfony\Bridge\Doctrine\Tests\Fixtures\MockableRepository; use Symfony\Bridge\Doctrine\Tests\Fixtures\Person; use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity; @@ -85,14 +86,10 @@ protected function createRegistryMock($em = null) protected function createRepositoryMock() { - $repository = $this->getMockBuilder(EntityRepository::class) + return $this->getMockBuilder(MockableRepository::class) ->disableOriginalConstructor() - ->onlyMethods(['find', 'findAll', 'findOneBy', 'findBy', 'getClassName']) - ->addMethods(['findByCustom']) - ->getMock() - ; - - return $repository; + ->onlyMethods(['find', 'findAll', 'findOneBy', 'findBy', 'getClassName', 'findByCustom']) + ->getMock(); } protected function createEntityManagerMock($repositoryMock) diff --git a/src/Symfony/Bridge/Monolog/.gitattributes b/src/Symfony/Bridge/Monolog/.gitattributes index 14c3c35940427..84c7add058fb5 100644 --- a/src/Symfony/Bridge/Monolog/.gitattributes +++ b/src/Symfony/Bridge/Monolog/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.git* export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore diff --git a/src/Symfony/Bridge/Monolog/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bridge/Monolog/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4689c4dad430e..0000000000000 --- a/src/Symfony/Bridge/Monolog/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -Please do not submit any Pull Requests here. They will be closed. ---- - -Please submit your PR here instead: -https://github.com/symfony/symfony - -This repository is what we call a "subtree split": a read-only subset of that main repository. -We're looking forward to your PR there! diff --git a/src/Symfony/Bridge/Monolog/.github/workflows/check-subtree-split.yml b/src/Symfony/Bridge/Monolog/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48bae3113..0000000000000 --- a/src/Symfony/Bridge/Monolog/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } diff --git a/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php b/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php index 6e91685e7bd86..20c16b36aac31 100644 --- a/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php +++ b/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php @@ -110,10 +110,7 @@ public function testVerbosityChanged() $output ->expects($this->exactly(2)) ->method('getVerbosity') - ->willReturnOnConsecutiveCalls( - OutputInterface::VERBOSITY_QUIET, - OutputInterface::VERBOSITY_DEBUG - ) + ->willReturn(OutputInterface::VERBOSITY_QUIET, OutputInterface::VERBOSITY_DEBUG) ; $handler = new ConsoleHandler($output); $this->assertFalse($handler->isHandling(RecordFactory::create(Logger::NOTICE)), diff --git a/src/Symfony/Bridge/PhpUnit/.gitattributes b/src/Symfony/Bridge/PhpUnit/.gitattributes index 14c3c35940427..84c7add058fb5 100644 --- a/src/Symfony/Bridge/PhpUnit/.gitattributes +++ b/src/Symfony/Bridge/PhpUnit/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.git* export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore diff --git a/src/Symfony/Bridge/PhpUnit/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bridge/PhpUnit/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4689c4dad430e..0000000000000 --- a/src/Symfony/Bridge/PhpUnit/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -Please do not submit any Pull Requests here. They will be closed. ---- - -Please submit your PR here instead: -https://github.com/symfony/symfony - -This repository is what we call a "subtree split": a read-only subset of that main repository. -We're looking forward to your PR there! diff --git a/src/Symfony/Bridge/PhpUnit/.github/workflows/check-subtree-split.yml b/src/Symfony/Bridge/PhpUnit/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48bae3113..0000000000000 --- a/src/Symfony/Bridge/PhpUnit/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php index 79d8a88e702d4..7ec293a06a41f 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -376,6 +376,12 @@ private static function getPhpUnitErrorHandler(): callable if ('PHPUnit\Util\ErrorHandler::handleError' === $eh) { return $eh; + } elseif (ErrorHandler::class === $eh) { + return function (int $errorNumber, string $errorString, string $errorFile, int $errorLine) { + ErrorHandler::instance()($errorNumber, $errorString, $errorFile, $errorLine); + + return true; + }; } foreach (debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) { diff --git a/src/Symfony/Bridge/PhpUnit/composer.json b/src/Symfony/Bridge/PhpUnit/composer.json index 6c92a3ce5af73..9febfdb8ee63e 100644 --- a/src/Symfony/Bridge/PhpUnit/composer.json +++ b/src/Symfony/Bridge/PhpUnit/composer.json @@ -32,7 +32,8 @@ "files": [ "bootstrap.php" ], "psr-4": { "Symfony\\Bridge\\PhpUnit\\": "" }, "exclude-from-classmap": [ - "/Tests/" + "/Tests/", + "/bin/" ] }, "bin": [ diff --git a/src/Symfony/Bridge/ProxyManager/.gitattributes b/src/Symfony/Bridge/ProxyManager/.gitattributes index 14c3c35940427..84c7add058fb5 100644 --- a/src/Symfony/Bridge/ProxyManager/.gitattributes +++ b/src/Symfony/Bridge/ProxyManager/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.git* export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore diff --git a/src/Symfony/Bridge/ProxyManager/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bridge/ProxyManager/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4689c4dad430e..0000000000000 --- a/src/Symfony/Bridge/ProxyManager/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -Please do not submit any Pull Requests here. They will be closed. ---- - -Please submit your PR here instead: -https://github.com/symfony/symfony - -This repository is what we call a "subtree split": a read-only subset of that main repository. -We're looking forward to your PR there! diff --git a/src/Symfony/Bridge/ProxyManager/.github/workflows/check-subtree-split.yml b/src/Symfony/Bridge/ProxyManager/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48bae3113..0000000000000 --- a/src/Symfony/Bridge/ProxyManager/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } diff --git a/src/Symfony/Bridge/PsrHttpMessage/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bridge/PsrHttpMessage/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4689c4dad430e..0000000000000 --- a/src/Symfony/Bridge/PsrHttpMessage/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -Please do not submit any Pull Requests here. They will be closed. ---- - -Please submit your PR here instead: -https://github.com/symfony/symfony - -This repository is what we call a "subtree split": a read-only subset of that main repository. -We're looking forward to your PR there! diff --git a/src/Symfony/Bridge/PsrHttpMessage/.github/workflows/check-subtree-split.yml b/src/Symfony/Bridge/PsrHttpMessage/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48bae3113..0000000000000 --- a/src/Symfony/Bridge/PsrHttpMessage/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } diff --git a/src/Symfony/Bridge/Twig/.gitattributes b/src/Symfony/Bridge/Twig/.gitattributes index 14c3c35940427..84c7add058fb5 100644 --- a/src/Symfony/Bridge/Twig/.gitattributes +++ b/src/Symfony/Bridge/Twig/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.git* export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore diff --git a/src/Symfony/Bridge/Twig/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bridge/Twig/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4689c4dad430e..0000000000000 --- a/src/Symfony/Bridge/Twig/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -Please do not submit any Pull Requests here. They will be closed. ---- - -Please submit your PR here instead: -https://github.com/symfony/symfony - -This repository is what we call a "subtree split": a read-only subset of that main repository. -We're looking forward to your PR there! diff --git a/src/Symfony/Bridge/Twig/.github/workflows/check-subtree-split.yml b/src/Symfony/Bridge/Twig/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48bae3113..0000000000000 --- a/src/Symfony/Bridge/Twig/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } diff --git a/src/Symfony/Bridge/Twig/Test/Traits/RuntimeLoaderProvider.php b/src/Symfony/Bridge/Twig/Test/Traits/RuntimeLoaderProvider.php index 1025288bc312e..52f84a7d8f23b 100644 --- a/src/Symfony/Bridge/Twig/Test/Traits/RuntimeLoaderProvider.php +++ b/src/Symfony/Bridge/Twig/Test/Traits/RuntimeLoaderProvider.php @@ -20,9 +20,9 @@ trait RuntimeLoaderProvider protected function registerTwigRuntimeLoader(Environment $environment, FormRenderer $renderer) { $loader = $this->createMock(RuntimeLoaderInterface::class); - $loader->expects($this->any())->method('load')->will($this->returnValueMap([ + $loader->expects($this->any())->method('load')->willReturnMap([ ['Symfony\Component\Form\FormRenderer', $renderer], - ])); + ]); $environment->addRuntimeLoader($loader); } } diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/HttpKernelExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/HttpKernelExtensionTest.php index 5bce112d19d0c..0c3d29508d202 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/HttpKernelExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/HttpKernelExtensionTest.php @@ -30,7 +30,7 @@ class HttpKernelExtensionTest extends TestCase { public function testFragmentWithError() { - $renderer = $this->getFragmentHandler($this->throwException(new \Exception('foo'))); + $renderer = $this->getFragmentHandler(new \Exception('foo')); $this->expectException(\Twig\Error\RuntimeError::class); @@ -39,7 +39,7 @@ public function testFragmentWithError() public function testRenderFragment() { - $renderer = $this->getFragmentHandler($this->returnValue(new Response('html'))); + $renderer = $this->getFragmentHandler(new Response('html')); $response = $this->renderTemplate($renderer); @@ -84,11 +84,17 @@ public function testGenerateFragmentUri() $this->assertSame('/_fragment?_hash=PP8%2FeEbn1pr27I9wmag%2FM6jYGVwUZ0l2h0vhh2OJ6CI%3D&_path=template%3Dfoo.html.twig%26_format%3Dhtml%26_locale%3Den%26_controller%3DSymfonyBundleFrameworkBundleControllerTemplateController%253A%253AtemplateAction', $twig->render('index')); } - protected function getFragmentHandler($return) + protected function getFragmentHandler($returnOrException): FragmentHandler { $strategy = $this->createMock(FragmentRendererInterface::class); $strategy->expects($this->once())->method('getName')->willReturn('inline'); - $strategy->expects($this->once())->method('render')->will($return); + + $mocker = $strategy->expects($this->once())->method('render'); + if ($returnOrException instanceof \Exception) { + $mocker->willThrowException($returnOrException); + } else { + $mocker->willReturn($returnOrException); + } $context = $this->createMock(RequestStack::class); diff --git a/src/Symfony/Bundle/DebugBundle/.gitattributes b/src/Symfony/Bundle/DebugBundle/.gitattributes index 14c3c35940427..84c7add058fb5 100644 --- a/src/Symfony/Bundle/DebugBundle/.gitattributes +++ b/src/Symfony/Bundle/DebugBundle/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.git* export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore diff --git a/src/Symfony/Bundle/DebugBundle/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bundle/DebugBundle/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4689c4dad430e..0000000000000 --- a/src/Symfony/Bundle/DebugBundle/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -Please do not submit any Pull Requests here. They will be closed. ---- - -Please submit your PR here instead: -https://github.com/symfony/symfony - -This repository is what we call a "subtree split": a read-only subset of that main repository. -We're looking forward to your PR there! diff --git a/src/Symfony/Bundle/DebugBundle/.github/workflows/check-subtree-split.yml b/src/Symfony/Bundle/DebugBundle/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48bae3113..0000000000000 --- a/src/Symfony/Bundle/DebugBundle/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } diff --git a/src/Symfony/Bundle/FrameworkBundle/.gitattributes b/src/Symfony/Bundle/FrameworkBundle/.gitattributes index 14c3c35940427..84c7add058fb5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/.gitattributes +++ b/src/Symfony/Bundle/FrameworkBundle/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.git* export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore diff --git a/src/Symfony/Bundle/FrameworkBundle/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bundle/FrameworkBundle/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4689c4dad430e..0000000000000 --- a/src/Symfony/Bundle/FrameworkBundle/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -Please do not submit any Pull Requests here. They will be closed. ---- - -Please submit your PR here instead: -https://github.com/symfony/symfony - -This repository is what we call a "subtree split": a read-only subset of that main repository. -We're looking forward to your PR there! diff --git a/src/Symfony/Bundle/FrameworkBundle/.github/workflows/check-subtree-split.yml b/src/Symfony/Bundle/FrameworkBundle/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48bae3113..0000000000000 --- a/src/Symfony/Bundle/FrameworkBundle/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 039707722dee3..45b9ba7bf87ed 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -1996,18 +1996,19 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder $container->setParameter('serializer.default_context', $defaultContext); } + $arguments = $container->getDefinition('serializer.normalizer.object')->getArguments(); + $context = []; + if (isset($config['circular_reference_handler']) && $config['circular_reference_handler']) { - $arguments = $container->getDefinition('serializer.normalizer.object')->getArguments(); - $context = ($arguments[6] ?? $defaultContext) + ['circular_reference_handler' => new Reference($config['circular_reference_handler'])]; + $context += ($arguments[6] ?? $defaultContext) + ['circular_reference_handler' => new Reference($config['circular_reference_handler'])]; $container->getDefinition('serializer.normalizer.object')->setArgument(5, null); - $container->getDefinition('serializer.normalizer.object')->setArgument(6, $context); } if ($config['max_depth_handler'] ?? false) { - $arguments = $container->getDefinition('serializer.normalizer.object')->getArguments(); - $context = ($arguments[6] ?? $defaultContext) + ['max_depth_handler' => new Reference($config['max_depth_handler'])]; - $container->getDefinition('serializer.normalizer.object')->setArgument(6, $context); + $context += ($arguments[6] ?? $defaultContext) + ['max_depth_handler' => new Reference($config['max_depth_handler'])]; } + + $container->getDefinition('serializer.normalizer.object')->setArgument(6, $context); } private function registerPropertyInfoConfiguration(ContainerBuilder $container, PhpFileLoader $loader): void @@ -2271,10 +2272,9 @@ private function registerMessengerConfiguration(array $config, ContainerBuilder ->setFactory([new Reference('messenger.transport_factory'), 'createTransport']) ->setArguments([$transport['dsn'], $transport['options'] + ['transport_name' => $name], new Reference($serializerId)]) ->addTag('messenger.receiver', [ - 'alias' => $name, - 'is_failure_transport' => \in_array($name, $failureTransports), - ] - ) + 'alias' => $name, + 'is_failure_transport' => \in_array($name, $failureTransports), + ]) ; $container->setDefinition($transportId = 'messenger.transport.'.$name, $transportDefinition); $senderAliases[$name] = $transportId; diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php index a9707e1221e13..385d9430168d2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php @@ -129,6 +129,8 @@ service('property_info')->ignoreOnInvalid(), service('serializer.mapping.class_discriminator_resolver')->ignoreOnInvalid(), null, + null, + service('property_info')->ignoreOnInvalid(), ]) ->tag('serializer.normalizer', ['priority' => -1000]) @@ -143,7 +145,6 @@ service('serializer.mapping.class_discriminator_resolver')->ignoreOnInvalid(), null, [], - service('property_info')->ignoreOnInvalid(), ]) ->alias(PropertyNormalizer::class, 'serializer.normalizer.property') diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php index 2ef550ef0d8b8..c31119ad35c05 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php @@ -272,7 +272,7 @@ protected function getLoader() $loader ->expects($this->exactly(7)) ->method('load') - ->willReturnOnConsecutiveCalls( + ->willReturn( $this->getCatalogue('fr', [ 'foo' => 'foo (FR)', ]), diff --git a/src/Symfony/Bundle/SecurityBundle/.gitattributes b/src/Symfony/Bundle/SecurityBundle/.gitattributes index 14c3c35940427..84c7add058fb5 100644 --- a/src/Symfony/Bundle/SecurityBundle/.gitattributes +++ b/src/Symfony/Bundle/SecurityBundle/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.git* export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore diff --git a/src/Symfony/Bundle/SecurityBundle/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bundle/SecurityBundle/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4689c4dad430e..0000000000000 --- a/src/Symfony/Bundle/SecurityBundle/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -Please do not submit any Pull Requests here. They will be closed. ---- - -Please submit your PR here instead: -https://github.com/symfony/symfony - -This repository is what we call a "subtree split": a read-only subset of that main repository. -We're looking forward to your PR there! diff --git a/src/Symfony/Bundle/SecurityBundle/.github/workflows/check-subtree-split.yml b/src/Symfony/Bundle/SecurityBundle/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48bae3113..0000000000000 --- a/src/Symfony/Bundle/SecurityBundle/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } diff --git a/src/Symfony/Bundle/TwigBundle/.gitattributes b/src/Symfony/Bundle/TwigBundle/.gitattributes index 14c3c35940427..84c7add058fb5 100644 --- a/src/Symfony/Bundle/TwigBundle/.gitattributes +++ b/src/Symfony/Bundle/TwigBundle/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.git* export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore diff --git a/src/Symfony/Bundle/TwigBundle/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bundle/TwigBundle/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4689c4dad430e..0000000000000 --- a/src/Symfony/Bundle/TwigBundle/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -Please do not submit any Pull Requests here. They will be closed. ---- - -Please submit your PR here instead: -https://github.com/symfony/symfony - -This repository is what we call a "subtree split": a read-only subset of that main repository. -We're looking forward to your PR there! diff --git a/src/Symfony/Bundle/TwigBundle/.github/workflows/check-subtree-split.yml b/src/Symfony/Bundle/TwigBundle/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48bae3113..0000000000000 --- a/src/Symfony/Bundle/TwigBundle/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } diff --git a/src/Symfony/Bundle/WebProfilerBundle/.gitattributes b/src/Symfony/Bundle/WebProfilerBundle/.gitattributes index 14c3c35940427..84c7add058fb5 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/.gitattributes +++ b/src/Symfony/Bundle/WebProfilerBundle/.gitattributes @@ -1,3 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.git* export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore diff --git a/src/Symfony/Bundle/WebProfilerBundle/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bundle/WebProfilerBundle/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4689c4dad430e..0000000000000 --- a/src/Symfony/Bundle/WebProfilerBundle/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -Please do not submit any Pull Requests here. They will be closed. ---- - -Please submit your PR here instead: -https://github.com/symfony/symfony - -This repository is what we call a "subtree split": a read-only subset of that main repository. -We're looking forward to your PR there! diff --git a/src/Symfony/Bundle/WebProfilerBundle/.github/workflows/check-subtree-split.yml b/src/Symfony/Bundle/WebProfilerBundle/.github/workflows/check-subtree-split.yml deleted file mode 100644 index 16be48bae3113..0000000000000 --- a/src/Symfony/Bundle/WebProfilerBundle/.github/workflows/check-subtree-split.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Check subtree split - -on: - pull_request_target: - -jobs: - close-pull-request: - runs-on: ubuntu-latest - - steps: - - name: Close pull request - uses: actions/github-script@v6 - with: - script: | - if (context.repo.owner === "symfony") { - github.rest.issues.createComment({ - owner: "symfony", - repo: context.repo.repo, - issue_number: context.issue.number, - body: ` - Thanks for your Pull Request! We love contributions. - - However, you should instead open your PR on the main repository: - https://github.com/symfony/symfony - - This repository is what we call a "subtree split": a read-only subset of that main repository. - We're looking forward to your PR there! - ` - }); - - github.rest.pulls.update({ - owner: "symfony", - repo: context.repo.repo, - pull_number: context.issue.number, - state: "closed" - }); - } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig index 8a669a5c6caa9..f81781066e0b6 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig @@ -75,7 +75,7 @@ } tab.addEventListener('click', function(e) { - const activeTab = e.target || e.srcElement; + let activeTab = e.target || e.srcElement; /* needed because when the tab contains HTML contents, user can click */ /* on any of those elements instead of their parent '