Commit Graph

40292 Commits

Author SHA1 Message Date
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
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
Christian Flothmann
dccf1ee354 fix PHP 5.3 compatibility 2019-03-26 21:16:42 +01:00
Fabien Potencier
8d7e002168 bug #30641 [FrameworkBundle] properly describe service definitions without class (xabbuh)
This PR was merged into the 4.2 branch.

Discussion
----------

[FrameworkBundle] properly describe service definitions without class

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

Commits
-------

e5b0fd37f6 properly describe service definitions without class
2019-03-26 11:37:02 +01:00
Maciej Malarz
a8e9f4092c Test service with factory is not tagged 2019-03-25 22:29:53 +01:00
Jonathan Johnson
f8b4adef23
Ensure key exists before checking array value 2019-03-25 08:35:27 -07:00
Fabien Potencier
2d2cd40ba6 bug #30648 Debug finalized config in debug:config (ro0NL)
This PR was merged into the 4.2 branch.

Discussion
----------

Debug finalized config in debug:config

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| 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 | #30637
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Re-processing the extension config in `debug:config` causes a lot of steps to be ignored, basically everything in `ValidateEnvPlaceholdersPass`.

As such we trigger a misleading error when this command is invoked.

Commits
-------

b9ac3a52fb Debug finalized config in debug:config
2019-03-23 16:04:42 +01:00
Roland Franssen
b9ac3a52fb Debug finalized config in debug:config 2019-03-22 20:30:22 +01:00
Christian Flothmann
e5b0fd37f6 properly describe service definitions without class 2019-03-22 10:37:57 +01:00
Fabien Potencier
7e5dfcff7b Merge branch '3.4' into 4.2
* 3.4:
  [Phpunit] fixed support for PHP 5.3
  Response prepare method update
  [Workflow] Added missing license header
  Check if Client exists when test.client does not exist, to provide clearer exception message
  [Form] Preventing validation of children if parent with Valid constraint has no validation groups
  [Tests] fixed compatbility of assertEquals(): void
  [Intl] Fix test
  [Validator] Add the missing translations for the Arabic (ar) locale
  [Intl] Add compile binary
  [Form] Fixed some phpdocs
2019-03-22 09:16:34 +01:00
Fabien Potencier
9dad29d61c bug #30640 [Phpunit] fixed support for PHP 5.3 (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Phpunit] fixed support for PHP 5.3

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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 | n/a
| License       | MIT
| Doc PR        | n/a

Compat with PHP 5.3 was broken by #30496
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest 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 the master branch.
-->

Commits
-------

606b8af8ec [Phpunit] fixed support for PHP 5.3
2019-03-22 09:15:47 +01:00
Fabien Potencier
606b8af8ec [Phpunit] fixed support for PHP 5.3 2019-03-22 09:11:54 +01:00
Fabien Potencier
9ee5248731 minor #30633 Response prepare method update for more coherence (DamienVauchel)
This PR was merged into the 3.4 branch.

Discussion
----------

Response prepare method update for more coherence

$headers has been defined to avoid using $this->headers and is used everywhere but not in these lines.

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

Commits
-------

e89c9213e2 Response prepare method update
2019-03-22 07:11:03 +01:00
ScoobyDam
e89c9213e2
Response prepare method update
Response prepare updated for more coherence.
2019-03-21 19:51:37 +01:00
Fabien Potencier
e1df835816 minor #30618 [Workflow] Added missing license header (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow] Added missing license header

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

Commits
-------

e78a13f717 [Workflow] Added missing license header
2019-03-20 22:14:09 +01:00
Fabien Potencier
b29686029a bug #30616 Fix case when multiple loaders are providing paths for the same namespace (yceruto)
This PR was merged into the 4.2 branch.

Discussion
----------

Fix case when multiple loaders are providing paths for the same namespace

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

Fixes @stof https://github.com/symfony/symfony/pull/30440#discussion_r267316027

Let me know if a test case is necessary for this.

Cheers!

Commits
-------

393d7280e5 Fix case when multiple loaders are providing paths for the same namespace
2019-03-20 21:18:35 +01:00
Grégoire Pineau
e78a13f717 [Workflow] Added missing license header 2019-03-20 20:20:03 +01:00
Yonel Ceruto
393d7280e5 Fix case when multiple loaders are providing paths for the same namespace 2019-03-20 11:45:54 -04:00
Fabien Potencier
1246c79b9f bug #30595 Do not validate child constraints if form has no validation groups (maryo)
This PR was merged into the 3.4 branch.

Discussion
----------

Do not validate child constraints if form has no validation groups

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

If a form has `Valid` constraint and `validation_groups` set to an empty array (to disable validation) then its children were still validated using default validation group because `FormValidator` validated the form data using the empty array validation group here
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php#L76

