196 Commits

Author SHA1 Message Date
Nicolas Grekas
fe282b47ca [HttpKernel] Expose controller metadata throughout the request lifecycle 2026-02-03 20:25:01 +01:00
Nicolas Grekas
92bf162ebd [HttpKernel] Return attributes as a flat list when using Controller[Arguments]Event::getAttributes(*) 2026-01-14 15:51:52 +01:00
Nicolas Grekas
32eed680e1 [HttpKernel] Decouple controller attributes from source code and add ResponseEvent::getControllerAttributes() 2025-12-23 17:07:12 +01:00
Alexander M. Turek
c307b0c1b7 Prefix all sprintf() calls 2024-06-20 17:52:34 +02:00
Alexander M. Turek
a88994416a [HttpKernel] Use CPP 2024-02-06 10:15:06 +01:00
Nicolas Grekas
3934259de2 Merge branch '7.0' into 7.1
* 7.0:
  List CS fix in .git-blame-ignore-revs
  Fix implicitly-required parameters
  minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench)
  Fix bad merge
  List CS fix in .git-blame-ignore-revs
  Fix implicitly-required parameters
  List CS fix in .git-blame-ignore-revs
  Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
  [Messenger][AmazonSqs] Allow async-aws/sqs version 2
2024-01-23 16:06:13 +01:00
Nicolas Grekas
24671ba111 Merge branch '6.4' into 7.0
* 6.4:
  Fix implicitly-required parameters
  minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench)
  Fix bad merge
  List CS fix in .git-blame-ignore-revs
  Fix implicitly-required parameters
  List CS fix in .git-blame-ignore-revs
  Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
  [Messenger][AmazonSqs] Allow async-aws/sqs version 2
2024-01-23 16:02:46 +01:00
Nicolas Grekas
ab69bdd211 Merge branch '5.4' into 6.3
* 5.4:
  Fix implicitly-required parameters
  List CS fix in .git-blame-ignore-revs
  Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
  [Messenger][AmazonSqs] Allow async-aws/sqs version 2
2024-01-23 15:35:58 +01:00
Nicolas Grekas
c31bb9215c Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value 2024-01-23 14:51:25 +01:00
Fabien Potencier
b6cc1aff5b feature #52128 [HttpKernel] Introduce ExceptionEvent::isKernelTerminating() to skip error rendering when kernel is terminating (VincentLanglet)
This PR was squashed before being merged into the 7.1 branch.

Discussion
----------

[HttpKernel] Introduce `ExceptionEvent::isKernelTerminating()` to skip error rendering when kernel is terminating

| Q             | A
| ------------- | ---
| Branch?       | 7.1
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #51912
| License       | MIT

Commits
-------

68673a3f98 [HttpKernel] Introduce `ExceptionEvent::isKernelTerminating()` to skip error rendering when kernel is terminating
2023-11-23 08:08:06 +01:00
Vincent Langlet
b87ad8c4fd [HttpKernel] Introduce ExceptionEvent::isKernelTerminating() to skip error rendering when kernel is terminating 2023-11-23 08:08:03 +01:00
Nicolas Grekas
440f3614b3 Merge branch '6.4' into 7.0
* 6.4: (47 commits)
  Sync .github/expected-missing-return-types.diff
  [FrameworkBundle] Add void return-type to ErrorLoggerCompilerPass
  [DoctrineBridge] Fix cross-versions compat
  [HttpKernel] Handle nullable callback of StreamedResponse
  [Mailer] Capitalize sender header for Mailgun
  [FrameworkBundle] Configure `logger` as error logger if the Monolog Bundle is not registered
  DX: PHP CS Fixer - drop explicit nullable_type_declaration_for_default_null_value config, as it's part of ruleset anyway
  DX: PHP CS Fixer - drop explicit no_superfluous_phpdoc_tags config, as it's part of ruleset already
  [DI] Simplify using DI attributes with `ServiceLocator/Iterator`'s
  [FrameworkBundle] Fix registering workflow.registry
  Revert "Add keyword `dev` to leverage composer hint"
  [Validator] Add missing Ukrainian translations #51960
  [Validator] Add missing translations for Indonesian (id)
  [Validator] Add missing translations for Vietnamese (VI)
  Add missing Validator translations - Croatian (hr)
  [HttpFoundation]  Improve PHPDoc of Cache attribute
  [Validator] Add missing Spanish (es) translations #51956
  [Serializer] Add `XmlEncoder::CDATA_WRAPPING` context option
  [Finder] Add early directory prunning filter support
  Add missing dutch translations
  ...
