Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[FlashBag] Add peekMultiple method #1

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

Open
wants to merge 599 commits into
base: 6.3
Choose a base branch
Loading
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
599 commits
Select commit Hold shift + click to select a range
96acbfd
Prepare release 2.3.0
derrabus Jul 25, 2023
3c62b81
minor #120 Prepare release 2.3.0 (derrabus)
derrabus Jul 25, 2023
6353f5e
Add types to private and internal properties
nicolas-grekas Jul 21, 2023
0bac246
minor #51068 Add types to private and internal properties (nicolas-gr…
nicolas-grekas Jul 25, 2023
42d9d7c
fix typo
nicolas-grekas Jul 25, 2023
ef03b6d
Don't rely on Request::getPayload() to populate the parsed body
nicolas-grekas Jul 26, 2023
dd3c406
Fix property must not be accessed before initialization on SymfonyRun…
l-vo Jul 26, 2023
ad72245
minor #51111 [Runtime] Fix property must not be accessed before initi…
nicolas-grekas Jul 26, 2023
6410dda
bug #122 Don't rely on Request::getPayload() to populate the parsed b…
derrabus Jul 26, 2023
45d0349
Fix CS
derrabus Jul 26, 2023
581ca60
Prepare release 2.3.1
derrabus Jul 26, 2023
9e78833
Remove \ReflectionProperty::setAccessible(true) calls
fancyweb Jul 26, 2023
5662858
update the Brevo SMTP host
xabbuh Jul 26, 2023
6000311
fix deprecation versions
xabbuh Jul 26, 2023
c612bfc
minor #51120 [Mailer] fix deprecation versions (xabbuh)
nicolas-grekas Jul 26, 2023
649c8a1
bug #51119 [Mailer] update the Brevo SMTP host (xabbuh)
nicolas-grekas Jul 26, 2023
56f01c4
minor #51117 Remove \ReflectionProperty::setAccessible(true) calls (f…
nicolas-grekas Jul 26, 2023
73e65dc
minor #51096 Use more "First class callable syntax" + Normalize set_e…
nicolas-grekas Jul 26, 2023
fd641de
Merge branch '6.3' into 6.4
nicolas-grekas Jul 27, 2023
7efa075
Merge branch '6.3' into 6.4
nicolas-grekas Jul 27, 2023
3df6471
More short closures + isset instead of null checks + etc.
nicolas-grekas Jul 26, 2023
1935af6
minor #51121 More short closures + isset instead of null checks + etc…
nicolas-grekas Jul 27, 2023
2a6e93e
[Serializer] Fix tests for extended Context attributes
derrabus Jul 27, 2023
25a8615
Ensure all properties have a type
nicolas-grekas Jul 27, 2023
fa38296
minor #51129 Ensure all properties have a type (nicolas-grekas)
nicolas-grekas Jul 27, 2023
93be0cb
[Cache] Fix tests
nicolas-grekas Jul 27, 2023
deb160a
minor #51126 [Serializer] Fix tests for extended Context attributes (…
nicolas-grekas Jul 27, 2023
54468db
[VarDumper] Dump uninitialized properties
nicolas-grekas Jul 27, 2023
510e51f
Merge branch '6.3' into 6.4
nicolas-grekas Jul 27, 2023
0c0323a
Add 'src/Symfony/Bridge/PsrHttpMessage/' from commit '581ca6067eb6264…
derrabus Jul 27, 2023
266c09f
[PsrHttpMessageBridge] Import the bridge into the monorepo
derrabus Jul 25, 2023
e40dd66
[PsrHttpMessageBridge] Patch return types and fix CS
derrabus Jul 25, 2023
6737e46
[FrameworkBundle] Simplify marking store configuration
nicolas-grekas Jul 28, 2023
3ca7eb3
[Scheduler] Add `AbstractTriggerDecorator`
kbond Jul 28, 2023
46344de
[SecurityBundle] Allow an array of `pattern` in firewall configuration
lyrixx Jul 27, 2023
60e7a5d
feature #51128 [SecurityBundle] Allow an array of `pattern` in firewa…
chalasr Jul 29, 2023
3666359
feature #51148 [FrameworkBundle] Simplify marking store configuration…
lyrixx Jul 29, 2023
0536555
Add generics to the progress bar iteration methods
jdreesen Jul 27, 2023
767274c
minor #51137 Add generics to the progress bar iteration methods (jdre…
lyrixx Jul 29, 2023
abde61a
[Messenger][Process] add `RunProcessMessage` and `RunProcessMessageHa…
kbond Mar 25, 2023
70768ff
feature #49813 [Messenger][Process] add `RunProcessMessage` and `RunP…
fabpot Jul 29, 2023
43a7704
Use Stringable interface as much as possible
VincentLanglet Jul 28, 2023
6c817f2
minor #51150 Use Stringable interface as much as possible (VincentLan…
fabpot Jul 30, 2023
f0644d9
[HttpClient][Messenger] add `PingWebhookMessage` and `PingWebhookMess…
kbond Mar 25, 2023
bfb5963
feature #49815 [HttpClient][Messenger] add `PingWebhookMessage` and `…
fabpot Jul 30, 2023
0b44a27
feature #51100 [PsrHttpMessageBridge] Import the bridge into the mono…
fabpot Jul 30, 2023
dbed6eb
[PsrHttpMessageBridge] Remove ArgumentValueResolverInterface from Psr…
derrabus Jul 30, 2023
a6acaf0
feature #51167 [PsrHttpMessageBridge] Remove ArgumentValueResolverInt…
derrabus Jul 30, 2023
ed4c092
[PsrHttpMessageBridge] Fix composer.json
derrabus Jul 30, 2023
435f194
[PsrHttpMessageBridge] Add native types where possible
derrabus Jul 30, 2023
7b81299
minor #51169 [PsrHttpMessageBridge] Add native types where possible (…
fabpot Jul 30, 2023
bd99226
[Mailer] Add Scaleway bridge
MrMicky-FR Jul 18, 2023
767a7ef
feature #51014 [Mailer] Add Scaleway bridge (MrMicky-FR)
fabpot Jul 30, 2023
d87931f
Fix CS
fabpot Jul 30, 2023
2a07431
[Templating] deprecate the component
kbond Jul 28, 2023
c2ee867
feature #51144 [Templating] deprecate the component (kbond)
fabpot Jul 30, 2023
a6178e3
feature #51130 [VarDumper] Dump uninitialized properties (nicolas-gre…
fabpot Jul 30, 2023
f404704
feature #50907 [Validator] Update `Type` constraint, add `number`, `f…
fabpot Jul 30, 2023
95091a1
[Notifier] [SpotHit] Support `smslong` and `smslongnbr` API parameters
camillebaronnet Apr 24, 2023
888054b
feature #50136 [Notifier] [SpotHit] Support `smslong` and `smslongnbr…
fabpot Jul 30, 2023
48b0d9d
feature #50911 [HttpKernel] Enhance exception if possible (lyrixx)
fabpot Jul 30, 2023
55e1176
Allow accessing all options on a handler descriptor
ruudk Jul 14, 2023
3b20051
feature #50978 [Messenger] Allow accessing all options on a handler d…
fabpot Jul 30, 2023
dd5b0b7
[Console][Messenger] add `RunCommandMessage` and `RunCommandMessageHa…
kbond Mar 25, 2023
fe30946
feature #49814 [Console][Messenger] add `RunCommandMessage` and `RunC…
fabpot Jul 30, 2023
cf173a3
More short closures
nicolas-grekas Jul 28, 2023
847fa0f
Merge branch '6.3' into 6.4
nicolas-grekas Jul 31, 2023
c809c71
Fix symfony/deprecation-contracts require
fancyweb Jul 28, 2023
0c3be5b
minor #51176 Fix symfony/deprecation-contracts require (fancyweb)
nicolas-grekas Jul 31, 2023
f609b0c
Merge branch '6.3' into 6.4
derrabus Jul 31, 2023
7a58e3c
[Templating] Fix CI
nicolas-grekas Jul 31, 2023
10487c7
minor #51146 More short closures (nicolas-grekas)
nicolas-grekas Jul 31, 2023
92d379d
minor #51179 [Templating] Fix CI (nicolas-grekas)
nicolas-grekas Jul 31, 2023
72bc29a
Merge branch '6.3' into 6.4
fabpot Jul 31, 2023
5635e86
[PsrHttpMessageBridge] Streamline README.md with other components
derrabus Jul 31, 2023
a830ccc
minor #51188 [PsrHttpMessageBridge] Streamline README.md with other c…
fabpot Jul 31, 2023
f2e0d3e
[VarExporter] Remove obsolete PHP version check
derrabus Jul 31, 2023
67b3b0c
minor #51189 [VarExporter] Remove obsolete PHP version check (derrabus)
derrabus Jul 31, 2023
8c48869
Merge branch '6.3' into 6.4
derrabus Jul 31, 2023
3f1f89f
[Mailer] Precise AbstractApiTransport::getRecipients signature
VincentLanglet Jul 28, 2023
07eea6d
minor #51142 [Mailer] Precise AbstractApiTransport::getRecipients sig…
fabpot Jul 31, 2023
62904a6
feature #51152 [Scheduler] Add `AbstractTriggerDecorator` (kbond)
fabpot Jul 31, 2023
5148155
[BrowserKit] add serverParameters to click and clickLink method
syl20b Dec 31, 2022
e3cb2e6
Prepare to stop overriding getRecipients
VincentLanglet Jul 31, 2023
3c20dc1
do not declare the PSR-7 bridge to be replaced by symfony/symfony
xabbuh Jul 31, 2023
139419d
minor #51194 do not declare the PSR-7 bridge to be replaced by symfon…
nicolas-grekas Jul 31, 2023
47b4992
[PsrHttpMessageBridge] Support `php-http/discovery` for auto-detectin…
derrabus Jul 31, 2023
92650d6
[Notifier] support local development for sns by adding sslmode option
Ferror Jul 4, 2023
be8897b
feature #50879 [Notifier] support local development for sns by adding…
fabpot Aug 1, 2023
7c075ed
Make code consistent
fabpot Aug 1, 2023
46386c2
minor #51193 Avoid inconsistent override of getRecipients (VincentLan…
fabpot Aug 1, 2023
972acf2
[Intl] Add support for ISO-3166-1 numeric codes
benr77 Jul 22, 2023
ef2c30c
[Serializer] Groups annotation/attribute on class
Brajk19 Mar 3, 2023
15e082d
feature #49594 [Serializer] Groups annotation/attribute on class (Bra…
fabpot Aug 1, 2023
11b538c
feature #48841 [BrowserKit] Add argument $serverParameters to click()…
fabpot Aug 1, 2023
9d47ba3
feature #51197 [PsrHttpMessageBridge] Support `php-http/discovery` fo…
fabpot Aug 1, 2023
8efa5fc
[Scheduler] make `ScheduledStamp` "send-able"
kbond Jul 24, 2023
d660091
feature #51092 [Scheduler] make `ScheduledStamp` "send-able" (kbond)
fabpot Aug 1, 2023
5174250
[Workflow] Add support for storing the marking in a property
lyrixx Jul 25, 2023
185941e
feature #50974 [Workflow] Add support for storing the marking in a pr…
fabpot Aug 1, 2023
b8f35ba
[Translation] Phrase translation provider
wickedOne Feb 2, 2023
489c887
feature #49231 [Translation] Phrase translation provider (wickedOne)
fabpot Aug 1, 2023
c61a43d
[Serializer] Add support for seld/jsonlint in order to enhance error …
ostrolucky Jul 30, 2023
3b34568
feature #51172 [Serializer] Add support for seld/jsonlint (ostrolucky)
fabpot Aug 1, 2023
4d118c0
[HttpKernel] RequestPayloadValueResolver Add support for custom http …
Jun 25, 2023
3b6d372
feature #50767 [HttpKernel] RequestPayloadValueResolver Add support f…
nicolas-grekas Aug 1, 2023
fe6b44d
[Uid] Add more PHP doc to "export" functions
lyrixx Aug 1, 2023
8ffd27f
[HttpKernel] Add `reset()` implementation in DataCollector
lyrixx Aug 1, 2023
f309b1d
minor #51202 [Uid] Add more PHP doc to "export" functions (lyrixx)
wouterj Aug 1, 2023
ae19099
minor #51203 [HttpKernel] Add `reset()` implementation in DataCollect…
fabpot Aug 1, 2023
54bfd57
[Uid] Fix example
nicolas-grekas Aug 1, 2023
1ac8a2b
[FrameworkBundle][Serializer] Add TranslatableNormalizer
Jean-Beru May 2, 2023
f40687e
feature #50212 [FrameworkBundle][Serializer] Add TranslatableNormaliz…
fabpot Aug 1, 2023
ce4e4b6
[Form] Removing self-closing slash from `<input>`
ThomasLandauer Sep 28, 2022
5fcaa74
feature #47715 [Form] Removing self-closing slash from `<input>` (Tho…
fabpot Aug 1, 2023
df292cb
[Workflow] Add a profiler
lyrixx Aug 1, 2023
5bcdbe5
Add some PHPDoc
HypeMC Jul 31, 2023
5a5d2d2
[Mime] Update mimetypes
fabpot Jul 31, 2023
5af7d53
[Process] Support finding executables independently of open_basedir
BlackbitDevs Aug 1, 2023
a3414e4
minor #51173 Add some PHPDoc (HypeMC)
nicolas-grekas Aug 1, 2023
1300cc2
feature #51204 [Workflow] Add a profiler (lyrixx)
fabpot Aug 1, 2023
37617a8
[Validator] Add ability to validate time without seconds
xepozz Aug 1, 2023
268a359
feature #48907 [Validator] Validate time without seconds (xepozz)
nicolas-grekas Aug 1, 2023
e66a68c
feature #47422 [Process] Support using `Process::findExecutable()` in…
fabpot Aug 1, 2023
3a2b8cb
feature #51191 [Mime] Update mimetypes (fabpot)
fabpot Aug 1, 2023
272c13e
[HttpKernel] Strip exception file paths from log messages
ostrolucky Jul 2, 2022
7597687
feature #51073 [Intl] Add support for ISO 3166-1 numeric codes (benr77)
fabpot Aug 1, 2023
db1d6eb
minor #46828 [HttpKernel] Strip exception file paths from log message…
fabpot Aug 1, 2023
31c10bf
Merge branch '6.3' into 6.4
nicolas-grekas Aug 1, 2023
96fd48a
[WebProfilerBundle] Fixed CS in Resources/views/Collector/cache.html.…
lyrixx Aug 1, 2023
b2a17ea
minor #51213 [WebProfilerBundle] Fixed CS in Resources/views/Collecto…
nicolas-grekas Aug 1, 2023
ed62914
[Workflow] Support multiline descriptions in PlantUML
valtzu Aug 1, 2023
3303fa2
feature #51218 [Workflow] Support multiline descriptions in PlantUML …
fabpot Aug 2, 2023
ac99721
Merge branch '6.3' into 6.4
OskarStark Aug 2, 2023
17f606b
[Notifier] Document Amazon Notifier SSLMODE option
alamirault Aug 1, 2023
72c80dd
minor #51217 [Notifier] Document Amazon Notifier SSLMODE option (alam…
nicolas-grekas Aug 2, 2023
b595e90
[FrameworkBundle] Enable `json_decode_detailed_errors` in dev by default
ostrolucky Aug 1, 2023
f77ca5c
[HttpKernel] fix test
nicolas-grekas Aug 2, 2023
ee6a55d
Merge branch '6.3' into 6.4
nicolas-grekas Aug 2, 2023
40bfbbd
[Form][DX] Use logical ordering for type and extension methods
HeahDude Jul 20, 2023
7a8959b
minor #51045 [Form] Use logical ordering for type and extension metho…
nicolas-grekas Aug 2, 2023
dcc3ce4
[Workflow] Add some PHP attributes to register listeners and guards
lyrixx Aug 1, 2023
f38eaad
[Scheduler] add `ScheduledStamp` to `RedispatchMessage`
kbond Aug 2, 2023
6a36e02
feature #51230 [Scheduler] add `ScheduledStamp` to `RedispatchMessage…
fabpot Aug 2, 2023
d5287d2
[FrameworkBundle] Remove redundant `interface_exists()` check
HypeMC Aug 2, 2023
3db10d5
minor #51234 [FrameworkBundle] Remove redundant `interface_exists()` …
fabpot Aug 3, 2023
c864846
feature #51004 [HttpKernel] Support backed enums in `#[MapQueryParame…
fabpot Aug 3, 2023
08b93ad
feature #51215 [FrameworkBundle] Enable `json_decode_detailed_errors`…
fabpot Aug 3, 2023
f682a29
Introducing a new PhpSubprocess handler
Toflar Dec 5, 2022
f5a9d4d
Merge branch '6.3' into 6.4
derrabus Aug 3, 2023
01c7b8a
Remove calls to TokenInterface::isAuthenticated()
derrabus Aug 3, 2023
fc3a0ca
[FrameworkBundle] Remove obsolete feature detection from cache warmers
derrabus Aug 3, 2023
52de28d
add additional type information to TimeBaseUuidFactory constructor
xabbuh Aug 3, 2023
2f85c15
minor #51242 [Uid] add additional type information to TimeBaseUuidFac…
nicolas-grekas Aug 3, 2023
ba46f32
Add generic to UserProviderInterface
VincentLanglet May 23, 2023
cf3f52a
minor #50399 [Security] Add generic to UserProviderInterface (Vincent…
nicolas-grekas Aug 3, 2023
3c9bf28
minor #51241 [FrameworkBundle] Remove obsolete feature detection from…
nicolas-grekas Aug 3, 2023
0ba946a
feature #48485 [Process] Introducing a new `PhpSubprocess` handler (T…
nicolas-grekas Aug 3, 2023
5aa5764
[Scheduler] Add some docs to explain the behavior
fabpot Aug 3, 2023
623e921
feature #51210 [Workflow] Add PHP attributes to register listeners an…
nicolas-grekas Aug 3, 2023
df83bf4
[Scheduler] Add --date to schedule:debug
fabpot Aug 3, 2023
fa3d5d4
minor #51243 [Scheduler] Add some docs to explain the behavior (fabpot)
fabpot Aug 3, 2023
f956606
feature #51244 [Scheduler] Add --date to schedule:debug (fabpot)
fabpot Aug 3, 2023
9d2ca60
[Scheduler] Only use toString if defined for message
fabpot Aug 3, 2023
20cefc8
feature #51245 [Scheduler] Only use toString if defined for message (…
fabpot Aug 3, 2023
530406a
[AssetMapper] Mark component as non experimental
fabpot Aug 3, 2023
cdf37b3
[Scheduler] Mark component as non experimental
fabpot Aug 3, 2023
ca52396
[Process] Fix return type
nicolas-grekas Aug 3, 2023
feabb1e
[Webhook] Mark component as non experimental
fabpot Aug 3, 2023
472f416
[RemoteEvent] Mark component as non experimental
fabpot Aug 3, 2023
6522566
feature #51246 [Scheduler] Mark component as non experimental (fabpot)
fabpot Aug 3, 2023
7e4793b
feature #51247 [AssetMapper] Mark component as non experimental (fabpot)
fabpot Aug 3, 2023
5da7dbf
feature #51248 [Webhook] Mark component as non experimental (fabpot)
fabpot Aug 3, 2023
18b9cad
feature #51249 [RemoteEvent] Mark component as non experimental (fabpot)
fabpot Aug 3, 2023
8e50e09
Remove remaining experimental classes
fabpot Aug 3, 2023
74f7d6d
feature #51250 Remove remaining experimental classes (fabpot)
fabpot Aug 3, 2023
0929094
fix tests
xabbuh Aug 3, 2023
36ec5e2
minor #51257 [Scheduler]  fix tests (xabbuh)
xabbuh Aug 3, 2023
c9fca51
fix minimum required HttpKernel component version
xabbuh Aug 3, 2023
dc94413
minor #51256 [FrameworkBundle] fix minimum required HttpKernel compon…
xabbuh Aug 3, 2023
bb7a7dd
fix typo
xabbuh Aug 3, 2023
7b0ed35
[Webhook][RemoteEvent] Add Mailjet support.
blaugueux Aug 3, 2023
0ce5112
feature #50502 [RemoteEvent][Webhook] Add Mailjet support (blaugueux)
fabpot Aug 4, 2023
8fc472f
[RemoteEvent][Webhook] Add Brevo support
blaugueux Aug 4, 2023
ba04aaf
[Scheduler] Display friendly dates in debug:schedule
fabpot Aug 4, 2023
72e374d
[HttpFoundation] Use Symfony exception for request unexpected values
VincentLanglet Aug 3, 2023
608c3ed
minor #51252 [HttpFoundation] Use Symfony exception for request unexp…
nicolas-grekas Aug 4, 2023
f78bbe0
minor #51265 [Scheduler] Display friendly dates in debug:schedule (fa…
fabpot Aug 4, 2023
49a1253
feature #51264 [RemoteEvent][Webhook] Add Brevo support (blaugueux)
fabpot Aug 4, 2023
532dcda
minor #51240 [MonologBridge][SecurityBundle] Remove calls to `TokenIn…
nicolas-grekas Aug 4, 2023
a20ea63
[Cache] minor cleanup
nicolas-grekas Aug 4, 2023
a3506c5
minor #51269 [Cache] minor cleanup (nicolas-grekas)
fabpot Aug 4, 2023
a120c04
[Scheduler] Add --all to debug:schedule
fabpot Aug 4, 2023
664af6d
[FrameworkBundle] Support APP_BUILD_DIR
ro0NL Jul 12, 2023
0a9ef56
feature #50951 [FrameworkBundle] Support APP_BUILD_DIR (ro0NL)
fabpot Aug 4, 2023
26a3105
[SecurityBundle] Add `$badges` argument to `Security::login`
MatTheCat Jul 11, 2023
ec7d86a
feature #50939 [SecurityBundle] Add `$badges` argument to `Security::…
fabpot Aug 4, 2023
cdf6ea8
fix tests
xabbuh Aug 4, 2023
bee1b9d
feature #51263 [Scheduler] Add --all to debug:schedule (fabpot)
fabpot Aug 4, 2023
79ca96f
minor #51271 [Scheduler] fix tests (xabbuh)
fabpot Aug 4, 2023
98ebda2
[DomCrawler][FrameworkBundle] Add `assertAnySelectorText*`
SVillette May 12, 2023
7ebccf7
feature #50306 [DomCrawler][FrameworkBundle] Add `assertAnySelectorTe…
fabpot Aug 4, 2023
611c622
fix tests
xabbuh Aug 4, 2023
537925a
minor #51272 [HttpFoundation] fix tests (xabbuh)
nicolas-grekas Aug 4, 2023
0567ed8
fix tests
xabbuh Aug 4, 2023
00703b0
minor #51274 [Scheduler] fix tests (xabbuh)
xabbuh Aug 4, 2023
4606073
Merge branch '6.3' into 6.4
nicolas-grekas Aug 5, 2023
d473b90
[Security] Do not make PasswordUpgraderInterface a generic
wouterj Aug 5, 2023
34f46c6
bug #51283 [Security] Do not make PasswordUpgraderInterface a generic…
fabpot Aug 5, 2023
ae63c18
Improve 6.4 UPGRADE guide
wouterj Aug 5, 2023
8a6a410
[HttpKernel][MonologBridge][FrameworkBundle] Revisit wiring of debug …
nicolas-grekas Aug 5, 2023
6d7ca72
feature #51284 [FrameworkBundle][HttpKernel][MonologBridge] Revisit w…
nicolas-grekas Aug 5, 2023
cd53a82
minor #51286 Improve 6.4 UPGRADE guide (wouterj)
nicolas-grekas Aug 5, 2023
4ca4417
[Process] fix tests
nicolas-grekas Aug 7, 2023
6682baf
Merge branch '6.3' into 6.4
nicolas-grekas Aug 7, 2023
b4d215c
minor #51297 [Process] fix tests (nicolas-grekas)
nicolas-grekas Aug 7, 2023
9edd7b9
[PsrHttpMessageBridge] Fix test case
nicolas-grekas Aug 7, 2023
67ed8ff
[PsrHttpMessageBridge] Don't skip JSON tests
derrabus Aug 7, 2023
ca8d441
Remove unneeded calls to setPublic(false)
nicolas-grekas Aug 8, 2023
b785a17
minor #51300 [PsrHttpMessageBridge] Don't skip JSON tests (derrabus)
derrabus Aug 8, 2023
1298207
minor #51299 [PsrHttpMessageBridge] Fix test case (nicolas-grekas)
derrabus Aug 8, 2023
85366b4
Merge branch '6.3' into 6.4
derrabus Aug 8, 2023
dd85a16
Update KernelTestCase.php
IssamRaouf Aug 7, 2023
7513b48
minor #51304 [FrameworkBundle] [Test] Replace Conditional statements …
nicolas-grekas Aug 8, 2023
e839ca5
cs fix
nicolas-grekas Aug 8, 2023
16a6f38
[OptionsResolver] Improve invalid type message on nested option
flohw Aug 4, 2023
a8da87e
minor #51270 [OptionsResolver] Improve invalid type message on nested…
nicolas-grekas Aug 8, 2023
e206417
Merge branch '6.3' into 6.4
nicolas-grekas Aug 8, 2023
fe26738
Merge branch '6.3' into 6.4
nicolas-grekas Aug 8, 2023
0d4e2b8
Bump doctrine/persistence to ^3.1
nicolas-grekas Aug 8, 2023
f0959b4
Merge branch '6.3' into 6.4
fabpot Aug 8, 2023
0cdf2b8
[Workflow] Use TRANSITION_TYPE_WORKFLOW for rendering workflow in pro…
lyrixx Aug 1, 2023
c005258
fix version in changelog file
xabbuh Aug 10, 2023
f92b0fc
[SecurityBundle] Deprecate the `require_previous_session` config option
alamirault Aug 9, 2023
922e98e
feature #51332 [SecurityBundle] Deprecate the `require_previous_sessi…
fabpot Aug 11, 2023
15d7b1b
minor #51308 Remove unneeded calls to setPublic(false) (nicolas-grekas)
fabpot Aug 11, 2023
d6d233b
bug #51214 [Workflow] Use TRANSITION_TYPE_WORKFLOW for rendering work…
fabpot Aug 11, 2023
066d0f8
[Notifier] Add GoIP bridge
ahmedghanem00 Aug 10, 2023
bacbe8d
feature #51349 [Notifier] Add GoIP bridge (ahmedghanem00)
fabpot Aug 12, 2023
490adc1
[Notifier][Webhook] Add Vonage support
smnandre Aug 8, 2023
6141656
feature #51315 [Notifier][Webhook] Add Vonage support (smnandre)
fabpot Aug 12, 2023
c2feb5e
rename GoIP notifier bridge to GopIp
xabbuh Aug 13, 2023
16a4681
minor #51376 [Notifier] rename GoIP notifier bridge to GoIp (xabbuh)
fabpot Aug 14, 2023
0942d6e
fix directory casing
xabbuh Aug 14, 2023
d5271a3
Merge branch '6.3' into 6.4
nicolas-grekas Aug 14, 2023
de27fbf
minor #51377 [Notifier] fix directory casing (xabbuh)
nicolas-grekas Aug 14, 2023
eaa33cc
More go-ip fixes
nicolas-grekas Aug 14, 2023
cf3879c
replace annotations with attributes
xabbuh Aug 14, 2023
a70e5e1
minor #51385 [Validator]  replace annotations with attributes (xabbuh)
xabbuh Aug 14, 2023
a928781
Merge branch 'symfony:6.4' into issue-49659
alexmerlin Aug 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Notifier][Webhook] Add Vonage support
  • Loading branch information
