Commit Graph

45338 Commits

Author SHA1 Message Date
Andrej Hudec
e0ee01c10d [DependencyInjection] Added option ignore_errors: not_found while importing config files 2019-11-07 12:06:31 +01:00
Nicolas Grekas
326284ae95 [FrameworkBundle] allow using secrets when the sodium ext is missing 2019-11-07 08:50:00 +01:00
Fabien Potencier
4056baf0f4 bug #34129 [FrameworkBundle][Translation] Invalidate cached catalogues when the scanned directories change (fancyweb)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle][Translation] Invalidate cached catalogues when the scanned directories change

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/33992
| License       | MIT
| Doc PR        | -

The cache file name needs to depend on the scanned directories list. Otherwise, when a new directory is added, even if the container is rebuilt and the `FWB Translator` gets the new scanned directories list, the cached catalogue name is still the same and is resolved accordingly.

An alternative would be to make the `Translation Translator` `getCatalogueCachePath()` method and `fallbackLocales` `@internal` and `protected` to just override everything in the `FWB Translator`. The `cacheVary` argument has the benefit to be reusable by all the `Translation` component users.

Note that there is a negative minor performance impact that increases when the list of scanned directories grows.

Commits
-------

6cbee0944c [FrameworkBundle][Translation] Invalidate cached catalogues when the scanned directories change
2019-11-07 00:21:49 +01:00
Yonel Ceruto
ba07cda358 minor #34249 [TwigBridge] Fix switch-custom changelog entry (ogizanagi)
This PR was merged into the 4.4 branch.

Discussion
----------

[TwigBridge] Fix switch-custom changelog entry

| 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       | Relates to #33954
| License       | MIT
| Doc PR        | N/A

As it doesn't really mention `switch-custom` is a css class.

Commits
-------

b03b7f4 [TwigBridge] Fix switch-custom changelog entry
2019-11-06 12:55:14 -05:00
Nicolas Grekas
88759a31f6 minor #34267 Skip validation of services that make the CI fail (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Skip validation of services that make the CI fail

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

Commits
-------

403fdf4a59 Skip validation of services that make the CI fail
2019-11-06 18:05:06 +01:00
Nicolas Grekas
403fdf4a59 Skip validation of services that make the CI fail 2019-11-06 17:48:56 +01:00
Nicolas Grekas
a1155ea6e2 Merge branch '4.3' into 4.4
* 4.3:
  [Serializer] Use context to compute MetadataAwareNameConverter cache
2019-11-06 17:13:44 +01:00
Nicolas Grekas
e91488cd0a bug #34246 [Serializer] Use context to compute MetadataAwareNameConverter cache (antograssiot)
This PR was merged into the 4.3 branch.

Discussion
----------

[Serializer] Use context to compute MetadataAwareNameConverter cache

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

This is a follow up PR to #34035 to address @nicolas-grekas 's [comment](https://github.com/symfony/symfony/pull/34035#issuecomment-549867560)

The static cache has been re-introduced and the context is used to compute the cache key used for denormalization

Commits
-------

0ac5346bf5 [Serializer] Use context to compute MetadataAwareNameConverter cache
2019-11-06 17:12:31 +01:00
Anto
0ac5346bf5
[Serializer] Use context to compute MetadataAwareNameConverter cache 2019-11-06 17:10:14 +01:00
Nicolas Grekas
80d520fa63 minor #34264 [VarDumper] Mark StubCaster as @final (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] Mark StubCaster as @final

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

Looks like it was forgotten in https://github.com/symfony/symfony/pull/33882.

@lyrixx was it intentional?

Commits
-------

d25b60961f [VarDumper] Mark StubCaster as @final
2019-11-06 17:09:29 +01:00
Thomas Calvet
d25b60961f [VarDumper] Mark StubCaster as @final 2019-11-06 17:06:09 +01:00
Nicolas Grekas
2a4b0b850e minor #34262 [DoctrineBridge] conflict with validator < 4.4 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] conflict with validator < 4.4

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

Or you'll get `PHP Fatal error:  Trait 'Symfony\Component\Validator\Mapping\Loader\AutoMappingTrait' not found`.

/cc @dunglas FYI

Commits
-------

