Commit Graph

33805 Commits

Author SHA1 Message Date
Christian Flothmann
397e4b8931 Merge branch '3.4' into 4.2
* 3.4:
  fix PHPUnit 4.8 compatibility
  [Debug] Fixed error handling when an error is already handled when another error is already handled (5)
  sync validator translations
2019-04-07 20:00:57 +02:00
Christian Flothmann
64fa13bf44 fix PHPUnit 4.8 compatibility 2019-04-07 19:26:29 +02:00
Fabien Potencier
615cc10b70 minor #30946 [Validator] sync validator translations (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] sync validator translations

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

#FOSSHackathons #EUFOSSA

Commits
-------

83f675d9f3 sync validator translations
2019-04-07 18:44:15 +02:00
Christophe Coevoet
9f3ce4832b Merge branch '4.2'
* 4.2:
  [Form] Fix tests
  Fix the configurability of CoreExtension deps in standalone usage
  [Cache] fix using ProxyAdapter inside TagAwareAdapter
2019-04-07 15:57:40 +02:00
Christophe Coevoet
393c6b390c Merge branch '3.4' into 4.2
* 3.4:
  [Form] Fix tests
  Fix the configurability of CoreExtension deps in standalone usage
  [Cache] fix using ProxyAdapter inside TagAwareAdapter
2019-04-07 15:57:20 +02:00
Fabien Potencier
cd54e0f232 bug #30976 [Debug] Fixed error handling when an error is already handled when another error is already handled (5) (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] Fixed error handling when an error is already handled when another error is already handled (5)

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

---

Please, don't ask how to reproduce it :)

Commits
-------

a36c7315f4 [Debug] Fixed error handling when an error is already handled when another error is already handled (5)
2019-04-07 15:50:27 +02:00
Christophe Coevoet
c68ef4648c minor #30966 [DoctrineBridge] Deprecated using IdReader when optimization is not possible (HeahDude)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DoctrineBridge] Deprecated using IdReader when optimization is not possible

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 <!-- 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        | ~

Follow up of #30962. (Review only the second commit until #30962 is merged).

Commits
-------

