Commit Graph

40548 Commits

Author SHA1 Message Date
Fabien Potencier 668f585df4 bumped Symfony version to 3.4.25 2019-04-02 21:03:08 +02:00
Nicolas Grekas 4fb9752816 Prevent destructors with side-effects from being unserialized 2019-04-02 17:51:53 +02:00
Fabien Potencier 4783969de0
Merge pull request #30837 from fabpot/release-3.4.24
released v3.4.24
2019-04-02 15:48:13 +02:00
Fabien Potencier 3dc0a03d8b updated VERSION for 3.4.24 2019-04-02 15:47:51 +02:00
Fabien Potencier 483ec24812 update CONTRIBUTORS for 3.4.24 2019-04-02 15:47:34 +02:00
Fabien Potencier 86b382787d updated CHANGELOG for 3.4.24 2019-04-02 15:47:25 +02:00
Fabien Potencier 3a861acd1a minor #30829 [EventDispatcher] cleanup (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] cleanup

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

forgotten in #29411 (https://github.com/symfony/symfony/pull/29411/files#diff-a72bc1daccda0ec7bfcfae0e8d3df141L287)

Commits
-------

19134c0554 [EventDispatcher] cleanup
2019-04-02 11:29:50 +02:00
Roland Franssen 19134c0554
[EventDispatcher] cleanup 2019-04-02 10:51:52 +02:00
Nicolas Grekas 4a6a925a56 minor #30824 fix testIgnoredAttributesInContext (Raulnet)
This PR was merged into the 4.2 branch.

Discussion
----------

fix testIgnoredAttributesInContext

| Q             | A
| ------------- | ---
| Branch?       | fix/test_serializer
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | fix CI
| License       | MIT

<!--
fix test GetSetMethodNormalizerTest::testIgnoredAttributesInContext
method setIgnoredAttributes is deprecated since 4.2
key "ignored_attributes" is use in the context
-->

Commits
-------

61547a291d fix testIgnoredAttributesInContext
2019-04-01 18:30:38 +02:00
Raulnet 61547a291d fix testIgnoredAttributesInContext 2019-04-01 18:12:17 +02:00
Fabien Potencier 29b48141ce minor #30816 Re-generate icu 64.1 data (jakzal)
This PR was merged into the 4.2 branch.

Discussion
----------

Re-generate icu 64.1 data

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? |no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/symfony/symfony/pull/30781#issuecomment-478468287
| License       | MIT
| Doc PR        | -

Commits
-------

6fb2c8668b Re-generate icu 64.1 data
2019-04-01 16:37:38 +02:00
Fabien Potencier bdfeb575bb minor #30817 [Config] Improve PHPdoc / IDE autocomplete for config tree builder (Koc)
This PR was merged into the 4.2 branch.

Discussion
----------

[Config] Improve PHPdoc / IDE autocomplete for config tree builder

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

follow up of #27476 and #21047

Commits
-------

21f797714e Improve PHPdoc / IDE autocomplete for config tree builder
2019-04-01 16:21:40 +02:00
Jakub Zalas 6fb2c8668b
Re-generate icu 64.1 data 2019-04-01 15:13:08 +01:00
Konstantin Myakshin 21f797714e
Improve PHPdoc / IDE autocomplete for config tree builder 2019-04-01 17:03:25 +03:00
Fabien Potencier 81955dfac9 minor #30811 [Bridge][Twig] DebugCommand - fix escaping and filter (SpacePossum)
This PR was merged into the 4.2 branch.

Discussion
----------

[Bridge][Twig] DebugCommand - fix escaping and filter

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

cherry-pick on 4.2, conflicts resolved, original PR  https://github.com/symfony/symfony/pull/30660#issuecomment-478468584

Commits
-------

b7120c5e49 [Bridge][Twig] DebugCommand - fix escaping and filter
2019-04-01 14:12:35 +02:00
SpacePossum b7120c5e49 [Bridge][Twig] DebugCommand - fix escaping and filter 2019-04-01 10:18:15 +02:00
Nicolas Grekas 99684434bc Merge branch '3.4' into 4.2
* 3.4:
  SCA: minor code tweaks
  [Intl] Update the ICU data to 64.1
  [Bridge][Twig] DebugCommand - fix escaping and filter
