Commit Graph

48762 Commits

Author SHA1 Message Date
Ruud Kamphuis 944ba23b58 Definition::removeMethodCall should remove all matching calls
It would only remove the first match, leaving the other method call(s) there to exist. This leads to unexpected situations.
2021-02-14 12:22:33 +01:00
Fabien Potencier 4a32fd0446 bug #40160 [PropertyInfo] fix extracting mixed type-hinted property types (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[PropertyInfo] fix extracting mixed type-hinted property types

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

Commits
-------

be6432ee4c fix extracting mixed type-hinted property types
2021-02-14 11:36:42 +01:00
Fabien Potencier 4626100875 minor #40163 [Finder] mark the LazyIterator class as internal (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Finder] mark the LazyIterator class as internal

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/pull/40040#discussion_r575127254
| License       | MIT
| Doc PR        |

Commits
-------

4a2c996b95 mark the LazyIterator class as internal
2021-02-12 16:34:00 +01:00
Christian Flothmann 4a2c996b95 mark the LazyIterator class as internal 2021-02-12 11:48:09 +01:00
Christian Flothmann be6432ee4c fix extracting mixed type-hinted property types 2021-02-12 11:37:03 +01:00
Christian Flothmann 5fe91c9415 minor #40161 [Finder] add missing return type declaration (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Finder] add missing return type declaration

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

should make builds green again

Commits
-------

cfce9cbd59 add missing return type declaration
2021-02-12 11:36:44 +01:00
Christian Flothmann cfce9cbd59 add missing return type declaration 2021-02-12 11:28:39 +01:00
Fabien Potencier dc20a31179 bug #40040 [Finder] Use a lazyIterator to close files descriptors when no longer used (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[Finder] Use a lazyIterator to close files descriptors when no longer used

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

