Commit Graph

54765 Commits

Author SHA1 Message Date
Alexander M. Turek
9c3ee3d82e minor #41228 Introduce SYMFONY_FEATURE_BRANCH variable in Travis config (derrabus)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Introduce SYMFONY_FEATURE_BRANCH variable in Travis config

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | #40887
| License       | MIT
| Doc PR        | not needed

This PR proposes to introduce a `SYMFONY_FEATURE_BRANCH` variable that always points to the branch of Symfony's next feature release. This is a setting that we need to adjust twice a year. This way, the branch does not have to follow the `.x` suffix convention anymore.

~~I'm currently testing my changes against the 5.x branch. As soon as the PR is ready, I will target 4.4.~~

Update: `SYMFONY_FEATURE_BRANCH` is now populated via an API request.

Commits
-------

7de11c0e44 Introduce SYMFONY_FEATURE_BRANCH variable in Travis config
2021-05-15 00:43:41 +02:00
Alexander M. Turek
7de11c0e44 Introduce SYMFONY_FEATURE_BRANCH variable in Travis config 2021-05-15 00:43:34 +02:00
Ivo Valchev
b79962b676 Added and improved Bulgarian translations 2021-05-14 22:24:36 +02:00
Alexander M. Turek
6f1c4b8c58 PHP 8.1 must not cause the build to fail (yet) 2021-05-14 20:01:46 +02:00
Alexander M. Turek
b0b45105d7 Add _run_tests bash function 2021-05-14 19:21:16 +02:00
Alexander M. Turek
de4f0170e2 Add a GitHub Action for tests against PHP 8.1 2021-05-14 17:37:17 +02:00
Alexander M. Turek
fd02ec075d Merge branch '5.2' into 5.x
* 5.2:
  Add missing charset to content-type for Slack notifier
  [Console] Fix Windows code page support
  [CI][Psalm] Install stable/released PHPUnit
  Bump Symfony version to 5.2.9
  Update VERSION for 5.2.8
  Update CHANGELOG for 5.2.8
  Bump Symfony version to 4.4.24
  Update VERSION for 4.4.23
  Update CONTRIBUTORS for 4.4.23
  Update CHANGELOG for 4.4.23
  Missing security lt translations added
2021-05-14 17:14:00 +02:00
Alexander M. Turek
5e63cbff4f Merge branch '4.4' into 5.2
* 4.4:
  Missing security lt translations added
2021-05-14 17:11:26 +02:00
Nicolas Grekas
5ccba2c3e5 [HttpClient] fix adding query string to relative URLs with scoped clients 2021-05-14 09:58:18 +02:00
Andrii Bodnar
8f34572a65 [Security] Added Ukrainian translations 2021-05-13 14:52:11 +03:00
Robin Chalas
e41aacd116 minor #41216 [Security\Guard] Fix test (chalasr)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Security\Guard] Fix test

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

94cf39932c [Security\Guard] Fix test
2021-05-13 12:42:35 +02:00
Robin Chalas
c61617e6ac bug #41214 [Console] fix registering command aliases when using the new "cmd|alias" syntax for names (nicolas-grekas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Console] fix registering command aliases when using the new "cmd|alias" syntax for names

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #41212
| License       | MIT
| Doc PR        | -

Commits
-------

6633b95597 [Console] fix registering command aliases when using the new "cmd|alias" syntax for names
2021-05-13 12:34:14 +02:00
Robin Chalas
94cf39932c [Security\Guard] Fix test 2021-05-13 12:32:58 +02:00
Nyholm
90666777c7
minor #41097 [Security] Missing lt translations (rmikalkenas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Missing lt translations

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #41054
| License       | MIT

For minute/minutes translation I decided to use "min." abbreviation, because in lithuanian language the plural translation might not always match the word case.
For example:
1 minute -> 1 minutė
2 minutes -> 2 minutės
...
10 minutes -> 10 minučių
...
21 minutes -> 21 minutė
22 minutes -> 22 minutės
...
30 minutes -> 30 minučių

and so on...

Commits
-------

f2dedd8a53 Missing security lt translations added
2021-05-13 12:10:00 +02:00
Nyholm
35dbf8c81f
bug #41211 [Notifier] Add missing charset to content-type for Slack notifier (norkunas)
This PR was merged into the 5.2 branch.

Discussion
----------

[Notifier] Add missing charset to content-type for Slack notifier

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

Symfony HttpClient doesn't set charset for the Content-Type header when used with `json` request option so with each response slack includes:
```
"response_metadata" => array:1 [
  "warnings" => array:1 [
    0 => "missing_charset"
  ]
]
```

Commits
-------

e642100ea5 Add missing charset to content-type for Slack notifier
2021-05-13 11:57:41 +02:00
Nicolas Grekas
6633b95597 [Console] fix registering command aliases when using the new "cmd|alias" syntax for names 2021-05-13 11:45:23 +02:00
Tomas
e642100ea5 Add missing charset to content-type for Slack notifier 2021-05-13 11:16:24 +03:00
Nicolas Grekas
49e5664309 Merge branch '4.4' into 5.2
* 4.4:
  [Console] Fix Windows code page support
  [CI][Psalm] Install stable/released PHPUnit
  Bump Symfony version to 4.4.24
  Update VERSION for 4.4.23
  Update CONTRIBUTORS for 4.4.23
  Update CHANGELOG for 4.4.23
