Commit Graph

54485 Commits

Author SHA1 Message Date
Alexander M. Turek
a5e8e7d5e0 Make Serializable implementation internal and final 2021-05-03 22:23:22 +02:00
Alexander M. Turek
29d51cad6f Merge branch '5.2' into 5.x
* 5.2:
  [Security] Update Security Arabic Translations
  add missing vietnamese translations
  Add missing Hungarian translations
  Update Romanian Translation based on English
2021-05-02 22:00:56 +02:00
Alexander M. Turek
73174430cf Merge branch '4.4' into 5.2
* 4.4:
  [Security] Update Security Arabic Translations
  add missing vietnamese translations
  Add missing Hungarian translations
  Update Romanian Translation based on English
2021-05-02 22:00:24 +02:00
Alexander M. Turek
c8cc4c3ee3 minor #41068 [Security] Update Security Arabic Translations (MouadZIANI)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Security] Update Security Arabic Translations

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #41028
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Related to #41028

Commits
-------

68c10337cc [Security] Update Security Arabic Translations
2021-05-02 21:25:58 +02:00
Mouad ZIANI
68c10337cc [Security] Update Security Arabic Translations 2021-05-02 21:25:52 +02:00
Alexander M. Turek
dab2c9c255 minor #41073 [Security] Add missing Hungarian translations (Daniel Tiringer)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Add missing Hungarian translations

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #41049
| License       | MIT
| Doc PR        | N/A

This PR adds missing Hungarian translations.

Commits
-------

89057b97d0 Add missing Hungarian translations
2021-05-02 21:24:16 +02:00
Alexander M. Turek
1621d78a37 minor #41069 Update Romanian Translation based on English (cybernet)
This PR was merged into the 4.4 branch.

Discussion
----------

Update Romanian Translation based on English

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

Commits
-------

d2b38fa54a Update Romanian Translation based on English
2021-05-02 21:21:38 +02:00
Alexander M. Turek
9857faed7d bug #40994 [Config] More accurate message on invalid config builder (a-menshchikov)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Config] More accurate message on invalid config builder

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

