Commit Graph

33013 Commits

Author SHA1 Message Date
Kévin Dunglas
05ecf829fe Autoconfig: don't automatically tag decorators 2019-03-04 09:49:34 +01:00
Nicolas Grekas
05d6475c5e Drop more usages of Serializable 2019-03-04 09:45:35 +01:00
Fabien Potencier
62e7f7dc78 removed suggestion 2019-03-04 09:36:25 +01:00
Fabien Potencier
6f273c8e34 minor #30403 [Routing][ServiceRouterLoader] Remove an outdated comment (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing][ServiceRouterLoader] Remove an outdated comment

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

Since 0043653ea8, this comment is technically false.

Commits
-------

a2b73489dd [Routing][ServiceRouterLoader] Remove an outdated comment
2019-03-04 09:35:44 +01:00
Greg ORIOL
479dff4f8a [PropertyAccess] Fixed PropertyPathBuilder remove that fails to reset internal indexes 2019-03-04 07:36:31 +01:00
Fabien Potencier
ec8033f4a9 feature #30379 [FrameworkBundle][Routing] allow boolean container parameters for routes (dmaicher)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle][Routing] allow boolean container parameters for routes

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

This fixes https://github.com/symfony/symfony/issues/30366 and adds support for boolean container parameters in route conditions, defaults etc.

Commits
-------

