59 Commits

Author SHA1 Message Date
Nicolas Grekas
7e7c581cf8 [HttpClient] Default CachingHttpClient's $maxTtl to 86400s to prevent eternal cache items 2026-03-06 14:47:22 +01:00
Lctrs
ec226cac15 [HttpClient] Prevent eternal cache items in CachingHttpClient
Responses without an explicit freshness lifetime (no max-age, s-maxage
or Expires header) and where heuristic freshness did not apply were
previously stored with no expiration date, resulting in items that
never self-expired.

This change ensures every cached response now receives a finite usable
TTL (max-age + stale-while-revalidate + stale-if-error) and is
guaranteed to self-expire after that lifetime:
- Responses with a computed usable TTL of zero are no longer stored
- A safety buffer is always added when a positive TTL exists
2026-03-06 14:30:34 +01:00
Nicolas Grekas
ade9bd4334 Merge branch '7.4' into 8.0
* 7.4:
  [HttpFoundation] Fix session cookie_lifetime not applied in mock session storage
  [Validator] Fix test
  [Serializer] Fix denormalization of magic `__set` properties
  [Config] Fix NodeDefinition template to be covariant
  Add 'sms' to hostless schemes
  [Validator] Fix required options check when extending a constraint with a simplified constructor
  [Validator] Skip ExpressionLanguage requirement in When constraint for closure expressions
  [Cache] Add timeout and slot eviction to LockRegistry stampede prevention
  [Console] Fix OUTPUT_RAW corrupting binary content on Windows
  [Form] Fix session data contamination by non-serializable objects in form flow
  [Mime] Use shell_exec() instead of passthru() in FileBinaryMimeTypeGuesser
  [HttpClient] Fix streaming from CachingHttpClient
  [DoctrineBridge] Rename `_schema_subscriber_check` table to `schema_subscriber_check_` for Oracle compatibility
  [HttpClient] Fix CachingHttpClient compatibility with decorator clients on 304 responses
  [FrameworkBundle] Fix stale container after reboot in KernelTestCase
  [Form] Fix duplicate validation errors when ValidatorExtension is instantiated multiple times
2026-03-06 14:17:40 +01:00
Nicolas Grekas
1010624285 [HttpClient] Fix streaming from CachingHttpClient 2026-03-05 12:16:58 +01:00
Nicolas Grekas
48345ab2dd [HttpClient] Fix CachingHttpClient compatibility with decorator clients on 304 responses 2026-03-05 08:37:04 +01:00
Christian Flothmann
801f2b9132 Merge branch '7.3' into 7.4
* 7.3:
  fix merge
  do not use PHPUnit mock objects without configured expectations
  do not use PHPUnit mock objects without configured expectations
  Typo
  [HttpClient] Fix and test replacing repeated headers with CachingHttpClient
  [Messenger] Fix processing batches
  do not use PHPUnit mock objects without configured expectations
  do not use PHPUnit mock objects without configured expectations
2026-01-06 13:34:24 +01:00
Christian Flothmann
216c9355f3 Merge branch '6.4' into 7.3
* 6.4:
  do not use PHPUnit mock objects without configured expectations
  do not use PHPUnit mock objects without configured expectations
  [HttpClient] Fix and test replacing repeated headers with CachingHttpClient
  [Messenger] Fix processing batches
  do not use PHPUnit mock objects without configured expectations
  do not use PHPUnit mock objects without configured expectations
2026-01-06 13:19:16 +01:00
Nicolas Grekas
a9915a2789 [HttpClient] Fix and test replacing repeated headers with CachingHttpClient 2026-01-05 18:46:42 +01:00
Nicolas Grekas
f559404536 Merge branch '7.3' into 7.4
* 7.3:
  [HttpKernel] Fix using HTTP Cache in worker mode
  bug #62535 [HttpKernel] Don't reset services between fragments redering when using in HttpCache (nicolas-grekas)
  Fix existing headers must be replaced in CachingHttpClient
2026-01-05 17:06:15 +01:00
Nicolas Grekas
c180e7f36a Merge branch '6.4' into 7.3
* 6.4:
  [HttpKernel] Fix using HTTP Cache in worker mode
  bug #62535 [HttpKernel] Don't reset services between fragments redering when using in HttpCache (nicolas-grekas)
  Fix existing headers must be replaced in CachingHttpClient