Throw exception when trying to autowire nested bundle config instead of ConfigBuilder (related Doc PR https://github.com/symfony/symfony-docs/pull/15300).
Also renamed test class AcmeConfigBuilder to AcmeConfig according config builders auto naming.

Inspired by a chat with `@Nyholm`

Commits
-------

0501ecc2d8 More accurate message on invalid config builder
2021-05-02 21:10:54 +02:00
Alexander M. Turek
21e3738fdd bug #40767 [Routing] Fix localized paths (l-vo)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Routing] Fix localized paths

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

Related to #40266, localized paths does not work anymore. This PR aims to fix that and add a rework on the tests (using real annotations/attributes instead of guessing the parsing that may lead to errors).

Commits
-------

9bf4a24a6e [Routing] Fix localized paths
2021-05-02 20:54:57 +02:00
Nicolas Grekas
e2fc035c5b minor #41074 [Security] Add missing Vietnamese translations (jschaedl)
This PR was submitted for the 5.x branch but it was merged into the 4.4 branch instead.

Discussion
----------

[Security] Add missing Vietnamese translations

| Q             | A
| ------------- | ---
| Branch?       | 4.4<!-- 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 -->
<!--
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.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
-->

Commits
-------

3703010b1b add missing vietnamese translations
2021-05-02 20:24:29 +02:00
Jan Schädlich
3703010b1b add missing vietnamese translations 2021-05-02 18:29:24 +01:00
Daniel Tiringer
89057b97d0 Add missing Hungarian translations 2021-05-02 17:43:59 +02:00
cybernet
d2b38fa54a
Update Romanian Translation based on English
2 missing keys
2021-05-02 11:15:38 +01:00
Christian Flothmann
2ba1f89a3a fix merge 2021-05-02 10:42:38 +02:00
Alexander M. Turek
7fe37ba2ef Merge branch '5.2' into 5.x
* 5.2:
  Bump Symfony version to 5.2.8
  Update VERSION for 5.2.7
  Update CHANGELOG for 5.2.7
  Bump Symfony version to 4.4.23
  Update VERSION for 4.4.22
  Update CONTRIBUTORS for 4.4.22
  Update CHANGELOG for 4.4.22
2021-05-02 00:13:55 +02:00
Alexander M. Turek
00be0b6c8b Merge branch '4.4' into 5.2
* 4.4:
  Bump Symfony version to 4.4.23
  Update VERSION for 4.4.22
  Update CONTRIBUTORS for 4.4.22
  Update CHANGELOG for 4.4.22
2021-05-02 00:12:38 +02:00
Fabien Potencier
b6966d9091 Bump Symfony version to 5.3.0 2021-05-01 17:01:32 +02:00
Fabien Potencier
3b7b94d417
Merge pull request #41019 from fabpot/release-5.3.0-BETA2
released v5.3.0-BETA2
2021-05-01 16:58:35 +02:00
Fabien Potencier
a977a2852a Update VERSION for 5.3.0-BETA2 2021-05-01 16:58:22 +02:00
Fabien Potencier
495a01769f Update CHANGELOG for 5.3.0-BETA2 2021-05-01 16:58:15 +02:00
Fabien Potencier
77c2496c88 Bump Symfony version to 5.2.8 2021-05-01 16:56:20 +02:00
Fabien Potencier
b9afe804b7
Merge pull request #41018 from fabpot/release-5.2.7
released v5.2.7
2021-05-01 16:53:29 +02:00
Fabien Potencier
c3b3c33d41 Update VERSION for 5.2.7 2021-05-01 16:53:15 +02:00
Fabien Potencier
849829f3f1 Update CHANGELOG for 5.2.7 2021-05-01 16:53:01 +02:00
Fabien Potencier
30dd608576 Bump Symfony version to 4.4.23 2021-05-01 16:48:05 +02:00
Fabien Potencier
306adcdbc2
Merge pull request #41017 from fabpot/release-4.4.22
released v4.4.22
2021-05-01 16:39:01 +02:00
Fabien Potencier
f015673f30 Update VERSION for 4.4.22 2021-05-01 16:38:48 +02:00
Fabien Potencier
7aa72b9028 Update CONTRIBUTORS for 4.4.22 2021-05-01 16:38:47 +02:00
Fabien Potencier
97cafc72e2 Update CHANGELOG for 4.4.22 2021-05-01 16:38:41 +02:00
Fabien Potencier
cebbe5d7ad Merge branch '5.2' into 5.x
* 5.2:
  [Security] Add missing French translations for logging throttling
2021-05-01 16:29:44 +02:00
Fabien Potencier
998cdea529 Merge branch '4.4' into 5.2
* 4.4:
  [Security] Add missing French translations for logging throttling
2021-05-01 16:29:34 +02:00
Fabien Potencier
c92acf4160 minor #41003 [Security] Add missing French translations for logging throttling (jmsche)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Add missing French translations for logging throttling

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #40863 (at least for French)
| License       | MIT
| Doc PR        | N/A

Note: this PR replaces #40889 as somehow force-push closed the other PR.

Also this one targets 4.4 branch directly :)

Commits
-------

b64efd2848 [Security] Add missing French translations for logging throttling
2021-05-01 16:25:58 +02:00
Fabien Potencier
942847f169 feature #41002 [FrameworkBundle][HttpKernel] Move IDE file link formats from FrameworkExtension to FileLinkFormatter (MatTheCat)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[FrameworkBundle][HttpKernel] Move IDE file link formats from FrameworkExtension to FileLinkFormatter

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

I made `FileLinkFormatter` aware of IDEs file link formats so that you can set `framework.ide` as an env var containing a name (like `atom`).

