Commit Graph

33013 Commits

Author SHA1 Message Date
alfidinouhail
3be1850dcb Added translations for chineese language. 2019-03-05 11:00:34 +01:00
Oskar Stark
53c5f41f37 [Form] Allow to disable and customize PercentType symbol 2019-03-05 11:00:13 +01:00
Fabien Potencier
af52f6e7d8 bug #30361 [PropertyInfo] Fix undefined variable fromConstructor when passing context to getTypes (mantis, OskarStark)
This PR was merged into the 4.2 branch.

Discussion
----------

[PropertyInfo] Fix undefined variable fromConstructor when passing context to getTypes

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

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 issue described at [symfony/symfony-docs#10969](https://github.com/symfony/symfony-docs/pull/10969)

Commits
-------

8e401afa37 Allow 3rd argument to be null
04dc6921bd Remove whitespace (tab on blank line)
a0aa15a41e Update src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
c2986d5e40 Update src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
42995c859c Update src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
2d88298ace Update src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
e43a3bce11 Update ReflectionExtractorTest.php
2c91c754bc Update ReflectionExtractorTest.php
5acc85c48b Update ReflectionExtractorTest.php
d0a2dc0a2d Update ReflectionExtractorTest.php
be8d14a129 Fix undefined variable fromConstructor when passing context to getTypes
2019-03-05 10:45:59 +01:00
Fabien Potencier
c877cf8264 feature #30408 [HttpKernel] Better exception page when the invokable controller returns nothing (dimabory)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpKernel] Better exception page when the invokable controller returns nothing

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

---

__Prerequisites__
_Configure invokable controller_
```php
# config/routes.yaml
index:
    path: /
    controller: App\Controller\Start
```

__Before:__
![before](https://user-images.githubusercontent.com/11414342/53577698-ca739000-3b7e-11e9-98ac-8c8e27626fbe.png)

__After:__
![after](https://user-images.githubusercontent.com/11414342/53577733-df502380-3b7e-11e9-8377-a4a97ea73df8.png)

---

Take a look for an enhancement/refactoring in `HttpKernel.php`

Commits
-------

f6c1622fb5 [HttpKernel] Better exception page when the invokable controller returns nothing
2019-03-05 10:44:46 +01:00
Fabien Potencier
203cfc47b4 bug #30410 [Monolog] Really reset logger when calling logger::reset() (lyrixx)
This PR was merged into the 4.2 branch.

Discussion
----------

[Monolog] Really reset logger when calling logger::reset()

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

Commits
-------

08a20ee0ba [Monolog] Really reset logger when calling logger::reset()
2019-03-05 10:43:41 +01:00
Ken Stanley
9aeaea06fc Add ‘symbol’ option to PercentType 2019-03-05 09:34:20 +01:00
Dmytro
f6c1622fb5 [HttpKernel] Better exception page when the invokable controller returns nothing 2019-03-05 10:07:05 +02:00
Mantis Development
8e401afa37
Allow 3rd argument to be null 2019-03-04 22:36:58 +00:00
Mantis Development
04dc6921bd
Remove whitespace (tab on blank line) 2019-03-04 22:04:58 +00:00
Fabien Potencier
0034e14463 feature #30325 [HttpKernel] Prevent search engines from indexing dev applications (GaryPEGEOT)
This PR was squashed before being merged into the 4.3-dev branch (closes #30325).

Discussion
----------

[HttpKernel] Prevent search engines from indexing dev applications

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

Add the *X-Robots-Tag: noindex* to dev (and test) applications to prevent search engines to index them.

Commits
-------

3dd86719bf [HttpKernel] Prevent search engines from indexing dev applications
2019-03-04 21:45:15 +01:00
Gary PEGEOT
3dd86719bf [HttpKernel] Prevent search engines from indexing dev applications 2019-03-04 21:45:08 +01:00
Fabien Potencier
11f1660b93 bug #30445 [Mime] Fix generate message id with named address (Jibbarth)
This PR was squashed before being merged into the 4.3-dev branch (closes #30445).

Discussion
----------

[Mime] Fix generate message id with named address

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

When using a NamedAddress in from(), the generated MessageId don't pass the validation.
In effect, the email passed to generateMessageId look like this `Fabien <fabien@symfony.com>` and the strstr transform email in this `4641b2b294b53fe983a05b1a@symfony.com>`
By passing the address only instead of toString, it's fixed.

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

375ac9237f [Mime] Fix generate message id with named address
2019-03-04 21:36:48 +01:00
Jibé Barth
375ac9237f [Mime] Fix generate message id with named address 2019-03-04 21:36:41 +01:00
Fabien Potencier
a75dd9feb1 feature #30390 [FrameworkBundle] Fix UrlGenerator::generate to return an empty string instead of null (Emmanuel BORGES)
This PR was squashed before being merged into the 4.3-dev branch (closes #30390).

Discussion
----------

[FrameworkBundle] Fix UrlGenerator::generate to return an empty string instead of null

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

Fix #30306 : Controller::generateUrl() must be of the type string, null returned

Commits
-------

c5b1247977 [FrameworkBundle] Fix UrlGenerator::generate to return an empty string instead of null
2019-03-04 21:07:50 +01:00
Emmanuel BORGES
c5b1247977 [FrameworkBundle] Fix UrlGenerator::generate to return an empty string instead of null 2019-03-04 21:07:39 +01:00
Christian Flothmann
fff93acf92 [Mime] remove some @final annotations 2019-03-04 14:12:17 +01:00
Christian Flothmann
22ef4589a9 add back accidentally removed code 2019-03-04 13:19:55 +01:00
Nicolas Grekas
07c4a61681 Merge branch '4.2'
* 4.2:
  Fix typo
  fix required DependencyInjection component version
2019-03-04 12:48:42 +01:00
Nicolas Grekas
ed78e71c88 Merge branch '3.4' into 4.2
* 3.4:
  Fix typo
  fix required DependencyInjection component version
2019-03-04 12:47:55 +01:00
Nicolas Grekas
e03545a299 Fix typo 2019-03-04 12:46:21 +01:00
Nicolas Grekas
c360f845df minor #30438 fix required DependencyInjection component version (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

fix required DependencyInjection component 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        |

Commits
-------

ec64d8c94d fix required DependencyInjection component version
2019-03-04 12:43:52 +01:00
Christian Flothmann
ec64d8c94d fix required DependencyInjection component version 2019-03-04 12:28:05 +01:00
Fabien Potencier
de72deacc3 Merge branch '4.2'
* 4.2:
  detect annotations before blank docblock lines
  Serializer: Use the context in supports calls
2019-03-04 12:23:10 +01:00
Fabien Potencier
981550ba14 Merge branch '3.4' into 4.2
* 3.4:
  detect annotations before blank docblock lines
2019-03-04 12:23:00 +01:00
Fabien Potencier
9d791132d9 bug #30437 [Debug] detect annotations before blank docblock lines (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] detect annotations before blank docblock lines

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

This fixes the tests and a small issue after the CS changes made in df1d50dcc2 for #29920.

Commits
-------

dedd526b19 detect annotations before blank docblock lines
2019-03-04 12:21:48 +01:00
Christian Flothmann
dedd526b19 detect annotations before blank docblock lines 2019-03-04 11:54:25 +01:00
Fabien Potencier
b727f59e01 feature #30375 [Messenger] Added transport agnostic exception (nikossvnk, lolmx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Added transport agnostic exception

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

As described in #30346, client code shouldn't care about which transport is currently used by the message bus. This pr adds a new generic exception that is thrown by the `AmqpSender` if the message couldn't be delivered.

Commits
-------

7d6a3fa487 Updated changelog to document changes in AmqpReceiver
62a08eeea0 Updated exception message in AmqpSender, updated AmqpReceiver to throw new TransportException
b2b0640d80 Chain new exception with previous one
06c84040c4 forgot one backslash, my bad
93c10013fa [Messenger] Added new TransportException which is thrown if transport could not send a message
2019-03-04 11:53:27 +01:00
Nicolas Grekas
aa6a60ead6 [Contracts] bump branch alias 2019-03-04 11:50:13 +01:00
soyuka
a02ad96336
Serializer: Use the context in supports calls 2019-03-04 11:48:31 +01:00
Fabien Potencier
ba953d984f Merge branch '4.2'
* 4.2:
  moved XSD to HTTPS
  moved XSD to HTTPS
2019-03-04 11:47:02 +01:00
Fabien Potencier
129c616092 moved XSD to HTTPS 2019-03-04 11:46:52 +01:00
Fabien Potencier
a72c0ac6bd Merge branch '3.4' into 4.2
* 3.4:
  moved XSD to HTTPS
2019-03-04 11:46:38 +01:00
Fabien Potencier
e3c0878661 moved XSD to HTTPS 2019-03-04 11:46:26 +01:00
Fabien Potencier
774a89c085 moved XSD to HTTPS 2019-03-04 11:38:54 +01:00
Fabien Potencier
ecb5378c41 Merge branch '4.2'
* 4.2:
  moved XSD to HTTPS
  moved XSD to HTTPS
2019-03-04 11:38:40 +01:00
Fabien Potencier
50dc0d2550 moved XSD to HTTPS 2019-03-04 11:38:31 +01:00
Fabien Potencier
b82d3b969f Merge branch '3.4' into 4.2
* 3.4:
  moved XSD to HTTPS
2019-03-04 11:37:56 +01:00
Eric Masoero
7d6a3fa487 Updated changelog to document changes in AmqpReceiver 2019-03-04 11:14:17 +01:00
Eric Masoero
62a08eeea0 Updated exception message in AmqpSender, updated AmqpReceiver to throw new TransportException 2019-03-04 11:14:17 +01:00
Eric Masoero
b2b0640d80 Chain new exception with previous one 2019-03-04 11:14:17 +01:00
nikos.sotiropoulos
06c84040c4 forgot one backslash, my bad 2019-03-04 11:14:17 +01:00
Eric Masoero
93c10013fa [Messenger] Added new TransportException which is thrown if transport could not send a message 2019-03-04 11:14:17 +01:00
Fabien Potencier
95e90b87b6 moved XSD to HTTPS 2019-03-04 11:06:18 +01:00
Fabien Potencier
0db9b30e14 fixed typo 2019-03-04 10:25:03 +01:00
Fabien Potencier
90b68826e9 feature #29254 [FrameworkBundle] Added the condition routing option to the debug router command (soufianZantar)
This PR was squashed before being merged into the 4.3-dev branch (closes #29254).

Discussion
----------

[FrameworkBundle] Added the condition routing option to the debug router command

| Q             | A
| ------------- | ---
| Branch?       | master <!-- 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 |   <!-- #-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.
-->
This PR will add the condition routing option to debug:router command, to show if a route have conditions or not and showing this conditions.

Commits
-------

92bdc9b5f4 [FrameworkBundle] Added the condition routing option to the debug router command
2019-03-04 10:24:25 +01:00
Soufian EZ ZANTAR
92bdc9b5f4 [FrameworkBundle] Added the condition routing option to the debug router command 2019-03-04 10:21:00 +01:00
Fabien Potencier
6c4ab8942e fixed CS 2019-03-04 10:20:13 +01:00
Fabien Potencier
8b636ef18e Merge branch '4.2'
* 4.2:
  fixed CS
  Autoconfig: don't automatically tag decorators
  removed suggestion
  [PropertyAccess] Fixed PropertyPathBuilder remove that fails to reset internal indexes
  bumped Symfony version to 4.2.5
  updated VERSION for 4.2.4
  updated CHANGELOG for 4.2.4
  bumped Symfony version to 3.4.24
  updated VERSION for 3.4.23
  update CONTRIBUTORS for 3.4.23
  updated CHANGELOG for 3.4.23
  [Routing][ServiceRouterLoader] Remove an outdated comment
2019-03-04 10:16:46 +01:00
Fabien Potencier
617bd80273 Merge branch '3.4' into 4.2
* 3.4:
  fixed CS
  removed suggestion
  [PropertyAccess] Fixed PropertyPathBuilder remove that fails to reset internal indexes
  bumped Symfony version to 3.4.24
  updated VERSION for 3.4.23
  update CONTRIBUTORS for 3.4.23
  updated CHANGELOG for 3.4.23
  [Routing][ServiceRouterLoader] Remove an outdated comment
2019-03-04 10:16:25 +01:00
Fabien Potencier
df1d50dcc2 fixed CS 2019-03-04 10:11:50 +01:00
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