405 Commits

Author SHA1 Message Date
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
387d5bb6c8 Merge branch '7.4' into 8.0
* 7.4:
  [Translation] Make the extractor alias optional
  [Cache] Fix accepting named closures as early-expiration callbacks
  [Mime] Update mime types
  [HttpKernel] Conflict with symfony/flex < 2.10
  [Yaml] Align unquoted multiline scalar parsing with spec for comments
  work around limitation in JsonResponse when the data is null
  do not use recipient phone numbers as sender e-mail addresses
  [Dotenv] DotenvDumpCommand cannot be internal
2025-11-16 11:17:21 +01:00
Nicolas Grekas
034b94194c [HttpKernel] Conflict with symfony/flex < 2.10 2025-11-16 10:44:31 +01:00
Nicolas Grekas
696a0bc02c Add global lower bounds to deps on the CI 2025-09-04 10:58:35 +02:00
Nicolas Grekas
05a67e68c3 Fix low-deps tests 2025-08-20 12:31:41 +02:00
Alexandre Daubois
0760fd3dcf [HttpFoundation][HttpKernel][WebProfilerBundle] Add support for the QUERY HTTP method 2025-08-16 12:44:27 +02:00
Nicolas Grekas
de564fa0e4 Remove legacy code paths that rely on feature checks 2025-07-19 11:21:01 +02:00
Christian Flothmann
d9da16e492 remove AddAnnotatedClassesToCachePass and related methods 2025-06-20 15:46:03 +02:00
Nicolas Grekas
18373182f4 Bump Symfony 8 to PHP >= 8.4 2025-06-03 14:29:50 +02:00
Nicolas Grekas
b7ba058461 Allow Symfony ^8.0 2025-06-02 16:13:49 +02:00
Nicolas Grekas
610f13eca9 Don't enable tracing unless the profiler is enabled 2025-04-22 11:11:45 +02:00
valtzu
49bce5da5a Generate url-safe signatures 2024-12-14 12:46:23 +02:00
Christian Flothmann
63eb9d340f revert allowing Twig 4
As Twig 4 will not be released before Symfony 7.2 we should not claim
compatibility before a stable Twig 4 release.
2024-10-23 10:11:15 +02:00
Christian Flothmann
1732b1e9f5 allow Twig 4 2024-09-02 17:30:47 +02:00
Christian Flothmann
b0153221d9 bump requirement for Twig to 3.12+ 2024-08-30 09:44:16 +02:00
Christian Flothmann
8ecb4c4987 Merge branch '7.0' into 7.1
* 7.0: (39 commits)
  fix merge
  add missing return type-hints
  fix merge
  explicitly mark nullable parameters as nullable
  fix low deps tests
  [HttpKernel] Fix datacollector caster for reference object property
  [Serializer] Fixing PHP warning in the ObjectNormalizer with MaxDepth enabled
  bug #51578 [Cache] always select database for persistent redis connections
  [Security] Validate that CSRF token in form login is string similar to username/password
  [Serializer] Use explicit nullable type
  [validator] validated Dutch translation
  Improve dutch translations
  initialize the current time with midnight before modifying the date
  [Translation] Skip state=needs-translation entries only when source == target
  [HttpKernel] Ensure controllers are not lazy
  [Validator] Fill in trans-unit id 113: This URL does not contain a TLD.
  [Validator] added missing Polish translation for unit 113
  [Validator] add missing lv translation
  fix tests
  [HttpClient] Let curl handle transfer encoding
  ...
2024-04-13 08:11:48 +02:00
Christian Flothmann
1c379b2e4e Merge branch '6.4' into 7.0
* 6.4: (23 commits)
  fix merge
  add missing return type-hints
  fix merge
  explicitly mark nullable parameters as nullable
  fix low deps tests
  [HttpKernel] Fix datacollector caster for reference object property
  [Serializer] Fixing PHP warning in the ObjectNormalizer with MaxDepth enabled
  bug #51578 [Cache] always select database for persistent redis connections
  [Security] Validate that CSRF token in form login is string similar to username/password
  [Serializer] Use explicit nullable type
  [validator] validated Dutch translation
  Improve dutch translations
  [Translation] Skip state=needs-translation entries only when source == target
  [HttpKernel] Ensure controllers are not lazy
  [Validator] Fill in trans-unit id 113: This URL does not contain a TLD.
  [Validator] added missing Polish translation for unit 113
  [Validator] add missing lv translation
  [HttpClient] Let curl handle transfer encoding
  [Messenger] Make Doctrine connection ignore unrelated tables on setup
  [HttpFoundation] Set content-type header in RedirectResponse
  ...