a234c8913e [DoctrineBridge] Deprecated using IdReader when optimization is not possible
2019-04-07 15:40:33 +02:00
Jules Pietri
a234c8913e [DoctrineBridge] Deprecated using IdReader when optimization is not possible 2019-04-07 15:30:06 +02:00
Robin Chalas
35418be8c4 [Form] Fix tests 2019-04-07 15:12:50 +02:00
Nicolas Grekas
d8b03ee437 bug #30979 Fix the configurability of CoreExtension deps in standalone usage (stof)
This PR was squashed before being merged into the 3.4 branch (closes #30979).

Discussion
----------

Fix the configurability of CoreExtension deps in standalone usage

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | not yet, but will allow fixing them
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

When using the Forms entrypoint to configure the component, there was no chance to configure dependencies of the CoreExtension, as the one registered without argument was first and would win.
The builder now delays the prepending of the CoreExtension to do it only if the CoreExtension is not registered explicitly.

We discovered that when trying to fix tests for the FileType, where we wanted to pass a Translator to it.

Commits
-------

934118b131 Fix the configurability of CoreExtension deps in standalone usage
2019-04-07 15:12:19 +02:00
Christophe Coevoet
934118b131 Fix the configurability of CoreExtension deps in standalone usage 2019-04-07 15:12:11 +02:00
Nicolas Grekas
c274dffc8b feature #30963 [Serializer] Experimental for ObjectListExtractor (joelwurtz)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Serializer] Experimental for ObjectListExtractor

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

Related to #30818

I want to mark this class as `@expiremental` until we have the full refactoring done of the Serializer, also this would allow change needed if some behavior was not correctly taken into care in 4.3

Mark also `final` for the default implementation as we don't want that to be extendable and user should use composition over inheritance.

Commits
-------

b0cdf45464 Set object list extractor as expiremental, and use final for default implementation
2019-04-07 14:59:03 +02:00
Nicolas Grekas
47e571b3fc feature #30933 [Routing][ObjectRouteLoader] Allow invokable route loader services (fancyweb)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Routing][ObjectRouteLoader] Allow invokable route loader services

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

#eufossa

Fall back by default on the `__invoke` method when it is not configured.

Using a regex is easier to check that the format is valid, at least for the time we have to supports the single column notation.

TODO :
- [x] Changelog entry
- [x] Doc PR

Commits
-------

5bf7ad44e1 [Routing][ObjectRouteLoader] Allow invokable route loader services
2019-04-07 14:52:56 +02:00
David Buchmann
fdb668e051 prevent mixup of the object to populate 2019-04-07 14:49:34 +02:00
Grégoire Pineau
a36c7315f4 [Debug] Fixed error handling when an error is already handled when another error is already handled (5) 2019-04-07 14:43:40 +02:00
Joel Wurtz
b0cdf45464
Set object list extractor as expiremental, and use final for default implementation 2019-04-07 14:24:52 +02:00
Nicolas Grekas
77320cb645 bug #30918 [Cache] fix using ProxyAdapter inside TagAwareAdapter (dmaicher)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fix using ProxyAdapter inside TagAwareAdapter

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

EUFOSSA

After some debugging this is my first attempt to fix this issue @nicolas-grekas 😊 Let's discuss it.

without the fix the test fails like this:

```
Testing Symfony\Component\Cache\Tests\Adapter\TagAwareAndProxyAdapterIntegrationTest
F                                                                   1 / 1 (100%)

Time: 28 ms, Memory: 4.00MB

There was 1 failure:

1) Symfony\Component\Cache\Tests\Adapter\TagAwareAndProxyAdapterIntegrationTest::testIntegration
Failed asserting that Array &0 (
    'tag1' => 0
    'tag2' => 0
) is identical to 'bar'.

/var/www/symfony/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php:26

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

Commits
-------

98b9be9b6a [Cache] fix using ProxyAdapter inside TagAwareAdapter
2019-04-07 14:23:14 +02:00
Nicolas Grekas
c6505d3a97 feature #30897 [DIC] Add a require env var processor (mpdude)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DIC] Add a `require` env var processor

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | symfony/symfony-docs#11313

This adds a new `require` processor that will `require()` the PHP file given as input value and return the value `return`ed from that file. Leverages opcaching (yay!).

#EUFOSSA

Commits
-------

03da3a22b1 Add a `require` env var processor
2019-04-07 14:20:55 +02:00
Christian Flothmann
83f675d9f3 sync validator translations 2019-04-07 13:52:58 +02:00
Nicolas Grekas
226b36e99a feature #30964 [HttpKernel] Add a "short" trace header format, make header configurable (mpdude)
This PR was squashed before being merged into the 4.3-dev branch (closes #30964).

Discussion
----------

[HttpKernel] Add a "short" trace header format, make header configurable

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | symfony/symfony-docs#11340

This pull requests adds the first usage of `array_key_first` to the Symfony code base. Additionally, it makes it possible to configure the `HttpCache` to also add a "trace" header in production.

The `HttpCache` is a convenient, low-barrier yet performant way of accelerating the application. By having the "trace" information returned as a header in production as well, you can write it to server log files. For example, with Apache you can use `%{X-Symfony-Cache}o` in the `LogFormat` directive to log response headers.

With the information in the log files, you can easily process it from logfile processing/system metrics tools to find out about cache performance, efficiency and the URLs that might need extra cache tweaking.

<img width="1040" alt="Bildschirmfoto 2019-04-07 um 11 43 23" src="https://user-images.githubusercontent.com/1202333/55681763-6e90e980-592a-11e9-900f-e096350531c2.png">

The "short" format will only output information for the main request to avoid leaking internal URLs for ESI subrequests. I also chose a concise format like `stale/valid/store` because that's much easier to parse out of logfiles (no whitespace, no need for quotes etc.).

If you're not comfortable with having `Symfony` in the header name that way, the header name can be changed through a configuration setting as well.

#FOSSHackathon

Commits
-------

9a2fcc9392 [HttpKernel] Add a \"short\" trace header format, make header configurable
2019-04-07 13:45:14 +02:00
Matthias Pigulla
9a2fcc9392 [HttpKernel] Add a \"short\" trace header format, make header configurable 2019-04-07 13:44:57 +02:00
Tomas
dd93b707cc Use name converter when normalizing constraint violation list 2019-04-07 14:21:30 +03:00
Nicolas Grekas
b0989aaffc feature #29935 [DI] Fix bad error message for unused bind under _defaults (przemyslaw-bogusz)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DI] Fix bad error message for unused bind under _defaults

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

**Sidenote**: I originally included the fix in #29897, but I decided to close the previous PR and divide it into two separate PRs for clarity.

**Description:**
With this fix, the message regarding an unused bind will have a clear information about the type of the bind (defined under __defaults_, __instanceof_ or _per service_), as well as the name of the file, in which it was configurated. It's for, both, YAML and XML configurations.

For the core team, please note, that the fix assumes a possibility of definings binds under __instanceof_, which was introduced in #27806. But since fixes are merged into other branches, I thought that it might be necessary to inlude this possibility. If this case requires making separate fixes for different branches, I will gladly do it.

Commits
-------

35bf4203e8 [DI] Fix bad error message for unused bind under _defaults
2019-04-07 12:29:22 +02:00
Fabien Potencier
3df05e0877 feature #30962 [DoctrineBridge] Deprecated implicit optimization in DoctrineChoiceLoader (HeahDude)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DoctrineBridge] Deprecated implicit optimization in DoctrineChoiceLoader

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 <!-- 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        | ~

#EUFOSSA

Big thanks to @stof for the help with writing the test!

## Description
It happens that the `IdReader` is created by the `DoctrineType` and cached for each entity class case.
But the type already resolves whether or not it should use it, only when we can optimize query thanks to a single id field when defining the `choice_value` option: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php#L188.

This PR is a first step to optimize the choice loading process.

Commits
-------

287c39b9ea [DoctrineBridge] Deprecated implicit optimization in DoctrineChoiceLoader
2019-04-07 12:26:36 +02:00
Przemysław Bogusz
35bf4203e8 [DI] Fix bad error message for unused bind under _defaults 2019-04-07 12:22:52 +02:00
Jules Pietri
287c39b9ea [DoctrineBridge] Deprecated implicit optimization in DoctrineChoiceLoader 2019-04-07 12:14:41 +02:00
Nicolas Grekas
4447f87c2e Merge branch '4.2'
* 4.2:
  fix translating file validation error message
  [Validator] Add missing Hungarian translations
  Improving deprecation message of the Twig templates directory src/Resources/views
  [3.4] [Validator] Add missing french validation translations.
  [Validator] Only traverse arrays that are cascaded into
  Handle case where no translations were found
  [Validator] Translate unique collection message to Hungarian
  fix tests
  Run test in separate process
  Use a class name that does not actually exist
  [Profiler] Fix dark theme elements color
  fix horizontal spacing of inlined Bootstrap forms
  [Translator] Warm up the translations cache in dev
  turn failed file uploads into form errors
2019-04-07 11:58:10 +02:00
Nicolas Grekas
ecb52bc9f1 Merge branch '3.4' into 4.2
* 3.4:
  fix translating file validation error message
  [Validator] Add missing Hungarian translations
  [3.4] [Validator] Add missing french validation translations.
  [Validator] Only traverse arrays that are cascaded into
  Handle case where no translations were found
  [Validator] Translate unique collection message to Hungarian
  fix tests
  Run test in separate process
  Use a class name that does not actually exist
  fix horizontal spacing of inlined Bootstrap forms
  [Translator] Warm up the translations cache in dev
  turn failed file uploads into form errors
2019-04-07 11:56:43 +02:00
Fabien Potencier
ca290396fb minor #30943 [Asset] PathPackage : use parent getUrl Method instead of duplicating code (tiecoders)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Asset] PathPackage : use parent getUrl Method instead of duplicating code

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

Use parent getUrl method instead of duplicating code.

Commits
-------

0c2a2bf536 ASSET-PathPackage-Enhancement  - Use parent getUrl method instead of duplicating code.
2019-04-07 11:43:31 +02:00
Fabien Potencier
04eed543af minor #30944 Fix Lock test suite (jderusse)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Fix Lock test suite

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

Commits
-------

1f66e7b2be Fix Lock test suite
2019-04-07 11:31:45 +02:00
Christian Flothmann
9c41842756 fix translating file validation error message 2019-04-07 11:31:05 +02:00
Fabien Potencier
76906ab6e8 minor #30953 [Form] Refactor DefaultChoiceListFactory (vudaltsov)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] Refactor DefaultChoiceListFactory

| 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

A small optimization (remove unnecessary `foreach` calls) and a naming improvement.

ping @HeahDude , @stof

#EUFOSSA

Commits
-------

77424c8557 Refactor DefaultChoiceListFactory
2019-04-07 11:26:33 +02:00
Fabien Potencier
2b01eaaa30 feature #30862 [Routing] UrlHelper to get absolute URL for a path (vudaltsov)
This PR was squashed before being merged into the 4.3-dev branch (closes #30862).

Discussion
----------

[Routing] UrlHelper to get absolute URL for a path

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

I noticed that I need to generate absolute urls quite often. For example when normalizing uploads in API. I found Twig's `absolute_url()` really helpful, but obviously `Symfony\Bridge\Twig\Extension\HttpFoundationExtension` cannot be used as a normalizer's argument service.

In this PR I propose to extract `HttpFoundationExtension::generateAbsoluteUrl` and `HttpFoundationExtension::generateRelativePath` to separate interfaces which could be used on their own. Although this could be just a final class helper, I thought that we might leave a possibility for decoration here. That's why I created interfaces.

- [x] Split `HttpFoundationExtension` into two interfaces
- [x] Deprecate `HttpFoundationExtension::generateAbsoluteUrl` and `HttpFoundationExtension::generateRelativePath`
- [x] Add service definitions
- [x] Fix tests
- [ ] Add docs

Commits
-------

388d8f548c [Routing] UrlHelper to get absolute URL for a path
2019-04-07 11:25:07 +02:00
Valentin
388d8f548c [Routing] UrlHelper to get absolute URL for a path 2019-04-07 11:24:57 +02:00
Valentin
77424c8557 Refactor DefaultChoiceListFactory 2019-04-07 11:13:09 +02:00
Fabien Potencier
0d365a8c7f feature #30607 [Serializer] Add Support of recursive denormalization on object_to_populate (jewome62)
This PR was squashed before being merged into the 4.3-dev branch (closes #30607).

Discussion
----------

[Serializer] Add Support of recursive denormalization on object_to_populate

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

Currently the deserialization re-create new sub-object with object_to_populate.
This option permit to make object_to_populate recursive.

Commits
-------

5b723865b1 [Serializer] Add Support of recursive denormalization on object_to_populate
2019-04-07 11:04:56 +02:00
jewome62
5b723865b1 [Serializer] Add Support of recursive denormalization on object_to_populate 2019-04-07 11:04:49 +02:00
Fabien Potencier
9e2f506e37 bug #30939 [Validator] throw UnexpectedValueException instead (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Validator] throw UnexpectedValueException instead

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

#FOSSHackathons #EUFOSSA

Commits
-------

de12e2382e throw UnexpectedValueException instead
2019-04-07 10:55:57 +02:00
Jérémy Derussé
1f66e7b2be
Fix Lock test suite 2019-04-07 10:54:19 +02:00
Fabien Potencier
758f0285b0 minor #30938 [FrameworkBundle] drop not needed "constant" type argument (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] drop not needed "constant" type argument

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

#FOSSHackathons #EUFOSSA

Commits
-------

faf629386e drop not needed "constant" type argument
2019-04-07 10:54:10 +02:00
Gábor Egyed
62e5a91150 [Validator] Add missing Hungarian translations 2019-04-07 10:52:46 +02:00
Fabien Potencier
95d46c25f7 minor #30940 [Validator] Translate unique collection message to Hungarian (1ed)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Translate unique collection message to Hungarian

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

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

6a732dc031 [Validator] Translate unique collection message to Hungarian
2019-04-07 10:48:21 +02:00
Fabien Potencier
6ea4d79e0f minor #30945 [3.4] [Validator] Add missing french validators translations (hhamon)
This PR was merged into the 3.4 branch.

Discussion
----------

[3.4] [Validator] Add missing french validators translations

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

331b601fed [3.4] [Validator] Add missing french validation translations.
2019-04-07 10:44:45 +02:00
Thomas Calvet
5bf7ad44e1 [Routing][ObjectRouteLoader] Allow invokable route loader services 2019-04-07 10:38:24 +02:00
Yonel Ceruto
89a00b315d Improving deprecation message of the Twig templates directory src/Resources/views 2019-04-07 10:37:45 +02:00
Fabien Potencier
3d6f15251a bug #30951 Handle case where no translations were found (greg0ire)
This PR was merged into the 3.4 branch.

Discussion
----------

Handle case where no translations were found

| 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        | n/a

Right now, the program emits a warning when trying to use max() on an
empty array.

Commits
-------

79b1fb8333 Handle case where no translations were found
2019-04-07 10:36:55 +02:00
David Maicher
98b9be9b6a [Cache] fix using ProxyAdapter inside TagAwareAdapter 2019-04-07 10:35:15 +02:00
Hugo Hamon
331b601fed [3.4] [Validator] Add missing french validation translations. 2019-04-07 10:32:58 +02:00
Matthias Pigulla
03da3a22b1 Add a require env var processor
This allows to process .php files, returning the value returned
from that file. Leverages the opcache.
2019-04-07 08:29:53 +00:00
Alexander M. Turek
8acf29eaf5 There is no OB to flush. 2019-04-07 10:26:05 +02:00
Fabien Potencier
e53f696a39 feature #30429 [Form] group_by as callback returns array (antonch1989)
This PR was squashed before being merged into the 4.3-dev branch (closes #30429).

Discussion
----------

[Form]  group_by as callback returns array

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30315
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Commits
-------

4c04601036 [Form]  group_by as callback returns array
2019-04-07 10:22:34 +02:00
Anton Chernikov
4c04601036 [Form] group_by as callback returns array 2019-04-07 10:22:26 +02:00
Fabien Potencier
1f48f7bd82 bug #29800 [Validator] Only traverse arrays that are cascaded into (corphi)
This PR was squashed before being merged into the 3.4 branch (closes #29800).

Discussion
----------

[Validator] Only traverse arrays that are cascaded into

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

Previously, array properties were traversed even if they were not annotated `Valid`.

Commits
-------

7db9200279 [Validator] Only traverse arrays that are cascaded into
2019-04-07 10:20:18 +02:00
Philipp Cordes
7db9200279 [Validator] Only traverse arrays that are cascaded into 2019-04-07 10:20:12 +02:00
Grégoire Paris
79b1fb8333
Handle case where no translations were found
Right now, the program emits a warning when trying to use max() on an
empty array.
2019-04-07 10:01:42 +02:00
Fabien Potencier
03d804e32d minor #30928 [DependencyInjection] fix tests (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] fix tests

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

#FOSSHackathons #EUFOSSA

Commits
-------

e55f6e6f5e fix tests
2019-04-07 09:57:30 +02:00
Vincent Touzet
e2dbe63489 [Messenger] DoctrineTransport - Use InvalidArgumentException instead of TransportException during configuration checks 2019-04-07 09:39:29 +02:00
Nicolas Grekas
65b46a532c feature #30887 [FrameworkBundle] fix search in debug autowiring (sez-open)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] fix search in debug autowiring

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- 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 | #30493   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

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

Taking #30522 and finishing it with @nicolas-grekas comments.
Is the sentence ok ?

Commits
-------

fec4beaffc fix debug:autowiringcommand
2019-04-07 09:30:18 +02:00
sez-open
fec4beaffc
fix debug:autowiringcommand 2019-04-07 09:27:26 +02:00
tiecoders
0c2a2bf536 ASSET-PathPackage-Enhancement - Use parent getUrl method instead of duplicating code. 2019-04-07 01:25:14 +02:00
Grégoire Pineau
50c22b3d58 Fixed tests 2019-04-06 23:28:55 +02:00
Gábor Egyed
6a732dc031
[Validator] Translate unique collection message to Hungarian 2019-04-06 23:20:57 +02:00
Christian Flothmann
de12e2382e throw UnexpectedValueException instead 2019-04-06 23:02:44 +02:00
Christian Flothmann
e55f6e6f5e fix tests 2019-04-06 22:57:23 +02:00
Christian Flothmann
faf629386e drop not needed "constant" type argument 2019-04-06 22:23:29 +02:00
dFayet
44d9fbe995 Fix graph text color 2019-04-06 21:48:09 +02:00
Fabien Potencier
fad7c8c01f feature #30935 Use env variable to create anytype of lock store (jderusse)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Use env variable to create anytype of lock store

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

In lock configuration, at the moment, env variable are only able to resolve DNS which are able to create RedisStore and MemcachedStore.

This PR update the StoreFactory to be able to also create connection at runtime.

Commits
-------

6b57ea996c Use env variable to create anytype of lock store
2019-04-06 21:40:22 +02:00
Jérémy Derussé
6b57ea996c
Use env variable to create anytype of lock store 2019-04-06 21:34:46 +02:00
Grégoire Paris
6d51a04b11
Run test in separate process
This test calls code that defines some environment variables, which in
turn trigger the registration of a the deprecation error handler, which
causes unexpected issues when testing other components.
2019-04-06 21:33:58 +02:00
Fabien Potencier
9afcc7b833 minor #30934 [Serializer] add return type hints for ObjectPropertyListExtractorInterface (dmaicher)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Serializer] add return type hints for ObjectPropertyListExtractorInterface

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

@nicolas-grekas as just discussed here the type-hint + phpdoc cleanup as follow-up for https://github.com/symfony/symfony/pull/30904 😉

cc @joelwurtz

Commits
-------

7628972285 [Serializer] add return type hints for ObjectPropertyListExtractorInterface
2019-04-06 21:25:56 +02:00
Grégoire Paris
a53e0fe1cd
Use a class name that does not actually exist
Using "Foo", a class name that corresponds to no less than 22 fixture
classes, results in the first found "Foo" being loaded when one is
found by the ClassNotFoundFatalErrorHandler error handler, I am not sure
exactly why, but it is not really a big issue because this is a fatal
error handler and execution is not supposed to continue after that.
Except that is very much the case when running the whole test suite
sequentially with ./phpunit . Then we arrive to the DI component test
suite, and a failure happens because \\foo was not supposed to be defined:

> Failed asserting that exception message 'The definition for "\foo" has
> no class attribute, and appears to reference a class or interface in the
> global namespace. Leaving out the "class" attribute is only allowed for
> namespaced classes. Please specify the class attribute explicitly to get
> rid of this error.' contains 'The definition for "\foo" has no class.'.
2019-04-06 21:25:09 +02:00
Fabien Potencier
f80df4cea5 feature #30932 [Validator] Add an option to disable NotCompromisedPasswordValidator (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Validator] Add an option to disable NotCompromisedPasswordValidator

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30871
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/issues/11327

EUFOSSA

Commits
-------

9a2787e89a [Validator] Add an option to disable NotCompromisedPasswordValidator
2019-04-06 21:23:33 +02:00
Fabien Potencier
e05aaf9207 feature #30909 [Translator] Add comments when dumping po files (deguif)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Translator] Add comments when dumping po files

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | ?    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29962
| License       | MIT
| Doc PR        |

This code
```php
$catalogue = new MessageCatalogue('fr');
$dumper = new PoFileDumper();

$catalogue->set('key.one', 'First key', 'custom');
$catalogue->setMetadata('key.one', ['sources' => 'src/file_1', 'comments' => 'Comment', 'flags' => 'fuzzy'], 'custom');

$catalogue->set('key.second', 'Second key', 'custom');
$catalogue->setMetadata('key.second', ['sources' => ['src/file_1', 'src/file_2'], 'comments' => ['Comment 1', 'Comment 2'], 'flags' => ['fuzzy', 'another']], 'custom');

$dumper->dump($catalogue, [
    'path' => 'xxx',
]);
```

Will produces this output:
```
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: fr\n"

# Comment
#, fuzzy
#: src/file_1
msgid "key.one"
msgstr "First key"

# Comment 1
# Comment 2
#, fuzzy,another
#: src/file_1 src/file_2
msgid "key.second"
msgstr "Second key"
```

Commits
-------

31b3a55787 Add comments when dumping po files
2019-04-06 21:19:44 +02:00
Fabien Potencier
3de3e4e8d9 feature #30913 [Messenger] Uses an AmqpStamp to provide flags and attributes (sroze)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Uses an `AmqpStamp` to provide flags and attributes

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

Using the `AmqpStamp` you can configure the flags and any attribute (such as `delivery_mode`).

Commits
-------

56fa574023 Uses an `AmqpStamp` to provide flags and attributes
2019-04-06 21:18:37 +02:00
David Maicher
7628972285 [Serializer] add return type hints for ObjectPropertyListExtractorInterface 2019-04-06 21:18:18 +02:00
Pascal Borreli
a29ce2817c [Security] Add a separator in the remember me cookie hash 2019-04-06 21:17:28 +02:00
Grégoire Pineau
9a2787e89a [Validator] Add an option to disable NotCompromisedPasswordValidator 2019-04-06 21:16:20 +02:00
Samuel ROZE
56fa574023 Uses an AmqpStamp to provide flags and attributes 2019-04-06 21:05:34 +02:00
Fabien Potencier
8a62892e42 bug #30876 [Mime][BrowserKit] Add FormUrlEncoded - Fix content-type in HttpBrowserPost (jderusse)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Mime][BrowserKit] Add FormUrlEncoded - Fix content-type in HttpBrowserPost

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

This PR use the content-type `x-www-form-urlencoded` when posting a form with the HttpBrowser.

Commits
-------

aecca9778e Use FormUrlEncoded when posting non-binary data
2019-04-06 21:02:43 +02:00
Fabien Potencier
05e488f418 fixed CS 2019-04-06 20:58:31 +02:00
Fabien Potencier
5c0acfb649 minor #30929 [HttpKernel] Remove unused import (yceruto)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpKernel] Remove unused import

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

cleanup

EU-FOSSA

Commits
-------

0d704b4f79 Remove unused import
2019-04-06 20:54:36 +02:00
Yonel Ceruto
0d704b4f79 Remove unused import 2019-04-06 20:51:34 +02:00
Fabien Potencier
c73fd100e9 feature #30900 [Validator] add new Timezone validation constraint (phansys)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Validator] add new `Timezone` validation constraint

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

Rework of #22262.

Commits
-------

536e53f184 [Validator] add new `Timezone` validation constraint.
2019-04-06 20:48:23 +02:00
Javier Spagnoletti
536e53f184 [Validator] add new Timezone validation constraint. 2019-04-06 20:45:46 +02:00
Fabien Potencier
58d78ac2cd minor #30927 [HttpClient] Removed undefined variable (derrabus)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] Removed undefined variable

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

The variable `$noProxy` is accessed here before it is defined.

`EU-FOSSA`

Commits
-------

69f0a0b3bf Removed undefined variable.
2019-04-06 20:45:16 +02:00
Fabien Potencier
ce220cd216 feature #30915 [Serializer] Add datetimezone normalizer (jewome62)
This PR was squashed before being merged into the 4.3-dev branch (closes #30915).

Discussion
----------

[Serializer] Add datetimezone normalizer

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

Commits
-------

1546c0dfa0 [Serializer] Add datetimezone normalizer
2019-04-06 20:42:17 +02:00
jewome62
1546c0dfa0 [Serializer] Add datetimezone normalizer 2019-04-06 20:42:10 +02:00
Alexander M. Turek
69f0a0b3bf Removed undefined variable. 2019-04-06 20:38:25 +02:00
Fabien Potencier
a68b4c7191 feature #28937 Improve Translator caching (rpkamp)
This PR was squashed before being merged into the 4.3-dev branch (closes #28937).

Discussion
----------

Improve Translator caching

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

Add DirectoryResources to MessageCatalogues when loaded.

So that when a file is added to one of the directories the cache for all MessageCatalogues will be invalidated.

All directories must be added to all MessageCatalogues because we can't predict for which locale files will be added to each individual directory.

Also, now that the translator keeps track of its own directories for caching the container no longer needs to it. This means that when a translation changes or is added the container no longer needs to be fully rebuilt, saving a considerable amount of time (compilation time went down from ~4 seconds to ~1 second on each translation change/add in our project).

Commits
-------

a5246589cf Improve Translator caching
2019-04-06 20:37:50 +02:00
Remon van de Kamp
a5246589cf Improve Translator caching 2019-04-06 20:37:41 +02:00
Fabien Potencier
f587944e61 minor #30916 [Profiler] Update ProfilerController.php (error56)
This PR was squashed before being merged into the 4.3-dev branch (closes #30916).

Discussion
----------

[Profiler] Update ProfilerController.php

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 | n/a   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

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

6e0785f8c5 [Profiler] Update ProfilerController.php
2019-04-06 20:31:43 +02:00
error56
6e0785f8c5 [Profiler] Update ProfilerController.php 2019-04-06 20:31:36 +02:00
Fabien Potencier
adba41aaa6 feature #30904 [Serializer] provide new ObjectPropertyListExtractorInterface (dmaicher)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Serializer] provide new ObjectPropertyListExtractorInterface

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

EUFOSSA Hackathon

As discussed with @joelwurtz this adds a new `ObjectPropertyListExtractorInterface` and a default implementation.

See https://github.com/symfony/symfony/issues/30818

>  A new interface will be provided ObjectPropertyListExtractorInterface (name can change), that allow getting attributes based on an object. A default implementation will be provided that use the PropertyListExtractorInterface and a class resolver, as the latter one only rely on class name, it may be important to have this distinction (this will allow features that rely on a specific value of the object to get the current property list, like exclusion policy)

Commits
-------

997270f7ac [Serializer] provide new ObjectPropertyListExtractorInterface
2019-04-06 20:28:25 +02:00
Fabien Potencier
e2e38dea9a feature #30902 [Workflow] The TransitionEvent is able to modify the context (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Workflow] The TransitionEvent is able to modify the context

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

EUFOSSA

ping @HeahDude

Commits
-------

62ab775154 [Workflow] The TransitionEvent is able to modify the context
2019-04-06 20:25:25 +02:00
Fabien Potencier
e5f14b7d28 feature #30908 [Workflow] Added workflow_transition_blockers twig function (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Workflow] Added workflow_transition_blockers twig function

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

EUFOSSA

---

also related to https://github.com/symfony/symfony/issues/26689

I'm not a big fan of the current name. What should I pick?

cc @javiereguiluz

Commits
-------

a2f99757f1 [Workflow] Added workflow_transition_blockers twig function
2019-04-06 20:23:30 +02:00
Fabien Potencier
4c78e60ad5 feature #30893 Add "input" option to NumberType (fancyweb, Bernhard Schussek)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Add "input" option to NumberType

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

This PR replaces #24793 in (partially) fixing how Doctrine's DECIMAL type is handled by the Form component.

Previously, DECIMAL was mapped to the regular NumberType. That confuses Doctrine's change detection, depending on the DB platform.

Examples:

| DB | DB value | Doctrine entity before submit | Form input | Doctrine entity after submit
| --- | --- | --- | --- | ---
| SQLite | 8.000 | '8' | 8 | 8
| SQLite | 8.123 | '8.123' | 8.123 | 8.123
| PostgreSQL | 8.000 | '8.000' | 8 | 8
| PostgreSQL | 8.123 | '8.123' | 8.123 | 8.123

The value in the Doctrine entity changes before and after submit. Hence Doctrine believes an update is necessary.

This PR introduces an `input` option to NumberType (similar to DateType), that can be set to `'number'` (default) or `'string'`. If set to `'string'`, the conversion is as follows:

| DB | DB value | Doctrine entity before submit | Form input | Doctrine entity after submit
| --- | --- | --- | --- | ---
| SQLite | 8.000 | **'8'** | 8 | **'8.000'**
| SQLite | 8.123 | '8.123' | 8.123 | '8.123'
| PostgreSQL | 8.000 | '8.000' | 8 | '8.000'
| PostgreSQL | 8.123 | '8.123' | 8.123 | '8.123'

You see that this does not completely solve this issue for SQLite. However, @Ocramius and I agree that this is something to be fixed by Doctrine, since Doctrine is providing the database abstraction.

That fix should be done in the SqlitePlatform object in Doctrine as part of another PR and should be backwards compatible with the current Doctrine version (i.e. opt in via configuration).

Compared to #24793, this PR does not introduce a new type but instead makes the NumberType more flexible. Also, this PR does not introduce the `force_full_scale` option since that should be solved by Doctrine as described above.

Commits
-------

3f25734647 Added new option "input" to NumberType
fb2b37a8f3 add force_full_scale option to handle all cases
40f25121c3 [DoctrineBridge] Add decimal form type
2019-04-06 20:17:43 +02:00
Fabien Potencier
f3a05552f3 minor #30924 Move doctrine/collections to an optional dep in doctrine-bridge (stof)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Move doctrine/collections to an optional dep in doctrine-bridge

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

The EntityType does not need to convert the array to a collection if the project does not care about using doctrine/collections. So this can become an optional dependency.
The goal here is to reduce the dependencies of DoctrineBundle when using it in DBAL-only mode.

doctrine/persistence still brings a bunch of unwanted dependencies for a DBAL-only project, but this requires work on the Doctrine side (we discussed it with @alcaeus) as the ConnectionRegistry is part of it. Moving it to an optional dependency in the bridge will probably come in 6 months instead.
And doctrine-cache-bundle also brings some, but that's already in the work of being removed from DoctrineBundle 2.0.

Commits
-------

07d90f987e Move doctrine/collections to an optional dep in doctrine-bridge
2019-04-06 20:13:25 +02:00
Fabien Potencier
3e0b2354db bug #30921 [Translator] Warm up the translations cache in dev (tgalopin)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translator] Warm up the translations cache in dev

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

This PR fixes a bug in development when using the DataCollectorTranslator: because it's not implementing WarmableInterface, the translations cache is not built during cache:clear during development.

Commits
-------

a5f1afca15 [Translator] Warm up the translations cache in dev
2019-04-06 20:09:42 +02:00
Fabien Potencier
ed1b95d0d6 bug #30922 [TwigBridge] fix horizontal spacing of inlined Bootstrap forms (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] fix horizontal spacing of inlined Bootstrap forms

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

Commits
-------

7113a53e19 fix horizontal spacing of inlined Bootstrap forms
2019-04-06 20:07:34 +02:00
François-Xavier de Guillebon
31b3a55787
Add comments when dumping po files 2019-04-06 20:07:20 +02:00
Fabien Potencier
07a1095af9 bug #30860 [Profiler] Fix dark theme elements color (dFayet)
This PR was squashed before being merged into the 4.2 branch (closes #30860).

Discussion
----------

[Profiler] Fix dark theme elements color

| 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 | #29194   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | -

I think the color handling of the code highlighted (exceptions, ...) is quite questionnable, but as we use the `highlight_file()` function, I don't really see an other way to handle it, tell me what you think.

###  Before/After
**Form**
![Capture d’écran de 2019-04-04 10-07-18](https://user-images.githubusercontent.com/7721219/55539945-2cfe0580-56c2-11e9-8e5c-a4b6352ab12d.png)

![Capture d’écran de 2019-04-04 10-03-27](https://user-images.githubusercontent.com/7721219/55539906-15268180-56c2-11e9-90e7-326cc1c01ccd.png)

**Twig render graph**
![Capture d’écran de 2019-04-04 10-07-36](https://user-images.githubusercontent.com/7721219/55539969-3b4c2180-56c2-11e9-9064-1fd10bf1da02.png)

![Capture d’écran de 2019-04-06 19-37-02](https://user-images.githubusercontent.com/7721219/55673094-693c8c00-58a3-11e9-90a4-76f6b312d516.png)

**Exceptions**
![Capture d’écran de 2019-04-04 10-08-19](https://user-images.githubusercontent.com/7721219/55540012-51f27880-56c2-11e9-930b-98d680093e49.png)

![Capture d’écran de 2019-04-06 09-39-27](https://user-images.githubusercontent.com/7721219/55667421-4f2b8b00-585c-11e9-81c7-dc09bd982375.png)

**Doctrine queries**
![Capture d’écran de 2019-04-04 10-08-37](https://user-images.githubusercontent.com/7721219/55540059-73536480-56c2-11e9-9b0d-ea691a16a1a5.png)

![Capture d’écran de 2019-04-04 10-04-47](https://user-images.githubusercontent.com/7721219/55540068-78b0af00-56c2-11e9-88f7-2181800006a7.png)

Commits
-------

8a9c2c86ef [Profiler] Fix dark theme elements color
2019-04-06 20:06:10 +02:00
dFayet
8a9c2c86ef [Profiler] Fix dark theme elements color 2019-04-06 20:06:03 +02:00
Christophe Coevoet
07d90f987e Move doctrine/collections to an optional dep in doctrine-bridge
The EntityType does not need to convert the array to a collection if
the project does not care about using doctrine/collections. So this
can become an optional dependency.
2019-04-06 20:02:40 +02:00
Fabien Potencier
db93b952e9 bug #30895 [Form] turn failed file uploads into form errors (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] turn failed file uploads into form errors

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

Commits
-------

1a21ca7362 turn failed file uploads into form errors
2019-04-06 20:02:12 +02:00
Fabien Potencier
f551f2daae Merge branch '4.2'
* 4.2:
  Fix wrong dump for PO files
2019-04-06 19:57:49 +02:00
Fabien Potencier
4c3a48a66f Merge branch '3.4' into 4.2
* 3.4:
  Fix wrong dump for PO files
2019-04-06 19:57:40 +02:00
Titouan Galopin
8ac712b29d [Validator] Wire NotCompromisedPassword in FrameworkBundle and handle non UTF-8 password 2019-04-06 19:55:53 +02:00
Jérémy Derussé
aecca9778e
Use FormUrlEncoded when posting non-binary data 2019-04-06 19:34:31 +02:00
Christian Flothmann
7113a53e19 fix horizontal spacing of inlined Bootstrap forms 2019-04-06 19:28:56 +02:00
Grégoire Pineau
a2f99757f1 [Workflow] Added workflow_transition_blockers twig function 2019-04-06 19:16:15 +02:00
François-Xavier de Guillebon
b54abfc643
Fix wrong dump for PO files 2019-04-06 19:11:02 +02:00
Titouan Galopin
a5f1afca15 [Translator] Warm up the translations cache in dev 2019-04-06 19:05:56 +02:00
Christian Flothmann
1a21ca7362 turn failed file uploads into form errors 2019-04-06 19:02:48 +02:00
Fabien Potencier
ede66604d7 feature #30890 [Workflow] Changed initial_places to initial_marking, added property (HeahDude, lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Workflow] Changed initial_places to initial_marking, added property

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #30662 and #30656
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony/issues/30656

EUFOSSA

---

* [Workflow] Changed initial_places to initial_marking, added property instead of type
* [Workflow] Finished integration of initial_marking + deprecated support for workflow + single state markin store
 [Workflow] Deprecate worflow and single state marking

---

Here is an exemple of deprecation:
```

  3x: Passing something else than "method" has been deprecated in Symfony 4.3.
    1x in PhpFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection
    1x in XmlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection
    1x in YamlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection

  3x: The "framework.workflows.workflows.legacy.marking_store.arguments" configuration key has been deprecated in Symfony 4.3. Use "property" instead.
    1x in PhpFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection
    1x in XmlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection
    1x in YamlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection

  3x: The "framework.workflows.workflows.legacy.initial_place" configuration key has been deprecated in Symfony 4.3, use the "initial_marking" configuration key instead.
    1x in PhpFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection
    1x in XmlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection
    1x in YamlFrameworkExtensionTest::testWorkflowLegacy from Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection
  ```

Commits
-------

039353546f [Workflow] Deprecate worflow and single state marking
87839cfaf9 [Workflow] Finished integration of initial_marking + deprecated support for workflow + single state markin store
73708a61b6 [Workflow] Changed initial_places to initial_marking, added property instead of type
2019-04-06 18:42:29 +02:00
Fabien Potencier
f0786bb3d8 Merge branch '4.2'
* 4.2:
  [WIP] [DependencyInjection] Fix a wrong error when using a factory and a call
  Fix table trailing backslash
2019-04-06 18:39:17 +02:00
Fabien Potencier
dc65401f66 Merge branch '3.4' into 4.2
* 3.4:
  [WIP] [DependencyInjection] Fix a wrong error when using a factory and a call
2019-04-06 18:39:07 +02:00
Fabien Potencier
86210b3fa1 bug #30889 [DependencyInjection] Fix a wrong error when using a factory (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] Fix a wrong error when using a factory

…d a call

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 | #30885    <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

<!--
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.
-->
This a work in progress, it needs tests, firstly I wanted to ask the author to test and tell if it's ok.

Commits
-------

5d4e3a2d57 [WIP] [DependencyInjection] Fix a wrong error when using a factory and a call
2019-04-06 18:37:16 +02:00
Amrouche Hamza
5d4e3a2d57
[WIP] [DependencyInjection] Fix a wrong error when using a factory and a call 2019-04-06 18:35:29 +02:00
Fabien Potencier
b46ca51238 bug #30911 [Console] Fix table trailing backslash (maidmaid)
This PR was merged into the 4.2 branch.

Discussion
----------

[Console] Fix table trailing backslash

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

```php
(new Table($output))
    ->setColumnMaxWidth(0, 5)
    ->setRows([['1234\6']])
    ->render();
;
```
before:

```
+-------+
| 1234<fg=default;bg=default> |
| 6     |
+-------+
```

after:

```
+-------+
| 1234\ |
| 6     |
+-------+
```

#EUFOSSA

Commits
-------

48f020f9e3 Fix table trailing backslash
2019-04-06 18:35:21 +02:00
Fabien Potencier
de3c7429e9 feature #30906 [symfony/HttpKernel] Throws an error when the generated class name is invalid. (drupol)
This PR was squashed before being merged into the 4.3-dev branch (closes #30906).

Discussion
----------

[symfony/HttpKernel] Throws an error when the generated class name is invalid.

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

Commits
-------

c976866566 [symfony/HttpKernel] Throws an error when the generated class name is invalid.
2019-04-06 17:52:23 +02:00
Pol Dellaiera
c976866566 [symfony/HttpKernel] Throws an error when the generated class name is invalid. 2019-04-06 17:52:16 +02:00
David Maicher
997270f7ac [Serializer] provide new ObjectPropertyListExtractorInterface 2019-04-06 17:40:37 +02:00
Christian Flothmann
ea5ff18014 Merge branch '4.2'
* 4.2:
  Restore previous state for libxml option
  fix tests
  Uses the SerializerStamp when deserializing the envelope
2019-04-06 17:38:43 +02:00
Grégoire Paris
dde74aa8c9 Restore previous state for libxml option
Whenever libxml_use_internal_errors() is called, the previous value for
it should be restored. This used to be the case in this piece of code,
but it was wrongly removed in e53bf5839b ,
which has the nasty side effect of making the Validator component test
suite break with this message:

Validation failed: No DTD found!
2019-04-06 17:26:32 +02:00
Samuel ROZE
f88a79b550 bug #30903 [Messenger] Uses the SerializerStamp when deserializing the envelope (sroze)
This PR was merged into the 4.2 branch.

Discussion
----------

[Messenger] Uses the `SerializerStamp` when deserializing the envelope

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

Uses the `SerializerStamp` when decoding the message.

Commits
-------

ab55e8e7ef Uses the SerializerStamp when deserializing the envelope
2019-04-06 17:25:35 +02:00
Christian Flothmann
ad62ba899c Merge branch '3.4' into 4.2
* 3.4:
  fix tests
2019-04-06 17:21:41 +02:00
Fabien Potencier
f82f1c0825 feature #30892 [DomCrawler] Improve Crawler HTML5 parser need detection (tgalopin)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DomCrawler] Improve Crawler HTML5 parser need detection

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

Live from #eu-fossa

Follow up of https://github.com/symfony/symfony/pull/29306

This PR introduces a better detection mechanism to choose when to parse using the HTML5 parser or not, and fix a subcrawler parsing issue as well.

@stof I'd be super interested by your review :) !

Commits
-------

9bbdab68ef [DomCrawler] Improve Crawler HTML5 parser need detection
2019-04-06 17:19:57 +02:00
Dany Maillard
48f020f9e3 Fix table trailing backslash 2019-04-06 17:11:40 +02:00
Grégoire Pineau
62ab775154 [Workflow] The TransitionEvent is able to modify the context 2019-04-06 17:06:08 +02:00
Titouan Galopin
9bbdab68ef [DomCrawler] Improve Crawler HTML5 parser need detection 2019-04-06 16:52:24 +02:00
Bernhard Schussek
3f25734647 Added new option "input" to NumberType 2019-04-06 16:48:06 +02:00
Christian Flothmann
83c661d5cf fix tests 2019-04-06 16:36:41 +02:00
Samuel ROZE
ab55e8e7ef Uses the SerializerStamp when deserializing the envelope 2019-04-06 16:25:54 +02:00
Robin Chalas
09dee1737d Merge branch '4.2'
* 4.2:
  fix merge
2019-04-06 16:23:27 +02:00
Robin Chalas
1628995268 fix merge 2019-04-06 16:21:02 +02:00
Fabien Potencier
f4c23504c5 feature #30901 Renamed NotPwned to NotCompromisedPassword (javiereguiluz)
This PR was squashed before being merged into the 4.3-dev branch (closes #30901).

Discussion
----------

Renamed NotPwned to NotCompromisedPassword

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

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

2f648b04ae Renamed NotPwned to NotCompromisedPassword
2019-04-06 16:20:08 +02:00
Javier Eguiluz
2f648b04ae Renamed NotPwned to NotCompromisedPassword 2019-04-06 16:19:57 +02:00
Fabien Potencier
f527acfac7 Merge branch '4.2'
* 4.2: (45 commits)
  [Form] various minor fixes
  Ensure the parent process is always killed
  bugfix: the terminal state was wrong and not reseted
  [Console] Fix inconsistent result for choice questions in non-interactive mode
  Define null return type for Constraint::getDefaultOption()
  [Routing] Fix: annotation loader ignores method's default values
  [HttpKernel] Fix DebugHandlersListener constructor docblock
  Skip Glob brace test when GLOB_BRACE is unavailable
  bumped Symfony version to 4.2.6
  updated VERSION for 4.2.5
  updated CHANGELOG for 4.2.5
  bumped Symfony version to 3.4.25
  updated VERSION for 3.4.24
  update CONTRIBUTORS for 3.4.24
  updated CHANGELOG for 3.4.24
  [EventDispatcher] cleanup
  fix testIgnoredAttributesInContext
  Re-generate icu 64.1 data
  Improve PHPdoc / IDE autocomplete for config tree builder
  [Bridge][Twig] DebugCommand - fix escaping and filter
  ...
2019-04-06 16:04:46 +02:00
Fabien Potencier
fa44efe90c Merge branch '3.4' into 4.2
* 3.4:
  [Form] various minor fixes
  bugfix: the terminal state was wrong and not reseted
  [Console] Fix inconsistent result for choice questions in non-interactive mode
  Define null return type for Constraint::getDefaultOption()
  [HttpKernel] Fix DebugHandlersListener constructor docblock
  Skip Glob brace test when GLOB_BRACE is unavailable
  bumped Symfony version to 3.4.25
  updated VERSION for 3.4.24
  update CONTRIBUTORS for 3.4.24
  updated CHANGELOG for 3.4.24
  [EventDispatcher] cleanup
2019-04-06 15:51:08 +02:00
Fabien Potencier
967fa368b2 bug #30879 [Form] Php doc fixes and cs + optimizations (Jules Pietri)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Php doc fixes and cs + optimizations

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

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

Some micro optimizations may target master with some profiling but I would like some reviews first. Thanks!

Commits
-------

56429a6f08 [Form] various minor fixes
2019-04-06 15:47:14 +02:00
Jules Pietri
56429a6f08 [Form] various minor fixes 2019-04-06 15:44:06 +02:00
Grégoire Pineau
039353546f [Workflow] Deprecate worflow and single state marking 2019-04-06 15:38:51 +02:00
Grégoire Pineau
87839cfaf9 [Workflow] Finished integration of initial_marking + deprecated support for workflow + single state markin store 2019-04-06 15:38:51 +02:00
Jules Pietri
73708a61b6 [Workflow] Changed initial_places to initial_marking, added property instead of type 2019-04-06 15:38:51 +02:00
Thomas Calvet
fb2b37a8f3 add force_full_scale option to handle all cases 2019-04-06 15:35:03 +02:00
Thomas Calvet
40f25121c3 [DoctrineBridge] Add decimal form type 2019-04-06 15:35:03 +02:00
Fabien Potencier
5fe3701f05 feature #30020 [Messenger] Ensure message is handled only once per handler (keulinho, sroze)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Ensure message is handled only once per handler

Add check to ensure that a message is only handled once per handler
Add try...catch to run all handlers before throwing exception

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

This would make error handling and retrying of messages much more easier. As statet  here https://github.com/symfony/symfony/pull/27008#issuecomment-384677065 there is currently no way to retry a for all failed handlers if there are mutliple handlers and just some throw an exception.
Also if an Exception in an handler occurs the execution chain is disrupted and the other handlers are never invoked.
With this change it is easily possible to create an userland middleware that catches the `ChainedHandlerFailedException` and does some custom retry logic. If you ensure that the `HandledStamps` on the `Envelope` are preserved the message will be handled just by the failed handlers

Commits
-------

2e5e910229 Rename exception, add change log and a few other things
e6e4cde5fc Ensure message is handled only once per handler
2019-04-06 14:59:11 +02:00
Fabien Potencier
4e2b655941 feature #30545 #30536 PropertyAccessor->getValue disable exception (dimabory)
This PR was merged into the 4.3-dev branch.

Discussion
----------

#30536 PropertyAccessor->getValue disable exception

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

Commits
-------

c336696a06 [PropertyAccess] Allow to disable exception on invalid property path when using PropertyAccess::getValue()
2019-04-06 14:57:26 +02:00
Dmytro
c336696a06 [PropertyAccess] Allow to disable exception on invalid property path when using PropertyAccess::getValue() 2019-04-06 14:47:35 +02:00
Samuel ROZE
2e5e910229 Rename exception, add change log and a few other things 2019-04-06 14:41:06 +02:00
Jonas Elfering
e6e4cde5fc Ensure message is handled only once per handler
Add check to ensure that a message is only handled once per handler
Add try...catch to run all handlers before throwing exception
2019-04-06 14:40:48 +02:00
Samuel ROZE
e6eb43bd68 feature #30008 [messenger] Adds a stamp to provide a routing key on message publishing (G15N, sroze)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[messenger] Adds a stamp to provide a routing key on message publishing

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29950
| License       | MIT
| Doc PR        | symfony/symfony-docs#11236

Adds a stamp allowing to set a `routing_key` at `MessageBus::dispatch()` level.

```php
$message = (new Envelope('message'))->with(new RoutingKeyStamp('routing_key'));
$bus->dispatch($message);
```

Commits
-------

a515635f18 Simply code and rename "configuration" to "options"
3151b54b7a [messenger] AMQP configurable routing key & multiple queues
2019-04-06 14:39:32 +02:00
Samuel ROZE
a515635f18 Simply code and rename "configuration" to "options" 2019-04-06 14:27:04 +02:00
Fabien Potencier
fe7363fff1 bug #30884 [Workflow] Fixed initial places when no places are configured (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Workflow] Fixed initial places when no places are configured

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

EUFOSSA

I introduced a BC break in #30468 and this PR fix it.
With the full stack framework, when one does not configure the
initial_place(s) the DIC set `[]` for the initial values.
So it removes the initials values guessed in `Definition::addPlace()`

Commits
-------

76fd9c35b7 [Workflow] Fixed initial places when no places are configured
2019-04-06 13:29:01 +02:00
Fabien Potencier
a7c4767a8e bug #30886 [Workflow] Fixed Guard Listener usage of RoleHierarchyInterface (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Workflow] Fixed Guard Listener usage of RoleHierarchyInterface

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

EUFOSSA

related to https://github.com/symfony/symfony/pull/30388

Commits
-------

a12b359892 [Workflow] Fixed Guard Listener usage of RoleHierarchyInterface
2019-04-06 13:25:08 +02:00
Grégoire Pineau
76fd9c35b7 [Workflow] Fixed initial places when no places are configured
I introduced a BC break in #30468 and this PR fix it.
With the full stack framework, when one does not configure the
initial_place(s) the DIC set `[]` for the initial values.
So it removes the initials values guessed in `Definition::addPlace()`
2019-04-06 13:14:28 +02:00
Grégoire Pineau
a12b359892 [Workflow] Fixed Guard Listener usage of RoleHierarchyInterface 2019-04-06 13:10:58 +02:00
Samuel ROZE
9793522f6e minor #29525 [Messenger] Make MessengerPass less strict when auto-register handlers (nicholasruunu)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Make MessengerPass less strict when auto-register handlers

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR        | not needed

This allows you to auto-register handlers that have more than one argument, which is useful when having custom middleware to pass more parameters.

#symfonyconhackday2018

Commits
-------

49ab2cd9d9 Make MessengerPass less strict when auto-register handlers
2019-04-06 12:29:02 +02:00
Fabien Potencier
d77ea48d2f bug #30883 [Console] Fix stty not reset when aborting in QuestionHelper::autocomplete() (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix stty not reset when aborting in QuestionHelper::autocomplete()

| 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 | #30861   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | none

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

f54389b95c bugfix: the terminal state was wrong and not reseted
2019-04-06 12:13:41 +02:00
Grégoire Paris
94d41825fd
Ensure the parent process is always killed
If you try to run the test suite but do not have a redis instance
running, the parent process that was supposed to be killed will never be
as the thing being thrown is not an exception.
This results in the test suite hanging forever at the end.
In this patch, the exception is thrown again, and then caught in the trait, and
the parent gets killed as it should.
2019-04-06 12:12:12 +02:00
Amrouche Hamza
f54389b95c
bugfix: the terminal state was wrong and not reseted 2019-04-06 12:10:03 +02:00
Samuel ROZE
550a569725 minor #30857 [Messenger] test DoctrineTransport on travis and appveyor (vincenttouzet)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] test DoctrineTransport on travis and appveyor

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

Currently tests on the `Symfony\Component\Messenger\Tests\Transport\Doctrine\DoctrineIntegrationTest` are skipped because there is no `MESSENGER_DOCTRINE_DSN` environment variable is not defined.

This PR update the travis and AppVeyor configuration to run these tests.

This is a WIP. I'm not a Travis/AppVeyor user so this clearly need more work

Commits
-------

8f81f55a46 [Messenger] test DoctrineTransport on travis and appveyor
2019-04-06 11:50:34 +02:00
Fabien Potencier
4b61602d51 removed unneeded tags 2019-04-06 11:45:29 +02:00
Guillaume Gammelin
3151b54b7a [messenger] AMQP configurable routing key & multiple queues 2019-04-06 11:39:12 +02:00
Fabien Potencier
9ab706be78 bug #30881 [Messenger] Fixed DIC config when the messenger is not installed (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Fixed DIC config when the messenger is not installed

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

EUFOSSA

---

Fix:

```

In getConsole_Command_MessengerStopWorkersService.php line 9:

  Attempted to load class "StopWorkersCommand" from namespace "Symfony\Component\Messenger\Command".
  Did you forget a "use" statement for another namespace?

```

Commits
-------

292021b146 [Messenger] Fixed DIC config when the messenger is not installed
2019-04-06 11:38:35 +02:00
Christophe Coevoet
ab4d05358c Fix XSS issues in the form theme of the PHP templating engine 2019-04-06 11:38:26 +02:00
Fabien Potencier
45fd75ea20 fixed CS 2019-04-06 11:37:23 +02:00
Fabien Potencier
ec18af4dfb feature #29097 [Messenger] Add a "in-memory://" transport (GaryPEGEOT, sroze)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Add a "in-memory://" transport

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

Add a new `InMemoryTransport` for test purpose, usable by starting your DSN by `in-memory://`

Commits
-------

8f8c82e009 Make the in-memory transport resettable
fe759205c5 Add a "null://" transport
2019-04-06 11:36:39 +02:00
Grégoire Pineau
292021b146 [Messenger] Fixed DIC config when the messenger is not installed 2019-04-06 11:33:46 +02:00
Samuel ROZE
8f8c82e009 Make the in-memory transport resettable 2019-04-06 11:30:57 +02:00
Amrouche Hamza
4fc603327d
minor: remove the logger as it seems uneeded 2019-04-06 11:23:31 +02:00
Gary PEGEOT
fe759205c5 Add a "null://" transport 2019-04-06 11:18:10 +02:00
Robin Chalas
198b895eac [Console] Fix inconsistent result for choice questions in non-interactive mode 2019-04-06 10:49:15 +02:00
Vincent Touzet
8f81f55a46 [Messenger] test DoctrineTransport on travis and appveyor 2019-04-05 16:21:26 +02:00
Grégoire Pineau
098a7ac1af [HttpClient] Adjust logger messages and levels 2019-04-05 16:18:29 +02:00
Jaik Dean
03987f2ba5 Define null return type for Constraint::getDefaultOption() 2019-04-05 14:51:27 +02:00
Fabien Potencier
09e8d74627 feature #30537 [HttpClient] logger integration (antonch1989, nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] logger integration

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

Commits
-------

26d15c8bbe [HttpClient] log requests, responses and pushes when they happen
fc6ba7efad [HttpClient] logger integration
2019-04-05 14:49:12 +02:00
Nicolas Grekas
26d15c8bbe [HttpClient] log requests, responses and pushes when they happen 2019-04-05 13:59:27 +02:00
Ryan Weaver
f7ec2d388a fixing unused variable names 2019-04-04 07:32:05 -04:00
Anton Chernikov
fc6ba7efad [HttpClient] logger integration 2019-04-04 13:03:55 +02:00
Vincent Touzet
b2f3b53253 [Messenger] Setup the doctrine transport when consuming 2019-04-03 23:16:34 +02:00
Fabien Potencier
5e61b75893 [Twig] removed TemplatedEmail::template() 2019-04-03 20:45:56 +02:00
Fabien Potencier
574097fd6a feature #30757 [Messenger] Adding MessageCountAwareInterface to get transport message count (weaverryan)
This PR was squashed before being merged into the 4.3-dev branch (closes #30757).

Discussion
----------

[Messenger] Adding MessageCountAwareInterface to get transport message count

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | symfony/symfony-docs#11236

This adds a new optional interface that receivers should implement to give an approximate number of the messages "waiting" to be handled. Why? Because, with this, you could design a system that dynamically adds/removes worker processes if a specific transport is getting slammed and needs help. Creating that system could be something we discuss for core later, but this at least makes it possible - and means it could be implemented by the user or in a bundle... which I might do if we don't get it in core ;).

Commits
-------

fc5b0cf570 [Messenger] Adding MessageCountAwareInterface to get transport message count
2019-04-03 16:45:30 +02:00
Ryan Weaver
fc5b0cf570 [Messenger] Adding MessageCountAwareInterface to get transport message count 2019-04-03 16:45:22 +02:00
Fabien Potencier
9ed2f2b71f feature #28929 [HttpKernel][Framework] Locale aware services (neghmurken)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpKernel][Framework] Locale aware services

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

Added a `LocaleAwareInterface` (and also a new service tag `kernel.locale_aware`) to be implemented on services that require the current locale at request time.
Also, refactored the actual Translator service to implement the overmentioned interface

Todo :

* [ ] Documention PR (will be written after some feedback)

Commits
-------

b9ac645d8b Locale aware service registration
2019-04-03 16:26:10 +02:00
Oleg Voronkovich
9b37793cbe [Routing] Fix: annotation loader ignores method's default values 2019-04-03 15:26:22 +02:00
Fabien Potencier
757ae748b7 fixed typo 2019-04-03 15:17:57 +02:00
Fabien Potencier
be66c44079 feature #29306 [DomCrawler] Optionally use html5-php to parse HTML (tgalopin)
This PR was squashed before being merged into the 4.3-dev branch (closes #29306).

Discussion
----------

[DomCrawler] Optionally use html5-php to parse HTML

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | WIP
| Fixed tickets | https://github.com/symfony/symfony/issues/29280, https://github.com/symfony/symfony/issues/28596
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/10700

This PR introduces the possibility to parse HTML content in the Crawler using the html5-php library (https://github.com/Masterminds/html5-php). This allows for better support of HTML5 and fix many unexpected behaviors and inconsistencies of the native DOM extension.

Commits
-------

4050ec4257 [DomCrawler] Optionally use html5-php to parse HTML
2019-04-03 15:17:25 +02:00
Titouan Galopin
4050ec4257 [DomCrawler] Optionally use html5-php to parse HTML 2019-04-03 15:17:16 +02:00
neghmurken
b9ac645d8b Locale aware service registration 2019-04-03 15:10:14 +02:00
Fabien Potencier
4ad54dad28 feature #30255 [DependencyInjection] Invokable Factory Services (zanbaldwin)
This PR was squashed before being merged into the 4.3-dev branch (closes #30255).

Discussion
----------

[DependencyInjection] Invokable Factory Services

| Q             | A
| ------------- | ---
| Branch?       | `master`
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | symfony/symfony-docs#11014

> Failing test is in the Twig bridge, and outside of the the scope of this PR.

Allow referencing invokable factory services, just as route definitions reference invokable controllers.
This functionality was also added for service configurators for consistency.

## Example

```php
<?php

namespace App\Factory;

class ServiceFactory
{
    public function __invoke(bool $debug)
    {
        return new Service($debug);
    }
}
```

```yaml
services:
    App\Service:
        # Prepend with "@" to differentiate between service and function.
        factory: '@App\Factory\ServiceFactory'
        arguments: [ '%kernel.debug%' ]
```

```xml
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://symfony.com/schema/dic/services
               http://symfony.com/schema/dic/services/services-1.0.xsd">
    <services>
        <!-- ... -->
        <service id="App\Service"
                 class="App\Service">
            <factory service="App\Factory\ServiceFactory" />
        </service>
    </services>
</container>
```

```php
<?php

use App\Service;
use App\Factory\ServiceFactory;
use Symfony\Component\DependencyInjection\Reference;

$container->register(Service::class, Service::class)
    ->setFactory(new Reference(ServiceFactory::class));
```

Commits
-------

23cb83f726 [DependencyInjection] Invokable Factory Services
2019-04-03 14:19:39 +02:00
Zan Baldwin
23cb83f726 [DependencyInjection] Invokable Factory Services 2019-04-03 14:19:31 +02:00
Fabien Potencier
248aff57d0 minor #30525 [PropertyInfo] Use a single cache item per method (deviantintegral)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[PropertyInfo] Use a single cache item per method

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

Replaces https://github.com/symfony/symfony/pull/30523 with a rebase to master.

This PR changes how property metadata is cached, significantly reducing the number of calls made between PHP and the backend cache. Instead of storing one cache item per method and set of arguments, a single cache item is stored per method. This matches well with real-world use, where most properties in an object will need to be inspected.

Note that the absolute numbers in the above PR are best case. In production environments where memcache is on a remote server, we were seeing multiple seconds consumed by memcache calls.

Commits
-------

2a4f8a11d4 [PropertyInfo] Use a single cache item per method
2019-04-03 13:59:42 +02:00
Fabien Potencier
8da76862fa feature #30843 [HttpClient] Add ScopingHttpClient::forBaseUri() + tweak MockHttpClient (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] Add ScopingHttpClient::forBaseUri() + tweak MockHttpClient

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

This allows creating scoped HTTP clients in one line:

```php
$client = ScopingHttpClient::forBaseUri($client, 'http://example.com');
```

`$client` now resolves relative URLs using the provided base URI.

If one also adds default options as 3rd argument, these will be applied conditionally when a URL matching the base URI is requested.

This PR also tweaks `MockHttpClient` to make it return `MockResponse` on its own when no constructor argument is provided, easing tests a bit.

Commits
-------

2b9b8e5707 [HttpClient] Add ScopingHttpClient::forBaseUri() + tweak MockHttpClient
2019-04-03 12:40:25 +02:00
Fabien Potencier
78afdd1c5f feature #30844 [Cache] add logs on early-recomputation and locking (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Cache] add logs on early-recomputation and locking

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

Commits
-------

847a9bb86d [Cache] add logs on early-recomputation and locking
2019-04-03 12:38:27 +02:00
Fabien Potencier
4835136e7e bug #30846 [FrameworkBundle] fix HttpClient integration (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] fix HttpClient integration

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

HttpClient should be an optional dep.
Fixes compat of SecurityBundle 4.2 with FrameworkBundle 4.3 as spotted by the CI.

Commits
-------

3e7a47c0bf [FrameworkBundle] fix HttpClient integration
2019-04-03 12:15:50 +02:00
Fabien Potencier
99bf6c2417 feature #30520 [RouterDebugCommand] add link to Controllers (nicoweb)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[RouterDebugCommand] add link to Controllers

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

Adds a link to the controller method on your IDE from dev's terminal:

<img width="734" alt="pr-debug-router" src="https://user-images.githubusercontent.com/29813575/54141007-1f3bc400-4425-11e9-82d0-1b37498d4953.png">

Configuration in your `services.yaml`:

```yaml
parameters:
    debug.file_link_format: phpstorm://open?file=%%f&line=%%l
```

Commits
-------

e9fca21d6b [RouterDebugCommand] add link to Controllers
2019-04-03 12:12:27 +02:00
Fabien Potencier
539f4ca162 feature #30212 [DI] Add support for "wither" methods - for greater immutable services (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DI] Add support for "wither" methods - for greater immutable services

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

Let's say we want to define an immutable service while still using traits for composing its optional features. A nice way to do so without hitting [the downsides of setters](https://symfony.com/doc/current/service_container/injection_types.html#setter-injection) is to use withers. Here would be an example:

```php
 class MyService
{
    use LoggerAwareTrait;
}

trait LoggerAwareTrait
{
    private $logger;

    /**
     * @required
     * @return static
     */
    public function withLogger(LoggerInterface $logger)
    {
        $new = clone $this;
        $new->logger = $logger;

        return $new;
    }
}

$service = new MyService();
$service = $service->withLogger($logger);
```

As you can see, this nicely solves the setter issues.

BUT how do you make the service container create such a service? Right now, you need to resort to complex gymnastic using the "factory" setting - manageable for only one wither, but definitely not when more are involved and not compatible with autowiring.

So here we are: this PR allows configuring such services seamlessly.
Using explicit configuration, it adds a 3rd parameter to method calls configuration: after the method name and its parameters, you can pass `true` and done, you just declared a wither:
```yaml
services:
    MyService:
        calls:
            - [withLogger, ['@logger'], true]
```

In XML, you could use the new `returns-clone` attribute on the `<call>` tag.

And when using autowiring, the code looks for the `@return static` annotation and turns the flag on if found.

There is only one limitation: unlike services with regular setters, services with withers cannot be part of circular loops that involve calls to wither methods (unless they're declared lazy of course).

Commits
-------

f455d1bd97 [DI] Add support for "wither" methods - for greater immutable services
2019-04-03 12:09:58 +02:00
Robin Chalas
2e4020c430 [HttpKernel] Fix DebugHandlersListener constructor docblock 2019-04-03 12:07:21 +02:00
Nicolas Grekas
3e7a47c0bf [FrameworkBundle] fix HttpClient integration 2019-04-03 12:06:15 +02:00
nicoweb
e9fca21d6b [RouterDebugCommand] add link to Controllers 2019-04-03 11:55:14 +02:00
Nicolas Grekas
2b9b8e5707 [HttpClient] Add ScopingHttpClient::forBaseUri() + tweak MockHttpClient 2019-04-03 11:54:40 +02:00
Nicolas Grekas
bce6124f8f feature #30674 [FrameworkBundle] change the way http clients are configured by leveraging ScopingHttpClient (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] change the way http clients are configured by leveraging ScopingHttpClient

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

This PR allows configuring scoped HTTP clients ("scoped_clients" replaces the previous "clients" options):

```yaml
framework:
  http_client:
    max_host_connections: 4
    default_options:
      # ...
    scoped_clients:
      github_client:
        base_uri: https://api.github.com
        headers:
          Authorization: token abc123
          # ...
```

The base URI is turned into a scoping regular expression so that the token will be sent only when the `github_client` service is requesting the corresponding URLs.
When the base URI is too restrictive, the `scope` option can be used explicitly to define the regexp that URLs must match before any other options are applied.

~All defined scopes are passed to a new `scoping_http_client` service, that can be used to hit endpoints with authentication pre-configured for several hosts. Its named autowiring alias is `HttpClientInterface $scopingClient` (this cannot be done with `http_client` as we want safe defaults, e.g. credentials should not be used implicitly when writing webhooks/crawlers.)~

Commits
-------

f1a26b9aea [FrameworkBundle] change the way http clients are configured by leveraging ScopingHttpClient
2019-04-03 11:36:15 +02:00
Nicolas Grekas
847a9bb86d [Cache] add logs on early-recomputation and locking 2019-04-03 11:22:57 +02:00
Nicolas Grekas
f455d1bd97 [DI] Add support for "wither" methods - for greater immutable services 2019-04-03 11:14:18 +02:00
Nicolas Grekas
f1a26b9aea [FrameworkBundle] change the way http clients are configured by leveraging ScopingHttpClient 2019-04-03 10:47:24 +02:00
Valentin Udaltsov
2ae30a7e3d Rename WebTestAssertions -> WebTestAssertionsTrait 2019-04-03 11:22:11 +03:00
Wouter J
ce38fe3e58 Skip Glob brace test when GLOB_BRACE is unavailable 2019-04-02 21:54:57 +02:00
Fabien Potencier
a362b8b838 bumped Symfony version to 4.2.6 2019-04-02 21:06:21 +02:00
Fabien Potencier
da9ad29165 updated VERSION for 4.2.5 2019-04-02 21:03:51 +02:00
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
3dc0a03d8b updated VERSION for 3.4.24 2019-04-02 15:47:51 +02:00
Nicolas Grekas
755f41192f minor #30831 [HttpClient][Contracts] rename "raw_headers" to "response_headers" (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient][Contracts] rename "raw_headers" to "response_headers"

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

A preliminary step before adding the `request_headers` info on responses to ease debugging.

Commits
-------

0b21268bf5 [HttpClient][Contracts] rename "raw_headers" to "response_headers"
2019-04-02 13:11:42 +02:00
Nicolas Grekas
0b21268bf5 [HttpClient][Contracts] rename "raw_headers" to "response_headers" 2019-04-02 12:06:39 +02:00
Roland Franssen
c3477badbc [EventDispatcher] Split events across requests 2019-04-02 12:04:04 +02:00
Roland Franssen
19134c0554
[EventDispatcher] cleanup 2019-04-02 10:51:52 +02:00
Fabien Potencier
aa5b6f95b9 feature #30827 [TwigBridge] Add template file link to debug:twig command (yceruto)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[TwigBridge] Add template file link to debug:twig command

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

![debug_twig_file_link](https://user-images.githubusercontent.com/2028198/55365428-8c85c680-54b2-11e9-9d4e-e4845fc7d411.png)

Commits
-------

05e2e1e088 Add template file link
2019-04-02 09:00:23 +02:00
Fabien Potencier
a63496bcf4 feature #30826 [Form] Add file links for described classes in debug:form command (yceruto)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] Add file links for described classes in debug:form command

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

![debug_form_file_link](https://user-images.githubusercontent.com/2028198/55357775-d1eac980-549b-11e9-8aa8-500aee629753.png)

Commits
-------

dcba01d212 Add file links for described classes
2019-04-02 08:58:30 +02:00
Yonel Ceruto
05e2e1e088 Add template file link 2019-04-01 18:40:03 -04:00
Yonel Ceruto
dcba01d212 Add file links for described classes 2019-04-01 16:27:30 -04:00
Fabien Potencier
17a3ccf4b3 feature #30813 New PHPUnit assertions for the WebTestCase (Pierstoval, fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

New PHPUnit assertions for the WebTestCase

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

While reviewing #29990, and working on some tests, I realized that we could do better by adding PHPUnit constraint classes in various components that are then used in WebTextCase.

**Before**

```php
<?php

namespace App\Tests;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class DefaultControllerTest extends WebTestCase
{
    public function testSomething()
    {
        $client = static::createClient();
        $crawler = $client->request('GET', '/test');

        $this->assertSame(200, $client->getResponse()->getStatusCode());
        $this->assertContains('Hello World', $crawler->filter('h1')->text());
    }
}
```

**After**

```php
<?php

namespace App\Tests;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class DefaultControllerTest extends WebTestCase
{
    public function testSomething()
    {
        $client = static::createClient();
        $client->request('GET', '/test');

        $this->assertResponseIsSuccessful();
        $this->assertSelectorTextContains('h1', 'Hello World');
    }
}
```

Commits
-------

4f91020c8d added PHPUnit assertions in various components
2f8040ee84 Create new PHPUnit assertions for the WebTestCase
2019-04-01 18:54:09 +02:00
Fabien Potencier
4f91020c8d added PHPUnit assertions in various components 2019-04-01 18:52:57 +02:00
Fabien Potencier
fefe62c4d0 updated CHANGELOG 2019-04-01 18:49:08 +02:00
Fabien Potencier
b01fd5f370 feature #27738 [Validator] Add a HaveIBeenPwned password validator (dunglas)
This PR was squashed before being merged into the 4.3-dev branch (closes #27738).

Discussion
----------

[Validator] Add a HaveIBeenPwned password validator

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- 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   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo

This PR adds a new `Pwned` validation constraint to prevent users to choose passwords that have been leaked in public data breaches.
The validator uses the https://haveibeenpwned.com/ API. The implementation is similar to the one used by [Firefox Monitor](https://blog.mozilla.org/futurereleases/2018/06/25/testing-firefox-monitor-a-new-security-tool/). It allows to not expose the password hash using a k-anonymity model. The specific implementation for HaveIBeenPwned has been [described in depth by Cloudflare](https://blog.cloudflare.com/validating-leaked-passwords-with-k-anonymity/).

Usage:

```php
// Rejects the password if is present in any number of times in any data breach
class User
{
    /** @Pwned */
    public $plainPassword;
}

// Rejects the password if is present more than 5 times in data breaches
class User
{
    /** @Pwned(maxCount=5) */
    public $plainPassword;
}

// Customize the error message
class User
{
    /** @Pwned(message='Please select another password, this one has already been hacked.') */
    public $plainPassword;
}
```

Commits
-------

ec1ded898a [Validator] Add a HaveIBeenPwned password validator
2019-04-01 18:48:04 +02:00
Kévin Dunglas
ec1ded898a [Validator] Add a HaveIBeenPwned password validator 2019-04-01 18:47:55 +02:00
Raulnet
61547a291d fix testIgnoredAttributesInContext 2019-04-01 18:12:17 +02:00
Fabien Potencier
1fcc994021 feature #30690 Changing messenger bus id from 'message_bus' to 'messenger.default_bus' (THERAGE Kévin)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Changing messenger bus id from 'message_bus' to 'messenger.default_bus'

Changing messenger bus tag from 'message_bus' to 'messenger.message_bus'

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

All is in the title.
This PR change the tag of the default bus from 'message_bus' to 'messenger.message_bus'.

Commits
-------

3cee1cac12 #30690 - Changing messenger bus id from 'message_bus' to 'messenger.default_bus'
2019-04-01 16:50:37 +02:00
Alex Rock Ancelet
2f8040ee84 Create new PHPUnit assertions for the WebTestCase 2019-04-01 16:44:23 +02:00
Fabien Potencier
b921076df4 bug #30805 [Messenger] bug fixes in Doctrine Transport (vincenttouzet)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] bug fixes in Doctrine Transport

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

Just tested the new Doctrine transport and I've see 3 bugs so far :
- [x] The message is not return by the transport
- [x] The headers column must be of type TEXT and not just STRING
- [ ] When using the PhpSerializer the message is truncated (PR: https://github.com/symfony/symfony/pull/30814)

The body in database looks like this :
```
O:36:"Symfony\Component\Messenger\Envelope":2:{s:44:"
```

The body given by the serializer is the following :
```
O:36:"Symfony\Component\Messenger\Envelope":2:{s:44:"Symfony\Component\Messenger\Envelopestamps";a:3:{s:49:"Symfony\Component\Messenger\Stamp\SerializerStamp";a:1:{i:0;O:49:"Symfony\Component\Messenger\Stamp\SerializerStamp":1:{s:58:"Symfony\Component\Messenger\Stamp\SerializerStampcontext";a:0:{}}}s:46:"Symfony\Component\Messenger\Stamp\BusNameStamp";a:1:{i:0;O:46:"Symfony\Component\Messenger\Stamp\BusNameStamp":1:{s:55:"Symfony\Component\Messenger\Stamp\BusNameStampbusName";s:21:"messenger.bus.default";}}s:43:"Symfony\Component\Messenger\Stamp\SentStamp";a:1:{i:0;O:43:"Symfony\Component\Messenger\Stamp\SentStamp":2:{s:56:"Symfony\Component\Messenger\Stamp\SentStampsenderClass";s:64:"Symfony\Component\Messenger\Transport\Doctrine\DoctrineTransport";s:56:"Symfony\Component\Messenger\Stamp\SentStampsenderAlias";s:16:"environment.stop";}}}s:45:"Symfony\Component\Messenger\Envelopemessage";O:34:"App\Message\EnvironmentStopMessage":1:{s:51:"App\Message\AbstractEnvironmentMessageenvironment";O:22:"App\Entity\Environment":5:{s:26:"App\Entity\Environmentid";s:36:"3bade252-b7a9-4188-82bd-3e68129e0da7";s:37:"App\Entity\EnvironmentrepositoryUrl";s:6:"string";s:30:"App\Entity\Environmentbranch";s:6:"string";s:33:"App\Entity\EnvironmenthostNames";a:1:{i:0;N;}s:27:"App\Entity\Environmentenv";a:2:{s:7:"APP_ENV";s:4:"prod";s:7:"APP_VAR";s:13:"example value";}}}}
```

Commits
-------

27466498d0 [Messenger] Fix get in Doctrine Transport
2019-04-01 16:43:38 +02:00
Fabien Potencier
1a5ab6b750 bug #30814 [Messenger] base64_encoding inside PhpSerializer to avoid null characters (weaverryan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] base64_encoding inside PhpSerializer to avoid null characters

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

Hi!

As pointed out in #30805, the `PhpSerializer` creates strings with null bytes. This apparently causes problems on at least some database systems (I didn't notice, but @vincenttouzet did). I also read that, for example, SQS doesn't like null characters. And, in general, because we're sending this data over a transport, `base64_encoding` data is pretty standard.

Does anyone see any downsides?

Cheers!

Commits
-------

fe7ad812c7 base64_encoding inside PhpSerializer to avoid null characters
2019-04-01 16:41:45 +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
643e9f6b9d minor #30815 [Process] Added more detail to the exception when the CWD is invalid (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Process] Added more detail to the exception when the CWD is invalid

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

---

When using panther with "special" directory structure, the message is
not really usefull. Let's add the CWD to the exception

Commits
-------

d27858f77b [Process] Added more detail to the exception when the CWD is invalid
2019-04-01 16:24:06 +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
Nicolas Grekas
164b45b79c [Inflector] remove "internal" marker from the component 2019-04-01 15:53:46 +02:00
Grégoire Pineau
d27858f77b [Process] Added more detail to the exception when the CWD is invalid 2019-04-01 15:29:45 +02:00
Ryan Weaver
fe7ad812c7 base64_encoding inside PhpSerializer to avoid null characters 2019-04-01 08:36:54 -04:00
THERAGE Kévin
3cee1cac12 #30690 - Changing messenger bus id from 'message_bus' to 'messenger.default_bus' 2019-04-01 14:33:42 +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
Vladimir Reznichenko
cc4529db51 SCA: minor code tweaks 2019-04-01 09:08:40 +02:00
Robin Chalas
9bcea2e9f4 fix test name 2019-03-31 23:15:36 +02:00
Fabien Potencier
5d0fa550df bug #30806 [EventDispatcher] Fix FC layer (bis) (chalasr)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[EventDispatcher] Fix FC layer (bis)

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

Commits
-------

2e02986b26 [EventDispatcher] Fix FC layer (really)
2019-03-31 22:54:21 +02:00
Robin Chalas
2e02986b26 [EventDispatcher] Fix FC layer (really) 2019-03-31 22:38:00 +02:00
Fabien Potencier
96dee1ee20 [Messenger] fixed missing use statement 2019-03-31 22:37:12 +02:00
Fabien Potencier
1044dfb93d [Messenger] simplified code 2019-03-31 22:18:13 +02:00
Vincent Touzet
27466498d0 [Messenger] Fix get in Doctrine Transport 2019-03-31 20:44:41 +02:00
Fabien Potencier
9669e13554 [Messenger] made a const private 2019-03-31 19:35:08 +02:00
Fabien Potencier
dafc357fb9 minor #30803 [Messenger] Remove unused option in the Doctrine transport (vincenttouzet)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Remove unused option in the Doctrine transport

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

This PR remove the unused option `loop_sleep` in the Messenger Doctrine transport

Commits
-------

4811400372 [Messenger] Remove unused option in the Doctrine transport
2019-03-31 19:33:19 +02:00
Fabien Potencier
c54a6a2e1a minor #30802 [Messenger] Add psr/cache on Messenger's dependencies (sroze)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Add `psr/cache` on Messenger's dependencies

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

Commits
-------

0b5004f59f Add `psr/cache` on Messenger's dependencies
2019-03-31 19:32:16 +02:00
Fabien Potencier
563900ffaa fixed CS 2019-03-31 19:31:00 +02:00
Fabien Potencier
dad5b01b9c feature #26890 [Inflector] Support pluralization in the inflector (mbabker)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Inflector] Support pluralization in the inflector

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | not yet
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | Not Yet

At present the inflector only supports singularizing plural words, this PR adds the capability to pluralize singular words.

Commits
-------

06920a79c4 Support pluralization in the inflector
2019-03-31 19:29:55 +02:00
Samuel ROZE
0b5004f59f Add psr/cache on Messenger's dependencies 2019-03-31 18:23:22 +01:00
Fabien Potencier
592e72fc9c feature #28637 [Validator] add number constraints (jschaedl)
This PR was squashed before being merged into the 4.3-dev branch (closes #28637).

Discussion
----------

[Validator] add number constraints

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

I added the following constraints:
* `Positive`
* `PositiveOrZero`
* `Negative`
* `NegativeOrZero`

Commits
-------

01870398eb [Validator] add number constraints
2019-03-31 19:19:07 +02:00
Jan Schädlich
01870398eb [Validator] add number constraints 2019-03-31 19:18:59 +02:00
Nicolas Grekas
6070151495 minor #30800 [Messenger] fix review (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] fix review

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

Fixes my review left in #30754
/cc @weaverryan FYI

Commits
-------

a3de9020c8 [Messenger] fix review
2019-03-31 19:13:48 +02:00
Vincent Touzet
4811400372 [Messenger] Remove unused option in the Doctrine transport 2019-03-31 19:12:50 +02:00
Nicolas Grekas
a3de9020c8 [Messenger] fix review 2019-03-31 19:00:04 +02:00
Samuel ROZE
75e3355da5 Fix the Doctrine transport to use the new interface 2019-03-31 17:52:51 +01: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
343d28e3d1 feature #30754 [Messenger] New messenger:stop-workers Command (weaverryan)
This PR was squashed before being merged into the 4.3-dev branch (closes #30754).

Discussion
----------

[Messenger] New messenger:stop-workers Command

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | Kinda of #29451
| License       | MIT
| Doc PR        | symfony/symfony-docs#11236

o/ me again.

This requires and is built on top of #30708

When you deploy, all workers need to be stopped and restarted. That's not currently possible, unless you manually track the pids and send a SIGTERM signal. We can make that much easier :).

Now run:

```
bin/console messenger:stop-workers
```

And it will signal to all workers (even if they're distributed on other servers) that they should stop, once they finish processing their current message. This is done via a key in `cache.app`.

Cheers!

Commits
-------

58971627f5 [Messenger] New messenger:stop-workers Command
2019-03-31 18:41:56 +02:00
Ryan Weaver
58971627f5 [Messenger] New messenger:stop-workers Command 2019-03-31 18:41:31 +02:00
Fabien Potencier
8c2ade9173 bug #30794 [EventDispatcher] Fix BC/FC layer (chalasr)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[EventDispatcher] Fix BC/FC layer

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

Fixes
> TypeError: Argument 3 passed to Symfony\Component\EventDispatcher\EventDispatcher::doDispatch() must be an instance of Symfony\Component\EventDispatcher\Event

Spotted in https://github.com/lexik/LexikJWTAuthenticationBundle/pull/637

Commits
-------

caa0aded89 [EventDispatcher] Fix BC layer
2019-03-31 18:36:43 +02:00
Samuel ROZE
fd4146c768 Add back missing uses 2019-03-31 17:35:18 +01:00
Fabien Potencier
825335374a bug #30756 Changing to MessageDecodingFailedException so that invalid messages are rejected (weaverryan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Changing to MessageDecodingFailedException so that invalid messages are rejected

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  |  no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #30649
| License       | MIT
| Doc PR        | not needed for bug fix

Bug fix if a message body is completely blank. I'm fixing this on master only, because in 4.2 and earlier, there is actually no system in place to fail serialization and cause the messages to be rejected. In 4.3, we just need to throw this exception.

Cheers!

Commits
-------

4be827d3ca Changing to MessageDecodingFailedException so that invalid messages are rejected
2019-03-31 18:34:24 +02:00
Fabien Potencier
177a0d9320 bug #30798 [Messenger] Updating SyncTransport for recent changes + tests (weaverryan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Updating SyncTransport for recent changes + tests

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

When making the `SyncTransport`, I neglected having at least one test in each of these classes, which allowed the test suite to pass, even after some interface changes made these classes fail. Fixed all of that :)

Commits
-------

2df023be46 Updating SyncTransport for recent changes + tests
2019-03-31 18:31:45 +02:00
Fabien Potencier
3abca64c5d feature #30707 [Messenger][DX] Allow stamps to be passed directly to MessageBusInterface::dispatch() (weaverryan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger][DX] Allow stamps to be passed directly to MessageBusInterface::dispatch()

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

Me again o/!

This proposal is *purely* for DX. With `DelayStamp`, the proposal of QueueNameStamp and future things like `AmqpRoutingKeyStamp`, stamps are becoming more common for end users to use. This changes how it looks to use them:

```php
// before
$bus->dispatch(new Envelope(new SendSmsNotification('Hi!'), new DelayStamp(10), new QueueNameStamp('low')));

// after
$bus->dispatch(new SendSmsNotification('Hi!'), [new DelayStamp(10), new QueueNameStamp('low')]);
```

It's definitely a BC break, which is allowed because the component is experimental, though it should be minimized. This BC break shouldn't be felt by most end users, as creating your own bus is an advanced use-case. Even if you decorated it, you'll get an obvious error.

Commits
-------

e861de7e61 Allow stamps to be passed directly to MessageBusInterface::dispatch()
2019-03-31 18:29:02 +02:00
Samuel ROZE
e897e6cc4e Add missing word in CHANGELOG 2019-03-31 17:26:00 +01:00
Samuel ROZE
d9e2732a7d feature #29007 [Messenger] Add a Doctrine transport (vincenttouzet)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Add a Doctrine transport

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | symfony/symfony-docs#10616
| DoctrineBundle PR | doctrine/DoctrineBundle#868

As discussed with @sroze at PHPForum in Paris I've worked on adding a Doctrine transport to the Messenger component.

Actually `AMQP` is the only supported transport and it could be a good thing to support multiple transports. Having a Doctrine transport could help users to start using the component IMHO (Almost all projects use a database).

# How it works

The code is splitted betwwen this PR and the one on the DoctrineBundle : doctrine/DoctrineBundle#868

## Configuration

To configure a Doctrine transport the dsn MUST have the format `doctrine://<entity_manager_name>` where `<entity_manager_name>` is the name of the entity manager (usually `default`)
```yml
        # config/packages/messenger.yaml
        framework:
            messenger:
                transports:
                    my_transport: "doctrine://default?queue=important"
```

## Table schema

Dispatched messages are stored into a database table with the following schema:

| Column       | Type     | Options                  | Description                                                       |
|--------------|----------|--------------------------|-------------------------------------------------------------------|
| id           | bigint   | AUTO_INCREMENT, NOT NULL | Primary key                                                       |
| body         | text     | NOT NULL                 | Body of the message                                               |
| headers      | text     | NOT NULL                 | Headers of the message                                            |
| queue      | varchar(32)     | NOT NULL                 | Headers of the message                                            |
| created_at   | datetime | NOT NULL                 | When the message was inserted onto the table. (automatically set) |
| available_at       | datetime   | NOT NULL                 | When the message is available to be handled                      |
| delivered_at | datetime | NULL                     | When the message was delivered to a worker                        |

## Message dispatching

When dispatching a message a new row is inserted into the table. See `Symfony\Component\Messenger\Transport\Doctrine::publish`

## Message consuming

The message is retrieved by the `Symfony\Component\Messenger\Transport\Doctrine\DoctrineReceiver`. It calls the `Symfony\Component\Messenger\Transport\Doctrine::get` method to get the next message to handle.

### Getting the next message

* Start a transaction
* Lock the table to get the first message to handle (The lock is done with the `SELECT ... FOR UPDATE` query)
* Update the message in database to update the delivered_at columns
* Commit the transaction

### Handling the message

The retrieved message is then passed to the handler. If the message is correctly handled the receiver call the `Symfony\Component\Messenger\Transport\Doctrine::ack` which delete the message from the table.

If an error occured the receiver call the `Symfony\Component\Messenger\Transport\Doctrine::nack` method which update the message to set the delivered_at column to `null`.

## Message requeueing

It may happen that a message is stuck in `delivered` state but the handler does not really handle the message (Database connection error, server crash, ...). To requeue messages the `DoctrineReceiver` call the `Symfony\Component\Messenger\Transport\Doctrine::requeueMessages`. This method update all the message with a  `delivered_at` not null since more than the "redeliver timeout" (default to 3600 seconds)

# TODO

- [x] Add tests
- [x] Create DOC PR
- [x] PR on doctrine-bundle for transport factory
- [x] Add a `available_at` column
- [x] Add a `queue` column
- [x] Implement the retry functionnality : See #30557
- [x] Rebase after #29476

Commits
-------

88d008c828 [Messenger] Add a Doctrine transport
2019-03-31 17:25:18 +01:00
Ryan Weaver
e861de7e61 Allow stamps to be passed directly to MessageBusInterface::dispatch()
And changing signature of Envelope::__construct() to accept an array of envelopes
2019-03-31 12:05:21 -04:00
Ryan Weaver
4be827d3ca Changing to MessageDecodingFailedException so that invalid messages are rejected 2019-03-31 11:54:28 -04:00
Ryan Weaver
2df023be46 Updating SyncTransport for recent changes + tests 2019-03-31 11:45:52 -04:00
Ryan Weaver
ef6f23e8b9 Making the serializer configurable by transport 2019-03-31 16:54:31 +02:00
Nicholas Ruunu
49ab2cd9d9 Make MessengerPass less strict when auto-register handlers 2019-03-31 16:44:42 +02:00
Vincent Touzet
88d008c828 [Messenger] Add a Doctrine transport 2019-03-31 16:05:11 +02:00
Fabien Potencier
07276642de fixed typo 2019-03-31 15:49:16 +02:00
Fabien Potencier
dd47fda441 fixed bad merge 2019-03-31 14:18:54 +02:00
Fabien Potencier
460da96f45 feature #30569 [FrameworkBundle][HttpKernel] Provide intuitive error message when a controller fails because it's not registered as a service (moynzzz)
This PR was squashed before being merged into the 4.3-dev branch (closes #30569).

Discussion
----------

[FrameworkBundle][HttpKernel] Provide intuitive error message when a controller fails because it's not registered as a service

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- 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 | #27787, symfony/symfony-docs#7988 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | none <!-- required for new features -->

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

Create a very late controller argument value resolver to throw an intuitive error message when controller fails because it is not registered as a service.

Commits
-------

fbfc623b72 [FrameworkBundle][HttpKernel] Provide intuitive error message when a controller fails because it's not registered as a service
2019-03-31 14:12:04 +02:00
Simeon Kolev
fbfc623b72 [FrameworkBundle][HttpKernel] Provide intuitive error message when a controller fails because it's not registered as a service 2019-03-31 14:11:56 +02:00
Robin Chalas
caa0aded89 [EventDispatcher] Fix BC layer 2019-03-31 14:11:52 +02:00
Fabien Potencier
b14d5cd358 feature #26484 [Validator] String normalization options for string-based validators (renan-taranto)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Validator] String normalization options for string-based validators

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

Todo:
- [x] Document the new options
- [x] Update Doc PR

Add trimming options to the string constraints.

Commits
-------

708d759b8d [Validator] String normalization options for string-based validators
2019-03-31 13:55:59 +02:00
Fabien Potencier
6bc2ae4018 feature #30320 [Form][TwigBridge] Add row_attr to form theme (alexander-schranz)
This PR was squashed before being merged into the 4.3-dev branch (closes #30320).

Discussion
----------

[Form][TwigBridge] Add row_attr to form theme

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | waiting for confirmation to implement
| Fixed tickets |
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Currently you need to copy the whole form_row block if you just want to add a class to the form_row div. Instead we could introduce a `row_attr` which can then simple be set the following in the theme e.g.:

```twig
{% block form_row %}
    {% set row_attr = { class: 'form__field' } %}
    {{ parent() }}
{% endblock %}
```

or in php:

```
$builder->add('test', TextType::class, ['row_attr' => ['class' => 'form__field']]);
```

Commits
-------

7ab1b00e02 [Form][TwigBridge] Add row_attr to form theme
2019-03-31 13:48:32 +02:00
Alexander Schranz
7ab1b00e02 [Form][TwigBridge] Add row_attr to form theme 2019-03-31 13:48:18 +02:00
Fabien Potencier
ce24e15775 feature #30371 [OptionsResolver] Add a new method addNormalizer and normalization hierarchy (yceruto)
This PR was squashed before being merged into the 4.3-dev branch (closes #30371).

Discussion
----------

[OptionsResolver] Add a new method addNormalizer and normalization hierarchy

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

### 3rd-party package

<details><summary>Given: (CLICK ME)</summary>
<p>

Generic type:
```php
class FooType extends AbstractType
{
    private $registry;

    public function __construct(ManagerRegistry $registry)
    {
        $this->registry = $registry;
    }

    // buildForm ...

    public function configureOptions(OptionsResolver $resolver): void
    {
        $resolver->setRequired('class');
        $resolver->setDefaults([
            'em' => null,
            'query' => null,
        ]);
        $resolver->setAllowedTypes('em', ['null', 'string']);
        $resolver->setAllowedTypes('query', ['null', 'callable']);

        $resolver->setNormalizer('em', function (Options $options, $em) {
            if (null !== $em) {
                return $this->registry->getManager($em);
            }

            return $this->registry->getManagerForClass($options['class']);
        });

        $resolver->setNormalizer('query', function (Options $options, $query) {
            if (\is_callable($query)) {
                $query = $query($options['em']->getRepository($options['class']));

                if (!$query instanceof Query) {
                    throw new UnexpectedTypeException($query, 'Doctrine\ORM\Query');
                }
            }

            return $query;
        });
    }
}
```
</p>
</details>

### App context

<details><summary>Before (CLICK ME)</summary>
<p>

Normalizing the new allowed value will require to override the parent's normalizer:
```php
class BarType extends AbstractType
{
    private $registry;

    public function __construct(ManagerRegistry $registry)
    {
        $this->registry = $registry;
    }

    // buildForm ...

    public function configureOptions(OptionsResolver $resolver): void
    {
        $resolver->addAllowedTypes('em', 'Doctrine\ORM\EntityManagerInterface');

        $resolver->setNormalizer('em', function (Options $options, $em) {
            if ($em instanceof EntityManagerInterface) {
                return $em;
            }

            if (null !== $em) {
                return $this->registry->getManager($em);
            }

            return $this->registry->getManagerForClass($options['class']);
        });

        $resolver->addAllowedTypes('query', 'string');

        $resolver->setNormalizer('query', function (Options $options, $query) {
            if (\is_callable($query)) {
                $query = $query($options['em']->getRepository($options['class']));

                if (!$query instanceof Query) {
                    throw new UnexpectedTypeException($query, 'Doctrine\ORM\Query');
                }
            }

            if (\is_string($query)) {
                $query = $options['em']->createQuery($query);
            }

            return $query;
        });
    }

    public function getParent()
    {
        return FooType::class;
    }
}
```
</p>
</details>

<details><summary>After (CLICK ME)</summary>
<p>

The new normalizer is added to the stack and it'll receive the previously normalized value or if `forcePrepend = true` the validated value:
```php
class BarType extends AbstractType
{
    // buildForm ...

    public function configureOptions(OptionsResolver $resolver): void
    {
        $resolver->addAllowedTypes('em', 'Doctrine\ORM\EntityManagerInterface');

        $resolver->addNormalizer('em', function (Options $options, $em) {
            if ($em instanceof EntityManagerInterface) {
                return $em;
            }

            return $em;
        }, true); // $forcePrepend = true (3rd argument)

        $resolver->addAllowedTypes('query', 'string');

        $resolver->addNormalizer('query', function (Options $options, $query) {
            if (\is_string($query)) {
                $query = $options['em']->createQuery($query);
            }

            return $query;
        });
    }

    public function getParent()
    {
        return FooType::class;
    }
}
```
</p>
</details>

Commits
-------

cf41254223 [OptionsResolver] Add a new method addNormalizer and normalization hierarchy
2019-03-31 13:47:22 +02:00
Yonel Ceruto
cf41254223 [OptionsResolver] Add a new method addNormalizer and normalization hierarchy 2019-03-31 13:47:13 +02:00
Fabien Potencier
7554cf6f1d feature #27735 [Validator][DoctrineBridge][FWBundle] Automatic data validation (dunglas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Validator][DoctrineBridge][FWBundle] Automatic data validation

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes<!-- 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   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/11132

This feature automatically adds some validation constraints by inferring existing metadata. To do so, it uses the PropertyInfo component and Doctrine metadata, but it has been designed to be easily extendable.

Example:

```php
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 */
class Dummy
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @ORM\Column(type="integer")
     */
    public $id;

    /**
     * @ORM\Column(nullable=true)
     */
    public $columnNullable;

    /**
     * @ORM\Column(length=20)
     */
    public $columnLength;

    /**
     * @ORM\Column(unique=true)
     */
    public $columnUnique;
}

$manager = $this->managerRegistry->getManager();
$manager->getRepository(Dummy::class);

$firstOne = new Dummy();
$firstOne->columnUnique = 'unique';
$firstOne->columnLength = '0';

$manager->persist($firstOne);
$manager->flush();

$dummy = new Dummy();
$dummy->columnNullable = 1; // type mistmatch
$dummy->columnLength = '012345678901234567890'; // too long
$dummy->columnUnique = 'unique'; // not unique

$res = $this->validator->validate($dummy);
dump((string) $res);

/*
Object(App\Entity\Dummy).columnUnique:\n
    This value is already used. (code 23bd9dbf-6b9b-41cd-a99e-4844bcf3077f)\n
Object(App\Entity\Dummy).columnLength:\n
    This value is too long. It should have 20 characters or less. (code d94b19cc-114f-4f44-9cc4-4138e80a87b9)\n
Object(App\Entity\Dummy).id:\n
    This value should not be null. (code ad32d13f-c3d4-423b-909a-857b961eb720)\n
Object(App\Entity\Dummy).columnNullable:\n
    This value should be of type string. (code ba785a8c-82cb-4283-967c-3cf342181b40)\n
*/
```

It also works for DTOs:

```php

class MyDto
{
    /** @var string */
    public $name;
}

$dto = new MyDto();
$dto->name = 1; // type error

dump($validator->validate($dto));

/*
Object(MyDto).name:\n
    This value should be of type string. (code ba785a8c-82cb-4283-967c-3cf342181b40)\n
*/
```

Supported constraints currently are:

* `@NotNull` (using PropertyInfo type extractor, so supports Doctrine metadata, getters/setters and PHPDoc)
* `@Type` (using PropertyInfo type extractor, so supports Doctrine metadata, getters/setters and PHPDoc)
* `@UniqueEntity` (using Doctrine's `unique` metadata)
* `@Length` (using Doctrine's `length` metadata)

Many users don't understand that the Doctrine mapping doesn't validate anything (it's just a hint for the schema generator). It leads to usability and security issues (that are not entirely fixed by this PR!!).
Even the ones who add constraints often omit important ones like `@Length`, or `@Type` (important when building web APIs).
This PR aims to improve things a bit, and ease the development process in RAD and when prototyping. It provides an upgrade path to use proper validation constraints.

I plan to make it opt-in, disabled by default, but enabled in the default Flex recipe. (= off by default when using components, on by default when using the full stack framework)

TODO:

* [x] Add configuration flags
* [x] Move the Doctrine-related DI logic from the extension to DoctrineBundle: doctrine/DoctrineBundle#831
* [x] Commit the tests

Commits
-------

2d64e703c2 [Validator][DoctrineBridge][FWBundle] Automatic data validation
2019-03-31 13:41:16 +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
cbbfe84154 minor #30793 [Messenger] Remove the mention of handler in the ReceiverInterface::get phpdoc. (sroze)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Remove the mention of handler in the `ReceiverInterface::get` phpdoc.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/30708#pullrequestreview-220830730
| License       | MIT
| Doc PR        | ø

As spotted by @Tobion, we don't have an handler as an argument anymore.

Commits
-------

9c63112d7c Remove the mention of handler in the phpdoc.
2019-03-31 12:26:30 +02:00
Fabien Potencier
3df44f5679 feature #30758 [PropertyAccess] Allow Can Accessor in Property Access (ragboyjr)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[PropertyAccess] Allow Can Accessor in Property Access

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

- Added ability to support `can` methods in the property access
  in order to be compatible with PropertyInfo component
  which allows for `can` accessors

Commits
-------

a4c95745bb [PropertyAccess] Allow Can Accessor in Property Access
2019-03-31 12:12:59 +02:00
Samuel ROZE
9c63112d7c Remove the mention of handler in the phpdoc. 2019-03-31 11:12:50 +01:00
Fabien Potencier
6d51eaf5fc fixed CS 2019-03-31 12:10:11 +02:00
Fabien Potencier
e92c120f27 feature #30116 [Filesystem] Fix mirroring a directory into itself or in his child with realpath checks (Fleuv, XuruDragon)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Filesystem] Fix mirroring a directory into itself or in his child with realpath checks

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

This this the continuity of #29857 by @Fleuv

Fix a bug while trying to mirror a directory into itself or in a child
Adding handle real path checks when mirroring.

Commits
-------

8011f494d4 Handling relative/absolute path
59437a4af9 Skipping iterations in the mirror() method where the iterated file's path name is equal to the target path
2019-03-31 11:15:35 +02:00
Fabien Potencier
67083b6f93 feature #28879 [Debug] Mimic __toString php behavior in FlattenException (Deltachaos)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Debug] Mimic __toString php behavior in FlattenException

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

The `Symfony\Component\Debug\Exception\FlattenException` object is returned by `Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector::getException` method, but the docblock of this method indicates that it should return `\Exception` object.

As the `FlattenException` class should behave as much as possible like a php `\Exception` object, it should implement the same methods as `\Exception`.

This PR is adding `__toString` and `getTraceAsString` methods. Those methods are (in my opinion) the most useful methods of a `\Exception` object. A potential use case (where i am stumbled across this inconsistency) is to get the last exception of a request in a `WebTestCase` using the profiler and printing the trace.

Commits
-------

514a1b506c [Debug] Mimic __toString php behavior in FlattenException
2019-03-31 11:12:58 +02:00
Fabien Potencier
47242e36e0 fixed CS 2019-03-31 10:40:49 +02:00
Fabien Potencier
2bd27ffd1b feature #29495 [Ldap] Implement pagination (kevans91)
This PR was squashed before being merged into the 4.3-dev branch (closes #29495).

Discussion
----------

[Ldap] Implement pagination

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yno
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | N/A (cannot test at the moment)
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Implement pagination support in the ExtLdap adapter. In a more abstract sense, other adapters should use a query's pageSize option to determine if pagination is being needed. Pagination is required in some environments that frequently query for more results than the remote server is willing to allow.

BC break was avoided by having Query->getResource() return the first result, if available.

A small hack is included to work around php-ldap failing to reset pagination properly; the LDAP_OPT_SERVER_CONTROLS are sent with every request, whether pagination has been 'reset' by sending a 0-page request or not. This appears to be a php-ldap bug that will need to be addressed there, but we can work-around it for now by doing both: setting the 0-page option *and* unsetting the OID directly. This was resulting in odd results, like queries returning 0 results or returning < server_page_size results for a query that should have returned >= server_page_size.

Commits
-------

b96347485c [Ldap] Implement pagination
2019-03-31 10:40:08 +02:00
Kyle Evans
b96347485c [Ldap] Implement pagination 2019-03-31 10:39:25 +02:00
Fabien Potencier
5e079536c9 [LDAP] fixed typos and CS 2019-03-31 10:31:43 +02:00
Fabien Potencier
22234e331e feature #29448 [Ldap] Entry move support (kevans91)
This PR was squashed before being merged into the 4.3-dev branch (closes #29448).

Discussion
----------

[Ldap] Entry move support

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no (see [1])
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A (see [2])

Add Move support to the ldap EntryManagerInterface and the ExtLdap adapter. This is used to re-parent an entry to another part of the directory. The interface to do so need not be complicated, requiring only the entry to be moved and the parent DN to be moved to.

Underlying implementations may require a 'newrdn' attribute -- this is generally the RDN w.r.t. the immediate parent of the entry, which is easily parsed.

I've attempted to implement it as the rename functionality was originally implemented: adding an interface to be deprecated effective immediately, presumably to allow it to be backported without breaking existing interfaces, and then implementing this interface in the ExtLdap adapter.

[1] I do not have the capacity to run the ldap tests for this locally due to current $work situation; I have no reason to believe this test will fail as written, though. This functionality has been used as currently implemented (against Windows ADS) for some time in my production environment, so it has been functionally tested otherwise.

[2] No doc PR has been created for this feature addition, since it's a minor addition. The LDAP documentation should likely be amended to include rename functionality as well as this.

Commits
-------

32743c850f [Ldap] Entry move support
2019-03-31 10:29:16 +02:00
Kyle Evans
32743c850f [Ldap] Entry move support 2019-03-31 10:29:07 +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
Sebastiaan Stok
907adf47e3
[Mailer] Remove unneeded catch in ping()
The stop() method doesn't throw
2019-03-30 16:56:09 +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
c128d50196 bug #30787 [Mailer] Fix SMTP support when a message cannot be sent (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Mailer] Fix SMTP support when a message cannot be sent

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

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

3d25c1c613 [Mailer] fixed SMTP support when a message cannot be sent
2019-03-30 16:52:03 +01:00
Fabien Potencier
3d25c1c613 [Mailer] fixed SMTP support when a message cannot be sent 2019-03-30 14:46:29 +01:00
Fabien Potencier
9cf665f2ea [Mailer] fixed typo 2019-03-30 14:28:10 +01:00
Fabien Potencier
827e61f645 fixed author 2019-03-30 13:09:36 +01:00
Fabien Potencier
845cf9e271 feature #30741 Add the Mailer component (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Add the Mailer component

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| 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        | upcoming

https://speakerdeck.com/fabpot/mailer

Commits
-------

69b9ee794c added the Mailer component
2019-03-30 12:38:45 +01:00
Fabien Potencier
69b9ee794c added the Mailer component 2019-03-30 09:09:06 +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
760bbd595b feature #30780 Fix some exception previous type hints (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Fix some exception previous type hints

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

follow-up for #30729

Commits
-------

f92efeb429 fixed some exception previous type hints
2019-03-30 08:46:07 +01:00
Fabien Potencier
f92efeb429 fixed some exception previous type hints 2019-03-30 08:40:00 +01:00
Fabien Potencier
2041924587 minor #30779 Remove obsolete code (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Remove obsolete code

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

The bug referenced was fixed in 7.0 beta 3 (668ecaa606)

Commits
-------

8d25319783 removed obsolete code
2019-03-30 08:37:12 +01:00
Fabien Potencier
8d25319783 removed obsolete code 2019-03-30 08:32:15 +01:00
Silvio Ginter
15cb4754e7 [HttpKernel] change $previous argument for HttpException to \Throwable 2019-03-30 08:30:07 +01:00
Fabien Potencier
30b96175a6 feature #30744 [Finder] Throw a dedicated exception for non-existing directory (xelan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Finder] Throw a dedicated exception for non-existing directory

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes [1]
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no [2]
| Tests pass?   | yes
| Fixed tickets | #30723
| License       | MIT
| Doc PR        | N/A [3]

Makes `Finder::in()` throw a `DirectoryNotFoundException` instead of an `InvalidArgumentException` if one of the directories is not found.
This behavior is more consistent with the `AccessDeniedException` for files which are unreadable due to insufficient permissions.
To keep backward compatibility, the new exception class inherits from `InvalidArgumentException`.

[1] A valid, but non-existent directory name is IMHO not an invalid argument
[2] However, it may be semantically better to extend from `RuntimeException`,  This would require a deprecation.
[3] Possible exceptions are currently not explained at https://symfony.com/doc/current/components/finder.html

Commits
-------

48d5f94cda Throw a dedicated exception for non-existing directory
2019-03-30 08:28:10 +01:00
Dmitriy Tkachenko
eb0e14c298 [Serializer] Added check of constuctor modifiers to AbstractNormalizer 2019-03-30 08:26:35 +01:00
Fabien Potencier
7cb14f3186 fixed typo 2019-03-30 08:22:54 +01:00
Fabien Potencier
6ffad7bba4 feature #30759 [Messenger] Adding the "sync" transport to call handlers synchronously (weaverryan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Adding the "sync" transport to call handlers synchronously

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | symfony/symfony-docs#11236

This adds a `sync://` transport that just calls the handlers immediately. Why? This allows you to route your messages to some "async" transport. But then, when developing locally or running your tests, you can choose to run them synchronously instead:

```yml
# config/packages/messenger.yaml
framework:
    messenger:
        transports:
            async: '%env(MESSENGER_TRANSPORT_DSN)%'
        routing:
            'App\Message\SmsNotification': async
            'App\Message\OtherMessage': async
```

```
# .env
# by default, handle this sync
MESSENGER_TRANSPORT_DSN=sync://
```

```
# .env.local on production (or set this via real env vars)
# on production, use amqp
MESSENGER_TRANSPORT_DSN=amqp://.......
```

Cheers!

Commits
-------

3da5a438aa Adding the "sync" transport to call handlers synchronously
2019-03-30 08:22:14 +01:00
Fabien Potencier
3edb79f5d3 feature #30772 [Contracts][EventDispatcher] move the Event class to symfony/contracts (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Contracts][EventDispatcher] move the Event class to symfony/contracts

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

Will allow decoupling more components in 5.0

Commits
-------

a4ce08ec30 [Contracts][EventDispatcher] move the Event class to symfony/contracts
2019-03-30 08:19:14 +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
f4176b0cf6 fixed typos 2019-03-30 08:02:29 +01:00
Ryan Weaver
e800bd5bde [Messenger] ReceiverInterface::handle() to get() & Worker with prioritized transports 2019-03-30 08:01:26 +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
Nicolas Grekas
a4ce08ec30 [Contracts][EventDispatcher] move the Event class to symfony/contracts 2019-03-29 19:47:03 +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
2389d7c686 Revert "feature #30651 Allow user to set the project dir (tdutrion)"
This reverts commit aa12dd0bd7, reversing
changes made to 7d01aae41e.
2019-03-29 18:00:10 +01:00
Fabien Potencier
c203379dd5 feature #27648 [Lock] Added MongoDBStore (Joe Bennett)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Lock] Added MongoDBStore

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (requires `ext-mongodb` and `mongodb/mongodb` to test)
| Fixed tickets | #27345
| License       | MIT
| Doc PR        | symfony/symfony-docs#9807

**Testing caveat**
In order to test this, the test environment needs `ext-mongodb` and `mongodb/mongodb`.

I have both written the test and tested `Symfony\Component\Lock\Store\MongoDbStore` and it does pass in an environment with `ext-mongodb` and `mongodb/mongodb`.

**Description**
We should support Semaphore Locks with a MongoDB back end to allow those that already use MongoDB as a distributed storage engine.

Symfony already partially supports MongoDB for session storage: `Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler`

**Example**

```php
$client = new MongoDb\Client();

$store = new Symfony\Component\Lock\Store\MongoDbStore(
    $client
    array(
        'database' => 'my-app',
    )
);
$lockFactory = new Symfony\Component\Lock\Factory($store);
$lock = $lockFactory->createLock('my-resource');
```

This is a squashed pull request of https://github.com/symfony/symfony/pull/27346

Commits
-------

9c04639dc3 #27345 Added Lock/Store/MongoDbStore
2019-03-29 17:15:05 +01:00
Valentin Udaltsov
7bfb8c1a4c [Validator] Fix annotation default for @Count and @Length 2019-03-29 16:49:31 +01:00
Ryan Weaver
9153c48bc4 Changing message handling log levels to higher levels 2019-03-29 09:51:35 -04:00
Joe Bennett
9c04639dc3 #27345 Added Lock/Store/MongoDbStore 2019-03-29 23:39:57 +10:00
SpacePossum
f8a033c0ef
Update composer.json 2019-03-29 09:11:11 +01:00
Ryan Weaver
3da5a438aa Adding the "sync" transport to call handlers synchronously 2019-03-28 14:59:51 -04:00
RJ Garcia
a4c95745bb [PropertyAccess] Allow Can Accessor in Property Access
- Added ability to support `can` methods in the property access
  in order to be compatible with PropertyInfo component
  which allows for can accessors

Signed-off-by: RJ Garcia <rj@bighead.net>
2019-03-28 11:50:55 -07:00
Nicolas Grekas
162d5a8272 feature #30752 [HttpClient] use "nyholm/psr7" by default in Psr18Client (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] use "nyholm/psr7" by default in Psr18Client

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

This makes the factory arguments of `Psr18Client` optional, with a fallback to using `Nyholm\Psr7\Factory\Psr17Factory` when no factories are provided.

Commits
-------

f2222e4bf5 [HttpClient] use "nyholm/psr7" by default in Psr18Client
2019-03-28 17:44:24 +01:00
Nicolas Grekas
f2222e4bf5 [HttpClient] use "nyholm/psr7" by default in Psr18Client 2019-03-28 17:41:24 +01:00
Nicolas Grekas
332a88c8ce [HttpClient] correctly clean state on destruct in CurlResponse 2019-03-28 16:53:35 +01:00
Samuel ROZE
c30f462c2e feature #30671 Add optional parameter prefetching for AMQP connection (fbouchery)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Add optional parameter `prefetching` for AMQP connection

Add prefetching connection parameter to setup channel prefetch count.

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

When setting up AMQP transport connection, it can be interesting to configure prefetching on a channel, which is not currently possible.

Commits
-------

47777eedd6 Add optional parameter `prefetching` in connection configuration, to setup channel prefetch count
2019-03-28 18:47:49 +07:00
Nicolas Grekas
4184cc6bf2 minor #30731 [PropertyInfo] Add missing changelog for private / protected (joelwurtz)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[PropertyInfo] Add missing changelog for private / protected

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

Add missing changelog for #30706

Commits
-------

8c5663d1cf Add missing changelog for private / protected
2019-03-28 12:42:00 +01:00
Andreas Erhard
48d5f94cda
Throw a dedicated exception for non-existing directory
Makes Finder::in() throw a DirectoryNotFoundException instead of an InvalidArgumentException if one of the directories is not found.
This behavior is more consistent with the AccessDeniedException for files which are unreadable due to insufficient permissions.
To keep BC, the new exception class inherits from InvalidArgumentException.
2019-03-28 12:28:31 +01:00
Mateusz Sip
aaf5422cfb [DI][Contracts] add and implement ServiceProviderInterface 2019-03-28 12:22:02 +01:00
fbouchery
47777eedd6 Add optional parameter prefetching in connection configuration, to setup channel prefetch count
Co-Authored-By: f2r <frederic.bouchery+github@gmail.com>
2019-03-28 18:20:31 +07:00