2023-10-12 17:41:36 +02:00
Jordane Vaspard
e7b68d7cec [HttpKernel] Handle nullable callback of StreamedResponse 2023-10-12 15:49:24 +02:00
Nicolas Grekas
a135824d04 Merge branch '6.4' into 7.0
* 6.4:
  [FrameworkBundle][Validator] Replace annotation by attribute
  [Validator] Add annotation in Constraint
  [Lock] Add some missing return types in tests
  [Clock] Throw `DateMalformedStringException`/`DateInvalidTimeZoneException` when appropriate
  [VarExporter] Remove unused test files
  [FrameworkBundle] Remove unused test file
  [DependencyInjection] Remove unused test file
  [DomCrawler] Added argument `$default` to method `Crawler::attr()`
  [HttpKernel] Fix missing Request in RequestStack for StreamedResponse
  Psalm: Ignore UnusedClass errors
  fix(console): avoid multiple new line when message already ends with a new line
2023-08-17 17:51:30 +02:00
Ismail Turan
8b05b1a638 [HttpKernel] Fix missing Request in RequestStack for StreamedResponse 2023-08-16 10:24:43 +02:00
Nicolas Grekas
710f441eeb Add types to public and protected properties 2023-07-27 18:29:09 +02:00
Wouter de Jong
34cbd3eea1 [Components] Convert to native return types 2023-07-05 15:06:06 +02:00
Wouter de Jong
8efef814fc Add void return types 2023-02-13 14:18:23 +01:00
Nicolas Grekas
266f0f3ef9 [HttpKernel] Add request attribute _handle_all_throwables to allow HttpKernel to handle thrown Error in addition to Exception 2022-10-18 17:44:00 +02:00
Nicolas Grekas
5c7d554cf1 Merge branch '6.1' into 6.2
* 6.1:
  [HttpKernel] Fix empty request stack when terminating with exception
  [HttpKernel] Remove EOL when using error_log() in HttpKernel Logger
  [HttpClient] Add test case for seeking into the content of RetryableHttpClient responses
  [HttpClient] Fix buffering after calling AsyncContext::passthru()
  s/annd/and
  s/gargage/garbage
  [HttpClient] fix merge
  [HttpClient] Don't override header if is x-www-form-urlencoded
  [Console] Fix error output on windows cli
  Reserve keys when using numeric ones
  add missing Azerbaijani translations
  fix few typos/inconsistencies in latvian translations
  Fix TypeError in Router when using UrlGenerator
  [Messenger] Fix amqp socket lost
  fix: use message object from event
2022-10-18 15:21:06 +02:00
Nicolas Grekas
380a993682 Merge branch '6.0' into 6.1
* 6.0:
  [HttpKernel] Fix empty request stack when terminating with exception
  [HttpKernel] Remove EOL when using error_log() in HttpKernel Logger
  [HttpClient] Add test case for seeking into the content of RetryableHttpClient responses
  [HttpClient] Fix buffering after calling AsyncContext::passthru()
  s/annd/and
  s/gargage/garbage
  [Console] Fix error output on windows cli
  Reserve keys when using numeric ones
  add missing Azerbaijani translations
  fix few typos/inconsistencies in latvian translations
  Fix TypeError in Router when using UrlGenerator
  [Messenger] Fix amqp socket lost
  fix: use message object from event
2022-10-18 15:12:43 +02:00
Nicolas Grekas
156787459d Merge branch '5.4' into 6.0
* 5.4:
  [HttpKernel] Fix empty request stack when terminating with exception
  [HttpKernel] Remove EOL when using error_log() in HttpKernel Logger
  [HttpClient] Add test case for seeking into the content of RetryableHttpClient responses
  [HttpClient] Fix buffering after calling AsyncContext::passthru()
  s/annd/and
  s/gargage/garbage
  [Console] Fix error output on windows cli
  Reserve keys when using numeric ones
  add missing Azerbaijani translations
  fix few typos/inconsistencies in latvian translations
  Fix TypeError in Router when using UrlGenerator
  [Messenger] Fix amqp socket lost
  fix: use message object from event
2022-10-18 15:11:57 +02:00
Nicolas Grekas
e6ecb81524 Merge branch '4.4' into 5.4
* 4.4:
  [HttpKernel] Fix empty request stack when terminating with exception
  [HttpKernel] Remove EOL when using error_log() in HttpKernel Logger
  s/annd/and
  s/gargage/garbage
  [Console] Fix error output on windows cli
  Reserve keys when using numeric ones
  add missing Azerbaijani translations
  fix few typos/inconsistencies in latvian translations
  fix: use message object from event
2022-10-18 15:11:10 +02:00
Krzysztof Pyrkosz
3f611709a7 [HttpKernel] Fix empty request stack when terminating with exception 2022-10-18 15:01:47 +02:00
Nicolas Grekas
3db79f1060 Add a few more ??= 2022-09-12 10:52:12 +02:00
Nicolas Grekas
9abc061d32 [HttpKernel] Don't cache controller's reflector inside the request 2022-09-02 16:20:57 +02:00
François-Xavier de Guillebon
0441a6f443 Replace get_class() calls by ::class 2022-09-01 04:03:18 +02:00
Fabien Potencier
34dba9ca64 Merge branch '6.1' into 6.2
* 6.1:
  [LokaliseBridge] Fix push command --delete-missing options when there are no missing messages
  fix bad help message in cache warmup command
  [Console] Fix OutputFormatterStyleStack::getCurrent return type
  Count cookie parts before accessing the second
  Fix RequestStack state if throwable is thrown
  [Serializer] Fix caching context-aware encoders/decoders in ChainEncoder/ChainDecoder
  [Serializer] Revert deprecation of `ContextAwareEncoderInterface` and `ContextAwareDecoderInterface`