2024-04-13 01:04:22 +02:00
Christian Flothmann
21def56591 Merge branch '5.4' into 6.4
* 5.4:
  explicitly mark nullable parameters as nullable
  fix low deps tests
  [HttpKernel] Fix datacollector caster for reference object property
  bug #51578 [Cache] always select database for persistent redis connections
  [Security] Validate that CSRF token in form login is string similar to username/password
  [validator] validated Dutch translation
  Improve dutch translations
  [Translation] Skip state=needs-translation entries only when source == target
  [HttpKernel] Ensure controllers are not lazy
  [Validator] Fill in trans-unit id 113: This URL does not contain a TLD.
  [Validator] added missing Polish translation for unit 113
  [Validator] add missing lv translation
  [HttpClient] Let curl handle transfer encoding
  [Messenger] Make Doctrine connection ignore unrelated tables on setup
  [HttpFoundation] Set content-type header in RedirectResponse
  add translations for the requireTld constraint option message
  [Serializer] Fix unexpected allowed attributes
  [FrameworkBundle] Fix registration of the bundle path to translation
2024-04-13 00:37:50 +02:00
Christian Flothmann
8d2697bb45 fix low deps tests 2024-04-12 23:03:22 +02:00
Nicolas Grekas
97abe049ab [HttpKernel] Deprecate AddAnnotatedClassesToCachePass and related code infrastructure 2024-04-08 13:25:07 +02:00
Nicolas Grekas
7edbbb62c8 Merge branch '6.4' into 7.0
* 6.4:
  [HttpKernel] Fix deps=low
  [HttpKernel] Allow tagged controllers in ControllerResolver
  bugfix php jit issue with ternary operator
2024-02-26 11:35:24 +01:00
Nicolas Grekas
419fc2710b [HttpKernel] Fix deps=low 2024-02-26 11:33:38 +01:00
Nicolas Grekas
2f3141f643 Merge branch '7.0' into 7.1
* 7.0:
  [TwigBridge] foundation 5 layout: use form_label_content block for checkbox and radio labels
  [TwigBridge] Fix compat with Twig v3.9
  [Cache] Sync the Redis proxies with upstream
  [Doctrine Messenger] Fix support for pgsql + pgbouncer.
  [Mailer] Simplify fix
  Do not produce notice/warning when consuming from multiple transports and explicitly listed queues
  [FrameworkBundle] Check if the _route attribute exists on the request
  [Scheduler] fix documentation link
  [PropertyAccess] Fixes getValue() on an unitialized object property on a lazy ghost
  [HttpClient] Make retry strategy work again
  AssetMapper: Remove 'auto-generated' info
  [Mailer] Fix signed emails breaking the profiler
  [Mailer] [Mailgun] Fix expecting payload without tags or user variables
  [Validator] Update Spanish (es) translations
  Fix fetching data in `W3CReferenceTest` on AppVeyor
  Fix SQS visibility_timeout type
2024-02-15 12:36:43 +01:00
Nicolas Grekas
b980e1936c Merge branch '6.4' into 7.0
* 6.4:
  [TwigBridge] foundation 5 layout: use form_label_content block for checkbox and radio labels
  [TwigBridge] Fix compat with Twig v3.9
  [Cache] Sync the Redis proxies with upstream
  [Doctrine Messenger] Fix support for pgsql + pgbouncer.
  [Mailer] Simplify fix
  Do not produce notice/warning when consuming from multiple transports and explicitly listed queues
  [FrameworkBundle] Check if the _route attribute exists on the request
  [Scheduler] fix documentation link
  [PropertyAccess] Fixes getValue() on an unitialized object property on a lazy ghost
  [HttpClient] Make retry strategy work again
  AssetMapper: Remove 'auto-generated' info
  [Mailer] Fix signed emails breaking the profiler
  [Mailer] [Mailgun] Fix expecting payload without tags or user variables
  [Validator] Update Spanish (es) translations
  Fix fetching data in `W3CReferenceTest` on AppVeyor
  Fix SQS visibility_timeout type
  [VarDumper] Fix serialization of stubs with null or uninitialized values
2024-02-15 12:33:06 +01:00
Nicolas Grekas
e7aa3534b8 Merge branch '5.4' into 6.4
* 5.4:
  [TwigBridge] Fix compat with Twig v3.9
  [Mailer] Simplify fix