The `RecursiveDirectoryIterator` class open the file on `__construct`.
Because we Inject an instance of `RecursiveDirectoryIterator` inside the \AppendIterator` class, php opens a lot of file even before iterating on it.

This PR adds a new `LazyIterator` class that instantiate the decorated class only when something starts iterating on it.
When the iteration is over, it unset the variable to close let the decorated class clean things (ie. close the files)

Commits
-------

7117e1a798 Use a lazyintertor to close files descriptors when no longer used
2021-02-12 08:28:15 +01:00
Fabien Potencier 79ccf88a2d minor #40157 Modernize func_get_args() calls to variadic parameters (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Modernize func_get_args() calls to variadic parameters

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

While reviewing #40143, I stumbled across the `Filesystem::box()` method and I felt like we could make the code look a little less PHP5-ish.

Commits
-------

5b536131f7 Modernize func_get_args() calls to variadic parameters
2021-02-12 08:13:15 +01:00
Alexander M. Turek 5b536131f7 Modernize func_get_args() calls to variadic parameters 2021-02-11 20:34:41 +01:00
Nicolas Grekas b22562f975 [Contracts] fix branch-aliases 2021-02-11 13:34:09 +01:00
Nicolas Grekas b0267e6dcf Fix transient test 2021-02-11 10:33:17 +01:00
Nicolas Grekas de2f22086e Skip checking return types on PHP <= 7.2 2021-02-11 09:19:35 +01:00
Nicolas Grekas 044af5a0bd minor #40148 Re-enable triggering deprecations about return types (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Re-enable triggering deprecations about return types

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

Now that the three PRs linked in #40066 are merged, we can re-enable this check.

Commits
-------

01ac9b1990 Re-enable triggering deprecations about return types
2021-02-10 22:59:34 +01:00
Nicolas Grekas 01ac9b1990 Re-enable triggering deprecations about return types 2021-02-10 22:52:13 +01:00
Nicolas Grekas 7c86c1d593 fix test 2021-02-10 19:00:01 +01:00
Nicolas Grekas d0135d79fe minor #40147 [HttpKernel] fix transient test (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] fix transient test

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

Commits
-------

db66fb5838 [HttpKernel] fix transient test
2021-02-10 18:24:59 +01:00
Nicolas Grekas db66fb5838 [HttpKernel] fix transient test 2021-02-10 18:16:49 +01:00
Nicolas Grekas 52a999ca3d bug #40135 [FrameworkBundle] Fix freshness checks with boolean parameters on routes (HypeMC)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Fix freshness checks with boolean parameters on routes

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

Commits
-------

af6db0cfaf [FrameworkBundle] Fix freshness checks with boolean parameters on routes
2021-02-10 17:53:48 +01:00
HypeMC af6db0cfaf [FrameworkBundle] Fix freshness checks with boolean parameters on routes 2021-02-10 16:28:23 +01:00
Nicolas Grekas c75687fdb1 bug #40138 [FrameworkBundle] fix registering "annotations.cache" on the "container.hot_path" (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] fix registering "annotations.cache" on the "container.hot_path"

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

Because `annotations.cache` is registered in a quite special way (see #25696), `ResolveHotPathPass` cannot propagate the `container.hot_path` tag to it.

Let's add the tag explicitly since this service is always on the hot path anyway.

Spotted with Blackfire.io as usual.

Commits
-------

e196c1ecb3 [FrameworkBundle] fix registering "annotations.cache" on the "container.hot_path"
2021-02-10 12:37:42 +01:00
Nicolas Grekas e196c1ecb3 [FrameworkBundle] fix registering "annotations.cache" on the "container.hot_path" 2021-02-09 09:55:59 +01:00
Fabien Potencier 5dbc7db04a Add some information about the username in CONTRIBUTORS 2021-02-09 09:21:20 +01:00
Jérémy Derussé 186ea59180
Render email once 2021-02-08 23:22:27 +01:00
Nicolas Grekas 00e33563c7 bug #40116 [FrameworkBundle][Translator] scan directories for translations sequentially (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][Translator] scan directories for translations sequentially

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

Commits
-------

8389310983 scan directories for translations sequentially
2021-02-07 19:50:11 +01:00
Christian Flothmann 8389310983 scan directories for translations sequentially 2021-02-07 10:52:31 +01:00
Nicolas Grekas 36e5051171 Fix "provide" declarations 2021-02-06 09:54:26 +01:00
Nicolas Grekas f1a7dcafe0 minor #40086 Provide implemented packages of replaced dependencies (simonberger)
This PR was merged into the 4.4 branch.

Discussion
----------

Provide implemented packages of replaced dependencies

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| License       | MIT

The meta package symfony/symfony does not provide the virtual packages of the dependencies it replaces.
Composer does not pick it as a candidate to replace those packages if the implement such a package/interface.

See https://github.com/composer/composer/issues/9643, https://github.com/composer/composer/issues/9666

Commits
-------

57d9a818bb Provide implemented packages of replaced dependencies
2021-02-06 09:48:46 +01:00
Simon Berger 57d9a818bb Provide implemented packages of replaced dependencies 2021-02-06 09:48:04 +01:00
Jérémy Derussé 7117e1a798
Use a lazyintertor to close files descriptors when no longer used 2021-02-05 21:09:52 +01:00
Nicolas Grekas 71ca1f3c71 bug #40104 [HttpKernel] [Kernel] Silence failed deprecations logs writes (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] [Kernel] Silence failed deprecations logs writes

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

When `->buildContainer()` throws because the cache directory cannot be created, we still try to write the deprecations logs inside the cache directory. In this case, the final exception is `Warning: file_put_contents(/app/var/cache/dev/App_KernelDevDebugContainerDeprecations.log): failed to open stream: No such file or directory` instead of `Unable to create the "cache" directory (/app/var/cache/dev).`.

Alternative:
```php
try {
    // ...
} catch (\RuntimeException $e)
} finally {
    if (isset($e)) {
        throw $e;
    }

    // ...
}
```

Commits
-------

b7100b6909 [HttpKernel] [Kernel] Silence deprecations logs writes
2021-02-05 17:03:19 +01:00
Nicolas Grekas 0bae2356b1 minor #40106 Allow psr/cache v3 but on symfony/cache (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Allow psr/cache v3 but on symfony/cache

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

Consumers of PSR-6 are compatible with v1|2|3.

Implementations aren't until they add explicit return types, which is not possible without a BC break.

Commits
-------

bf23c44a07 Allow psr/cache v3 but on symfony/cache
2021-02-05 16:56:08 +01:00
Nicolas Grekas cec91255cd minor #40105 Remove EOLed 5.1 branch from PR template (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

Remove EOLed 5.1 branch from PR template

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

Commits
-------

c28ba9a959 Remove EOLed 5.1 branch from PR template
2021-02-05 16:55:30 +01:00
Nicolas Grekas bf23c44a07 Allow psr/cache v3 but on symfony/cache 2021-02-05 16:46:45 +01:00
Nicolas Grekas d6219f674f bug #40098 [DependencyInjection] fix tracking of changes to vendor/ dirs (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] fix tracking of changes to vendor/ dirs

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

Commits
-------

6867475447 [DI] fix tracking of changes to vendor/ dirs
2021-02-05 16:41:21 +01:00
Nicolas Grekas 6867475447 [DI] fix tracking of changes to vendor/ dirs 2021-02-05 16:35:32 +01:00
Robin Chalas c28ba9a959 Remove EOLed 5.1 branch from PR template 2021-02-05 15:36:10 +01:00
Thomas Calvet b7100b6909 [HttpKernel] [Kernel] Silence deprecations logs writes 2021-02-05 14:33:05 +01:00
Fabien Potencier c3d8328c61 minor #40101 Update PULL_REQUEST_TEMPLATE.md (noniagriconomie)
This PR was submitted for the 5.x branch but it was merged into the 4.4 branch instead.

Discussion
----------

Update PULL_REQUEST_TEMPLATE.md

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | See https://github.com/symfony/symfony/pull/40097#discussion_r570521793
| License       | MIT
| Doc PR        | Doc introduced in https://github.com/symfony/symfony-docs/pull/14830

ping @OskarStark do you think this can be valuable here? as this file is the entry point of all PRs

Commits
-------

41c7796552 Update PULL_REQUEST_TEMPLATE.md
2021-02-05 09:45:59 +01:00
Antoine Makdessi 41c7796552 Update PULL_REQUEST_TEMPLATE.md 2021-02-05 09:45:51 +01:00
Fabien Potencier 2d2653042a bug #39980 [Mailer][Mime] Update inline part names with newly generated ContentId (ddegentesh)
This PR was submitted for the 5.2 branch but it was squashed and merged into the 4.4 branch instead.

Discussion
----------

[Mailer][Mime] Update inline part names with newly generated ContentId

Inline parts are identified by matching attachment names to cids found in the html part. In line 487 cids are regenerated and replaced in the html part, but the attachment names were not similarly replaced.

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| License       | MIT

Commits
-------

eb14a1e1f0 [Mailer][Mime] Update inline part names with newly generated ContentId
2021-02-05 09:16:59 +01:00
ddegentesh eb14a1e1f0 [Mailer][Mime] Update inline part names with newly generated ContentId 2021-02-05 09:16:51 +01:00
Fabien Potencier 2eddb5165c bug #40043 [HttpFoundation] Setting `REQUEST_TIME_FLOAT` when constructing a Request object (ctasada)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Setting `REQUEST_TIME_FLOAT` when constructing a Request object

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

When creating a new Request object `REQUEST_TIME_FLOAT` was not set by default.

Replaces broken 39952 PR :(

Commits
-------

c52c1e0b9b [HttpFoundation] Setting `REQUEST_TIME_FLOAT` when constructing a Request object
2021-02-05 09:03:43 +01:00
Fabien Potencier 1542bbbbae bug #40050 [FrameworkBundle][Translator] Fixed updating catalogue metadata from Intl domain (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][Translator] Fixed updating catalogue metadata from Intl domain

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

Commits
-------

33e6af5850 Fixed updating catalogue metadata from intl domain
2021-02-05 09:01:14 +01:00
Nicolas Grekas c274812697 minor #40096 Allow psr/cache v2 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Allow psr/cache v2

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

https://github.com/php-fig/cache/releases/tag/2.0.0

See also https://github.com/php-fig/cache/pull/25

If Symfony 6, if we decide to add return types, we might want to bump this to `^2.0|^3.0`.

Commits
-------

00d3a0ffcb Allow psr/cache v2
2021-02-04 18:35:26 +01:00
Nicolas Grekas 00d3a0ffcb Allow psr/cache v2 2021-02-04 18:34:20 +01:00
Nicolas Grekas 60dac0cb4c [DeprecationErrorHandler] Fix tests 2021-02-04 18:21:43 +01:00
Nicolas Grekas 42b242c88c bug #40089 [SecurityBundle] role_names variable instead of roles (wickedOne)
This PR was merged into the 4.4 branch.

Discussion
----------

[SecurityBundle] role_names variable instead of roles

replaced the roles variable with role_names in order to fix cache warming

introduced @ d64372df8c

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #40087
| License       | MIT
| Doc PR        | symfony/symfony-docs#14923

Commits
-------

58bb614abd [SecurityBundle] role_names variable instead of roles
2021-02-04 12:13:59 +01:00
wickedOne 58bb614abd [SecurityBundle] role_names variable instead of roles
replaced the roles variable with role_names in order to fix cache warming

fixes #40087
2021-02-04 12:13:36 +01:00
Nicolas Grekas d56887f7c5 bug #40042 [Doctrine] Restore priority for EventSubscribers (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[Doctrine] Restore priority for EventSubscribers

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

Since #39990, lazy subscribers are called AFTER listeners (which is the opposite of previous implementation).
This PR restore the previous behavior.

Note: ordered subscribers is implemented in #39978 but is considered as a new feature.

Commits
-------

94eac1b83f Restore priority for eventSubscribers
2021-02-04 12:08:06 +01:00