2022-08-26 12:37:50 +02:00
Fabien Potencier
9590a9b111 Merge branch '6.0' into 6.1
* 6.0:
  [LokaliseBridge] Fix push command --delete-missing options when there are no missing messages
  fix bad help message in cache warmup command
  [Console] Fix OutputFormatterStyleStack::getCurrent return type
  Count cookie parts before accessing the second
  Fix RequestStack state if throwable is thrown
  [Serializer] Fix caching context-aware encoders/decoders in ChainEncoder/ChainDecoder
2022-08-26 12:32:31 +02:00
Fabien Potencier
31fa9ec72d Merge branch '5.4' into 6.0
* 5.4:
  [LokaliseBridge] Fix push command --delete-missing options when there are no missing messages
  fix bad help message in cache warmup command
  Count cookie parts before accessing the second
  Fix RequestStack state if throwable is thrown
  [Serializer] Fix caching context-aware encoders/decoders in ChainEncoder/ChainDecoder
2022-08-26 12:32:20 +02:00
Fabien Potencier
ee57f9e6e4 Merge branch '4.4' into 5.4
* 4.4:
  fix bad help message in cache warmup command
  Fix RequestStack state if throwable is thrown
  [Serializer] Fix caching context-aware encoders/decoders in ChainEncoder/ChainDecoder
2022-08-26 12:32:10 +02:00
Grégoire Pineau
3b05051d9e [CS] Remove @inheritdoc PHPDoc 2022-08-25 17:27:04 +02:00
Warxcell
15baea58ba Fix RequestStack state if throwable is thrown 2022-08-22 19:35:03 +03:00
Nicolas Grekas
2e29dca195 [TwigBridge] Add #[Template()] to describe how to render arrays returned by controllers 2022-07-12 09:22:41 +02:00
Nicolas Grekas
7b67334f10 [HttpKernel] Add ControllerEvent::getAttributes() to handle attributes on controllers 2022-07-07 11:50:37 +02:00
Nyholm
2edca008dd Add deprecation warning to show HttpKernel::handle() will catch throwables 2022-06-25 09:18:35 +02:00
Thomas Calvet
91976060f6 Leverage non-capturing catches 2022-04-01 09:15:35 +02:00
Fabien Potencier
9c9c39041c Remove FQCN type hints on properties 2021-12-08 16:13:44 +01:00
Alexander M. Turek
180f95177c [HttpKernel] Add types to private properties
Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-09-07 12:43:05 +02:00
Alexander M. Turek
3ec1622692 Merge branch '5.4' into 6.0
* 5.4:
  fixed a typo in the upgrade guide
  [Mime] Update mime types
  [Security] Avoid extra warning when preloading file when EL is not installed
  [PasswordHasher] Fix documentation link
  [HttpKernel] Backport type declaration fixes
  Run PHP 8.1 CI with all extensions
2021-09-04 19:06:56 +02:00
Alexander M. Turek
5dc09b77cb [HttpKernel] Backport type declaration fixes
Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-09-03 14:07:42 +02:00
Nicolas Grekas
e47a3e656d Add return types - batch 6/n 2021-08-16 17:45:02 +02:00
Oskar Stark
ef48010d92 Remove preloading of unused class 2021-08-04 22:21:57 +02:00
Nicolas Grekas
22ebd0adf8 [HttpKernel] remove deprecated features 2021-07-04 12:33:14 +02:00
Nicolas Grekas
574d651f55 Add union types 2021-06-29 11:21:24 +02:00
Alexander M. Turek
f997ac104b Merge branch '5.2' into 5.x
* 5.2:
  [CS] Replace easy occurences of ?: with ??
2021-04-07 18:09:00 +02:00
Alexander M. Turek
028778728c Merge branch '4.4' into 5.2
* 4.4:
  [CS] Replace easy occurences of ?: with ??
2021-04-07 18:07:52 +02:00
Thomas Calvet
31f3944239 [CS] Replace easy occurences of ?: with ?? 2021-04-07 17:47:03 +02:00
Alexander M. Turek
d026426847 Rename master request to main request 2021-03-22 14:14:48 +01:00
Nicolas Grekas
ea9d281576 Merge branch '4.4' into 5.0
* 4.4:
  [DI] Fix CheckTypeDeclarationPass
  [Security/Http] don't require the session to be started when tracking its id
  [DI] fix preloading script generation
2020-03-18 09:00:37 +01:00