2021-05-13 08:30:05 +02:00
Nicolas Grekas
49dd6ef279 bug #41210 [Console] Fix Windows code page support (orkan)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Fix Windows code page support

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37385, Fix #35842, Fix #36324, Fix #37495, Fix #37278
| License       | MIT

Corrects mojibake problem on Windows where an OEM code page was applied to an input string and then messed with PHP.internal_encoding setting used by the script. This caused strings with different encodings to be displayed on the console output.

Commits
-------

41452785c6 [Console] Fix Windows code page support
2021-05-13 08:28:07 +02:00
Marek Zajac
41452785c6 [Console] Fix Windows code page support 2021-05-13 07:53:50 +02:00
Nicolas Grekas
7b3d821c7c minor #41197 [Translation] Fix LokaliseProviderTest NS (lyrixx)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Translation] Fix LokaliseProviderTest NS

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | no
| Deprecations? |
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

8b8b277092 [Translation] Fix LokaliseProviderTest NS
2021-05-12 18:19:34 +02:00
Nicolas Grekas
179c9e5a98 minor #41201 [Mailer][Notifier] Sort transport factories alphabetically (OskarStark)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Mailer][Notifier] Sort transport factories alphabetically

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

I would like to get this merged in 5.3 to avoid conflicts in the future, not sure it is possible

Commits
-------

e14816cbd6 [Notifier] [Mailer] Sort transport factories alphabetically
2021-05-12 18:09:42 +02:00
Nicolas Grekas
616b2c9fdb minor #41183 [CI][Psalm] Install stable/released PHPUnit (Nyholm)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[CI][Psalm] Install stable/released PHPUnit

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

PHPUnit 10 is soon released. We dont need to install it before it is actually released.

Currently, PHPUnit is updating dependencies and we get psalm failing with things like:

<img width="918" alt="Screenshot 2021-05-12 at 08 28 29" src="https://user-images.githubusercontent.com/1275206/117930440-468cc500-b2fe-11eb-8028-579478c001cf.png">
<img width="972" alt="Screenshot 2021-05-12 at 08 33 54" src="https://user-images.githubusercontent.com/1275206/117930443-47bdf200-b2fe-11eb-8cb7-79255532e899.png">

Commits
-------

2345614316 [CI][Psalm] Install stable/released PHPUnit
2021-05-12 18:08:07 +02:00
Nyholm
2345614316 [CI][Psalm] Install stable/released PHPUnit 2021-05-12 18:07:54 +02:00
Oskar Stark
e14816cbd6 [Notifier] [Mailer] Sort transport factories alphabetically 2021-05-12 17:01:34 +02:00
Grégoire Pineau
8b8b277092 [Translation] Fix LokaliseProviderTest NS 2021-05-12 16:03:49 +02:00
Fabien Potencier
aea15bc04f Bump Symfony version to 5.3.0 2021-05-12 15:50:25 +02:00
Fabien Potencier
4535fab4e8
Merge pull request #41196 from fabpot/release-5.3.0-BETA4
released v5.3.0-BETA4
2021-05-12 15:47:28 +02:00
Fabien Potencier
bbbedc09d9 Update VERSION for 5.3.0-BETA4 2021-05-12 15:44:42 +02:00
Fabien Potencier
7f49a3d8cd Update CHANGELOG for 5.3.0-BETA4 2021-05-12 15:44:34 +02:00
Nicolas Grekas
8fb0ed752e Merge branch '5.2' into 5.x
* 5.2:
  [CI][Psalm] Install stable/released PHPUnit
  [Security] Add missing Finnish translations
  [Security][Guard] Prevent user enumeration via response content
2021-05-12 15:40:11 +02:00
Fabien Potencier
b802c6d98d Bump Symfony version to 5.2.9 2021-05-12 15:34:48 +02:00
Fabien Potencier
23147f993c
Merge pull request #41195 from fabpot/release-5.2.8
released v5.2.8
2021-05-12 15:28:09 +02:00
Fabien Potencier
27b7ebe9de Update VERSION for 5.2.8 2021-05-12 15:27:53 +02:00
Fabien Potencier
35fbe60f4f Update CHANGELOG for 5.2.8 2021-05-12 15:27:44 +02:00
Fabien Potencier
22a9510dff Bump Symfony version to 4.4.24 2021-05-12 15:18:54 +02:00
Fabien Potencier
bb7ec823d2
Merge pull request #41194 from fabpot/release-4.4.23
released v4.4.23
2021-05-12 15:15:51 +02:00
Nicolas Grekas
293919ff65 Merge branch '4.4' into 5.2
* 4.4:
  [CI][Psalm] Install stable/released PHPUnit
  [Security] Add missing Finnish translations
  [Security][Guard] Prevent user enumeration via response content