2024-02-15 12:23:52 +01:00
Nicolas Grekas
fa6412804b [TwigBridge] Fix compat with Twig v3.9 2024-02-15 12:19:14 +01:00
Nicolas Grekas
ba936b6dd2 Merge branch '7.0' into 7.1
* 7.0:
  Skip Twig v3.9-dev for now
  [Validator] Update Dutch (nl) translation
  Update Albanian translations
  [Validator] Update translation
  [FrameworkBundle] Prevent silenced warning by checking if /proc/mount exists
  [VarDumper][PhpUnitBridge] Fix color detection
  prevent throwing NOT_FOUND error when tube is empty
  [Validator] Update missing validator translation for Swedish
  [FrameworkBundle] Fix eager-loading of env vars in ConfigBuilderCacheWarmer
  [Messenger] Fix failing Redis test
  [Validator] Update Italian (it) translations
  [Validator] Missing translations for Hungarian (hu) #53769
  revert to native PHP union types
  [Validator] Missing translations for Russian (ru) #53775
  fix syntax errors on PHP 7
2024-02-07 15:12:34 +01:00
Nicolas Grekas
274223c474 Merge branch '6.4' into 7.0
* 6.4:
  Skip Twig v3.9-dev for now
  [Validator] Update Dutch (nl) translation
  Update Albanian translations
  [Validator] Update translation
  [FrameworkBundle] Prevent silenced warning by checking if /proc/mount exists
  [VarDumper][PhpUnitBridge] Fix color detection
  prevent throwing NOT_FOUND error when tube is empty
  [Validator] Update missing validator translation for Swedish
  [FrameworkBundle] Fix eager-loading of env vars in ConfigBuilderCacheWarmer
  [Messenger] Fix failing Redis test
  [Validator] Update Italian (it) translations
  [Validator] Missing translations for Hungarian (hu) #53769
  revert to native PHP union types
  [Validator] Missing translations for Russian (ru) #53775
  fix syntax errors on PHP 7
2024-02-07 15:11:38 +01:00
Nicolas Grekas
8ae6a8663b Merge branch '5.4' into 6.4
* 5.4:
  Skip Twig v3.9-dev for now
  [Validator] Update Dutch (nl) translation
  Update Albanian translations
  [Validator] Update translation
  [FrameworkBundle] Prevent silenced warning by checking if /proc/mount exists
  [VarDumper][PhpUnitBridge] Fix color detection
  prevent throwing NOT_FOUND error when tube is empty
  [Validator] Update missing validator translation for Swedish
  [FrameworkBundle] Fix eager-loading of env vars in ConfigBuilderCacheWarmer
  [Messenger] Fix failing Redis test
  [Validator] Update Italian (it) translations
  [Validator] Missing translations for Hungarian (hu) #53769
2024-02-07 15:00:01 +01:00
Nicolas Grekas
94e2efb5ea Skip Twig v3.9-dev for now 2024-02-07 14:42:57 +01:00
Christian Flothmann
86a36885b2 allow Twig 4 2023-12-11 08:59:31 +01:00
Farhad Safarov
4842c21e6a [PropertyAccess][Serializer] Fix "type unknown" on denormalize 2023-12-08 15:01:38 +01:00
Alexandre Daubois
e22f0a5c0b [FrameworkBundle][Serializer] Deprecate annotations 2023-10-17 13:44:42 +02: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
Kevin Bond
a4425b6098 [DI] Simplify using DI attributes with ServiceLocator/Iterator's 2023-10-12 14:36:18 +02:00
Alexander M. Turek
61ddafe610 Merge branch '6.4' into 7.0
* 6.4: (43 commits)
  [AssetMapper] Fix entrypoint scripts are not preloaded
  Fix typo in method resolvePackages
  Make FormPerformanceTestCase compatible with PHPUnit 10
  Avoid calling getInvocationCount()
  [AssetMapper] Always downloading vendor files
  [Security] Fix resetting traceable listeners
  [HttpClient] Fix type error with http_version 1.1
  [DependencyInjection] Add tests for `AutowireLocator`/`AutowireIterator`
  [DependencyInjection] Add `#[AutowireIterator]` attribute and improve `#[AutowireLocator]`
  Update documentation link
  Fix typo that causes unit test to fail
  Fix CS
  [AssetMapper] Add audit command
  [Mailer] Use idn encoded address otherwise Brevo throws an error
  [Messenger] Resend failed retries back to failure transport
  [FrameworkBundle] Fix call to invalid method in NotificationAssertionsTrait
  [Validator] Add missing italian translations
  [Notifier] Fix failing testcase
  Fix order array sum normalizedData and nestedData
  Add test for 0 and '0' in PeriodicalTrigger Fix '0' case error and remove duplicate code
  ...