2019-04-01 09:32:59 +02:00
Nicolas Grekas 4f94b1769b minor #30653 SCA: minor code tweaks (kalessil)
This PR was merged into the 3.4 branch.

Discussion
----------

SCA: minor code tweaks

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

- minor code tweaks
- drop private properties, which used as local variables

Commits
-------

cc4529db51 SCA: minor code tweaks
2019-04-01 09:09:39 +02:00
Vladimir Reznichenko cc4529db51 SCA: minor code tweaks 2019-04-01 09:08:40 +02:00
Fabien Potencier 7c18377274 minor #30781 [Intl] Update the ICU data to 64.1 (jakzal)
This PR was squashed before being merged into the 3.4 branch (closes #30781).

Discussion
----------

[Intl] Update the ICU data to 64.1

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes, including the intl-data group
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

http://site.icu-project.org/download/64

Commits
-------

ae2cb6f5c5 [Intl] Update the ICU data to 64.1
2019-03-31 18:47:52 +02:00
Jakub Zalas ae2cb6f5c5 [Intl] Update the ICU data to 64.1 2019-03-31 18:47:37 +02:00
Fabien Potencier 6f0863020a bug #30660 [Bridge][Twig] DebugCommand - fix escaping and filter (SpacePossum)
This PR was squashed before being merged into the 3.4 branch (closes #30660).

Discussion
----------

[Bridge][Twig] DebugCommand - fix escaping and filter

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

The PR fixes:
- output escaping was not done for decorated consoles
- filter was not applied when using format json

+ added some tests for paths currently not tested

Commits
-------

7bdb06641d [Bridge][Twig] DebugCommand - fix escaping and filter
2019-03-31 13:33:25 +02:00
SpacePossum 7bdb06641d [Bridge][Twig] DebugCommand - fix escaping and filter 2019-03-31 13:33:18 +02:00
Fabien Potencier 2fb2508cee Merge branch '3.4' into 4.2
* 3.4:
  [Serializer] Added check of constuctor modifiers to AbstractNormalizer
  [Intl] Simplify the compile binary
  [Routing] Fix routes annotation loading with glob pattern
  Fix hardcoded hotPathTagName
  [Validator] Improve constraint default option check
  [Validator] Fix annotation default for @Count and @Length
  Update composer.json
  Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes"
  Add missing "vi" translations
  add missing German translations
  [Intl] Fix test
  added missing translation
  use behavior instead of behaviour
  [Validator] Translate JSON message to Hungarian
  [Validator] fix sr_Latn translations
  [FrameworkBundle][HttpFoundation] make session service resettable
2019-03-30 16:58:42 +01:00
Fabien Potencier c7c1c3bad9 bug #30784 [Translator] Add resource path to exception message for schema valida… (jschaedl)
This PR was submitted for the master branch but it was merged into the 4.2 branch instead (closes #30784).

Discussion
----------

[Translator] Add resource path to exception message for schema valida…

…tion errors

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30762
| License       | MIT

Commits
-------

3ce7f5a5f9 [Translator] Add resource path to exception message for schema validation errors
2019-03-30 16:56:03 +01:00
Jan Schädlich 3ce7f5a5f9 [Translator] Add resource path to exception message for schema validation errors 2019-03-30 16:55:39 +01:00
Fabien Potencier e3bbf8de11 bug #30720 Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes" (Emmanuel BORGES)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes"

…ed in "ignored_attributes"

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30453
| License       | MIT

The GetSetMethodNormalizer class correctly ignores the attributes specified in "ignored_attributes"

Commits
-------

606d8d370d Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes"
2019-03-30 08:48:10 +01:00
Fabien Potencier cc6bfea220 bug #30749 [Serializer] Added check of constuctor modifiers to AbstractNormalizer (NekaKawaii)
This PR was submitted for the 4.2 branch but it was merged into the 3.4 branch instead (closes #30749).

Discussion
----------

[Serializer] Added check of constuctor modifiers to AbstractNormalizer

| Q             | A
| ------------- | ---
| Branch?       |  4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30748
| License       | MIT

If constructor is not public, instantiate target object without constructor to prevent errors like `Access to non-public constructor of class Target`

Commits
-------

eb0e14c298 [Serializer] Added check of constuctor modifiers to AbstractNormalizer
2019-03-30 08:26:43 +01:00
Dmitriy Tkachenko eb0e14c298 [Serializer] Added check of constuctor modifiers to AbstractNormalizer 2019-03-30 08:26:35 +01:00
Fabien Potencier 2b734606b8 bug #30776 [Routing] Fix routes annotation loading with glob pattern (snoob)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] Fix routes annotation loading with glob pattern

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29747
| License       | MIT
| Doc PR        | n/a

Loading routes annotation loading with glob pattern triggers an error if one of the targetted directory contains an abstract class. This fixes it

Commits
-------

c7c45a13a7 [Routing] Fix routes annotation loading with glob pattern
2019-03-30 08:13:09 +01:00
Fabien Potencier 1c92836e8c bug #30773 [DependencyInjection] Fix hardcoded hotPathTagName (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] Fix hardcoded hotPathTagName

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | none

replace the hardcoded string by the injected variable

Commits
-------

67fb8eff2e Fix hardcoded hotPathTagName
2019-03-30 08:04:10 +01:00
Fabien Potencier 6b8ff62648 minor #30778 [Intl] Simplify the compile binary (jakzal)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Simplify the compile binary

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

The intl docker image comes with build-essential packages now, so there's no need for additional installation steps.

re #30584

Commits
-------

b3184c26ad [Intl] Simplify the compile binary
2019-03-30 07:56:46 +01:00
Jakub Zalas b3184c26ad
[Intl] Simplify the compile binary
The docker image comes with the build-essential packages now.
2019-03-29 22:39:22 +00:00
Yannick Snobbert c7c45a13a7 [Routing] Fix routes annotation loading with glob pattern 2019-03-29 22:58:42 +01:00
Jérémy Derussé 67fb8eff2e
Fix hardcoded hotPathTagName 2019-03-29 20:18:37 +01:00
Fabien Potencier 755d481168 minor #30761 [Security] Add symfony/polyfill-ctype to dev requirements (SpacePossum)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Add symfony/polyfill-ctype to dev requirements

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

because this [test](https://github.com/symfony/symfony/blob/v3.4.0/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php#L55) uses `ctype_print`

Commits
-------

f8a033c0ef Update composer.json
2019-03-29 18:48:25 +01:00
Fabien Potencier ee5d7fdacf bug #30737 [Validator] Improve constraint default option check (vudaltsov)
This PR was squashed before being merged into the 3.4 branch (closes #30737).

Discussion
----------

[Validator] Improve constraint default option check

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Any constraint without default option used as annotation with unnamed first argument (for example, `@Assert\Collection(1)`) throws an exception with an ugly message `The options "" do not exist in constraint Collection`.

This PR makes constraint check the default option in the annotation case in the same way it checks it in the "real" code case. So the exception will be `No default option is configured for constraint Collection.`

Commits
-------

915912e18e [Validator] Improve constraint default option check
2019-03-29 18:25:59 +01:00
Valentin Udaltsov 915912e18e [Validator] Improve constraint default option check 2019-03-29 18:25:52 +01:00
Fabien Potencier 2d00024153 bug #30736 [Validator] Fix annotation default for @Count and @Length (vudaltsov)
This PR was squashed before being merged into the 3.4 branch (closes #30736).

Discussion
----------

[Validator] Fix annotation default for @Count and @Length

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | is it worth mentioning?

`Count` and `Length` constraints allow to pass the exact value as the constructor argument when used in code.

```php
new Length(5);
// is same as
new Length(['min' => 5, 'max' => 5]);
```

At the same time when using them as annotations, `@Assert\Length(5)` throws `The options "" do not exist in constraint Symfony\\Component\\Validator\\Constraints\\Length` (fix for ugly exception is proposed in https://github.com/symfony/symfony/pull/30737). This happens because annotation's default value is passed as `value`. Since `Length` does not have a default option, `value` is replaced with `''`.

This PR fixes this inconsistency.

Commits
-------

7bfb8c1a4c [Validator] Fix annotation default for @Count and @Length
2019-03-29 16:49:40 +01:00
Valentin Udaltsov 7bfb8c1a4c [Validator] Fix annotation default for @Count and @Length 2019-03-29 16:49:31 +01:00
SpacePossum f8a033c0ef
Update composer.json 2019-03-29 09:11:11 +01:00
Emmanuel BORGES 606d8d370d Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes" 2019-03-27 09:43:12 +01:00
Fabien Potencier fdb0490a16 bug #30621 [Cache] Ensure key exists before checking array value (jrjohnson)
This PR was merged into the 4.2 branch.

Discussion
----------

[Cache] Ensure key exists before checking array value

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Without this fix we're getting warnings like

```
PHP Notice:  Undefined index: %5BOUR-KEY%5D%5B1%5D in vendor/symfony/cache/Traits/PhpFilesTrait.php on line 136
```

when doing a `$cache->contains()` in some cases. I'm having a lot of trouble tracking down exactly when and where this error will happen and what changes in our app / cache cause it, but this fix seems benign enough that maybe it can be merged without that backstory.

Commits
-------

f8b4adef23 Ensure key exists before checking array value
2019-03-27 07:46:42 +01:00
Fabien Potencier 438940f56a minor #30693 [DependencyInjection] Add test asserting service with factory is not tagged (malarzm)
This PR was merged into the 4.2 branch.

Discussion
----------

[DependencyInjection] Add test asserting service with factory is not tagged

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

I wrote a test for a scenario that was failing for me on `4.1` branch to find out it's already fixed in 4.2 (which is awesome). Since I already had a test written and couldn't really find a PR in the changelog that could have fixed my issue I figured I'll PR a test, so the behaviour I was expecting won't get broken :)

EDIT: For the record, the issue in 4.1 is: `Symfony\Component\DependencyInjection\Tests\Fixtures\BarInterface` gets tagged due to `_instanceof` which results in it being handed to `Symfony\Component\DependencyInjection\Tests\Fixtures\BarFactory` via `!tagged`. In the end this results in a recursion which is not handled.

Commits
-------

a8e9f4092c Test service with factory is not tagged
2019-03-27 07:29:35 +01:00
Fabien Potencier 84ce070d67 bug #30711 [Serializer] Use object class resolver when extracting attributes (joelwurtz)
This PR was squashed before being merged into the 4.2 branch (closes #30711).

Discussion
----------

[Serializer] Use object class resolver when extracting attributes

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no (not sure)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Current ObjectNormalizer was not using the object class resolver when extracting attributes, i found this when trying to refactor api platform normalizers and dealing with doctrine proxy objet having __initialize__ property not wanted cf https://github.com/api-platform/core/pull/2579

I don't think this is BC break, but maybe some people using this object class resolver can get different behavior ?

Commits
-------

1d8b5af3f0 [Serializer] Use object class resolver when extracting attributes
2019-03-27 07:23:55 +01:00
Joel Wurtz 1d8b5af3f0 [Serializer] Use object class resolver when extracting attributes 2019-03-27 07:23:48 +01:00
Fabien Potencier 06e657afd4 minor #30714 [PhpUnitBridge] fix PHP 5.3 compatibility (xabbuh)
This PR was merged into the 4.2 branch.

Discussion
----------

[PhpUnitBridge] fix PHP 5.3 compatibility

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30709
| License       | MIT
| Doc PR        |

Commits
-------

dccf1ee354 fix PHP 5.3 compatibility
2019-03-27 07:22:00 +01:00
Fabien Potencier c79e52aa7b minor #30715 [Validator] Add missing "vi" translations (xuanquynh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add missing "vi" translations

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/30195
| License       | MIT
| Doc PR        | N/A

I just translate the missing "vi" translations that are listed at https://github.com/symfony/symfony/issues/30195 and add one more trans-unit item (id = "87").

Commits
-------

5c59e5fcad Add missing "vi" translations
2019-03-27 07:19:39 +01:00
Quynh Xuan Nguyen 5c59e5fcad Add missing "vi" translations 2019-03-27 09:06:48 +07:00
Christian Flothmann dccf1ee354 fix PHP 5.3 compatibility 2019-03-26 21:16:42 +01:00