ca398df11f [DoctrineBridge] conflict with validator < 4.4
2019-11-06 16:10:23 +01:00
Nicolas Grekas
ca398df11f [DoctrineBridge] conflict with validator < 4.4 2019-11-06 16:07:32 +01:00
Nicolas Grekas
b337a015a9 Merge branch '4.3' into 4.4
* 4.3:
  fix typo (bis)
  fix typo
  [HttpKernel] backport FC compat code
2019-11-06 15:44:36 +01:00
Nicolas Grekas
50633f2579 fix typo (bis) 2019-11-06 15:43:50 +01:00
Nicolas Grekas
9641215656 fix typo 2019-11-06 15:42:57 +01:00
Nicolas Grekas
4c401ebdd6 [HttpKernel] backport FC compat code 2019-11-06 15:42:08 +01:00
Nicolas Grekas
bd7da14243 minor #34261 [DoctrineBridge] fix min version of http-kernel (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] fix min version of http-kernel

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

Required after #34257 and #34230

Commits
-------

69ba86ba66 [DoctrineBridge] fix min version of http-kernel
2019-11-06 15:29:25 +01:00
Nicolas Grekas
69ba86ba66 [DoctrineBridge] fix min version of http-kernel 2019-11-06 15:26:48 +01:00
Nicolas Grekas
3a4d60f298 minor #34260 [Messenger] conflict with FrameworkBundle < 4.4 (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] conflict with FrameworkBundle < 4.4

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

Commits
-------

cddf3e9083 conflict with FrameworkBundle < 4.4
2019-11-06 15:12:58 +01:00
Nicolas Grekas
777ff14c75 minor #34257 [DoctrineBridge] Reopen DoctrineDataCollector to extensibility (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] Reopen DoctrineDataCollector to extensibility

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

DoctrineBundle is using it (0d20a98fb8/DataCollector/DoctrineDataCollector.php (L41)) and we don't want to prevent them from doing it.

Commits
-------

af021248bf [DoctrineBridge] Reopen DoctrineDataCollector to extensibility
2019-11-06 15:12:17 +01:00
Christian Flothmann
cddf3e9083 conflict with FrameworkBundle < 4.4 2019-11-06 15:11:47 +01:00
Thomas Calvet
af021248bf [DoctrineBridge] Reopen DoctrineDataCollector to extensibility 2019-11-06 14:58:24 +01:00
Nicolas Grekas
92687435dc bug #34258 [HttpClient] fix support for NTLM auth (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix support for NTLM auth

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

A `401` with `WWW-Authenticate: NTLM [...]` is not the final response code when using `auth_ntlm`.

Commits
-------

370c4379a5 [HttpClient] fix support for NTLM auth
2019-11-06 14:55:28 +01:00
Nicolas Grekas
370c4379a5 [HttpClient] fix support for NTLM auth 2019-11-06 14:41:42 +01:00
Nicolas Grekas
62bf1f5002 bug #34255 [HttpClient] fix after merge from 4.3 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix after merge from 4.3

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

Commits
-------

3c6dc96ab4 [HttpClient] fix after merge from 4.3
2019-11-06 13:03:36 +01:00
Nicolas Grekas
3932642619 bug #34250 [VarDumper] fix tests & displaying generators (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] fix tests & displaying generators

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

Replaces #34248

Commits
-------

bcf43a4593 [VarDumper] fix tests & displaying generators
2019-11-06 13:03:12 +01:00
Nicolas Grekas
dac61d0667 Merge branch '4.3' into 4.4
* 4.3:
  [HttpClient] expose only gzip when doing transparent compression
  add species to inflector and inflector tests
2019-11-06 13:02:32 +01:00
Nicolas Grekas
4f04bedd00 bug #34251 [HttpClient] expose only gzip when doing transparent compression (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] expose only gzip when doing transparent compression

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Closes #34083
| License       | MIT
| Doc PR        | -

Commits
-------

6571dddc4c [HttpClient] expose only gzip when doing transparent compression
2019-11-06 13:01:29 +01:00
Nicolas Grekas
3c6dc96ab4 [HttpClient] fix after merge from 4.3 2019-11-06 12:53:36 +01:00
Nicolas Grekas
6571dddc4c [HttpClient] expose only gzip when doing transparent compression 2019-11-06 11:21:02 +01:00
Nicolas Grekas
bcf43a4593 [VarDumper] fix tests & displaying generators 2019-11-06 10:36:47 +01:00
Nicolas Grekas
ddf9e0fa1c bug #34244 [Inflector] add support for 'species' (jeffreymoelands)
This PR was merged into the 4.3 branch.

