Skip to content

[Validator][Choice] Fix callback option if not array or iterable returned #58611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
313 commits
Select commit Hold shift + click to select a range
5150650
[Serializer] Fix `GetSetMethodNormalizer` not working with setters wi…
HypeMC May 2, 2024
b9b86ab
[HttpClient] Fix cURL default options
alexandre-daubois May 3, 2024
0a62531
[Validator] Check `Locale` class existence before using it
alexandre-daubois May 3, 2024
bc36f8e
Fix exception thrown during `LDAP_MODIFY_BATCH_REMOVE_ALL` batch oper…
phasdev May 4, 2024
10e18eb
Fix various warnings across components test suite
alexandre-daubois May 2, 2024
9abb660
[Validator] Update Dutch (nl) translation
SherinBloemendaal May 6, 2024
0164de2
[PasswordHasher] Make bcrypt nul byte hash test tolerant to PHP relat…
alexandre-daubois May 7, 2024
4f1b226
replace wurstmeister Docker images for Kafka and Zookeeper
xabbuh May 10, 2024
0e8e6b9
[HttpClient] Revert fixing curl default options
alexandre-daubois May 7, 2024
f6aeb4c
fix tests
xabbuh May 14, 2024
8435408
add test for JSON response with null as content
xabbuh May 13, 2024
3f04e49
Remove calls to `getMockForAbstractClass()`
alexandre-daubois Apr 26, 2024
d7a3dfc
Remove calls to `TestCase::iniSet()` and calls to deprecated methods …
alexandre-daubois Apr 29, 2024
bc4d94b
[String] Fix folded in compat mode
smnandre May 11, 2024
e3b6460
filter out empty HTTP header parts
xabbuh May 13, 2024
f941f94
[ErrorHandler] Do not call xdebug_get_function_stack() with xdebug >=…
fmata May 14, 2024
b524135
add missing plural translation messages
xabbuh May 15, 2024
4458cac
[Security] Populate translations for trans-unit 20
nicolas-grekas May 16, 2024
98ffd73
[Validator] IBAN Check digits should always between 2 and 98
karstennilsen May 14, 2024
69b18ca
[Filesystem] Fix dumpFile `stat failed` error hitting custom handler
acoulton May 10, 2024
95f8abd
[PhpUnitBridge] Fix `DeprecationErrorHandler` with PhpUnit 10
HypeMC May 1, 2024
ca02ae9
[Serializer] Fix type for missing property
ElisDN May 13, 2024
f7f88ea
[PropertyInfo] Update DoctrineExtractor for new DBAL 4 BIGINT type
llupa Apr 22, 2024
715cdc8
Update security.nl.xlf
stephanvierkant May 17, 2024
ac7f089
Reviewing translations for Japanese.
k-sahara May 17, 2024
4284b97
[Security] reviewed Polish translation of key 20
thunderer May 17, 2024
16a3a41
review: RU translation
HMRDevil May 19, 2024
c18902c
[Security] reviewed Latvian translation of key 20
thunderer May 20, 2024
57d5034
Review Indonesian (id) translation
asispts May 18, 2024
1d3c738
Update security.fr.xlf
camilleislasse May 17, 2024
a085679
Update PR template
fabpot May 21, 2024
e2dfa8d
[Security] reviewed Ukrainian translation of key 20
thunderer May 21, 2024
8a03299
[Security] reviewed Greek translation of key 20
thunderer May 21, 2024
2996c25
[Security] Fix Croatian translation
HypeMC May 21, 2024
ec86f08
adapt GHA config for the Bitnami Docker image for Kafka
xabbuh May 13, 2024
4a742b5
keep boolean options when their value is false
xabbuh May 25, 2024
dc29030
[VarDumper] Fix generator dump on PHP 8.4
alexandre-daubois May 27, 2024
daa007e
[Mime] Fixed `Mime\Message::ensureValidity()` when a required header …
rhertogh May 22, 2024
6c6c180
fix PHP 7 compatibility
xabbuh May 29, 2024
768ab58
[Mailer] Fix sendmail transport failure handling and interactive mode
bobvandevijver Apr 11, 2024
35d2672
[Security] reviewed Romanian translation of key 20
thunderer May 22, 2024
610b739
Revert "minor #54653 Auto-close PRs on subtree-splits (nicolas-grekas)"
fabpot May 31, 2024
f26aa51
Fix autoload configs to avoid warnings when building optimized autolo…
Seldaek May 31, 2024
8cfb5c9
Update CHANGELOG for 5.4.40
fabpot Jun 2, 2024
b8d7a6e
Update CONTRIBUTORS for 5.4.40
fabpot Jun 2, 2024
3a0fd1c
Update VERSION for 5.4.40
fabpot Jun 2, 2024
dee20df
Bump Symfony version to 5.4.41
fabpot Jun 2, 2024
bfc9bfa
[String] Fix Inflector for 'hardware'
podhy May 30, 2024
831949b
not registered definitions must not be modified
xabbuh Jun 3, 2024
ce8e87a
[PhpUnitBridge] Fix error handler triggered outside of tests
HypeMC May 25, 2024
823d29f
chore: upgrade class doc
94noni Jun 4, 2024
d0e0f1e
add space in error message
mvhirsch Jun 4, 2024
f6a905c
fix cssColor HSLA test dataProvider
sfmok Jun 8, 2024
b7e08a6
[Messenger] Comply with Amazon SQS requirements for message body
VincentLanglet May 7, 2024
630bdd7
[Validator] [UniqueValidator] Use correct variable as parameter in (c…
seho-nl May 28, 2024
78c8fbf
[String] Fix #54611 pluralization of -on ending words + singularizati…
Apr 17, 2024
f60aa62
[PropertyAccessor] Fix unexpected collection when generics
mtarld Nov 23, 2023
b905315
[57251] Missing translations for Romanian (ro)
Jun 10, 2024
68be752
[PhpUnitBridge] Add missing import
HypeMC Jun 14, 2024
4669cd1
[FrameworkBundle] Fix setting default context for certain normalizers
HypeMC May 31, 2024
67dc97a
test handling of special "value" constraint option
xabbuh Jun 14, 2024
49915d9
[ErrorHandler] Fix rendered exception code highlighting on PHP 8.3
tscni Jun 9, 2024
abef123
[Serializer] Fix `ObjectNormalizer` with property path
HypeMC May 26, 2024
2e4a748
properly handle invalid data for false/true types
xabbuh Jun 7, 2024
11be44b
[Messenger] [Amqp] Handle AMQPConnectionException when publishing a m…
jwage Mar 5, 2024
9424af1
[HttpKernel][Security] Fix accessing session for stateless request
VincentLanglet Jun 11, 2024
6cde069
[Notifier] Fix thread key in GoogleChat bridge
romain-jacquart Jun 18, 2024
ebcc65d
[DoctrineBridge] Test reset with a true manager
MatTheCat Jun 21, 2024
263279e
Sync php-cs-fixer config file with 7.2
nicolas-grekas Jun 21, 2024
13e5cf2
[SecurityBundle] Add `provider` XML attribute to the authenticators i…
MatTheCat Jun 20, 2024
6b70168
[HttpClient] Fix parsing SSE
fancyweb Jun 19, 2024
49bcdb1
Reviewed Catalan missing translations
umigam3 Jun 27, 2024
58abdfa
[HttpClient][Mailer] Revert "Let curl handle transfer encoding", use …
nicolas-grekas Jun 27, 2024
e9a4051
Fix typo: synchronous -> synchronously
bocharsky-bw Jun 27, 2024
cac92a4
[Serializer] Check if exception message in test is correct
HypeMC Jun 27, 2024
a747488
Ibexa is sponsoring Symfony 5.4, thanks to them! \o/
nicolas-grekas Jun 27, 2024
31bdce3
[String] Add `alias` case to `EnglishInflector`
alexandre-daubois Jun 26, 2024
3d8021c
[DoctrineBridge] Fix compat with DI >= 6.4
nicolas-grekas Jun 28, 2024
ff405e2
[Filesystem] Fix Filesystem::remove() on Windows
nicolas-grekas Jun 28, 2024
7eb35f6
[String] Fix *String::snake methods
arczinosek Jun 22, 2024
0768cd1
Test convert CompletionInput into string
seriquynh Jun 28, 2024
7f6f978
[Filesystem][Mime] Fix transient tests
nicolas-grekas Jun 28, 2024
f50903f
Update CHANGELOG for 5.4.41
fabpot Jun 28, 2024
062590c
Update CONTRIBUTORS for 5.4.41
fabpot Jun 28, 2024
a6bb9ac
Update VERSION for 5.4.41
fabpot Jun 28, 2024
8d3eb12
Bump Symfony version to 5.4.42
fabpot Jun 28, 2024
da7dcfe
[Security][Validator] Added missing Portuguese(pt) translations
V1nicius00 Jun 29, 2024
63819a2
Fixes #54550 some pt_BR translations
nei Jun 28, 2024
2053bba
Fix MockArraySessionStorage to generate more conform ids
Seldaek Jun 28, 2024
556463d
normalize underscores in snake()
xabbuh Jun 29, 2024
193d889
[String] Revert "Fixed u()->snake(), b()->snake() and s()->snake() me…
nicolas-grekas Jul 1, 2024
8000f43
force HTTP 1.1 for Mailgun API requests
xabbuh Jul 1, 2024
293b409
[Security] Verify Hungarian translation
danielTiringer Jul 3, 2024
feb503a
[Router] Discard in-memory cache of routes when writing the file-base…
mpdude Jul 4, 2024
36e5f62
[Messenger] Passing to `WorkerMessageRetriedEvent` envelope with actu…
daffoxdev Feb 26, 2024
f4dc50d
[PropertyInfo] Handle collection in PhpStan same as PhpDoc
mtarld Jul 1, 2024
0beabf7
test: kebab-case to snake_case
wmouwen Jul 2, 2024
22d19d0
use copy() instead of rename() on Windows
xabbuh Jul 6, 2024
409cd92
Fix typo
OskarStark Jul 8, 2024
99ac356
Support for PHP-CS-Fixer's parallel runner
Wirone Jul 9, 2024
9d4a6fc
use more entropy with uniqid()
xabbuh Jul 9, 2024
7ca0b02
[Cache] Improve `dbindex` DSN parameter parsing
constantable Jul 7, 2024
95d129b
[Contracts][HttpClient] Skip tests when zlib's `ob_gzhandler()` doesn…
alexandre-daubois Jul 9, 2024
4ee03e2
add validation message translations for the WordCount constraint
xabbuh Jul 17, 2024
69d519a
[Validator] Add German translation for `WordCount` constraint
OskarStark Jul 13, 2024
4f32da4
[Validator] Add `WordCount` constraint French translation
alexandre-daubois Jul 12, 2024
781ab46
restrict the maximum length of the X-Debug-Exception header
xabbuh Jul 17, 2024
56c9b4c
[Validator] Add WordCount constraint Lithuanian translation
norkunas Jul 18, 2024
79346ad
[Validator] added Polish translation for units 114 and 115
thunderer Jul 19, 2024
94f916d
add test to prevent future regressions
xabbuh Jul 20, 2024
f03f6fe
fix Finder test using the ftp wrapper by switching the server being used
xabbuh Jul 22, 2024
171b564
[DependencyInjection] Do not try to load default method name on inter…
lyrixx Jul 25, 2024
9d4fe2c
[Validator] Add Catalan and Spanish translation for `WordCount` const…
Jul 24, 2024
bc59b77
[PropertyInfo] Fix nullable value returned from extractFromMutator on…
benjilebon Jul 22, 2024
1dbad9f
[Core] Fix & Enhance security arabic translation.
Jul 16, 2024
1b85140
properly set up constraint options
xabbuh Jul 24, 2024
d62cb63
[ErrorHandler][VarDumper] Remove PHP 8.4 deprecations
alexandre-daubois Jul 22, 2024
d6265bc
[DoctrineBridge] fix messenger bus dispatch inside an active transaction
IndraGunawan Jul 24, 2024
ebdf215
treat uninitialized properties referenced by property paths as null
xabbuh Jul 24, 2024
b3c9857
[HttpFoundation] Add tests for uncovered sections
alexandre-daubois Jul 16, 2024
0800aef
[Translation] Fix CSV escape char in `CsvFileLoader` on PHP >= 7.4
alexandre-daubois Jul 25, 2024
ed6ba61
[Console][PhpUnitBridge][VarDumper] Fix `NO_COLOR` empty value handling
alexandre-daubois Jul 24, 2024
d207398
Update CHANGELOG for 5.4.42
fabpot Jul 26, 2024
f999fec
Update CONTRIBUTORS for 5.4.42
fabpot Jul 26, 2024
e856a64
Update VERSION for 5.4.42
fabpot Jul 26, 2024
b6ab46c
Bump Symfony version to 5.4.43
fabpot Jul 26, 2024
729ac83
[HttpClient] Disable HTTP/2 PUSH by default when using curl
nicolas-grekas Jul 29, 2024
8df2def
Adjust PR template
OskarStark Jul 30, 2024
b4e93fc
[Uid] Ensure UuidV1 is created in lowercase
smnandre Jul 30, 2024
9b43e5d
[String][EnglishInflector] Fix words ending in 'le', e.g., articles
aleho Aug 1, 2024
e0af7c1
allow more unicode characters in URL paths
xabbuh Aug 2, 2024
000f658
[Validator] Add Dutch translation for `WordCount` constraint
pkruithof Jul 31, 2024
2397f6d
do not duplicate directory separators
xabbuh Jul 31, 2024
6e2acde
[Validator] review latvian translations
k0d3r1s Jul 26, 2024
3cdcd89
do not duplicate directory separators
xabbuh Aug 5, 2024
d538a42
[Form] NumberType: Fix parsing of numbers in exponential notation wit…
jbtronics Jul 28, 2024
9ebba8c
[HttpKernel] [WebProfileBundle] Fix Routing panel for URLs with a colon
akeylimepie Aug 3, 2024
c6cd4f1
fix handling empty data in ValueToDuplicatesTransformer
xabbuh Aug 5, 2024
4f4016b
[Security] consistent singular/plural translation in Dutch
RobertMe Aug 6, 2024
0b6423c
reset the validation context after validating nested constraints
xabbuh Aug 5, 2024
84499ac
:bug: throw ParseException on invalid date
homersimpsons Aug 11, 2024
83779d8
fix tests using Twig 3.12
xabbuh Aug 12, 2024
818927e
skip tests requiring the intl extension if it's not installed
xabbuh Aug 9, 2024
91d8a98
[ExpressionLanguage] Improve test coverage
alexandre-daubois Aug 8, 2024
add8ed3
[VarDumper] Fix generator dump format for PHP 8.4
alexandre-daubois Aug 12, 2024
f630b81
[Validator] Add French translation for the `Week` constraint
alexandre-daubois Aug 13, 2024
278396d
reject malformed URLs with a meaningful exception
xabbuh Aug 12, 2024
1f828b8
sync Week constraint messages translations
xabbuh Aug 13, 2024
ec8a924
[Validator] Add `D` regex modifier in relevant validators
alexandre-daubois Aug 13, 2024
908ecc1
add German translations for the Week constraint messages
xabbuh Aug 13, 2024
9038930
[Mime] Add tests on constraints
alexandre-daubois Jul 31, 2024
b244e38
[Mime] Fix tests
nicolas-grekas Aug 13, 2024
f3c1484
[PhpUnitBridge][Console][VarDumper] Fix handling NO_COLOR env var
nicolas-grekas Aug 13, 2024
592eee7
Replace external FTP server by a local docker instance
alexandre-daubois Aug 13, 2024
fbf8383
skip transient Redis integration tests on AppVeyor
xabbuh Aug 13, 2024
326270f
[Console] Fix side-effects from running bash completions
Seldaek Jul 28, 2024
068d3ed
[Validator] added Polish translation for units 116-119
thunderer Aug 14, 2024
f0edf80
Revert stateless check
VincentLanglet Aug 13, 2024
99ba20c
fix compatibility with Twig 3.12 and 4.0
xabbuh Aug 16, 2024
25c26b5
remove custom CSV escape character from tests
xabbuh Aug 16, 2024
5470419
[Translations][Core] Fix security Italian translation.
afunctional Aug 18, 2024
e5ae9a7
[SecurityBundle] Make security schema deterministic
MatTheCat Jun 22, 2024
83b2f43
[DependencyInjection] Fix handling of repeated `#[Autoconfigure]` att…
nicolas-grekas Aug 20, 2024
8606dc2
[DependencyInjection] Add tests for repeating `#[Autoconfigure]` attr…
alexandre-daubois Jun 3, 2024
816f03b
do not overwrite the host to request
xabbuh Aug 16, 2024
3b64781
[DependencyInjection] Fix issue between decorator and service locator…
lyrixx Aug 13, 2024
8392a38
Fix Twig deprecation notice
yceruto Aug 24, 2024
75cd3ef
[DependencyInjection] Fix error message typo in YamlFileLoader
edsrzf Aug 27, 2024
154c250
[Translation] Review Serbian translations
danilovict2 Aug 24, 2024
beb4132
Fix typos
fabpot Aug 27, 2024
726ef2b
fix Twig 3.12 compatibility
xabbuh Aug 28, 2024
6762a04
fix compatibility with Twig 3.12
xabbuh Aug 29, 2024
11b69aa
fix test to be compatible with DBAL 4.2
xabbuh Aug 29, 2024
cc44213
synchronize IBAN formats
xabbuh Aug 30, 2024
62435f8
[PropertyAccess] Fix handling property names with a `.`
alexandre-daubois Aug 28, 2024
b5fc5cb
[VarDumper] Fix tests
nicolas-grekas Aug 30, 2024
da37819
Update CHANGELOG for 5.4.43
fabpot Aug 30, 2024
e50933e
Update CONTRIBUTORS for 5.4.43
fabpot Aug 30, 2024
8545e83
Update VERSION for 5.4.43
fabpot Aug 30, 2024
a57524d
Bump Symfony version to 5.4.44
fabpot Aug 30, 2024
aa978a0
[Security] Improve translation for `zh_TW`
pan93412 Aug 31, 2024
ce1a5af
[Validator] Improve `zh_TW` translation
pan93412 Aug 31, 2024
c246ebb
[Validator] Add Catalan and Spanish translation for `Week` constraint
oriolvinals Sep 5, 2024
d60f95b
[Ldap] Fix extension deprecation
alexandre-daubois Sep 2, 2024
81e48f2
Don't use is_resource() on non-streams
nicolas-grekas Sep 5, 2024
4797a6d
[TwigBundle] Add support for resetting globals between HTTP requests
fabpot Sep 7, 2024
09db899
Mitigate PHPUnit deprecations
alexandre-daubois Sep 6, 2024
b05ff85
[TwigBridge] Avoid calling deprecated mergeGlobals()
derrabus Sep 9, 2024
f78709f
Work around parse_url() bug
nicolas-grekas Sep 10, 2024
ff46ae5
[Ldap] Clean `ldap_connect()` call in `LdapTestCase`
alexandre-daubois Sep 9, 2024
0c82cfb
[String] Update wcswidth data with Unicode 16
fancyweb Sep 11, 2024
2727513
[Filesystem] Add a warning about `chown()` and `chgrp()` on Windows
alexandre-daubois Sep 3, 2024
356e979
use DeprecatedCallableInfo for Twig callables if possible
xabbuh Sep 11, 2024
367b687
[HttpFoundation] Update links for X-Accel-Redirect and fail properly …
nicolas-grekas Sep 5, 2024
70df66d
[Intl] Update ICU data from 74.1 to 75.1
llupa Sep 5, 2024
fa387d1
move setting deprecation session options into a legacy group test
xabbuh Sep 13, 2024
a994690
pass CSV escape characters explicitly
xabbuh Sep 15, 2024
0ed7c93
[FrameworkBundle] Fix service reset between tests
HypeMC Sep 12, 2024
bd273db
throw a meaningful exception when parsing dotenv files with BOM
xabbuh Sep 16, 2024
3289419
[HttpClient] Fix setting CURLMOPT_MAXCONNECTS
HypeMC Sep 16, 2024
30b958e
[Cache] Fix RedisSentinel params types
Sep 13, 2024
608b2d0
[Uid][Serializer][Validator] Mention RFC 9562
fancyweb Sep 11, 2024
667209e
make sure temp files can be cleaned up on Windows
xabbuh Sep 5, 2024
c3ef0fb
[HttpKernel] Skip logging uncaught exceptions in ErrorHandler, assume…
nicolas-grekas Sep 17, 2024
37b922f
parse empty sequence elements as null
xabbuh Sep 16, 2024
099f2b6
[Process] Fix finding executables independently of open_basedir
BlackbitDevs Aug 1, 2023
c8b25d5
[Process] minor fix
nicolas-grekas Sep 17, 2024
0fc0839
fix XSD to allow to configure locks without resources
xabbuh Sep 17, 2024
7ab81db
Don't call the constructor of LogicalOr
derrabus Sep 19, 2024
c78bcd7
Mutate remaining data providers to static ones
alexandre-daubois Sep 20, 2024
7c252cd
[FrameworkBundle] Do not access the container when the kernel is shut…
jderusse Sep 20, 2024
47eac10
Update CHANGELOG for 5.4.44
fabpot Sep 21, 2024
788514d
Update CONTRIBUTORS for 5.4.44
fabpot Sep 21, 2024
0476ebf
Update VERSION for 5.4.44
fabpot Sep 21, 2024
137c209
Bump Symfony version to 5.4.45
fabpot Sep 21, 2024
aaaead6
Tweak error/exception handler registration
nicolas-grekas Sep 24, 2024
ede7a55
Add PR template and auto-close PR on subtree split repositories
GromNaN Sep 23, 2024
42275c1
Update security.bg.xlf
isarastov Sep 26, 2024
83fa701
[Dotenv] Default value can be empty
HypeMC Sep 26, 2024
586dc0d
[TwigBridge] Remove usage of Node() instantiations
fabpot Sep 26, 2024
e509201
Add missing Albanian translations for Security and Validator components
rinimisini Sep 21, 2024
fecdd53
suppress proc_open errors
fritzmg Sep 20, 2024
97731ca
[DependencyInjection] Fix `XmlFileLoader` not respecting when env for…
Sep 17, 2024
c9af1e1
do not use assertCount() with generators
xabbuh Sep 25, 2024
002b9fb
do not base services on PHPUnit mocks
xabbuh Sep 25, 2024
56bc597
do not use TestCase::getName() when possible
xabbuh Sep 30, 2024
4a57c63
[Security] Fix serialized object representation in tests
alexandre-daubois Oct 1, 2024
ae75256
[DoctrineBridge] Fix risky test warnings
alexandre-daubois Sep 30, 2024
39de6d3
[Security][Validator] Check translations for Czech
wallach-game Sep 30, 2024
ab79661
[HttpKernel] Correctly merge `max-age`/`s-maxage` and `Expires` headers
aschempp Sep 24, 2024
298e4c5
ensure session storages are opened in tests before destroying them
xabbuh Oct 4, 2024
545c5dd
[FrameworkBundle] Fix passing request_stack to session.listener
nicolas-grekas Oct 4, 2024
bba8b2c
[ExpressionLanguage] Add missing test case for `Lexer`
alexandre-daubois Oct 4, 2024
9f288b4
[Form] Support intl.use_exceptions/error_level in NumberToLocalizedSt…
bram123 Oct 3, 2024
6d0ecd3
harden test to not depend on the system's configured default timezone
xabbuh Oct 7, 2024
5258df3
Fix newline
OskarStark Oct 8, 2024
b72fd14
minor #58472 CS: clean some whitespaces/indentation (keradus)
nicolas-grekas Oct 8, 2024
3cbf58e
Passing null to parameter #2 ($subject) of type string is deprecated
simoheinonen Oct 8, 2024
4edcadd
fix Contracts directory name in PHPUnit configuration
xabbuh Oct 10, 2024
6f097a0
session names must not be empty
xabbuh Oct 10, 2024
b09c6c1
do not mix named and positional arguments in data provider definitions
xabbuh Oct 11, 2024
73abdc7
simplify test
xabbuh Oct 10, 2024
e436dd6
pass the test name to the WebTestCase constructor
xabbuh Oct 10, 2024
307642c
synchronize line numbers in deprecations baseline
xabbuh Oct 17, 2024
af1639a
drop existing schema if tests create it explicitly
xabbuh Oct 16, 2024
02b865c
fix: DoctrineTokenProvider not oracle compatible
jjjb03 Oct 10, 2024
ede8621
Add integration test for RememberMe with pg connection
GromNaN Oct 10, 2024
d639657
Update deprecations baseline
alexandre-daubois Oct 18, 2024
207aa0e
Fix #53037
hosni Oct 6, 2024
1ce3338
Symfony 5.4 LTS will get security fixes until Feb 2029 thanks to Ibex…
nicolas-grekas Oct 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
/src/Symfony/Component/Runtime export-ignore
/src/Symfony/Component/Translation/Bridge export-ignore
/src/Symfony/Component/Intl/Resources/data/*/* linguist-generated=true
/src/Symfony/**/.github/workflows/close-pull-request.yml linguist-generated=true
/src/Symfony/**/.github/PULL_REQUEST_TEMPLATE.md linguist-generated=true
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
| Q | A
| ------------- | ---
| Branch? | 7.1 for features / 5.4, 6.4, or 7.0 for bug fixes <!-- see below -->
| Branch? | 7.2 for features / 5.4, 6.4, and 7.1 for bug fixes <!-- see below -->
| Bug fix? | yes/no
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
Expand Down
60 changes: 30 additions & 30 deletions .github/deprecations-baseline.json

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions .github/sync-packages.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

if ('cli' !== PHP_SAPI) {
echo "This script can only be run from the command line.\n";
exit(1);
}

$mainRepo = 'https://github.com/symfony/symfony';
exec('find src -name composer.json', $packages);

foreach ($packages as $package) {
$package = dirname($package);
$c = file_get_contents($package.'/.gitattributes');
$c = preg_replace('{^/\.git.*+\n}m', '', $c);
$c .= "/.git* export-ignore\n";
file_put_contents($package.'/.gitattributes', $c);

@mkdir($package.'/.github');
file_put_contents($package.'/.github/PULL_REQUEST_TEMPLATE.md', <<<EOTXT
Please do not submit any Pull Requests here. They will be closed.
---

Please submit your PR here instead:
{$mainRepo}

This repository is what we call a "subtree split": a read-only subset of that main repository.
We're looking forward to your PR there!

EOTXT
);

@mkdir($package.'/.github/workflows');
file_put_contents($package.'/.github/workflows/close-pull-request.yml', <<<EOTXT
name: Close Pull Request

on:
pull_request_target:
types: [opened]

jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
with:
comment: |
Thanks for your Pull Request! We love contributions.

However, you should instead open your PR on the main repository:
{$mainRepo}

This repository is what we call a "subtree split": a read-only subset of that main repository.
We're looking forward to your PR there!

EOTXT
);
}
73 changes: 54 additions & 19 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ jobs:
LDAP_PORT_NUMBER: 3389
LDAP_USERS: a
LDAP_PASSWORDS: a
ftp:
image: onekilo79/ftpd_test
ports:
- 21:21
- 30000-30009:30000-30009
volumes:
- ./:/hostmount
redis:
image: redis:6.2.8
ports:
Expand Down Expand Up @@ -99,24 +106,46 @@ jobs:
ports:
- 4566:4566
zookeeper:
image: wurstmeister/zookeeper:3.4.6
image: zookeeper
kafka:
image: wurstmeister/kafka:2.12-2.0.1
image: bitnami/kafka:3.7
ports:
- 9092:9092
env:
KAFKA_AUTO_CREATE_TOPICS_ENABLE: false
KAFKA_CREATE_TOPICS: 'test-topic:1:1:compact'
KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_ADVERTISED_PORT: 9092
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: false
ALLOW_PLAINTEXT_LISTENER: 'yes'
KAFKA_CFG_ADVERTISED_LISTENERS: 'PLAINTEXT://127.0.0.1:9092'
KAFKA_CFG_LISTENERS: 'PLAINTEXT://:9092'
KAFKA_CFG_ZOOKEEPER_CONNECT: 'zookeeper:2181'
options: --name=kafka
frankenphp:
image: dunglas/frankenphp:1.1.0
ports:
- 80:80
- 8681:81
- 8682:82
- 8683:83
- 8684:84
volumes:
- ${{ github.workspace }}:/symfony
env:
SERVER_NAME: 'http://localhost http://localhost:81 http://localhost:82 http://localhost:83 http://localhost:84'
CADDY_SERVER_EXTRA_DIRECTIVES: |
route /http-client* {
root * /symfony/src/Symfony/Component/HttpClient/Tests/Fixtures/response-functional/
php_server
}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Init Kafka topics
run: |
docker exec kafka /opt/bitnami/kafka/bin/kafka-topics.sh --create --topic test-topic --bootstrap-server kafka:9092

- name: Install system dependencies
run: |
echo "::group::apt-get update"
Expand All @@ -139,6 +168,11 @@ jobs:
curl -s -u Administrator:111111 -X POST http://localhost:8091/pools/default/buckets -d 'ramQuotaMB=100&bucketType=ephemeral&name=cache'
curl -s -u Administrator:111111 -X POST http://localhost:8091/pools/default -d 'memoryQuota=256'

- name: Create FTP fixtures
run: |
mkdir -p ./ftpusers/test/pub
touch ./ftpusers/test/pub/example ./ftpusers/test/readme.txt

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down Expand Up @@ -176,9 +210,22 @@ jobs:
./phpunit install
echo "::endgroup::"

- name: Check for changes in translation files
id: changed-translation-files
run: |
echo 'changed='$((git diff --quiet HEAD~1 HEAD -- 'src/**/Resources/translations/*.xlf' || (echo 'true' && exit 1)) && echo 'false') >> $GITHUB_OUTPUT

- name: Check Translation Status
if: steps.changed-translation-files.outputs.changed == 'true'
run: |
php src/Symfony/Component/Translation/Resources/bin/translation-status.php -v
php .github/sync-translations.php
git diff --exit-code src/ || (echo '::error::Run "php .github/sync-translations.php" to fix XLIFF files.' && exit 1)

- name: Run tests
run: ./phpunit --group integration -v
env:
INTEGRATION_FTP_URL: 'ftp://test:test@localhost'
REDIS_HOST: 'localhost:16379'
REDIS_AUTHENTICATED_HOST: 'localhost:16380'
REDIS_CLUSTER_HOSTS: 'localhost:7000 localhost:7001 localhost:7002 localhost:7003 localhost:7004 localhost:7005'
Expand All @@ -199,15 +246,3 @@ jobs:
# docker run --rm -e COMPOSER_ROOT_VERSION -v $(pwd):/app -v $(which composer):/usr/local/bin/composer -v $(which vulcain):/usr/local/bin/vulcain -w /app php:8.0-alpine ./phpunit src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php --filter testHttp2Push
# sudo rm -rf .phpunit
# [ -d .phpunit.bak ] && mv .phpunit.bak .phpunit

- name: Check for changes in translation files
id: changed-translation-files
run: |
echo 'changed='$((git diff --quiet HEAD~1 HEAD -- 'src/**/Resources/translations/*.xlf' || (echo 'true' && exit 1)) && echo 'false') >> $GITHUB_OUTPUT

- name: Check Translation Status
if: steps.changed-translation-files.outputs.changed == 'true'
run: |
php src/Symfony/Component/Translation/Resources/bin/translation-status.php -v
php .github/sync-translations.php
git diff --exit-code src/ || (echo 'Run "php .github/sync-translations.php" to fix XLIFF files.' && exit 1)
3 changes: 2 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
24 changes: 13 additions & 11 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@
EOF;

return (new PhpCsFixer\Config())
// @see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7777
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setRules([
'@PHP71Migration' => true,
'@PHPUnit75Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'protected_to_private' => false,
'native_constant_invocation' => ['strict' => false],
'nullable_type_declaration_for_default_null_value' => true,
'header_comment' => ['header' => $fileHeaderComment],
// TODO: Remove once the "compiler_optimized" set includes "sprintf"
'native_function_invocation' => ['include' => ['@compiler_optimized', 'sprintf'], 'scope' => 'namespaced', 'strict' => true],
'nullable_type_declaration' => true,
'nullable_type_declaration_for_default_null_value' => true,
])
->setRiskyAllowed(true)
->setFinder(
Expand All @@ -40,29 +44,27 @@
->append([__FILE__])
->notPath('#/Fixtures/#')
->exclude([
// directories containing files with content that is autogenerated by `var_export`, which breaks CS in output code
// fixture templates
'Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom',
// resource templates
'Symfony/Bundle/FrameworkBundle/Resources/views/Form',
// explicit trigger_error tests
'Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/',
'Symfony/Component/Intl/Resources/data/',
])
// explicit tests for ommited @param type, against `no_superfluous_phpdoc_tags`
->notPath('Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php')
->notPath('Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php')
// Support for older PHPunit version
->notPath('Symfony/Bridge/PhpUnit/SymfonyTestsListener.php')
->notPath('#Symfony/Bridge/PhpUnit/.*Mock\.php#')
->notPath('#Symfony/Bridge/PhpUnit/.*Legacy#')
// file content autogenerated by `var_export`
->notPath('Symfony/Component/Translation/Tests/fixtures/resources.php')
// file content autogenerated by `VarExporter::export`
->notPath('Symfony/Component/Serializer/Tests/Fixtures/serializer.class.metadata.php')
// test template
->notPath('Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php')
// explicit trigger_error tests
->notPath('Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php')
// stop removing spaces on the end of the line in strings
->notPath('Symfony/Component/Messenger/Tests/Command/FailedMessagesShowCommandTest.php')
// svg
->notPath('Symfony/Component/ErrorHandler/Resources/assets/images/symfony-ghost.svg.php')
// HTML templates
->notPath('#Symfony/.*\.html\.php#')
)
->setCacheFile('.php-cs-fixer.cache')
;
Loading