This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[FrameworkBundle] Add renderForm() helper setting the appropriate HTTP status code
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | n/a
| License | MIT
| Doc PR | todo
A 422 HTTP status code should be returned after the submission of an invalid form. Some libraries including [Turbo](https://github.com/hotwired/turbo/pull/39) rely on this behavior and will not display the updated form (containing errors) unless this status code is present.
Rails also [recently switched to this behavior ](https://github.com/rails/rails/pull/41026) by default for the same reason.
I propose to introduce a new helper method rendering the form and setting the appropriate status code. It makes the code cleaner:
```php
// src/Controller/TaskController.php
// ...
use Symfony\Component\HttpFoundation\Request;
class TaskController extends AbstractController
{
public function new(Request $request): Response
{
$task = new Task();
$form = $this->createForm(TaskType::class, $task);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$task = $form->getData();
// ...
return $this->redirectToRoute('task_success');
}
return $this->renderForm('task/new.html.twig', $form);
}
}
```
Commits
-------
4c77e50e6a [FrameworkBundle] Add renderForm() helper setting the appropriate HTTP status code
This PR was merged into the 5.3-dev branch.
Discussion
----------
[HttpFoundation] deprecate the NamespacedAttributeBag class
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | yes
| Tickets | Fix#32616
| License | MIT
| Doc PR |
Commits
-------
da9de69de0 deprecate the NamespacedAttributeBag class
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[Notifier] [GoogleChat] [BC BREAK] Rename threadKey parameter to thread_key + set parameter via ctor
| Q | A
| ------------- | ---
| Branch? | 5.x, but BC BREAK for experimental bridge
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | ---
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/14834
| Recipe | https://github.com/symfony/recipes/pull/871
All bridges receive their options via the `constructor` and use snake_case parameters.
### Todos
* [x] Update recipe
* [x] Update documentation
cc @GromNaN as you provided the bridge
Commits
-------
5a71928ef1 [Notifier] [GoogleChat] [BC BREAK] Rename threadKey parameter to thread_key + set parameter via ctor
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Notifier] [Octopush] Use the correct provider
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | ---
| License | MIT
| Doc PR | ---
Follows #39702
Commits
-------
9ecef3bfa1 [Notifier] [Octopush] Use the correct provider
This PR was merged into the 4.4 branch.
Discussion
----------
[DoctrineBridge] Fix circular loop with EntityManager
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | fix#39619
| License | MIT
| Doc PR | -
This PR fix a segfault in EntityManager by making the LazyEventManager handle EventSubscriber in a lazy way.
Maybe #34200 too
Commits
-------
23d692107c Fix circular loop with EntityManager
* 5.2:
µCS fix
CS fix
CS fix
[travis] use PHP 8.0 to patch return types and run deps=low
Add me as a Notifier code owner
Update sl_SI translations
Don't trigger deprecation for deprecated aliases pointing to deprecated definitions
[HttpFoundation] use atomic writes in MockFileSessionStorage
fix typo
Make EmailMessage & SmsMessage transport nullable
remove unused argument
[SecurityBundle] Drop dead check
[DI] fix param annotation
[SecurityBundle] Remove invalid service definition
[Config] Add \Symfony\Component\Config\Loader::load() return type
Simplify PHP CS Fixer config
Rename normalize param
This PR was merged into the 4.4 branch.
Discussion
----------
[travis] use PHP 8.0 to patch return types and run deps=low
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
(I need to verify that DebugClassLoader works as expected before merging)
Commits
-------
7f5ea78fb8 [travis] use PHP 8.0 to patch return types and run deps=low
This PR was merged into the 4.4 branch.
Discussion
----------
[DependencyInjection] Don't trigger notice for deprecated aliases pointing to deprecated definitions
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Defining an alias that points to a deprecated definition should trigger a deprecation notice, but when the alias itself is deprecated, it should not trigger.
Commits
-------
38f98a1165 Don't trigger deprecation for deprecated aliases pointing to deprecated definitions
This PR was merged into the 4.4 branch.
Discussion
----------
[Config] Add \Symfony\Component\Config\Loader::load() return type
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix https://github.com/symfony/symfony/issues/39761 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR |
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too.)
- Features and deprecations must be submitted against branch 5.x.
-->
`Symfony\Component\Config\Loader::load()` is missing return type, added it for consistency and static analysis purposes.
Commits
-------
fec66e61c8 [Config] Add \Symfony\Component\Config\Loader::load() return type
This PR was merged into the 4.4 branch.
Discussion
----------
Simplify PHP CS Fixer config
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | n/a
| License | MIT
| Doc PR |
same rules, just written in easier way
Commits
-------
95e33edc1c Simplify PHP CS Fixer config
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] use atomic writes in MockFileSessionStorage
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39167
| License | MIT
| Doc PR | -
Instead of #39808
Commits
-------
5290e978bd [HttpFoundation] use atomic writes in MockFileSessionStorage
This PR was merged into the 4.4 branch.
Discussion
----------
Update sl_SI translations
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38763
| License | MIT
| Doc PR | N/A
Hello, this is an update for the Slovenian (sl_SI translations).
Commits
-------
b236aae766 Update sl_SI translations
This PR was merged into the 5.3-dev branch.
Discussion
----------
No patch version in CHANGELOG
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | ---
| License | MIT
| Doc PR | ---
Based on https://github.com/symfony/symfony-docs/pull/14830
cc @fabpot, feel free to close, as we discussed this already via Slack
Commits
-------
575d9b04b4 No patch version in CHANGELOG
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[Notifier] Change Dsn api
| Q | A
| ------------- | ---
| Branch? | 5.x, BC BREAK, but experimental
| Bug fix? | yes
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#39533
| License | MIT
| Doc PR | ---
This PR
* [x] adds a new `getOptions()` method, which could be helpful and also improves testability instead of dealing with reflections
* [x] makes the `__construct()` method accept only a dsn as string
* [x] removes `fromString()` method
* [x] afterwards you can always rely on `getOriginalDsn()` method, like described by its return type, before it returned null when Dsn class was instantiated via the constructor and a `TypeError` was thrown
* [x] refactored the tests
This should be done for the Mailer Dsn class too, but this class is not experimental anymore... 🤔
Commits
-------
44e8ca164f [Notifier] Change Dsn api