Discussion
----------

[Inflector] add support for 'species'

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

This PR improves the inflection of the word 'species'
<!--
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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

cc87e40a8f add species to inflector and inflector tests
2019-11-06 09:52:55 +01:00
Maxime Steinhausser
b03b7f4ef5 [TwigBridge] Fix switch-custom changelog entry
As it doesn't really mention `switch-custom` is a css class.
2019-11-06 09:18:31 +01:00
Tobias Schultze
ba1ba971d6 minor #34245 Fix WeekType tests (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix WeekType tests

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

`WeekToArrayTransformer::reverseTransform()` requires an integer + `testWeekChoices()` widget arg was forgotten.

Commits
-------

906b82eb97 Fix WeekType tests
2019-11-06 00:27:01 +01:00
Thomas Calvet
906b82eb97 Fix WeekType tests 2019-11-05 23:24:16 +01:00
Fabien Potencier
9151698d85 minor #34135 [Validator] Add the missing translations for the Hebrew ("he") locale and fix 2 typos (Tamarpe)
This PR was squashed before being merged into the 3.4 branch (closes #34135).

Discussion
----------

[Validator] Add the missing translations for the Hebrew ("he") locale and fix 2 typos

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #30166
| License       | MIT

Ref #30166

Commits
-------

022cf67f19 [Validator] Add the missing translations for the Hebrew (\"he\") locale and fix 2 typos
2019-11-05 23:03:38 +01:00
tamar peled
022cf67f19 [Validator] Add the missing translations for the Hebrew (\"he\") locale and fix 2 typos 2019-11-05 23:03:33 +01:00
jeffreymoelands
cc87e40a8f add species to inflector and inflector tests 2019-11-05 20:58:22 +01:00
Robin Chalas
a307733751 feature #31977 Add handling for delayed message to redis transport (alexander-schranz)
This PR was merged into the 4.4 branch.

Discussion
----------

Add handling for delayed message to redis transport

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | WIP
| Fixed tickets | Fixes #31711
| License       | MIT
| Doc PR        | symfony/symfony-docs#... TODO

Still in WIP: This pull request implements delayed messages for redis transport. It will park the messages in an own sorted set and if the time comes it will push the messages to the stream to make them available for all consumers. Because of a race condition when having multiple consumers it need to be checked if not accidently a message from the future is popped by zpopmin so the add function is called and there is check if the delay is in the present/past and only then add the message to the stream.

Commits
-------

cfece10569 Add handling for delayed message to redis transport
2019-11-05 20:03:26 +01:00
Alexander Schranz
cfece10569 Add handling for delayed message to redis transport 2019-11-05 19:40:51 +01:00
Nicolas Grekas
a0cefaa103 feature #34217 [Messenger] use events consistently in worker (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] use events consistently in worker

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #32560, #32614, #33843
| License       | MIT
| Doc PR        |

The worker had the three ways to handle events
1. $onHandledCallback in `run(array $options = [], callable $onHandledCallback = null)`
2. events dispatched using the event dispatcher
3. hardcoded things inside the worker

This PR refactores the messenger worker to only use event dispatching. So instead of a hardcoded `$onHandledCallback` and worker decorators, we use event listeners and we don't need a `WorkerInterface` at all. The behavior of all the options like `--memory-limit` etc remains the same.

I introduced two new events
- `WorkerStartedEvent`
- `WorkerRunningEvent`

Together with the existing `WorkerStoppedEvent` it's very symmetrical and solves the referenced issues.

Commits
-------

201f159303 [Messenger] use events consistently in worker
2019-11-05 18:28:37 +01:00
Tobias Schultze
201f159303 [Messenger] use events consistently in worker 2019-11-05 18:28:25 +01:00
Nicolas Grekas
72dd176132 feature #33065 Deprecate things that prevent \Throwable from bubbling down (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

Deprecate things that prevent \Throwable from bubbling down

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes (todo update CHANGELOGS & UPGRADES)
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32605
| License       | MIT
| Doc PR        | -

~The goal of this PR is to allow `\Throwable` forwarded from the`ErrorHandler::handleException()` method (cf https://github.com/symfony/symfony/pull/33038) to bubble down in our code base without having to convert them into exceptions.~

~WIP because I'm blocked by 2 things caused by `GetResponseForExceptionEvent::getThrowable()` returning a `\Throwable` instead of an `\Exception`.~

~1. This `\Throwable` end up in `DataCollectorInterface::collect()` (cf `ProfilerListener`). So that looks impossible to support in 4.4. What can we do?~
~2. The second blocker is `ExceptionListener::duplicateRequest()`. We are not gonna rename this method to support `\Throwable` I guess. What can we do?~

Since there are blockers to do it in 4.4, let's prepare for the future and deprecate the things that block us.

Commits
-------

abef506e89 Deprecate things that prevent \Throwable from bubbling down
2019-11-05 18:24:16 +01:00
Thomas Calvet
abef506e89 Deprecate things that prevent \Throwable from bubbling down 2019-11-05 18:23:20 +01:00
Nicolas Grekas
4cd3dc8d7f Merge branch '4.3' into 4.4
* 4.3: (26 commits)
  [Console] Fix #33915, Detect dimensions using mode CON if vt100 is supported
  [HttpKernel][DataCollectorInterface] Ease compatibility
  Add tests to ensure defaultLocale is properly passed to the URL generator
  [DependencyInjection] Fix broken references in tests
  [HttpClient] Retry safe requests when then fail before the body arrives
  Avoid using of kernel after shutdown
  Simplify PHP CS Fixer configuration
  [PropertyInfo] Fixed type extraction for nullable collections of non-nullable elements
  [FrameworkBundle] [HttpKernel] fixed correct EOL and EOM month
  [Serializer] Fix property name usage for denormalization
  Name test accordingly to the tested class
  Fix MockFileSessionStorageTest::sessionDir being used after it's unset
  bumped Symfony version to 4.3.7
  updated VERSION for 4.3.6
  updated CHANGELOG for 4.3.6
  bumped Symfony version to 3.4.34
  updated VERSION for 3.4.33
  update CONTRIBUTORS for 3.4.33
  updated CHANGELOG for 3.4.33
  [HttpClient] Fix perf issue when doing thousands of requests with curl
  ...
2019-11-05 17:11:08 +01:00
Nicolas Grekas
620e8942a2 bug #34085 [Console] Detect dimensions using mode CON if vt100 is supported (rtek)
This PR was merged into the 4.3 branch.

Discussion
----------

[Console] Detect dimensions using mode CON if vt100 is supported

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #33915
| License       | MIT

This fixes color support detection for users of Win10 + git-bash.  If vt100 support is detected, the terminal will not try to use `stty` to test for dimensions. Calling such command implicitly disables vt100 support on STDOUT.

Commits
-------

fdeceff85e [Console] Fix #33915, Detect dimensions using mode CON if vt100 is supported
2019-11-05 16:00:49 +01:00
rtek
fdeceff85e [Console] Fix #33915, Detect dimensions using mode CON if vt100 is supported 2019-11-05 16:00:28 +01:00
Nicolas Grekas
e0c7ab0700 bug #34199 [HttpClient] Retry safe requests using HTTP/1.1 when HTTP/2 fails (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Retry safe requests using HTTP/1.1 when HTTP/2 fails

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

cURL support of HTTP/2 is not as robust as HTTP/1.1. When doing >1k requests, the stream can break for buggy reasons. New versions of cURL are fixed already, but let's make our logic more resilient anyway, and switch to HTTP/1.1 when a *safe* request fails for send/recv reasons.

Commits
-------

9f7cd66004 [HttpClient] Retry safe requests when then fail before the body arrives
2019-11-05 15:50:06 +01:00
Nicolas Grekas
448d0d6728 Merge branch '3.4' into 4.3
* 3.4:
  [DependencyInjection] Fix broken references in tests
  Avoid using of kernel after shutdown
  Simplify PHP CS Fixer configuration
  [FrameworkBundle] [HttpKernel] fixed correct EOL and EOM month
  Fix MockFileSessionStorageTest::sessionDir being used after it's unset
  bumped Symfony version to 3.4.34
  updated VERSION for 3.4.33
  update CONTRIBUTORS for 3.4.33
  updated CHANGELOG for 3.4.33
  [Stopwatch] Fixed a bug in stopwatch event getStartTime
  [Stopwatch] Fixed bug in getDuration when counting multiple ongoing periods
  Adding some validations tags on validators.et.xlf
  add missing translation for 94 (it)
2019-11-05 15:48:09 +01:00