2023-10-07 18:01:47 +02:00
Kevin Bond
36e0b6db76 [DependencyInjection] Add tests for AutowireLocator/AutowireIterator 2023-10-06 10:49:47 +02:00
Alexander Schranz
21ec65ccfd Move UriSigner from HttpKernel to HttpFoundation package 2023-10-02 14:20:57 +02:00
Alexander M. Turek
817072d724 Drop support for Twig 2 2023-09-11 14:52:21 +02:00
Alexander M. Turek
0182a344e6 feature #51425 [FrameworkBundle][Validator] Deprecate annotation occurrences (alexandre-daubois)
This PR was merged into the 6.4 branch.

Discussion
----------

[FrameworkBundle][Validator] Deprecate annotation occurrences

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | yes
| Tickets       | Part of https://github.com/symfony/symfony/issues/51381
| License       | MIT
| Doc PR        | -

 * Deprecate `framework.validation.enable_annotations` in favor of `framework.validation.enable_attributes`
 * Deprecate `framework.serializer.enable_annotations` in favor of use `framework.serializer.enable_attributes`
 * Deprecate `ValidatorBuilder::enableAnnotationMapping()` in favor of `ValidatorBuilder::enableAttributeMapping()`
 * Deprecate `ValidatorBuilder::disableAnnotationMapping()` in favor of `ValidatorBuilder::disableAttributeMapping()`
 * Deprecate `AnnotationLoader` in favor of `AttributeLoader`

Commits
-------

2e1e805f89 [FrameworkBundle][Validator] Deprecate annotation occurrences
2023-08-22 13:52:44 +02:00
Alexandre Daubois
44502d0902 [FrameworkBundle][Validator] Deprecate annotation occurrences 2023-08-22 13:39:58 +02:00
Nicolas Grekas
51353c9ede feature #51392 [DependencyInjection] add #[AutowireLocator] attribute (kbond)
This PR was squashed before being merged into the 6.4 branch.

Discussion
----------

[DependencyInjection] add `#[AutowireLocator]` attribute

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | n/a
| License       | MIT
| Doc PR        | todo

The `AutowireLocator` attribute allows configuring service locators inline:

```php
use Symfony\Component\DependencyInjection\Attribute\AutowireLocator;

public function someAction(
    #[AutowireLocator(RouterInterface::class, SluggerInterface::class)]
    ContainerInterface $container,
): Response {
    $container->get(RouterInterface::class);
    $container->get(SluggerInterface::class);
}
```

You can customize the key and have optional services:

```php
use Symfony\Component\DependencyInjection\Attribute\AutowireLocator;

public function someAction(
    #[AutowireLocator(
        router: RouterInterface::class,
        slugger: '?'.SluggerInterface::class,
    )]
    ContainerInterface $container,
): Response {
    $container->get('router');

    if ($container->has('slugger')) {
        $container->get('slugger');
    }
}
```

Commits
-------

5fa830d82b [DependencyInjection] add `#[AutowireLocator]` attribute
2023-08-21 14:39:49 +02:00
Kevin Bond
2f7a745282 [DependencyInjection] add #[AutowireLocator] attribute 2023-08-21 14:39:44 +02:00
Nicolas Grekas
cac604d6ff Merge branch '6.3' into 6.4
* 6.3:
  [Validator] Add annotation in Constraint
  [VarExporter] Remove unused test files
  [FrameworkBundle] Remove unused test file
  [DependencyInjection] Remove unused test file
  [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:49:45 +02:00
Nicolas Grekas
32b42c1189 bug #51396 [HttpKernel] Fix missing Request in RequestStack for StreamedResponse (Ismail Turan)
This PR was merged into the 6.3 branch.

Discussion
----------

[HttpKernel] Fix missing Request in RequestStack for StreamedResponse

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #46743
| License       | MIT
| Doc PR        | -

Similar to #51139 by `@DaDeather`, see discussion there.

Commits
-------

ca1c40e66d [HttpKernel] Fix missing Request in RequestStack for StreamedResponse
2023-08-16 12:13:48 +02:00
Ismail Turan
8b05b1a638 [HttpKernel] Fix missing Request in RequestStack for StreamedResponse 2023-08-16 10:24:43 +02:00
Nicolas Grekas
a1c7843c85 Merge branch '6.3' into 6.4
* 6.3:
  [DependencyInjection][HttpKernel] Fix using `#[AutowireCallable]` with controller arguments
2023-08-02 12:47:39 +02:00
HypeMC
6bf747513c [DependencyInjection][HttpKernel] Fix using #[AutowireCallable] with controller arguments 2023-08-01 21:26:45 +02:00
Grégoire Pineau
7ce370c61c [HttpKernel] Enhance exception if possible 2023-07-25 10:39:05 +02:00
Frank Fiebig
08c0866859 [Lock] 7.0 remove deprecations in Lock Component 2023-07-05 10:10:07 +02:00