Commit Graph

53412 Commits

Author SHA1 Message Date
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
Fabien Potencier
15e2067d50 minor #40166 [HttpFoundation] Fix typo in exception message (carlos-ea)
This PR was squashed before being merged into the 5.2 branch.

Discussion
----------

[HttpFoundation] Fix typo in exception message

| Q             | A
| ------------- | ---
| Branch?       | 5.2 for bug fixes
| Bug fix?      | yes
| 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
-------

2248af5857 [HttpFoundation] Fix typo in exception message
2021-02-12 16:32:43 +01:00
carlos-ea
2248af5857 [HttpFoundation] Fix typo in exception message 2021-02-12 16:32:37 +01:00
Christian Flothmann
4a2c996b95 mark the LazyIterator class as internal 2021-02-12 11:48:09 +01:00
Christian Flothmann
6dce3227db Merge branch '4.4' into 5.2
* 4.4:
  add missing return type declaration
  Modernize func_get_args() calls to variadic parameters
  Use a lazyintertor to close files descriptors when no longer used
2021-02-12 11:38:38 +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
b3f046d81d Merge branch '4.4' into 5.2
* 4.4:
  [Contracts] fix branch-aliases
  Fix transient test
2021-02-11 13:36:50 +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
55ca168ee1 Merge branch '4.4' into 5.2
* 4.4:
  Skip checking return types on PHP <= 7.2
2021-02-11 09:21:20 +01:00
Nicolas Grekas
de2f22086e Skip checking return types on PHP <= 7.2 2021-02-11 09:19:35 +01:00
Fabien Potencier
b636e6667a bug #40141 [RateLimiter] Fix sliding_window misbehaving with stale records (xesxen)
This PR was squashed before being merged into the 5.2 branch.

Discussion
----------

[RateLimiter] Fix sliding_window misbehaving with stale records

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

Currently the SlidingWindow RateLimiter returns a negative value for getHitCount if the previous SlidingWindow was too long ago. This results in a really high value from `SlidingWindowLimiter::getAvailableTokens()` which is higher than the configured limit.

This limits the value of percentOfCurrentTimeframe in `SlidingWindow::getHitCount()` to 1 so it can't result in a negative hitcount.

The 2nd fix fixes the SlidingWindow instance (essentially) not storing hits if the previous instance is way in the past, as the next instance will still be "in the past". This causes RateLimit to behave as if it were disabled until it has caught up again, which could take a long time when it is configured with a small window size.

Commits
-------

57033164c6 [RateLimiter] Fix sliding_window misbehaving with stale records
2021-02-11 08:56:23 +01:00
Xesxen
57033164c6 [RateLimiter] Fix sliding_window misbehaving with stale records 2021-02-11 08:56:13 +01:00
Nicolas Grekas
9fa7dbd568 Cleanup phpunit script 2021-02-10 23:00:54 +01:00
Nicolas Grekas
70ad16067d Merge branch '4.4' into 5.2
* 4.4:
  Re-enable triggering deprecations about return types
2021-02-10 22:59:49 +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
0bb4ba1941 Merge branch '4.4' into 5.2
* 4.4:
  fix test
2021-02-10 19:01:05 +01:00
Nicolas Grekas
7c86c1d593 fix test 2021-02-10 19:00:01 +01:00
Nicolas Grekas
0a26f1be0b Merge branch '4.4' into 5.2
* 4.4:
  [HttpKernel] fix transient test
  [FrameworkBundle] Fix freshness checks with boolean parameters on routes
  [FrameworkBundle] fix registering "annotations.cache" on the "container.hot_path"
  Add some information about the username in CONTRIBUTORS
2021-02-10 18:26:35 +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
Christian Flothmann
ec38bab34a bug #40137 [Form] forward the label_html option to expanded choice fields (xabbuh)
This PR was merged into the 5.2 branch.

Discussion
----------

[Form] forward the label_html option to expanded choice fields

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

Commits
-------

fbe49cf84d forward the label_html option to expanded choice fields
2021-02-09 15:09:16 +01:00
Christian Flothmann
fbe49cf84d forward the label_html option to expanded choice fields 2021-02-09 09:56:11 +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
7866a0fbd6 Merge branch '4.4' into 5.2
* 4.4:
  scan directories for translations sequentially
2021-02-08 11:23:22 +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
Nicolas Grekas
b9af88f9db bug #40124 [Form] merge translation parameters with value configured for parent form (xabbuh)
This PR was merged into the 5.2 branch.

Discussion
----------

[Form] merge translation parameters with value configured for parent form

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

Commits
-------

3de453c368 merge translation parameters with value configured for parent form
2021-02-07 19:43:45 +01:00
Christian Flothmann
3de453c368 merge translation parameters with value configured for parent form 2021-02-07 15:53:40 +01:00
Christian Flothmann
8389310983 scan directories for translations sequentially 2021-02-07 10:52:31 +01:00
Nyholm
d8e36f2940
minor #40118 Fix kafka tests (jderusse)
This PR was merged into the 5.2 branch.

Discussion
----------

Fix kafka tests

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

Fix github-actions tests with kafka.

I'm not sure why (probably a change in github actions), but localhost resolves to ipv6 which is breaks our testing setup

Commits
-------

8d6c64dcde Fix kafka tests
2021-02-06 16:54:55 +01:00
Jérémy Derussé
8d6c64dcde
Fix kafka tests 2021-02-06 15:40:34 +01:00
Nicolas Grekas
839c7a1108 minor #40093 Always autoload string functions on symfony/symfony (chalasr)
This PR was merged into the 5.2 branch.

Discussion
----------

Always autoload string functions on symfony/symfony

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

Autoloading these functions only in dev make them undefined for projects still using symfony/symfony, which causes troubles when upgrading to 5.2 (e.g. easyadmin uses `u()`).

Commits
-------

b3ca21c4ba Always autoload string functions on symfony/symfony
2021-02-06 09:57:39 +01:00
Nicolas Grekas
6f16e833bd Merge branch '4.4' into 5.2
* 4.4:
  Fix "provide" declarations
2021-02-06 09:56:29 +01:00
Nicolas Grekas
36e5051171 Fix "provide" declarations 2021-02-06 09:54:26 +01:00
Nicolas Grekas
6891550582 Merge branch '4.4' into 5.2
* 4.4:
  Provide implemented packages of replaced dependencies
2021-02-06 09:52:42 +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