21f4e38800 [FrameworkBundle][Routing] allow boolean container parameters for routes
2019-03-04 07:35:11 +01:00
Fabien Potencier
1e94c50699 feature #29661 [Filesystem] Support resources and deprecate using arrays in dumpFile() and appendToFile() (thewilkybarkid)
This PR was squashed before being merged into the 4.3-dev branch (closes #29661).

Discussion
----------

[Filesystem] Support resources and deprecate using arrays in dumpFile() and appendToFile()

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

Running PHPStan on my project picked up that passing a resource to `Filesystem::dumpFile()` didn't match the documented type.

I found this has been discussed in #20980 and #28019, without a clear result. But, my reading is that only strings should be supported. While I think that not supporting streams makes this a lot less useful (and I'm going to switch away from it), this does need to be resolved. So, I've deprecated using arrays and resources.

Commits
-------

0eaf9d2474 [Filesystem] Support resources and deprecate using arrays in dumpFile() and appendToFile()
2019-03-03 22:36:26 +01:00
Chris Wilkinson
0eaf9d2474 [Filesystem] Support resources and deprecate using arrays in dumpFile() and appendToFile() 2019-03-03 22:36:18 +01:00
Fabien Potencier
7535383163 bumped Symfony version to 4.2.5 2019-03-03 20:47:05 +01:00
Fabien Potencier
ea78c21cb6 updated VERSION for 4.2.4 2019-03-03 20:38:09 +01:00
Fabien Potencier
4203bef6f3 bumped Symfony version to 3.4.24 2019-03-03 20:25:29 +01:00
Fabien Potencier
16881cb72d updated VERSION for 3.4.23 2019-03-03 19:52:34 +01:00
Fabien Potencier
e1d8a5aeae Merge branch '4.2'
* 4.2:
  Removed non-existing parameters for LogoutUrlGenerator calls
  [WebProfilerBundle] toolbar: invisible route name in Firefox
  Drop spurious execution bit
  [HttpKernel] Correctly merging cache directives in HttpCache/ResponseCacheStrategy
  [Validator] Add the missing translations for the Latvian ("lv") locale
  Fixed the DebugClassLoader compatibility with eval()'d code on Darwin
  [Validator] Update Serbian translation file
2019-03-03 19:12:18 +01:00
Fabien Potencier
c52dcc40a8 Merge branch '3.4' into 4.2
* 3.4:
  Removed non-existing parameters for LogoutUrlGenerator calls
  [HttpKernel] Correctly merging cache directives in HttpCache/ResponseCacheStrategy
  [Validator] Add the missing translations for the Latvian ("lv") locale
  Fixed the DebugClassLoader compatibility with eval()'d code on Darwin
  [Validator] Update Serbian translation file
2019-03-03 19:11:24 +01:00
Fabien Potencier
e1d44375ca feature #30358 [Form] be able to specify the input format for times (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] be able to specify the input format for times

| 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 expands the work started in #29887 to also allow to configure the input format for string inputs in the `TimeType`.

Commits
-------

2d9bc18c1b be able to specify the input format for times
2019-03-03 19:05:04 +01:00
tsantos
b3d536f04d [PropertyInfo] Removed useless namespace 2019-03-03 07:59:38 -03:00
Thomas Schulz
d3ee2b676e Removed non-existing parameters for LogoutUrlGenerator calls 2019-03-02 17:24:44 +01:00
Fabien Potencier
a07627ea9a fixed tests 2019-03-02 15:55:10 +01:00
Fabien Potencier
ee787d17b4 [Mime] added classes for generating MIME messages 2019-03-02 15:10:47 +01:00
Grégoire Pineau
08a20ee0ba [Monolog] Really reset logger when calling logger::reset() 2019-02-28 18:49:31 +01:00
Fabien Potencier
675c45850c bug #30383 [WebProfilerBundle] toolbar: invisible route name in Firefox (inmarelibero)
This PR was squashed before being merged into the 4.2 branch (closes #30383).

Discussion
----------

[WebProfilerBundle] toolbar: invisible route name in Firefox

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

This fixes #29858, fixing a bug that prevents Route name displaying in debug toolbar on Firefox

Commits
-------

6b6bd453e1 [WebProfilerBundle] toolbar: invisible route name in Firefox
2019-02-28 15:59:51 +01:00
Emanuele Gaspari
6b6bd453e1 [WebProfilerBundle] toolbar: invisible route name in Firefox 2019-02-28 15:59:23 +01:00
Thomas Calvet
a2b73489dd [Routing][ServiceRouterLoader] Remove an outdated comment 2019-02-27 23:16:31 +01:00
Marcos Gómez Vilches
c4be39ce21 [Form] Fixes debug:form appears many times as type extensions configured with new getExtendedTypes method 2019-02-27 15:40:07 +01:00
David Prévot
93dab5c381 Drop spurious execution bit 2019-02-26 17:31:50 -10:00
Fabien Potencier
91c5b14d8b bug #30380 [WebProfilerBundle] Fix row update on finish ajax request (yceruto)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[WebProfilerBundle] Fix row update on finish ajax request

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

```
Uncaught TypeError: Cannot read property 'setAttribute' of undefined
    at finishAjaxRequest
    at XMLHttpRequest.<anonymous>
```

Continuation of https://github.com/symfony/symfony/pull/30130

Commits
-------

ff9e494776 Fix row update on finish ajax request
2019-02-26 12:14:15 +01:00
Nicolas Grekas
5754846683 Merge branch '4.2'
* 4.2:
  Fix git diff marker
  Removed eval() from KernelShutdownOnTearDownTrait
2019-02-26 09:35:29 +01:00
Soner Sayakci
d631bd96ac
Fix git diff marker 2019-02-26 09:03:39 +01:00
Yonel Ceruto
ff9e494776 Fix row update on finish ajax request 2019-02-25 16:12:18 -05:00
David Maicher
21f4e38800 [FrameworkBundle][Routing] allow boolean container parameters for routes 2019-02-25 19:39:36 +01:00
Fabien Potencier
d2e9a7051f feature #22048 [Security] deprecate the Role and SwitchUserRole classes (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Security] deprecate the Role and SwitchUserRole classes

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

In #20801, we deprecated the `RoleInterface`. The next logical step would be to also deprecate the `Role` class. However, we currently have the `SwitchUserRole` class (a sub-class of `Role`) that acts as an indicator to check whether or not the authenticated user switched to another user.

This PR proposes an alternative solution to the usage of the special `SwitchUserRole` class by storing the original token inside the `UsernamePasswordToken`. This PR is not complete, but rather acts as a proof of concept of how we could get rid of the `Role` and the `SwitchUserRole` classes.

Please share your opinions whether you think this is a valid approach and I will be happy to finalise the PR.

Commits
-------

d7aaa615b9 deprecate the Role and SwitchUserRole classes
2019-02-25 17:04:33 +01:00
Fabien Potencier
c8d6decb61 minor #30374 [Validator] Add the missing translations for the Latvian ("lv") locale #30174 (k0d3r1s)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add the missing translations for the Latvian ("lv") locale #30174

Fixes #30174

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

Commits
-------

86b8c253c7 [Validator] Add the missing translations for the Latvian ("lv") locale
2019-02-25 16:58:38 +01:00
Fabien Potencier
bb903594ee bug #26532 [HttpKernel] Correctly merging cache directives in HttpCache/ResponseCacheStrategy (aschempp)
This PR was squashed before being merged into the 3.4 branch (closes #26532).

Discussion
----------

[HttpKernel] Correctly merging cache directives in HttpCache/ResponseCacheStrategy

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

This PR is a first draft to fix the incorrect merging of private and other cache-related headers that are not meant for the shared cache but the browser (see mentioned issues).

The existing implementation of `HttpFoundation\Response` is very much tailored to the `HttpCache`, for example `isCacheable` returns `false` if the response is `private`, which is not true for a browser cache. That is why my implementation does not longer use much of the response methods. They are however still used by the `HttpCache` and we should keep them as-is. FYI, the `ResponseCacheStrategy` does **not** affect the stored data of `HttpCache` but is only applied to the result of multiple merged subrequests/ESI responses.

I did read up a lot on RFC2616 as a reference. [Section 13.4](https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.4) gives an overall view of when a response MAY be cached. [Section 14.9.1](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1) has more insight into the `Cache-Control` directives.

Here's a summary of the relevant information I applied to the implementation:

 - > Unless specifically constrained by a cache-control (section 14.9) directive, a caching system MAY always store a successful response (see section 13.8) as a cache entry, MAY return it without validation if it is fresh, and MAY return it after successful validation.

    A response without cache control headers is totally fine, and it's up to the cache (shared or private) to decide what to do with it. That is why the implementation does not longer set `no-cache` if no `Cache-Control` headers are present.

 - > A response received with a status code of 200, 203, 206, 300, 301 or 410 MAY be stored […] unless a cache-control directive prohibits caching.

    > A response received with any other status code (e.g. status codes 302 and 307) MUST NOT be returned […] unless there are cache-control directives or another header(s) that explicitly allow it.

    This is what `ResponseCacheStrategy::isUncacheable` implements to decide whether a response is not cacheable at all. It differs from `Response::isCacheable` which only returns true if there are actual `Cache-Control` headers.

 - > [Section 13.2.3](https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.2.3): When a response is generated from a cache entry, the cache MUST include a single Age header field in the response with a value equal to the cache entry's current_age.

    That's why the implementation **always** adds the `Age` header. It takes the oldest age of any of the responses as common denominator for the content.

 - > [Section 14.9.3](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.3): If a response includes an s-maxage directive, then for a shared cache (but not for a private cache), the maximum age specified by this directive overrides the maximum age specified by either the max-age directive or the Expires header.

    This effectively means that `max-age`, `s-maxage` and `Expires` must all be kept on the response. My implementation assumes that we can only do that if they exist in **all** of the responses, and then takes the lowest value of any of them. Be aware the implementation might look confusing at first. Due to the fact that the `Age` header might come from another subresponse than the lowest expiration value, the values are stored relative to the current response date and then re-calculated based on the age header.

The Symfony implementation did not and still does not implement the full RFC. As an example, some of the `Cache-Control` headers (like `private` and `no-cache`) MAY actually have a string value, but the implementation only supports boolean. Also, [Custom `Cache-Control` headers](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.6) are currently not merged into the final response.

**ToDo/Questions:**

 1. [Section 13.5.2](https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.5.2) specifies that we must add a [`Warning 214 Transformation applied`](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.46) if we modify the response headers.

 2. Should we add an `Expires` headers based on `max-age` if none is explicitly set in the responses? This would essentially provide the same information as `max-age` but with support for HTTP/1.0 proxies/clients.

 3. I'm not sure about the implemented handling of the `private` directive. The directive is currently only added to the final response if it is present in all of the subresponses. This can effectively result in no cache-control directive, which does not tell a shared cache that the response must not be cached. However, adding a `private` might also tell a browser to actually cache it, even though non of the other responses asked for that.

 4. > [Section 14.9.2](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.2): The purpose of the `no-store` directive is to prevent the inadvertent release or retention of sensitive information […]. The `no-store` directive applies to the entire message, and MAY be sent either in a response or in a request. If sent in a request, a cache MUST NOT store any part of either this request or any response to it. If sent in a response, a cache MUST NOT store any part of either this response or the request that elicited it.

    I have not (yet) validated whether the `HttpCache` implementation respects any of this.

 5. As far as I understand, the current implementation of [`ResponseHeaderBag::computeCacheControlValue`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php#L313) is incorrect. `no-cache` means a response [must not be cached by a shared or private cache](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1), which overrides `private` automatically.

 5. The unit tests are still very limited and I want to add plenty more to test and sort-of describe the implementation or assumptions on the RFC.

/cc @nicolas-grekas

#SymfonyConHackday2018

Commits
-------

893118f978 [HttpKernel] Correctly merging cache directives in HttpCache/ResponseCacheStrategy
2019-02-25 12:22:17 +01:00
Andreas Schempp
893118f978 [HttpKernel] Correctly merging cache directives in HttpCache/ResponseCacheStrategy 2019-02-25 12:22:09 +01:00
Dāvis Zālītis
86b8c253c7
[Validator] Add the missing translations for the Latvian ("lv") locale
Fixes #30174
2019-02-25 11:32:21 +02:00
Christian Flothmann
2d9bc18c1b be able to specify the input format for times 2019-02-25 09:54:42 +01:00
Pascal Luna
6c2aa2446d Fixed the DebugClassLoader compatibility with eval()'d code on Darwin 2019-02-24 16:45:11 +01:00
Grégoire Pineau
17533da49c [Monolog] Disable DebugLogger in CLI 2019-02-24 14:22:28 +01:00
Maxime Steinhausser
32c90ebc8e [Serializer] Normalize constraint violation parameters 2019-02-24 12:04:56 +01:00
Pascal Luna
324b70afa3 Removed eval() from KernelShutdownOnTearDownTrait 2019-02-24 02:12:10 +00:00
Oskar Stark
a0aa15a41e
Update src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
Co-Authored-By: mantis <mantis@users.noreply.github.com>
2019-02-23 19:26:32 +00:00
Oskar Stark
c2986d5e40
Update src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
Co-Authored-By: mantis <mantis@users.noreply.github.com>
2019-02-23 19:26:31 +00:00
Oskar Stark
42995c859c
Update src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
Co-Authored-By: mantis <mantis@users.noreply.github.com>
2019-02-23 19:26:31 +00:00
Oskar Stark
2d88298ace
Update src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
Co-Authored-By: mantis <mantis@users.noreply.github.com>
2019-02-23 19:26:30 +00:00
Mantis Development
e43a3bce11
Update ReflectionExtractorTest.php 2019-02-23 19:26:00 +00:00
Mantis Development
2c91c754bc
Update ReflectionExtractorTest.php 2019-02-23 19:25:30 +00:00
Mantis Development
5acc85c48b
Update ReflectionExtractorTest.php 2019-02-23 19:25:30 +00:00
Mantis Development
d0a2dc0a2d
Update ReflectionExtractorTest.php
Add test case
2019-02-23 19:25:30 +00:00
Mantis Development
be8d14a129
Fix undefined variable fromConstructor when passing context to getTypes
If passing context to getTypes, it checks value of $context['enable_constructor_extraction'] for true/false or the constructor value of enableConstructorExtraction and should then populate fromConstructor if necessary. The missing brackets around the first part of this check mean that fromConstructor is only applied if context is not set.

This fixes the issuse described at [symfony/symfony-docs#10969](https://github.com/symfony/symfony-docs/pull/10969)
2019-02-23 19:23:31 +00:00
Fabien Potencier
9202d9ed3e minor #30352 [Validator] Update Serbian translation file (burnmaniac)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Update Serbian translation file

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | 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 | #30189  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | / <!-- 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.
-->
I am not sure about some translations, if someone could check these, I would appreciate it.

Also, I've found that singular/plural translations have 3 translations. I am not sure if that's a mistake or not. I removed the third translation, but if I was wrong, I'll be happy to put it back.

Commits
-------

9e9a57a544 [Validator] Update Serbian translation file
2019-02-23 18:17:20 +01:00
Danijel Obradović
9e9a57a544 [Validator] Update Serbian translation file 2019-02-23 18:15:28 +01:00
Nicolas Grekas
3895acd175 fix merge 2019-02-23 17:20:51 +01:00
Nicolas Grekas
3969948cbc Merge branch '4.2'
* 4.2:
  fix merge
2019-02-23 16:42:19 +01:00
Nicolas Grekas
5b23a2b257 fix merge 2019-02-23 16:42:05 +01:00
Nicolas Grekas
a0c566504c Merge branch '4.2'
* 4.2: (26 commits)
  Apply php-cs-fixer rule for array_key_exists()
  [Cache] fix warming up cache.system and apcu
  [Security] Change FormAuthenticator if condition
  handles multi-byte characters in autocomplete
  speed up tests running them without debug flag
  [Translations] added missing Croatian validators
  Fix getItems() performance issue with RedisCluster (php-redis)
  [VarDumper] Keep a ref to objects to ensure their handle cannot be reused while cloning
  IntegerType: reject submitted non-integer numbers
  be keen to newcomers
  [HttpKernel] Fix possible infinite loop of exceptions
  fixed CS
  [Validator] Added missing translations for Afrikaans
  do not validate non-submitted form fields in PATCH requests
  Update usage example in ArrayInput doc block.
  [Console] Prevent ArgvInput::getFirstArgument() from returning an option value
  [Validator] Fixed duplicate UUID
  fixed CS
  [EventDispatcher] Fix unknown priority
  Avoid mutating the Finder when building the iterator
  ...
2019-02-23 16:22:31 +01:00
Nicolas Grekas
87f3c36d60 Merge branch '3.4' into 4.2
* 3.4: (24 commits)
  Apply php-cs-fixer rule for array_key_exists()
  [Security] Change FormAuthenticator if condition
  handles multi-byte characters in autocomplete
  speed up tests running them without debug flag
  [Translations] added missing Croatian validators
  Fix getItems() performance issue with RedisCluster (php-redis)
  [VarDumper] Keep a ref to objects to ensure their handle cannot be reused while cloning
  IntegerType: reject submitted non-integer numbers
  be keen to newcomers
  [HttpKernel] Fix possible infinite loop of exceptions
  fixed CS
  [Validator] Added missing translations for Afrikaans
  do not validate non-submitted form fields in PATCH requests
  Update usage example in ArrayInput doc block.
  [Console] Prevent ArgvInput::getFirstArgument() from returning an option value
  [Validator] Fixed duplicate UUID
  fixed CS
  [EventDispatcher] Fix unknown priority
  Avoid mutating the Finder when building the iterator
  [Validator] Add the missing translations for the Greek (el) locale
  ...
2019-02-23 16:17:42 +01:00
Nicolas Grekas
b0a3208588 Apply php-cs-fixer rule for array_key_exists() 2019-02-23 16:06:07 +01:00
Nicolas Grekas
af666411d4 bug #30329 [Form] IntegerType: reject submitted non-integer numbers (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] IntegerType: reject submitted non-integer numbers

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

Commits
-------

6a43e74828 IntegerType: reject submitted non-integer numbers
2019-02-23 15:37:48 +01:00
Nicolas Grekas
b0a85ad015 [Cache] fix warming up cache.system and apcu 2019-02-23 15:35:37 +01:00
Nicolas Grekas
1aac865da7 bug #30347 [Security] Change FormAuthenticator if condition (PReimers)
This PR was squashed before being merged into the 3.4 branch (closes #30347).

Discussion
----------

[Security] Change FormAuthenticator if condition

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

I changed the if condition in `SimpleFormAuthenticationListener` and `UsernamePasswordFormAuthenticationListener` based on the solution provided by @nikic in issue #30341

#OpenSourceFriday

Commits
-------

67ae121b2e [Security] Change FormAuthenticator if condition
2019-02-23 15:32:41 +01:00
Patrick Reimers
67ae121b2e [Security] Change FormAuthenticator if condition 2019-02-23 15:32:34 +01:00
Nicolas Grekas
173b5eaf8c bug #30354 [Console] handles multi-byte characters in autocomplete (jls-esokia)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] handles multi-byte characters in autocomplete

fixes #29966

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| 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 | #29966   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

I used the `mb_ord` to detect whether the amount of bytes read is valid before proceeding.  I limit the number of bytes read to 4 before giving up because characters can use at most 4 bytes.
The test passes with or without the fix though.

Commits
-------

47320a63e2 handles multi-byte characters in autocomplete
2019-02-23 15:30:59 +01:00
Fabien Potencier
4cc10062e2 bug #30351 Fix getItems() performance issue with RedisCluster (php-redis) (andrerom)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix getItems() performance issue with RedisCluster (php-redis)

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

On any kind of multi loads, including tags loading where it's always the case, current code leads to an explosion of Redis lookups affecting performance on RedisCluster _(as it does not support pipeline)_.

This backports the code for mget() usage from 4.x in order to fix it.
It's done with one small improvment which would also be relevant for 4.x, only using pipeline on cluster on predis as mget is more efficient (ref redis doc).

Commits
-------

178506e72c Fix getItems() performance issue with RedisCluster (php-redis)
2019-02-23 12:03:32 +01:00
Fabien Potencier
83fec23d61 bug #30350 [VarDumper] Keep a ref to objects to ensure their handle cannot be reused while cloning (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] Keep a ref to objects to ensure their handle cannot be reused while cloning

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

Fixes the root issue that led to https://github.com/symfony/symfony/pull/30311#issuecomment-466457434

Commits
-------

29a0683107 [VarDumper] Keep a ref to objects to ensure their handle cannot be reused while cloning
2019-02-23 11:36:56 +01:00
Fabien Potencier
2e8bf334ca bug #30349 [VarDumper] fix dumping Ds maps and pairs (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[VarDumper] fix dumping Ds maps and pairs

| 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 https://github.com/symfony/symfony/pull/30311#issuecomment-466457434

![image](https://user-images.githubusercontent.com/243674/53267273-41260e80-36e3-11e9-8723-a73bf0690a01.png)

Commits
-------

45869ac10c [VarDumper] fix dumping Ds maps and pairs
2019-02-23 11:35:34 +01:00
Jonathan
47320a63e2 handles multi-byte characters in autocomplete 2019-02-23 14:31:39 +04:00
Fabien Potencier
e9a2c3d753 feature #30345 [Monolog] Added a way to configure the ConsoleFormatter from the ConsoleHandler (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Monolog] Added a way to configure the ConsoleFormatter from the ConsoleHandler

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

see also https://github.com/symfony/monolog-bundle/pull/297

from that:
![image](https://user-images.githubusercontent.com/408368/53246085-f63ed380-36af-11e9-9bff-2e42f8af141c.png)

to that:
![image](https://user-images.githubusercontent.com/408368/53246115-0787e000-36b0-11e9-93ef-e47ed058adbf.png)

with some configuration:

```yaml
diff --git a/config/packages/dev/monolog.yaml b/config/packages/dev/monolog.yaml
index b1998da..66ae2db 100644
--- a/config/packages/dev/monolog.yaml
+++ b/config/packages/dev/monolog.yaml
@@ -17,3 +17,6 @@ monolog:
             type: console
             process_psr_3_messages: false
             channels: ["!event", "!doctrine", "!console"]
+            console_formater_options:
+                format: "%%datetime%% %%start_tag%%%%level_name%%%%end_tag%% <comment>[%%channel%%]</> %%message%%%%context%%\n"
+                multiline: false
```

Commits
-------

5e494db04c [Monolog] Added a way to configure the ConsoleFormatter from the ConsoleHandler
2019-02-23 11:19:35 +01:00
Fabien Potencier
9e4ff87214 minor #30356 [FrameworkBundle][SecurityBundle] speed up tests running them without debug flag (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle][SecurityBundle] speed up tests running them without debug flag

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

dfb924f6a9 speed up tests running them without debug flag
2019-02-23 11:17:05 +01:00
Fabien Potencier
5f8aa34396 feature #30357 [TwigBridge] rename parent_form() to form_parent() (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[TwigBridge] rename parent_form() to form_parent()

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

We got some feedback on the blog post that form_parent() would be better
for consistency with all the existing form_*() functions. I think that
user has a point about that.

Commits
-------

057d177378 rename parent_form() to form_parent()
2019-02-23 11:12:29 +01:00
Christian Flothmann
dfb924f6a9 speed up tests running them without debug flag 2019-02-23 11:01:03 +01:00
Christian Flothmann
057d177378 rename parent_form() to form_parent()
We got some feedback on the blog post that form_parent() would be better
for consistency with all the existing form_*() functions. I think that
user has a point about that.
2019-02-23 10:52:13 +01:00
Antonio Peric
b9ce861ff6
[Translations] added missing Croatian validators 2019-02-23 10:13:05 +01:00
Christian Flothmann
d7aaa615b9 deprecate the Role and SwitchUserRole classes 2019-02-23 00:57:00 +01:00
André R
178506e72c Fix getItems() performance issue with RedisCluster (php-redis)
On any kind of multi loads, including tags loading, current code leads to
an explosion of Redis lookups slowing down performance.

This backports the code for mget() usage from 4.x in order to fix it.
It's done with one small improvment which would also be relevant for 4.x,
only using pipeline on cluster on predis as mget is more efficient.
2019-02-22 22:23:30 +01:00
Nicolas Grekas
29a0683107 [VarDumper] Keep a ref to objects to ensure their handle cannot be reused while cloning 2019-02-22 21:52:27 +01:00
Nicolas Grekas
45869ac10c [VarDumper] fix dumping Ds maps and pairs 2019-02-22 21:35:02 +01:00
Christian Flothmann
6a43e74828 IntegerType: reject submitted non-integer numbers 2019-02-22 15:45:47 +01:00
Oskar Stark
c008ee046a be keen to newcomers 2019-02-22 15:44:53 +01:00
Anthony MARTIN
101bfd79bf [DI] change name to tag + add XMl support + adding yaml/xml tests 2019-02-22 14:36:50 +01:00
Grégoire Pineau
5e494db04c [Monolog] Added a way to configure the ConsoleFormatter from the ConsoleHandler 2019-02-22 14:32:09 +01:00
François-Xavier de Guillebon
845d3a681b Allow to choose an index for tagged collection 2019-02-22 11:27:55 +01:00
Nicolas Grekas
fec0475e8c feature #30311 [VarDumper] Implement DsCaster (enumag)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[VarDumper] Implement DsCaster

| 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 dumping the data structures from [Ds extension](http://php.net/manual/en/book.ds.php) Symfony only shows the class name but not the actual data. So in this PR I tried to write a Caster for these data structures.

Map can't be simply casted to array because it can contain objects as keys so I dump the pairs instead.

Commits
-------

eab631fc45 [VarDumper] Implement DsCaster
2019-02-22 09:46:13 +01:00
Nicolas Grekas
848a83078c bug #30327 [HttpKernel] Fix possible infinite loop of exceptions (enumag)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix possible infinite loop of exceptions

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

I ran into an [issue](https://github.com/php-enqueue/enqueue-dev/issues/774) in the enqueue library which copied this part of code from Symfony. I'm now starting to understand what the problem is and it should most likely be fixed in Symfony as well.

I didn't actually run into it in Symfony itself but it seems at least hypothetically possible. Imagine if [here](8c3dc8254a/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php (L77)) `$e` is somehow the same (===) as `$exception`. The code [below](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php#L82-L92) will then find the last exception in the `getPrevious()` chain and assigns `$exception` as the previous. However in the off chance that `$exception` is actually `$e` (the first exception in the chain) then it creates an infinite loop of exceptions which is not good for monolog and exception handlers.

What do you think?

Commits
-------

3447222b68 [HttpKernel] Fix possible infinite loop of exceptions
2019-02-22 09:41:30 +01:00
Christian Flothmann
715cf8db81 fix lowest supported Routing component version 2019-02-21 13:27:02 +01:00
Jáchym Toušek
3447222b68
[HttpKernel] Fix possible infinite loop of exceptions 2019-02-21 13:02:05 +01:00
Fabien Potencier
7b4f4bfd47 fixed CS 2019-02-21 11:18:37 +01:00
Fabien Potencier
5ac4c2abf5 bug #27601 [Routing] fix URL generation with look-around requirements (nasimnabavi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] fix URL generation with look-around requirements

| Q             | A
| ------------- | ---
| Branch?       | 2.8 up to 4.1 for bug fixes
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10548
| License       | MIT
| Doc PR        |

If you have a non-catchable pattern in requirements like f.e. a positive lookahead (.+(?=/foo/)), the generator will not accept the parameter as the parameter itself cannot fulfil the requirement, but only matches in the context of the entire path.
This fix looks for lookAround in the path and ignores checking the requirements if any lookAround exists.

Commits
-------

c474451176 [Routing] fix URL generation with look-around requirements
2019-02-21 11:17:01 +01:00
Fabien Potencier
5a3e894203 feature #27570 [PropertyInfo] Added support for extract type from default value (tsantos84)
This PR was squashed before being merged into the 4.3-dev branch (closes #27570).

Discussion
----------

[PropertyInfo] Added support for extract type from default value

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

Added support for extract type from property's default value.

```php

class Dummy
{
    private $age = 30;
}

$types = $propertyInfo->getTypes('Dummy', 'age');

/*
  Example Result
  --------------
  array(1) {
    [0] =>
    class Symfony\Component\PropertyInfo\Type (6) {
      private $builtinType          => string(3) "int"
      private $nullable             => bool(false)
      private $class                => 'Dummy'
      private $collection           => bool(false)
      private $collectionKeyType    => NULL
      private $collectionValueType  => NULL
    }
  }
*/
```

Commits
-------

f6510cda40 [PropertyInfo] Added support for extract type from default value
2019-02-21 11:10:14 +01:00
tsantos
f6510cda40 [PropertyInfo] Added support for extract type from default value 2019-02-21 11:10:02 +01:00
Fabien Potencier
4e1ad10d91 feature #28919 [DX][WebProfilerBundle] Add Pretty Print functionality for Request Content (SamFleming)
This PR was squashed before being merged into the 4.3-dev branch (closes #28919).

Discussion
----------

[DX][WebProfilerBundle] Add Pretty Print functionality for Request Content

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

## Why?
Quite often when attempting to debug issues with JSON requests sent to a Symfony API, I use the Web Profiler to check the request content. More often than not the request content isn't easily readable (99% of the time it's all stuck on a single line and impossible to read). I always find myself copying + pasting the content into a random online tool to have it "pretty-print" the JSON.

Usually this isn't an issue, but can be annoying when offline. There's also the security issue of sending entire JSON payloads to a third-party server just for formatting 😳. Alternatively, maybe developers  copy+paste into their chosen editors and this PR is all a waste of time — I hope not 😛.

## How?
This PR adds "Pretty-Print" JSON functionality straight into the profiler.

We can use `collector.requestheaders` to detect if the request was JSON and conditionally show the Pretty Print button.

When the button is clicked, we format the JSON from the "Request Content" card.

## What does it look like?
Before:
![without-pretty-print](https://user-images.githubusercontent.com/573318/47180751-36b0ce00-d319-11e8-86ed-eb0d78ebcbe3.png)

After:
![pretty](https://user-images.githubusercontent.com/573318/47180763-3c0e1880-d319-11e8-995d-eba565aad827.png)

Non-JSON Requests (unchanged):
![non-json-request](https://user-images.githubusercontent.com/573318/47181080-03227380-d31a-11e8-8cf2-e8b2e8c1a21d.png)

## Things to consider

- Is `JSON.stringify(JSON.parse(content));` the safest, most efficient way to do this?
- Should the "Pretty Print" button be in-line next to the "Request Content" header? I couldn't find a pattern for this sort of thing elsewhere in the profiler.
- Do people want JSON formatted with 4 spaces, would 2 spaces be preferred? Should this be a configuration option stored in localStorage (such as the light/dark theme configuration)?
- Should this be a toggle? E.g. click to pretty print, then click to undo

## Future Improvements

Depending on how this is received it could be extended to support formatting different request content-types (e.g. XML formatting) — I assume.

## Progress

- [x] Gather feedback and decide where to perform the pretty-print: [server-side, or client-side](https://github.com/symfony/symfony/pull/28919#issuecomment-431508361).
*It was decided server-side would be better.*

Commits
-------

9f85103151 [DX][WebProfilerBundle] Add Pretty Print functionality for Request Content
2019-02-21 10:57:57 +01:00
Sam Fleming
9f85103151 [DX][WebProfilerBundle] Add Pretty Print functionality for Request Content 2019-02-21 10:57:48 +01:00
Christian Flothmann
93c2feb7b3 feature #28723 [Form] deprecate custom formats with HTML5 widgets (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] deprecate custom formats with HTML5 widgets

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

Commits
-------

b70c1b6e0d deprecate custom formats with HTML5 widgets
2019-02-21 10:41:31 +01:00
Fabien Potencier
3560cfdebe feature #29865 [Console] Added suggestions for missing packages (przemyslaw-bogusz)
This PR was squashed before being merged into the 4.3-dev branch (closes #29865).

Discussion
----------

[Console] Added suggestions for missing packages

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

Currently, when someone runs one of the most common commands, e.g. `server:run`, but does not have a required package installed, they will get a general **'There are no commands defined...'** message.

This commit adds a more useful message, informing the user about a package that might be missing and suggesting a command that should be run in order to install it, e.g. `composer require symfony/web-server-bundle --dev`.

Commits
-------

423a54f46e [Console] Added suggestions for missing packages
2019-02-21 10:36:22 +01:00
Przemysław Bogusz
423a54f46e [Console] Added suggestions for missing packages 2019-02-21 10:36:15 +01:00
Fabien Potencier
cbe8cff882 feature #30301 [VarDumper] add link to source next to class names (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[VarDumper] add link to source next to class names

| 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 adds a `^` next to language identifiers (class and callback names) both on the Web and on the CLI. Clicking it opens the IDE to the target source code:

Eg in the profiler:
![image](https://user-images.githubusercontent.com/243674/53021031-900c4380-3458-11e9-9439-260ff11f0910.png)

And in the CLI:
![image](https://user-images.githubusercontent.com/243674/53021092-b16d2f80-3458-11e9-9f03-cdab59da4585.png)

Commits
-------

5fcd6b1d4e [VarDumper] add link to source next to class names
2019-02-21 10:23:57 +01:00
Fabien Potencier
8c3dc8254a minor #30326 Additional addons for the ghost (przemyslaw-bogusz)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Additional addons for the ghost

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

Following #30236 I've prepared two additional addons for the ghost.

The first one will display a plus on February 29, to indicate it's a leap year.
![ghost-plus](https://user-images.githubusercontent.com/35422131/53133091-3730ce00-3572-11e9-89f7-44568d796f7e.png)

The second one will display a gift on October 18, to indicate it's Symfony's birthday.
![ghost-gift](https://user-images.githubusercontent.com/35422131/53133127-5596c980-3572-11e9-8901-704785e235a8.png)

I would just like to point out that the addons are purely for fun, to amuse every hardcoding Symfony developer and offer a chance to smile on these few selected occasions.

Commits
-------

51ed942ef5 Additional addons for the ghost
2019-02-21 10:03:39 +01:00
Fabien Potencier
4b5661769d minor #30243 [Validator] Added missing translations for Afrikaans (Chris Tiearney)
This PR was squashed before being merged into the 3.4 branch (closes #30243).

Discussion
----------

[Validator] Added missing translations for Afrikaans

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

Added missing translations for Afrikaans

Commits
-------

8a931576d2 [Validator] Added missing translations for Afrikaans
2019-02-21 10:00:18 +01:00
Chris Tiearney
8a931576d2 [Validator] Added missing translations for Afrikaans 2019-02-21 10:00:09 +01:00
Fabien Potencier
ff4b1d4bff bug #30277 [Console] Prevent ArgvInput::getFirstArgument() from returning an option value (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Prevent ArgvInput::getFirstArgument() from returning an option value

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

Fixes the case where the passed input string contains no command name but one or more global (i.e. application-defined) options accepting values.

Commits
-------

46461e91f9 [Console] Prevent ArgvInput::getFirstArgument() from returning an option value
2019-02-21 09:51:54 +01:00
Fabien Potencier
ba725c2d70 feature #30225 publish message with custom queue options : flags | attributes (fedor.f, insidestyles)
This PR was merged into the 4.3-dev branch.

Discussion
----------

publish message with custom queue options : flags | attributes

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

option for publish persistent message:
`amqp://localhost/%2f/messages?queue[attributes][delivery_mode]=2&queue[flags]=1`
or
options:
>queue:
>>name: '%env(MESSENGER_QUEUE)%'
>>routing_key: '%env(MESSENGER_ROUTING_KEY)%'
>>attributes:
>>>delivery_mode: 2

>>flags: 1

Commits
-------

5e16053c70 update test case for custom queue options
4532319520 publish message with custom queue options : update ConnectionTest
6f9fdaf7e4 publish message with custom queue options : flags | attributes
2019-02-21 09:34:03 +01:00
Fabien Potencier
68d5597125 bug #29981 [Security] Complain about an empty decision strategy (corphi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Complain about an empty decision strategy

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

When an empty string is passed (or objects with a similarly behaving `__toString()` method) to the constructor, the call to `decide` causes infinite recursion.

Commits
-------

3a22cad29b Fix infinite recursion when passed an empty string
2019-02-21 09:28:33 +01:00
Fabien Potencier
2e6d0698f5 feature #30249 [Routing] deprecate some router options (Tobion)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Routing] deprecate some router options

| 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 | https://github.com/symfony/symfony/pull/28865#issuecomment-463480970
| 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
-------

bf4cd6164d [Routing] deprecate some router options
2019-02-21 09:24:00 +01:00
Fabien Potencier
da16b9c49b bug #29822 [EventDispatcher] Fix unknown priority (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] Fix unknown priority

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

Somehow, after #29411 the profiler actually shows the security firewall `ContextListener`.

This listener removes itself at call time, but at this point it's wrapped reference is already in the call stack; to be displayed in the profiler.

Because the wrapped listener lazily collects its priority - it asks it from the dispatcher -  we get null; the listener was already removed.

This causes the profiler to render `-` by default:

![image](https://user-images.githubusercontent.com/1047696/50850320-d5c5ee80-1379-11e9-8516-0c6bc54512ce.png)

This fixes it by always passing the expected priority at call time.

Commits
-------

9fb619ac62 [EventDispatcher] Fix unknown priority
2019-02-21 09:22:09 +01:00
Fabien Potencier
6207f19317 feature #30267 [Form] add option to render NumberType as type="number" (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] add option to render NumberType as type="number"

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

Commits
-------

42e8f5e3a2 add option to render NumberType as type="number"
2019-02-21 09:19:09 +01:00
Christian Flothmann
b70c1b6e0d deprecate custom formats with HTML5 widgets 2019-02-21 08:51:58 +01:00
Fabien Potencier
eb7a612763 minor #30319 [Console] Doc Block: More intuitive usage example in ArrayInput. (mattjanssen)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Doc Block: More intuitive usage example in ArrayInput.

Make the ArrayInput doc block example more self-explanatory and less misleading. Show the common use case of having `command`, and replace the confusing `name` argument with something more arbitrary.

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

The current doc block example for `ArrayInput` seems to imply that the command name goes in as `name`, but this is actually just a random argument, named "name", in this case.
```php
new ArrayInput(['name' => 'foo', '--bar' => 'foobar']);
```

It might be more helpful to provide an example that works with Symfony's `Console` component out of the box, as that is a common use case:
```php
new ArrayInput(['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar']);
```

Commits
-------

0c8d311657 Update usage example in ArrayInput doc block.
2019-02-21 08:45:12 +01:00
Fabien Potencier
02d6c0f22f feature #28969 [Form] deprecate using invalid names for buttons (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] deprecate using invalid names for buttons

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

Commits
-------

405aa548eb deprecate using invalid names for buttons
2019-02-21 08:40:33 +01:00
Fabien Potencier
a67441ab1f bug #30324 [Validator] Fixed duplicate UUID (ralfkuehnel)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Fixed duplicate UUID

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

Fixes the `TOO_HIGH_ERROR` constant had the same value in two different constraints: `LessThan` and `LessThanOrEqual`.

Commits
-------

0bd5dd84ef [Validator] Fixed duplicate UUID
2019-02-21 08:36:17 +01:00
Christian Flothmann
191403119c bug #30265 [Form] do not validate non-submitted form fields in PATCH requests (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] do not validate non-submitted form fields in PATCH requests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11493, #19788, #20805, #24453, #30011
| License       | MIT
| Doc PR        |

When a form field is not embedded as part of a HTTP PATCH requests, its
validation constraints configured through the `constraints` option must
not be evaluated. The fix from #10567 achieved this by not mapping their
violations to the underlying form field. This however also means that
constraint violations caused by validating the whole underlying data
object will never cause the form to be invalid. This breaks use cases
where some constraints may, for example, depend on the value of other
properties that were changed by the submitted data.

Commits
-------

a60d802619 do not validate non-submitted form fields in PATCH requests
2019-02-21 08:31:48 +01:00
Christian Flothmann
a60d802619 do not validate non-submitted form fields in PATCH requests 2019-02-21 08:19:04 +01:00
Christian Flothmann
42e8f5e3a2 add option to render NumberType as type="number" 2019-02-21 08:09:42 +01:00
Przemysław Bogusz
51ed942ef5 Additional addons for the ghost 2019-02-21 00:39:50 +01:00
Matt Janssen
0c8d311657 Update usage example in ArrayInput doc block.
Make the ArrayInput doc block example more self-explanatory and less misleading. Show the common use case of having `command`, and replace the confusing `name` argument with something more arbitrary.
2019-02-20 16:12:06 -06:00
Robin Chalas
46461e91f9 [Console] Prevent ArgvInput::getFirstArgument() from returning an option value 2019-02-20 21:43:41 +01:00
Ralf Kühnel
0bd5dd84ef [Validator] Fixed duplicate UUID 2019-02-20 20:51:21 +01:00
Fabien Potencier
c6de2dc03e fixed CS 2019-02-20 15:47:01 +01:00
Jáchym Toušek
eab631fc45
[VarDumper] Implement DsCaster 2019-02-20 12:31:22 +01:00
Roland Franssen
9fb619ac62 [EventDispatcher] Fix unknown priority 2019-02-20 11:38:05 +01:00
Christophe Coevoet
94989fe794 Avoid mutating the Finder when building the iterator 2019-02-20 10:38:23 +01:00
Christian Flothmann
5c7390006b feature #29887 [Form] Add input_format option to DateType and DateTimeType (fancyweb)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] Add input_format option to DateType and DateTimeType

| 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/issues/29883
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/10882

Add a new option to specify the date format when using the `string` input type.

Commits
-------

c8240a0423 [Form] Add input_format option to DateType and DateTimeType
2019-02-20 08:48:20 +01:00
Christian Flothmann
c3cf08e238 minor #30230 [Form] undeprecate date formats in single_text widgets (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] undeprecate date formats in single_text widgets

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

Commits
-------

1a983d07db undeprecate date formats in single_text widgets
2019-02-20 08:44:41 +01:00
Nicolas Grekas
424773da1f bug #30294 [FrameworkBundle] Fix Descriptor throwing on non existent parent (GuilhemN)
This PR was merged into the 4.2 branch.

Discussion
----------

[FrameworkBundle] Fix Descriptor throwing on non existent parent

| 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/nelmio/NelmioApiDocBundle/issues/1470  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

The Descriptor throws an exception when it encounters a class having a non existent parent, see https://github.com/nelmio/NelmioApiDocBundle/issues/1470 for the record.

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

6b354cc304 Fix Descriptor throwing on non existent parent
2019-02-20 08:36:13 +01:00
Nicolas Grekas
df0fc5ee72 minor #30308 [Validator] Added missing translations pt_BR (felipyamorim)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Added missing translations pt_BR

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

Added missing translations.

Commits
-------

19ca344685 [Validator] Added missing translations pt_BR
2019-02-20 08:24:15 +01:00
nikos.sotiropoulos
7db66b3a30 [Validator] Add the missing translations for the Greek (el) locale
closes #30158
2019-02-20 01:41:21 +02:00
Philipp Cordes
3a22cad29b Fix infinite recursion when passed an empty string 2019-02-19 23:14:55 +01:00
Nicolas Grekas
5fcd6b1d4e [VarDumper] add link to source next to class names 2019-02-19 22:52:41 +01:00
Nicolas Grekas
51b72f3284 [Form] Relax fixture 2019-02-19 19:43:50 +01:00
Nicolas Grekas
ccd4bbeb31 Merge branch '4.2'
* 4.2:
  [Form] Relax fixture
2019-02-19 19:42:38 +01:00
Nicolas Grekas
822867d7d5 [Form] Relax fixture 2019-02-19 19:41:56 +01:00
Nicolas Grekas
374c8b0063 Merge branch '4.2'
* 4.2:
  [Console] Fix command testing with missing inputs
  [Validator] Sync no/nb translation files
  [Translation] Added a script to display the status of translations
  [Validator] Added missing translations for Norwegian (\"no\") locale #30179
  [Security\Guard] bump lowest version of security-core
  [TwigBridge] Fix test
  Remove unnecessary ProgressBar stdout writes (fixes flickering)
  [Validator] improve translations for albanian ("sq") locale
  [VarDumper] fix serializing Stub instances
  [Validator] Added missing use statement for UnexpectedTypeException
  Don't resolve the Deprecation error handler mode until a deprecation is triggered
  bug #30245 fix lost namespace in eval (fizzka)
  fix lost namespace in eval
  [Twig] removed usage of non-namespaced classes
  added missing dot
  Update validators.lt.xlf
  #30172 Add the missing validation translations for the Luxembourgish …
  [Debug][ErrorHandler] Preserve next error handler
2019-02-19 19:29:52 +01:00
Nicolas Grekas
890c2ac9f5 Merge branch '3.4' into 4.2
* 3.4:
  [Console] Fix command testing with missing inputs
  [Validator] Sync no/nb translation files
  [Translation] Added a script to display the status of translations
  [Validator] Added missing translations for Norwegian (\"no\") locale #30179
  [Security\Guard] bump lowest version of security-core
2019-02-19 19:28:05 +01:00
Felipy Amorim
19ca344685
[Validator] Added missing translations pt_BR
| Q | A |
|--|--|
| Branch? | 3.4 |
| Bug fix? |no|
|New feature?	|no|
|BC breaks?	|no|
|Deprecations?	|no|
|Tests pass?	|yes|
|Fixed tickets	|#30182|
|License	|MIT|

Added missing translations.
2019-02-19 14:53:11 -03:00
Robin Chalas
005e75cbab [Form] Fix describing closures 2019-02-19 15:40:04 +01:00
Nicolas Grekas
5909a47664 minor #30296 [VarDumper] link paths in stack traces to IDE (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[VarDumper] link paths in stack traces to IDE

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

`./test.php:8` and `./test.php:11` can now be clicked:

![image](https://user-images.githubusercontent.com/243674/52971041-466b1c80-33b6-11e9-9bc1-0e55dc115f63.png)

Commits
-------

6672ac3f43 [VarDumper] link paths in stack traces to IDE
2019-02-19 14:25:47 +01:00
Nicolas Grekas
6672ac3f43 [VarDumper] link paths in stack traces to IDE 2019-02-18 19:48:10 +01:00
Robin Chalas
ac4e9b0b26 [Console] Fix command testing with missing inputs 2019-02-18 19:44:35 +01:00
Nicolas Grekas
f3659b684e [VarDumper] dump Closures' parameters once: in their signatures 2019-02-18 19:32:59 +01:00
Thomas Calvet
c8240a0423 [Form] Add input_format option to DateType and DateTimeType 2019-02-18 19:19:29 +01:00
Guilhem Niot
6b354cc304 Fix Descriptor throwing on non existent parent 2019-02-18 17:11:20 +01:00
Robin Chalas
f2af0801c4 [Validator] Sync no/nb translation files 2019-02-18 15:33:02 +01:00
Fabien Potencier
1f829eca87 minor #30237 [Translation] Added a script to display the status of translations (javiereguiluz)
This PR was squashed before being merged into the 3.4 branch (closes #30237).

Discussion
----------

[Translation] Added a script to display the status of translations

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

This is the script I used to get the missing translations for each locale. I think it could come in handy for Symfony to always keep translations in sync.

Commits
-------

5ca7dedaaa [Translation] Added a script to display the status of translations
2019-02-18 13:35:36 +01:00
Javier Eguiluz
5ca7dedaaa [Translation] Added a script to display the status of translations 2019-02-18 13:35:29 +01:00
caalholm
c8dcc5b8e6 [Validator] Added missing translations for Norwegian (\"no\") locale #30179 2019-02-18 13:32:58 +01:00
Robin Chalas
e69855e906 minor #30282 [Security\Guard] bump lowest version of security-core (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security\Guard] bump lowest version of security-core

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

Forgotten in #30006 so that `PostAuthenticationGuardToken` can call `AbstractToken::doSerialize()`.

Commits
-------

93cfd5b2a0 [Security\Guard] bump lowest version of security-core
2019-02-18 10:29:27 +01:00
Fabien Potencier
caa2579e0a Merge branch '3.4' into 4.2
* 3.4:
  [TwigBridge] Fix test
  Remove unnecessary ProgressBar stdout writes (fixes flickering)
  [Validator] improve translations for albanian ("sq") locale
  [VarDumper] fix serializing Stub instances
  Don't resolve the Deprecation error handler mode until a deprecation is triggered
  bug #30245 fix lost namespace in eval (fizzka)
  [Twig] removed usage of non-namespaced classes
  added missing dot
  Update validators.lt.xlf
  #30172 Add the missing validation translations for the Luxembourgish …
  [Debug][ErrorHandler] Preserve next error handler
2019-02-18 07:49:49 +01:00
Fabien Potencier
ede6c9d6b0 minor #30279 [TwigBridge] Fix test (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] Fix test

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

Commits
-------

ad752b1a48 [TwigBridge] Fix test
2019-02-18 07:42:23 +01:00
Fabien Potencier
d962a74206 minor #30276 [Validator] improve translations for albanian ("sq") locale (Eno Mullaraj)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] improve translations for albanian ("sq") locale

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

While reviewing the changes announced in the "A Week of Symfony #633" post I found that there was room for improvement in the Validation component translations as they were defined earlier in 2012 and were never revisited.

All the translations have been reviewed and some of them were updated with the following improvements:
* overall translation message consistency
* fix singular expression messages
* fix grammatical errors
* use albanian form of expression
* restore, as lexical gap, the "locale" translation

Commits
-------

5cac9ad97d [Validator] improve translations for albanian ("sq") locale
2019-02-18 07:41:39 +01:00
Nicolas Grekas
93cfd5b2a0 [Security\Guard] bump lowest version of security-core 2019-02-17 23:00:14 +01:00
Robin Chalas
ad752b1a48 [TwigBridge] Fix test 2019-02-17 19:45:33 +01:00
Gabriel Ostrolucký
3fbcb965d0
Remove unnecessary ProgressBar stdout writes (fixes flickering) 2019-02-17 18:48:00 +01:00
Eno Mullaraj
5cac9ad97d [Validator] improve translations for albanian ("sq") locale
* improve overall translation message consistency
* fix singular expression messages
* fix grammatical errors
* use albanian form of expression
* restore as lexical gap the "locale" translation
2019-02-17 14:05:03 +01:00
insidestyles
5e16053c70 update test case for custom queue options 2019-02-17 13:03:29 +02:00
renanbr
f8bf9738f0 Drop \Serializable 2019-02-17 10:56:33 +01:00
Nicolas Grekas
46d6a4d9ec [VarDumper] fix serializing Stub instances 2019-02-16 23:55:29 +01:00
devrck
d10347fb15 [Validator] Added missing use statement for UnexpectedTypeException 2019-02-16 22:59:42 +01:00
Fabien Potencier
bb5992476f feature #30236 Add element to ghost in Exception (przemyslaw-bogusz)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Add element to ghost in Exception

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

Let's make love (& good code) not war. Sorry for not submitting it at least yesterday, but hopefully you will accept it, and we will be able to merge today. This will allow us to add different addons on other special ocasions.

![zrzut ekranu 2019-02-14 o 09 53 42](https://user-images.githubusercontent.com/35422131/52775440-0582a900-3040-11e9-8d9a-ee4959fa6982.png)

On personal side, I dedicate it, with lots of kisses, to my wife Martha.

If you like it, just ❤️

Commits
-------

c8d6dd7c8f Add element to ghost in Exception
2019-02-16 22:20:28 +01:00
Nicolas Grekas
eb3299341f bug #30247 Don't resolve the Deprecation error handler mode until a deprecation is triggered (ossinkine)
This PR was merged into the 3.4 branch.

Discussion
----------

Don't resolve the Deprecation error handler mode until a deprecation is triggered

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

<!--
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.
-->
If an error happens before `.env.test` is loaded the mode is set to 0 and cached so SYMFONY_DEPRECATIONS_HELPER is not read from `.env.test`.

Commits
-------

1090b8cb6e Don't resolve the Deprecation error handler mode until a deprecation is triggered
2019-02-16 19:51:27 +01:00
Gocha Ossinkine
1090b8cb6e Don't resolve the Deprecation error handler mode until a deprecation is triggered 2019-02-16 19:50:26 +01:00
Nicolas Grekas
f02c97f857 bug #30261 [Translation] restore compatibility with FrameworkBundle 4.2 (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Translation] restore compatibility with FrameworkBundle 4.2

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

Commits
-------

45dde5d00c restore compatibility with FrameworkBundle 4.2
2019-02-16 19:46:38 +01:00
Nicolas Grekas
dee2fcb50d bug #30264 [Debug][ErrorHandler] Preserve next error handler (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug][ErrorHandler] Preserve next error handler

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

Thank you @cuchac

Getting the current error handler in the error handler itself actually works. If you try to see the content of the `$currentErrorHandler` var however, you will always see `null`. That's why I thought it was impossible. Because I did not test from end to end until today.

Commits
-------

a8b34348e7 [Debug][ErrorHandler] Preserve next error handler
2019-02-16 18:23:37 +01:00
Fabien Potencier
da325fc0e2 bug #30245 fix lost namespace in eval (fizzka)
This PR was squashed before being merged into the 4.2 branch (closes #30245).

Discussion
----------

fix lost namespace in eval

Bugfix:
phpunit8 tearDown() declaration

Commits
-------

8743a1ada8 fix lost namespace in eval
2019-02-16 18:13:04 +01:00
Fabien Potencier
3b8fa1210c feature #30120 [FrameworkBundle][Translation] Added support for PHP files with trans() in translation commands (yceruto)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle][Translation] Added support for PHP files with trans() in translation commands

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

This PR allows translation commands be able to debug and update translation messages from any PHP file/class defined as service, injecting or wiring the `translator` service, e.g.:
```php
use Symfony\Component\Translation\TranslatorInterface;

class ParallelUniverseController extends AbstractController
{
    public function hello(Request $request, TranslatorInterface $translator)
    {
        // this id 'hello_message' will be extracted from translation:update
        $message = $translator->trans('hello_message');

        // send message to space...
    }
}
```
this supports all ways of wiring (auto or not): via constructor, public property, method calls, service subscriber and controller argument.

Commits
-------

9f9b828832 Added support for PHP files with translation in translation commands
2019-02-16 12:57:22 +01:00
Fabien Potencier
37a1302dff bug #30245 fix lost namespace in eval (fizzka)
This PR was squashed before being merged into the 4.2 branch (closes #30245).

Discussion
----------

fix lost namespace in eval

Bugfix:
phpunit8 tearDown() declaration

Commits
-------

8743a1ada8 fix lost namespace in eval
2019-02-16 12:54:38 +01:00
Ilya Bulakh
8743a1ada8 fix lost namespace in eval 2019-02-16 12:54:31 +01:00
Fabien Potencier
5a154538c7 minor #30233 [Twig] removed usage of non-namespaced classes (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Twig] removed usage of non-namespaced classes

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

bd719cd7e1 [Twig] removed usage of non-namespaced classes
2019-02-16 12:52:47 +01:00
Fabien Potencier
bd719cd7e1 [Twig] removed usage of non-namespaced classes 2019-02-16 12:50:39 +01:00
Fabien Potencier
d83c296e3e minor #30239 Add missing Romanian translations for validator (deverad)
This PR was squashed before being merged into the 4.3-dev branch (closes #30239).

Discussion
----------

Add missing Romanian translations for validator

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30183 [Validator] Add the missing translations for the Romanian ("ro") locale

Commits
-------

6674391dd4 Add missing Romanian translations for validator
2019-02-16 12:49:17 +01:00
Sergio
6674391dd4 Add missing Romanian translations for validator 2019-02-16 12:49:11 +01:00
Fabien Potencier
85c448e915 added missing dot 2019-02-16 12:46:43 +01:00
Fabien Potencier
de1f4c482b minor #30242 Update validators.lt.xlf (jlemesh)
This PR was squashed before being merged into the 3.4 branch (closes #30242).

Discussion
----------

Update validators.lt.xlf

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

Commits
-------

f9772359b3 Update validators.lt.xlf
2019-02-16 12:46:20 +01:00
JL
f9772359b3 Update validators.lt.xlf 2019-02-16 12:46:14 +01:00
Fabien Potencier
8364fe42ca minor #30251 #30172 Add the missing validation translations for the Luxembourgish … (Evrard Boulou)
This PR was squashed before being merged into the 3.4 branch (closes #30251).

Discussion
----------

#30172 Add the missing validation translations for the Luxembourgish …

…locale

| Q             | A
| ------------- | ---
| Branch?       | master for features / 3.4 up to 4.2 for bug fixes <!-- see below -->
| 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 | #30172  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Add the missing validation translations for the Luxembourgish locale

Commits
-------

b0be36648f #30172 Add the missing validation translations for the Luxembourgish …
2019-02-16 12:43:59 +01:00
Evrard Boulou
b0be36648f #30172 Add the missing validation translations for the Luxembourgish … 2019-02-16 12:43:53 +01:00
Thomas Calvet
a8b34348e7 [Debug][ErrorHandler] Preserve next error handler
Co-authored-by: Joe <cuchac@email.cz>
2019-02-16 11:38:56 +01:00
Christian Flothmann
45dde5d00c restore compatibility with FrameworkBundle 4.2 2019-02-15 20:21:53 +01:00
Christian Flothmann
346491c672 Merge branch '4.2'
* 4.2:
  fix tests by adapting Twig namespace changes
2019-02-15 19:54:52 +01:00
Christian Flothmann
348193609f Merge branch '3.4' into 4.2
* 3.4:
  fix tests by adapting Twig namespace changes
2019-02-15 19:54:27 +01:00
Christian Flothmann
bbc2656619 fix tests by adapting Twig namespace changes 2019-02-15 18:05:19 +01:00
Tobias Schultze
bf4cd6164d [Routing] deprecate some router options 2019-02-15 15:28:25 +01:00
Christian Flothmann
592e03f065 ignore not-existent service definitions 2019-02-14 17:43:30 +01:00
Christian Flothmann
d42e054d2c (finally) fix version dependent Form tests 2019-02-14 17:03:15 +01:00
Christian Flothmann
b09761778a Merge branch '4.2'
* 4.2:
  allow to skip tests based on the supported version
  Update validators.bg.xlf
  Update validators.ca.xlf
  fixed CS
  Updated validators.eu.xlf with missing translations
  fixed typo
  backported a translation
  [Validator] added missing translation for UK validator
  Validator: add the Persian translations
  Update validators.sq.xlf
  fixed CS
  forward valid numeric values to transform()
  add constraint validators before optimizations
2019-02-14 16:32:59 +01:00
Christian Flothmann
c58d4c2e22 Merge branch '3.4' into 4.2
* 3.4:
  allow to skip tests based on the supported version
  Update validators.bg.xlf
  Update validators.ca.xlf
  fixed CS
  Updated validators.eu.xlf with missing translations
  fixed typo
  backported a translation
  [Validator] added missing translation for UK validator
  Validator: add the Persian translations
  Update validators.sq.xlf
  fixed CS
  forward valid numeric values to transform()
  add constraint validators before optimizations
2019-02-14 16:32:36 +01:00
Christian Flothmann
37b0eeb007 minor #30241 allow to skip tests based on the supported version (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

allow to skip tests based on the supported version

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

Writing tests for Form related features in the Doctrine and Twig bridges
as well as the FrameworkBundle is a pain as soon as these tests are run
with more recent versions of the Form component. This is due to the fact
that our tests in the bridges and bundle extend test cases from the
component. The tests in the component are expanded with every feature
that gets added there. However, these new features are not present in
the other packages in older version and we thus need to be able to skip
them somehow.

Commits
-------

be23926bf8 allow to skip tests based on the supported version
2019-02-14 16:26:56 +01:00
Christian Flothmann
be23926bf8 allow to skip tests based on the supported version
Writing tests for Form related features in the Doctrine and Twig bridges
as well as the FrameworkBundle is a pain as soon as these tests are run
with more recent versions of the Form component. This is due to the fact
that our tests in the bridges and bundle extend test cases from the
component. The tests in the component are expanded with every feature
that gets added there. However, these new features are not present in
the other packages in older version and we thus need to be able to skip
them somehow.
2019-02-14 15:58:36 +01:00
Fabien Potencier
6a80e7ddd5 minor #30234 [Routing] fix changelog typo (Tobion)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Routing] fix changelog typo

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

Fix small typos from #28865

Commits
-------

37dbab263e [Routing] fix changelog typos
2019-02-14 12:58:43 +01:00
LubenZA
4f3bc6bd47 Update validators.bg.xlf 2019-02-14 12:57:40 +01:00
Christian Flothmann
6bfc5f0901 properly move test methods 2019-02-14 10:58:14 +01:00
Przemysław Bogusz
c8d6dd7c8f Add element to ghost in Exception 2019-02-14 10:10:17 +01:00
Tobias Schultze
37dbab263e
[Routing] fix changelog typos
Fix small typos from #28865
2019-02-14 04:47:16 +01:00
Yonel Ceruto
9f9b828832 Added support for PHP files with translation in translation commands 2019-02-13 19:06:53 -05:00
Christian Flothmann
1fe359995b fix tests 2019-02-13 22:52:06 +01:00
Christian Flothmann
1a983d07db undeprecate date formats in single_text widgets 2019-02-13 20:45:31 +01:00
fedor.f
4532319520 publish message with custom queue options : update ConnectionTest 2019-02-13 14:53:10 +02:00
Fabien Potencier
320c05f9f1 minor #30223 Updated validators.eu.xlf (ikerib)
This PR was merged into the 3.4 branch.

Discussion
----------

Updated validators.eu.xlf

with missing translations

Commits
-------

f496ab638e Updated validators.eu.xlf with missing translations
2019-02-13 10:39:43 +01:00
Fabien Potencier
45023acc86 minor #30224 Update validators.ca.xlf (rogerguasch)
This PR was squashed before being merged into the 3.4 branch (closes #30224).

Discussion
----------

Update validators.ca.xlf

| 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        | symfony/symfony-docs#... <!-- required for new features -->

Update validators.ca.xlf for Catalan language.

Commits
-------

077df27eca Update validators.ca.xlf
2019-02-13 10:38:01 +01:00
Roger Guasch
077df27eca Update validators.ca.xlf 2019-02-13 10:37:46 +01:00
Fabien Potencier
6c0190eee8 fixed CS 2019-02-13 10:35:08 +01:00
fedor.f
6f9fdaf7e4 publish message with custom queue options : flags | attributes 2019-02-13 11:30:45 +02:00
Iker Ibarguren
f496ab638e
Updated validators.eu.xlf with missing translations 2019-02-13 09:13:09 +01:00
Fabien Potencier
c6a2c3348f feature #28812 [Form] add a convenience method to get the parent form in Twig templates (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] add a convenience method to get the parent form in Twig templates

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

Commits
-------

cb60642d15 add a convenience method to get the parent form in Twig templates
2019-02-13 08:55:41 +01:00
Fabien Potencier
0887f62573 bug #30090 [FrameworkBundle] add constraint validators before optimizations (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] add constraint validators before optimizations

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

Commits
-------

05e0e162d3 add constraint validators before optimizations
2019-02-13 08:52:59 +01:00
Fabien Potencier
03dfdc4db3 feature #29121 [FrameworkBundle][Translation] Add support for Translator paths, Twig paths and Translator aware services paths in commands (yceruto)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle][Translation] Add support for Translator paths, Twig paths and Translator aware services paths in commands

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

Add custom (also common) Twig and Translation paths to the translation commands:
 * Custom directories configured in `twig.paths`.
 * Custom directories configured in `translator.paths`
 * The `Resources/translations/` directory of `Validation` component (if installed).
 * The `Resources/translations/` directory of `Form` component (if installed).
 * The `Resources/translations/` directory of Security Core component (if installed).

Commits
-------

31d7a09bf5 Add support for translator paths and twig paths in translation commands
2019-02-13 08:43:59 +01:00
Fabien Potencier
3b8893fd92 fixed typo 2019-02-13 08:40:41 +01:00
Fabien Potencier
3be75ccf82 minor #30220 [Validator] added missing translation for UK validator (Andrii Boiko)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] added missing translation for UK validator

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

Commits
-------

387295e6a4 [Validator] added missing translation for UK validator
2019-02-13 08:38:34 +01:00
Fabien Potencier
1873f32a80 backported a translation 2019-02-13 08:37:30 +01:00
Fabien Potencier
21b8efc44c fixed typo 2019-02-13 08:36:40 +01:00
Fabien Potencier
b951a0fce4 feature #28477 [Validator] Add new json Validator (zairigimad)
This PR was squashed before being merged into the 4.3-dev branch (closes #28477).

Discussion
----------

[Validator] Add new json Validator

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

Hi,

in so many cases we want to test if a value is a valid json or not, so I propose this new ~~NotJson~~  `Json` constraint for this need.

cordially,

Commits
-------

131febc7be [Validator] Add new json Validator
2019-02-13 08:35:29 +01:00
zairig imad
131febc7be [Validator] Add new json Validator 2019-02-13 08:35:16 +01:00
Andrii Boiko
387295e6a4 [Validator] added missing translation for UK validator 2019-02-13 09:30:52 +02:00
Fabien Potencier
fd7875726b feature #30126 [Form] forward valid numeric values to transform() (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] forward valid numeric values to transform()

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

Commits
-------

3be0d35b17 forward valid numeric values to transform()
2019-02-13 08:28:22 +01:00
Fabien Potencier
09275d4e27 feature #28635 [Form] Add label_translation_parameters, help_translation_parameters and attr_translation_parameters options to base form type (webnet-fr)
This PR was squashed before being merged into the 4.3-dev branch (closes #28635).

Discussion
----------

[Form] Add label_translation_parameters, help_translation_parameters and attr_translation_parameters options to base form type

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes. Travis-ci isn't green because it tests the components separately. Fabbot.io requires license headers in files where they were not present before.
| Fixed tickets | #27698
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/10065

Hi, this is an alternative to #27775.

`translation_parameters` is separated to `label_translation_parameters`, `help_translation_parameters`, `attr_translation_parameters`.

Commits
-------

b3f3c5361f [Form] Add label_translation_parameters, help_translation_parameters and attr_translation_parameters options to base form type
2019-02-13 08:24:11 +01:00
Webnet team
b3f3c5361f [Form] Add label_translation_parameters, help_translation_parameters and attr_translation_parameters options to base form type 2019-02-13 08:24:03 +01:00
Fabien Potencier
12a01a26c9 feature #29767 Nullable environment variable processor (bpolaszek)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Nullable environment variable 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        | todo

Hey there,

Because environment variables are strings by design, empty environment variables are evaluated to `""` by default.
In the same way, `MY_ENV_VAR=null` will be evaluated to `"null"`, as a string.

What I suggest is to allow some environment variables to be evaluated to `null` (the real one) when their strings are _blank_ or equal _null_, _Null_ or _NULL_.

This can be easily done through a new `nullable` processor:

```bash
# .env
API_KEY=
```

```yaml
# config/services.yaml
services:
    FooService:
        arguments:
            $apiKey: %env(nullable:API_KEY)%
```
```php
# src/Services/FooService
namespace App\Services;

final class FooService
{
    /**
     * @var string|null
     */
    private $apiKey;

    /**
     * FooService constructor.
     */
    public function __construct(?string $apiKey)
    {
        $this->apiKey = $apiKey;
    }

    public function doSomething()
    {
        // Free plan
        if (null === $this->apiKey) {
            // ...
        }
    }

}
```
That's an example that comes to my mind but there can be many others.
This can also help in using null coalesce operators in constructors instead of checking if a string equals `""` (which is very PHP4 style).

Of course it can be used in conjunction with other types, i.e. `%env(float:nullable:SOME_OPTIONAL_FLOAT_ENV_VAR)%`.

What do you think?

Commits
-------

3a604ac392 Nullable environment variable processor
2019-02-13 08:12:17 +01:00
Fabien Potencier
491e87a1c4 minor #30219 Validator: add the Persian translations (behnoushnorouzi)
This PR was merged into the 3.4 branch.

Discussion
----------

Validator: add the Persian translations

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

Add the missing translations for the Persian (fa) validator.

Commits
-------

32306d8795 Validator: add the Persian translations
2019-02-13 08:09:37 +01:00
Behnoush
32306d8795 Validator: add the Persian translations 2019-02-12 22:50:28 +01:00
Faton
62b226e78e
Update validators.sq.xlf
#30187 Added the missing translations for the Albanian language
2019-02-12 22:10:37 +01:00
Fabien Potencier
3c2dc44af6 Merge branch '4.2'
* 4.2: (25 commits)
  Add missing ID_id validators translation
  fixed CS
  Added missing translations in validators.tr.xlf
  Update validators.es.xlf
  Update validators.hu.xlf
  [Validator] Add the missing translations for the Welsh (cy) locale
  [Validator] Add missing DE validator translations
  [Validator] Add the missing translations for the Dutch (nl) locale
  Add missing PL translation
  Add missing translations.
  Add missing translations for IT to Validator
  minor #30184 [Validator] Add the missing translations for the Russian (ru) locale (antonch1989)
  [Validator] Add the missing translations for the Arabic (ar) locale
  add_missing_translations_for_portuguese : [Validator] Add the missing translations for the Portuguese ("pt") locale
  [Validator] Add the missing translations for the French (fr) locale
  [Validator] Add some missing contents to the English translation
  use PropertyAccessorInterface instead of PropertyAccessor
  Fix KernelTestCase compatibility for PhpUnit 8 (bis)
  add xabbuh as code owner of the Form component
  [Validator] Added a missing translation
  ...
2019-02-12 21:07:40 +01:00
Fabien Potencier
c9c0d45d11 fixed CS 2019-02-12 21:06:43 +01:00
Fabien Potencier
1614a52b28 Merge branch '3.4' into 4.2
* 3.4: (25 commits)
  Add missing ID_id validators translation
  fixed CS
  Added missing translations in validators.tr.xlf
  Update validators.es.xlf
  Update validators.hu.xlf
  [Validator] Add the missing translations for the Welsh (cy) locale
  [Validator] Add missing DE validator translations
  [Validator] Add the missing translations for the Dutch (nl) locale
  Add missing PL translation
  Add missing translations.
  Add missing translations for IT to Validator
  minor #30184 [Validator] Add the missing translations for the Russian (ru) locale (antonch1989)
  [Validator] Add the missing translations for the Arabic (ar) locale
  add_missing_translations_for_portuguese : [Validator] Add the missing translations for the Portuguese ("pt") locale
  [Validator] Add the missing translations for the French (fr) locale
  [Validator] Add some missing contents to the English translation
  use PropertyAccessorInterface instead of PropertyAccessor
  Fix KernelTestCase compatibility for PhpUnit 8 (bis)
  add xabbuh as code owner of the Form component
  [Validator] Added a missing translation
  ...
2019-02-12 21:06:11 +01:00
Fabien Potencier
a9353c2977 minor #30216 [Validator] Add the missing translations for the Dutch (nl) locale (reyostallenberg)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add the missing translations for the Dutch (nl) locale

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

This PR addresses the issue #30177, adding the missing translations for the Dutch (nl) locale.

Commits
-------

02662384c3 [Validator] Add the missing translations for the Dutch (nl) locale
2019-02-12 21:00:30 +01:00
Fabien Potencier
bc7ff55bf3 minor #30207 [Validator] Add the missing translations for the Russian (ru) locale (Anton Chernikov)
This PR was merged into the 3.4 branch.

Discussion
----------

 [Validator] Add the missing translations for the Russian (ru) locale

… (ru) locale (antonch1989)

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

Added missing ru translations for the validator component

Commits
-------

8d84cf916b minor #30184 [Validator] Add the missing translations for the Russian (ru) locale (antonch1989)
2019-02-12 20:58:53 +01:00
Fabien Potencier
82af8e7df4 minor #30157 [Validator] Add some missing contents to the English translation (javiereguiluz)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add some missing contents to the English translation

| 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 | -
| License       | MIT
| Doc PR        | -

To simplify things, translated files contains all the keys of the English file in `master` branch. That's why our translations in 3.4 branch contain the key `id = 85` even if that is not used in 3.4 branch.

I propose to also include that unused key in the English file to make it easier to keep things in sync.

Commits
-------

ce4ff50b41 [Validator] Add some missing contents to the English translation
2019-02-12 20:57:31 +01:00
Fabien Potencier
7548f9ce2b minor #30204 Add missing ID_id validators translation (ikhsan017)
This PR was squashed before being merged into the 3.4 branch (closes #30204).

Discussion
----------

Add missing ID_id validators translation

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

Add the missing translations for the Indonesian ("id") locale

Commits
-------

b645024f5d Add missing ID_id validators translation
2019-02-12 20:55:48 +01:00
Ikhsan Agustian
b645024f5d Add missing ID_id validators translation 2019-02-12 20:55:42 +01:00
Fabien Potencier
1885eac26a fixed CS 2019-02-12 20:54:51 +01:00
Fabien Potencier
6e269cf1be minor #30203 Added missing translations in validators.tr.xlf (mertingen)
This PR was squashed before being merged into the 3.4 branch (closes #30203).

Discussion
----------

Added missing translations in validators.tr.xlf

I referred the same tone and style in the new translations. I did not touch the abbreviation name such as IBAN or BIC. Because they have no counterparts.

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

48f1189879 Added missing translations in validators.tr.xlf
2019-02-12 20:53:59 +01:00
mertingen
48f1189879 Added missing translations in validators.tr.xlf 2019-02-12 20:53:50 +01:00
Fabien Potencier
59617eebc9 minor #30198 Update validators.es.xlf (davidpv)
This PR was squashed before being merged into the 3.4 branch (closes #30198).

Discussion
----------

Update validators.es.xlf

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

3197a5ff29 Update validators.es.xlf
2019-02-12 20:51:46 +01:00
David Perez Vicens
3197a5ff29 Update validators.es.xlf 2019-02-12 20:51:39 +01:00
Fabien Potencier
de2301b6c3 minor #30200 Update validators.hu.xlf (connorhu)
This PR was squashed before being merged into the 3.4 branch (closes #30200).

Discussion
----------

Update validators.hu.xlf

Translating message of DivisibleBy constraint.

| Q             | A
| ------------- | ---
| Branch?       | master for features / 3.4 up to 4.2 for bug fixes
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30168
| License       | MIT

Commits
-------

4ab3af0036 Update validators.hu.xlf
2019-02-12 20:50:30 +01:00
Karoly Gossler
4ab3af0036 Update validators.hu.xlf 2019-02-12 20:50:23 +01:00
Fabien Potencier
b799c95fe9 minor #30208 [Validator] Add the missing translations for the Welsh (cy) locale (houdmont)
This PR was squashed before being merged into the 3.4 branch (closes #30208).

Discussion
----------

[Validator] Add the missing translations for the Welsh (cy) locale

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

Addresses the missing translations listed in #30154

Commits
-------

8f701ce4e5 [Validator] Add the missing translations for the Welsh (cy) locale
2019-02-12 20:48:57 +01:00
Tom Houdmont
8f701ce4e5 [Validator] Add the missing translations for the Welsh (cy) locale 2019-02-12 20:48:45 +01:00
Fabien Potencier
0af5bd17ab minor #30205 [Validator] Add the missing translations for the Arabic (ar) locale (PhyDevs)
This PR was merged into the 3.4 branch.

Discussion
----------

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

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

This PR addresses the issue #30149, adding the missing translations.

Commits
-------

21b5a27507 [Validator] Add the missing translations for the Arabic (ar) locale
2019-02-12 20:46:34 +01:00
Fabien Potencier
4974e0e7ac minor #30202 [Validator] Add missing DE validator translations (janvt)
This PR was squashed before being merged into the 3.4 branch (closes #30202).

Discussion
----------

[Validator] Add missing DE validator translations

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

Updated the validator translation file with the missing German (DE) translations.

Commits
-------

c489cc8b33 [Validator] Add missing DE validator translations
2019-02-12 20:45:42 +01:00
janvt
c489cc8b33 [Validator] Add missing DE validator translations 2019-02-12 20:45:35 +01:00
Fabien Potencier
558032b257 minor #30210 [Validator] Add the missing translations for the Galician (gl) locale (Lutacon)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add the missing translations for the Galician (gl) locale

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

Add the missing Galician translations.

Commits
-------

d7bcdddda7 Add missing translations.
2019-02-12 20:43:45 +01:00
Fabien Potencier
2382670c01 minor #30209 [Validator] Add missing translations for IT to Validator (Andrea Giannantonio)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add missing translations for IT to Validator

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| 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 | #30171   <!-- #-prefixed issue number(s), if any -->
| License       | MIT

I add missing translations for IT to Validator going to solve the following issue: #30171

Commits
-------

40903335fd Add missing translations for IT to Validator
2019-02-12 20:41:57 +01:00
Reyo Stallenberg
02662384c3 [Validator] Add the missing translations for the Dutch (nl) locale 2019-02-12 20:38:21 +01:00
Dominik Hajduk
763f8dfeb3
Add missing PL translation 2019-02-12 20:12:42 +01:00
Luis Tacon
d7bcdddda7 Add missing translations. 2019-02-12 17:55:32 +01:00
Andrea Giannantonio
40903335fd Add missing translations for IT to Validator 2019-02-12 17:19:32 +01:00
Anton Chernikov
8d84cf916b minor #30184 [Validator] Add the missing translations for the Russian (ru) locale (antonch1989) 2019-02-12 18:05:36 +03:00
phydevs
21b5a27507
[Validator] Add the missing translations for the Arabic (ar) locale 2019-02-12 15:13:13 +01:00
Fabien Potencier
f2370eb570 minor #30201 [Validator] Add the missing translations for the Portuguese ("pt") locale (pedroresende)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add the missing translations for the Portuguese ("pt") locale

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

This PR addresses the issue https://github.com/symfony/symfony/issues/30181, adding the missing translations.

Commits
-------

95795dc8cd add_missing_translations_for_portuguese : [Validator] Add the missing translations for the Portuguese ("pt") locale
2019-02-12 13:46:20 +01:00
Pedro Resende
95795dc8cd add_missing_translations_for_portuguese : [Validator] Add the missing translations for the Portuguese ("pt") locale 2019-02-12 12:09:26 +00:00
Martin
9a86504fc1 [Validator] Add the missing translations for the French (fr) locale 2019-02-12 12:07:44 +01:00
Javier Eguiluz
ce4ff50b41
[Validator] Add some missing contents to the English translation 2019-02-12 11:07:29 +01:00
Fabien Potencier
b9b8f9da98 minor #30001 [FrameworkBundle] consolidate the mime types service definition (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] consolidate the mime types service definition

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

I wonder if we couldn't simplify things by just initializing the default `MimeTypes` instance once the first one is going to be created.

Commits
-------

ce546f5e5b consolidate the mime types service definition
2019-02-12 08:31:46 +01:00