diff --git a/.gitattributes b/.gitattributes index d1570aff1cd79..cf8890eefbda8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,3 +6,4 @@ /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/sync-packages.php b/.github/sync-packages.php new file mode 100644 index 0000000000000..3d056466016e9 --- /dev/null +++ b/.github/sync-packages.php @@ -0,0 +1,75 @@ +defines($resname, $domain)) { $translation = $catalogue->get($resname, $domain); $metadata = $catalogue->getMetadata($resname, $domain); + } else { + $translation = $source; } $metadata['id'] = $enCatalogue->getMetadata($resname, $domain)['id']; if ($resname !== $source) { diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 5511e08ad6407..cd2bc859ef2a3 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -114,6 +114,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Install system dependencies run: | @@ -201,13 +203,11 @@ jobs: - name: Check for changes in translation files id: changed-translation-files run: | - if git diff --quiet HEAD~1 HEAD -- 'src/**/Resources/translations/*.xlf'; then - echo "{changed}={true}" >> $GITHUB_OUTPUT - else - echo "{changed}={false}" >> $GITHUB_OUTPUT - fi + 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 69f22dab44a9f..a70c4321e36bb 100644 --- a/.github/workflows/package-tests.yml +++ b/.github/workflows/package-tests.yml @@ -101,6 +101,7 @@ jobs: done exit $ok + - name: Verify symfony/deprecation-contracts requirements run: | set +e @@ -141,3 +142,9 @@ 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/unit-tests.yml b/.github/workflows/unit-tests.yml index 159abdf72ac02..969835cccdde1 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -34,6 +34,7 @@ jobs: mode: low-deps - php: '8.3' - php: '8.4' + extensions: amqp,apcu,igbinary,intl,mbstring,memcached,redis #mode: experimental fail-fast: false @@ -51,7 +52,7 @@ jobs: coverage: "none" ini-values: date.timezone=UTC,memory_limit=-1,default_socket_timeout=10,session.gc_probability=0,apc.enable_cli=1,zend.assertions=1 php-version: "${{ matrix.php }}" - extensions: "${{ env.extensions }}" + extensions: "${{ matrix.extensions || env.extensions }}" tools: flex - name: Configure environment diff --git a/CHANGELOG-5.4.md b/CHANGELOG-5.4.md index a4ba8eb29eeef..4675182aec6dd 100644 --- a/CHANGELOG-5.4.md +++ b/CHANGELOG-5.4.md @@ -7,6 +7,33 @@ in 5.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/v5.4.0...v5.4.1 +* 5.4.39 (2024-04-29) + + * bug #54751 [Validator]  detect wrong e-mail validation modes (xabbuh) + * bug #54723 [Form] read form values using the chain data accessor (xabbuh) + * bug #54706 [Yaml] call substr() with integer offsets (xabbuh) + * bug #54675 [PropertyInfo] Fix PHPStan properties type in trait (mtarld) + * bug #54635 [Serializer] Revert "Fix object normalizer when properties has the same name as their accessor" - it was a BC Break (NeilPeyssard) + * bug #54625 [Intl] Remove resources data from classmap generation (shyim) + * bug #54598 [TwigBridge]  implement NodeVisitorInterface instead of extending AbstractNodeVisitor (xabbuh) + * bug #54072 [HttpKernel] Fix datacollector caster for reference object property (ebuildy) + * bug #54564 [Translation] Skip state=needs-translation entries only when source == target (nicolas-grekas) + * bug #54579 [Cache] Always select database for persistent redis connections (uncaught) + * bug #54059 [Security] Validate that CSRF token in form login is string similar to username/password (glaubinix) + * bug #54547 [HttpKernel] Force non lazy controller services (smnandre) + * bug #54517 [HttpClient] Let curl handle transfer encoding (michaelhue) + * bug #52917 [Serializer] Fix unexpected allowed attributes (mtarld) + * bug #54063 [FrameworkBundle] Fix registration of the bundle path to translation (FlyingDR) + * bug #54392 [Messenger] Make Doctrine connection ignore unrelated tables on setup (MatTheCat) + * bug #54506 [HttpFoundation] Set content-type header in RedirectResponse (smnandre) + * bug #52698 [Serializer] Fix XML scalar to object denormalization (mtarld) + * bug #54485 [Serializer] Ignore when using #[Ignore] on a non-accessor (nicolas-grekas) + * bug #54242 [HttpClient] [EventSourceHttpClient] Fix consuming SSEs with \r\n separator (fancyweb) + * bug #54456 [DomCrawler] Encode html entities only if nessecary (ausi) + * bug #54471 [Filesystem] Strengthen the check of file permissions in `dumpFile` (alexandre-daubois) + * bug #54403 [FrameworkBundle] [Command] Fix #54402: Suppress PHP warning when is_readable() tries to access dirs outside of open_basedir restrictions (Jeldrik Geraedts) + * bug #54440 [Console] return null when message with name is not set (xabbuh) + * 5.4.38 (2024-04-02) * bug #54400 [HttpClient] stop all server processes after tests have run (xabbuh) 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/src/Symfony/Bridge/Doctrine/.gitattributes b/src/Symfony/Bridge/Doctrine/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Bridge/Doctrine/.gitattributes +++ b/src/Symfony/Bridge/Doctrine/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Bridge/Doctrine/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bridge/Doctrine/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Bridge/Doctrine/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Bridge/Doctrine/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/.gitattributes b/src/Symfony/Bridge/Monolog/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Bridge/Monolog/.gitattributes +++ b/src/Symfony/Bridge/Monolog/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Bridge/Monolog/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bridge/Monolog/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Bridge/Monolog/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Bridge/Monolog/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/.gitattributes b/src/Symfony/Bridge/PhpUnit/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Bridge/PhpUnit/.gitattributes +++ b/src/Symfony/Bridge/PhpUnit/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Bridge/PhpUnit/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bridge/PhpUnit/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Bridge/PhpUnit/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Bridge/PhpUnit/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/ProxyManager/.gitattributes b/src/Symfony/Bridge/ProxyManager/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Bridge/ProxyManager/.gitattributes +++ b/src/Symfony/Bridge/ProxyManager/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Bridge/ProxyManager/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bridge/ProxyManager/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Bridge/ProxyManager/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Bridge/ProxyManager/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Bridge/Twig/.gitattributes +++ b/src/Symfony/Bridge/Twig/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Bridge/Twig/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bridge/Twig/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Bridge/Twig/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Bridge/Twig/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/NodeVisitor/TranslationDefaultDomainNodeVisitor.php b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php index 213365ed9f1ef..7570126fa80eb 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationDefaultDomainNodeVisitor.php @@ -23,12 +23,12 @@ use Twig\Node\ModuleNode; use Twig\Node\Node; use Twig\Node\SetNode; -use Twig\NodeVisitor\AbstractNodeVisitor; +use Twig\NodeVisitor\NodeVisitorInterface; /** * @author Fabien Potencier */ -final class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor +final class TranslationDefaultDomainNodeVisitor implements NodeVisitorInterface { private $scope; @@ -37,10 +37,7 @@ public function __construct() $this->scope = new Scope(); } - /** - * {@inheritdoc} - */ - protected function doEnterNode(Node $node, Environment $env): Node + public function enterNode(Node $node, Environment $env): Node { if ($node instanceof BlockNode || $node instanceof ModuleNode) { $this->scope = $this->scope->enter(); @@ -86,10 +83,7 @@ protected function doEnterNode(Node $node, Environment $env): Node return $node; } - /** - * {@inheritdoc} - */ - protected function doLeaveNode(Node $node, Environment $env): ?Node + public function leaveNode(Node $node, Environment $env): ?Node { if ($node instanceof TransDefaultDomainNode) { return null; diff --git a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php index ac0ccd21cdd37..39cd4b142af10 100644 --- a/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php +++ b/src/Symfony/Bridge/Twig/NodeVisitor/TranslationNodeVisitor.php @@ -18,14 +18,14 @@ use Twig\Node\Expression\FilterExpression; use Twig\Node\Expression\FunctionExpression; use Twig\Node\Node; -use Twig\NodeVisitor\AbstractNodeVisitor; +use Twig\NodeVisitor\NodeVisitorInterface; /** * TranslationNodeVisitor extracts translation messages. * * @author Fabien Potencier */ -final class TranslationNodeVisitor extends AbstractNodeVisitor +final class TranslationNodeVisitor implements NodeVisitorInterface { public const UNDEFINED_DOMAIN = '_undefined'; @@ -49,10 +49,7 @@ public function getMessages(): array return $this->messages; } - /** - * {@inheritdoc} - */ - protected function doEnterNode(Node $node, Environment $env): Node + public function enterNode(Node $node, Environment $env): Node { if (!$this->enabled) { return $node; @@ -101,10 +98,7 @@ protected function doEnterNode(Node $node, Environment $env): Node return $node; } - /** - * {@inheritdoc} - */ - protected function doLeaveNode(Node $node, Environment $env): ?Node + public function leaveNode(Node $node, Environment $env): ?Node { return $node; } diff --git a/src/Symfony/Bundle/DebugBundle/.gitattributes b/src/Symfony/Bundle/DebugBundle/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Bundle/DebugBundle/.gitattributes +++ b/src/Symfony/Bundle/DebugBundle/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Bundle/DebugBundle/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bundle/DebugBundle/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Bundle/DebugBundle/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Bundle/DebugBundle/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Bundle/FrameworkBundle/.gitattributes +++ b/src/Symfony/Bundle/FrameworkBundle/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Bundle/FrameworkBundle/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bundle/FrameworkBundle/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Command/CacheClearCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php index b245dd7a68c1f..3a81a20eca0d0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php @@ -202,7 +202,7 @@ private function isNfs(string $dir): bool if (null === $mounts) { $mounts = []; - if ('/' === \DIRECTORY_SEPARATOR && is_readable('/proc/mounts') && $files = @file('/proc/mounts')) { + if ('/' === \DIRECTORY_SEPARATOR && @is_readable('/proc/mounts') && $files = @file('/proc/mounts')) { foreach ($files as $mount) { $mount = \array_slice(explode(' ', $mount), 1, -3); if (!\in_array(array_pop($mount), ['vboxsf', 'nfs'])) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php index 585af1eefd539..e25ee21d72a8f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php @@ -356,7 +356,7 @@ private function getCallableData($callable): array $data['type'] = 'closure'; $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { return $data; } $data['name'] = $r->name; diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php index f23be9d579952..12ab4d4f73435 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php @@ -372,7 +372,7 @@ protected function describeCallable($callable, array $options = []) $string .= "\n- Type: `closure`"; $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { return $this->write($string."\n"); } $string .= "\n".sprintf('- Name: `%s`', $r->name); diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 39dc8fb210ab7..f2e7cee78c486 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -611,7 +611,7 @@ private function formatCallable($callable): string if ($callable instanceof \Closure) { $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { return 'Closure()'; } if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php index 56b1af9bf6c64..8daf880f3043c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php @@ -543,7 +543,7 @@ private function getCallableDocument($callable): \DOMDocument $callableXML->setAttribute('type', 'closure'); $r = new \ReflectionFunction($callable); - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { return $dom; } $callableXML->setAttribute('name', $r->name); diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index aaaac8d30ab28..731c6e7ee4b3e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -1342,7 +1342,7 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder $defaultDir = $container->getParameterBag()->resolveValue($config['default_path']); foreach ($container->getParameter('kernel.bundles_metadata') as $name => $bundle) { if ($container->fileExists($dir = $bundle['path'].'/Resources/translations') || $container->fileExists($dir = $bundle['path'].'/translations')) { - $dirs[] = $dir; + $dirs[] = $transPaths[] = $dir; } else { $nonExistingDirs[] = $dir; } @@ -2080,10 +2080,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 ca0cf9b53612e..63964f34f5599 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php @@ -137,6 +137,8 @@ service('property_info')->ignoreOnInvalid(), service('serializer.mapping.class_discriminator_resolver')->ignoreOnInvalid(), null, + [], + service('property_info')->ignoreOnInvalid(), ]) ->alias(PropertyNormalizer::class, 'serializer.normalizer.property') diff --git a/src/Symfony/Bundle/SecurityBundle/.gitattributes b/src/Symfony/Bundle/SecurityBundle/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Bundle/SecurityBundle/.gitattributes +++ b/src/Symfony/Bundle/SecurityBundle/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Bundle/SecurityBundle/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bundle/SecurityBundle/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Bundle/SecurityBundle/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Bundle/SecurityBundle/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/SecurityBundle/Command/DebugFirewallCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php index 3757c5657ae4a..6fc6a0ed95f88 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/DebugFirewallCommand.php @@ -252,7 +252,7 @@ private function formatCallable($callable): string if ($callable instanceof \Closure) { $r = new \ReflectionFunction($callable); - if (false !== strpos($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { return 'Closure()'; } if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { diff --git a/src/Symfony/Bundle/TwigBundle/.gitattributes b/src/Symfony/Bundle/TwigBundle/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Bundle/TwigBundle/.gitattributes +++ b/src/Symfony/Bundle/TwigBundle/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Bundle/TwigBundle/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bundle/TwigBundle/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Bundle/TwigBundle/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Bundle/TwigBundle/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/.gitattributes +++ b/src/Symfony/Bundle/WebProfilerBundle/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Bundle/WebProfilerBundle/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Bundle/WebProfilerBundle/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Asset/.gitattributes b/src/Symfony/Component/Asset/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Asset/.gitattributes +++ b/src/Symfony/Component/Asset/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Asset/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Asset/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Asset/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Asset/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/BrowserKit/.gitattributes +++ b/src/Symfony/Component/BrowserKit/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/BrowserKit/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/BrowserKit/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/BrowserKit/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/BrowserKit/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Cache/.gitattributes +++ b/src/Symfony/Component/Cache/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Cache/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Cache/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Cache/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Cache/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Tests/Traits/RedisTraitTest.php b/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php index 623e1582eabf7..650a0c71c1c2e 100644 --- a/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php +++ b/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php @@ -32,7 +32,9 @@ public function testCreateConnection(string $dsn, string $expectedClass) throw new SkippedTestSuiteError('REDIS_CLUSTER_HOSTS env var is not defined.'); } - $mock = self::getObjectForTrait(RedisTrait::class); + $mock = new class () { + use RedisTrait; + }; $connection = $mock::createConnection($dsn); self::assertInstanceOf($expectedClass, $connection); @@ -44,7 +46,9 @@ public function testUrlDecodeParameters() self::markTestSkipped('REDIS_AUTHENTICATED_HOST env var is not defined.'); } - $mock = self::getObjectForTrait(RedisTrait::class); + $mock = new class () { + use RedisTrait; + }; $connection = $mock::createConnection('redis://:p%40ssword@'.getenv('REDIS_AUTHENTICATED_HOST')); self::assertInstanceOf(\Redis::class, $connection); @@ -74,4 +78,59 @@ public static function provideCreateConnection(): array ], ]; } + + /** + * Due to a bug in phpredis, the persistent connection will keep its last selected database. So when re-using + * a persistent connection, the database has to be re-selected, too. + * + * @see https://github.com/phpredis/phpredis/issues/1920 + * + * @group integration + */ + public function testPconnectSelectsCorrectDatabase() + { + if (!class_exists(\Redis::class)) { + throw new SkippedTestSuiteError('The "Redis" class is required.'); + } + if (!getenv('REDIS_HOST')) { + throw new SkippedTestSuiteError('REDIS_HOST env var is not defined.'); + } + if (!\ini_get('redis.pconnect.pooling_enabled')) { + throw new SkippedTestSuiteError('The bug only occurs when pooling is enabled.'); + } + + // Limit the connection pool size to 1: + if (false === $prevPoolSize = ini_set('redis.pconnect.connection_limit', 1)) { + throw new SkippedTestSuiteError('Unable to set pool size'); + } + + try { + $mock = new class () { + use RedisTrait; + }; + + $dsn = 'redis://'.getenv('REDIS_HOST'); + + $cacheKey = 'testPconnectSelectsCorrectDatabase'; + $cacheValueOnDb1 = 'I should only be on database 1'; + + // First connect to database 1 and set a value there so we can identify this database: + $db1 = $mock::createConnection($dsn, ['dbindex' => 1, 'persistent' => 1]); + self::assertInstanceOf(\Redis::class, $db1); + self::assertSame(1, $db1->getDbNum()); + $db1->set($cacheKey, $cacheValueOnDb1); + self::assertSame($cacheValueOnDb1, $db1->get($cacheKey)); + + // Unset the connection - do not use `close()` or we will lose the persistent connection: + unset($db1); + + // Now connect to database 0 and see that we do not actually ended up on database 1 by checking the value: + $db0 = $mock::createConnection($dsn, ['dbindex' => 0, 'persistent' => 1]); + self::assertInstanceOf(\Redis::class, $db0); + self::assertSame(0, $db0->getDbNum()); // Redis is lying here! We could actually be on any database! + self::assertNotSame($cacheValueOnDb1, $db0->get($cacheKey)); // This value should not exist if we are actually on db 0 + } finally { + ini_set('redis.pconnect.connection_limit', $prevPoolSize); + } + } } diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php index 8fcd7bac5a303..af6390b9bcfa5 100644 --- a/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -283,7 +283,10 @@ public static function createConnection(string $dsn, array $options = []) } if ((null !== $auth && !$redis->auth($auth)) - || ($params['dbindex'] && !$redis->select($params['dbindex'])) + // Due to a bug in phpredis we must always select the dbindex if persistent pooling is enabled + // @see https://github.com/phpredis/phpredis/issues/1920 + // @see https://github.com/symfony/symfony/issues/51578 + || (($params['dbindex'] || ('pconnect' === $connect && '0' !== \ini_get('redis.pconnect.pooling_enabled'))) && !$redis->select($params['dbindex'])) ) { $e = preg_replace('/^ERR /', '', $redis->getLastError()); throw new InvalidArgumentException('Redis connection failed: '.$e.'.'); @@ -403,9 +406,6 @@ public static function createConnection(string $dsn, array $options = []) return $redis; } - /** - * {@inheritdoc} - */ protected function doFetch(array $ids) { if (!$ids) { @@ -439,17 +439,11 @@ protected function doFetch(array $ids) return $result; } - /** - * {@inheritdoc} - */ protected function doHave(string $id) { return (bool) $this->redis->exists($id); } - /** - * {@inheritdoc} - */ protected function doClear(string $namespace) { if ($this->redis instanceof \Predis\ClientInterface) { @@ -511,9 +505,6 @@ protected function doClear(string $namespace) return $cleared; } - /** - * {@inheritdoc} - */ protected function doDelete(array $ids) { if (!$ids) { @@ -548,9 +539,6 @@ protected function doDelete(array $ids) return true; } - /** - * {@inheritdoc} - */ protected function doSave(array $values, int $lifetime) { if (!$values = $this->marshaller->marshall($values, $failed)) { diff --git a/src/Symfony/Component/Config/.gitattributes b/src/Symfony/Component/Config/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Config/.gitattributes +++ b/src/Symfony/Component/Config/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Config/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Config/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Config/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Config/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/.gitattributes b/src/Symfony/Component/Console/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Console/.gitattributes +++ b/src/Symfony/Component/Console/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Console/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Console/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Console/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Console/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Helper/ProgressBar.php b/src/Symfony/Component/Console/Helper/ProgressBar.php index 1d7b8d4562cb6..6250732eba257 100644 --- a/src/Symfony/Component/Console/Helper/ProgressBar.php +++ b/src/Symfony/Component/Console/Helper/ProgressBar.php @@ -169,9 +169,12 @@ public function setMessage(string $message, string $name = 'message') $this->messages[$name] = $message; } + /** + * @return string|null + */ public function getMessage(string $name = 'message') { - return $this->messages[$name]; + return $this->messages[$name] ?? null; } public function getStartTime(): int diff --git a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php index a0c6ee129fac2..901bca630cfd1 100644 --- a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php @@ -1173,4 +1173,11 @@ public function testMultiLineFormatIsFullyCorrectlyWithManuallyCleanup() stream_get_contents($output->getStream()) ); } + + public function testGetNotSetMessage() + { + $progressBar = new ProgressBar($this->getOutputStream()); + + $this->assertNull($progressBar->getMessage()); + } } diff --git a/src/Symfony/Component/CssSelector/.gitattributes b/src/Symfony/Component/CssSelector/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/CssSelector/.gitattributes +++ b/src/Symfony/Component/CssSelector/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/CssSelector/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/CssSelector/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/CssSelector/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/CssSelector/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/DependencyInjection/.gitattributes +++ b/src/Symfony/Component/DependencyInjection/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/DependencyInjection/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/DependencyInjection/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/DependencyInjection/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/DomCrawler/.gitattributes b/src/Symfony/Component/DomCrawler/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/DomCrawler/.gitattributes +++ b/src/Symfony/Component/DomCrawler/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/DomCrawler/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/DomCrawler/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/DomCrawler/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/DomCrawler/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index a6c214add0964..239ace66ef262 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -1151,12 +1151,30 @@ protected function sibling(\DOMNode $node, string $siblingDir = 'nextSibling') private function parseHtml5(string $htmlContent, string $charset = 'UTF-8'): \DOMDocument { - return $this->html5Parser->parse($this->convertToHtmlEntities($htmlContent, $charset)); + if (!$this->supportsEncoding($charset)) { + $htmlContent = $this->convertToHtmlEntities($htmlContent, $charset); + $charset = 'UTF-8'; + } + + return $this->html5Parser->parse($htmlContent, ['encoding' => $charset]); + } + + private function supportsEncoding(string $encoding): bool + { + try { + return '' === @mb_convert_encoding('', $encoding, 'UTF-8'); + } catch (\Throwable $e) { + return false; + } } private function parseXhtml(string $htmlContent, string $charset = 'UTF-8'): \DOMDocument { - $htmlContent = $this->convertToHtmlEntities($htmlContent, $charset); + if ('UTF-8' === $charset && preg_match('//u', $htmlContent)) { + $htmlContent = ''.$htmlContent; + } else { + $htmlContent = $this->convertToHtmlEntities($htmlContent, $charset); + } $internalErrors = libxml_use_internal_errors(true); if (\LIBXML_VERSION < 20900) { diff --git a/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php b/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php index 831c2f060b012..e60f3e4ef8b0b 100644 --- a/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php +++ b/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php @@ -194,6 +194,10 @@ public function testAddContent() $crawler = $this->createCrawler(); $crawler->addContent($this->getDoctype().'
'); $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addContent() ignores bad charset'); + + $crawler = $this->createCrawler(); + $crawler->addContent($this->getDoctype().'', 'text/html; charset=UTF-8'); + $this->assertEquals('var foo = "bär";', $crawler->filterXPath('//script')->text(), '->addContent() does not interfere with script content'); } /** diff --git a/src/Symfony/Component/Dotenv/.gitattributes b/src/Symfony/Component/Dotenv/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Dotenv/.gitattributes +++ b/src/Symfony/Component/Dotenv/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Dotenv/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Dotenv/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Dotenv/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Dotenv/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/.gitattributes b/src/Symfony/Component/ErrorHandler/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/ErrorHandler/.gitattributes +++ b/src/Symfony/Component/ErrorHandler/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/ErrorHandler/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/ErrorHandler/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/ErrorHandler/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/ErrorHandler/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Tests/ErrorHandlerTest.php b/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php index 75a91d9e221cc..2b625f6388af3 100644 --- a/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php +++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php @@ -171,7 +171,7 @@ public function testCallErrorExceptionInfo() } $this->assertSame(__FILE__, $e->getFile()); $this->assertSame(0, $e->getCode()); - $this->assertSame('Symfony\Component\ErrorHandler\{closure}', $trace[0]['function']); + $this->assertStringMatchesFormat('%A{closure%A}', $trace[0]['function']); $this->assertSame(ErrorHandler::class, $trace[0]['class']); $this->assertSame('triggerNotice', $trace[1]['function']); $this->assertSame(__CLASS__, $trace[1]['class']); diff --git a/src/Symfony/Component/EventDispatcher/.gitattributes b/src/Symfony/Component/EventDispatcher/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/EventDispatcher/.gitattributes +++ b/src/Symfony/Component/EventDispatcher/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/EventDispatcher/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/EventDispatcher/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/EventDispatcher/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/EventDispatcher/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/EventDispatcher/Debug/WrappedListener.php b/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php index 80d49a168b701..792c175613501 100644 --- a/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php +++ b/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php @@ -47,7 +47,7 @@ public function __construct($listener, ?string $name, Stopwatch $stopwatch, ?Eve $this->pretty = $this->name.'::'.$listener[1]; } elseif ($listener instanceof \Closure) { $r = new \ReflectionFunction($listener); - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { $this->pretty = $this->name = 'closure'; } elseif ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { $this->name = $class->name; diff --git a/src/Symfony/Component/ExpressionLanguage/.gitattributes b/src/Symfony/Component/ExpressionLanguage/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/ExpressionLanguage/.gitattributes +++ b/src/Symfony/Component/ExpressionLanguage/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/ExpressionLanguage/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/ExpressionLanguage/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/ExpressionLanguage/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/ExpressionLanguage/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Filesystem/.gitattributes +++ b/src/Symfony/Component/Filesystem/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Filesystem/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Filesystem/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Filesystem/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Filesystem/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 909810f98a959..c5cfa47140052 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -691,7 +691,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, file_exists($filename) ? fileperms($filename) : 0666 & ~umask()); + self::box('chmod', $tmpFile, @fileperms($filename) ?: 0666 & ~umask()); $this->rename($tmpFile, $filename, true); } finally { diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index 7280d51357bb4..101f30f898714 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -14,6 +14,8 @@ use Symfony\Component\Filesystem\Exception\InvalidArgumentException; use Symfony\Component\Filesystem\Exception\IOException; use Symfony\Component\Filesystem\Path; +use Symfony\Component\Process\PhpExecutableFinder; +use Symfony\Component\Process\Process; /** * Test class for Filesystem. @@ -162,23 +164,32 @@ public function testCopyCreatesTargetDirectoryIfItDoesNotExist() $this->assertStringEqualsFile($targetFilePath, 'SOURCE FILE'); } - /** - * @group network - */ public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy() { - if (!\in_array('https', stream_get_wrappers())) { - $this->markTestSkipped('"https" stream wrapper is not enabled.'); + if (!\in_array('http', stream_get_wrappers())) { + $this->markTestSkipped('"http" stream wrapper is not enabled.'); } - $sourceFilePath = 'https://symfony.com/images/common/logo/logo_symfony_header.png'; - $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file'; - file_put_contents($targetFilePath, 'TARGET FILE'); + $finder = new PhpExecutableFinder(); + $process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', 'localhost:8057'])); + $process->setWorkingDirectory(__DIR__.'/Fixtures/web'); - $this->filesystem->copy($sourceFilePath, $targetFilePath, false); + $process->start(); - $this->assertFileExists($targetFilePath); - $this->assertEquals(file_get_contents($sourceFilePath), file_get_contents($targetFilePath)); + do { + usleep(50000); + } while (!@fopen('http://localhost:8057', 'r')); + + try { + $sourceFilePath = 'http://localhost:8057/logo_symfony_header.png'; + $targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file'; + file_put_contents($targetFilePath, 'TARGET FILE'); + $this->filesystem->copy($sourceFilePath, $targetFilePath, false); + $this->assertFileExists($targetFilePath); + $this->assertEquals(file_get_contents($sourceFilePath), file_get_contents($targetFilePath)); + } finally { + $process->stop(); + } } public function testMkdirCreatesDirectoriesRecursively() diff --git a/src/Symfony/Component/Filesystem/Tests/Fixtures/web/index.php b/src/Symfony/Component/Filesystem/Tests/Fixtures/web/index.php new file mode 100644 index 0000000000000..b3d9bbc7f3711 --- /dev/null +++ b/src/Symfony/Component/Filesystem/Tests/Fixtures/web/index.php @@ -0,0 +1 @@ +=7.2.5", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-php80": "^1.16", + "symfony/process": "^5.4|^6.4" }, "autoload": { "psr-4": { "Symfony\\Component\\Filesystem\\": "" }, diff --git a/src/Symfony/Component/Finder/.gitattributes b/src/Symfony/Component/Finder/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Finder/.gitattributes +++ b/src/Symfony/Component/Finder/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Finder/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Finder/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Finder/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Finder/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Form/.gitattributes +++ b/src/Symfony/Component/Form/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Form/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Form/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Form/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Form/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Extension/Core/DataAccessor/PropertyPathAccessor.php b/src/Symfony/Component/Form/Extension/Core/DataAccessor/PropertyPathAccessor.php index e639bad2a49c2..24de33a6b902e 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataAccessor/PropertyPathAccessor.php +++ b/src/Symfony/Component/Form/Extension/Core/DataAccessor/PropertyPathAccessor.php @@ -12,7 +12,9 @@ namespace Symfony\Component\Form\Extension\Core\DataAccessor; use Symfony\Component\Form\DataAccessorInterface; +use Symfony\Component\Form\DataMapperInterface; use Symfony\Component\Form\Exception\AccessException; +use Symfony\Component\Form\Extension\Core\DataMapper\DataMapper; use Symfony\Component\Form\FormInterface; use Symfony\Component\PropertyAccess\Exception\AccessException as PropertyAccessException; use Symfony\Component\PropertyAccess\Exception\NoSuchIndexException; @@ -57,15 +59,25 @@ public function setValue(&$data, $propertyValue, FormInterface $form): void throw new AccessException('Unable to write the given value as no property path is defined.'); } + $getValue = function () use ($data, $form, $propertyPath) { + $dataMapper = $this->getDataMapper($form); + + if ($dataMapper instanceof DataMapper && null !== $dataAccessor = $dataMapper->getDataAccessor()) { + return $dataAccessor->getValue($data, $form); + } + + return $this->getPropertyValue($data, $propertyPath); + }; + // If the field is of type DateTimeInterface and the data is the same skip the update to // keep the original object hash - if ($propertyValue instanceof \DateTimeInterface && $propertyValue == $this->getPropertyValue($data, $propertyPath)) { + if ($propertyValue instanceof \DateTimeInterface && $propertyValue == $getValue()) { return; } // If the data is identical to the value in $data, we are // dealing with a reference - if (!\is_object($data) || !$form->getConfig()->getByReference() || $propertyValue !== $this->getPropertyValue($data, $propertyPath)) { + if (!\is_object($data) || !$form->getConfig()->getByReference() || $propertyValue !== $getValue()) { $this->propertyAccessor->setValue($data, $propertyPath, $propertyValue); } } @@ -105,4 +117,13 @@ private function getPropertyValue($data, PropertyPathInterface $propertyPath) return null; } } + + private function getDataMapper(FormInterface $form): ?DataMapperInterface + { + do { + $dataMapper = $form->getConfig()->getDataMapper(); + } while (null === $dataMapper && null !== $form = $form->getParent()); + + return $dataMapper; + } } diff --git a/src/Symfony/Component/Form/Extension/Core/DataMapper/DataMapper.php b/src/Symfony/Component/Form/Extension/Core/DataMapper/DataMapper.php index 7995842eecbbf..e480f47baa632 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataMapper/DataMapper.php +++ b/src/Symfony/Component/Form/Extension/Core/DataMapper/DataMapper.php @@ -88,4 +88,12 @@ public function mapFormsToData(iterable $forms, &$data): void } } } + + /** + * @internal + */ + public function getDataAccessor(): DataAccessorInterface + { + return $this->dataAccessor; + } } diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php index c119d665b85f1..c4a271cd03fb2 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php @@ -17,6 +17,8 @@ use Symfony\Component\Form\Extension\Core\DataAccessor\PropertyPathAccessor; use Symfony\Component\Form\Extension\Core\DataMapper\DataMapper; use Symfony\Component\Form\Extension\Core\Type\DateType; +use Symfony\Component\Form\Extension\Core\Type\FormType; +use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Form; use Symfony\Component\Form\FormConfigBuilder; use Symfony\Component\Form\FormFactoryBuilder; @@ -419,6 +421,25 @@ public function testMapFormsToDataMapsDateTimeInstanceToArrayIfNotSetBefore() $this->assertEquals(['date' => new \DateTime('2022-08-04', new \DateTimeZone('UTC'))], $form->getData()); } + + public function testMapFormToDataWithOnlyGetterConfigured() + { + $person = new DummyPerson('foo'); + $form = (new FormFactoryBuilder()) + ->getFormFactory() + ->createBuilder(FormType::class, $person) + ->add('name', TextType::class, [ + 'getter' => function (DummyPerson $person) { + return $person->myName(); + }, + ]) + ->getForm(); + $form->submit([ + 'name' => 'bar', + ]); + + $this->assertSame('bar', $person->myName()); + } } class SubmittedForm extends Form @@ -455,4 +476,9 @@ public function rename($name): void { $this->name = $name; } + + public function setName($name): void + { + $this->name = $name; + } } diff --git a/src/Symfony/Component/HttpClient/.gitattributes b/src/Symfony/Component/HttpClient/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/HttpClient/.gitattributes +++ b/src/Symfony/Component/HttpClient/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/HttpClient/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/HttpClient/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/HttpClient/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/HttpClient/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/CurlHttpClient.php b/src/Symfony/Component/HttpClient/CurlHttpClient.php index 3a2fba025aeff..4c5ced322d5de 100644 --- a/src/Symfony/Component/HttpClient/CurlHttpClient.php +++ b/src/Symfony/Component/HttpClient/CurlHttpClient.php @@ -246,9 +246,8 @@ public function request(string $method, string $url, array $options = []): Respo if (isset($options['normalized_headers']['content-length'][0])) { $curlopts[\CURLOPT_INFILESIZE] = (int) substr($options['normalized_headers']['content-length'][0], \strlen('Content-Length: ')); - } - if (!isset($options['normalized_headers']['transfer-encoding'])) { - $curlopts[\CURLOPT_HTTPHEADER][] = 'Transfer-Encoding:'.(isset($curlopts[\CURLOPT_INFILESIZE]) ? '' : ' chunked'); + } elseif (!isset($options['normalized_headers']['transfer-encoding'])) { + $curlopts[\CURLOPT_INFILESIZE] = -1; } if ('POST' !== $method) { diff --git a/src/Symfony/Component/HttpClient/EventSourceHttpClient.php b/src/Symfony/Component/HttpClient/EventSourceHttpClient.php index e801c1c4f39c7..89d12e87764fa 100644 --- a/src/Symfony/Component/HttpClient/EventSourceHttpClient.php +++ b/src/Symfony/Component/HttpClient/EventSourceHttpClient.php @@ -121,7 +121,7 @@ public function request(string $method, string $url, array $options = []): Respo return; } - $rx = '/((?:\r\n|[\r\n]){2,})/'; + $rx = '/((?:\r\n){2,}|\r{2,}|\n{2,})/'; $content = $state->buffer.$chunk->getContent(); if ($chunk->isLast()) { diff --git a/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php index 72eb74fb9f289..fff3a0e7c18b7 100644 --- a/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php @@ -27,9 +27,14 @@ */ class EventSourceHttpClientTest extends TestCase { - public function testGetServerSentEvents() + /** + * @testWith ["\n"] + * ["\r"] + * ["\r\n"] + */ + public function testGetServerSentEvents(string $sep) { - $data = << false, 'http_method' => 'GET', 'url' => 'http://localhost:8080/events', 'response_headers' => ['content-type: text/event-stream']]); @@ -83,11 +89,11 @@ public function testGetServerSentEvents() $expected = [ new FirstChunk(), - new ServerSentEvent("event: builderror\nid: 46\ndata: {\"foo\": \"bar\"}\n\n"), - new ServerSentEvent("event: reload\nid: 47\ndata: {}\n\n"), - new ServerSentEvent("event: reload\nid: 48\ndata: {}\n\n"), - new ServerSentEvent("data: test\ndata:test\nid: 49\nevent: testEvent\n\n\n"), - new ServerSentEvent("id: 50\ndata: \ndata\ndata: \ndata\ndata: \n\n"), + new ServerSentEvent(str_replace("\n", $sep, "event: builderror\nid: 46\ndata: {\"foo\": \"bar\"}\n\n")), + new ServerSentEvent(str_replace("\n", $sep, "event: reload\nid: 47\ndata: {}\n\n")), + new ServerSentEvent(str_replace("\n", $sep, "event: reload\nid: 48\ndata: {}\n\n")), + new ServerSentEvent(str_replace("\n", $sep, "data: test\ndata:test\nid: 49\nevent: testEvent\n\n\n")), + new ServerSentEvent(str_replace("\n", $sep, "id: 50\ndata: \ndata\ndata: \ndata\ndata: \n\n")), ]; $i = 0; diff --git a/src/Symfony/Component/HttpFoundation/.gitattributes b/src/Symfony/Component/HttpFoundation/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/HttpFoundation/.gitattributes +++ b/src/Symfony/Component/HttpFoundation/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/HttpFoundation/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/HttpFoundation/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/HttpFoundation/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/HttpFoundation/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/RedirectResponse.php b/src/Symfony/Component/HttpFoundation/RedirectResponse.php index 2103280c60184..7b89f0faf610e 100644 --- a/src/Symfony/Component/HttpFoundation/RedirectResponse.php +++ b/src/Symfony/Component/HttpFoundation/RedirectResponse.php @@ -103,6 +103,7 @@ public function setTargetUrl(string $url) ', htmlspecialchars($url, \ENT_QUOTES, 'UTF-8'))); $this->headers->set('Location', $url); + $this->headers->set('Content-Type', 'text/html; charset=utf-8'); return $this; } diff --git a/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php index 3d2f05ffcd6a2..483bad20c7674 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php @@ -44,6 +44,13 @@ public function testGenerateLocationHeader() $this->assertEquals('foo.bar', $response->headers->get('Location')); } + public function testGenerateContentTypeHeader() + { + $response = new RedirectResponse('foo.bar'); + + $this->assertSame('text/html; charset=utf-8', $response->headers->get('Content-Type')); + } + public function testGetTargetUrl() { $response = new RedirectResponse('foo.bar'); diff --git a/src/Symfony/Component/HttpKernel/.gitattributes b/src/Symfony/Component/HttpKernel/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/HttpKernel/.gitattributes +++ b/src/Symfony/Component/HttpKernel/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/HttpKernel/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/HttpKernel/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/HttpKernel/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/HttpKernel/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/ControllerMetadata/ArgumentMetadataFactory.php b/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php index 85bb805f34bb6..00e673349e67c 100644 --- a/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php +++ b/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php @@ -33,7 +33,7 @@ public function createArgumentMetadata($controller): array $class = $reflection->class; } else { $reflection = new \ReflectionFunction($controller); - if ($class = str_contains($reflection->name, '{closure}') ? null : (\PHP_VERSION_ID >= 80111 ? $reflection->getClosureCalledClass() : $reflection->getClosureScopeClass())) { + if ($class = str_contains($reflection->name, '{closure') ? null : (\PHP_VERSION_ID >= 80111 ? $reflection->getClosureCalledClass() : $reflection->getClosureScopeClass())) { $class = $class->name; } } diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php index ccaf66da0438f..14a6f26fdedf7 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php @@ -70,9 +70,21 @@ protected function getCasters() $casters = [ '*' => function ($v, array $a, Stub $s, $isNested) { if (!$v instanceof Stub) { + $b = $a; foreach ($a as $k => $v) { - if (\is_object($v) && !$v instanceof \DateTimeInterface && !$v instanceof Stub) { - $a[$k] = new CutStub($v); + if (!\is_object($v) || $v instanceof \DateTimeInterface || $v instanceof Stub) { + continue; + } + + try { + $a[$k] = $s = new CutStub($v); + + if ($b[$k] === $s) { + // we've hit a non-typed reference + $a[$k] = $v; + } + } catch (\TypeError $e) { + // we've hit a typed reference } } } diff --git a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php index c56013c2eaad8..6931336f06d17 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php @@ -474,7 +474,7 @@ private function parseController($controller) 'line' => $r->getStartLine(), ]; - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { return $controller; } $controller['method'] = $r->name; diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php index 3dbaff564194b..0bdba44b0e299 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php @@ -70,6 +70,7 @@ public function process(ContainerBuilder $container) foreach ($container->findTaggedServiceIds($this->controllerTag, true) as $id => $tags) { $def = $container->getDefinition($id); $def->setPublic(true); + $def->setLazy(false); $class = $def->getClass(); $autowire = $def->isAutowired(); $bindings = $def->getBindings(); diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index e9507631059c1..d4fe96b6b7b56 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -78,11 +78,11 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static $freshCache = []; - public const VERSION = '5.4.38'; - public const VERSION_ID = 50438; + public const VERSION = '5.4.39'; + public const VERSION_ID = 50439; public const MAJOR_VERSION = 5; public const MINOR_VERSION = 4; - public const RELEASE_VERSION = 38; + public const RELEASE_VERSION = 39; public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '11/2024'; diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php index ae79a3c93c504..043affeda4d7b 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/DataCollectorTest.php @@ -15,6 +15,8 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Tests\Fixtures\DataCollector\CloneVarDataCollector; +use Symfony\Component\HttpKernel\Tests\Fixtures\UsePropertyInDestruct; +use Symfony\Component\HttpKernel\Tests\Fixtures\WithPublicObjectProperty; use Symfony\Component\VarDumper\Cloner\VarCloner; class DataCollectorTest extends TestCase @@ -35,4 +37,68 @@ public function testCloneVarExistingFilePath() $this->assertSame($filePath, $c->getData()[0]); } + + /** + * @requires PHP 8 + */ + public function testClassPublicObjectProperty() + { + $parent = new WithPublicObjectProperty(); + $child = new WithPublicObjectProperty(); + + $child->parent = $parent; + + $c = new CloneVarDataCollector($child); + $c->collect(new Request(), new Response()); + + $this->assertNotNull($c->getData()->parent); + } + + /** + * @requires PHP 8 + */ + public function testClassPublicObjectPropertyAsReference() + { + $parent = new WithPublicObjectProperty(); + $child = new WithPublicObjectProperty(); + + $child->parent = &$parent; + + $c = new CloneVarDataCollector($child); + $c->collect(new Request(), new Response()); + + $this->assertNotNull($c->getData()->parent); + } + + /** + * @requires PHP 8 + */ + public function testClassUsePropertyInDestruct() + { + $parent = new UsePropertyInDestruct(); + $child = new UsePropertyInDestruct(); + + $child->parent = $parent; + + $c = new CloneVarDataCollector($child); + $c->collect(new Request(), new Response()); + + $this->assertNotNull($c->getData()->parent); + } + + /** + * @requires PHP 8 + */ + public function testClassUsePropertyAsReferenceInDestruct() + { + $parent = new UsePropertyInDestruct(); + $child = new UsePropertyInDestruct(); + + $child->parent = &$parent; + + $c = new CloneVarDataCollector($child); + $c->collect(new Request(), new Response()); + + $this->assertNotNull($c->getData()->parent); + } } diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php index becb9b01bfd0a..e08758cf730e0 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php @@ -118,7 +118,7 @@ public static function provideControllerCallables(): array 'Closure', function () { return 'foo'; }, [ - 'class' => __NAMESPACE__.'\{closure}', + 'class' => \PHP_VERSION_ID >= 80400 ? sprintf('{closure:%s():%d}', __METHOD__, __LINE__ - 2) : __NAMESPACE__.'\{closure}', 'method' => null, 'file' => __FILE__, 'line' => __LINE__ - 5, diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php index 3dec2e912af71..40e6ea0748fc3 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php @@ -25,6 +25,7 @@ use Symfony\Component\DependencyInjection\TypedReference; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\DependencyInjection\RegisterControllerArgumentLocatorsPass; +use Symfony\Component\HttpKernel\Tests\Fixtures\DataCollector\DummyController; use Symfony\Component\HttpKernel\Tests\Fixtures\Suit; class RegisterControllerArgumentLocatorsPassTest extends TestCase @@ -285,6 +286,21 @@ public function testControllersAreMadePublic() $this->assertTrue($container->getDefinition('foo')->isPublic()); } + public function testControllersAreMadeNonLazy() + { + $container = new ContainerBuilder(); + $container->register('argument_resolver.service')->addArgument([]); + + $container->register('foo', DummyController::class) + ->addTag('controller.service_arguments') + ->setLazy(true); + + $pass = new RegisterControllerArgumentLocatorsPass(); + $pass->process($container); + + $this->assertFalse($container->getDefinition('foo')->isLazy()); + } + /** * @dataProvider provideBindings */ diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/UsePropertyInDestruct.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/UsePropertyInDestruct.php new file mode 100644 index 0000000000000..74225d355aadf --- /dev/null +++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/UsePropertyInDestruct.php @@ -0,0 +1,16 @@ +parent !== null) { + $this->parent->name = ''; + } + } +} diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/WithPublicObjectProperty.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/WithPublicObjectProperty.php new file mode 100644 index 0000000000000..92ebdb04dd429 --- /dev/null +++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/WithPublicObjectProperty.php @@ -0,0 +1,8 @@ +driverConnection->executeStatement('CREATE TABLE unrelated (unknown_type_column)'); $this->assertFalse($this->createSchemaManager()->tablesExist(['messenger_messages'])); $this->assertNull($this->connection->get()); diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php index 79b302760ad22..100058d240fcd 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php @@ -289,7 +289,7 @@ public function setup(): void { $configuration = $this->driverConnection->getConfiguration(); $assetFilter = $configuration->getSchemaAssetsFilter(); - $configuration->setSchemaAssetsFilter(static function () { return true; }); + $configuration->setSchemaAssetsFilter(function (string $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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/.gitattributes +++ b/src/Symfony/Component/Messenger/Bridge/Redis/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Messenger/Bridge/Redis/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Messenger/Bridge/Redis/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 71ccea4c1752e..2e5c7bf0b043e 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php @@ -154,7 +154,7 @@ public function testKeepGettingPendingMessages() $redis = $this->createMock(\Redis::class); $redis->expects($this->exactly(3))->method('xreadgroup') - ->with('symfony', 'consumer', ['queue' => 0], 1, null) + ->with('symfony', 'consumer', ['queue' => 0], 1, 1) ->willReturn(['queue' => [['message' => json_encode(['body' => 'Test', 'headers' => []])]]]); $connection = Connection::fromDsn('redis://localhost/queue', ['delete_after_ack' => true], $redis); @@ -250,7 +250,7 @@ public function testGetPendingMessageFirst() $redis = $this->createMock(\Redis::class); $redis->expects($this->exactly(1))->method('xreadgroup') - ->with('symfony', 'consumer', ['queue' => '0'], 1, null) + ->with('symfony', 'consumer', ['queue' => '0'], 1, 1) ->willReturn(['queue' => [['message' => '{"body":"1","headers":[]}']]]); $connection = Connection::fromDsn('redis://localhost/queue', ['delete_after_ack' => true], $redis); @@ -275,11 +275,11 @@ public function testClaimAbandonedMessageWithRaceCondition() ->willReturnCallback(function (...$args) { static $series = [ // first call for pending messages - [['symfony', 'consumer', ['queue' => '0'], 1, null], []], + [['symfony', 'consumer', ['queue' => '0'], 1, 1], []], // second call because of claimed message (redisid-123) - [['symfony', 'consumer', ['queue' => '0'], 1, null], []], + [['symfony', 'consumer', ['queue' => '0'], 1, 1], []], // third call because of no result (other consumer claimed message redisid-123) - [['symfony', 'consumer', ['queue' => '>'], 1, null], []], + [['symfony', 'consumer', ['queue' => '>'], 1, 1], []], ]; [$expectedArgs, $return] = array_shift($series); @@ -311,9 +311,9 @@ public function testClaimAbandonedMessage() ->willReturnCallback(function (...$args) { static $series = [ // first call for pending messages - [['symfony', 'consumer', ['queue' => '0'], 1, null], []], + [['symfony', 'consumer', ['queue' => '0'], 1, 1], []], // second call because of claimed message (redisid-123) - [['symfony', 'consumer', ['queue' => '0'], 1, null], ['queue' => [['message' => '{"body":"1","headers":[]}']]]], + [['symfony', 'consumer', ['queue' => '0'], 1, 1], ['queue' => [['message' => '{"body":"1","headers":[]}']]]], ]; [$expectedArgs, $return] = array_shift($series); diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php index 16633a354fcfe..a5e1c21707a78 100644 --- a/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php @@ -304,7 +304,7 @@ private function claimOldPendingMessages() try { // This could soon be optimized with https://github.com/antirez/redis/issues/5212 or // https://github.com/antirez/redis/issues/6256 - $pendingMessages = $this->connection->xpending($this->stream, $this->group, '-', '+', 1); + $pendingMessages = $this->connection->xpending($this->stream, $this->group, '-', '+', 1) ?: []; } catch (\RedisException $e) { throw new TransportException($e->getMessage(), 0, $e); } @@ -389,6 +389,7 @@ public function get(): ?array $this->group, $this->consumer, [$this->stream => $messageId], + 1, 1 ); } catch (\RedisException $e) { diff --git a/src/Symfony/Component/Messenger/Handler/HandlerDescriptor.php b/src/Symfony/Component/Messenger/Handler/HandlerDescriptor.php index 5957e3f13823b..20d2c2043a7e7 100644 --- a/src/Symfony/Component/Messenger/Handler/HandlerDescriptor.php +++ b/src/Symfony/Component/Messenger/Handler/HandlerDescriptor.php @@ -34,7 +34,7 @@ public function __construct(callable $handler, array $options = []) $r = new \ReflectionFunction($handler); - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { $this->name = 'Closure'; } elseif (!$handler = $r->getClosureThis()) { $class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass(); diff --git a/src/Symfony/Component/Mime/.gitattributes b/src/Symfony/Component/Mime/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Mime/.gitattributes +++ b/src/Symfony/Component/Mime/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Mime/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Mime/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Mime/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Mime/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Tests/Part/DataPartTest.php b/src/Symfony/Component/Mime/Tests/Part/DataPartTest.php index d0a692761fdf7..3d306f2e8ff86 100644 --- a/src/Symfony/Component/Mime/Tests/Part/DataPartTest.php +++ b/src/Symfony/Component/Mime/Tests/Part/DataPartTest.php @@ -138,32 +138,35 @@ public function testFromPathWithNotAFile() public function testFromPathWithUrl() { - if (!\in_array('https', stream_get_wrappers())) { - $this->markTestSkipped('"https" stream wrapper is not enabled.'); + if (!\in_array('http', stream_get_wrappers())) { + $this->markTestSkipped('"http" stream wrapper is not enabled.'); } $finder = new PhpExecutableFinder(); - $process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', '127.0.0.1:8057'])); + $process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', 'localhost:8057'])); $process->setWorkingDirectory(__DIR__.'/../Fixtures/web'); $process->start(); - do { - usleep(50000); - } while (!@fopen('http://127.0.0.1:8057', 'r')); - - $p = DataPart::fromPath($file = 'http://localhost:8057/logo_symfony_header.png'); - $content = file_get_contents($file); - $this->assertEquals($content, $p->getBody()); - $maxLineLength = 76; - $this->assertEquals(substr(base64_encode($content), 0, $maxLineLength), substr($p->bodyToString(), 0, $maxLineLength)); - $this->assertEquals(substr(base64_encode($content), 0, $maxLineLength), substr(implode('', iterator_to_array($p->bodyToIterable())), 0, $maxLineLength)); - $this->assertEquals('image', $p->getMediaType()); - $this->assertEquals('png', $p->getMediaSubType()); - $this->assertEquals(new Headers( - new ParameterizedHeader('Content-Type', 'image/png', ['name' => 'logo_symfony_header.png']), - new UnstructuredHeader('Content-Transfer-Encoding', 'base64'), - new ParameterizedHeader('Content-Disposition', 'attachment', ['name' => 'logo_symfony_header.png', 'filename' => 'logo_symfony_header.png']) - ), $p->getPreparedHeaders()); + try { + do { + usleep(50000); + } while (!@fopen('http://localhost:8057', 'r')); + $p = DataPart::fromPath($file = 'http://localhost:8057/logo_symfony_header.png'); + $content = file_get_contents($file); + $this->assertEquals($content, $p->getBody()); + $maxLineLength = 76; + $this->assertEquals(substr(base64_encode($content), 0, $maxLineLength), substr($p->bodyToString(), 0, $maxLineLength)); + $this->assertEquals(substr(base64_encode($content), 0, $maxLineLength), substr(implode('', iterator_to_array($p->bodyToIterable())), 0, $maxLineLength)); + $this->assertEquals('image', $p->getMediaType()); + $this->assertEquals('png', $p->getMediaSubType()); + $this->assertEquals(new Headers( + new ParameterizedHeader('Content-Type', 'image/png', ['name' => 'logo_symfony_header.png']), + new UnstructuredHeader('Content-Transfer-Encoding', 'base64'), + new ParameterizedHeader('Content-Disposition', 'attachment', ['name' => 'logo_symfony_header.png', 'filename' => 'logo_symfony_header.png']) + ), $p->getPreparedHeaders()); + } finally { + $process->stop(); + } } public function testHasContentId() diff --git a/src/Symfony/Component/Notifier/.gitattributes b/src/Symfony/Component/Notifier/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/.gitattributes +++ b/src/Symfony/Component/Notifier/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Notifier/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/AllMySms/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/AllMySms/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/AllMySms/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/AllMySms/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/AmazonSns/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/AmazonSns/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/AmazonSns/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/AmazonSns/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Clickatell/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Clickatell/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Clickatell/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Clickatell/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Discord/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Discord/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Discord/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Discord/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Esendex/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Esendex/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Esendex/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Esendex/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Expo/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Expo/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Expo/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Expo/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/FakeChat/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/FakeChat/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/FakeChat/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/FakeChat/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/FakeSms/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/FakeSms/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/FakeSms/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/FakeSms/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Firebase/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Firebase/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Firebase/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Firebase/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/FreeMobile/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/FreeMobile/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/FreeMobile/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/FreeMobile/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/GatewayApi/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/GatewayApi/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/GatewayApi/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/GatewayApi/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Gitter/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Gitter/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Gitter/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Gitter/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/GoogleChat/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/GoogleChat/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/GoogleChat/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/GoogleChat/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Infobip/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Infobip/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Infobip/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Infobip/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Iqsms/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Iqsms/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Iqsms/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Iqsms/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/LightSms/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/LightSms/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/LightSms/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/LightSms/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/LinkedIn/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/LinkedIn/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/LinkedIn/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/LinkedIn/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mailjet/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Mailjet/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Mailjet/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Mailjet/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mattermost/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Mattermost/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Mattermost/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Mattermost/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mercure/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Mercure/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Mercure/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Mercure/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/MessageBird/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/MessageBird/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/MessageBird/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/MessageBird/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/MessageMedia/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/MessageMedia/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/MessageMedia/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/MessageMedia/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mobyt/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Mobyt/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Mobyt/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Mobyt/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Nexmo/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Nexmo/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Nexmo/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Nexmo/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Notifier/Bridge/Nexmo/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Notifier/Bridge/Nexmo/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Nexmo/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Nexmo/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Notifier/Bridge/Nexmo/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Nexmo/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Octopush/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Octopush/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Octopush/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Octopush/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/OneSignal/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/OneSignal/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/OneSignal/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/OneSignal/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/OvhCloud/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/OvhCloud/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/OvhCloud/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/OvhCloud/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/RocketChat/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/RocketChat/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/RocketChat/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/RocketChat/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Sendinblue/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Sendinblue/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Sendinblue/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Sendinblue/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Sinch/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Sinch/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Sinch/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Sinch/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Slack/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Slack/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Slack/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Slack/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Sms77/.gitattributes b/src/Symfony/Component/Notifier/Bridge/Sms77/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Sms77/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Sms77/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Sms77/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Sms77/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/SmsBiuras/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Smsapi/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Smsapi/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Smsapi/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Smsapi/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Smsc/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Smsc/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Smsc/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Smsc/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/SpotHit/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/SpotHit/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/SpotHit/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/SpotHit/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Telegram/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Telegram/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Telegram/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Telegram/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Telnyx/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Telnyx/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Telnyx/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Telnyx/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/TurboSms/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/TurboSms/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/TurboSms/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/TurboSms/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Twilio/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Twilio/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Twilio/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Twilio/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Vonage/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Vonage/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Vonage/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Vonage/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Yunpian/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Yunpian/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Yunpian/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Yunpian/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Notifier/Bridge/Zulip/.gitattributes +++ b/src/Symfony/Component/Notifier/Bridge/Zulip/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* 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 new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Zulip/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Notifier/Bridge/Zulip/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/OptionsResolver/.gitattributes b/src/Symfony/Component/OptionsResolver/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/OptionsResolver/.gitattributes +++ b/src/Symfony/Component/OptionsResolver/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/OptionsResolver/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/OptionsResolver/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/OptionsResolver/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/OptionsResolver/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/PasswordHasher/.gitattributes +++ b/src/Symfony/Component/PasswordHasher/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/PasswordHasher/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/PasswordHasher/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/PasswordHasher/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/PasswordHasher/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 5dc301916eed3..4cf708b806296 100644 --- a/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php +++ b/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php @@ -103,7 +103,11 @@ public function testBcryptWithNulByte() $hasher = new NativePasswordHasher(null, null, 4, \PASSWORD_BCRYPT); $plainPassword = "a\0b"; - $this->assertFalse($hasher->verify(password_hash($plainPassword, \PASSWORD_BCRYPT, ['cost' => 4]), $plainPassword)); + 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)); + } + $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 3dc97c768f6f1..101c09fc46ed3 100644 --- a/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php +++ b/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php @@ -78,7 +78,11 @@ public function testBcryptWithNulByte() $hasher = new SodiumPasswordHasher(null, null); $plainPassword = "a\0b"; - $this->assertFalse($hasher->verify(password_hash($plainPassword, \PASSWORD_BCRYPT, ['cost' => 4]), $plainPassword)); + 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)); + } + $this->assertTrue($hasher->verify((new NativePasswordHasher(null, null, 4, \PASSWORD_BCRYPT))->hash($plainPassword), $plainPassword)); } diff --git a/src/Symfony/Component/Process/.gitattributes b/src/Symfony/Component/Process/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Process/.gitattributes +++ b/src/Symfony/Component/Process/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Process/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Process/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Process/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Process/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/PropertyAccess/.gitattributes b/src/Symfony/Component/PropertyAccess/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/PropertyAccess/.gitattributes +++ b/src/Symfony/Component/PropertyAccess/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/PropertyAccess/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/PropertyAccess/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/PropertyAccess/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/PropertyAccess/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/PropertyInfo/.gitattributes +++ b/src/Symfony/Component/PropertyInfo/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/PropertyInfo/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/PropertyInfo/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/PropertyInfo/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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 new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/PropertyInfo/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Extractor/PhpStanExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/PhpStanExtractor.php index 2f169690bff12..0596eb24fc20e 100644 --- a/src/Symfony/Component/PropertyInfo/Extractor/PhpStanExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Extractor/PhpStanExtractor.php @@ -233,6 +233,14 @@ private function getDocBlockFromProperty(string $class, string $property): ?arra return null; } + $reflector = $reflectionProperty->getDeclaringClass(); + + foreach ($reflector->getTraits() as $trait) { + if ($trait->hasProperty($property)) { + return $this->getDocBlockFromProperty($trait->getName(), $property); + } + } + if (null === $rawDocNode = $reflectionProperty->getDocComment() ?: null) { return null; } diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php index d8fa9b9192c51..fd11fcbeb8c63 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php @@ -19,6 +19,7 @@ use Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy; use Symfony\Component\PropertyInfo\Tests\Fixtures\ParentDummy; use Symfony\Component\PropertyInfo\Tests\Fixtures\RootDummy\RootDummyItem; +use Symfony\Component\PropertyInfo\Tests\Fixtures\TraitUsage\AnotherNamespace\DummyInAnotherNamespace; use Symfony\Component\PropertyInfo\Tests\Fixtures\TraitUsage\DummyUsedInTrait; use Symfony\Component\PropertyInfo\Tests\Fixtures\TraitUsage\DummyUsingTrait; use Symfony\Component\PropertyInfo\Type; @@ -311,6 +312,7 @@ public static function propertiesDefinedByTraitsProvider(): array ['propertyInTraitPrimitiveType', new Type(Type::BUILTIN_TYPE_STRING)], ['propertyInTraitObjectSameNamespace', new Type(Type::BUILTIN_TYPE_OBJECT, false, DummyUsedInTrait::class)], ['propertyInTraitObjectDifferentNamespace', new Type(Type::BUILTIN_TYPE_OBJECT, false, Dummy::class)], + ['dummyInAnotherNamespace', new Type(Type::BUILTIN_TYPE_OBJECT, false, DummyInAnotherNamespace::class)], ]; } diff --git a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/TraitUsage/AnotherNamespace/DummyInAnotherNamespace.php b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/TraitUsage/AnotherNamespace/DummyInAnotherNamespace.php new file mode 100644 index 0000000000000..5ae6b60b59731 --- /dev/null +++ b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/TraitUsage/AnotherNamespace/DummyInAnotherNamespace.php @@ -0,0 +1,7 @@ + Authentication credentials could not be found. - Loginoplysninger kan ikke findes. + Loginoplysninger kunne ikke findes. Authentication request could not be processed due to a system problem. - Godkendelsesanmodning kan ikke behandles på grund af et systemfejl. + Godkendelsesanmodningen kunne ikke behandles på grund af en systemfejl. Invalid credentials. @@ -20,7 +20,7 @@ Cookie has already been used by someone else. - Cookie er allerede brugt af en anden. + Cookie er allerede blevet brugt af en anden. Not privileged to request the resource. @@ -32,19 +32,19 @@ No authentication provider found to support the authentication token. - Ingen godkendelsesudbyder er fundet til understøttelsen af godkendelsestoken. + Ingen godkendelsesudbyder blev fundet til at understøtte godkendelsestoken. No session available, it either timed out or cookies are not enabled. - Ingen session tilgængelig, sessionen er enten udløbet eller cookies er ikke aktiveret. + Ingen session er tilgængelig. Den er enten udløbet eller cookies er ikke aktiveret. No token could be found. - Ingen token kan findes. + Ingen token kunne findes. Username could not be found. - Brugernavn kan ikke findes. + Brugernavn kunne ikke findes. Account has expired. @@ -64,15 +64,15 @@ Too many failed login attempts, please try again later. - For mange fejlede login forsøg, prøv venligst senere. + For mange mislykkede loginforsøg. Prøv venligst igen senere. Invalid or expired login link. - Ugyldigt eller udløbet login link. + Ugyldigt eller udløbet login-link. Too many failed login attempts, please try again in %minutes% minute. - For mange fejlede login forsøg, prøv igen om %minutes% minut. + For mange mislykkede loginforsøg. Prøv venligst igen om %minutes% minut. diff --git a/src/Symfony/Component/Security/Csrf/.gitattributes b/src/Symfony/Component/Security/Csrf/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Security/Csrf/.gitattributes +++ b/src/Symfony/Component/Security/Csrf/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Security/Csrf/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Security/Csrf/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Security/Csrf/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Csrf/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Security/Csrf/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Security/Csrf/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Guard/.gitattributes b/src/Symfony/Component/Security/Guard/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Security/Guard/.gitattributes +++ b/src/Symfony/Component/Security/Guard/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Security/Guard/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Security/Guard/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Security/Guard/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Guard/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Security/Guard/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Security/Guard/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Http/.gitattributes b/src/Symfony/Component/Security/Http/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Security/Http/.gitattributes +++ b/src/Symfony/Component/Security/Http/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Security/Http/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Security/Http/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Security/Http/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Http/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Security/Http/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Security/Http/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Http/Authenticator/FormLoginAuthenticator.php b/src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php index 3279067f50f7a..5b4de2b454d69 100644 --- a/src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php +++ b/src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php @@ -161,6 +161,10 @@ private function getCredentials(Request $request): array throw new BadRequestHttpException(sprintf('The key "%s" must be a string, "%s" given.', $this->options['password_parameter'], \gettype($credentials['password']))); } + if (!\is_string($credentials['csrf_token'] ?? '') && (!\is_object($credentials['csrf_token']) || !method_exists($credentials['csrf_token'], '__toString'))) { + throw new BadRequestHttpException(sprintf('The key "%s" must be a string, "%s" given.', $this->options['csrf_parameter'], \gettype($credentials['csrf_token']))); + } + return $credentials; } diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php index ca0dd119b89ef..d9595e09b50f6 100644 --- a/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php @@ -165,6 +165,54 @@ public function __toString() $this->assertSame('s$cr$t', $credentialsBadge->getPassword()); } + /** + * @dataProvider postOnlyDataProvider + */ + public function testHandleNonStringCsrfTokenWithArray($postOnly) + { + $request = Request::create('/login_check', 'POST', ['_username' => 'foo', '_password' => 'bar', '_csrf_token' => []]); + $request->setSession($this->createSession()); + + $this->setUpAuthenticator(['post_only' => $postOnly]); + + $this->expectException(BadRequestHttpException::class); + $this->expectExceptionMessage('The key "_csrf_token" must be a string, "array" given.'); + + $this->authenticator->authenticate($request); + } + + /** + * @dataProvider postOnlyDataProvider + */ + public function testHandleNonStringCsrfTokenWithInt($postOnly) + { + $request = Request::create('/login_check', 'POST', ['_username' => 'foo', '_password' => 'bar', '_csrf_token' => 42]); + $request->setSession($this->createSession()); + + $this->setUpAuthenticator(['post_only' => $postOnly]); + + $this->expectException(BadRequestHttpException::class); + $this->expectExceptionMessage('The key "_csrf_token" must be a string, "integer" given.'); + + $this->authenticator->authenticate($request); + } + + /** + * @dataProvider postOnlyDataProvider + */ + public function testHandleNonStringCsrfTokenWithObject($postOnly) + { + $request = Request::create('/login_check', 'POST', ['_username' => 'foo', '_password' => 'bar', '_csrf_token' => new \stdClass()]); + $request->setSession($this->createSession()); + + $this->setUpAuthenticator(['post_only' => $postOnly]); + + $this->expectException(BadRequestHttpException::class); + $this->expectExceptionMessage('The key "_csrf_token" must be a string, "object" given.'); + + $this->authenticator->authenticate($request); + } + public static function postOnlyDataProvider() { yield [true]; diff --git a/src/Symfony/Component/Semaphore/.gitattributes b/src/Symfony/Component/Semaphore/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Semaphore/.gitattributes +++ b/src/Symfony/Component/Semaphore/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Semaphore/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Semaphore/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Semaphore/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Semaphore/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Semaphore/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Semaphore/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Serializer/.gitattributes b/src/Symfony/Component/Serializer/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Serializer/.gitattributes +++ b/src/Symfony/Component/Serializer/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Serializer/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Serializer/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Serializer/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Serializer/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Serializer/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Serializer/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Serializer/Mapping/Loader/AnnotationLoader.php b/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php index 9082a3cc260ca..0137575cd9445 100644 --- a/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php +++ b/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php @@ -106,7 +106,7 @@ public function loadClassMetadata(ClassMetadataInterface $classMetadata) $accessorOrMutator = preg_match('/^(get|is|has|set)(.+)$/i', $method->name, $matches); if ($accessorOrMutator) { - $attributeName = $reflectionClass->hasProperty($method->name) ? $method->name : lcfirst($matches[2]); + $attributeName = lcfirst($matches[2]); if (isset($attributesMetadata[$attributeName])) { $attributeMetadata = $attributesMetadata[$attributeName]; @@ -138,11 +138,9 @@ public function loadClassMetadata(ClassMetadataInterface $classMetadata) $attributeMetadata->setSerializedName($annotation->getSerializedName()); } elseif ($annotation instanceof Ignore) { - if (!$accessorOrMutator) { - throw new MappingException(sprintf('Ignore on "%s::%s()" cannot be added. Ignore can only be added on methods beginning with "get", "is", "has" or "set".', $className, $method->name)); + if ($accessorOrMutator) { + $attributeMetadata->setIgnore(true); } - - $attributeMetadata->setIgnore(true); } elseif ($annotation instanceof Context) { if (!$accessorOrMutator) { throw new MappingException(sprintf('Context on "%s::%s()" cannot be added. Context can only be added on methods beginning with "get", "is", "has" or "set".', $className, $method->name)); diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php index 4b03fa9ddb116..5a51bde39b7ab 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php @@ -147,6 +147,8 @@ public function supportsNormalization($data, ?string $format = null) */ public function normalize($object, ?string $format = null, array $context = []) { + $context['_read_attributes'] = true; + if (!isset($context['cache_key'])) { $context['cache_key'] = $this->getCacheKey($format, $context); } @@ -359,6 +361,8 @@ public function supportsDenormalization($data, string $type, ?string $format = n */ public function denormalize($data, string $type, ?string $format = null, array $context = []) { + $context['_read_attributes'] = false; + if (!isset($context['cache_key'])) { $context['cache_key'] = $this->getCacheKey($format, $context); } @@ -369,6 +373,10 @@ public function denormalize($data, string $type, ?string $format = null, array $ return null; } + if (XmlEncoder::FORMAT === $format && !\is_array($data)) { + $data = ['#' => $data]; + } + $allowedAttributes = $this->getAllowedAttributes($type, $context, true); $normalizedData = $this->prepareForDenormalization($data); $extraAttributes = []; diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php index 8d749b4e1d489..9aaac706f2133 100644 --- a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -36,6 +36,7 @@ */ class GetSetMethodNormalizer extends AbstractObjectNormalizer { + private static $reflectionCache = []; private static $setterAccessibleCache = []; /** @@ -43,7 +44,7 @@ class GetSetMethodNormalizer extends AbstractObjectNormalizer */ public function supportsNormalization($data, ?string $format = null) { - return parent::supportsNormalization($data, $format) && $this->supports(\get_class($data)); + return parent::supportsNormalization($data, $format) && $this->supports(\get_class($data), true); } /** @@ -51,7 +52,7 @@ public function supportsNormalization($data, ?string $format = null) */ public function supportsDenormalization($data, string $type, ?string $format = null) { - return parent::supportsDenormalization($data, $type, $format) && $this->supports($type); + return parent::supportsDenormalization($data, $type, $format) && $this->supports($type, false); } /** @@ -63,18 +64,22 @@ public function hasCacheableSupportsMethod(): bool } /** - * Checks if the given class has any getter method. + * Checks if the given class has any getter or setter method. */ - private function supports(string $class): bool + private function supports(string $class, bool $readAttributes): bool { if (null !== $this->classDiscriminatorResolver && $this->classDiscriminatorResolver->getMappingForClass($class)) { return true; } - $class = new \ReflectionClass($class); - $methods = $class->getMethods(\ReflectionMethod::IS_PUBLIC); - foreach ($methods as $method) { - if ($this->isGetMethod($method)) { + if (!isset(self::$reflectionCache[$class])) { + self::$reflectionCache[$class] = new \ReflectionClass($class); + } + + $reflection = self::$reflectionCache[$class]; + + foreach ($reflection->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflectionMethod) { + if ($readAttributes ? $this->isGetMethod($reflectionMethod) : $this->isSetMethod($reflectionMethod)) { return true; } } @@ -95,6 +100,17 @@ private function isGetMethod(\ReflectionMethod $method): bool ); } + /** + * Checks if a method's name matches /^set.+$/ and can be called non-statically with one parameter. + */ + private function isSetMethod(\ReflectionMethod $method): bool + { + return !$method->isStatic() + && (\PHP_VERSION_ID < 80000 || !$method->getAttributes(Ignore::class)) + && 1 === $method->getNumberOfRequiredParameters() + && str_starts_with($method->name, 'set'); + } + /** * {@inheritdoc} */ @@ -124,19 +140,17 @@ protected function extractAttributes(object $object, ?string $format = null, arr */ protected function getAttributeValue(object $object, string $attribute, ?string $format = null, array $context = []) { - $ucfirsted = ucfirst($attribute); - - $getter = 'get'.$ucfirsted; + $getter = 'get'.$attribute; if (method_exists($object, $getter) && \is_callable([$object, $getter])) { return $object->$getter(); } - $isser = 'is'.$ucfirsted; + $isser = 'is'.$attribute; if (method_exists($object, $isser) && \is_callable([$object, $isser])) { return $object->$isser(); } - $haser = 'has'.$ucfirsted; + $haser = 'has'.$attribute; if (method_exists($object, $haser) && \is_callable([$object, $haser])) { return $object->$haser(); } @@ -149,7 +163,7 @@ protected function getAttributeValue(object $object, string $attribute, ?string */ protected function setAttributeValue(object $object, string $attribute, $value, ?string $format = null, array $context = []) { - $setter = 'set'.ucfirst($attribute); + $setter = 'set'.$attribute; $key = \get_class($object).':'.$setter; if (!isset(self::$setterAccessibleCache[$key])) { @@ -160,4 +174,48 @@ protected function setAttributeValue(object $object, string $attribute, $value, $object->$setter($value); } } + + protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []) + { + if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { + return false; + } + + $class = \is_object($classOrObject) ? \get_class($classOrObject) : $classOrObject; + + if (!isset(self::$reflectionCache[$class])) { + self::$reflectionCache[$class] = new \ReflectionClass($class); + } + + $reflection = self::$reflectionCache[$class]; + + if ($context['_read_attributes'] ?? true) { + foreach (['get', 'is', 'has'] as $getterPrefix) { + $getter = $getterPrefix.$attribute; + $reflectionMethod = $reflection->hasMethod($getter) ? $reflection->getMethod($getter) : null; + if ($reflectionMethod && $this->isGetMethod($reflectionMethod)) { + return true; + } + } + + return false; + } + + $setter = 'set'.$attribute; + if ($reflection->hasMethod($setter) && $this->isSetMethod($reflection->getMethod($setter))) { + return true; + } + + $constructor = $reflection->getConstructor(); + + if ($constructor && $constructor->isPublic()) { + foreach ($constructor->getParameters() as $parameter) { + if ($parameter->getName() === $attribute) { + return true; + } + } + } + + return false; + } } diff --git a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php index 0dafaa7b7bd5f..a1ab11177482e 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php @@ -14,7 +14,11 @@ use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; use Symfony\Component\PropertyAccess\PropertyAccess; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; +use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; +use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; +use Symfony\Component\PropertyInfo\PropertyWriteInfo; +use Symfony\Component\Serializer\Annotation\Ignore; use Symfony\Component\Serializer\Exception\LogicException; use Symfony\Component\Serializer\Mapping\AttributeMetadata; use Symfony\Component\Serializer\Mapping\ClassDiscriminatorResolverInterface; @@ -28,11 +32,14 @@ */ class ObjectNormalizer extends AbstractObjectNormalizer { + private static $reflectionCache = []; + protected $propertyAccessor; + protected $propertyInfoExtractor; private $objectClassResolver; - public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory = null, ?NameConverterInterface $nameConverter = null, ?PropertyAccessorInterface $propertyAccessor = null, ?PropertyTypeExtractorInterface $propertyTypeExtractor = null, ?ClassDiscriminatorResolverInterface $classDiscriminatorResolver = null, ?callable $objectClassResolver = null, array $defaultContext = []) + public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory = null, ?NameConverterInterface $nameConverter = null, ?PropertyAccessorInterface $propertyAccessor = null, ?PropertyTypeExtractorInterface $propertyTypeExtractor = null, ?ClassDiscriminatorResolverInterface $classDiscriminatorResolver = null, ?callable $objectClassResolver = null, array $defaultContext = [], ?PropertyInfoExtractorInterface $propertyInfoExtractor = null) { if (!class_exists(PropertyAccess::class)) { throw new LogicException('The ObjectNormalizer class requires the "PropertyAccess" component. Install "symfony/property-access" to use it.'); @@ -45,6 +52,8 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory $this->objectClassResolver = $objectClassResolver ?? function ($class) { return \is_object($class) ? \get_class($class) : $class; }; + + $this->propertyInfoExtractor = $propertyInfoExtractor ?: new ReflectionExtractor(); } /** @@ -86,25 +95,17 @@ protected function extractAttributes(object $object, ?string $format = null, arr if (str_starts_with($name, 'get') || str_starts_with($name, 'has')) { // getters and hassers - $attributeName = $name; + $attributeName = substr($name, 3); if (!$reflClass->hasProperty($attributeName)) { - $attributeName = substr($attributeName, 3); - - if (!$reflClass->hasProperty($attributeName)) { - $attributeName = lcfirst($attributeName); - } + $attributeName = lcfirst($attributeName); } } elseif (str_starts_with($name, 'is')) { // issers - $attributeName = $name; + $attributeName = substr($name, 2); if (!$reflClass->hasProperty($attributeName)) { - $attributeName = substr($attributeName, 2); - - if (!$reflClass->hasProperty($attributeName)) { - $attributeName = lcfirst($attributeName); - } + $attributeName = lcfirst($attributeName); } } @@ -182,4 +183,38 @@ protected function getAllowedAttributes($classOrObject, array $context, bool $at return $allowedAttributes; } + + protected function isAllowedAttribute($classOrObject, string $attribute, ?string $format = null, array $context = []) + { + if (!parent::isAllowedAttribute($classOrObject, $attribute, $format, $context)) { + return false; + } + $class = \is_object($classOrObject) ? \get_class($classOrObject) : $classOrObject; + + if ($context['_read_attributes'] ?? true) { + return $this->propertyInfoExtractor->isReadable($class, $attribute) || $this->hasAttributeAccessorMethod($class, $attribute); + } + + return $this->propertyInfoExtractor->isWritable($class, $attribute) + || ($writeInfo = $this->propertyInfoExtractor->getWriteInfo($class, $attribute)) && PropertyWriteInfo::TYPE_NONE !== $writeInfo->getType(); + } + + private function hasAttributeAccessorMethod(string $class, string $attribute): bool + { + if (!isset(self::$reflectionCache[$class])) { + self::$reflectionCache[$class] = new \ReflectionClass($class); + } + + $reflection = self::$reflectionCache[$class]; + + if (!$reflection->hasMethod($attribute)) { + return false; + } + + $method = $reflection->getMethod($attribute); + + return !$method->isStatic() + && (\PHP_VERSION_ID < 80000 || !$method->getAttributes(Ignore::class)) + && !$method->getNumberOfRequiredParameters(); + } } diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodDummy.php deleted file mode 100644 index 89c8fcb9c399c..0000000000000 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodDummy.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Serializer\Tests\Fixtures; - -class SamePropertyAsMethodDummy -{ - private $freeTrial; - private $hasSubscribe; - private $getReady; - private $isActive; - - public function __construct($freeTrial, $hasSubscribe, $getReady, $isActive) - { - $this->freeTrial = $freeTrial; - $this->hasSubscribe = $hasSubscribe; - $this->getReady = $getReady; - $this->isActive = $isActive; - } - - public function getFreeTrial() - { - return $this->freeTrial; - } - - public function hasSubscribe() - { - return $this->hasSubscribe; - } - - public function getReady() - { - return $this->getReady; - } - - public function isActive() - { - return $this->isActive; - } -} diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithMethodSerializedNameDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithMethodSerializedNameDummy.php deleted file mode 100644 index b4cf205fd57c8..0000000000000 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithMethodSerializedNameDummy.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Serializer\Tests\Fixtures; - -use Symfony\Component\Serializer\Annotation\SerializedName; - -class SamePropertyAsMethodWithMethodSerializedNameDummy -{ - private $freeTrial; - private $hasSubscribe; - private $getReady; - private $isActive; - - public function __construct($freeTrial, $hasSubscribe, $getReady, $isActive) - { - $this->freeTrial = $freeTrial; - $this->hasSubscribe = $hasSubscribe; - $this->getReady = $getReady; - $this->isActive = $isActive; - } - - /** - * @SerializedName("free_trial_method") - */ - public function getFreeTrial() - { - return $this->freeTrial; - } - - /** - * @SerializedName("has_subscribe_method") - */ - public function hasSubscribe() - { - return $this->hasSubscribe; - } - - /** - * @SerializedName("get_ready_method") - */ - public function getReady() - { - return $this->getReady; - } - - /** - * @SerializedName("is_active_method") - */ - public function isActive() - { - return $this->isActive; - } -} diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithPropertySerializedNameDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithPropertySerializedNameDummy.php deleted file mode 100644 index 04dc64a3c71c0..0000000000000 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/SamePropertyAsMethodWithPropertySerializedNameDummy.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Serializer\Tests\Fixtures; - -use Symfony\Component\Serializer\Annotation\SerializedName; - -class SamePropertyAsMethodWithPropertySerializedNameDummy -{ - /** - * @SerializedName("free_trial_property") - */ - private $freeTrial; - - /** - * @SerializedName("has_subscribe_property") - */ - private $hasSubscribe; - - /** - * @SerializedName("get_ready_property") - */ - private $getReady; - - /** - * @SerializedName("is_active_property") - */ - private $isActive; - - public function __construct($freeTrial, $hasSubscribe, $getReady, $isActive) - { - $this->freeTrial = $freeTrial; - $this->hasSubscribe = $hasSubscribe; - $this->getReady = $getReady; - $this->isActive = $isActive; - } - - public function getFreeTrial() - { - return $this->freeTrial; - } - - public function hasSubscribe() - { - return $this->hasSubscribe; - } - - public function getReady() - { - return $this->getReady; - } - - public function isActive() - { - return $this->isActive; - } -} diff --git a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTestCase.php b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTestCase.php index 5c3a686647010..b60981f7ad2ea 100644 --- a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTestCase.php +++ b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderTestCase.php @@ -141,13 +141,12 @@ public function testCanHandleUnrelatedIgnoredMethods() { $class = $this->getNamespace().'\Entity45016'; - $this->expectException(MappingException::class); - $this->expectExceptionMessage(sprintf('Ignore on "%s::badIgnore()" cannot be added', $class)); - $metadata = new ClassMetadata($class); $loader = $this->getLoaderForContextMapping(); $loader->loadClassMetadata($metadata); + + $this->assertSame(['id'], array_keys($metadata->getAttributesMetadata())); } public function testIgnoreGetterWirhRequiredParameterIfIgnoreAnnotationIsUsed() diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php index 5243eb2f2ef1a..2ca7d79fef075 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -17,6 +17,7 @@ use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; use Symfony\Component\PropertyInfo\PropertyInfoExtractor; use Symfony\Component\PropertyInfo\Type; +use Symfony\Component\Serializer\Annotation\SerializedName; use Symfony\Component\Serializer\Exception\ExtraAttributesException; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Exception\LogicException; @@ -30,6 +31,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader; +use Symfony\Component\Serializer\NameConverter\MetadataAwareNameConverter; use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer; use Symfony\Component\Serializer\Normalizer\CustomNormalizer; @@ -658,6 +660,34 @@ protected function createChildContext(array $parentContext, string $attribute, ? $this->assertFalse($normalizer->childContextCacheKey); } + + public function testDenormalizeXmlScalar() + { + $normalizer = new class () extends AbstractObjectNormalizer + { + public function __construct() + { + parent::__construct(null, new MetadataAwareNameConverter(new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())))); + } + + protected function extractAttributes(object $object, ?string $format = null, array $context = []): array + { + return []; + } + + protected function getAttributeValue(object $object, string $attribute, ?string $format = null, array $context = []) + { + return null; + } + + protected function setAttributeValue(object $object, string $attribute, $value, ?string $format = null, array $context = []) + { + $object->$attribute = $value; + } + }; + + $this->assertSame('scalar', $normalizer->denormalize('scalar', XmlScalarDummy::class, 'xml')->value); + } } class AbstractObjectNormalizerDummy extends AbstractObjectNormalizer @@ -781,6 +811,12 @@ class DummyChild public $bar; } +class XmlScalarDummy +{ + /** @SerializedName("#") */ + public $value; +} + class SerializerCollectionDummy implements SerializerInterface, DenormalizerInterface { private $normalizers; diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php index f6b2c3e69ed9b..e7c23cf58a574 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php @@ -521,6 +521,23 @@ public function testDenormalizeWithDiscriminator() $this->assertEquals($denormalized, $normalizer->denormalize(['type' => 'two', 'url' => 'url'], GetSetMethodDummyInterface::class)); } + + public function testSupportsAndNormalizeWithOnlyParentGetter() + { + $obj = new GetSetDummyChild(); + $obj->setFoo('foo'); + + $this->assertTrue($this->normalizer->supportsNormalization($obj)); + $this->assertSame(['foo' => 'foo'], $this->normalizer->normalize($obj)); + } + + public function testSupportsAndDenormalizeWithOnlyParentSetter() + { + $this->assertTrue($this->normalizer->supportsDenormalization(['foo' => 'foo'], GetSetDummyChild::class)); + + $obj = $this->normalizer->denormalize(['foo' => 'foo'], GetSetDummyChild::class); + $this->assertSame('foo', $obj->getFoo()); + } } class GetSetDummy @@ -825,3 +842,22 @@ public function setUrl(string $url): void $this->url = $url; } } + +class GetSetDummyChild extends GetSetDummyParent +{ +} + +class GetSetDummyParent +{ + private $foo; + + public function getFoo() + { + return $this->foo; + } + + public function setFoo($foo) + { + $this->foo = $foo; + } +} diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php index 6bc99f9132854..830817b8b673b 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php @@ -18,6 +18,7 @@ use Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor; use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; use Symfony\Component\PropertyInfo\PropertyInfoExtractor; +use Symfony\Component\Serializer\Annotation\Ignore; use Symfony\Component\Serializer\Exception\LogicException; use Symfony\Component\Serializer\Exception\RuntimeException; use Symfony\Component\Serializer\Exception\UnexpectedValueException; @@ -40,9 +41,6 @@ use Symfony\Component\Serializer\Tests\Fixtures\Php74Dummy; use Symfony\Component\Serializer\Tests\Fixtures\Php74DummyPrivate; use Symfony\Component\Serializer\Tests\Fixtures\Php80Dummy; -use Symfony\Component\Serializer\Tests\Fixtures\SamePropertyAsMethodDummy; -use Symfony\Component\Serializer\Tests\Fixtures\SamePropertyAsMethodWithMethodSerializedNameDummy; -use Symfony\Component\Serializer\Tests\Fixtures\SamePropertyAsMethodWithPropertySerializedNameDummy; use Symfony\Component\Serializer\Tests\Fixtures\SiblingHolder; use Symfony\Component\Serializer\Tests\Normalizer\Features\AttributesTestTrait; use Symfony\Component\Serializer\Tests\Normalizer\Features\CacheableObjectAttributesTestTrait; @@ -873,51 +871,29 @@ public function testNormalizeStdClass() $this->assertSame(['baz' => 'baz'], $this->normalizer->normalize($o2)); } - public function testSamePropertyAsMethod() - { - $object = new SamePropertyAsMethodDummy('free_trial', 'has_subscribe', 'get_ready', 'is_active'); - $expected = [ - 'freeTrial' => 'free_trial', - 'hasSubscribe' => 'has_subscribe', - 'getReady' => 'get_ready', - 'isActive' => 'is_active', - ]; - - $this->assertSame($expected, $this->normalizer->normalize($object)); - } - - public function testSamePropertyAsMethodWithPropertySerializedName() + public function testNormalizeWithIgnoreAnnotationAndPrivateProperties() { $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); - $this->normalizer = new ObjectNormalizer($classMetadataFactory, new MetadataAwareNameConverter($classMetadataFactory)); - $this->normalizer->setSerializer($this->serializer); - - $object = new SamePropertyAsMethodWithPropertySerializedNameDummy('free_trial', 'has_subscribe', 'get_ready', 'is_active'); - $expected = [ - 'free_trial_property' => 'free_trial', - 'has_subscribe_property' => 'has_subscribe', - 'get_ready_property' => 'get_ready', - 'is_active_property' => 'is_active', - ]; + $normalizer = new ObjectNormalizer($classMetadataFactory); - $this->assertSame($expected, $this->normalizer->normalize($object)); + $this->assertSame(['foo' => 'foo'], $normalizer->normalize(new ObjectDummyWithIgnoreAnnotationAndPrivateProperty())); } - public function testSamePropertyAsMethodWithMethodSerializedName() + public function testDenormalizeWithIgnoreAnnotationAndPrivateProperties() { $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); - $this->normalizer = new ObjectNormalizer($classMetadataFactory, new MetadataAwareNameConverter($classMetadataFactory)); - $this->normalizer->setSerializer($this->serializer); + $normalizer = new ObjectNormalizer($classMetadataFactory); - $object = new SamePropertyAsMethodWithMethodSerializedNameDummy('free_trial', 'has_subscribe', 'get_ready', 'is_active'); - $expected = [ - 'free_trial_method' => 'free_trial', - 'has_subscribe_method' => 'has_subscribe', - 'get_ready_method' => 'get_ready', - 'is_active_method' => 'is_active', - ]; + $obj = $normalizer->denormalize([ + 'foo' => 'set', + 'ignore' => 'set', + 'private' => 'set', + ], ObjectDummyWithIgnoreAnnotationAndPrivateProperty::class); + + $expected = new ObjectDummyWithIgnoreAnnotationAndPrivateProperty(); + $expected->foo = 'set'; - $this->assertSame($expected, $this->normalizer->normalize($object)); + $this->assertEquals($expected, $obj); } } @@ -1094,7 +1070,7 @@ public function __get($name) } } - public function __isset($name) + public function __isset($name): bool { return 'foo' === $name; } @@ -1207,3 +1183,13 @@ public function getInner() return $this->inner; } } + +class ObjectDummyWithIgnoreAnnotationAndPrivateProperty +{ + public $foo = 'foo'; + + /** @Ignore */ + public $ignored = 'ignored'; + + private $private = 'private'; +} diff --git a/src/Symfony/Component/Stopwatch/.gitattributes b/src/Symfony/Component/Stopwatch/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Stopwatch/.gitattributes +++ b/src/Symfony/Component/Stopwatch/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Stopwatch/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Stopwatch/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Stopwatch/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Stopwatch/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Stopwatch/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Stopwatch/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/String/.gitattributes b/src/Symfony/Component/String/.gitattributes index 0f57d864c994d..166549d614199 100644 --- a/src/Symfony/Component/String/.gitattributes +++ b/src/Symfony/Component/String/.gitattributes @@ -2,5 +2,4 @@ /Resources/WcswidthDataGenerator.php export-ignore /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/String/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/String/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/String/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/String/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/String/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/String/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/String/LazyString.php b/src/Symfony/Component/String/LazyString.php index 9c7a9c58b659b..5f7e7370d78d8 100644 --- a/src/Symfony/Component/String/LazyString.php +++ b/src/Symfony/Component/String/LazyString.php @@ -148,7 +148,7 @@ private static function getPrettyName(callable $callback): string } elseif ($callback instanceof \Closure) { $r = new \ReflectionFunction($callback); - if (false !== strpos($r->name, '{closure}') || !$class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { + if (str_contains($r->name, '{closure') || !$class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { return $r->name; } diff --git a/src/Symfony/Component/String/Tests/LazyStringTest.php b/src/Symfony/Component/String/Tests/LazyStringTest.php index c311a3be9ff06..02601b6faaf16 100644 --- a/src/Symfony/Component/String/Tests/LazyStringTest.php +++ b/src/Symfony/Component/String/Tests/LazyStringTest.php @@ -65,7 +65,7 @@ public function testReturnTypeError() $s = LazyString::fromCallable(function () { return []; }); $this->expectException(\TypeError::class); - $this->expectExceptionMessage('Return value of '.__NAMESPACE__.'\{closure}() passed to '.LazyString::class.'::fromCallable() must be of the type string, array returned.'); + $this->expectExceptionMessageMatches('{^Return value of .*\{closure.*\}\(\) passed to '.preg_quote(LazyString::class).'::fromCallable\(\) must be of the type string, array returned\.$}'); (string) $s; } diff --git a/src/Symfony/Component/Templating/.gitattributes b/src/Symfony/Component/Templating/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Templating/.gitattributes +++ b/src/Symfony/Component/Templating/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Templating/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Templating/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Templating/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Templating/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Templating/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Templating/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Translation/.gitattributes b/src/Symfony/Component/Translation/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Translation/.gitattributes +++ b/src/Symfony/Component/Translation/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Translation/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Translation/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Translation/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Translation/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Translation/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Translation/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Translation/Bridge/Crowdin/.gitattributes b/src/Symfony/Component/Translation/Bridge/Crowdin/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Translation/Bridge/Crowdin/.gitattributes +++ b/src/Symfony/Component/Translation/Bridge/Crowdin/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Translation/Bridge/Crowdin/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Translation/Bridge/Crowdin/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Translation/Bridge/Crowdin/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Translation/Bridge/Crowdin/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Translation/Bridge/Crowdin/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Translation/Bridge/Crowdin/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Translation/Bridge/Loco/.gitattributes b/src/Symfony/Component/Translation/Bridge/Loco/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Translation/Bridge/Loco/.gitattributes +++ b/src/Symfony/Component/Translation/Bridge/Loco/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Translation/Bridge/Loco/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Translation/Bridge/Loco/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Translation/Bridge/Loco/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Translation/Bridge/Loco/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Translation/Bridge/Loco/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Translation/Bridge/Loco/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Translation/Bridge/Lokalise/.gitattributes b/src/Symfony/Component/Translation/Bridge/Lokalise/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Translation/Bridge/Lokalise/.gitattributes +++ b/src/Symfony/Component/Translation/Bridge/Lokalise/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Translation/Bridge/Lokalise/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Translation/Bridge/Lokalise/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Translation/Bridge/Lokalise/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Translation/Bridge/Lokalise/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Translation/Bridge/Lokalise/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Translation/Bridge/Lokalise/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Translation/Loader/XliffFileLoader.php b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php index fae07dbe3d958..f4d2396191fac 100644 --- a/src/Symfony/Component/Translation/Loader/XliffFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/XliffFileLoader.php @@ -111,16 +111,20 @@ private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, s continue; } - if (isset($translation->target) && 'needs-translation' === (string) $translation->target->attributes()['state']) { + $source = (string) (isset($attributes['resname']) && $attributes['resname'] ? $attributes['resname'] : $translation->source); + + if (isset($translation->target) + && 'needs-translation' === (string) $translation->target->attributes()['state'] + && \in_array((string) $translation->target, [$source, (string) $translation->source], true) + ) { continue; } - $source = isset($attributes['resname']) && $attributes['resname'] ? $attributes['resname'] : $translation->source; // If the xlf file has another encoding specified, try to convert it because // simple_xml will always return utf-8 encoded values $target = $this->utf8ToCharset((string) ($translation->target ?? $translation->source), $encoding); - $catalogue->set((string) $source, $target, $domain); + $catalogue->set($source, $target, $domain); $metadata = [ 'source' => (string) $translation->source, @@ -143,7 +147,7 @@ private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, s $metadata['id'] = (string) $attributes['id']; } - $catalogue->setMetadata((string) $source, $metadata, $domain); + $catalogue->setMetadata($source, $metadata, $domain); } } } diff --git a/src/Symfony/Component/Translation/Resources/bin/translation-status.php b/src/Symfony/Component/Translation/Resources/bin/translation-status.php index 53e642c00dca7..1ab72c0006db3 100644 --- a/src/Symfony/Component/Translation/Resources/bin/translation-status.php +++ b/src/Symfony/Component/Translation/Resources/bin/translation-status.php @@ -166,11 +166,11 @@ function extractLocaleFromFilePath($filePath) function extractTranslationKeys($filePath) { $translationKeys = []; - $contents = new \SimpleXMLElement(file_get_contents($filePath)); + $contents = new SimpleXMLElement(file_get_contents($filePath)); foreach ($contents->file->body->{'trans-unit'} as $translationKey) { $translationId = (string) $translationKey['id']; - $translationKey = (string) $translationKey->source; + $translationKey = (string) ($translationKey['resname'] ?? $translationKey->source); $translationKeys[$translationId] = $translationKey; } diff --git a/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php b/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php index 5013d2713b181..99fa9249d7500 100644 --- a/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php +++ b/src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php @@ -52,9 +52,17 @@ public function testLoadRawXliff() test - with + with note + + baz + baz + + + baz + buz + @@ -65,6 +73,7 @@ public function testLoadRawXliff() $this->assertEquals('en', $catalogue->getLocale()); $this->assertSame([], libxml_get_errors()); $this->assertContainsOnly('string', $catalogue->all('domain1')); + $this->assertSame(['foo', 'extra', 'key', 'test'], array_keys($catalogue->all('domain1'))); } public function testLoadWithInternalErrorsEnabled() diff --git a/src/Symfony/Component/Uid/.gitattributes b/src/Symfony/Component/Uid/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Uid/.gitattributes +++ b/src/Symfony/Component/Uid/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Uid/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Uid/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Uid/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Uid/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Uid/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Uid/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Validator/.gitattributes b/src/Symfony/Component/Validator/.gitattributes index c34694db5f725..b9f8f3944ce62 100644 --- a/src/Symfony/Component/Validator/.gitattributes +++ b/src/Symfony/Component/Validator/.gitattributes @@ -1,5 +1,4 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore /Resources/bin/sync-iban-formats.php export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Validator/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Validator/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Validator/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Validator/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Validator/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Validator/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Validator/Constraints/Email.php b/src/Symfony/Component/Validator/Constraints/Email.php index 912878de763c9..e9e0e06d3b8b7 100644 --- a/src/Symfony/Component/Validator/Constraints/Email.php +++ b/src/Symfony/Component/Validator/Constraints/Email.php @@ -62,6 +62,10 @@ public function __construct( throw new InvalidArgumentException('The "mode" parameter value is not valid.'); } + if (null !== $mode && !\in_array($mode, self::$validationModes, true)) { + throw new InvalidArgumentException('The "mode" parameter value is not valid.'); + } + parent::__construct($options, $groups, $payload); $this->message = $message ?? $this->message; diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf index 387fb9a649711..f975fc5164edb 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Hierdie waarde is nie 'n geldige MAC-adres nie. + + This URL is missing a top-level domain. + Die URL mis 'n topvlakdomein. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf index dfd398ae95a4f..08012ac233bdd 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. هذه القيمة ليست عنوان MAC صالحًا. + + This URL is missing a top-level domain. + هذا الرابط يفتقر إلى نطاق المستوى الأعلى. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf index b6152e99dabc0..2eeae5f8a69ce 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Bu dəyər etibarlı bir MAC ünvanı deyil. + + This URL is missing a top-level domain. + Bu URL yuxarı səviyyəli domeni çatışmır. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.be.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.be.xlf index ea7001957572b..a0665388e4bee 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.be.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.be.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Гэта значэнне не з'яўляецца сапраўдным MAC-адрасам. + + This URL is missing a top-level domain. + Гэтаму URL бракуе дамен верхняга ўзроўню. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf index 5705364f80f84..d2405339f0c35 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf @@ -68,7 +68,7 @@ The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Mime типа на файла е невалиден ({{ type }}). Разрешени mime типове са {{ types }}. + Mime типът на файла е невалиден ({{ type }}). Разрешени mime типове са {{ types }}. This value should be {{ limit }} or less. @@ -136,7 +136,7 @@ This value is not a valid IP address. - Тази стойност не е валиден IP адрес. + Стойността не е валиден IP адрес. This value is not a valid language. @@ -156,7 +156,7 @@ The size of the image could not be detected. - Размера на изображението не може да бъде определен. + Размерът на изображението не може да бъде определен. The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. @@ -192,7 +192,7 @@ No temporary folder was configured in php.ini, or the configured folder does not exist. - В php.ini не е конфигурирана временна директория, или конфигурираната директория не съществува. + В php.ini не е конфигурирана временна директория или конфигурираната директория не съществува. Cannot write temporary file to disk. @@ -224,7 +224,7 @@ This value is not a valid International Bank Account Number (IBAN). - Тази стойност не е валиден международен банков сметка номер (IBAN). + Стойността не е валиден Международен номер на банкова сметка (IBAN). This value is not a valid ISBN-10. @@ -312,7 +312,7 @@ This value is not a valid Business Identifier Code (BIC). - Тази стойност не е валиден код за идентификация на бизнеса (BIC). + Стойността не е валиден Бизнес идентификационен код (BIC). Error @@ -320,7 +320,7 @@ This value is not a valid UUID. - Тази стойност не е валиден UUID. + Стойността не е валиден UUID. This value should be a multiple of {{ compared_value }}. @@ -328,7 +328,7 @@ This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. - Бизнес идентификационния код (BIC) не е свързан с IBAN {{ iban }}. + Бизнес идентификационният код (BIC) не е свързан с IBAN {{ iban }}. This value should be valid JSON. @@ -360,7 +360,7 @@ This password has been leaked in a data breach, it must not be used. Please use another password. - Тази парола е компрометирана, не трябва да бъде използвана. Моля използвайте друга парола. + Тази парола е компрометирана, не може да бъде използвана. Моля използвайте друга парола. This value should be between {{ min }} and {{ max }}. @@ -436,7 +436,11 @@ This value is not a valid MAC address. - Тази стойност не е валиден MAC адрес. + Стойността не е валиден MAC адрес. + + + This URL is missing a top-level domain. + На този URL липсва домейн от най-високо ниво. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf index bff1c8b441e2c..9fd444a59efff 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.bs.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ova vrijednost nije valjana MAC adresa. + + This URL is missing a top-level domain. + Ovom URL-u nedostaje domena najvišeg nivoa. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf index 2f301e784ac03..652c0a48d693c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf @@ -108,7 +108,7 @@ This value is not a valid URL. - Aquest valor no és una URL vàlida. + Aquest valor no és un URL vàlid. The two values should be equal. @@ -116,7 +116,7 @@ The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - L'arxiu és massa gran. El tamany màxim permés és {{ limit }} {{ suffix }}. + L'arxiu és massa gran. La mida màxima permesa és {{ limit }} {{ suffix }}. The file is too large. @@ -136,7 +136,7 @@ This value is not a valid IP address. - Aquest valor no és una adreça IP vàlida. + Aquest valor no és una adreça IP vàlida. This value is not a valid language. @@ -160,19 +160,19 @@ The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - L'amplària de la imatge és massa gran ({{ width }}px). L'amplària màxima permesa són {{ max_width }}px. + L'amplària de la imatge és massa gran ({{ width }}px). L'amplària màxima permesa és {{ max_width }}px. The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - L'amplària de la imatge és massa petita ({{ width }}px). L'amplària mínima requerida són {{ min_width }}px. + L'amplària de la imatge és massa petita ({{ width }}px). L'amplària mínima requerida és {{ min_width }}px. The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - L'altura de la imatge és massa gran ({{ height }}px). L'altura màxima permesa són {{ max_height }}px. + L'altura de la imatge és massa gran ({{ height }}px). L'altura màxima permesa és {{ max_height }}px. The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - L'altura de la imatge és massa petita ({{ height }}px). L'altura mínima requerida són {{ min_height }}px. + L'altura de la imatge és massa petita ({{ height }}px). L'altura mínima requerida és {{ min_height }}px. This value should be the user's current password. @@ -192,7 +192,7 @@ No temporary folder was configured in php.ini, or the configured folder does not exist. - No s'ha configurat cap carpeta temporal en php.ini, o la carpeta configurada no existeix. + No s'ha configurat cap carpeta temporal en php.ini, o la carpeta configurada no existeix. Cannot write temporary file to disk. @@ -200,7 +200,7 @@ A PHP extension caused the upload to fail. - Una extensió de PHP va fer que la pujada fallara. + Una extensió de PHP va fer que la pujada fallarà. This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. @@ -224,7 +224,7 @@ This value is not a valid International Bank Account Number (IBAN). - Aquest valor no és un Número de Compte Bancari Internacional (IBAN) vàlid. + Aquest valor no és un Número de Compte Bancari Internacional (IBAN) vàlid. This value is not a valid ISBN-10. @@ -276,31 +276,31 @@ This value should not be identical to {{ compared_value_type }} {{ compared_value }}. - Aquest valor no hauria de idèntic a {{ compared_value_type }} {{ compared_value }}. + Aquest valor no hauria de ser idèntic a {{ compared_value_type }} {{ compared_value }}. The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - La proporció de l'imatge és massa gran ({{ ratio }}). La màxima proporció permesa és {{ max_ratio }}. + La proporció de la imatge és massa gran ({{ ratio }}). La màxima proporció permesa és {{ max_ratio }}. The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - La proporció de l'imatge és massa petita ({{ ratio }}). La mínima proporció permesa és {{ max_ratio }}. + La proporció de la imatge és massa petita ({{ ratio }}). La mínima proporció permesa és {{ min_ratio }}. The image is square ({{ width }}x{{ height }}px). Square images are not allowed. - L'imatge és quadrada({{ width }}x{{ height }}px). Les imatges quadrades no estan permeses. + La imatge és quadrada({{ width }}x{{ height }}px). Les imatges quadrades no estan permeses. The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. - L'imatge està orientada horitzontalment ({{ width }}x{{ height }}px). Les imatges orientades horitzontalment no estan permeses. + La imatge està orientada horitzontalment ({{ width }}x{{ height }}px). Les imatges orientades horitzontalment no estan permeses. The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. - L'imatge està orientada verticalment ({{ width }}x{{ height }}px). Les imatges orientades verticalment no estan permeses. + La imatge està orientada verticalment ({{ width }}x{{ height }}px). Les imatges orientades verticalment no estan permeses. An empty file is not allowed. - No està permès un fixter buit. + No està permès un fitxer buit. The host could not be resolved. @@ -312,7 +312,7 @@ This value is not a valid Business Identifier Code (BIC). - Aquest valor no és un Codi d'Identificador de Negocis (BIC) vàlid. + Aquest valor no és un Codi d'identificació bancari (BIC) vàlid. Error @@ -320,7 +320,7 @@ This value is not a valid UUID. - Aquest valor no és un UUID vàlid. + Aquest valor no és un UUID vàlid. This value should be a multiple of {{ compared_value }}. @@ -428,15 +428,19 @@ The extension of the file is invalid ({{ extension }}). Allowed extensions are {{ extensions }}. - L'extensió del fitxer no és vàlida ({{ extension }}). Les extensions permeses són {{ extensions }}. + L'extensió del fitxer no és vàlida ({{ extension }}). Les extensions permeses són {{ extensions }}. The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}. - S'ha detectat que la codificació de caràcters no és vàlida ({{ detected }}). Les codificacions permeses són {{ encodings }}. + S'ha detectat que la codificació de caràcters no és vàlida ({{ detected }}). Les codificacions permeses són {{ encodings }}. This value is not a valid MAC address. - Aquest valor no és una adreça MAC vàlida. + Aquest valor no és una adreça MAC vàlida. + + + This URL is missing a top-level domain. + Aquesta URL no conté un domini de primer nivell. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf index 9ca83564ebadc..2c4c54d9f60af 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Tato hodnota není platnou MAC adresou. + + This URL is missing a top-level domain. + Této URL chybí doména nejvyššího řádu. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf index fd984989e3597..a1ebdf7f81e24 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Nid yw'r gwerth hwn yn gyfeiriad MAC dilys. + + This URL is missing a top-level domain. + Mae'r URL hwn yn colli parth lefel uchaf. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf index 826ef10c955db..808d8c6ad66d9 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Denne værdi er ikke en gyldig MAC-adresse. + + This URL is missing a top-level domain. + Denne URL mangler et topdomæne. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf index 9f145fdeed911..3b65306314922 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Dieser Wert ist keine gültige MAC-Adresse. + + This URL is missing a top-level domain. + Dieser URL fehlt eine Top-Level-Domain. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf index db927e1d51e65..a60471835745b 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf @@ -136,7 +136,7 @@ This value is not a valid IP address. - Αυτή η IP διεύθυνση δεν είναι έγκυρη. + Αυτή η IP διεύθυνση δεν είναι έγκυρη. This value is not a valid language. @@ -320,7 +320,7 @@ This value is not a valid UUID. - Αυτός ο αριθμός δεν είναι έγκυρη UUID. + Αυτός ο αριθμός δεν είναι έγκυρη UUID. This value should be a multiple of {{ compared_value }}. @@ -438,6 +438,10 @@ This value is not a valid MAC address. Αυτός ο αριθμός δεν είναι έγκυρη διεύθυνση MAC. + + This URL is missing a top-level domain. + Αυτή η διεύθυνση URL λείπει ένας τομέας ανώτατου επιπέδου. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf index 35196e572e0f0..721139011caec 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. This value is not a valid MAC address. + + This URL is missing a top-level domain. + This URL is missing a top-level domain. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf index abe75d5304ae3..d58045471c70c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf @@ -404,7 +404,7 @@ The filename is too long. It should have {{ filename_max_length }} character or less.|The filename is too long. It should have {{ filename_max_length }} characters or less. - El nombre del archivo es demasido largo. Debe tener {{ filename_max_length }} carácter o menos.|El nombre del archivo es demasido largo. Debe tener {{ filename_max_length }} caracteres o menos. + El nombre del archivo es demasiado largo. Debe tener {{ filename_max_length }} carácter o menos.|El nombre del archivo es demasiado largo. Debe tener {{ filename_max_length }} caracteres o menos. The password strength is too low. Please use a stronger password. @@ -438,6 +438,10 @@ This value is not a valid MAC address. Este valor no es una dirección MAC válida. + + This URL is missing a top-level domain. + Esta URL no contiene una extensión de dominio (TLD). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf index 0af593467f591..d9d641322976b 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. See väärtus ei ole kehtiv MAC-aadress. + + This URL is missing a top-level domain. + Sellel URL-il puudub ülataseme domeen. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf index 6094d1cbca575..bdcbaa393e6a1 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Balio hau ez da MAC helbide baliozko bat. + + This URL is missing a top-level domain. + URL honek ez du goi-mailako domeinurik. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf index 1db553c9ffb18..0f2cf5bbf1fed 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. این مقدار یک آدرس MAC معتبر نیست. + + This URL is missing a top-level domain. + این URL فاقد دامنه سطح بالا است. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf index 324df2c276b79..e9ca6c83347a6 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Tämä arvo ei ole kelvollinen MAC-osoite. + + This URL is missing a top-level domain. + Tästä URL-osoitteesta puuttuu ylätason verkkotunnus. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf index e2d747a49bffe..4e949d838cae7 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Cette valeur n'est pas une adresse MAC valide. + + This URL is missing a top-level domain. + Cette URL doit contenir un domaine de premier niveau. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf index 2723983c5a99d..2a1199bed5c71 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Este valor non é un enderezo MAC válido. + + This URL is missing a top-level domain. + Esta URL non contén un dominio de nivel superior. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf index b1bb894a7fe4b..cd406b4eb86c8 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. ערך זה אינו כתובת MAC תקפה. + + This URL is missing a top-level domain. + לכתובת URL זו חסר דומיין רמה עליונה. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf index eed237ce27e40..a7542a9353293 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ova vrijednost nije valjana MAC adresa. + + This URL is missing a top-level domain. + Ovom URL-u nedostaje vršna domena. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf index df39afd709671..a31848c775fde 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ez az érték nem érvényes MAC-cím. + + This URL is missing a top-level domain. + Az URL-ből hiányzik a legfelső szintű tartomány (top-level domain). + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf index 707301d18c037..d8ff322e6ed76 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Այս արժեքը վավեր MAC հասցե չէ։ + + This URL is missing a top-level domain. + Այս URL-ը չունի վերին մակարդակի դոմեյն: + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf index 1cc60c4d8f9a2..b894c69d855d6 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf @@ -192,7 +192,7 @@ No temporary folder was configured in php.ini, or the configured folder does not exist. - Tidak ada folder sementara yang dikonfigurasi di php.ini, atau folder yang dikonfigurasi tidak ada. + Tidak ada folder sementara yang dikonfigurasi di php.ini, atau folder yang dikonfigurasi tidak ada. Cannot write temporary file to disk. @@ -438,6 +438,10 @@ This value is not a valid MAC address. Nilai ini bukan alamat MAC yang valid. + + This URL is missing a top-level domain. + URL ini tidak memiliki domain tingkat atas. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf index bd7b25882d82c..74f3a75b0c97e 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Questo valore non è un indirizzo MAC valido. + + This URL is missing a top-level domain. + Questo URL è privo di un dominio di primo livello. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf index 0524cd0511e15..c977df4a3e186 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. この値は有効なMACアドレスではありません。 + + This URL is missing a top-level domain. + このURLはトップレベルドメインがありません。 + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf index 548d82da41683..28d1eff019aac 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Dëse Wäert ass keng gülteg MAC-Adress. + + This URL is missing a top-level domain. + Dësen URL feelt eng Top-Level-Domain. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf index b3ee199fe4c73..e16daea93b80f 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf @@ -136,7 +136,7 @@ This value is not a valid IP address. - Ši vertė nėra galiojantis IP adresas. + Ši reikšmė nėra tinkamas IP adresas. This value is not a valid language. @@ -192,7 +192,7 @@ No temporary folder was configured in php.ini, or the configured folder does not exist. - php.ini nesukonfigūruotas laikinas aplankas, arba sukonfigūruotas aplankas neegzistuoja. + php.ini nesukonfigūruotas laikinas aplankas arba sukonfigūruotas aplankas neegzistuoja. Cannot write temporary file to disk. @@ -224,7 +224,7 @@ This value is not a valid International Bank Account Number (IBAN). - Ši vertė nėra galiojantis Tarptautinis Banko Sąskaitos Numeris (IBAN). + Ši reikšmė nėra tinkamas Tarptautinis Banko Sąskaitos Numeris (IBAN). This value is not a valid ISBN-10. @@ -312,7 +312,7 @@ This value is not a valid Business Identifier Code (BIC). - Ši vertė nėra galiojantis Verslo Identifikavimo Kodas (BIC). + Ši reikšmė nėra tinkamas Verslo Identifikavimo Kodas (BIC). Error @@ -320,7 +320,7 @@ This value is not a valid UUID. - Ši vertė nėra galiojantis UUID. + Ši reikšmė nėra tinkamas UUID. This value should be a multiple of {{ compared_value }}. @@ -432,11 +432,15 @@ The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}. - Nustatyta simbolių koduotė yra netinkama ({{ detected }}). Leidžiamos koduotės yra {{ encodings }}. + Aptikta simbolių koduotė yra netinkama ({{ detected }}). Leidžiamos koduotės yra {{ encodings }}. This value is not a valid MAC address. - Ši vertė nėra galiojantis MAC adresas. + Ši reikšmė nėra tinkamas MAC adresas. + + + This URL is missing a top-level domain. + Šiam URL trūksta aukščiausio lygio domeno. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf index d1222f02b72a5..66e370fea944d 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Šī vērtība nav derīga MAC adrese. + + This URL is missing a top-level domain. + Šim URL trūkst augšējā līmeņa domēna. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.mk.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.mk.xlf index 9d6dec6288b8a..d941f59ea8c8c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.mk.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.mk.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Оваа вредност не е валидна MAC адреса. + + This URL is missing a top-level domain. + На овој URL недостасува домен од највисоко ниво. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf index 4984bb127cab1..4f997a7031592 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Энэ утга хүчинтэй MAC хаяг биш юм. + + This URL is missing a top-level domain. + Энэ URL дээд түвшингийн домейн дутуу байна. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.my.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.my.xlf index e4858336c1c7d..57b6e276dc9c5 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.my.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.my.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. ဤတန်ဖိုးသည် မှန်ကန်သော MAC လိပ်စာ မဟုတ်ပါ။ + + This URL is missing a top-level domain. + ဤ URL တွင် အမြင့်ဆုံးအဆင့်ဒိုမိန်း ပါဝင်မရှိပါ။ + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf index 8b317449ef4e8..27a4d3c55a1ef 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.nb.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Denne verdien er ikke en gyldig MAC-adresse. + + This URL is missing a top-level domain. + Denne URL-en mangler et toppnivådomene. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf index 81d57cab48eec..7596799d0d904 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf @@ -64,11 +64,11 @@ The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Het bestand is te groot ({{ size }} {{ suffix }}). Toegestane maximum grootte is {{ limit }} {{ suffix }}. + Het bestand is te groot ({{ size }} {{ suffix }}). De maximale grootte is {{ limit }} {{ suffix }}. The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Het mime type van het bestand is ongeldig ({{ type }}). Toegestane mime types zijn {{ types }}. + Het mediatype van het bestand is ongeldig ({{ type }}). De toegestane mediatypes zijn {{ types }}. This value should be {{ limit }} or less. @@ -116,7 +116,7 @@ The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Het bestand is te groot. Toegestane maximum grootte is {{ limit }} {{ suffix }}. + Het bestand is te groot. De maximale grootte is {{ limit }} {{ suffix }}. The file is too large. @@ -144,7 +144,7 @@ This value is not a valid locale. - Deze waarde is geen geldige locale. + Deze waarde is geen geldige landinstelling. This value is not a valid country. @@ -160,7 +160,7 @@ The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - De afbeelding is te breed ({{ width }}px). De maximaal toegestane breedte is {{ max_width }}px. + De afbeelding is te breed ({{ width }}px). De maximaal breedte is {{ max_width }}px. The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. @@ -168,7 +168,7 @@ The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - De afbeelding is te hoog ({{ height }}px). De maximaal toegestane hoogte is {{ max_height }}px. + De afbeelding is te hoog ({{ height }}px). De maximaal hoogte is {{ max_height }}px. The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. @@ -280,11 +280,11 @@ The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}. - De afbeeldingsverhouding is te groot ({{ ratio }}). Maximale verhouding is {{ max_ratio }}. + De afbeeldingsverhouding is te groot ({{ ratio }}). De maximale verhouding is {{ max_ratio }}. The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}. - De afbeeldingsverhouding is te klein ({{ ratio }}). Minimale verhouding is {{ min_ratio }}. + De afbeeldingsverhouding is te klein ({{ ratio }}). De minimale verhouding is {{ min_ratio }}. The image is square ({{ width }}x{{ height }}px). Square images are not allowed. @@ -324,7 +324,7 @@ This value should be a multiple of {{ compared_value }}. - Deze waarde zou een meervoud van {{ compared_value }} moeten zijn. + Deze waarde moet een meervoud van {{ compared_value }} zijn. This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. @@ -336,7 +336,7 @@ This collection should contain only unique elements. - Deze collectie moet alleen unieke elementen bevatten. + Deze collectie mag alleen unieke elementen bevatten. This value should be positive. @@ -396,7 +396,7 @@ This value is not a valid CIDR notation. - Deze waarde is geen geldige CIDR notatie. + Deze waarde is geen geldige CIDR-notatie. The value of the netmask should be between {{ min }} and {{ max }}. @@ -404,11 +404,11 @@ The filename is too long. It should have {{ filename_max_length }} character or less.|The filename is too long. It should have {{ filename_max_length }} characters or less. - De bestandsnaam is te lang. Het moet {{ filename_max_length }} karakter of minder zijn. + De bestandsnaam is te lang. Het moet {{ filename_max_length }} karakter of minder zijn.|De bestandsnaam is te lang. Het moet {{ filename_max_length }} karakters of minder zijn. The password strength is too low. Please use a stronger password. - De wachtwoordsterkte is te laag. Gebruik alstublieft een sterker wachtwoord. + Het wachtwoord is niet sterk genoeg. Probeer een sterker wachtwoord. This value contains characters that are not allowed by the current restriction-level. @@ -428,16 +428,20 @@ The extension of the file is invalid ({{ extension }}). Allowed extensions are {{ extensions }}. - De extensie van het bestand is ongeldig ({{ extension }}). Toegestane extensies zijn {{ extensions }}. + De bestandsextensie is ongeldig ({{ extension }}). De toegestane extensies zijn {{ extensions }}. The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}. - De gedetecteerde karaktercodering is ongeldig ({{ detected }}). Toegestane coderingen zijn {{ encodings }}. + De gedetecteerde karaktercodering is ongeldig ({{ detected }}). De toegestane coderingen zijn {{ encodings }}. This value is not a valid MAC address. Deze waarde is geen geldig MAC-adres. + + This URL is missing a top-level domain. + Deze URL mist een top-level domein. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf index 4e1a41dab84d7..de400b7d5115c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Denne verdien er ikkje ein gyldig MAC-adresse. + + This URL is missing a top-level domain. + Denne URL-en manglar eit toppnivådomene. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf index 8b317449ef4e8..27a4d3c55a1ef 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Denne verdien er ikke en gyldig MAC-adresse. + + This URL is missing a top-level domain. + Denne URL-en mangler et toppnivådomene. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf index 29180984e6dfb..42b6e9571b349 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ta wartość nie jest prawidłowym adresem MAC. + + This URL is missing a top-level domain. + Podany URL nie zawiera domeny najwyższego poziomu. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf index 5861a6d1434c6..ed28ee31ea639 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Este valor não é um endereço MAC válido. + + This URL is missing a top-level domain. + Esta URL está faltando um domínio de topo. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf index 4372885085282..e5fe095eace75 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Este valor não é um endereço MAC válido. + + This URL is missing a top-level domain. + Esta URL está faltando um domínio de topo. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf index 426f6319cee20..3d0b819a95441 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Această valoare nu este o adresă MAC validă. + + This URL is missing a top-level domain. + Acest URL îi lipsește un domeniu de nivel superior. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf index 22900d5c266b5..dbee06a984b2c 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Это значение не является действительным MAC-адресом. + + This URL is missing a top-level domain. + В этом URL отсутствует домен верхнего уровня. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf index 9b06bdfb8c12e..8886395e6e8c7 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Táto hodnota nie je platnou MAC adresou. + + This URL is missing a top-level domain. + Tomuto URL chýba doména najvyššej úrovne. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf index 596a66166cf4d..03e750b8af75b 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ta vrednost ni veljaven MAC naslov. + + This URL is missing a top-level domain. + Temu URL manjka domena najvišje ravni. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf index 3ac3603144ca2..e9b31b88258d9 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf @@ -447,6 +447,10 @@ This value is not a valid MAC address. Kjo nuk është një adresë e vlefshme e Kontrollit të Qasjes në Media (MAC). + + This URL is missing a top-level domain. + Kësaj URL i mungon një domain i nivelit të lartë. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf index b73cde9bac4a9..0550626d03f4d 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ова вредност није валидна MAC адреса. + + This URL is missing a top-level domain. + Овом URL недостаје домен највишег нивоа. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf index cd4ccfb3f3c03..5a85bd764d3cc 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ova vrednost nije validna MAC adresa. + + This URL is missing a top-level domain. + Ovom URL nedostaje domen najvišeg nivoa. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf index ec106fa78ebb7..d7be868c10e96 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Värdet är inte en giltig MAC-adress. + + This URL is missing a top-level domain. + Denna URL saknar en toppdomän. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf index f109024bfeaf3..0d811ed040f88 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. ค่านี้ไม่ใช่ที่อยู่ MAC ที่ถูกต้อง + + This URL is missing a top-level domain. + URL นี้ขาดโดเมนระดับสูงสุด. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.tl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.tl.xlf index 632efbc3f3f95..8e8146a0faade 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.tl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.tl.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Ang halagang ito ay hindi isang wastong MAC address. + + This URL is missing a top-level domain. + Kulang ang URL na ito sa top-level domain. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf index 4d66ce8bcbc58..3553af7b74ddd 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Bu değer geçerli bir MAC adresi değil. + + This URL is missing a top-level domain. + Bu URL bir üst düzey alan adı eksik. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf index fcf63e0f675f3..7b9918910b151 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf @@ -136,7 +136,7 @@ This value is not a valid IP address. - Це значення не є дійсною IP-адресою. + Це значення не є дійсною IP-адресою. This value is not a valid language. @@ -192,7 +192,7 @@ No temporary folder was configured in php.ini, or the configured folder does not exist. - У php.ini не було налаштовано тимчасової теки, або налаштована тека не існує. + У php.ini не було налаштовано тимчасової теки, або налаштована тека не існує. Cannot write temporary file to disk. @@ -224,7 +224,7 @@ This value is not a valid International Bank Account Number (IBAN). - Це значення не є дійсним Міжнародним банківським рахунком (IBAN). + Це значення не є дійсним міжнародним номером банківського рахунку (IBAN). This value is not a valid ISBN-10. @@ -312,7 +312,7 @@ This value is not a valid Business Identifier Code (BIC). - Це значення не є дійсним Кодом ідентифікації бізнесу (BIC). + Це значення не є дійсним банківським кодом (BIC). Error @@ -320,7 +320,7 @@ This value is not a valid UUID. - Це значення не є дійсним UUID. + Це значення не є дійсним UUID. This value should be a multiple of {{ compared_value }}. @@ -436,7 +436,11 @@ This value is not a valid MAC address. - Це значення не є дійсною MAC-адресою. + Це значення не є дійсною MAC-адресою. + + + This URL is missing a top-level domain. + Цьому URL не вистачає домену верхнього рівня. diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.ur.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.ur.xlf index 65719c64ebc4a..f994cb57a84e2 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.ur.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.ur.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. یہ قیمت کوئی درست MAC پتہ نہیں ہے۔ + + This URL is missing a top-level domain. + اس URL میں ٹاپ لیول ڈومین موجود نہیں ہے۔ + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.uz.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.uz.xlf index bf5a2d5f4d9de..1e43fb0fff8cf 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.uz.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.uz.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Bu qiymat haqiqiy MAC manzil emas. + + This URL is missing a top-level domain. + Bu URL yuqori darajali domenni o'z ichiga olmaydi. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf index eadf61467c8bc..b3073cc7370a0 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. Giá trị này không phải là địa chỉ MAC hợp lệ. + + This URL is missing a top-level domain. + URL này thiếu miền cấp cao. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf index 155871cd38df4..fabf86d3b0e13 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. 该值不是有效的MAC地址。 + + This URL is missing a top-level domain. + 此URL缺少顶级域名。 + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf index 1a90678627e97..feee108a1bd3d 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf @@ -438,6 +438,10 @@ This value is not a valid MAC address. 這不是一個有效的MAC地址。 + + This URL is missing a top-level domain. + 此URL缺少頂級域名。 + diff --git a/src/Symfony/Component/Validator/Tests/Constraints/EmailTest.php b/src/Symfony/Component/Validator/Tests/Constraints/EmailTest.php index bf719b6f848fb..3451fdfb208e0 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/EmailTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/EmailTest.php @@ -33,6 +33,13 @@ public function testUnknownModesTriggerException() new Email(['mode' => 'Unknown Mode']); } + public function testUnknownModeArgumentsTriggerException() + { + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('The "mode" parameter value is not valid.'); + new Email(null, null, 'Unknown Mode'); + } + public function testNormalizerCanBeSet() { $email = new Email(['normalizer' => 'trim']); diff --git a/src/Symfony/Component/VarDumper/.gitattributes b/src/Symfony/Component/VarDumper/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/VarDumper/.gitattributes +++ b/src/Symfony/Component/VarDumper/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/VarDumper/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/VarDumper/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/VarDumper/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/VarDumper/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/VarDumper/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/VarDumper/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/VarDumper/Caster/ReflectionCaster.php b/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php index 6f1b8f2f25a5e..35fd1e8a99b2b 100644 --- a/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php @@ -42,7 +42,7 @@ public static function castClosure(\Closure $c, array $a, Stub $stub, bool $isNe $a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter); - if (!str_contains($c->name, '{closure}')) { + if (!str_contains($c->name, '{closure')) { $stub->class = isset($a[$prefix.'class']) ? $a[$prefix.'class']->value.'::'.$c->name : $c->name; unset($a[$prefix.'class']); } diff --git a/src/Symfony/Component/VarExporter/.gitattributes b/src/Symfony/Component/VarExporter/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/VarExporter/.gitattributes +++ b/src/Symfony/Component/VarExporter/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/VarExporter/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/VarExporter/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/VarExporter/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/VarExporter/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/VarExporter/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/VarExporter/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/WebLink/.gitattributes b/src/Symfony/Component/WebLink/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/WebLink/.gitattributes +++ b/src/Symfony/Component/WebLink/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/WebLink/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/WebLink/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/WebLink/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/WebLink/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/WebLink/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/WebLink/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Workflow/.gitattributes b/src/Symfony/Component/Workflow/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Workflow/.gitattributes +++ b/src/Symfony/Component/Workflow/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Workflow/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Workflow/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Workflow/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Workflow/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Workflow/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Workflow/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Yaml/.gitattributes b/src/Symfony/Component/Yaml/.gitattributes index 84c7add058fb5..14c3c35940427 100644 --- a/src/Symfony/Component/Yaml/.gitattributes +++ b/src/Symfony/Component/Yaml/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore diff --git a/src/Symfony/Component/Yaml/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Component/Yaml/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Component/Yaml/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Yaml/.github/workflows/check-subtree-split.yml b/src/Symfony/Component/Yaml/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Component/Yaml/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Yaml/Parser.php b/src/Symfony/Component/Yaml/Parser.php index 1b193ee6e917f..6b5b273a77ead 100644 --- a/src/Symfony/Component/Yaml/Parser.php +++ b/src/Symfony/Component/Yaml/Parser.php @@ -653,12 +653,12 @@ private function getNextEmbedBlock(?int $indentation = null, bool $inSequence = } if ($this->isCurrentLineBlank()) { - $data[] = substr($this->currentLine, $newIndent); + $data[] = substr($this->currentLine, $newIndent ?? 0); continue; } if ($indent >= $newIndent) { - $data[] = substr($this->currentLine, $newIndent); + $data[] = substr($this->currentLine, $newIndent ?? 0); } elseif ($this->isCurrentLineComment()) { $data[] = $this->currentLine; } elseif (0 == $indent) { diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php index 741a6ad83c99e..5fa6d08064334 100644 --- a/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -1476,13 +1476,13 @@ public static function getBinaryData() data: !!binary | SGVsbG8gd29ybGQ= EOT - ], + ], 'containing spaces in block scalar' => [ <<<'EOT' data: !!binary | SGVs bG8gd 29ybGQ= EOT - ], + ], ]; } @@ -2949,6 +2949,11 @@ public function testParseIdeographicSpaces() ], $this->parser->parse($expected)); } + public function testSkipBlankLines() + { + $this->assertSame(['foo' => [null]], (new Parser())->parse("foo:\n-\n\n")); + } + private function assertSameData($expected, $actual) { $this->assertEquals($expected, $actual); diff --git a/src/Symfony/Contracts/.gitattributes b/src/Symfony/Contracts/.gitattributes new file mode 100644 index 0000000000000..825312826d129 --- /dev/null +++ b/src/Symfony/Contracts/.gitattributes @@ -0,0 +1 @@ +/.git* export-ignore diff --git a/src/Symfony/Contracts/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Contracts/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Contracts/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Contracts/.github/workflows/check-subtree-split.yml b/src/Symfony/Contracts/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Contracts/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Contracts/Cache/.gitattributes b/src/Symfony/Contracts/Cache/.gitattributes new file mode 100644 index 0000000000000..825312826d129 --- /dev/null +++ b/src/Symfony/Contracts/Cache/.gitattributes @@ -0,0 +1 @@ +/.git* export-ignore diff --git a/src/Symfony/Contracts/Cache/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Contracts/Cache/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Contracts/Cache/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Contracts/Cache/.github/workflows/check-subtree-split.yml b/src/Symfony/Contracts/Cache/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Contracts/Cache/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Contracts/Deprecation/.gitattributes b/src/Symfony/Contracts/Deprecation/.gitattributes new file mode 100644 index 0000000000000..825312826d129 --- /dev/null +++ b/src/Symfony/Contracts/Deprecation/.gitattributes @@ -0,0 +1 @@ +/.git* export-ignore diff --git a/src/Symfony/Contracts/Deprecation/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Contracts/Deprecation/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Contracts/Deprecation/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Contracts/Deprecation/.github/workflows/check-subtree-split.yml b/src/Symfony/Contracts/Deprecation/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Contracts/Deprecation/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Contracts/EventDispatcher/.gitattributes b/src/Symfony/Contracts/EventDispatcher/.gitattributes new file mode 100644 index 0000000000000..825312826d129 --- /dev/null +++ b/src/Symfony/Contracts/EventDispatcher/.gitattributes @@ -0,0 +1 @@ +/.git* export-ignore diff --git a/src/Symfony/Contracts/EventDispatcher/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Contracts/EventDispatcher/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Contracts/EventDispatcher/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Contracts/EventDispatcher/.github/workflows/check-subtree-split.yml b/src/Symfony/Contracts/EventDispatcher/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Contracts/EventDispatcher/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Contracts/HttpClient/.gitattributes b/src/Symfony/Contracts/HttpClient/.gitattributes new file mode 100644 index 0000000000000..825312826d129 --- /dev/null +++ b/src/Symfony/Contracts/HttpClient/.gitattributes @@ -0,0 +1 @@ +/.git* export-ignore diff --git a/src/Symfony/Contracts/HttpClient/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Contracts/HttpClient/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Contracts/HttpClient/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Contracts/HttpClient/.github/workflows/check-subtree-split.yml b/src/Symfony/Contracts/HttpClient/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Contracts/HttpClient/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Contracts/Service/.gitattributes b/src/Symfony/Contracts/Service/.gitattributes new file mode 100644 index 0000000000000..825312826d129 --- /dev/null +++ b/src/Symfony/Contracts/Service/.gitattributes @@ -0,0 +1 @@ +/.git* export-ignore diff --git a/src/Symfony/Contracts/Service/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Contracts/Service/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Contracts/Service/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Contracts/Service/.github/workflows/check-subtree-split.yml b/src/Symfony/Contracts/Service/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Contracts/Service/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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/Contracts/Translation/.gitattributes b/src/Symfony/Contracts/Translation/.gitattributes new file mode 100644 index 0000000000000..825312826d129 --- /dev/null +++ b/src/Symfony/Contracts/Translation/.gitattributes @@ -0,0 +1 @@ +/.git* export-ignore diff --git a/src/Symfony/Contracts/Translation/.github/PULL_REQUEST_TEMPLATE.md b/src/Symfony/Contracts/Translation/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000000..4689c4dad430e --- /dev/null +++ b/src/Symfony/Contracts/Translation/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +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/Contracts/Translation/.github/workflows/check-subtree-split.yml b/src/Symfony/Contracts/Translation/.github/workflows/check-subtree-split.yml new file mode 100644 index 0000000000000..16be48bae3113 --- /dev/null +++ b/src/Symfony/Contracts/Translation/.github/workflows/check-subtree-split.yml @@ -0,0 +1,37 @@ +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" + }); + }