2026-01-05 17:02:43 +01:00
Yanick Witschi
de5f1d7114 Fix existing headers must be replaced in CachingHttpClient 2026-01-05 15:11:37 +01:00
Christian Flothmann
60843569a4 Merge branch '7.4' into 8.0
* 7.4:
  do not use PHPUnit mock objects without configured expectations
  do not use PHPUnit mock objects without configured expectations
  do not use PHPUnit mock objects without configured expectations
  do not use PHPUnit mock objects without configured expectations
  [HttpClient] update chunk items' expiration on revalidation
  [FrameworkBundle] Better deprecation message when running `bin/console debug:container --show-arguments`
  [PropertyAccess][PropertyInfo][Serializer] Skip methods that look like getters but return void or never
  [Form][TwigBridge] Prevent cached block prefixes from leaking across nested collections
  [Uid] Remove $uid from InvalidArgumentException message
2026-01-04 00:40:55 +01:00
Lctrs
877ff00b79 [HttpClient] update chunk items' expiration on revalidation 2025-12-31 11:25:38 +01:00
Nicolas Grekas
9ae8392b30 Merge branch '7.4' into 8.0
* 7.4:
  [HttpClient] mark response stale when age equals freshness lifetime
  [PropertyInfo] Fix typo
  [PropertyInfo] Fix upmerge
  empty string condition for place name
2025-12-11 08:34:22 +01:00
Lctrs
20535924df [HttpClient] mark response stale when age equals freshness lifetime 2025-12-10 21:46:49 +01:00
Nicolas Grekas
ce4c5bcb95 Merge branch '7.4' into 8.0
* 7.4:
  [Workflow] Add missing `@param` on Transition
  [HttpFoundation] Fix issue where ServerEvent with "0" data is not sent
  [HttpClient] Don't store response with authentication headers in shared mode
2025-10-25 13:36:23 +02:00
Lctrs
cad6482b05 [HttpClient] Don't store response with authentication headers in shared mode 2025-10-24 21:42:38 +02:00
Nicolas Grekas
377edfe524 Merge branch '7.4' into 8.0
* 7.4:
  [Messenger] Allow to use custom http client for sqs messenger transport
  [JsonStreamer] Merge `PropertyMetadata` value transformers
  [Mailer] Relax regexp to parse message ids
  [Mailer] Fix parsing message ids in SMTP responses
  Reviewed translations
  [HttpClient] Consider cached responses without expiration as immediately stale
  [Routing] Indicate type of rejected object in CompiledUrlMatcherDumper
  [Workflow] Extract code from the data collector to a dedicated class
  [Messenger] Add `MessageSentToTransportsEvent`
  Add FormFlow for multistep forms management
  [HttpKernel][DebugBundle] Collect dumps when console profiling is enabled
2025-10-24 16:30:40 +02:00
Lctrs
1d99639f81 [HttpClient] Consider cached responses without expiration as immediately stale 2025-10-23 19:50:42 +02:00
Christian Flothmann
2350540ae1 remove support for StoreInterface as the HTTP client cache 2025-10-07 14:02:58 +02:00
Lctrs
81ef527ffc [HttpClient] Make CachingHttpClient compatible with RFC 9111 2025-09-29 09:12:46 +02:00
Gregor Harlan
8d31ec7a64 optimize in_array calls 2025-07-15 11:40:20 +02:00
Nicolas Grekas
6f2691f2f7 CS fixes 2025-07-10 10:14:14 +02:00
Christian Flothmann
4a04ae67f6 Merge branch '7.1' into 7.2
* 7.1:
  fix CS
  Update deprecations baseline
  [Mailer][MailJet] Fix parameters for TrackClicks and TrackOpens
  [Doctrine][Messenger] Oracle sequences are suffixed with `_seq`
  drop existing schema if tests create it explicitly
  synchronize line numbers in deprecations baseline
  [HttpClient] Fix class requirement message
  Add integration test for RememberMe with pg connection
  fix: DoctrineTokenProvider not oracle compatible
2024-10-18 11:50:33 +02:00
Christian Flothmann
5620136101 Merge branch '6.4' into 7.1
* 6.4:
  Update deprecations baseline
  [Mailer][MailJet] Fix parameters for TrackClicks and TrackOpens
  [Doctrine][Messenger] Oracle sequences are suffixed with `_seq`
  drop existing schema if tests create it explicitly
  synchronize line numbers in deprecations baseline
  [HttpClient] Fix class requirement message
  Add integration test for RememberMe with pg connection
  fix: DoctrineTokenProvider not oracle compatible
