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 '' element */
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Twig/WebProfilerExtensionTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Twig/WebProfilerExtensionTest.php
index 37438ed560206..f0cf4f36a196f 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Twig/WebProfilerExtensionTest.php
+++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Twig/WebProfilerExtensionTest.php
@@ -15,6 +15,7 @@
use Symfony\Bundle\WebProfilerBundle\Twig\WebProfilerExtension;
use Symfony\Component\VarDumper\Cloner\VarCloner;
use Twig\Environment;
+use Twig\Loader\ArrayLoader;
class WebProfilerExtensionTest extends TestCase
{
@@ -23,7 +24,7 @@ class WebProfilerExtensionTest extends TestCase
*/
public function testDumpHeaderIsDisplayed(string $message, array $context, bool $dump1HasHeader, bool $dump2HasHeader)
{
- $twigEnvironment = $this->mockTwigEnvironment();
+ $twigEnvironment = new Environment(new ArrayLoader());
$varCloner = new VarCloner();
$webProfilerExtension = new WebProfilerExtension();
@@ -44,13 +45,4 @@ public static function provideMessages(): iterable
yield ['Some message {foo}', ['foo' => 'foo', 'bar' => 'bar'], true, false];
yield ['Some message {foo}', ['bar' => 'bar'], false, true];
}
-
- private function mockTwigEnvironment()
- {
- $twigEnvironment = $this->createMock(Environment::class);
-
- $twigEnvironment->expects($this->any())->method('getCharset')->willReturn('UTF-8');
-
- return $twigEnvironment;
- }
}
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php b/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php
index 59361f4018bb3..014e326b994fe 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php
+++ b/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php
@@ -17,6 +17,7 @@
use Twig\Extension\EscaperExtension;
use Twig\Extension\ProfilerExtension;
use Twig\Profiler\Profile;
+use Twig\Runtime\EscaperRuntime;
use Twig\TwigFunction;
/**
@@ -108,6 +109,12 @@ public function getName(): string
private static function escape(Environment $env, string $s): string
{
+ // Twig 3.10 and above
+ if (class_exists(EscaperRuntime::class)) {
+ return $env->getRuntime(EscaperRuntime::class)->escape($s);
+ }
+
+ // Twig 3.9
if (method_exists(EscaperExtension::class, 'escape')) {
return EscaperExtension::escape($env, $s);
}
diff --git a/src/Symfony/Component/Asset/.gitattributes b/src/Symfony/Component/Asset/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Asset/.gitattributes
+++ b/src/Symfony/Component/Asset/.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/Component/Asset/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Asset/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Asset/.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/Component/Asset/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Asset/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Asset/.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/Component/AssetMapper/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/AssetMapper/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/AssetMapper/.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/Component/AssetMapper/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/AssetMapper/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/AssetMapper/.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/Component/BrowserKit/.gitattributes b/src/Symfony/Component/BrowserKit/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/BrowserKit/.gitattributes
+++ b/src/Symfony/Component/BrowserKit/.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/Component/BrowserKit/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/BrowserKit/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/BrowserKit/.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/Component/BrowserKit/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/BrowserKit/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/BrowserKit/.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/Component/Cache/.gitattributes b/src/Symfony/Component/Cache/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Cache/.gitattributes
+++ b/src/Symfony/Component/Cache/.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/Component/Cache/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Cache/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Cache/.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/Component/Cache/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Cache/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Cache/.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/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php
index 7209e9ebadeaf..d59d7ff031962 100644
--- a/src/Symfony/Component/Cache/Traits/RedisTrait.php
+++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php
@@ -517,7 +517,7 @@ protected function doClear(string $namespace): bool
}
$this->doDelete($keys);
}
- } while ($cursor = (int) $cursor);
+ } while ($cursor);
}
return $cleared;
diff --git a/src/Symfony/Component/Cache/Traits/RelayProxy.php b/src/Symfony/Component/Cache/Traits/RelayProxy.php
index 90af7a7d48ed4..ac839dfda9ca0 100644
--- a/src/Symfony/Component/Cache/Traits/RelayProxy.php
+++ b/src/Symfony/Component/Cache/Traits/RelayProxy.php
@@ -276,6 +276,11 @@ public function replicaof($host = null, $port = 0): \Relay\Relay|bool
return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->replicaof(...\func_get_args());
}
+ public function waitaof($numlocal, $numremote, $timeout): \Relay\Relay|array|false
+ {
+ return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->waitaof(...\func_get_args());
+ }
+
public function restore($key, $ttl, $value, $options = null): \Relay\Relay|bool
{
return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->restore(...\func_get_args());
diff --git a/src/Symfony/Component/Clock/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Clock/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Clock/.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/Component/Clock/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Clock/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Clock/.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/Component/Config/.gitattributes b/src/Symfony/Component/Config/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Config/.gitattributes
+++ b/src/Symfony/Component/Config/.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/Component/Config/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Config/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Config/.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/Component/Config/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Config/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Config/.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/Component/Config/Tests/Definition/BaseNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/BaseNodeTest.php
index 4ea8469ef3c14..f8d3f24f42ca7 100644
--- a/src/Symfony/Component/Config/Tests/Definition/BaseNodeTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/BaseNodeTest.php
@@ -36,7 +36,36 @@ public function testGetPathForChildNode(string $expected, array $params)
}
}
- $node = $this->getMockForAbstractClass(BaseNode::class, $constructorArgs);
+ $node = new class(...$constructorArgs) extends BaseNode {
+ protected function validateType($value): void
+ {
+ }
+
+ protected function normalizeValue($value): mixed
+ {
+ return null;
+ }
+
+ protected function mergeValues($leftSide, $rightSide): mixed
+ {
+ return null;
+ }
+
+ protected function finalizeValue($value): mixed
+ {
+ return null;
+ }
+
+ public function hasDefaultValue(): bool
+ {
+ return true;
+ }
+
+ public function getDefaultValue(): mixed
+ {
+ return null;
+ }
+ };
$this->assertSame($expected, $node->getPath());
}
diff --git a/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php b/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php
index 185213964753b..4ee8fb0769fe2 100644
--- a/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php
+++ b/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php
@@ -25,13 +25,15 @@ public function testImportWithFileLocatorDelegation()
$locatorMock = $this->createMock(FileLocatorInterface::class);
$locatorMockForAdditionalLoader = $this->createMock(FileLocatorInterface::class);
- $locatorMockForAdditionalLoader->expects($this->any())->method('locate')->will($this->onConsecutiveCalls(
- ['path/to/file1'], // Default
- ['path/to/file1', 'path/to/file2'], // First is imported
- ['path/to/file1', 'path/to/file2'], // Second is imported
- ['path/to/file1'], // Exception
- ['path/to/file1', 'path/to/file2'] // Exception
- ));
+ $locatorMockForAdditionalLoader->expects($this->any())
+ ->method('locate')
+ ->willReturn(
+ ['path/to/file1'],
+ ['path/to/file1', 'path/to/file2'],
+ ['path/to/file1', 'path/to/file2'],
+ ['path/to/file1'],
+ ['path/to/file1', 'path/to/file2']
+ );
$fileLoader = new TestFileLoader($locatorMock);
$fileLoader->setSupports(false);
diff --git a/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php b/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php
index 9d8761333b9f1..89f1014aa4144 100644
--- a/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php
+++ b/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php
@@ -76,7 +76,8 @@ public function testLoadFile()
}
$mock = $this->createMock(Validator::class);
- $mock->expects($this->exactly(2))->method('validate')->will($this->onConsecutiveCalls(false, true));
+ $mock->expects($this->exactly(2))->method('validate')
+ ->willReturn(false, true);
try {
XmlUtils::loadFile($fixtures.'valid.xml', [$mock, 'validate']);
diff --git a/src/Symfony/Component/Console/.gitattributes b/src/Symfony/Component/Console/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Console/.gitattributes
+++ b/src/Symfony/Component/Console/.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/Component/Console/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Console/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Console/.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/Component/Console/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Console/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Console/.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/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php
index ca85c24b1f754..d8e1ae8b97e5d 100644
--- a/src/Symfony/Component/Console/Tests/ApplicationTest.php
+++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php
@@ -44,6 +44,7 @@
use Symfony\Component\Console\SignalRegistry\SignalRegistry;
use Symfony\Component\Console\Terminal;
use Symfony\Component\Console\Tester\ApplicationTester;
+use Symfony\Component\Console\Tests\Fixtures\MockableAppliationWithTerminalWidth;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -932,7 +933,9 @@ public function testRenderExceptionEscapesLines()
public function testRenderExceptionLineBreaks()
{
- $application = $this->getMockBuilder(Application::class)->addMethods(['getTerminalWidth'])->getMock();
+ $application = $this->getMockBuilder(MockableAppliationWithTerminalWidth::class)
+ ->onlyMethods(['getTerminalWidth'])
+ ->getMock();
$application->setAutoExit(false);
$application->expects($this->any())
->method('getTerminalWidth')
diff --git a/src/Symfony/Component/Console/Tests/Fixtures/MockableAppliationWithTerminalWidth.php b/src/Symfony/Component/Console/Tests/Fixtures/MockableAppliationWithTerminalWidth.php
new file mode 100644
index 0000000000000..7f094ff3c5946
--- /dev/null
+++ b/src/Symfony/Component/Console/Tests/Fixtures/MockableAppliationWithTerminalWidth.php
@@ -0,0 +1,22 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\Tests\Fixtures;
+
+use Symfony\Component\Console\Application;
+
+class MockableAppliationWithTerminalWidth extends Application
+{
+ public function getTerminalWidth(): int
+ {
+ return 0;
+ }
+}
diff --git a/src/Symfony/Component/Console/Tests/Question/QuestionTest.php b/src/Symfony/Component/Console/Tests/Question/QuestionTest.php
index 6e8053a35cbb0..0bc6f75db263d 100644
--- a/src/Symfony/Component/Console/Tests/Question/QuestionTest.php
+++ b/src/Symfony/Component/Console/Tests/Question/QuestionTest.php
@@ -157,7 +157,7 @@ public function testSetAutocompleterValuesInvalid($values)
public function testSetAutocompleterValuesWithTraversable()
{
$question1 = new Question('Test question 1');
- $iterator1 = $this->getMockForAbstractClass(\IteratorAggregate::class);
+ $iterator1 = $this->createMock(\IteratorAggregate::class);
$iterator1
->expects($this->once())
->method('getIterator')
@@ -165,7 +165,7 @@ public function testSetAutocompleterValuesWithTraversable()
$question1->setAutocompleterValues($iterator1);
$question2 = new Question('Test question 2');
- $iterator2 = $this->getMockForAbstractClass(\IteratorAggregate::class);
+ $iterator2 = $this->createMock(\IteratorAggregate::class);
$iterator2
->expects($this->once())
->method('getIterator')
diff --git a/src/Symfony/Component/CssSelector/.gitattributes b/src/Symfony/Component/CssSelector/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/CssSelector/.gitattributes
+++ b/src/Symfony/Component/CssSelector/.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/Component/CssSelector/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/CssSelector/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/CssSelector/.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/Component/CssSelector/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/CssSelector/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/CssSelector/.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/Component/DependencyInjection/.gitattributes b/src/Symfony/Component/DependencyInjection/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/DependencyInjection/.gitattributes
+++ b/src/Symfony/Component/DependencyInjection/.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/Component/DependencyInjection/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/DependencyInjection/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/DependencyInjection/.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/Component/DependencyInjection/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/DependencyInjection/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/DependencyInjection/.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/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php b/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php
index 9fefdd49e01e3..95de7a8b5c218 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php
@@ -40,7 +40,7 @@ public function testSupports()
*/
public function testIsFresh(callable $mockContainer, $expected)
{
- $mockContainer($this->container);
+ $mockContainer($this->container, $this);
$this->assertSame($expected, $this->resourceChecker->isFresh($this->resource, time()));
}
@@ -55,9 +55,9 @@ public static function isFreshProvider()
$container->method('getParameter')->with('locales')->willReturn(['nl', 'es']);
}, false];
- yield 'fresh on every identical parameters' => [function (MockObject $container) {
- $container->expects(self::exactly(2))->method('hasParameter')->willReturn(true);
- $container->expects(self::exactly(2))->method('getParameter')
+ yield 'fresh on every identical parameters' => [function (MockObject $container, TestCase $testCase) {
+ $container->expects($testCase->exactly(2))->method('hasParameter')->willReturn(true);
+ $container->expects($testCase->exactly(2))->method('getParameter')
->willReturnCallback(function (...$args) {
static $series = [
[['locales'], ['fr', 'en']],
diff --git a/src/Symfony/Component/DomCrawler/.gitattributes b/src/Symfony/Component/DomCrawler/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/DomCrawler/.gitattributes
+++ b/src/Symfony/Component/DomCrawler/.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/Component/DomCrawler/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/DomCrawler/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/DomCrawler/.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/Component/DomCrawler/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/DomCrawler/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/DomCrawler/.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/Component/Dotenv/.gitattributes b/src/Symfony/Component/Dotenv/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Dotenv/.gitattributes
+++ b/src/Symfony/Component/Dotenv/.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/Component/Dotenv/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Dotenv/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Dotenv/.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/Component/Dotenv/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Dotenv/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Dotenv/.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/Component/Dotenv/Command/DebugCommand.php b/src/Symfony/Component/Dotenv/Command/DebugCommand.php
index 0da80245e9fb9..d0c2723b16181 100644
--- a/src/Symfony/Component/Dotenv/Command/DebugCommand.php
+++ b/src/Symfony/Component/Dotenv/Command/DebugCommand.php
@@ -15,6 +15,7 @@
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Completion\CompletionInput;
use Symfony\Component\Console\Completion\CompletionSuggestions;
+use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@@ -80,21 +81,23 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return 1;
}
- $envFiles = $this->getEnvFiles();
- $availableFiles = array_filter($envFiles, fn (string $file) => is_file($this->getFilePath($file)));
+ $filePath = $_SERVER['SYMFONY_DOTENV_PATH'] ?? $this->projectDirectory.\DIRECTORY_SEPARATOR.'.env';
- if (\in_array('.env.local.php', $availableFiles, true)) {
- $io->warning('Due to existing dump file (.env.local.php) all other dotenv files are skipped.');
+ $envFiles = $this->getEnvFiles($filePath);
+ $availableFiles = array_filter($envFiles, 'is_file');
+
+ if (\in_array(sprintf('%s.local.php', $filePath), $availableFiles, true)) {
+ $io->warning(sprintf('Due to existing dump file (%s.local.php) all other dotenv files are skipped.', $this->getRelativeName($filePath)));
}
- if (is_file($this->getFilePath('.env')) && is_file($this->getFilePath('.env.dist'))) {
- $io->warning('The file .env.dist gets skipped due to the existence of .env.');
+ if (is_file($filePath) && is_file(sprintf('%s.dist', $filePath))) {
+ $io->warning(sprintf('The file %s.dist gets skipped due to the existence of %1$s.', $this->getRelativeName($filePath)));
}
$io->section('Scanned Files (in descending priority)');
- $io->listing(array_map(static fn (string $envFile) => \in_array($envFile, $availableFiles, true)
- ? sprintf('✓> %s', $envFile)
- : sprintf('⨯> %s', $envFile), $envFiles));
+ $io->listing(array_map(fn (string $envFile) => \in_array($envFile, $availableFiles, true)
+ ? sprintf('✓> %s', $this->getRelativeName($envFile))
+ : sprintf('⨯> %s', $this->getRelativeName($envFile)), $envFiles));
$nameFilter = $input->getArgument('filter');
$variables = $this->getVariables($availableFiles, $nameFilter);
@@ -103,8 +106,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
if ($variables || null === $nameFilter) {
$io->table(
- array_merge(['Variable', 'Value'], $availableFiles),
- $this->getVariables($availableFiles, $nameFilter)
+ array_merge(['Variable', 'Value'], array_map($this->getRelativeName(...), $availableFiles)),
+ $variables
);
$io->comment('Note that values might be different between web and CLI.');
@@ -124,75 +127,84 @@ public function complete(CompletionInput $input, CompletionSuggestions $suggesti
private function getVariables(array $envFiles, ?string $nameFilter): array
{
- $vars = $this->getAvailableVars();
-
- $output = [];
+ $variables = [];
$fileValues = [];
- foreach ($vars as $var) {
+ $dotenvVars = array_flip(explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? ''));
+
+ foreach ($envFiles as $envFile) {
+ $fileValues[$envFile] = $this->loadValues($envFile);
+ $variables += $fileValues[$envFile];
+ }
+
+ foreach ($variables as $var => $varDetails) {
if (null !== $nameFilter && 0 !== stripos($var, $nameFilter)) {
+ unset($variables[$var]);
continue;
}
- $realValue = $_SERVER[$var];
- $varDetails = [$var, $realValue];
- foreach ($envFiles as $envFile) {
- $values = $fileValues[$envFile] ??= $this->loadValues($envFile);
+ $realValue = $_SERVER[$var] ?? '';
+ $varDetails = [$var, ''.OutputFormatter::escape($realValue).'>'];
+ $varSeen = !isset($dotenvVars[$var]);
- $varString = $values[$var] ?? 'n/a>';
- $shortenedVar = $this->getHelper('formatter')->truncate($varString, 30);
- $varDetails[] = $varString === $realValue ? ''.$shortenedVar.'>' : $shortenedVar;
+ foreach ($envFiles as $envFile) {
+ if (null === $value = $fileValues[$envFile][$var] ?? null) {
+ $varDetails[] = 'n/a>';
+ continue;
+ }
+
+ $shortenedValue = OutputFormatter::escape($this->getHelper('formatter')->truncate($value, 30));
+ $varDetails[] = $value === $realValue && !$varSeen ? ''.$shortenedValue.'>' : $shortenedValue;
+ $varSeen = $varSeen || $value === $realValue;
}
- $output[] = $varDetails;
+ $variables[$var] = $varDetails;
}
- return $output;
+ ksort($variables);
+
+ return $variables;
}
private function getAvailableVars(): array
{
- $dotenvVars = $_SERVER['SYMFONY_DOTENV_VARS'] ?? '';
-
- if ('' === $dotenvVars) {
- return [];
- }
-
- $vars = explode(',', $dotenvVars);
- sort($vars);
+ $filePath = $_SERVER['SYMFONY_DOTENV_PATH'] ?? $this->projectDirectory.\DIRECTORY_SEPARATOR.'.env';
+ $envFiles = $this->getEnvFiles($filePath);
- return $vars;
+ return array_keys($this->getVariables(array_filter($envFiles, 'is_file'), null));
}
- private function getEnvFiles(): array
+ private function getEnvFiles(string $filePath): array
{
$files = [
- '.env.local.php',
- sprintf('.env.%s.local', $this->kernelEnvironment),
- sprintf('.env.%s', $this->kernelEnvironment),
+ sprintf('%s.local.php', $filePath),
+ sprintf('%s.%s.local', $filePath, $this->kernelEnvironment),
+ sprintf('%s.%s', $filePath, $this->kernelEnvironment),
];
if ('test' !== $this->kernelEnvironment) {
- $files[] = '.env.local';
+ $files[] = sprintf('%s.local', $filePath);
}
- if (!is_file($this->getFilePath('.env')) && is_file($this->getFilePath('.env.dist'))) {
- $files[] = '.env.dist';
+ if (!is_file($filePath) && is_file(sprintf('%s.dist', $filePath))) {
+ $files[] = sprintf('%s.dist', $filePath);
} else {
- $files[] = '.env';
+ $files[] = $filePath;
}
return $files;
}
- private function getFilePath(string $file): string
+ private function getRelativeName(string $filePath): string
{
- return $this->projectDirectory.\DIRECTORY_SEPARATOR.$file;
+ if (str_starts_with($filePath, $this->projectDirectory)) {
+ return substr($filePath, \strlen($this->projectDirectory) + 1);
+ }
+
+ return basename($filePath);
}
- private function loadValues(string $file): array
+ private function loadValues(string $filePath): array
{
- $filePath = $this->getFilePath($file);
-
if (str_ends_with($filePath, '.php')) {
return include $filePath;
}
diff --git a/src/Symfony/Component/Dotenv/Tests/Command/DebugCommandTest.php b/src/Symfony/Component/Dotenv/Tests/Command/DebugCommandTest.php
index 22e656d97cd43..78e2b97ab1fe1 100644
--- a/src/Symfony/Component/Dotenv/Tests/Command/DebugCommandTest.php
+++ b/src/Symfony/Component/Dotenv/Tests/Command/DebugCommandTest.php
@@ -54,6 +54,9 @@ public function testEmptyDotEnvVarsList()
---------- ------- ------------ ------%S
Variable Value .env.local .env%S
---------- ------- ------------ ------%S
+ FOO baz bar%S
+ TEST123 n/a true%S
+ ---------- ------- ------------ ------%S
// Note that values might be different between web and CLI.%S
%a
diff --git a/src/Symfony/Component/ErrorHandler/.gitattributes b/src/Symfony/Component/ErrorHandler/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/ErrorHandler/.gitattributes
+++ b/src/Symfony/Component/ErrorHandler/.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/Component/ErrorHandler/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/ErrorHandler/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/ErrorHandler/.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/Component/ErrorHandler/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/ErrorHandler/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/ErrorHandler/.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/Component/ErrorHandler/Error/FatalError.php b/src/Symfony/Component/ErrorHandler/Error/FatalError.php
index d2abe062975d0..a0657b7b8a5ed 100644
--- a/src/Symfony/Component/ErrorHandler/Error/FatalError.php
+++ b/src/Symfony/Component/ErrorHandler/Error/FatalError.php
@@ -31,7 +31,7 @@ public function __construct(string $message, int $code, array $error, ?int $trac
}
}
} elseif (null !== $traceOffset) {
- if (\function_exists('xdebug_get_function_stack') && $trace = @xdebug_get_function_stack()) {
+ if (\function_exists('xdebug_get_function_stack') && \in_array(\ini_get('xdebug.mode'), ['develop', false], true) && $trace = @xdebug_get_function_stack()) {
if (0 < $traceOffset) {
array_splice($trace, -$traceOffset);
}
diff --git a/src/Symfony/Component/EventDispatcher/.gitattributes b/src/Symfony/Component/EventDispatcher/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/EventDispatcher/.gitattributes
+++ b/src/Symfony/Component/EventDispatcher/.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/Component/EventDispatcher/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/EventDispatcher/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/EventDispatcher/.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/Component/EventDispatcher/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/EventDispatcher/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/EventDispatcher/.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/Component/ExpressionLanguage/.gitattributes b/src/Symfony/Component/ExpressionLanguage/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/ExpressionLanguage/.gitattributes
+++ b/src/Symfony/Component/ExpressionLanguage/.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/Component/ExpressionLanguage/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/ExpressionLanguage/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/ExpressionLanguage/.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/Component/ExpressionLanguage/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/ExpressionLanguage/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/ExpressionLanguage/.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/Component/Filesystem/.gitattributes b/src/Symfony/Component/Filesystem/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Filesystem/.gitattributes
+++ b/src/Symfony/Component/Filesystem/.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/Component/Filesystem/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Filesystem/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Filesystem/.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/Component/Filesystem/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Filesystem/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Filesystem/.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/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php
index 59a8bebe445cf..52ecfbda65c05 100644
--- a/src/Symfony/Component/Filesystem/Filesystem.php
+++ b/src/Symfony/Component/Filesystem/Filesystem.php
@@ -686,7 +686,7 @@ public function dumpFile(string $filename, $content)
throw new IOException(sprintf('Failed to write file "%s": ', $filename).self::$lastError, 0, null, $filename);
}
- self::box('chmod', $tmpFile, @fileperms($filename) ?: 0666 & ~umask());
+ self::box('chmod', $tmpFile, self::box('fileperms', $filename) ?: 0666 & ~umask());
$this->rename($tmpFile, $filename, true);
} finally {
diff --git a/src/Symfony/Component/Filesystem/Path.php b/src/Symfony/Component/Filesystem/Path.php
index 01b5617248616..948e1c41bdc93 100644
--- a/src/Symfony/Component/Filesystem/Path.php
+++ b/src/Symfony/Component/Filesystem/Path.php
@@ -365,7 +365,7 @@ public static function isAbsolute(string $path): bool
}
// Strip scheme
- if (false !== $schemeSeparatorPosition = strpos($path, '://')) {
+ if (false !== ($schemeSeparatorPosition = strpos($path, '://')) && 1 !== $schemeSeparatorPosition) {
$path = substr($path, $schemeSeparatorPosition + 3);
}
diff --git a/src/Symfony/Component/Filesystem/Tests/PathTest.php b/src/Symfony/Component/Filesystem/Tests/PathTest.php
index 6964e5c6ad68b..285d55f0d3345 100644
--- a/src/Symfony/Component/Filesystem/Tests/PathTest.php
+++ b/src/Symfony/Component/Filesystem/Tests/PathTest.php
@@ -375,6 +375,8 @@ public static function provideIsAbsolutePathTests(): \Generator
yield ['C:/css/style.css', true];
yield ['D:/', true];
+ yield ['C:///windows', true];
+ yield ['C://test', true];
yield ['E:\\css\\style.css', true];
yield ['F:\\', true];
diff --git a/src/Symfony/Component/Filesystem/composer.json b/src/Symfony/Component/Filesystem/composer.json
index be9da2f61943d..fd75755b2b14a 100644
--- a/src/Symfony/Component/Filesystem/composer.json
+++ b/src/Symfony/Component/Filesystem/composer.json
@@ -18,8 +18,10 @@
"require": {
"php": ">=8.1",
"symfony/polyfill-ctype": "~1.8",
- "symfony/polyfill-mbstring": "~1.8",
- "symfony/process": "^5.4|^6.4"
+ "symfony/polyfill-mbstring": "~1.8"
+ },
+ "require-dev": {
+ "symfony/process": "^5.4|^6.4|^7.0"
},
"autoload": {
"psr-4": { "Symfony\\Component\\Filesystem\\": "" },
diff --git a/src/Symfony/Component/Finder/.gitattributes b/src/Symfony/Component/Finder/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Finder/.gitattributes
+++ b/src/Symfony/Component/Finder/.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/Component/Finder/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Finder/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Finder/.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/Component/Finder/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Finder/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Finder/.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/Component/Form/.gitattributes b/src/Symfony/Component/Form/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Form/.gitattributes
+++ b/src/Symfony/Component/Form/.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/Component/Form/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Form/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Form/.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/Component/Form/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Form/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Form/.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/Component/Form/Test/Traits/ValidatorExtensionTrait.php b/src/Symfony/Component/Form/Test/Traits/ValidatorExtensionTrait.php
index 721371996996b..70240fc3e4088 100644
--- a/src/Symfony/Component/Form/Test/Traits/ValidatorExtensionTrait.php
+++ b/src/Symfony/Component/Form/Test/Traits/ValidatorExtensionTrait.php
@@ -36,8 +36,8 @@ protected function getValidatorExtension(): ValidatorExtension
$this->validator = $this->createMock(ValidatorInterface::class);
$metadata = $this->getMockBuilder(ClassMetadata::class)->setConstructorArgs([''])->onlyMethods(['addPropertyConstraint'])->getMock();
- $this->validator->expects($this->any())->method('getMetadataFor')->will($this->returnValue($metadata));
- $this->validator->expects($this->any())->method('validate')->will($this->returnValue(new ConstraintViolationList()));
+ $this->validator->expects($this->any())->method('getMetadataFor')->willReturn($metadata);
+ $this->validator->expects($this->any())->method('validate')->willReturn(new ConstraintViolationList());
return new ValidatorExtension($this->validator, false);
}
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php
index 47f21203251d6..c7918ae8b139e 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php
@@ -25,14 +25,17 @@ class DateTimeToLocalizedStringTransformerTest extends BaseDateTimeTransformerTe
protected \DateTime $dateTimeWithoutSeconds;
private string $defaultLocale;
+ private $initialTestCaseUseException;
+ private $initialTestCaseErrorLevel;
+
protected function setUp(): void
{
parent::setUp();
// Normalize intl. configuration settings.
if (\extension_loaded('intl')) {
- $this->iniSet('intl.use_exceptions', 0);
- $this->iniSet('intl.error_level', 0);
+ $this->initialTestCaseUseException = ini_set('intl.use_exceptions', 0);
+ $this->initialTestCaseErrorLevel = ini_set('intl.error_level', 0);
}
// Since we test against "de_AT", we need the full implementation
@@ -48,6 +51,11 @@ protected function setUp(): void
protected function tearDown(): void
{
\Locale::setDefault($this->defaultLocale);
+
+ if (\extension_loaded('intl')) {
+ ini_set('intl.use_exceptions', $this->initialTestCaseUseException);
+ ini_set('intl.error_level', $this->initialTestCaseUseException);
+ }
}
public static function dataProvider()
@@ -337,11 +345,15 @@ public function testReverseTransformWrapsIntlErrorsWithErrorLevel()
$this->markTestSkipped('intl extension is not loaded');
}
- $this->iniSet('intl.error_level', \E_WARNING);
+ $errorLevel = ini_set('intl.error_level', \E_WARNING);
- $this->expectException(TransformationFailedException::class);
- $transformer = new DateTimeToLocalizedStringTransformer();
- $transformer->reverseTransform('12345');
+ try {
+ $this->expectException(TransformationFailedException::class);
+ $transformer = new DateTimeToLocalizedStringTransformer();
+ $transformer->reverseTransform('12345');
+ } finally {
+ ini_set('intl.error_level', $errorLevel);
+ }
}
public function testReverseTransformWrapsIntlErrorsWithExceptions()
@@ -350,11 +362,15 @@ public function testReverseTransformWrapsIntlErrorsWithExceptions()
$this->markTestSkipped('intl extension is not loaded');
}
- $this->iniSet('intl.use_exceptions', 1);
+ $initialUseExceptions = ini_set('intl.use_exceptions', 1);
- $this->expectException(TransformationFailedException::class);
- $transformer = new DateTimeToLocalizedStringTransformer();
- $transformer->reverseTransform('12345');
+ try {
+ $this->expectException(TransformationFailedException::class);
+ $transformer = new DateTimeToLocalizedStringTransformer();
+ $transformer->reverseTransform('12345');
+ } finally {
+ ini_set('intl.use_exceptions', $initialUseExceptions);
+ }
}
public function testReverseTransformWrapsIntlErrorsWithExceptionsAndErrorLevel()
@@ -363,12 +379,17 @@ public function testReverseTransformWrapsIntlErrorsWithExceptionsAndErrorLevel()
$this->markTestSkipped('intl extension is not loaded');
}
- $this->iniSet('intl.use_exceptions', 1);
- $this->iniSet('intl.error_level', \E_WARNING);
+ $initialUseExceptions = ini_set('intl.use_exceptions', 1);
+ $initialErrorLevel = ini_set('intl.error_level', \E_WARNING);
- $this->expectException(TransformationFailedException::class);
- $transformer = new DateTimeToLocalizedStringTransformer();
- $transformer->reverseTransform('12345');
+ try {
+ $this->expectException(TransformationFailedException::class);
+ $transformer = new DateTimeToLocalizedStringTransformer();
+ $transformer->reverseTransform('12345');
+ } finally {
+ ini_set('intl.use_exceptions', $initialUseExceptions);
+ ini_set('intl.error_level', $initialErrorLevel);
+ }
}
protected function createDateTimeTransformer(?string $inputTimezone = null, ?string $outputTimezone = null): BaseDateTimeTransformer
diff --git a/src/Symfony/Component/HtmlSanitizer/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/HtmlSanitizer/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/HtmlSanitizer/.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/Component/HtmlSanitizer/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/HtmlSanitizer/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/HtmlSanitizer/.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/Component/HttpClient/.gitattributes b/src/Symfony/Component/HttpClient/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/HttpClient/.gitattributes
+++ b/src/Symfony/Component/HttpClient/.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/Component/HttpClient/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/HttpClient/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/HttpClient/.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/Component/HttpClient/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/HttpClient/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/HttpClient/.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/Component/HttpFoundation/.gitattributes b/src/Symfony/Component/HttpFoundation/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/HttpFoundation/.gitattributes
+++ b/src/Symfony/Component/HttpFoundation/.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/Component/HttpFoundation/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/HttpFoundation/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/HttpFoundation/.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/Component/HttpFoundation/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/HttpFoundation/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/HttpFoundation/.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/Component/HttpFoundation/HeaderUtils.php b/src/Symfony/Component/HttpFoundation/HeaderUtils.php
index 3456edace0dc1..110896e1776d1 100644
--- a/src/Symfony/Component/HttpFoundation/HeaderUtils.php
+++ b/src/Symfony/Component/HttpFoundation/HeaderUtils.php
@@ -286,7 +286,11 @@ private static function groupParts(array $matches, string $separators, bool $fir
}
foreach ($partMatches as $matches) {
- $parts[] = '' === $separators ? self::unquote($matches[0][0]) : self::groupParts($matches, $separators, false);
+ if ('' === $separators && '' !== $unquoted = self::unquote($matches[0][0])) {
+ $parts[] = $unquoted;
+ } elseif ($groupedParts = self::groupParts($matches, $separators, false)) {
+ $parts[] = $groupedParts;
+ }
}
return $parts;
diff --git a/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php b/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php
index bf4582430503e..e972d714e068a 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php
@@ -41,6 +41,8 @@ public static function provideFromStringData()
{
return [
['', []],
+ [';;;', []],
+ ['0', [new AcceptHeaderItem('0')]],
['gzip', [new AcceptHeaderItem('gzip')]],
['gzip,deflate,sdch', [new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch')]],
["gzip, deflate\t,sdch", [new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch')]],
diff --git a/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php
index e5443c0b8b6f3..2058280c5bafa 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php
@@ -190,6 +190,14 @@ public function testConstructorWithObjectWithoutToStringMethodThrowsAnException(
new JsonResponse(new \stdClass(), 200, [], true);
}
+
+ public function testSetDataWithNull()
+ {
+ $response = new JsonResponse();
+ $response->setData(null);
+
+ $this->assertSame('null', $response->getContent());
+ }
}
class JsonSerializableObject implements \JsonSerializable
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php
index a59c8de5f3c4b..d2e198eeba8e5 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php
@@ -34,10 +34,14 @@ class NativeSessionStorageTest extends TestCase
{
private string $savePath;
+ private $initialSessionSaveHandler;
+ private $initialSessionSavePath;
+
protected function setUp(): void
{
- $this->iniSet('session.save_handler', 'files');
- $this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sftest');
+ $this->initialSessionSaveHandler = ini_set('session.save_handler', 'files');
+ $this->initialSessionSavePath = ini_set('session.save_path', $this->savePath = sys_get_temp_dir().'/sftest');
+
if (!is_dir($this->savePath)) {
mkdir($this->savePath);
}
@@ -50,6 +54,9 @@ protected function tearDown(): void
if (is_dir($this->savePath)) {
@rmdir($this->savePath);
}
+
+ ini_set('session.save_handler', $this->initialSessionSaveHandler);
+ ini_set('session.save_path', $this->initialSessionSavePath);
}
protected function getStorage(array $options = []): NativeSessionStorage
@@ -152,18 +159,26 @@ public function testRegenerationFailureDoesNotFlagStorageAsStarted()
public function testDefaultSessionCacheLimiter()
{
- $this->iniSet('session.cache_limiter', 'nocache');
+ $initialLimiter = ini_set('session.cache_limiter', 'nocache');
- new NativeSessionStorage();
- $this->assertEquals('', \ini_get('session.cache_limiter'));
+ try {
+ new NativeSessionStorage();
+ $this->assertEquals('', \ini_get('session.cache_limiter'));
+ } finally {
+ ini_set('session.cache_limiter', $initialLimiter);
+ }
}
public function testExplicitSessionCacheLimiter()
{
- $this->iniSet('session.cache_limiter', 'nocache');
+ $initialLimiter = ini_set('session.cache_limiter', 'nocache');
- new NativeSessionStorage(['cache_limiter' => 'public']);
- $this->assertEquals('public', \ini_get('session.cache_limiter'));
+ try {
+ new NativeSessionStorage(['cache_limiter' => 'public']);
+ $this->assertEquals('public', \ini_get('session.cache_limiter'));
+ } finally {
+ ini_set('session.cache_limiter', $initialLimiter);
+ }
}
public function testCookieOptions()
@@ -203,18 +218,23 @@ public function testSessionOptions()
public function testSetSaveHandler()
{
- $this->iniSet('session.save_handler', 'files');
- $storage = $this->getStorage();
- $storage->setSaveHandler(null);
- $this->assertInstanceOf(SessionHandlerProxy::class, $storage->getSaveHandler());
- $storage->setSaveHandler(new SessionHandlerProxy(new NativeFileSessionHandler()));
- $this->assertInstanceOf(SessionHandlerProxy::class, $storage->getSaveHandler());
- $storage->setSaveHandler(new NativeFileSessionHandler());
- $this->assertInstanceOf(SessionHandlerProxy::class, $storage->getSaveHandler());
- $storage->setSaveHandler(new SessionHandlerProxy(new NullSessionHandler()));
- $this->assertInstanceOf(SessionHandlerProxy::class, $storage->getSaveHandler());
- $storage->setSaveHandler(new NullSessionHandler());
- $this->assertInstanceOf(SessionHandlerProxy::class, $storage->getSaveHandler());
+ $initialSaveHandler = ini_set('session.save_handler', 'files');
+
+ try {
+ $storage = $this->getStorage();
+ $storage->setSaveHandler(null);
+ $this->assertInstanceOf(SessionHandlerProxy::class, $storage->getSaveHandler());
+ $storage->setSaveHandler(new SessionHandlerProxy(new NativeFileSessionHandler()));
+ $this->assertInstanceOf(SessionHandlerProxy::class, $storage->getSaveHandler());
+ $storage->setSaveHandler(new NativeFileSessionHandler());
+ $this->assertInstanceOf(SessionHandlerProxy::class, $storage->getSaveHandler());
+ $storage->setSaveHandler(new SessionHandlerProxy(new NullSessionHandler()));
+ $this->assertInstanceOf(SessionHandlerProxy::class, $storage->getSaveHandler());
+ $storage->setSaveHandler(new NullSessionHandler());
+ $this->assertInstanceOf(SessionHandlerProxy::class, $storage->getSaveHandler());
+ } finally {
+ ini_set('session.save_handler', $initialSaveHandler);
+ }
}
public function testStarted()
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php
index 5a777be9ce590..5fbc3833576d9 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php
@@ -30,10 +30,14 @@ class PhpBridgeSessionStorageTest extends TestCase
{
private string $savePath;
+ private $initialSessionSaveHandler;
+ private $initialSessionSavePath;
+
protected function setUp(): void
{
- $this->iniSet('session.save_handler', 'files');
- $this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sftest');
+ $this->initialSessionSaveHandler = ini_set('session.save_handler', 'files');
+ $this->initialSessionSavePath = ini_set('session.save_path', $this->savePath = sys_get_temp_dir().'/sftest');
+
if (!is_dir($this->savePath)) {
mkdir($this->savePath);
}
@@ -46,6 +50,9 @@ protected function tearDown(): void
if (is_dir($this->savePath)) {
@rmdir($this->savePath);
}
+
+ ini_set('session.save_handler', $this->initialSessionSaveHandler);
+ ini_set('session.save_path', $this->initialSessionSavePath);
}
protected function getStorage(): PhpBridgeSessionStorage
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php
index 0d9eb56aecc07..bb459bb9fa05c 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php
@@ -23,11 +23,11 @@
*/
class AbstractProxyTest extends TestCase
{
- protected MockObject&AbstractProxy $proxy;
+ protected AbstractProxy $proxy;
protected function setUp(): void
{
- $this->proxy = $this->getMockForAbstractClass(AbstractProxy::class);
+ $this->proxy = new class() extends AbstractProxy {};
}
public function testGetSaveHandlerName()
diff --git a/src/Symfony/Component/HttpKernel/.gitattributes b/src/Symfony/Component/HttpKernel/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/HttpKernel/.gitattributes
+++ b/src/Symfony/Component/HttpKernel/.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/Component/HttpKernel/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/HttpKernel/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/HttpKernel/.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/Component/HttpKernel/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/HttpKernel/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/HttpKernel/.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/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php
index d0926d42fbbdb..8ffde8fe164a9 100644
--- a/src/Symfony/Component/HttpKernel/Kernel.php
+++ b/src/Symfony/Component/HttpKernel/Kernel.php
@@ -76,11 +76,11 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
*/
private static array $freshCache = [];
- public const VERSION = '6.4.7';
- public const VERSION_ID = 60407;
+ public const VERSION = '6.4.8';
+ public const VERSION_ID = 60408;
public const MAJOR_VERSION = 6;
public const MINOR_VERSION = 4;
- public const RELEASE_VERSION = 7;
+ public const RELEASE_VERSION = 8;
public const EXTRA_VERSION = '';
public const END_OF_MAINTENANCE = '11/2026';
diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php
index 49774f835bb52..e9bc584048094 100644
--- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php
@@ -55,21 +55,25 @@ public function testConstruct()
*/
public function testHandleWithoutLogger($event, $event2)
{
- $this->iniSet('error_log', file_exists('/dev/null') ? '/dev/null' : 'nul');
-
- $l = new ErrorListener('foo');
- $l->logKernelException($event);
- $l->onKernelException($event);
-
- $this->assertEquals(new Response('foo'), $event->getResponse());
+ $initialErrorLog = ini_set('error_log', file_exists('/dev/null') ? '/dev/null' : 'nul');
try {
- $l->logKernelException($event2);
- $l->onKernelException($event2);
- $this->fail('RuntimeException expected');
- } catch (\RuntimeException $e) {
- $this->assertSame('bar', $e->getMessage());
- $this->assertSame('foo', $e->getPrevious()->getMessage());
+ $l = new ErrorListener('foo');
+ $l->logKernelException($event);
+ $l->onKernelException($event);
+
+ $this->assertEquals(new Response('foo'), $event->getResponse());
+
+ try {
+ $l->logKernelException($event2);
+ $l->onKernelException($event2);
+ $this->fail('RuntimeException expected');
+ } catch (\RuntimeException $e) {
+ $this->assertSame('bar', $e->getMessage());
+ $this->assertSame('foo', $e->getPrevious()->getMessage());
+ }
+ } finally {
+ ini_set('error_log', $initialErrorLog);
}
}
diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php
index afad291636dfa..5837407abeb63 100644
--- a/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php
@@ -21,6 +21,7 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\SessionFactory;
+use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorageFactory;
use Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorageFactory;
@@ -44,7 +45,7 @@ class SessionListenerTest extends TestCase
public function testSessionCookieOptions(array $phpSessionOptions, array $sessionOptions, array $expectedSessionOptions)
{
$session = $this->createMock(Session::class);
- $session->method('getUsageIndex')->will($this->onConsecutiveCalls(0, 1));
+ $session->method('getUsageIndex')->willReturn(0, 1);
$session->method('getId')->willReturn('123456');
$session->method('getName')->willReturn('PHPSESSID');
$session->method('save');
@@ -335,7 +336,13 @@ public function testSessionCookieSetWhenOtherNativeVariablesSet()
public function testOnlyTriggeredOnMainRequest()
{
- $listener = $this->getMockForAbstractClass(AbstractSessionListener::class);
+ $listener = new class() extends AbstractSessionListener {
+ protected function getSession(): ?SessionInterface
+ {
+ return null;
+ }
+ };
+
$event = $this->createMock(RequestEvent::class);
$event->expects($this->once())->method('isMainRequest')->willReturn(false);
$event->expects($this->never())->method('getRequest');
@@ -493,7 +500,7 @@ public function testResponseIsStillPublicIfSessionStartedAndHeaderPresent()
public function testSessionSaveAndResponseHasSessionCookie()
{
$session = $this->getMockBuilder(Session::class)->disableOriginalConstructor()->getMock();
- $session->expects($this->exactly(1))->method('getUsageIndex')->will($this->onConsecutiveCalls(0, 1));
+ $session->expects($this->exactly(1))->method('getUsageIndex')->willReturn(0);
$session->expects($this->exactly(1))->method('getId')->willReturn('123456');
$session->expects($this->exactly(1))->method('getName')->willReturn('PHPSESSID');
$session->expects($this->exactly(1))->method('save');
@@ -646,7 +653,7 @@ public function testSurrogateMainRequestIsPublic()
{
$session = $this->createMock(Session::class);
$session->expects($this->exactly(1))->method('getName')->willReturn('PHPSESSID');
- $session->expects($this->exactly(2))->method('getUsageIndex')->will($this->onConsecutiveCalls(0, 1));
+ $session->expects($this->exactly(2))->method('getUsageIndex')->willReturn(0, 1);
$sessionFactory = $this->createMock(SessionFactory::class);
$sessionFactory->expects($this->once())->method('createSession')->willReturn($session);
diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTestWithLoadClassCache.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTestWithLoadClassCache.php
new file mode 100644
index 0000000000000..080953fe02afd
--- /dev/null
+++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTestWithLoadClassCache.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Tests\Fixtures;
+
+class KernelForTestWithLoadClassCache extends KernelForTest
+{
+ public function doLoadClassCache(): void
+ {
+ }
+}
diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/MockableUploadFileWithClientSize.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/MockableUploadFileWithClientSize.php
new file mode 100644
index 0000000000000..406f07a283fd3
--- /dev/null
+++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/MockableUploadFileWithClientSize.php
@@ -0,0 +1,22 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Tests\Fixtures;
+
+use Symfony\Component\HttpFoundation\File\UploadedFile;
+
+class MockableUploadFileWithClientSize extends UploadedFile
+{
+ public function getClientSize(): int
+ {
+ return 0;
+ }
+}
diff --git a/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php b/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php
index 05e4dfa410c75..c9e22633b7a6d 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php
@@ -43,14 +43,14 @@ public function testRenderWhenRendererDoesNotExist()
public function testRenderWithUnknownRenderer()
{
$this->expectException(\InvalidArgumentException::class);
- $handler = $this->getHandler($this->returnValue(new Response('foo')));
+ $handler = $this->getHandler(new Response('foo'));
$handler->render('/', 'bar');
}
public function testDeliverWithUnsuccessfulResponse()
{
- $handler = $this->getHandler($this->returnValue(new Response('foo', 404)));
+ $handler = $this->getHandler(new Response('foo', 404));
try {
$handler->render('/', 'foo');
$this->fail('->render() throws a \RuntimeException exception if response is not successful');
@@ -70,7 +70,7 @@ public function testRender()
{
$expectedRequest = Request::create('/');
$handler = $this->getHandler(
- $this->returnValue(new Response('foo')),
+ new Response('foo'),
[
'/',
$this->callback(function (Request $request) use ($expectedRequest) {
@@ -97,7 +97,7 @@ protected function getHandler($returnValue, $arguments = [])
$e = $renderer
->expects($this->any())
->method('render')
- ->will($returnValue)
+ ->willReturn($returnValue)
;
if ($arguments) {
diff --git a/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php b/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php
index c5cec4ba7aa3c..2d492c5359289 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php
@@ -33,14 +33,14 @@ class InlineFragmentRendererTest extends TestCase
{
public function testRender()
{
- $strategy = new InlineFragmentRenderer($this->getKernel($this->returnValue(new Response('foo'))));
+ $strategy = new InlineFragmentRenderer($this->getKernel(new Response('foo')));
$this->assertEquals('foo', $strategy->render('/', Request::create('/'))->getContent());
}
public function testRenderWithControllerReference()
{
- $strategy = new InlineFragmentRenderer($this->getKernel($this->returnValue(new Response('foo'))));
+ $strategy = new InlineFragmentRenderer($this->getKernel(new Response('foo')));
$this->assertEquals('foo', $strategy->render(new ControllerReference('main_controller', [], []), Request::create('/'))->getContent());
}
@@ -81,7 +81,7 @@ public function testRenderExceptionNoIgnoreErrors()
$dispatcher = $this->createMock(EventDispatcherInterface::class);
$dispatcher->expects($this->never())->method('dispatch');
- $strategy = new InlineFragmentRenderer($this->getKernel($this->throwException(new \RuntimeException('foo'))), $dispatcher);
+ $strategy = new InlineFragmentRenderer($this->getKernel(new \RuntimeException('foo')), $dispatcher);
$this->assertEquals('foo', $strategy->render('/', Request::create('/'))->getContent());
}
@@ -89,7 +89,7 @@ public function testRenderExceptionNoIgnoreErrors()
public function testRenderExceptionIgnoreErrors()
{
$exception = new \RuntimeException('foo');
- $kernel = $this->getKernel($this->throwException($exception));
+ $kernel = $this->getKernel($exception);
$request = Request::create('/');
$expectedEvent = new ExceptionEvent($kernel, $request, $kernel::SUB_REQUEST, $exception);
$dispatcher = $this->createMock(EventDispatcherInterface::class);
@@ -102,10 +102,17 @@ public function testRenderExceptionIgnoreErrors()
public function testRenderExceptionIgnoreErrorsWithAlt()
{
- $strategy = new InlineFragmentRenderer($this->getKernel($this->onConsecutiveCalls(
- $this->throwException(new \RuntimeException('foo')),
- $this->returnValue(new Response('bar'))
- )));
+ $strategy = new InlineFragmentRenderer($this->getKernel(function () {
+ static $firstCall = true;
+
+ if ($firstCall) {
+ $firstCall = false;
+
+ throw new \RuntimeException('foo');
+ }
+
+ return new Response('bar');
+ }));
$this->assertEquals('bar', $strategy->render('/', Request::create('/'), ['ignore_errors' => true, 'alt' => '/foo'])->getContent());
}
@@ -113,12 +120,19 @@ public function testRenderExceptionIgnoreErrorsWithAlt()
private function getKernel($returnValue)
{
$kernel = $this->createMock(HttpKernelInterface::class);
- $kernel
+ $mocker = $kernel
->expects($this->any())
->method('handle')
- ->will($returnValue)
;
+ if ($returnValue instanceof \Exception) {
+ $mocker->willThrowException($returnValue);
+ } elseif ($returnValue instanceof \Closure) {
+ $mocker->willReturnCallback($returnValue);
+ } else {
+ $mocker->willReturn(...(\is_array($returnValue) ? $returnValue : [$returnValue]));
+ }
+
return $kernel;
}
diff --git a/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php b/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php
index 1de49d631f8c5..24212215660ae 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php
@@ -75,7 +75,7 @@ public static function getGenerateFragmentUriDataWithNonScalar()
private function callGenerateFragmentUriMethod(ControllerReference $reference, Request $request, $absolute = false)
{
- $renderer = $this->getMockForAbstractClass(RoutableFragmentRenderer::class);
+ $renderer = $this->createStub(RoutableFragmentRenderer::class);
$r = new \ReflectionObject($renderer);
$m = $r->getMethod('generateFragmentUri');
diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php
index e876f28189087..677d38be62896 100644
--- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php
@@ -245,7 +245,7 @@ protected function getCache($request, $response)
if (\is_array($response)) {
$cache->expects($this->any())
->method('handle')
- ->will($this->onConsecutiveCalls(...$response))
+ ->willReturn(...$response)
;
} else {
$cache->expects($this->any())
diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/SsiTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/SsiTest.php
index 97cc8fccd03d0..15e6ebcaee5c6 100644
--- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/SsiTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/SsiTest.php
@@ -201,7 +201,7 @@ protected function getCache($request, $response)
if (\is_array($response)) {
$cache->expects($this->any())
->method('handle')
- ->will($this->onConsecutiveCalls(...$response))
+ ->willReturn(...$response)
;
} else {
$cache->expects($this->any())
diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpKernelBrowserTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpKernelBrowserTest.php
index b0c9095b1a255..51fcbfac23dc9 100644
--- a/src/Symfony/Component/HttpKernel/Tests/HttpKernelBrowserTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/HttpKernelBrowserTest.php
@@ -18,6 +18,7 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\HttpKernel\HttpKernelBrowser;
+use Symfony\Component\HttpKernel\Tests\Fixtures\MockableUploadFileWithClientSize;
use Symfony\Component\HttpKernel\Tests\Fixtures\TestClient;
/**
@@ -151,10 +152,9 @@ public function testUploadedFileWhenSizeExceedsUploadMaxFileSize()
$client = new HttpKernelBrowser($kernel);
$file = $this
- ->getMockBuilder(UploadedFile::class)
+ ->getMockBuilder(MockableUploadFileWithClientSize::class)
->setConstructorArgs([$source, 'original', 'mime/original', \UPLOAD_ERR_OK, true])
- ->onlyMethods(['getSize'])
- ->addMethods(['getClientSize'])
+ ->onlyMethods(['getSize', 'getClientSize'])
->getMock()
;
/* should be modified when the getClientSize will be removed */
diff --git a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php
index 77bae4edfc8c8..fc5cffb6a7a48 100644
--- a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php
@@ -34,6 +34,7 @@
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest;
+use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTestWithLoadClassCache;
use Symfony\Component\HttpKernel\Tests\Fixtures\KernelWithoutBundles;
use Symfony\Component\HttpKernel\Tests\Fixtures\ResettableService;
@@ -154,7 +155,7 @@ public function testBootSetsTheBootedFlagToTrue()
public function testClassCacheIsNotLoadedByDefault()
{
- $kernel = $this->getKernel(['initializeBundles'], [], false, ['doLoadClassCache']);
+ $kernel = $this->getKernel(['initializeBundles', 'doLoadClassCache'], [], false, KernelForTestWithLoadClassCache::class);
$kernel->expects($this->never())
->method('doLoadClassCache');
@@ -410,7 +411,7 @@ public function testLocateResourceOnDirectories()
$kernel
->expects($this->exactly(2))
->method('getBundle')
- ->willReturn($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle', null, null, 'Bundle1Bundle'))
+ ->willReturn($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle', null, 'Bundle1Bundle'))
;
$this->assertEquals(
@@ -427,8 +428,8 @@ public function testInitializeBundleThrowsExceptionWhenRegisteringTwoBundlesWith
{
$this->expectException(\LogicException::class);
$this->expectExceptionMessage('Trying to register two bundles with the same name "DuplicateName"');
- $fooBundle = $this->getBundle(__DIR__.'/Fixtures/FooBundle', null, 'FooBundle', 'DuplicateName');
- $barBundle = $this->getBundle(__DIR__.'/Fixtures/BarBundle', null, 'BarBundle', 'DuplicateName');
+ $fooBundle = $this->getBundle(__DIR__.'/Fixtures/FooBundle', 'FooBundle', 'DuplicateName');
+ $barBundle = $this->getBundle(__DIR__.'/Fixtures/BarBundle', 'BarBundle', 'DuplicateName');
$kernel = $this->getKernel([], [$fooBundle, $barBundle]);
$kernel->boot();
@@ -675,11 +676,10 @@ public function getContainerClass(): string
/**
* Returns a mock for the BundleInterface.
*/
- protected function getBundle($dir = null, $parent = null, $className = null, $bundleName = null): BundleInterface
+ protected function getBundle($dir = null, $className = null, $bundleName = null): BundleInterface
{
$bundle = $this
->getMockBuilder(BundleInterface::class)
- ->onlyMethods(['getPath', 'getName'])
->disableOriginalConstructor()
;
@@ -687,7 +687,7 @@ protected function getBundle($dir = null, $parent = null, $className = null, $bu
$bundle->setMockClassName($className);
}
- $bundle = $bundle->getMockForAbstractClass();
+ $bundle = $bundle->getMock();
$bundle
->expects($this->any())
@@ -710,20 +710,16 @@ protected function getBundle($dir = null, $parent = null, $className = null, $bu
* @param array $methods Additional methods to mock (besides the abstract ones)
* @param array $bundles Bundles to register
*/
- protected function getKernel(array $methods = [], array $bundles = [], bool $debug = false, array $methodsToAdd = []): Kernel
+ protected function getKernel(array $methods = [], array $bundles = [], bool $debug = false, string $kernelClass = KernelForTest::class): Kernel
{
$methods[] = 'registerBundles';
$kernelMockBuilder = $this
- ->getMockBuilder(KernelForTest::class)
+ ->getMockBuilder($kernelClass)
->onlyMethods($methods)
->setConstructorArgs(['test', $debug])
;
- if (0 !== \count($methodsToAdd)) {
- $kernelMockBuilder->addMethods($methodsToAdd);
- }
-
$kernel = $kernelMockBuilder->getMock();
$kernel->expects($this->any())
->method('registerBundles')
diff --git a/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php b/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php
index 863502f61c229..c701a894e26e7 100644
--- a/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php
@@ -46,14 +46,19 @@ public function testCheck()
public function testCheckWithDifferentArgSeparator()
{
- $this->iniSet('arg_separator.output', '&');
- $signer = new UriSigner('foobar');
-
- $this->assertSame(
- 'http://example.com/foo?_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D&baz=bay&foo=bar',
- $signer->sign('http://example.com/foo?foo=bar&baz=bay')
- );
- $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&baz=bay')));
+ $initialSeparatorOutput = ini_set('arg_separator.output', '&');
+
+ try {
+ $signer = new UriSigner('foobar');
+
+ $this->assertSame(
+ 'http://example.com/foo?_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D&baz=bay&foo=bar',
+ $signer->sign('http://example.com/foo?foo=bar&baz=bay')
+ );
+ $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&baz=bay')));
+ } finally {
+ ini_set('arg_separator.output', $initialSeparatorOutput);
+ }
}
public function testCheckWithRequest()
diff --git a/src/Symfony/Component/Intl/.gitattributes b/src/Symfony/Component/Intl/.gitattributes
index c1f028792d417..0c6486dd99140 100644
--- a/src/Symfony/Component/Intl/.gitattributes
+++ b/src/Symfony/Component/Intl/.gitattributes
@@ -1,4 +1,3 @@
/Tests export-ignore
/phpunit.xml.dist export-ignore
/Resources/emoji export-ignore
-/.git* export-ignore
diff --git a/src/Symfony/Component/Intl/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Intl/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Intl/.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/Component/Intl/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Intl/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Intl/.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/Component/Ldap/.gitattributes b/src/Symfony/Component/Ldap/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Ldap/.gitattributes
+++ b/src/Symfony/Component/Ldap/.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/Component/Ldap/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Ldap/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Ldap/.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/Component/Ldap/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Ldap/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Ldap/.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/Component/Ldap/Adapter/ExtLdap/UpdateOperation.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/UpdateOperation.php
index c2be3d57d48fb..f89244e303c16 100644
--- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/UpdateOperation.php
+++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/UpdateOperation.php
@@ -48,10 +48,15 @@ public function __construct(int $operationType, string $attribute, ?array $value
public function toArray(): array
{
- return [
+ $op = [
'attrib' => $this->attribute,
'modtype' => $this->operationType,
- 'values' => $this->values,
];
+
+ if (\LDAP_MODIFY_BATCH_REMOVE_ALL !== $this->operationType) {
+ $op['values'] = $this->values;
+ }
+
+ return $op;
}
}
diff --git a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php
index b803c7b300626..cd1b1c0bd5639 100644
--- a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php
+++ b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php
@@ -265,6 +265,23 @@ public function testLdapAddAttributeValuesError()
$entryManager->addAttributeValues($entry, 'mail', $entry->getAttribute('mail'));
}
+ public function testLdapApplyOperationsRemoveAll()
+ {
+ $entryManager = $this->adapter->getEntryManager();
+
+ $result = $this->executeSearchQuery(1);
+ $entry = $result[0];
+
+ $entryManager->applyOperations($entry->getDn(), [new UpdateOperation(\LDAP_MODIFY_BATCH_REMOVE_ALL, 'mail', null)]);
+
+ $result = $this->executeSearchQuery(1);
+ $entry = $result[0];
+
+ $this->assertNull($entry->getAttribute('mail'));
+
+ $entryManager->addAttributeValues($entry, 'mail', ['fabpot@symfony.com', 'fabien@potencier.com']);
+ }
+
public function testLdapApplyOperationsRemoveAllWithArrayError()
{
$entryManager = $this->adapter->getEntryManager();
diff --git a/src/Symfony/Component/Lock/.gitattributes b/src/Symfony/Component/Lock/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Lock/.gitattributes
+++ b/src/Symfony/Component/Lock/.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/Component/Lock/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Lock/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Lock/.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/Component/Lock/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Lock/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Lock/.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/Component/Lock/Tests/LockTest.php b/src/Symfony/Component/Lock/Tests/LockTest.php
index 5c8c1ce3f0e7c..aed4eb8915e77 100644
--- a/src/Symfony/Component/Lock/Tests/LockTest.php
+++ b/src/Symfony/Component/Lock/Tests/LockTest.php
@@ -41,7 +41,7 @@ public function testAcquireNoBlocking()
->method('save');
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$this->assertTrue($lock->acquire(false));
}
@@ -57,7 +57,7 @@ public function testAcquireNoBlockingWithPersistingStoreInterface()
->method('save');
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$this->assertTrue($lock->acquire(false));
}
@@ -73,7 +73,7 @@ public function testAcquireBlockingWithPersistingStoreInterface()
->method('save');
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$this->assertTrue($lock->acquire(true));
}
@@ -95,7 +95,7 @@ public function testAcquireBlockingRetryWithPersistingStoreInterface()
});
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$this->assertTrue($lock->acquire(true));
}
@@ -112,7 +112,7 @@ public function testAcquireReturnsFalse()
->willThrowException(new LockConflictedException());
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$this->assertFalse($lock->acquire(false));
}
@@ -129,7 +129,7 @@ public function testAcquireReturnsFalseStoreInterface()
->willThrowException(new LockConflictedException());
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$this->assertFalse($lock->acquire(false));
}
@@ -148,7 +148,7 @@ public function testAcquireBlockingWithBlockingStoreInterface()
->method('waitAndSave');
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$this->assertTrue($lock->acquire(true));
}
@@ -168,7 +168,7 @@ public function testAcquireSetsTtl()
->with($key, 10);
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$lock->acquire();
}
@@ -185,7 +185,7 @@ public function testRefresh()
->with($key, 10);
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$lock->refresh();
}
@@ -202,7 +202,7 @@ public function testRefreshCustom()
->with($key, 20);
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$lock->refresh(20);
}
@@ -216,7 +216,7 @@ public function testIsAquired()
$store
->method('exists')
->with($key)
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$this->assertTrue($lock->isAcquired());
}
@@ -269,8 +269,8 @@ public function testReleaseOnDestruction()
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false)
- ;
+ ->willReturn(true, false);
+
$store
->expects($this->once())
->method('delete')
@@ -288,8 +288,8 @@ public function testNoAutoReleaseWhenNotConfigured()
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false)
- ;
+ ->willReturn(true, false);
+
$store
->expects($this->never())
->method('delete')
@@ -315,7 +315,8 @@ public function testReleaseThrowsExceptionWhenDeletionFail()
$store
->expects($this->never())
->method('exists')
- ->with($key);
+ ->with($key)
+ ->willReturn(true);
$lock->release();
}
@@ -456,7 +457,7 @@ public function testAcquireReadNoBlockingWithSharedLockStoreInterface()
->method('saveRead');
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$this->assertTrue($lock->acquireRead(false));
}
@@ -560,7 +561,7 @@ public function testAcquireReadBlockingWithBlockingSharedLockStoreInterface()
->method('waitAndSaveRead');
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$this->assertTrue($lock->acquireRead(true));
}
@@ -582,7 +583,7 @@ public function testAcquireReadBlockingWithSharedLockStoreInterface()
});
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$this->assertTrue($lock->acquireRead(true));
}
@@ -598,7 +599,7 @@ public function testAcquireReadBlockingWithBlockingLockStoreInterface()
->method('waitAndSave');
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$this->assertTrue($lock->acquireRead(true));
}
@@ -620,7 +621,7 @@ public function testAcquireReadBlockingWithPersistingStoreInterface()
});
$store
->method('exists')
- ->willReturnOnConsecutiveCalls(true, false);
+ ->willReturn(true, false);
$this->assertTrue($lock->acquireRead(true));
}
diff --git a/src/Symfony/Component/Mailer/.gitattributes b/src/Symfony/Component/Mailer/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Mailer/.gitattributes
+++ b/src/Symfony/Component/Mailer/.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/Component/Mailer/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/.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/Component/Mailer/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/.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/Component/Mailer/Bridge/Amazon/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Amazon/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Mailer/Bridge/Amazon/.gitattributes
+++ b/src/Symfony/Component/Mailer/Bridge/Amazon/.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/Component/Mailer/Bridge/Amazon/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/Bridge/Amazon/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Amazon/.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/Component/Mailer/Bridge/Amazon/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/Bridge/Amazon/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Amazon/.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/Component/Mailer/Bridge/Brevo/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/Bridge/Brevo/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Brevo/.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/Component/Mailer/Bridge/Brevo/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/Bridge/Brevo/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Brevo/.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/Component/Mailer/Bridge/Google/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Google/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Mailer/Bridge/Google/.gitattributes
+++ b/src/Symfony/Component/Mailer/Bridge/Google/.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/Component/Mailer/Bridge/Google/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/Bridge/Google/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Google/.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/Component/Mailer/Bridge/Google/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/Bridge/Google/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Google/.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/Component/Mailer/Bridge/Infobip/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/Bridge/Infobip/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Infobip/.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/Component/Mailer/Bridge/Infobip/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/Bridge/Infobip/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Infobip/.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/Component/Mailer/Bridge/MailPace/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/Bridge/MailPace/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/MailPace/.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/Component/Mailer/Bridge/MailPace/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/Bridge/MailPace/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/MailPace/.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/Component/Mailer/Bridge/Mailchimp/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Mailchimp/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Mailer/Bridge/Mailchimp/.gitattributes
+++ b/src/Symfony/Component/Mailer/Bridge/Mailchimp/.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/Component/Mailer/Bridge/Mailchimp/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/Bridge/Mailchimp/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Mailchimp/.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/Component/Mailer/Bridge/Mailchimp/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/Bridge/Mailchimp/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Mailchimp/.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/Component/Mailer/Bridge/MailerSend/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/Bridge/MailerSend/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/MailerSend/.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/Component/Mailer/Bridge/MailerSend/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/Bridge/MailerSend/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/MailerSend/.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/Component/Mailer/Bridge/Mailgun/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Mailgun/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Mailer/Bridge/Mailgun/.gitattributes
+++ b/src/Symfony/Component/Mailer/Bridge/Mailgun/.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/Component/Mailer/Bridge/Mailgun/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/Bridge/Mailgun/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Mailgun/.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/Component/Mailer/Bridge/Mailgun/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/Bridge/Mailgun/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Mailgun/.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/Component/Mailer/Bridge/Mailjet/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Mailjet/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Mailer/Bridge/Mailjet/.gitattributes
+++ b/src/Symfony/Component/Mailer/Bridge/Mailjet/.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/Component/Mailer/Bridge/Mailjet/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/Bridge/Mailjet/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Mailjet/.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/Component/Mailer/Bridge/Mailjet/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/Bridge/Mailjet/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Mailjet/.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/Component/Mailer/Bridge/OhMySmtp/.gitattributes b/src/Symfony/Component/Mailer/Bridge/OhMySmtp/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Mailer/Bridge/OhMySmtp/.gitattributes
+++ b/src/Symfony/Component/Mailer/Bridge/OhMySmtp/.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/Component/Mailer/Bridge/OhMySmtp/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/Bridge/OhMySmtp/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/OhMySmtp/.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/Component/Mailer/Bridge/OhMySmtp/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/Bridge/OhMySmtp/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/OhMySmtp/.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/Component/Mailer/Bridge/Postmark/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Postmark/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Mailer/Bridge/Postmark/.gitattributes
+++ b/src/Symfony/Component/Mailer/Bridge/Postmark/.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/Component/Mailer/Bridge/Postmark/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/Bridge/Postmark/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Postmark/.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/Component/Mailer/Bridge/Postmark/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/Bridge/Postmark/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Postmark/.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/Component/Mailer/Bridge/Scaleway/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Scaleway/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Mailer/Bridge/Scaleway/.gitattributes
+++ b/src/Symfony/Component/Mailer/Bridge/Scaleway/.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/Component/Mailer/Bridge/Scaleway/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/Bridge/Scaleway/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Scaleway/.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/Component/Mailer/Bridge/Scaleway/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/Bridge/Scaleway/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Scaleway/.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/Component/Mailer/Bridge/Sendgrid/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Sendgrid/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/.gitattributes
+++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/.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/Component/Mailer/Bridge/Sendgrid/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/Bridge/Sendgrid/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/.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/Component/Mailer/Bridge/Sendgrid/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/Bridge/Sendgrid/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/.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/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridApiTransportTest.php
index 86d33241a1816..4196d0897172f 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridApiTransportTest.php
@@ -245,4 +245,45 @@ public function testTagAndMetadataHeaders()
$this->assertSame('blue', $payload['personalizations'][0]['custom_args']['Color']);
$this->assertSame('12345', $payload['personalizations'][0]['custom_args']['Client-ID']);
}
+
+ public function testInlineWithCustomContentId()
+ {
+ $imagePart = (new DataPart('text-contents', 'text.txt'));
+ $imagePart->asInline();
+ $imagePart->setContentId('content-identifier@symfony');
+
+ $email = new Email();
+ $email->addPart($imagePart);
+ $envelope = new Envelope(new Address('alice@system.com'), [new Address('bob@system.com')]);
+
+ $transport = new SendgridApiTransport('ACCESS_KEY');
+ $method = new \ReflectionMethod(SendgridApiTransport::class, 'getPayload');
+ $payload = $method->invoke($transport, $email, $envelope);
+
+ $this->assertArrayHasKey('attachments', $payload);
+ $this->assertCount(1, $payload['attachments']);
+ $this->assertArrayHasKey('content_id', $payload['attachments'][0]);
+
+ $this->assertSame('content-identifier@symfony', $payload['attachments'][0]['content_id']);
+ }
+
+ public function testInlineWithoutCustomContentId()
+ {
+ $imagePart = (new DataPart('text-contents', 'text.txt'));
+ $imagePart->asInline();
+
+ $email = new Email();
+ $email->addPart($imagePart);
+ $envelope = new Envelope(new Address('alice@system.com'), [new Address('bob@system.com')]);
+
+ $transport = new SendgridApiTransport('ACCESS_KEY');
+ $method = new \ReflectionMethod(SendgridApiTransport::class, 'getPayload');
+ $payload = $method->invoke($transport, $email, $envelope);
+
+ $this->assertArrayHasKey('attachments', $payload);
+ $this->assertCount(1, $payload['attachments']);
+ $this->assertArrayHasKey('content_id', $payload['attachments'][0]);
+
+ $this->assertSame('text.txt', $payload['attachments'][0]['content_id']);
+ }
}
diff --git a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Transport/SendgridApiTransport.php b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Transport/SendgridApiTransport.php
index 08a337ec412ab..a59255b37ce6e 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Transport/SendgridApiTransport.php
+++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Transport/SendgridApiTransport.php
@@ -179,7 +179,7 @@ private function getAttachments(Email $email): array
];
if ('inline' === $disposition) {
- $att['content_id'] = $filename;
+ $att['content_id'] = $attachment->hasContentId() ? $attachment->getContentId() : $filename;
}
$attachments[] = $att;
diff --git a/src/Symfony/Component/Mailer/Bridge/Sendinblue/.gitattributes b/src/Symfony/Component/Mailer/Bridge/Sendinblue/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sendinblue/.gitattributes
+++ b/src/Symfony/Component/Mailer/Bridge/Sendinblue/.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/Component/Mailer/Bridge/Sendinblue/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mailer/Bridge/Sendinblue/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Sendinblue/.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/Component/Mailer/Bridge/Sendinblue/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mailer/Bridge/Sendinblue/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mailer/Bridge/Sendinblue/.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/Component/Mailer/Tests/Transport/FailoverTransportTest.php b/src/Symfony/Component/Mailer/Tests/Transport/FailoverTransportTest.php
index a5c0fa3f4a973..90d9474bc5e92 100644
--- a/src/Symfony/Component/Mailer/Tests/Transport/FailoverTransportTest.php
+++ b/src/Symfony/Component/Mailer/Tests/Transport/FailoverTransportTest.php
@@ -85,16 +85,30 @@ public function testSendOneDead()
public function testSendOneDeadAndRecoveryWithinRetryPeriod()
{
$t1 = $this->createMock(TransportInterface::class);
- $t1->method('send')->willReturnOnConsecutiveCalls($this->throwException(new TransportException()));
+
+ $t1Matcher = $this->any();
+ $t1->expects($t1Matcher)
+ ->method('send')
+ ->willReturnCallback(function () use ($t1Matcher) {
+ if (1 === $t1Matcher->getInvocationCount()) {
+ throw new TransportException();
+ }
+
+ return null;
+ });
+
$t2 = $this->createMock(TransportInterface::class);
- $t2->expects($this->exactly(4))
+ $t2Matcher = $this->exactly(4);
+ $t2->expects($t2Matcher)
->method('send')
- ->willReturnOnConsecutiveCalls(
- null,
- null,
- null,
- $this->throwException(new TransportException())
- );
+ ->willReturnCallback(function () use ($t2Matcher) {
+ if (4 === $t2Matcher->getInvocationCount()) {
+ throw new TransportException();
+ }
+
+ return null;
+ });
+
$t = new FailoverTransport([$t1, $t2], 6);
$t->send(new RawMessage('')); // t1>fail - t2>sent
$this->assertTransports($t, 0, [$t1]);
@@ -115,16 +129,19 @@ public function testSendOneDeadAndRecoveryWithinRetryPeriod()
public function testSendAllDeadWithinRetryPeriod()
{
$t1 = $this->createMock(TransportInterface::class);
- $t1->method('send')->will($this->throwException(new TransportException()));
+ $t1->method('send')->willThrowException(new TransportException());
$t1->expects($this->once())->method('send');
$t2 = $this->createMock(TransportInterface::class);
- $t2->expects($this->exactly(3))
+ $matcher = $this->exactly(3);
+ $t2->expects($matcher)
->method('send')
- ->willReturnOnConsecutiveCalls(
- null,
- null,
- $this->throwException(new TransportException())
- );
+ ->willReturnCallback(function () use ($matcher) {
+ if (3 === $matcher->getInvocationCount()) {
+ throw new TransportException();
+ }
+
+ return null;
+ });
$t = new FailoverTransport([$t1, $t2], 40);
$t->send(new RawMessage(''));
sleep(4);
@@ -137,15 +154,27 @@ public function testSendAllDeadWithinRetryPeriod()
public function testSendOneDeadButRecover()
{
+ $t1Matcher = $this->any();
$t1 = $this->createMock(TransportInterface::class);
- $t1->method('send')->willReturnOnConsecutiveCalls($this->throwException(new TransportException()));
+ $t1->expects($t1Matcher)->method('send')->willReturnCallback(function () use ($t1Matcher) {
+ if (1 === $t1Matcher->getInvocationCount()) {
+ throw new TransportException();
+ }
+
+ return null;
+ });
+
$t2 = $this->createMock(TransportInterface::class);
- $t2->expects($this->exactly(3))
- ->method('send')->willReturnOnConsecutiveCalls(
- null,
- null,
- $this->throwException(new TransportException())
- );
+ $matcher = $this->exactly(3);
+ $t2->expects($matcher)
+ ->method('send')
+ ->willReturnCallback(function () use ($matcher) {
+ if (3 === $matcher->getInvocationCount()) {
+ throw new TransportException();
+ }
+
+ return null;
+ });
$t = new FailoverTransport([$t1, $t2], 1);
$t->send(new RawMessage(''));
sleep(1);
diff --git a/src/Symfony/Component/Mailer/Tests/Transport/Fixtures/fake-failing-sendmail.php b/src/Symfony/Component/Mailer/Tests/Transport/Fixtures/fake-failing-sendmail.php
index 920b980e0f714..1ce987202d3d6 100755
--- a/src/Symfony/Component/Mailer/Tests/Transport/Fixtures/fake-failing-sendmail.php
+++ b/src/Symfony/Component/Mailer/Tests/Transport/Fixtures/fake-failing-sendmail.php
@@ -1,4 +1,8 @@
#!/usr/bin/env php
createMock(TransportInterface::class);
$t1->expects($this->exactly(3))->method('send');
+
+ $matcher = $this->exactly(2);
$t2 = $this->createMock(TransportInterface::class);
- $t2->expects($this->exactly(2))
+ $t2->expects($matcher)
->method('send')
- ->willReturnOnConsecutiveCalls($this->throwException(new TransportException()));
+ ->willReturnCallback(function () use ($matcher) {
+ if (1 === $matcher->getInvocationCount()) {
+ throw new TransportException();
+ }
+
+ return null;
+ });
$t = new RoundRobinTransport([$t1, $t2], 3);
$p = new \ReflectionProperty($t, 'cursor');
$p->setValue($t, 0);
diff --git a/src/Symfony/Component/Mailer/Tests/Transport/SendmailTransportTest.php b/src/Symfony/Component/Mailer/Tests/Transport/SendmailTransportTest.php
index 709c9a9db23e2..cb748e2ee4ef3 100644
--- a/src/Symfony/Component/Mailer/Tests/Transport/SendmailTransportTest.php
+++ b/src/Symfony/Component/Mailer/Tests/Transport/SendmailTransportTest.php
@@ -13,15 +13,21 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\Mailer\DelayedEnvelope;
+use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mailer\Exception\TransportException;
+use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\SendmailTransport;
+use Symfony\Component\Mailer\Transport\Smtp\SmtpTransport;
+use Symfony\Component\Mailer\Transport\Smtp\Stream\ProcessStream;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Email;
+use Symfony\Component\Mime\RawMessage;
class SendmailTransportTest extends TestCase
{
private const FAKE_SENDMAIL = __DIR__.'/Fixtures/fake-sendmail.php -t';
private const FAKE_FAILING_SENDMAIL = __DIR__.'/Fixtures/fake-failing-sendmail.php -t';
+ private const FAKE_INTERACTIVE_SENDMAIL = __DIR__.'/Fixtures/fake-failing-sendmail.php -bs';
private string $argsPath;
@@ -46,9 +52,7 @@ public function testToString()
public function testToIsUsedWhenRecipientsAreNotSet()
{
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $this->markTestSkipped('Windows does not support shebangs nor non-blocking standard streams');
- }
+ $this->skipOnWindows();
$mail = new Email();
$mail
@@ -68,20 +72,9 @@ public function testToIsUsedWhenRecipientsAreNotSet()
public function testRecipientsAreUsedWhenSet()
{
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $this->markTestSkipped('Windows does not support shebangs nor non-blocking standard streams');
- }
+ $this->skipOnWindows();
- $mail = new Email();
- $mail
- ->from('from@mail.com')
- ->to('to@mail.com')
- ->subject('Subject')
- ->text('Some text')
- ;
-
- $envelope = new DelayedEnvelope($mail);
- $envelope->setRecipients([new Address('recipient@mail.com')]);
+ [$mail, $envelope] = $this->defaultMailAndEnvelope();
$sendmailTransport = new SendmailTransport(self::FAKE_SENDMAIL);
$sendmailTransport->send($mail, $envelope);
@@ -90,11 +83,90 @@ public function testRecipientsAreUsedWhenSet()
}
public function testThrowsTransportExceptionOnFailure()
+ {
+ $this->skipOnWindows();
+
+ [$mail, $envelope] = $this->defaultMailAndEnvelope();
+
+ $sendmailTransport = new SendmailTransport(self::FAKE_FAILING_SENDMAIL);
+ $this->expectException(TransportException::class);
+ $this->expectExceptionMessage('Process failed with exit code 42: Sending failed');
+ $sendmailTransport->send($mail, $envelope);
+
+ $streamProperty = new \ReflectionProperty(SendmailTransport::class, 'stream');
+ $streamProperty->setAccessible(true);
+ $stream = $streamProperty->getValue($sendmailTransport);
+ $this->assertNull($stream->stream);
+ }
+
+ public function testStreamIsClearedOnFailure()
+ {
+ $this->skipOnWindows();
+
+ [$mail, $envelope] = $this->defaultMailAndEnvelope();
+
+ $sendmailTransport = new SendmailTransport(self::FAKE_FAILING_SENDMAIL);
+ try {
+ $sendmailTransport->send($mail, $envelope);
+ } catch (TransportException $e) {
+ }
+
+ $streamProperty = new \ReflectionProperty(SendmailTransport::class, 'stream');
+ $streamProperty->setAccessible(true);
+ $stream = $streamProperty->getValue($sendmailTransport);
+ $innerStreamProperty = new \ReflectionProperty(ProcessStream::class, 'stream');
+ $innerStreamProperty->setAccessible(true);
+ $this->assertNull($innerStreamProperty->getValue($stream));
+ }
+
+ public function testDoesNotThrowWhenInteractive()
+ {
+ $this->skipOnWindows();
+
+ [$mail, $envelope] = $this->defaultMailAndEnvelope();
+
+ $sendmailTransport = new SendmailTransport(self::FAKE_INTERACTIVE_SENDMAIL);
+ $transportProperty = new \ReflectionProperty(SendmailTransport::class, 'transport');
+ $transportProperty->setAccessible(true);
+
+ // Replace the transport with an anonymous consumer that trigger the stream methods
+ $transportProperty->setValue($sendmailTransport, new class($transportProperty->getValue($sendmailTransport)->getStream()) extends SmtpTransport {
+ private $stream;
+
+ public function __construct(ProcessStream $stream)
+ {
+ $this->stream = $stream;
+ }
+
+ public function send(RawMessage $message, ?Envelope $envelope = null): ?SentMessage
+ {
+ $this->stream->initialize();
+ $this->stream->write('SMTP');
+ $this->stream->terminate();
+
+ return new SentMessage($message, $envelope);
+ }
+
+ public function __toString(): string
+ {
+ return 'Interactive mode test';
+ }
+ });
+
+ $sendmailTransport->send($mail, $envelope);
+
+ $this->assertStringEqualsFile($this->argsPath, __DIR__.'/Fixtures/fake-failing-sendmail.php -bs');
+ }
+
+ private function skipOnWindows()
{
if ('\\' === \DIRECTORY_SEPARATOR) {
$this->markTestSkipped('Windows does not support shebangs nor non-blocking standard streams');
}
+ }
+ private function defaultMailAndEnvelope(): array
+ {
$mail = new Email();
$mail
->from('from@mail.com')
@@ -106,9 +178,6 @@ public function testThrowsTransportExceptionOnFailure()
$envelope = new DelayedEnvelope($mail);
$envelope->setRecipients([new Address('recipient@mail.com')]);
- $sendmailTransport = new SendmailTransport(self::FAKE_FAILING_SENDMAIL);
- $this->expectException(TransportException::class);
- $this->expectExceptionMessage('Process failed with exit code 42: Sending failed');
- $sendmailTransport->send($mail, $envelope);
+ return [$mail, $envelope];
}
}
diff --git a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/SmtpTransportTest.php b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/SmtpTransportTest.php
index a8d3540a115f9..ad643490e242b 100644
--- a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/SmtpTransportTest.php
+++ b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/SmtpTransportTest.php
@@ -194,7 +194,7 @@ public function testAssertResponseCodeWithNotValidCode()
private function invokeAssertResponseCode(string $response, array $codes): void
{
- $transport = new SmtpTransport($this->getMockForAbstractClass(AbstractStream::class));
+ $transport = new SmtpTransport($this->createStub(AbstractStream::class));
$m = new \ReflectionMethod($transport, 'assertResponseCode');
$m->invoke($transport, $response, $codes);
}
diff --git a/src/Symfony/Component/Mailer/Transport/SendmailTransport.php b/src/Symfony/Component/Mailer/Transport/SendmailTransport.php
index 36bb93802effb..3add460ebcf89 100644
--- a/src/Symfony/Component/Mailer/Transport/SendmailTransport.php
+++ b/src/Symfony/Component/Mailer/Transport/SendmailTransport.php
@@ -64,6 +64,7 @@ public function __construct(?string $command = null, ?EventDispatcherInterface $
$this->stream = new ProcessStream();
if (str_contains($this->command, ' -bs')) {
$this->stream->setCommand($this->command);
+ $this->stream->setInteractive(true);
$this->transport = new SmtpTransport($this->stream, $dispatcher, $logger);
}
}
diff --git a/src/Symfony/Component/Mailer/Transport/Smtp/Stream/ProcessStream.php b/src/Symfony/Component/Mailer/Transport/Smtp/Stream/ProcessStream.php
index 8644d7dad7296..e63514709bde5 100644
--- a/src/Symfony/Component/Mailer/Transport/Smtp/Stream/ProcessStream.php
+++ b/src/Symfony/Component/Mailer/Transport/Smtp/Stream/ProcessStream.php
@@ -24,12 +24,18 @@
final class ProcessStream extends AbstractStream
{
private string $command;
+ private bool $interactive = false;
public function setCommand(string $command): void
{
$this->command = $command;
}
+ public function setInteractive(bool $interactive): void
+ {
+ $this->interactive = $interactive;
+ }
+
public function initialize(): void
{
$descriptorSpec = [
@@ -57,11 +63,15 @@ public function terminate(): void
$err = stream_get_contents($this->err);
fclose($this->err);
if (0 !== $exitCode = proc_close($this->stream)) {
- throw new TransportException('Process failed with exit code '.$exitCode.': '.$out.$err);
+ $errorMessage = 'Process failed with exit code '.$exitCode.': '.$out.$err;
}
}
parent::terminate();
+
+ if (!$this->interactive && isset($errorMessage)) {
+ throw new TransportException($errorMessage);
+ }
}
protected function getReadConnectionDescription(): string
diff --git a/src/Symfony/Component/Messenger/.gitattributes b/src/Symfony/Component/Messenger/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Messenger/.gitattributes
+++ b/src/Symfony/Component/Messenger/.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/Component/Messenger/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Messenger/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Messenger/.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/Component/Messenger/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Messenger/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Messenger/.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/Component/Messenger/Bridge/AmazonSqs/.gitattributes b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/.gitattributes
+++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/.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/Component/Messenger/Bridge/AmazonSqs/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/.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/Component/Messenger/Bridge/AmazonSqs/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/.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/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/AmazonSqsSenderTest.php b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/AmazonSqsSenderTest.php
index a3269841e4dda..80840c859cb05 100644
--- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/AmazonSqsSenderTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/AmazonSqsSenderTest.php
@@ -31,7 +31,7 @@ public function testSend()
$connection->expects($this->once())->method('send')->with($encoded['body'], $encoded['headers']);
$serializer = $this->createMock(SerializerInterface::class);
- $serializer->method('encode')->with($envelope)->willReturnOnConsecutiveCalls($encoded);
+ $serializer->method('encode')->with($envelope)->willReturn($encoded);
$sender = new AmazonSqsSender($connection, $serializer);
$sender->send($envelope);
@@ -49,7 +49,7 @@ public function testSendWithAmazonSqsFifoStamp()
->with($encoded['body'], $encoded['headers'], 0, $stamp->getMessageGroupId(), $stamp->getMessageDeduplicationId());
$serializer = $this->createMock(SerializerInterface::class);
- $serializer->method('encode')->with($envelope)->willReturnOnConsecutiveCalls($encoded);
+ $serializer->method('encode')->with($envelope)->willReturn($encoded);
$sender = new AmazonSqsSender($connection, $serializer);
$sender->send($envelope);
@@ -67,7 +67,7 @@ public function testSendWithAmazonSqsXrayTraceHeaderStamp()
->with($encoded['body'], $encoded['headers'], 0, null, null, $stamp->getTraceId());
$serializer = $this->createMock(SerializerInterface::class);
- $serializer->method('encode')->with($envelope)->willReturnOnConsecutiveCalls($encoded);
+ $serializer->method('encode')->with($envelope)->willReturn($encoded);
$sender = new AmazonSqsSender($connection, $serializer);
$sender->send($envelope);
diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/.gitattributes b/src/Symfony/Component/Messenger/Bridge/Amqp/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/.gitattributes
+++ b/src/Symfony/Component/Messenger/Bridge/Amqp/.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/Component/Messenger/Bridge/Amqp/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Messenger/Bridge/Amqp/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/.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/Component/Messenger/Bridge/Amqp/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Messenger/Bridge/Amqp/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/.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/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpSenderTest.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpSenderTest.php
index 9949a0d59413f..b1dda969fb49b 100644
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpSenderTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpSenderTest.php
@@ -31,7 +31,7 @@ public function testItSendsTheEncodedMessage()
$encoded = ['body' => '...', 'headers' => ['type' => DummyMessage::class]];
$serializer = $this->createMock(SerializerInterface::class);
- $serializer->method('encode')->with($envelope)->willReturnOnConsecutiveCalls($encoded);
+ $serializer->method('encode')->with($envelope)->willReturn($encoded);
$connection = $this->createMock(Connection::class);
$connection->expects($this->once())->method('publish')->with($encoded['body'], $encoded['headers']);
@@ -61,7 +61,7 @@ public function testItSendsTheEncodedMessageWithoutHeaders()
$encoded = ['body' => '...'];
$serializer = $this->createMock(SerializerInterface::class);
- $serializer->method('encode')->with($envelope)->willReturnOnConsecutiveCalls($encoded);
+ $serializer->method('encode')->with($envelope)->willReturn($encoded);
$connection = $this->createMock(Connection::class);
$connection->expects($this->once())->method('publish')->with($encoded['body'], []);
@@ -76,7 +76,7 @@ public function testContentTypeHeaderIsMovedToAttribute()
$encoded = ['body' => '...', 'headers' => ['type' => DummyMessage::class, 'Content-Type' => 'application/json']];
$serializer = $this->createMock(SerializerInterface::class);
- $serializer->method('encode')->with($envelope)->willReturnOnConsecutiveCalls($encoded);
+ $serializer->method('encode')->with($envelope)->willReturn($encoded);
$connection = $this->createMock(Connection::class);
unset($encoded['headers']['Content-Type']);
@@ -93,7 +93,7 @@ public function testContentTypeHeaderDoesNotOverwriteAttribute()
$encoded = ['body' => '...', 'headers' => ['type' => DummyMessage::class, 'Content-Type' => 'application/json']];
$serializer = $this->createMock(SerializerInterface::class);
- $serializer->method('encode')->with($envelope)->willReturnOnConsecutiveCalls($encoded);
+ $serializer->method('encode')->with($envelope)->willReturn($encoded);
$connection = $this->createMock(Connection::class);
unset($encoded['headers']['Content-Type']);
@@ -110,7 +110,7 @@ public function testItThrowsATransportExceptionIfItCannotSendTheMessage()
$encoded = ['body' => '...', 'headers' => ['type' => DummyMessage::class]];
$serializer = $this->createMock(SerializerInterface::class);
- $serializer->method('encode')->with($envelope)->willReturnOnConsecutiveCalls($encoded);
+ $serializer->method('encode')->with($envelope)->willReturn($encoded);
$connection = $this->createMock(Connection::class);
$connection->method('publish')->with($encoded['body'], $encoded['headers'])->willThrowException(new \AMQPException());
diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php
index e57dad6cad97e..db2ad890a5e20 100644
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php
@@ -291,7 +291,10 @@ public function testItSetupsTheConnection()
$factory->method('createConnection')->willReturn($amqpConnection);
$factory->method('createChannel')->willReturn($amqpChannel);
$factory->method('createExchange')->willReturn($amqpExchange);
- $factory->method('createQueue')->will($this->onConsecutiveCalls($amqpQueue0, $amqpQueue1));
+
+ $factory
+ ->method('createQueue')
+ ->willReturn($amqpQueue0, $amqpQueue1);
$amqpExchange->expects($this->once())->method('declareExchange');
$amqpExchange->expects($this->once())->method('publish')->with('body', 'routing_key', \AMQP_NOPARAM, ['headers' => [], 'delivery_mode' => 2, 'timestamp' => time()]);
@@ -343,7 +346,9 @@ public function testItSetupsTheTTLConnection()
$factory->method('createConnection')->willReturn($amqpConnection);
$factory->method('createChannel')->willReturn($amqpChannel);
$factory->method('createExchange')->willReturn($amqpExchange);
- $factory->method('createQueue')->will($this->onConsecutiveCalls($amqpQueue0, $amqpQueue1));
+ $factory
+ ->method('createQueue')
+ ->willReturn($amqpQueue0, $amqpQueue1);
$amqpExchange->expects($this->once())->method('declareExchange');
$amqpExchange->expects($this->once())->method('publish')->with('body', 'routing_key', \AMQP_NOPARAM, ['headers' => [], 'delivery_mode' => 2, 'timestamp' => time()]);
@@ -458,14 +463,15 @@ public function testAutoSetupWithDelayDeclaresExchangeQueuesAndDelay()
$factory = $this->createMock(AmqpFactory::class);
$factory->method('createConnection')->willReturn($amqpConnection);
$factory->method('createChannel')->willReturn($amqpChannel);
- $factory->method('createQueue')->will($this->onConsecutiveCalls(
- $amqpQueue = $this->createMock(\AMQPQueue::class),
- $delayQueue = $this->createMock(\AMQPQueue::class)
- ));
- $factory->method('createExchange')->will($this->onConsecutiveCalls(
- $amqpExchange = $this->createMock(\AMQPExchange::class),
- $delayExchange = $this->createMock(\AMQPExchange::class)
- ));
+
+ $amqpQueue = $this->createMock(\AMQPQueue::class);
+ $factory
+ ->method('createQueue')
+ ->willReturn($amqpQueue, $this->createMock(\AMQPQueue::class));
+
+ $amqpExchange = $this->createMock(\AMQPExchange::class);
+ $delayExchange = $this->createMock(\AMQPExchange::class);
+ $factory->method('createExchange')->willReturn($amqpExchange, $delayExchange);
$amqpExchange->expects($this->once())->method('setName')->with(self::DEFAULT_EXCHANGE_NAME);
$amqpExchange->expects($this->once())->method('declareExchange');
@@ -516,14 +522,12 @@ public function testItDelaysTheMessageWithADifferentRoutingKeyAndTTLs()
$factory = $this->createMock(AmqpFactory::class);
$factory->method('createConnection')->willReturn($amqpConnection);
$factory->method('createChannel')->willReturn($amqpChannel);
- $factory->method('createQueue')->will($this->onConsecutiveCalls(
- $this->createMock(\AMQPQueue::class),
- $delayQueue = $this->createMock(\AMQPQueue::class)
- ));
- $factory->method('createExchange')->will($this->onConsecutiveCalls(
- $this->createMock(\AMQPExchange::class),
- $delayExchange = $this->createMock(\AMQPExchange::class)
- ));
+
+ $delayQueue = $this->createMock(\AMQPQueue::class);
+ $factory->method('createQueue')->willReturn($this->createMock(\AMQPQueue::class), $delayQueue);
+
+ $delayExchange = $this->createMock(\AMQPExchange::class);
+ $factory->method('createExchange')->willReturn($this->createMock(\AMQPExchange::class), $delayExchange);
$connectionOptions = [
'retry' => [
@@ -656,14 +660,12 @@ public function testItDelaysTheMessageWithTheInitialSuppliedRoutingKeyAsArgument
$factory = $this->createMock(AmqpFactory::class);
$factory->method('createConnection')->willReturn($amqpConnection);
$factory->method('createChannel')->willReturn($amqpChannel);
- $factory->method('createQueue')->will($this->onConsecutiveCalls(
- $this->createMock(\AMQPQueue::class),
- $delayQueue = $this->createMock(\AMQPQueue::class)
- ));
- $factory->method('createExchange')->will($this->onConsecutiveCalls(
- $this->createMock(\AMQPExchange::class),
- $delayExchange = $this->createMock(\AMQPExchange::class)
- ));
+
+ $delayQueue = $this->createMock(\AMQPQueue::class);
+ $factory->method('createQueue')->willReturn($this->createMock(\AMQPQueue::class), $delayQueue);
+
+ $delayExchange = $this->createMock(\AMQPExchange::class);
+ $factory->method('createExchange')->willReturn($this->createMock(\AMQPExchange::class), $delayExchange);
$connectionOptions = [
'retry' => [
@@ -849,14 +851,10 @@ private function createDelayOrRetryConnection(\AMQPExchange $delayExchange, stri
$factory = $this->createMock(AmqpFactory::class);
$factory->method('createConnection')->willReturn($amqpConnection);
$factory->method('createChannel')->willReturn($amqpChannel);
- $factory->method('createQueue')->will($this->onConsecutiveCalls(
- $this->createMock(\AMQPQueue::class),
- $delayQueue = $this->createMock(\AMQPQueue::class)
- ));
- $factory->method('createExchange')->will($this->onConsecutiveCalls(
- $this->createMock(\AMQPExchange::class),
- $delayExchange
- ));
+
+ $delayQueue = $this->createMock(\AMQPQueue::class);
+ $factory->method('createQueue')->willReturn($this->createMock(\AMQPQueue::class), $delayQueue);
+ $factory->method('createExchange')->willReturn($this->createMock(\AMQPExchange::class), $delayExchange);
$delayQueue->expects($this->once())->method('setName')->with($delayQueueName);
$delayQueue->expects($this->once())->method('setArguments')->with([
diff --git a/src/Symfony/Component/Messenger/Bridge/Beanstalkd/.gitattributes b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Messenger/Bridge/Beanstalkd/.gitattributes
+++ b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/.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/Component/Messenger/Bridge/Beanstalkd/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Messenger/Bridge/Beanstalkd/.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/Component/Messenger/Bridge/Beanstalkd/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Messenger/Bridge/Beanstalkd/.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/Component/Messenger/Bridge/Beanstalkd/Tests/Transport/BeanstalkdSenderTest.php b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Tests/Transport/BeanstalkdSenderTest.php
index cfc5b8fdba84f..89ac3449f3a4b 100644
--- a/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Tests/Transport/BeanstalkdSenderTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Tests/Transport/BeanstalkdSenderTest.php
@@ -30,7 +30,7 @@ public function testSend()
$connection->expects($this->once())->method('send')->with($encoded['body'], $encoded['headers'], 0);
$serializer = $this->createMock(SerializerInterface::class);
- $serializer->method('encode')->with($envelope)->willReturnOnConsecutiveCalls($encoded);
+ $serializer->method('encode')->with($envelope)->willReturn($encoded);
$sender = new BeanstalkdSender($connection, $serializer);
$sender->send($envelope);
@@ -45,7 +45,7 @@ public function testSendWithDelay()
$connection->expects($this->once())->method('send')->with($encoded['body'], $encoded['headers'], 500);
$serializer = $this->createMock(SerializerInterface::class);
- $serializer->method('encode')->with($envelope)->willReturnOnConsecutiveCalls($encoded);
+ $serializer->method('encode')->with($envelope)->willReturn($encoded);
$sender = new BeanstalkdSender($connection, $serializer);
$sender->send($envelope);
diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/.gitattributes b/src/Symfony/Component/Messenger/Bridge/Doctrine/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/.gitattributes
+++ b/src/Symfony/Component/Messenger/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/Component/Messenger/Bridge/Doctrine/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Messenger/Bridge/Doctrine/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Messenger/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/Component/Messenger/Bridge/Doctrine/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Messenger/Bridge/Doctrine/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Messenger/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/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineSenderTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineSenderTest.php
index 8505e3dee0481..1f769533e7165 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineSenderTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineSenderTest.php
@@ -31,7 +31,7 @@ public function testSend()
$connection->expects($this->once())->method('send')->with($encoded['body'], $encoded['headers'])->willReturn('15');
$serializer = $this->createMock(SerializerInterface::class);
- $serializer->method('encode')->with($envelope)->willReturnOnConsecutiveCalls($encoded);
+ $serializer->method('encode')->with($envelope)->willReturn($encoded);
$sender = new DoctrineSender($connection, $serializer);
$actualEnvelope = $sender->send($envelope);
@@ -51,7 +51,7 @@ public function testSendWithDelay()
$connection->expects($this->once())->method('send')->with($encoded['body'], $encoded['headers'], 500);
$serializer = $this->createMock(SerializerInterface::class);
- $serializer->method('encode')->with($envelope)->willReturnOnConsecutiveCalls($encoded);
+ $serializer->method('encode')->with($envelope)->willReturn($encoded);
$sender = new DoctrineSender($connection, $serializer);
$sender->send($envelope);
diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php
index 34b471556e403..1fe0627c235d8 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php
+++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php
@@ -24,6 +24,7 @@
use Doctrine\DBAL\Query\ForUpdate\ConflictResolutionMode;
use Doctrine\DBAL\Query\QueryBuilder;
use Doctrine\DBAL\Result;
+use Doctrine\DBAL\Schema\AbstractAsset;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
use Doctrine\DBAL\Schema\Comparator;
use Doctrine\DBAL\Schema\Schema;
@@ -298,7 +299,17 @@ public function setup(): void
{
$configuration = $this->driverConnection->getConfiguration();
$assetFilter = $configuration->getSchemaAssetsFilter();
- $configuration->setSchemaAssetsFilter(fn (string $tableName) => $tableName === $this->configuration['table_name']);
+ $configuration->setSchemaAssetsFilter(function ($tableName) {
+ if ($tableName instanceof AbstractAsset) {
+ $tableName = $tableName->getName();
+ }
+
+ if (!\is_string($tableName)) {
+ throw new \TypeError(sprintf('The table name must be an instance of "%s" or a string ("%s" given).', AbstractAsset::class, get_debug_type($tableName)));
+ }
+
+ return $tableName === $this->configuration['table_name'];
+ });
$this->updateSchema();
$configuration->setSchemaAssetsFilter($assetFilter);
$this->autoSetup = false;
diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/.gitattributes b/src/Symfony/Component/Messenger/Bridge/Redis/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Messenger/Bridge/Redis/.gitattributes
+++ b/src/Symfony/Component/Messenger/Bridge/Redis/.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/Component/Messenger/Bridge/Redis/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Messenger/Bridge/Redis/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Messenger/Bridge/Redis/.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/Component/Messenger/Bridge/Redis/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Messenger/Bridge/Redis/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Messenger/Bridge/Redis/.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/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php
index 34d672f9bf8bb..b563540893d7f 100644
--- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php
@@ -360,7 +360,7 @@ public function testLastErrorGetsCleared()
$redis->expects($this->once())->method('xadd')->willReturn('0');
$redis->expects($this->once())->method('xack')->willReturn(0);
- $redis->method('getLastError')->willReturnOnConsecutiveCalls('xadd error', 'xack error');
+ $redis->method('getLastError')->willReturn('xadd error', 'xack error');
$redis->expects($this->exactly(2))->method('clearLastError');
$connection = Connection::fromDsn('redis://localhost/messenger-clearlasterror', ['auto_setup' => false], $redis);
diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisSenderTest.php b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisSenderTest.php
index 133cedef0798a..df763e5ea0067 100644
--- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisSenderTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisSenderTest.php
@@ -30,7 +30,7 @@ public function testSend()
$connection->expects($this->once())->method('add')->with($encoded['body'], $encoded['headers'])->willReturn('THE_MESSAGE_ID');
$serializer = $this->createMock(SerializerInterface::class);
- $serializer->method('encode')->with($envelope)->willReturnOnConsecutiveCalls($encoded);
+ $serializer->method('encode')->with($envelope)->willReturn($encoded);
$sender = new RedisSender($connection, $serializer);
diff --git a/src/Symfony/Component/Messenger/Exception/DelayedMessageHandlingException.php b/src/Symfony/Component/Messenger/Exception/DelayedMessageHandlingException.php
index 3821d01e3fb19..ea785bfefcb09 100644
--- a/src/Symfony/Component/Messenger/Exception/DelayedMessageHandlingException.php
+++ b/src/Symfony/Component/Messenger/Exception/DelayedMessageHandlingException.php
@@ -19,12 +19,12 @@
*
* @author Tobias Nyholm
*/
-class DelayedMessageHandlingException extends RuntimeException implements WrappedExceptionsInterface
+class DelayedMessageHandlingException extends RuntimeException implements WrappedExceptionsInterface, EnvelopeAwareExceptionInterface
{
+ use EnvelopeAwareExceptionTrait;
use WrappedExceptionsTrait;
private array $exceptions;
- private ?Envelope $envelope;
public function __construct(array $exceptions, ?Envelope $envelope = null)
{
@@ -55,9 +55,4 @@ public function getExceptions(): array
return $this->exceptions;
}
-
- public function getEnvelope(): ?Envelope
- {
- return $this->envelope;
- }
}
diff --git a/src/Symfony/Component/Messenger/Exception/EnvelopeAwareExceptionInterface.php b/src/Symfony/Component/Messenger/Exception/EnvelopeAwareExceptionInterface.php
new file mode 100644
index 0000000000000..b57aa034e44ff
--- /dev/null
+++ b/src/Symfony/Component/Messenger/Exception/EnvelopeAwareExceptionInterface.php
@@ -0,0 +1,22 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Messenger\Exception;
+
+use Symfony\Component\Messenger\Envelope;
+
+/**
+ * @internal
+ */
+interface EnvelopeAwareExceptionInterface
+{
+ public function getEnvelope(): ?Envelope;
+}
diff --git a/src/Symfony/Component/Messenger/Exception/EnvelopeAwareExceptionTrait.php b/src/Symfony/Component/Messenger/Exception/EnvelopeAwareExceptionTrait.php
new file mode 100644
index 0000000000000..3bb7676b86e69
--- /dev/null
+++ b/src/Symfony/Component/Messenger/Exception/EnvelopeAwareExceptionTrait.php
@@ -0,0 +1,27 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Messenger\Exception;
+
+use Symfony\Component\Messenger\Envelope;
+
+/**
+ * @internal
+ */
+trait EnvelopeAwareExceptionTrait
+{
+ private ?Envelope $envelope = null;
+
+ public function getEnvelope(): ?Envelope
+ {
+ return $this->envelope;
+ }
+}
diff --git a/src/Symfony/Component/Messenger/Exception/HandlerFailedException.php b/src/Symfony/Component/Messenger/Exception/HandlerFailedException.php
index f854238ec59ec..ed1699583d47e 100644
--- a/src/Symfony/Component/Messenger/Exception/HandlerFailedException.php
+++ b/src/Symfony/Component/Messenger/Exception/HandlerFailedException.php
@@ -13,7 +13,7 @@
use Symfony\Component\Messenger\Envelope;
-class HandlerFailedException extends RuntimeException implements WrappedExceptionsInterface
+class HandlerFailedException extends RuntimeException implements WrappedExceptionsInterface, EnvelopeAwareExceptionInterface
{
use WrappedExceptionsTrait;
diff --git a/src/Symfony/Component/Messenger/Exception/ValidationFailedException.php b/src/Symfony/Component/Messenger/Exception/ValidationFailedException.php
index 0e91372f62d7e..0a8655e5c3eb5 100644
--- a/src/Symfony/Component/Messenger/Exception/ValidationFailedException.php
+++ b/src/Symfony/Component/Messenger/Exception/ValidationFailedException.php
@@ -11,20 +11,24 @@
namespace Symfony\Component\Messenger\Exception;
+use Symfony\Component\Messenger\Envelope;
use Symfony\Component\Validator\ConstraintViolationListInterface;
/**
* @author Tobias Nyholm
*/
-class ValidationFailedException extends RuntimeException
+class ValidationFailedException extends RuntimeException implements EnvelopeAwareExceptionInterface
{
+ use EnvelopeAwareExceptionTrait;
+
private ConstraintViolationListInterface $violations;
private object $violatingMessage;
- public function __construct(object $violatingMessage, ConstraintViolationListInterface $violations)
+ public function __construct(object $violatingMessage, ConstraintViolationListInterface $violations, ?Envelope $envelope = null)
{
$this->violatingMessage = $violatingMessage;
$this->violations = $violations;
+ $this->envelope = $envelope;
parent::__construct(sprintf('Message of type "%s" failed validation.', $this->violatingMessage::class));
}
diff --git a/src/Symfony/Component/Messenger/Middleware/ValidationMiddleware.php b/src/Symfony/Component/Messenger/Middleware/ValidationMiddleware.php
index 851ef295eb3d0..bbfe7e02962c4 100644
--- a/src/Symfony/Component/Messenger/Middleware/ValidationMiddleware.php
+++ b/src/Symfony/Component/Messenger/Middleware/ValidationMiddleware.php
@@ -39,7 +39,7 @@ public function handle(Envelope $envelope, StackInterface $stack): Envelope
$violations = $this->validator->validate($message, null, $groups);
if (\count($violations)) {
- throw new ValidationFailedException($message, $violations);
+ throw new ValidationFailedException($message, $violations, $envelope);
}
return $stack->next()->handle($envelope, $stack);
diff --git a/src/Symfony/Component/Messenger/Tests/Command/SetupTransportsCommandTest.php b/src/Symfony/Component/Messenger/Tests/Command/SetupTransportsCommandTest.php
index 02980cefbaaf9..c31e71a404b8f 100644
--- a/src/Symfony/Component/Messenger/Tests/Command/SetupTransportsCommandTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Command/SetupTransportsCommandTest.php
@@ -30,10 +30,10 @@ public function testReceiverNames()
// get method must be call twice and will return consecutively a setup-able transport and a non setup-able transport
$serviceLocator->expects($this->exactly(2))
->method('get')
- ->will($this->onConsecutiveCalls(
+ ->willReturn(
$this->createMock(SetupableTransportInterface::class),
$this->createMock(TransportInterface::class)
- ));
+ );
$serviceLocator
->method('has')
->willReturn(true);
@@ -53,12 +53,10 @@ public function testReceiverNameArgument()
/** @var MockObject&ServiceLocator $serviceLocator */
$serviceLocator = $this->createMock(ServiceLocator::class);
// get method must be call twice and will return consecutively a setup-able transport and a non setup-able transport
- $serviceLocator->expects($this->exactly(1))
+ $serviceLocator->expects($this->once())
->method('get')
- ->will($this->onConsecutiveCalls(
- $this->createMock(SetupableTransportInterface::class)
- ));
- $serviceLocator->expects($this->exactly(1))
+ ->willReturn($this->createMock(SetupableTransportInterface::class));
+ $serviceLocator->expects($this->once())
->method('has')
->willReturn(true);
diff --git a/src/Symfony/Component/Messenger/Tests/FailureIntegrationTest.php b/src/Symfony/Component/Messenger/Tests/FailureIntegrationTest.php
index 654cae4b93ae1..d711097ee21d4 100644
--- a/src/Symfony/Component/Messenger/Tests/FailureIntegrationTest.php
+++ b/src/Symfony/Component/Messenger/Tests/FailureIntegrationTest.php
@@ -24,6 +24,7 @@
use Symfony\Component\Messenger\EventListener\StopWorkerOnMessageLimitListener;
use Symfony\Component\Messenger\Exception\DelayedMessageHandlingException;
use Symfony\Component\Messenger\Exception\HandlerFailedException;
+use Symfony\Component\Messenger\Exception\ValidationFailedException;
use Symfony\Component\Messenger\Handler\HandlerDescriptor;
use Symfony\Component\Messenger\Handler\HandlersLocator;
use Symfony\Component\Messenger\MessageBus;
@@ -32,6 +33,7 @@
use Symfony\Component\Messenger\Middleware\FailedMessageProcessingMiddleware;
use Symfony\Component\Messenger\Middleware\HandleMessageMiddleware;
use Symfony\Component\Messenger\Middleware\SendMessageMiddleware;
+use Symfony\Component\Messenger\Middleware\ValidationMiddleware;
use Symfony\Component\Messenger\Retry\MultiplierRetryStrategy;
use Symfony\Component\Messenger\Stamp\BusNameStamp;
use Symfony\Component\Messenger\Stamp\DispatchAfterCurrentBusStamp;
@@ -42,6 +44,9 @@
use Symfony\Component\Messenger\Transport\Sender\SenderInterface;
use Symfony\Component\Messenger\Transport\Sender\SendersLocator;
use Symfony\Component\Messenger\Worker;
+use Symfony\Component\Validator\ConstraintViolation;
+use Symfony\Component\Validator\ConstraintViolationList;
+use Symfony\Component\Validator\Validator\ValidatorInterface;
class FailureIntegrationTest extends TestCase
{
@@ -440,6 +445,87 @@ public function testStampsAddedByMiddlewaresDontDisappearWhenDelayedMessageFails
$this->assertCount(1, $messagesWaiting);
$this->assertSame('some.bus', $messagesWaiting[0]->last(BusNameStamp::class)?->getBusName());
}
+
+ public function testStampsAddedByMiddlewaresDontDisappearWhenValidationFails()
+ {
+ $transport1 = new DummyFailureTestSenderAndReceiver();
+
+ $transports = [
+ 'transport1' => $transport1,
+ ];
+
+ $locator = $this->createMock(ContainerInterface::class);
+ $locator->expects($this->any())
+ ->method('has')
+ ->willReturn(true);
+ $locator->expects($this->any())
+ ->method('get')
+ ->willReturnCallback(fn ($transportName) => $transports[$transportName]);
+ $senderLocator = new SendersLocator([], $locator);
+
+ $retryStrategyLocator = $this->createMock(ContainerInterface::class);
+ $retryStrategyLocator->expects($this->any())
+ ->method('has')
+ ->willReturn(true);
+ $retryStrategyLocator->expects($this->any())
+ ->method('get')
+ ->willReturn(new MultiplierRetryStrategy(1));
+
+ $violationList = new ConstraintViolationList([new ConstraintViolation('validation failed', null, [], null, null, null)]);
+ $validator = $this->createMock(ValidatorInterface::class);
+ $validator->expects($this->once())->method('validate')->willReturn($violationList);
+
+ $middlewareStack = new \ArrayIterator([
+ new AddBusNameStampMiddleware('some.bus'),
+ new ValidationMiddleware($validator),
+ new SendMessageMiddleware($senderLocator),
+ ]);
+
+ $bus = new MessageBus($middlewareStack);
+
+ $transport1Handler = fn () => $bus->dispatch(new \stdClass(), [new DispatchAfterCurrentBusStamp()]);
+
+ $handlerLocator = new HandlersLocator([
+ DummyMessage::class => [new HandlerDescriptor($transport1Handler)],
+ ]);
+
+ $middlewareStack->append(new HandleMessageMiddleware($handlerLocator));
+
+ $dispatcher = new EventDispatcher();
+
+ $dispatcher->addSubscriber(new SendFailedMessageForRetryListener($locator, $retryStrategyLocator));
+ $dispatcher->addSubscriber(new StopWorkerOnMessageLimitListener(1));
+
+ $runWorker = function (string $transportName) use ($transports, $bus, $dispatcher): ?\Throwable {
+ $throwable = null;
+ $failedListener = function (WorkerMessageFailedEvent $event) use (&$throwable) {
+ $throwable = $event->getThrowable();
+ };
+ $dispatcher->addListener(WorkerMessageFailedEvent::class, $failedListener);
+
+ $worker = new Worker([$transportName => $transports[$transportName]], $bus, $dispatcher);
+
+ $worker->run();
+
+ $dispatcher->removeListener(WorkerMessageFailedEvent::class, $failedListener);
+
+ return $throwable;
+ };
+
+ // Simulate receive from external source
+ $transport1->send(new Envelope(new DummyMessage('API')));
+
+ // Receive the message from "transport1"
+ $throwable = $runWorker('transport1');
+
+ $this->assertInstanceOf(ValidationFailedException::class, $throwable, $throwable->getMessage());
+
+ $messagesWaiting = $transport1->getMessagesWaitingToBeReceived();
+
+ // Stamps should not be dropped on message that's queued for retry
+ $this->assertCount(1, $messagesWaiting);
+ $this->assertSame('some.bus', $messagesWaiting[0]->last(BusNameStamp::class)?->getBusName());
+ }
}
class DummyFailureTestSenderAndReceiver implements ReceiverInterface, SenderInterface
diff --git a/src/Symfony/Component/Messenger/Tests/Middleware/DispatchAfterCurrentBusMiddlewareTest.php b/src/Symfony/Component/Messenger/Tests/Middleware/DispatchAfterCurrentBusMiddlewareTest.php
index 5b1dced27ff0a..fd6e56edffc04 100644
--- a/src/Symfony/Component/Messenger/Tests/Middleware/DispatchAfterCurrentBusMiddlewareTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Middleware/DispatchAfterCurrentBusMiddlewareTest.php
@@ -11,6 +11,7 @@
namespace Symfony\Component\Messenger\Tests\Middleware;
+use PHPUnit\Framework\AssertionFailedError;
use PHPUnit\Framework\Constraint\Callback;
use PHPUnit\Framework\MockObject\Stub\ReturnCallback;
use PHPUnit\Framework\TestCase;
@@ -67,12 +68,7 @@ public function testEventsInNewTransactionAreHandledAfterMainMessage()
->with($this->callback(function (Envelope $envelope) use (&$series) {
return $envelope->getMessage() === array_shift($series);
}))
- ->willReturnOnConsecutiveCalls(
- $this->willHandleMessage(),
- $this->willHandleMessage(),
- $this->willHandleMessage(),
- $this->willHandleMessage()
- );
+ ->will($this->willHandleMessage());
$messageBus->dispatch($message);
}
@@ -110,16 +106,19 @@ public function testThrowingEventsHandlingWontStopExecution()
$secondEvent,
];
- $handlingMiddleware->expects($this->exactly(3))
+ $matcher = $this->exactly(3);
+ $handlingMiddleware->expects($matcher)
->method('handle')
->with($this->callback(function (Envelope $envelope) use (&$series) {
return $envelope->getMessage() === array_shift($series);
}))
- ->willReturnOnConsecutiveCalls(
- $this->willHandleMessage(),
- $this->throwException(new \RuntimeException('Some exception while handling first event')),
- $this->willHandleMessage()
- );
+ ->willReturnCallback(function ($envelope, StackInterface $stack) use ($matcher) {
+ if (2 === $matcher->getInvocationCount()) {
+ throw new \RuntimeException('Some exception while handling first event');
+ }
+
+ return $stack->next()->handle($envelope, $stack);
+ });
$this->expectException(DelayedMessageHandlingException::class);
$this->expectExceptionMessage('RuntimeException: Some exception while handling first event');
@@ -176,34 +175,39 @@ public function testLongChainWithExceptions()
// Note: $eventL3a should not be handled.
];
- $handlingMiddleware->expects($this->exactly(7))
+ $matcher = $this->exactly(7);
+ $handlingMiddleware->expects($matcher)
->method('handle')
->with($this->callback(function (Envelope $envelope) use (&$series) {
return $envelope->getMessage() === array_shift($series);
}))
- ->willReturnOnConsecutiveCalls(
- $this->willHandleMessage(),
- $this->willHandleMessage(),
- $this->returnCallback(function ($envelope, StackInterface $stack) use ($eventBus, $eventL2a, $eventL2b) {
- $envelope1 = new Envelope($eventL2a, [new DispatchAfterCurrentBusStamp()]);
- $eventBus->dispatch($envelope1);
- $eventBus->dispatch(new Envelope($eventL2b, [new DispatchAfterCurrentBusStamp()]));
-
- return $stack->next()->handle($envelope, $stack);
- }),
- $this->willHandleMessage(),
- $this->returnCallback(function () use ($eventBus, $eventL3a) {
- $eventBus->dispatch(new Envelope($eventL3a, [new DispatchAfterCurrentBusStamp()]));
-
- throw new \RuntimeException('Some exception while handling Event level 2a');
- }),
- $this->returnCallback(function ($envelope, StackInterface $stack) use ($eventBus, $eventL3b) {
- $eventBus->dispatch(new Envelope($eventL3b, [new DispatchAfterCurrentBusStamp()]));
-
- return $stack->next()->handle($envelope, $stack);
- }),
- $this->willHandleMessage()
- );
+ ->willReturnCallback(function ($envelope, StackInterface $stack) use ($eventBus, $eventL2a, $eventL2b, $eventL3a, $eventL3b, $matcher) {
+ switch ($matcher->getInvocationCount()) {
+ case 1:
+ case 2:
+ case 4:
+ case 7:
+ return $stack->next()->handle($envelope, $stack);
+
+ case 3:
+ $envelope1 = new Envelope($eventL2a, [new DispatchAfterCurrentBusStamp()]);
+ $eventBus->dispatch($envelope1);
+ $eventBus->dispatch(new Envelope($eventL2b, [new DispatchAfterCurrentBusStamp()]));
+
+ return $stack->next()->handle($envelope, $stack);
+
+ case 5:
+ $eventBus->dispatch(new Envelope($eventL3a, [new DispatchAfterCurrentBusStamp()]));
+
+ throw new \RuntimeException('Some exception while handling Event level 2a');
+ case 6:
+ $eventBus->dispatch(new Envelope($eventL3b, [new DispatchAfterCurrentBusStamp()]));
+
+ return $stack->next()->handle($envelope, $stack);
+ }
+
+ throw new AssertionFailedError('Unexpected call to handle');
+ });
$this->expectException(DelayedMessageHandlingException::class);
$this->expectExceptionMessage('RuntimeException: Some exception while handling Event level 2a');
diff --git a/src/Symfony/Component/Messenger/Worker.php b/src/Symfony/Component/Messenger/Worker.php
index 7e25f7de1b54f..3d69dd6135190 100644
--- a/src/Symfony/Component/Messenger/Worker.php
+++ b/src/Symfony/Component/Messenger/Worker.php
@@ -22,8 +22,7 @@
use Symfony\Component\Messenger\Event\WorkerRunningEvent;
use Symfony\Component\Messenger\Event\WorkerStartedEvent;
use Symfony\Component\Messenger\Event\WorkerStoppedEvent;
-use Symfony\Component\Messenger\Exception\DelayedMessageHandlingException;
-use Symfony\Component\Messenger\Exception\HandlerFailedException;
+use Symfony\Component\Messenger\Exception\EnvelopeAwareExceptionInterface;
use Symfony\Component\Messenger\Exception\RejectRedeliveredMessageException;
use Symfony\Component\Messenger\Exception\RuntimeException;
use Symfony\Component\Messenger\Stamp\AckStamp;
@@ -189,7 +188,7 @@ private function ack(): bool
$receiver->reject($envelope);
}
- if ($e instanceof HandlerFailedException || ($e instanceof DelayedMessageHandlingException && null !== $e->getEnvelope())) {
+ if ($e instanceof EnvelopeAwareExceptionInterface && null !== $e->getEnvelope()) {
$envelope = $e->getEnvelope();
}
diff --git a/src/Symfony/Component/Mime/.gitattributes b/src/Symfony/Component/Mime/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Mime/.gitattributes
+++ b/src/Symfony/Component/Mime/.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/Component/Mime/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mime/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Mime/.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/Component/Mime/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Mime/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Mime/.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/Component/Mime/Message.php b/src/Symfony/Component/Mime/Message.php
index 6a7e2093fad5e..fc8940ebdcfa4 100644
--- a/src/Symfony/Component/Mime/Message.php
+++ b/src/Symfony/Component/Mime/Message.php
@@ -130,11 +130,11 @@ public function toIterable(): iterable
*/
public function ensureValidity()
{
- if (!$this->headers->has('To') && !$this->headers->has('Cc') && !$this->headers->has('Bcc')) {
+ if (!$this->headers->get('To')?->getBody() && !$this->headers->get('Cc')?->getBody() && !$this->headers->get('Bcc')?->getBody()) {
throw new LogicException('An email must have a "To", "Cc", or "Bcc" header.');
}
- if (!$this->headers->has('From') && !$this->headers->has('Sender')) {
+ if (!$this->headers->get('From')?->getBody() && !$this->headers->get('Sender')?->getBody()) {
throw new LogicException('An email must have a "From" or a "Sender" header.');
}
diff --git a/src/Symfony/Component/Mime/Part/TextPart.php b/src/Symfony/Component/Mime/Part/TextPart.php
index 1f14e0caef07d..2a8dd5852068a 100644
--- a/src/Symfony/Component/Mime/Part/TextPart.php
+++ b/src/Symfony/Component/Mime/Part/TextPart.php
@@ -123,7 +123,11 @@ public function getName(): ?string
public function getBody(): string
{
if ($this->body instanceof File) {
- return file_get_contents($this->body->getPath());
+ if (false === $ret = @file_get_contents($this->body->getPath())) {
+ throw new InvalidArgumentException(error_get_last()['message']);
+ }
+
+ return $ret;
}
if (null === $this->seekable) {
diff --git a/src/Symfony/Component/Mime/Tests/MessageTest.php b/src/Symfony/Component/Mime/Tests/MessageTest.php
index 4f7c2a67ce396..1d01fa4519e93 100644
--- a/src/Symfony/Component/Mime/Tests/MessageTest.php
+++ b/src/Symfony/Component/Mime/Tests/MessageTest.php
@@ -276,4 +276,71 @@ public function testSymfonySerialize()
$serialized = $serializer->serialize($e, 'json');
$this->assertStringMatchesFormat($expectedJson, json_encode(json_decode($serialized), \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES));
}
+
+ /**
+ * @dataProvider ensureValidityProvider
+ */
+ public function testEnsureValidity(array $headers, ?string $exceptionClass, ?string $exceptionMessage)
+ {
+ if ($exceptionClass) {
+ $this->expectException($exceptionClass);
+ $this->expectExceptionMessage($exceptionMessage);
+ } else {
+ $this->expectNotToPerformAssertions();
+ }
+
+ $m = new Message();
+ foreach ($headers as $headerName => $headerValue) {
+ $m->getHeaders()->addMailboxListHeader($headerName, $headerValue);
+ }
+ $m->ensureValidity();
+ }
+
+ public function ensureValidityProvider()
+ {
+ return [
+ 'Valid address fields' => [
+ [
+ 'To' => ['dummy@symfony.com'],
+ 'From' => ['test@symfony.com'],
+ ],
+ null,
+ null,
+ ],
+
+ 'No destination address fields' => [
+ [
+ 'From' => ['test@symfony.com'],
+ ],
+ LogicException::class,
+ 'An email must have a "To", "Cc", or "Bcc" header.',
+ ],
+
+ 'Empty destination address fields' => [
+ [
+ 'To' => [],
+ 'From' => ['test@symfony.com'],
+ ],
+ LogicException::class,
+ 'An email must have a "To", "Cc", or "Bcc" header.',
+ ],
+
+ 'No originator fields' => [
+ [
+ 'To' => ['dummy@symfony.com'],
+ ],
+ LogicException::class,
+ 'An email must have a "From" or a "Sender" header.',
+ ],
+
+ 'Empty originator fields' => [
+ [
+ 'To' => ['dummy@symfony.com'],
+ 'From' => [],
+ ],
+ LogicException::class,
+ 'An email must have a "From" or a "Sender" header.',
+ ],
+ ];
+ }
}
diff --git a/src/Symfony/Component/Mime/Tests/Part/TextPartTest.php b/src/Symfony/Component/Mime/Tests/Part/TextPartTest.php
index 905349e670048..ae1a5921ecc1e 100644
--- a/src/Symfony/Component/Mime/Tests/Part/TextPartTest.php
+++ b/src/Symfony/Component/Mime/Tests/Part/TextPartTest.php
@@ -12,6 +12,7 @@
namespace Symfony\Component\Mime\Tests\Part;
use PHPUnit\Framework\TestCase;
+use Symfony\Component\Mime\Exception\InvalidArgumentException;
use Symfony\Component\Mime\Header\Headers;
use Symfony\Component\Mime\Header\ParameterizedHeader;
use Symfony\Component\Mime\Header\UnstructuredHeader;
@@ -55,6 +56,16 @@ public function testConstructorWithFile()
$this->assertSame('content', implode('', iterator_to_array($p->bodyToIterable())));
}
+ public function testConstructorWithUnknownFile()
+ {
+ $p = new TextPart(new File(\dirname(__DIR__).'/Fixtures/unknown.txt'));
+
+ // Exception should be thrown only when the body is accessed
+ $this->expectException(InvalidArgumentException::class);
+ $this->expectExceptionMessageMatches('{Failed to open stream}');
+ $p->getBody();
+ }
+
public function testConstructorWithNonStringOrResource()
{
$this->expectException(\TypeError::class);
diff --git a/src/Symfony/Component/Notifier/.gitattributes b/src/Symfony/Component/Notifier/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/.gitattributes
+++ b/src/Symfony/Component/Notifier/.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/Component/Notifier/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/.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/Component/Notifier/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/.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/Component/Notifier/Bridge/AllMySms/.gitattributes b/src/Symfony/Component/Notifier/Bridge/AllMySms/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/AllMySms/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/AllMySms/.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/Component/Notifier/Bridge/AllMySms/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/AllMySms/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/AllMySms/.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/Component/Notifier/Bridge/AllMySms/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/AllMySms/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/AllMySms/.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/Component/Notifier/Bridge/AmazonSns/.gitattributes b/src/Symfony/Component/Notifier/Bridge/AmazonSns/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/AmazonSns/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/AmazonSns/.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/Component/Notifier/Bridge/AmazonSns/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/AmazonSns/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/AmazonSns/.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/Component/Notifier/Bridge/AmazonSns/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/AmazonSns/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/AmazonSns/.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/Component/Notifier/Bridge/Bandwidth/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Bandwidth/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Bandwidth/.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/Component/Notifier/Bridge/Bandwidth/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Bandwidth/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Bandwidth/.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/Component/Notifier/Bridge/Brevo/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Brevo/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Brevo/.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/Component/Notifier/Bridge/Brevo/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Brevo/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Brevo/.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/Component/Notifier/Bridge/Chatwork/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Chatwork/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Chatwork/.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/Component/Notifier/Bridge/Chatwork/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Chatwork/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Chatwork/.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/Component/Notifier/Bridge/ClickSend/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/ClickSend/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/ClickSend/.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/Component/Notifier/Bridge/ClickSend/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/ClickSend/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/ClickSend/.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/Component/Notifier/Bridge/Clickatell/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Clickatell/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Clickatell/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Clickatell/.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/Component/Notifier/Bridge/Clickatell/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Clickatell/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Clickatell/.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/Component/Notifier/Bridge/Clickatell/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Clickatell/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Clickatell/.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/Component/Notifier/Bridge/ContactEveryone/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/ContactEveryone/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/ContactEveryone/.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/Component/Notifier/Bridge/ContactEveryone/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/ContactEveryone/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/ContactEveryone/.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/Component/Notifier/Bridge/Discord/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Discord/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Discord/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Discord/.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/Component/Notifier/Bridge/Discord/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Discord/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Discord/.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/Component/Notifier/Bridge/Discord/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Discord/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Discord/.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/Component/Notifier/Bridge/Engagespot/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Engagespot/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Engagespot/.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/Component/Notifier/Bridge/Engagespot/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Engagespot/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Engagespot/.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/Component/Notifier/Bridge/Esendex/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Esendex/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Esendex/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Esendex/.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/Component/Notifier/Bridge/Esendex/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Esendex/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Esendex/.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/Component/Notifier/Bridge/Esendex/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Esendex/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Esendex/.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/Component/Notifier/Bridge/Expo/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Expo/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Expo/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Expo/.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/Component/Notifier/Bridge/Expo/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Expo/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Expo/.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/Component/Notifier/Bridge/Expo/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Expo/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Expo/.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/Component/Notifier/Bridge/FakeChat/.gitattributes b/src/Symfony/Component/Notifier/Bridge/FakeChat/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/FakeChat/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/FakeChat/.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/Component/Notifier/Bridge/FakeChat/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/FakeChat/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/FakeChat/.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/Component/Notifier/Bridge/FakeChat/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/FakeChat/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/FakeChat/.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/Component/Notifier/Bridge/FakeSms/.gitattributes b/src/Symfony/Component/Notifier/Bridge/FakeSms/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/FakeSms/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/FakeSms/.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/Component/Notifier/Bridge/FakeSms/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/FakeSms/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/FakeSms/.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/Component/Notifier/Bridge/FakeSms/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/FakeSms/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/FakeSms/.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/Component/Notifier/Bridge/Firebase/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Firebase/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Firebase/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Firebase/.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/Component/Notifier/Bridge/Firebase/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Firebase/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Firebase/.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/Component/Notifier/Bridge/Firebase/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Firebase/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Firebase/.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/Component/Notifier/Bridge/FortySixElks/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/FortySixElks/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/FortySixElks/.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/Component/Notifier/Bridge/FortySixElks/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/FortySixElks/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/FortySixElks/.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/Component/Notifier/Bridge/FreeMobile/.gitattributes b/src/Symfony/Component/Notifier/Bridge/FreeMobile/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/FreeMobile/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/FreeMobile/.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/Component/Notifier/Bridge/FreeMobile/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/FreeMobile/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/FreeMobile/.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/Component/Notifier/Bridge/FreeMobile/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/FreeMobile/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/FreeMobile/.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/Component/Notifier/Bridge/GatewayApi/.gitattributes b/src/Symfony/Component/Notifier/Bridge/GatewayApi/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/GatewayApi/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/GatewayApi/.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/Component/Notifier/Bridge/GatewayApi/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/GatewayApi/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/GatewayApi/.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/Component/Notifier/Bridge/GatewayApi/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/GatewayApi/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/GatewayApi/.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/Component/Notifier/Bridge/Gitter/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Gitter/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Gitter/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Gitter/.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/Component/Notifier/Bridge/Gitter/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Gitter/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Gitter/.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/Component/Notifier/Bridge/Gitter/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Gitter/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Gitter/.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/Component/Notifier/Bridge/GoIp/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/GoIp/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/GoIp/.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/Component/Notifier/Bridge/GoIp/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/GoIp/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/GoIp/.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/Component/Notifier/Bridge/GoogleChat/.gitattributes b/src/Symfony/Component/Notifier/Bridge/GoogleChat/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/GoogleChat/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/GoogleChat/.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/Component/Notifier/Bridge/GoogleChat/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/GoogleChat/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/GoogleChat/.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/Component/Notifier/Bridge/GoogleChat/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/GoogleChat/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/GoogleChat/.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/Component/Notifier/Bridge/Infobip/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Infobip/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Infobip/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Infobip/.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/Component/Notifier/Bridge/Infobip/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Infobip/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Infobip/.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/Component/Notifier/Bridge/Infobip/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Infobip/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Infobip/.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/Component/Notifier/Bridge/Iqsms/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Iqsms/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Iqsms/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Iqsms/.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/Component/Notifier/Bridge/Iqsms/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Iqsms/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Iqsms/.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/Component/Notifier/Bridge/Iqsms/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Iqsms/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Iqsms/.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/Component/Notifier/Bridge/Isendpro/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Isendpro/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Isendpro/.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/Component/Notifier/Bridge/Isendpro/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Isendpro/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Isendpro/.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/Component/Notifier/Bridge/KazInfoTeh/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/.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/Component/Notifier/Bridge/KazInfoTeh/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/.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/Component/Notifier/Bridge/LightSms/.gitattributes b/src/Symfony/Component/Notifier/Bridge/LightSms/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/LightSms/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/LightSms/.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/Component/Notifier/Bridge/LightSms/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/LightSms/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/LightSms/.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/Component/Notifier/Bridge/LightSms/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/LightSms/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/LightSms/.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/Component/Notifier/Bridge/LineNotify/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/LineNotify/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/LineNotify/.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/Component/Notifier/Bridge/LineNotify/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/LineNotify/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/LineNotify/.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/Component/Notifier/Bridge/LinkedIn/.gitattributes b/src/Symfony/Component/Notifier/Bridge/LinkedIn/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/LinkedIn/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/LinkedIn/.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/Component/Notifier/Bridge/LinkedIn/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/LinkedIn/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/LinkedIn/.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/Component/Notifier/Bridge/LinkedIn/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/LinkedIn/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/LinkedIn/.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/Component/Notifier/Bridge/Mailjet/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Mailjet/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Mailjet/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Mailjet/.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/Component/Notifier/Bridge/Mailjet/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Mailjet/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Mailjet/.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/Component/Notifier/Bridge/Mailjet/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Mailjet/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Mailjet/.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/Component/Notifier/Bridge/Mastodon/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Mastodon/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Mastodon/.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/Component/Notifier/Bridge/Mastodon/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Mastodon/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Mastodon/.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/Component/Notifier/Bridge/Mattermost/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Mattermost/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Mattermost/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Mattermost/.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/Component/Notifier/Bridge/Mattermost/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Mattermost/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Mattermost/.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/Component/Notifier/Bridge/Mattermost/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Mattermost/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Mattermost/.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/Component/Notifier/Bridge/Mercure/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Mercure/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Mercure/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Mercure/.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/Component/Notifier/Bridge/Mercure/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Mercure/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Mercure/.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/Component/Notifier/Bridge/Mercure/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Mercure/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Mercure/.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/Component/Notifier/Bridge/MessageBird/.gitattributes b/src/Symfony/Component/Notifier/Bridge/MessageBird/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/MessageBird/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/MessageBird/.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/Component/Notifier/Bridge/MessageBird/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/MessageBird/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/MessageBird/.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/Component/Notifier/Bridge/MessageBird/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/MessageBird/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/MessageBird/.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/Component/Notifier/Bridge/MessageMedia/.gitattributes b/src/Symfony/Component/Notifier/Bridge/MessageMedia/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/MessageMedia/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/MessageMedia/.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/Component/Notifier/Bridge/MessageMedia/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/MessageMedia/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/MessageMedia/.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/Component/Notifier/Bridge/MessageMedia/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/MessageMedia/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/MessageMedia/.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/Component/Notifier/Bridge/MicrosoftTeams/.gitattributes b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/.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/Component/Notifier/Bridge/MicrosoftTeams/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/.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/Component/Notifier/Bridge/MicrosoftTeams/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/.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/Component/Notifier/Bridge/Mobyt/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Mobyt/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Mobyt/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Mobyt/.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/Component/Notifier/Bridge/Mobyt/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Mobyt/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Mobyt/.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/Component/Notifier/Bridge/Mobyt/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Mobyt/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Mobyt/.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/Component/Notifier/Bridge/Novu/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Novu/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Novu/.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/Component/Notifier/Bridge/Novu/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Novu/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Novu/.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/Component/Notifier/Bridge/Ntfy/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Ntfy/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Ntfy/.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/Component/Notifier/Bridge/Ntfy/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Ntfy/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Ntfy/.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/Component/Notifier/Bridge/Octopush/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Octopush/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Octopush/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Octopush/.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/Component/Notifier/Bridge/Octopush/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Octopush/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Octopush/.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/Component/Notifier/Bridge/Octopush/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Octopush/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Octopush/.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/Component/Notifier/Bridge/OneSignal/.gitattributes b/src/Symfony/Component/Notifier/Bridge/OneSignal/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/OneSignal/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/OneSignal/.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/Component/Notifier/Bridge/OneSignal/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/OneSignal/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/OneSignal/.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/Component/Notifier/Bridge/OneSignal/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/OneSignal/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/OneSignal/.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/Component/Notifier/Bridge/OrangeSms/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/OrangeSms/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/OrangeSms/.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/Component/Notifier/Bridge/OrangeSms/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/OrangeSms/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/OrangeSms/.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/Component/Notifier/Bridge/OvhCloud/.gitattributes b/src/Symfony/Component/Notifier/Bridge/OvhCloud/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/OvhCloud/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/OvhCloud/.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/Component/Notifier/Bridge/OvhCloud/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/OvhCloud/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/OvhCloud/.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/Component/Notifier/Bridge/OvhCloud/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/OvhCloud/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/OvhCloud/.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/Component/Notifier/Bridge/PagerDuty/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/PagerDuty/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/PagerDuty/.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/Component/Notifier/Bridge/PagerDuty/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/PagerDuty/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/PagerDuty/.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/Component/Notifier/Bridge/Plivo/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Plivo/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Plivo/.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/Component/Notifier/Bridge/Plivo/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Plivo/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Plivo/.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/Component/Notifier/Bridge/Pushover/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Pushover/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Pushover/.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/Component/Notifier/Bridge/Pushover/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Pushover/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Pushover/.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/Component/Notifier/Bridge/Redlink/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Redlink/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Redlink/.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/Component/Notifier/Bridge/Redlink/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Redlink/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Redlink/.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/Component/Notifier/Bridge/RingCentral/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/RingCentral/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/RingCentral/.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/Component/Notifier/Bridge/RingCentral/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/RingCentral/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/RingCentral/.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/Component/Notifier/Bridge/RocketChat/.gitattributes b/src/Symfony/Component/Notifier/Bridge/RocketChat/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/RocketChat/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/RocketChat/.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/Component/Notifier/Bridge/RocketChat/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/RocketChat/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/RocketChat/.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/Component/Notifier/Bridge/RocketChat/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/RocketChat/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/RocketChat/.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/Component/Notifier/Bridge/Sendberry/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Sendberry/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Sendberry/.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/Component/Notifier/Bridge/Sendberry/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Sendberry/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Sendberry/.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/Component/Notifier/Bridge/Sendinblue/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Sendinblue/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Sendinblue/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Sendinblue/.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/Component/Notifier/Bridge/Sendinblue/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Sendinblue/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Sendinblue/.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/Component/Notifier/Bridge/Sendinblue/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Sendinblue/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Sendinblue/.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/Component/Notifier/Bridge/SimpleTextin/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/SimpleTextin/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/SimpleTextin/.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/Component/Notifier/Bridge/SimpleTextin/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/SimpleTextin/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/SimpleTextin/.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/Component/Notifier/Bridge/Sinch/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Sinch/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Sinch/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Sinch/.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/Component/Notifier/Bridge/Sinch/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Sinch/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Sinch/.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/Component/Notifier/Bridge/Sinch/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Sinch/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Sinch/.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/Component/Notifier/Bridge/Slack/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Slack/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Slack/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Slack/.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/Component/Notifier/Bridge/Slack/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Slack/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Slack/.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/Component/Notifier/Bridge/Slack/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Slack/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Slack/.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/Component/Notifier/Bridge/Slack/SlackTransport.php b/src/Symfony/Component/Notifier/Bridge/Slack/SlackTransport.php
index 3a4396934cbbf..02fa69429af57 100644
--- a/src/Symfony/Component/Notifier/Bridge/Slack/SlackTransport.php
+++ b/src/Symfony/Component/Notifier/Bridge/Slack/SlackTransport.php
@@ -81,7 +81,7 @@ protected function doSend(MessageInterface $message): SlackSentMessage
}
$response = $this->client->request('POST', 'https://'.$this->getEndpoint().'/api/'.$apiMethod, [
- 'json' => array_filter($options),
+ 'json' => array_filter($options, function ($value): bool { return !\in_array($value, ['', [], null], true); }),
'auth_bearer' => $this->accessToken,
'headers' => [
'Content-Type' => 'application/json; charset=utf-8',
diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportTest.php
index 0b9a17fc08493..b0a54d5e0c611 100644
--- a/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportTest.php
@@ -167,6 +167,56 @@ public function testSendWithNotification()
$this->assertSame('1503435956.000247', $sentMessage->getMessageId());
}
+ /**
+ * @testWith [true]
+ * [false]
+ */
+ public function testSendWithBooleanOptionValue(bool $value)
+ {
+ $channel = 'testChannel';
+ $message = 'testMessage';
+
+ $response = $this->createMock(ResponseInterface::class);
+
+ $response->expects($this->exactly(2))
+ ->method('getStatusCode')
+ ->willReturn(200);
+
+ $response->expects($this->once())
+ ->method('getContent')
+ ->willReturn(json_encode(['ok' => true, 'ts' => '1503435956.000247', 'channel' => 'C123456']));
+
+ $options = new SlackOptions();
+ $options->asUser($value);
+ $options->linkNames($value);
+ $options->mrkdwn($value);
+ $options->unfurlLinks($value);
+ $options->unfurlMedia($value);
+ $notification = new Notification($message);
+ $chatMessage = ChatMessage::fromNotification($notification);
+ $chatMessage->options($options);
+
+ $expectedBody = json_encode([
+ 'as_user' => $value,
+ 'channel' => $channel,
+ 'link_names' => $value,
+ 'mrkdwn' => $value,
+ 'text' => $message,
+ 'unfurl_links' => $value,
+ 'unfurl_media' => $value,
+ ]);
+
+ $client = new MockHttpClient(function (string $method, string $url, array $options = []) use ($response, $expectedBody): ResponseInterface {
+ $this->assertJsonStringEqualsJsonString($expectedBody, $options['body']);
+
+ return $response;
+ });
+
+ $transport = self::createTransport($client, $channel);
+
+ $transport->send($chatMessage);
+ }
+
public function testSendWith200ResponseButNotOk()
{
$channel = 'testChannel';
diff --git a/src/Symfony/Component/Notifier/Bridge/Sms77/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Sms77/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Sms77/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Sms77/.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/Component/Notifier/Bridge/Sms77/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Sms77/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Sms77/.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/Component/Notifier/Bridge/Sms77/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Sms77/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Sms77/.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/Component/Notifier/Bridge/SmsBiuras/.gitattributes b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/SmsBiuras/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/.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/Component/Notifier/Bridge/SmsBiuras/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/SmsBiuras/.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/Component/Notifier/Bridge/SmsBiuras/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/SmsBiuras/.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/Component/Notifier/Bridge/SmsFactor/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/SmsFactor/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/SmsFactor/.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/Component/Notifier/Bridge/SmsFactor/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/SmsFactor/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/SmsFactor/.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/Component/Notifier/Bridge/Smsapi/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Smsapi/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Smsapi/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Smsapi/.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/Component/Notifier/Bridge/Smsapi/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Smsapi/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Smsapi/.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/Component/Notifier/Bridge/Smsapi/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Smsapi/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Smsapi/.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/Component/Notifier/Bridge/Smsc/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Smsc/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Smsc/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Smsc/.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/Component/Notifier/Bridge/Smsc/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Smsc/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Smsc/.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/Component/Notifier/Bridge/Smsc/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Smsc/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Smsc/.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/Component/Notifier/Bridge/Smsmode/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Smsmode/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Smsmode/.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/Component/Notifier/Bridge/Smsmode/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Smsmode/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Smsmode/.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/Component/Notifier/Bridge/SpotHit/.gitattributes b/src/Symfony/Component/Notifier/Bridge/SpotHit/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/SpotHit/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/SpotHit/.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/Component/Notifier/Bridge/SpotHit/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/SpotHit/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/SpotHit/.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/Component/Notifier/Bridge/SpotHit/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/SpotHit/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/SpotHit/.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/Component/Notifier/Bridge/Telegram/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Telegram/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Telegram/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Telegram/.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/Component/Notifier/Bridge/Telegram/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Telegram/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Telegram/.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/Component/Notifier/Bridge/Telegram/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Telegram/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Telegram/.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/Component/Notifier/Bridge/Telnyx/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Telnyx/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Telnyx/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Telnyx/.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/Component/Notifier/Bridge/Telnyx/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Telnyx/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Telnyx/.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/Component/Notifier/Bridge/Telnyx/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Telnyx/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Telnyx/.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/Component/Notifier/Bridge/Termii/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Termii/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Termii/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Termii/.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/Component/Notifier/Bridge/Termii/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Termii/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Termii/.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/Component/Notifier/Bridge/Termii/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Termii/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Termii/.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/Component/Notifier/Bridge/TurboSms/.gitattributes b/src/Symfony/Component/Notifier/Bridge/TurboSms/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/TurboSms/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/TurboSms/.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/Component/Notifier/Bridge/TurboSms/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/TurboSms/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/TurboSms/.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/Component/Notifier/Bridge/TurboSms/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/TurboSms/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/TurboSms/.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/Component/Notifier/Bridge/Twilio/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Twilio/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Twilio/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Twilio/.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/Component/Notifier/Bridge/Twilio/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Twilio/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Twilio/.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/Component/Notifier/Bridge/Twilio/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Twilio/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Twilio/.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/Component/Notifier/Bridge/Twitter/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Twitter/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Twitter/.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/Component/Notifier/Bridge/Twitter/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Twitter/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Twitter/.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/Component/Notifier/Bridge/Vonage/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Vonage/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Vonage/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Vonage/.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/Component/Notifier/Bridge/Vonage/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Vonage/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Vonage/.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/Component/Notifier/Bridge/Vonage/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Vonage/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Vonage/.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/Component/Notifier/Bridge/Yunpian/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Yunpian/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Yunpian/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Yunpian/.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/Component/Notifier/Bridge/Yunpian/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Yunpian/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Yunpian/.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/Component/Notifier/Bridge/Yunpian/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Yunpian/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Yunpian/.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/Component/Notifier/Bridge/Zendesk/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Zendesk/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Zendesk/.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/Component/Notifier/Bridge/Zendesk/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Zendesk/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Zendesk/.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/Component/Notifier/Bridge/Zulip/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Zulip/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Zulip/.gitattributes
+++ b/src/Symfony/Component/Notifier/Bridge/Zulip/.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/Component/Notifier/Bridge/Zulip/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Zulip/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Zulip/.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/Component/Notifier/Bridge/Zulip/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Zulip/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Notifier/Bridge/Zulip/.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/Component/Notifier/Tests/Transport/FailoverTransportTest.php b/src/Symfony/Component/Notifier/Tests/Transport/FailoverTransportTest.php
index 2b48c20e20ff0..07d4720459b4d 100644
--- a/src/Symfony/Component/Notifier/Tests/Transport/FailoverTransportTest.php
+++ b/src/Symfony/Component/Notifier/Tests/Transport/FailoverTransportTest.php
@@ -121,13 +121,17 @@ public function testSendAllDeadWithinRetryPeriod()
$t1->expects($this->once())->method('send');
$t2 = $this->createMock(TransportInterface::class);
$t2->method('supports')->with($message)->willReturn(true);
- $t2->expects($this->exactly(3))
+
+ $matcher = $this->exactly(3);
+ $t2->expects($matcher)
->method('send')
- ->willReturnOnConsecutiveCalls(
- new SentMessage($message, 't2'),
- new SentMessage($message, 't2'),
- $this->throwException($this->createMock(TransportExceptionInterface::class))
- );
+ ->willReturnCallback(function () use ($matcher, $message) {
+ if (3 === $matcher->getInvocationCount()) {
+ throw $this->createMock(TransportExceptionInterface::class);
+ }
+
+ return new SentMessage($message, 't2');
+ });
$t = new FailoverTransport([$t1, $t2], 40);
$t->send($message);
sleep(4);
@@ -146,16 +150,27 @@ public function testSendOneDeadButRecover()
$t1 = $this->createMock(TransportInterface::class);
$t1->method('supports')->with($message)->willReturn(true);
- $t1->expects($this->exactly(2))->method('send')->willReturnOnConsecutiveCalls(
- $this->throwException($this->createMock(TransportExceptionInterface::class)),
- new SentMessage($message, 't1')
- );
+
+ $t1Matcher = $this->exactly(2);
+ $t1->expects($t1Matcher)->method('send')
+ ->willReturnCallback(function () use ($t1Matcher, $message) {
+ if (1 === $t1Matcher->getInvocationCount()) {
+ throw $this->createMock(TransportExceptionInterface::class);
+ }
+
+ return new SentMessage($message, 't1');
+ });
$t2 = $this->createMock(TransportInterface::class);
$t2->method('supports')->with($message)->willReturn(true);
- $t2->expects($this->exactly(2))->method('send')->willReturnOnConsecutiveCalls(
- new SentMessage($message, 't2'),
- $this->throwException($this->createMock(TransportExceptionInterface::class))
- );
+
+ $t2Matcher = $this->exactly(2);
+ $t2->expects($t2Matcher)->method('send')->willReturnCallback(function () use ($t2Matcher, $message) {
+ if (1 === $t2Matcher->getInvocationCount()) {
+ return new SentMessage($message, 't1');
+ }
+
+ throw $this->createMock(TransportExceptionInterface::class);
+ });
$t = new FailoverTransport([$t1, $t2], 1);
diff --git a/src/Symfony/Component/OptionsResolver/.gitattributes b/src/Symfony/Component/OptionsResolver/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/OptionsResolver/.gitattributes
+++ b/src/Symfony/Component/OptionsResolver/.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/Component/OptionsResolver/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/OptionsResolver/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/OptionsResolver/.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/Component/OptionsResolver/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/OptionsResolver/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/OptionsResolver/.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/Component/PasswordHasher/.gitattributes b/src/Symfony/Component/PasswordHasher/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/PasswordHasher/.gitattributes
+++ b/src/Symfony/Component/PasswordHasher/.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/Component/PasswordHasher/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/PasswordHasher/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/PasswordHasher/.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/Component/PasswordHasher/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/PasswordHasher/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/PasswordHasher/.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/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php b/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php
index 4cf708b806296..324e1dc65b9ca 100644
--- a/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php
+++ b/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php
@@ -98,16 +98,44 @@ public function testBcryptWithLongPassword()
$this->assertTrue($hasher->verify($hasher->hash($plainPassword), $plainPassword));
}
- public function testBcryptWithNulByte()
+ /**
+ * @requires PHP < 8.4
+ */
+ public function testBcryptWithNulByteWithNativePasswordHash()
{
$hasher = new NativePasswordHasher(null, null, 4, \PASSWORD_BCRYPT);
$plainPassword = "a\0b";
- if (\PHP_VERSION_ID < 80218 || \PHP_VERSION_ID >= 80300 && \PHP_VERSION_ID < 80305) {
- // password_hash() does not accept passwords containing NUL bytes since PHP 8.2.18 and 8.3.5
- $this->assertFalse($hasher->verify(password_hash($plainPassword, \PASSWORD_BCRYPT, ['cost' => 4]), $plainPassword));
+ try {
+ $hash = password_hash($plainPassword, \PASSWORD_BCRYPT, ['cost' => 4]);
+ } catch (\Throwable $throwable) {
+ // we skip the test in case the current PHP version does not support NUL bytes in passwords
+ // with bcrypt
+ //
+ // @see https://github.com/php/php-src/commit/11f2568767660ffe92fbc6799800e01203aad73a
+ if (str_contains($throwable->getMessage(), 'Bcrypt password must not contain null character')) {
+ $this->markTestSkipped('password_hash() does not accept passwords containing NUL bytes.');
+ }
+
+ throw $throwable;
}
+ if (null === $hash) {
+ // we also skip the test in case password_hash() returns null as
+ // implemented in security patches backports
+ //
+ // @see https://github.com/shivammathur/php-src-backports/commit/d22d9ebb29dce86edd622205dd1196a2796c08c7
+ $this->markTestSkipped('password_hash() does not accept passwords containing NUL bytes.');
+ }
+
+ $this->assertFalse($hasher->verify($hash, $plainPassword));
+ }
+
+ public function testPasswordNulByteGracefullyHandled()
+ {
+ $hasher = new NativePasswordHasher(null, null, 4, \PASSWORD_BCRYPT);
+ $plainPassword = "a\0b";
+
$this->assertTrue($hasher->verify($hasher->hash($plainPassword), $plainPassword));
}
diff --git a/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php b/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php
index 101c09fc46ed3..ed04b5e097c58 100644
--- a/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php
+++ b/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php
@@ -73,17 +73,45 @@ public function testBcryptWithLongPassword()
$this->assertTrue($hasher->verify((new NativePasswordHasher(null, null, 4, \PASSWORD_BCRYPT))->hash($plainPassword), $plainPassword));
}
- public function testBcryptWithNulByte()
+ /**
+ * @requires PHP < 8.4
+ */
+ public function testBcryptWithNulByteWithNativePasswordHash()
{
$hasher = new SodiumPasswordHasher(null, null);
$plainPassword = "a\0b";
- if (\PHP_VERSION_ID < 80218 || \PHP_VERSION_ID >= 80300 && \PHP_VERSION_ID < 80305) {
- // password_hash() does not accept passwords containing NUL bytes since PHP 8.2.18 and 8.3.5
- $this->assertFalse($hasher->verify(password_hash($plainPassword, \PASSWORD_BCRYPT, ['cost' => 4]), $plainPassword));
+ try {
+ $hash = password_hash($plainPassword, \PASSWORD_BCRYPT, ['cost' => 4]);
+ } catch (\Throwable $throwable) {
+ // we skip the test in case the current PHP version does not support NUL bytes in passwords
+ // with bcrypt
+ //
+ // @see https://github.com/php/php-src/commit/11f2568767660ffe92fbc6799800e01203aad73a
+ if (str_contains($throwable->getMessage(), 'Bcrypt password must not contain null character')) {
+ $this->markTestSkipped('password_hash() does not accept passwords containing NUL bytes.');
+ }
+
+ throw $throwable;
}
- $this->assertTrue($hasher->verify((new NativePasswordHasher(null, null, 4, \PASSWORD_BCRYPT))->hash($plainPassword), $plainPassword));
+ if (null === $hash) {
+ // we also skip the test in case password_hash() returns null as
+ // implemented in security patches backports
+ //
+ // @see https://github.com/shivammathur/php-src-backports/commit/d22d9ebb29dce86edd622205dd1196a2796c08c7
+ $this->markTestSkipped('password_hash() does not accept passwords containing NUL bytes.');
+ }
+
+ $this->assertFalse($hasher->verify($hash, $plainPassword));
+ }
+
+ public function testPasswordNulByteGracefullyHandled()
+ {
+ $hasher = new SodiumPasswordHasher(null, null);
+ $plainPassword = "a\0b";
+
+ $this->assertTrue($hasher->verify($hasher->hash($plainPassword), $plainPassword));
}
public function testUserProvidedSaltIsNotUsed()
diff --git a/src/Symfony/Component/PasswordHasher/Tests/Hasher/UserPasswordHasherTest.php b/src/Symfony/Component/PasswordHasher/Tests/Hasher/UserPasswordHasherTest.php
index 274272583c321..1f9c835ec4180 100644
--- a/src/Symfony/Component/PasswordHasher/Tests/Hasher/UserPasswordHasherTest.php
+++ b/src/Symfony/Component/PasswordHasher/Tests/Hasher/UserPasswordHasherTest.php
@@ -121,7 +121,7 @@ public function testNeedsRehash()
$mockPasswordHasherFactory->expects($this->any())
->method('getPasswordHasher')
->with($user)
- ->will($this->onConsecutiveCalls($hasher, $hasher, new NativePasswordHasher(5, 20000, 5), $hasher));
+ ->willReturn($hasher, $hasher, new NativePasswordHasher(5, 20000, 5), $hasher);
$passwordHasher = new UserPasswordHasher($mockPasswordHasherFactory);
diff --git a/src/Symfony/Component/Process/.gitattributes b/src/Symfony/Component/Process/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Process/.gitattributes
+++ b/src/Symfony/Component/Process/.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/Component/Process/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Process/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Process/.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/Component/Process/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Process/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Process/.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/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php
index c804a17923827..bf2e8e857c93e 100644
--- a/src/Symfony/Component/Process/Process.php
+++ b/src/Symfony/Component/Process/Process.php
@@ -1211,7 +1211,7 @@ public static function isTtySupported(): bool
{
static $isTtySupported;
- return $isTtySupported ??= ('/' === \DIRECTORY_SEPARATOR && stream_isatty(\STDOUT));
+ return $isTtySupported ??= ('/' === \DIRECTORY_SEPARATOR && stream_isatty(\STDOUT) && @is_writable('/dev/tty'));
}
/**
diff --git a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php
index a0f622739492c..a1b8d6d54b940 100644
--- a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php
+++ b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php
@@ -99,12 +99,16 @@ public function testFindWithOpenBaseDir()
}
putenv('PATH='.\dirname(\PHP_BINARY));
- $this->iniSet('open_basedir', \dirname(\PHP_BINARY).\PATH_SEPARATOR.'/');
+ $initialOpenBaseDir = ini_set('open_basedir', \dirname(\PHP_BINARY).\PATH_SEPARATOR.'/');
- $finder = new ExecutableFinder();
- $result = $finder->find($this->getPhpBinaryName());
+ try {
+ $finder = new ExecutableFinder();
+ $result = $finder->find($this->getPhpBinaryName());
- $this->assertSamePath(\PHP_BINARY, $result);
+ $this->assertSamePath(\PHP_BINARY, $result);
+ } finally {
+ ini_set('open_basedir', $initialOpenBaseDir);
+ }
}
public function testFindBatchExecutableOnWindows()
diff --git a/src/Symfony/Component/PropertyAccess/.gitattributes b/src/Symfony/Component/PropertyAccess/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/PropertyAccess/.gitattributes
+++ b/src/Symfony/Component/PropertyAccess/.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/Component/PropertyAccess/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/PropertyAccess/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/PropertyAccess/.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/Component/PropertyAccess/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/PropertyAccess/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/PropertyAccess/.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/Component/PropertyInfo/.gitattributes b/src/Symfony/Component/PropertyInfo/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/PropertyInfo/.gitattributes
+++ b/src/Symfony/Component/PropertyInfo/.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/Component/PropertyInfo/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/PropertyInfo/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/PropertyInfo/.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/Component/PropertyInfo/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/PropertyInfo/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/PropertyInfo/.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/Component/RateLimiter/.gitattributes b/src/Symfony/Component/RateLimiter/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/RateLimiter/.gitattributes
+++ b/src/Symfony/Component/RateLimiter/.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/Component/RateLimiter/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/RateLimiter/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/RateLimiter/.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/Component/RateLimiter/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/RateLimiter/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/RateLimiter/.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/Component/RemoteEvent/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/RemoteEvent/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/RemoteEvent/.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/Component/RemoteEvent/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/RemoteEvent/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/RemoteEvent/.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/Component/Routing/.gitattributes b/src/Symfony/Component/Routing/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Routing/.gitattributes
+++ b/src/Symfony/Component/Routing/.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/Component/Routing/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Routing/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Routing/.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/Component/Routing/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Routing/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Routing/.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/Component/Routing/Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php b/src/Symfony/Component/Routing/Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php
index 572f524a052f4..333cc9f42dc86 100644
--- a/src/Symfony/Component/Routing/Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php
+++ b/src/Symfony/Component/Routing/Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php
@@ -48,6 +48,7 @@ protected function tearDown(): void
parent::tearDown();
@unlink($this->testTmpFilepath);
+ @unlink($this->largeTestTmpFilepath);
}
public function testDumpWithRoutes()
diff --git a/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php
index 01727e14e8ecf..f3536f1fc56d8 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php
@@ -81,9 +81,8 @@ public function testExceptionOnBadMethod()
public function testExceptionOnMethodNotReturningCollection()
{
$this->expectException(\LogicException::class);
- $service = $this->getMockBuilder(\stdClass::class)
- ->addMethods(['loadRoutes'])
- ->getMock();
+
+ $service = $this->createMock(CustomRouteLoader::class);
$service->expects($this->once())
->method('loadRoutes')
->willReturn('NOT_A_COLLECTION');
@@ -109,6 +108,11 @@ protected function getObject(string $id): object
}
}
+interface CustomRouteLoader
+{
+ public function loadRoutes();
+}
+
class TestObjectLoaderRouteService
{
private RouteCollection $collection;
diff --git a/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php b/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php
index d1fd035d12aed..e5093a749b8dc 100644
--- a/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php
+++ b/src/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php
@@ -211,6 +211,9 @@ public function testTrailingRequirementWithDefaultA()
protected function getUrlMatcher(RouteCollection $routes, ?RequestContext $context = null)
{
- return $this->getMockForAbstractClass(RedirectableUrlMatcher::class, [$routes, $context ?? new RequestContext()]);
+ return $this->getMockBuilder(RedirectableUrlMatcher::class)
+ ->setConstructorArgs([$routes, $context ?? new RequestContext()])
+ ->onlyMethods(['redirect'])
+ ->getMock();
}
}
diff --git a/src/Symfony/Component/Runtime/.gitattributes b/src/Symfony/Component/Runtime/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Runtime/.gitattributes
+++ b/src/Symfony/Component/Runtime/.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/Component/Runtime/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Runtime/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Runtime/.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/Component/Runtime/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Runtime/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Runtime/.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/Component/Scheduler/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Scheduler/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Scheduler/.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/Component/Scheduler/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Scheduler/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Scheduler/.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/Component/Scheduler/Schedule.php b/src/Symfony/Component/Scheduler/Schedule.php
index 4ccd88ff7a6e9..bd413892bc671 100644
--- a/src/Symfony/Component/Scheduler/Schedule.php
+++ b/src/Symfony/Component/Scheduler/Schedule.php
@@ -141,6 +141,10 @@ public function getSchedule(): static
public function before(callable $listener, int $priority = 0): static
{
+ if (!$this->dispatcher) {
+ throw new LogicException(sprintf('To register a listener with "%s()", you need to set an event dispatcher on the Schedule.', __METHOD__));
+ }
+
$this->dispatcher->addListener(PreRunEvent::class, $listener, $priority);
return $this;
@@ -148,6 +152,10 @@ public function before(callable $listener, int $priority = 0): static
public function after(callable $listener, int $priority = 0): static
{
+ if (!$this->dispatcher) {
+ throw new LogicException(sprintf('To register a listener with "%s()", you need to set an event dispatcher on the Schedule.', __METHOD__));
+ }
+
$this->dispatcher->addListener(PostRunEvent::class, $listener, $priority);
return $this;
@@ -155,6 +163,10 @@ public function after(callable $listener, int $priority = 0): static
public function onFailure(callable $listener, int $priority = 0): static
{
+ if (!$this->dispatcher) {
+ throw new LogicException(sprintf('To register a listener with "%s()", you need to set an event dispatcher on the Schedule.', __METHOD__));
+ }
+
$this->dispatcher->addListener(FailureEvent::class, $listener, $priority);
return $this;
diff --git a/src/Symfony/Component/Security/Core/.gitattributes b/src/Symfony/Component/Security/Core/.gitattributes
index 14c3c35940427..84c7add058fb5 100644
--- a/src/Symfony/Component/Security/Core/.gitattributes
+++ b/src/Symfony/Component/Security/Core/.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/Component/Security/Core/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Security/Core/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 4689c4dad430e..0000000000000
--- a/src/Symfony/Component/Security/Core/.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/Component/Security/Core/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Security/Core/.github/workflows/check-subtree-split.yml
deleted file mode 100644
index 16be48bae3113..0000000000000
--- a/src/Symfony/Component/Security/Core/.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/Component/Security/Core/Resources/translations/security.af.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.af.xlf
index 014111dff1262..7bcb92066c72f 100644
--- a/src/Symfony/Component/Security/Core/Resources/translations/security.af.xlf
+++ b/src/Symfony/Component/Security/Core/Resources/translations/security.af.xlf
@@ -74,6 +74,10 @@
Too many failed login attempts, please try again in %minutes% minute.
Te veel mislukte aanmeldpogings, probeer asseblief weer oor %minutes% minuut.
+
+ Too many failed login attempts, please try again in %minutes% minutes.
+ Te veel mislukte aanmeldpogings, probeer asseblief weer oor %minutes% minute.
+
An authentication exception occurred.
- Terjadi sebuah pengecualian otentikasi.
+ Terjadi kesalahan otentikasi.
Authentication credentials could not be found.
@@ -16,7 +16,7 @@
Invalid credentials.
- Kredensial salah.
+ Kredensial tidak valid.
Cookie has already been used by someone else.
@@ -28,7 +28,7 @@
Invalid CSRF token.
- Token CSRF salah.
+ Token CSRF tidak valid.
No authentication provider found to support the authentication token.
@@ -64,15 +64,19 @@
Too many failed login attempts, please try again later.
- Terlalu banyak percobaan login yang salah, silahkan coba lagi nanti.
+ Terlalu banyak percobaan login yang gagal, silahkan coba lagi nanti.
Invalid or expired login link.
- Link login salah atau sudah kedaluwarsa.
+ Link login tidak valid atau sudah kedaluwarsa.
Too many failed login attempts, please try again in %minutes% minute.
- Terlalu banyak percobaan login yang salah, silahkan coba lagi dalam %minutes% menit.
+ Terlalu banyak percobaan login yang gagal, silahkan coba lagi dalam %minutes% menit.
+
+
+ Too many failed login attempts, please try again in %minutes% minutes.
+ Terlalu banyak upaya login yang gagal, silakan coba lagi dalam beberapa %minutes% menit.