Not sure how to test it from the `FrameworkExtension` POV though 🤔

Commits
-------

42a27b2770 Move IDE file link formats from FrameworkExtension to FileLinkFormatter
2021-05-01 16:23:06 +02:00
Fabien Potencier
4cc0ab3e99 bug #41014 [Routing] allow extending Route attribute (robmro27)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[Routing] allow extending Route attribute

| 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 -->

There is probably missed `\ReflectionAttribute::IS_INSTANCEOF` parameter and because of that Route attribute class could not be extended. This could be used by some popular bundles like `FOSRestBundle` for example. Right
now it's not possible to add attributes support there like it was before (extending Route Annotation).

Commits
-------

d733b78f88 [Routing] allow extending Route attribute
2021-05-01 16:20:47 +02:00
robmro27
d733b78f88 [Routing] allow extending Route attribute 2021-05-01 16:20:43 +02:00
Fabien Potencier
610c263181 minor #41009 [Config ]Remove log message when no configuration is found in ConfigBuilder (alexander-schranz)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Config ]Remove log message when no configuration is found in ConfigBuilder

| Q             | A
| ------------- | ---
| Branch?       | 5.x for features / 4.4 or 5.2 for bug fixes <!-- see below -->
| Bug fix?      | -
| 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 -->
<!--
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.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
-->

I think when a bundle has no configuration we should also not log an warning.

Commits
-------

20c03b5c87 Remove log message when not configuration is found
2021-05-01 16:15:21 +02:00
Christian Flothmann
83fd6ed8fb Merge branch '5.2' into 5.x
* 5.2:
  run tests against doctrine/persistence 2.2 again
  [Security] Do not try to rehash null-passwords
  Small phpdoc imporvement
2021-05-01 16:00:17 +02:00
Christian Flothmann
001aeb8bcb Merge branch '4.4' into 5.2
* 4.4:
  Small phpdoc imporvement
2021-05-01 15:46:24 +02:00
Christian Flothmann
46d8bcaaaa minor #41015 run tests against doctrine/persistence 2.2 again (xabbuh)
This PR was merged into the 5.2 branch.

Discussion
----------

run tests against doctrine/persistence 2.2 again

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

Commits
-------

9159fd317d run tests against doctrine/persistence 2.2 again
2021-05-01 15:38:44 +02:00
Christian Flothmann
9159fd317d run tests against doctrine/persistence 2.2 again 2021-05-01 15:13:29 +02:00
Fabien Potencier
0489ffcaed feature #39913 [OptionsResolver] Add prototype definition support for nested options (yceruto)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[OptionsResolver] Add prototype definition support for nested options

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

This proposal adds a new method `setPrototype(true)` to the `OptionsResolver` component to mark options definition as array prototype:
```php
$this->resolver
    ->setDefault('connections', static function (OptionsResolver $resolver) { // nested option
        $resolver
            ->setPrototype(true) // <- the new method
            ->setRequired('table')
            ->setDefaults(['user' => 'root', 'password' => null]);
    })
;
```
This feature will allow passing options this way:
```php
$this->resolver->resolve([
    'connections' => [
        'default' => [ // <- the array index "default" is optional and validation free
            'table' => 'default',
        ],
        'custom' => [
            'user' => 'foo',
            'password' => 'pa$$',
            'table' => 'symfony',
        ],
    ],
])
```
You can add as many items as you want with the advantage of validating each item according to its prototype definition.

The result for this example would be:
```php
[
    'connections' => [
        'default' => [
            'user' => 'root',
            'password' => null,
            'table' => 'default',
        ],
        'custom' => [
            'user' => 'foo',
            'password' => 'pa$$',
            'table' => 'symfony',
        ],
    ],
]
```

This feature is feasible only for nested options so far and the nested option (e.g. "connections") must be of type array of array.

See the test cases for more details about this feature.

Cheers!

Commits
-------