2021-05-12 15:14:35 +02:00
Fabien Potencier
5f8f60cdbc Update VERSION for 4.4.23 2021-05-12 15:13:32 +02:00
Fabien Potencier
91b37fdb8d Update CONTRIBUTORS for 4.4.23 2021-05-12 15:13:25 +02:00
Fabien Potencier
32932d00ff Update CHANGELOG for 4.4.23 2021-05-12 15:13:15 +02:00
Nicolas Grekas
d5c0fbac85 Merge branch '3.4' into 4.4
* 3.4:
  [Security][Guard] Prevent user enumeration via response content
2021-05-12 14:42:28 +02:00
Nicolas Grekas
2a581d22cc security #cve-2021-21424 [Security][Guard] Prevent user enumeration (chalasr)
This PR was merged into the 3.4 branch.
2021-05-12 14:32:10 +02:00
Nicolas Grekas
2ac23c6a33 minor #41190 [FrameworkBundle] improve AbstractController::renderForm() (nicolas-grekas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[FrameworkBundle] improve AbstractController::renderForm()

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Even better than #41178, this requires a simple change on apps, and is compatible with multiple forms.

Usage:
```diff
-        return $this->render('thing/new.html.twig', [
+        return $this->renderForm('thing/new.html.twig', [
             'thing' => $thing,
-            'form' => $form->createView(),
+            'form' => $form,
         ]);
```

In 5.4, we could even deprecate passing a FormView to render() so that we can always set the 422.

Commits
-------

e244d31fb0 [FrameworkBundle] improve AbstractController::renderForm()
2021-05-12 14:10:04 +02:00
Nicolas Grekas
e244d31fb0 [FrameworkBundle] improve AbstractController::renderForm() 2021-05-12 13:31:16 +02:00
Nicolas Grekas
af77943d4b minor #41187 [Translation] Fix Crowdin Translation Provider DSN example (andrii-bodnar)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Translation] Fix Crowdin Translation Provider DSN example

| Q             | A
| ------------- | ---
| Branch?       | 5.x <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       |  <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | <!-- required for new features -->

Crowdin DSN structure was changed in #41146. This PR updates the README for Crowdin Translation Provider.

Commits
-------

8465e885ba [Translation] Fix Crowdin Translation Provider DSN example
2021-05-12 13:20:50 +02:00
Andrii Bodnar
8465e885ba [Translation] Fix Crowdin Translation Provider DSN example 2021-05-12 12:33:38 +03:00
Fabien Potencier
854226bbd3 feature #41178 [FrameworkBundle] Introduce AbstractController::renderForm() instead of handleForm() (lyrixx)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[FrameworkBundle] Introduce `AbstractController::renderForm()` instead of `handleForm()`

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | yes
| Tickets       |
| License       | MIT
| Doc PR        | -

I'm know I'm a bit late on this once, but I don't really like the `handleForm()` method:

1. It uses callable and PHP does not support type hint on callable so it's error prone. While trying the feature I forgot to return a response and I got a fatal error "cannot call getStatusCode() on null". Not really user friendly;
1. callables receive `mixed $data`: it's too generic. Static analysis could not work properly and so autocompletion does not work;
1. This is a new syntax to learn;
1. All documentation, blog post, etc should be updated, and it's not fixable with `sed` or similar tool;
1. This is not really flexible. We are going to lock people with this flow, and they will hesitate to use the "old" syntax when they need more flexibility;

That's why I propose this alternative, which is  more simple I guess and addresses issues I leveraged.

I read somewhere that calling `isValid()` trigger twice the validation logic: This is wrong. The validation occurs during form submitting via an event listener. calling `isValid()` only check if there is some errors attached to the form.

---

Usage:
```diff
     #[Route('/new', name: 'thing_new', methods: ['GET', 'POST'])]
     public function new(Request $request): Response
     {
         $thing = new Thing();
         $form = $this->createForm(ThingType::class, $thing);

         $form->handleRequest($request);
         if ($form->isSubmitted() && $form->isValid()) {
             $entityManager = $this->getDoctrine()->getManager();
             $entityManager->persist($thing);
             $entityManager->flush();

             return $this->redirectToRoute('thing_index');
         }

-        return $this->render('thing/new.html.twig', [
+        return $this->renderForm('thing/new.html.twig', $form, [
             'thing' => $thing,
             'form' => $form->createView(),
         ]);
     }
```

Commits
-------

27f8f50386 [FrameworkBundle] Introduce AbstractController::renderForm()
2021-05-12 11:09:45 +02:00
Grégoire Pineau
27f8f50386 [FrameworkBundle] Introduce AbstractController::renderForm() 2021-05-12 10:25:46 +02:00
Nicolas Grekas
fef109932f minor #41186 [FrameworkBundle] fix AbstractController::handleForm() (nicolas-grekas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[FrameworkBundle] fix AbstractController::handleForm()

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no (fixing a fix)
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

777c3c25b2 [FrameworkBundle] fix AbstractController::handleForm()
2021-05-12 09:49:16 +02:00