smnandre authored and fabpot committed Aug 12, 2023
commit 490adc15eaa171b7c38556fa0f98b4f4f4715bbc
5 changes: 5 additions & 0 deletions 5 src/Symfony/Component/Notifier/Bridge/Vonage/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

6.4
---

* Add support for `RemoteEvent` and `Webhook`

6.2
---

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"to": "447700900000",
"from": "447700900001",
"timestamp": {},
"status": "delivered",
"usage": {
"currency": "EUR",
"price": "0.0333"
},
"client_ref": "string",
"channel": "sms",
"destination": {
"network_code": "12345"
},
"sms": {
"count_total": "2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

use Symfony\Component\RemoteEvent\Event\Sms\SmsEvent;

$wh = new SmsEvent(SmsEvent::DELIVERED, 'aaaaaaaa-bbbb-cccc-dddd-0123456789ab', json_decode(file_get_contents(str_replace('.php', '.json', __FILE__)), true, flags: \JSON_THROW_ON_ERROR));
$wh->setRecipientPhone('447700900000');

return $wh;
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"to": "447700900000",
"from": "447700900001",
"timestamp": {},
"status": "rejected",
"error": {
"type": "https://developer.nexmo.com/api-errors/messages-olympus#1000",
"title": 1000,
"detail": "Throttled - You have exceeded the submission capacity allowed on this account. Please wait and retry",
"instance": "bf0ca0bf927b3b52e3cb03217e1a1ddf"
},
"usage": {
"currency": "EUR",
"price": "0.0333"
},
"client_ref": "string",
"channel": "sms",
"destination": {
"network_code": "12345"
},
"sms": {
"count_total": "2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

use Symfony\Component\RemoteEvent\Event\Sms\SmsEvent;

$wh = new SmsEvent(SmsEvent::FAILED, 'aaaaaaaa-bbbb-cccc-dddd-0123456789ab', json_decode(file_get_contents(str_replace('.php', '.json', __FILE__)), true, flags: \JSON_THROW_ON_ERROR));
$wh->setRecipientPhone('447700900000');

return $wh;
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"to": "447700900000",
"from": "447700900001",
"timestamp": {},
"status": "undeliverable",
"error": {
"type": "https://developer.nexmo.com/api-errors/messages-olympus#1260",
"title": 1260,
"detail": "Destination unreachable - The message could not be delivered to the phone number. If using Viber Business Messages your account might not be enabled for this country.",
"instance": "bf0ca0bf927b3b52e3cb03217e1a1ddf"
},
"usage": {
"currency": "EUR",
"price": "0.0333"
},
"client_ref": "string",
"channel": "sms",
"destination": {
"network_code": "12345"
},
"sms": {
"count_total": "2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

use Symfony\Component\RemoteEvent\Event\Sms\SmsEvent;

$wh = new SmsEvent(SmsEvent::FAILED, 'aaaaaaaa-bbbb-cccc-dddd-0123456789ab', json_decode(file_get_contents(str_replace('.php', '.json', __FILE__)), true, flags: \JSON_THROW_ON_ERROR));
$wh->setRecipientPhone('447700900000');

return $wh;
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\Notifier\Bridge\Vonage\Tests\Webhook;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Notifier\Bridge\Vonage\Webhook\VonageRequestParser;
use Symfony\Component\Webhook\Client\RequestParserInterface;
use Symfony\Component\Webhook\Exception\RejectWebhookException;
use Symfony\Component\Webhook\Test\AbstractRequestParserTestCase;

class VonageRequestParserTest extends AbstractRequestParserTestCase
{
public function testMissingAuthorizationTokenThrows()
{
$request = $this->createRequest('{}');
$request->headers->remove('Authorization');
$parser = $this->createRequestParser();

$this->expectException(RejectWebhookException::class);
$this->expectExceptionMessage('Missing "Authorization" header');

$parser->parse($request, $this->getSecret());
}

public function testInvalidAuthorizationTokenThrows()
{
$request = $this->createRequest('{}');
$request->headers->set('Authorization', 'Invalid Header');
$parser = $this->createRequestParser();

$this->expectException(RejectWebhookException::class);
$this->expectExceptionMessage('Signature is wrong');

$parser->parse($request, $this->getSecret());
}

protected function createRequestParser(): RequestParserInterface
{
return new VonageRequestParser();
}

protected function createRequest(string $payload): Request
{
// JWT Token signed with the secret key
$jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.kK9JnTXZwzNo3BYNXJT57PGLnQk-Xyu7IBhRWFmc4C0';

$request = parent::createRequest($payload);
$request->headers->set('Authorization', 'Bearer '.$jwt);

return $request;
}

protected function getSecret(): string
{
return 'secret-key';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\Notifier\Bridge\Vonage\Webhook;

use Symfony\Component\HttpFoundation\ChainRequestMatcher;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestMatcher\IsJsonRequestMatcher;
use Symfony\Component\HttpFoundation\RequestMatcher\MethodRequestMatcher;
use Symfony\Component\HttpFoundation\RequestMatcherInterface;
use Symfony\Component\RemoteEvent\Event\Sms\SmsEvent;
use Symfony\Component\Webhook\Client\AbstractRequestParser;
use Symfony\Component\Webhook\Exception\RejectWebhookException;

final class VonageRequestParser extends AbstractRequestParser
{
protected function getRequestMatcher(): RequestMatcherInterface
{
return new ChainRequestMatcher([
new MethodRequestMatcher('POST'),
new IsJsonRequestMatcher(),
]);
}

protected function doParse(Request $request, string $secret): ?SmsEvent
{
// Signed webhooks: https://developer.vonage.com/en/getting-started/concepts/webhooks#validating-signed-webhooks
if (!$request->headers->has('Authorization')) {
throw new RejectWebhookException(406, 'Missing "Authorization" header.');
}
$this->validateSignature(substr($request->headers->get('Authorization'), \strlen('Bearer ')), $secret);

// Statuses: https://developer.vonage.com/en/api/messages-olympus#message-status
$payload = $request->toArray();
if (
!isset($payload['status'])
|| !isset($payload['message_uuid'])
|| !isset($payload['to'])
|| !isset($payload['channel'])
) {
throw new RejectWebhookException(406, 'Payload is malformed.');
}

if ('sms' !== $payload['channel']) {
throw new RejectWebhookException(406, sprintf('Unsupported channel "%s".', $payload['channel']));
}

$name = match ($payload['status']) {
'delivered' => SmsEvent::DELIVERED,
'rejected' => SmsEvent::FAILED,
'submitted' => null,
'undeliverable' => SmsEvent::FAILED,
default => throw new RejectWebhookException(406, sprintf('Unsupported event "%s".', $payload['status'])),
};
if (!$name) {
return null;
}

$event = new SmsEvent($name, $payload['message_uuid'], $payload);
$event->setRecipientPhone($payload['to']);

return $event;
}

private function validateSignature(string $jwt, string $secret): void
{
$tokenParts = explode('.', $jwt);
if (3 !== \count($tokenParts)) {
throw new RejectWebhookException(406, 'Signature is wrong.');
}

[$header, $payload, $signature] = $tokenParts;
if ($signature !== $this->base64EncodeUrl(hash_hmac('sha256', $header.'.'.$payload, $secret, true))) {
throw new RejectWebhookException(406, 'Signature is wrong.');
}
}

private function base64EncodeUrl(string $string): string
{
return str_replace(['+', '/', '='], ['-', '_', ''], base64_encode($string));
}
}
3 changes: 3 additions & 0 deletions 3 src/Symfony/Component/Notifier/Bridge/Vonage/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"symfony/http-client": "^5.4|^6.0|^7.0",
"symfony/notifier": "^6.2.7|^7.0"
},
"require-dev": {
"symfony/webhook": "^6.4|^7.0"
},
"autoload": {
"psr-4": { "Symfony\\Component\\Notifier\\Bridge\\Vonage\\": "" },
"exclude-from-classmap": [
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.