29d41b1970 Add prototype definition support for nested options
2021-05-01 10:55:42 +02:00
Fabien Potencier
3cde49c084 minor #41004 [FrameworkBundle] Use more explicite wording for debug:container command (lyrixx)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[FrameworkBundle] Use more explicite wording for debug:container command

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

I spent too much time debugging something stupid (in my app) and I do think Symfony could do better to help.
In the application, there was:

```yaml
services:
    _defaults:
        autoconfigure: true

    get_set_method_normalizer:
        class: Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer
        tags:
            - { name: serializer.normalizer }
```

And I had to edit the priority. To ensure everything was right, I ran:

```
Symfony Container Services Tagged with "serializer.normalizer" Tag
==================================================================

 ------------------------------------------------------------ ---------- ---------------------------------------------------------------------------
  Service ID                                                   priority   Class name
 ------------------------------------------------------------ ---------- ---------------------------------------------------------------------------
  Symfony\Component\Serializer\Normalizer\DateTimeNormalizer   1          Symfony\Component\Serializer\Normalizer\DateTimeNormalizer
  App\Serializer\Normalizer\JsonApiItemNormalizer                         App\Serializer\Normalizer\JsonApiItemNormalizer
  get_set_method_normalizer                                               Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer
    "                                                          -900
  serializer.normalizer.constraint_violation_list              -915       Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer
  serializer.normalizer.datetimezone                           -915       Symfony\Component\Serializer\Normalizer\DateTimeZoneNormalizer
  serializer.normalizer.dateinterval                           -915       Symfony\Component\Serializer\Normalizer\DateIntervalNormalizer
  serializer.normalizer.data_uri                               -920       Symfony\Component\Serializer\Normalizer\DataUriNormalizer
  serializer.normalizer.datetime                               -910       Symfony\Component\Serializer\Normalizer\DateTimeNormalizer
  serializer.normalizer.json_serializable                      -900       Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer
  serializer.normalizer.problem                                -890       Symfony\Component\Serializer\Normalizer\ProblemNormalizer
  serializer.normalizer.object                                 -1000      Symfony\Component\Serializer\Normalizer\ObjectNormalizer
  serializer.denormalizer.array                                -990       Symfony\Component\Serializer\Normalizer\ArrayDenormalizer
  fos_rest.serializer.form_error_normalizer                    -10        FOS\RestBundle\Serializer\Normalizer\FormErrorNormalizer
  fos_rest.serializer.exception_normalizer.symfony             -10        FOS\RestBundle\Serializer\Normalizer\ExceptionNormalizer
  fos_rest.serializer.flatten_exception_normalizer             -10        FOS\RestBundle\Serializer\Normalizer\FlattenExceptionNormalizer
 ------------------------------------------------------------ ---------- ---------------------------------------------------------------------------

```

Please, focus on the `get_set_method_normalizer` line and the `"        -900` line.
To me, it's understandable. I first thought it's a bug in Symfony. But it is not.

The bug is in my application. since the service have `autoconfigure` + an explicit tag it has  finally 2 tags.
And the command was not really helpful
* the usage of `"` instead of a clear message is highly misleading.
* the fact Symfony registers the tag (`autoconfigure`) without a `priority` (nothing is displayed in the console) does not help either. BTW, we might registry tag with an explicit priority (0) instead of nothing. WDYT? I could do another PR for that.

So with this patch, I hope it'll be clearer:

```
root /app php bin/console debug:container --tag=serializer.normalizer

Symfony Container Services Tagged with "serializer.normalizer" Tag
==================================================================

 ------------------------------------------------------------ ---------- ---------------------------------------------------------------------------
  Service ID                                                   priority   Class name
 ------------------------------------------------------------ ---------- ---------------------------------------------------------------------------
  Symfony\Component\Serializer\Normalizer\DateTimeNormalizer   1          Symfony\Component\Serializer\Normalizer\DateTimeNormalizer
  App\Serializer\Normalizer\JsonApiItemNormalizer                         App\Serializer\Normalizer\JsonApiItemNormalizer
  get_set_method_normalizer                                               Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer
   (same service as previous, another tag)                     -900
  serializer.normalizer.constraint_violation_list              -915       Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer
  serializer.normalizer.datetimezone                           -915       Symfony\Component\Serializer\Normalizer\DateTimeZoneNormalizer
  serializer.normalizer.dateinterval                           -915       Symfony\Component\Serializer\Normalizer\DateIntervalNormalizer
  serializer.normalizer.data_uri                               -920       Symfony\Component\Serializer\Normalizer\DataUriNormalizer
  serializer.normalizer.datetime                               -910       Symfony\Component\Serializer\Normalizer\DateTimeNormalizer
  serializer.normalizer.json_serializable                      -900       Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer
  serializer.normalizer.problem                                -890       Symfony\Component\Serializer\Normalizer\ProblemNormalizer
  serializer.normalizer.object                                 -1000      Symfony\Component\Serializer\Normalizer\ObjectNormalizer
  serializer.denormalizer.array                                -990       Symfony\Component\Serializer\Normalizer\ArrayDenormalizer
  fos_rest.serializer.form_error_normalizer                    -10        FOS\RestBundle\Serializer\Normalizer\FormErrorNormalizer
  fos_rest.serializer.exception_normalizer.symfony             -10        FOS\RestBundle\Serializer\Normalizer\ExceptionNormalizer
  fos_rest.serializer.flatten_exception_normalizer             -10        FOS\RestBundle\Serializer\Normalizer\FlattenExceptionNormalizer
 ------
```

Commits
-------

3abebb16de [FrameworkBundle] Use more explicite wording for debug:container command
2021-05-01 07:30:39 +02:00
Fabien Potencier
56b664edf6 bug #41008 [Security] Do not try to rehash null-passwords (tjveldhuizen)
This PR was merged into the 5.2 branch.

Discussion
----------

[Security] Do not try to rehash null-passwords

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

Make sure no exception occurs when a passwordless user logs in.

Commits
-------

a2a944e668 [Security] Do not try to rehash null-passwords
2021-05-01 07:29:52 +02:00
Fabien Potencier
e46d964329 bug #41013 [Console] Remove spaces between arguments GithubActionReporter (franmomu)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Console] Remove spaces between arguments GithubActionReporter

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no (there is not release yet)
| New feature?  | no
| Deprecations? | no
| Tickets       |  -
| License       | MIT
| Doc PR        |  -

There shouldn't be blank spaces between the arguments of the `GithubActionReporter`, otherwise it shows the message in the wrong line, it can be seen here: https://github.com/franmomu/test_yaml_lint/pull/3/files

Both messages are supposed to be for line 3, but the warning one (with blank spaces) appears on line 1 (Check warning on line 1 in wrong_yaml.yaml).

Commits
-------

bd638a0fd8 Remove spaces between arguments
2021-05-01 07:27:06 +02:00
Fran Moreno
bd638a0fd8 Remove spaces between arguments
Blank spaces between the arguments of the GithubActionReporter
messages make them appear always on line 1.
2021-05-01 02:53:07 +02:00
Alexander Schranz
20c03b5c87
Remove log message when not configuration is found 2021-04-30 20:18:19 +02:00
Grégoire Pineau
3abebb16de [FrameworkBundle] Use more explicite wording for debug:container command 2021-04-30 19:49:31 +02:00
Thijs-jan Veldhuizen
a2a944e668 [Security] Do not try to rehash null-passwords 2021-04-30 19:39:44 +02:00
jmsche
b64efd2848 [Security] Add missing French translations for logging throttling 2021-04-30 16:11:22 +02:00
MatTheCat
42a27b2770
Move IDE file link formats from FrameworkExtension to FileLinkFormatter 2021-04-30 15:31:27 +02:00