and then `RecursiveContextualValidator` treats the empty array as default validation group here.

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php#L86

Commits
-------

f45f0d03fc [Form] Preventing validation of children if parent with Valid constraint has no validation groups
2019-03-20 13:40:27 +01:00
Fabien Potencier
2de59a1362 bug #30440 [TwigBridge] Fix DebugCommand when chain loader is involved (yceruto)
This PR was merged into the 4.2 branch.

Discussion
----------

[TwigBridge] Fix DebugCommand when chain loader is involved

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

Better diff: https://github.com/symfony/symfony/pull/30440/files?utf8=%E2%9C%93&diff=unified&w=1

Commits
-------

f647b4a29d Fix DebugCommand when chain loader is involved
2019-03-20 09:06:40 +01:00
Fabien Potencier
059ba38214 bug #30479 Check if Client exists when test.client does not exist, to provide clearer exception message (SerkanYildiz)
This PR was squashed before being merged into the 3.4 branch (closes #30479).

Discussion
----------

Check if Client exists when test.client does not exist, to provide clearer exception message

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

The `DotEnv` component does not overwrite by using environment variables declared in `.env` files.

In the `FrameworkExtension` will be checked if the framework.test config is set to a non-false value, if so it will load the `test.xml` file which contains the definition for the `test.client` service.

When running `php bin/phpunit` it will use `phpunit.xml.dist` but because we defined `APP_ENV` in our system it will not load `test.xml` so when creating a client to do functional tests, we'll get an exception which isn't correct: `You cannot create the client used in functional tests if the BrowserKit component is not available. Try running "composer require symfony/browser-kit"`

This PR aims to add a clearer exception message which indicates what really should be done to fix the error message.

Commits
-------

b429950af6 Check if Client exists when test.client does not exist, to provide clearer exception message
2019-03-20 08:44:30 +01:00
Serkan Yildiz
b429950af6 Check if Client exists when test.client does not exist, to provide clearer exception message 2019-03-20 08:44:21 +01:00
Fabien Potencier
3b9dad4e46 bug #30597 [Form] Added ResetInterface to CachingFactoryDecorator (HeahDude)
This PR was merged into the 4.2 branch.

Discussion
----------

[Form] Added ResetInterface to CachingFactoryDecorator

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

I don't know if this should be considered a feature and target master, but I tend to see it as a bug fix.

Commits
-------

4ddf5a14eb [Form] Added ResetInterface to CachingFactoryDecorator
2019-03-20 08:34:28 +01:00
Fabien Potencier
d92ae4544c minor #30600 [Workflow] Remove deprecated usage (Nek-)
This PR was merged into the 4.2 branch.

Discussion
----------

[Workflow] Remove deprecated usage

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

This is a little improvement suggestion because string usage is deprecated while it's still the default value. `null` is also deprecated but is required for BC.

Commits
-------

eeb3c29fab Remove deprecated usage
2019-03-20 08:31:47 +01:00
Fabien Potencier
388532f085 minor #30610 throw TypeErrors to prepare for type hints in 5.0 (xabbuh)
This PR was merged into the 4.2 branch.

Discussion
----------

throw TypeErrors to prepare for type hints in 5.0

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

Commits
-------

f18751bd98 throw TypeErrors to prepare for type hints in 5.0
2019-03-20 08:28:04 +01:00
Christian Flothmann
f18751bd98 throw TypeErrors to prepare for type hints in 5.0 2019-03-19 22:07:50 +01:00
Marek Štípek
f45f0d03fc [Form] Preventing validation of children if parent with Valid constraint has no validation groups 2019-03-19 13:37:12 +01:00
Jules Pietri
4ddf5a14eb [Form] Added ResetInterface to CachingFactoryDecorator 2019-03-19 13:02:46 +01:00
Maxime Veber
eeb3c29fab Remove deprecated usage
null is also deprecated but must be conserved for BC purpose. Also it will
will not let the develop think string is ok.
2019-03-19 10:13:19 +01:00
Fabien Potencier
860884af59 minor #30596 [Tests] fixed compatbility of assertEquals(): void (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[Tests] fixed compatbility of assertEquals(): void

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

Same as #30474.

Commits
-------

3f7bedc61f [Tests] fixed compatbility of assertEquals(): void
2019-03-19 08:58:15 +01:00
Fabien Potencier
f407a2bfa9 bug #30593 Fixed usage of TranslatorInterface in form extension (fixes #30591) (althaus)
This PR was merged into the 4.2 branch.

Discussion
----------

Fixed usage of TranslatorInterface in form extension (fixes #30591)

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

This PR replaces the fixed usage of the deprecated TranslatorInterface in the form extension with a soft one accepting either the old or the new interface.

Commits
-------

d8092c7b7b Fixed usage of TranslatorInterface in form extension (fixes #30591)
2019-03-19 08:51:32 +01:00
Jules Pietri
3f7bedc61f [Tests] fixed compatbility of assertEquals(): void 2019-03-19 08:51:13 +01:00
Matthias Althaus
d8092c7b7b Fixed usage of TranslatorInterface in form extension (fixes #30591) 2019-03-18 11:22:47 +01:00
Fabien Potencier
affaa45537 minor #30588 [Intl][4.2] Fix test (ro0NL)
This PR was merged into the 4.2 branch.

Discussion
----------

[Intl][4.2] Fix test

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| 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 -->

Related to #30584 , the tests we're missing updated fixtures. My bad also 😅

Now fixed, while at it recompiled intl for 4.2 ✌️

Commits
-------

50b52cffdd [Intl][4.2] Fix test
2019-03-17 11:54:37 +01:00
Fabien Potencier
42c08b8966 minor #30587 [Intl] Fix test (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Fix test

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes/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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Creates some weird path, that breaks the next tests.

Commits
-------

226f522c4d [Intl] Fix test
2019-03-17 11:53:39 +01:00
Roland Franssen
50b52cffdd [Intl][4.2] Fix test 2019-03-17 10:32:54 +01:00
Roland Franssen
226f522c4d
[Intl] Fix test 2019-03-17 10:26:14 +01:00
Fabien Potencier
83aeef1907 minor #30534 [Form] Fixed some phpdocs (Jules Pietri)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fixed some phpdocs

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

ref https://github.com/symfony/symfony-docs/issues/6144, https://github.com/symfony/symfony-docs/pull/6297, https://github.com/symfony/symfony/pull/14050

Commits
-------

b9162e8cfb [Form] Fixed some phpdocs
2019-03-17 08:27:38 +01:00
Fabien Potencier
218f29051d feature #30584 [Intl] Add compile binary (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Add compile binary

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no-ish
| 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 -->

Compile the Intl data by invoking a single command, and make it work out-of-the-box. (Split from #28831)

```bash
$ src/Symfony/Component/Intl/Resources/bin/compile
```

run in repository root because of

b7e798ef74/src/Symfony/Component/Intl/Data/Generator/LocaleDataGenerator.php (L141)

3.4 is ok, 4.2 is not because of #28833 but new locales are introduced in https://github.com/symfony/symfony/pull/28977/files#diff-f52da32e1ee6b93598814090d0749aa6R1

So as long as 3.4 is supported, but branches above add filters etc. during generation we're risking this discrepancy. I suggest after merge in upper branches to re-run `compile` (potential for automating, but run if needed :))

Commits
-------

426b92f4a8 [Intl] Add compile binary
2019-03-17 07:57:13 +01:00
Fabien Potencier
89f2a47034 minor #30585 [Validator] Add the missing translations for the Arabic (ar) locale (mehdimabrouk)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #30585).

Discussion
----------

[Validator] Add the missing translations for the Arabic (ar) locale

| Q             | A
| ------------- | ---
| 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?   | ?    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | none <!-- required for new features -->

This pull request is for adding missing translations in validators.ar.xlf.
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest 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 the master branch.
-->

Commits
-------

5df08d67a7 [Validator] Add the missing translations for the Arabic (ar) locale
2019-03-17 07:52:27 +01:00
Mehdi Mabrouk
5df08d67a7 [Validator] Add the missing translations for the Arabic (ar) locale 2019-03-17 07:52:21 +01:00
Roland Franssen
426b92f4a8 [Intl] Add compile binary 2019-03-16 10:12:20 +01:00
Nicolas Grekas
e9814030c6 Merge branch '3.4' into 4.2
* 3.4:
  Fix Cache error while using anonymous class
  Update validators.cs.xlf
2019-03-15 14:37:34 +01:00
Nicolas Grekas
613bc421cd bug #30487 Fix Cache error while using anonymous class (Emmanuel BORGES)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix Cache error while using anonymous class

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

Fix Cache error while using anonymous class

Commits
-------

036e72210d Fix Cache error while using anonymous class
2019-03-15 14:35:18 +01:00
Emmanuel BORGES
036e72210d Fix Cache error while using anonymous class 2019-03-15 14:32:44 +01:00
Nicolas Grekas
13c32a972a bug #30576 [Cache] fix LockRegistry (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[Cache] fix LockRegistry

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

- Locking doesn't work right now, because of this missing return statement.
I can't provide a useful test case, because this is effective only when race conditions happen...
- Writing the value should happen within the boundaries of the lock.
- The `final` keyword is really missing, there are zero reasons to extend this class, adding it asap will make it clear and will unlock progress on this class.
- Lastly, a type-hint fix is shipped here also.

Commits
-------

f49df4ab05 [Cache] fix LockRegistry
2019-03-15 13:52:36 +01:00