2024-10-18 11:42:06 +02:00
Alexandre Daubois
509d0e8a79 [HttpClient] Fix class requirement message 2024-10-14 20:15:01 +02:00
Alexander M. Turek
f53dab37bd Prefix all sprintf() calls 2024-06-20 17:52:34 +02:00
Christian Flothmann
2484cac9b0 use constructor property promotion 2024-06-01 10:26:03 +02:00
Christian Flothmann
511095db12 revert implementing LoggerAwareInterface in HTTP client decorators 2024-04-30 11:53:17 +02:00
Yann Eugoné
135615800e [HttpClient] Implemented LoggerAwareInterface in HttpClientInterface decorators 2024-04-19 09:13:57 +02:00
Nicolas Grekas
dc4ee0b23e 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
5b7fa7e29f 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
57779974f9 Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value 2024-01-23 14:51:25 +01:00
Wouter de Jong
e34f942963 [Components] Convert to native return types 2023-07-05 15:06:06 +02:00
Alexandre Daubois
ea30144879 [FrameworkBundle] Add framework.http_cache.skip_response_headers option 2023-02-22 11:35:09 +01:00
Wouter de Jong
83359ccb23 Add void return types 2023-02-13 14:18:23 +01:00
Grégoire Pineau
8473863a2a [CS] Remove @inheritdoc PHPDoc 2022-08-25 17:27:04 +02:00
Fabien Potencier
5d1ad2268a Revert "bug #44494 Remove FQCN type hints on properties (fabpot)"
This reverts commit 0a13eba7037c6636be7a35c194d7d2e86d6ea6ba, reversing
changes made to e4cfa82c31ffda491b73e181c8d3d4e0a307eee8.
2021-12-09 13:46:12 +01:00
Fabien Potencier
99e42b54ce Remove FQCN type hints on properties 2021-12-08 16:13:44 +01:00
Nicolas Grekas
77a85a0790 Merge branch '5.4' into 6.0
* 5.4: (22 commits)
  fix cs
  Update validators.lv.xlf
  Fix API gateway service name
  Improve recommendation message for "composer req"
  Fix CS in composer.json
  [DependencyInjection] fix preloading
  Update validators.uz.xlf
  AddMake ExpressionVoter Cacheable
  Add framework config for DBAL cache adapter
  [ExpressionLanguage] Fix LexerTest number types
  [Process] intersect with getenv() to populate default envs
  Improve CI script a bit
  Fix deprecation message placeholders
  [Cache] Fix calculate ttl in couchbase sdk 3.0
  Fix Loco Provider
  [Cache] fix dbindex Redis
  Fix typos in a test message
  [Cache] fix releasing not acquired locks
  [DependencyInjection] fix creating 2nd container instances
  Never rely on dynamic properties
  ...
2021-11-17 13:23:22 +01:00
Jérémy Derussé
0154236003 Improve recommendation message for "composer req" 2021-11-17 11:48:20 +01:00
Nicolas Grekas
2304f50331 Merge branch '5.4' into 6.0
* 5.4:
  Fix tests on PHP 8.1
  [Cache] Fix memory leak
  [Config] Add missing use statement in generated config builder classes
  [DependencyInjection] fix inlining when non-shared services are involved
  [FrameworkBundle] fix deprecation message
  [DoctrineBridge] add support for the JSON type
  [PHPUnitBridge] Fix Uncaught ValueError
  [HttpClient] Implement ResetInterface for all http clients
  [HttpKernel] allow ignoring kernel.reset methods that don't exist
  [FrameworkBundle] fix registering late resettable services
  [Validator] Missing translations for Greek (el)
  translate for japanese 101,102,103
  Use symfony-*-bridge instead of symfony-bridge for component bridges
  Fix Loco Provider
  [HttpClient] Curl http client has to reinit curl multi handle on reset
  [SecurityBundle] Fix compat with symfony/security-core:^6 (ter)
  [Validator] Add Swedish translation for issue #43737
2021-11-12 12:44:21 +01:00
Rokas Mikalkėnas
c5d9c95bc0 [HttpClient] Implement ResetInterface for all http clients 2021-11-09 21:17:05 +02:00
Alexander M. Turek
2c26c8b648 [HttpClient] Add types to private properties
Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-09-17 10:56:18 +02:00
Nicolas Grekas
1637a24a59 Remove needless TypeErrors 2021-09-09 08:54:05 +02:00
Nicolas Grekas
ff047d0bdc Bump Contracts to 2.5 2021-06-09 15:36:38 +02:00
Nicolas Grekas
b19681a699 Leverage PHP8's get_debug_type() 2020-03-16 17:46:21 +01:00
Fabien Potencier
d2d1c0ba5b Fix quotes in exception messages 2020-03-16 12:24:17 +01:00
Andreas Schempp
688baacd58 Correctly remove trace level options for HttpCache 2020-02-14 09:25:43 +01:00
Nicolas Grekas
0629b6af59 Merge branch '4.3' into 4.4
* 4.3:
  [travis] Fix build-packages script
  [HttpClient] bugfix exploding values of headers
  Remove useless testCanCheckIfTerminalIsInteractive test case
  [Validator] Add the missing translations for the Thai (\"th\") locale
  [Routing] gracefully handle docref_root ini setting
  [Validator] Fix ValidValidator group cascading usage
2019-10-07 14:37:47 +02:00