Commit Graph

15740 Commits

Author SHA1 Message Date
Fabien Potencier 8aa194c0a6 minor #10601 [HttpKernel] HttpCache typo (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] HttpCache typo

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

Commits
-------

8882dad Remove an unused argument.
2014-04-01 08:01:53 +02:00
Jakub Zalas 8882dad46e Remove an unused argument. 2014-03-31 22:49:46 +01:00
Fabien Potencier b094ea7fe2 bug #10586 Fixes URL validator to accept single part urls (merk)
This PR was merged into the 2.3 branch.

Discussion
----------

Fixes URL validator to accept single part urls

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

This PR replaces #6817 and has been rebased for 2.3, making a change to the regex to be simpler for single dot matches. (changing `([\pL\pN\pS-\.])+([\.]{0,1}[\pL]+[\.]{0,1})` to `([\pL\pN\pS-\.])+(\.?[\pL]+\.?)`)

Commits
-------

91e226e Fixes URL validator to accept single part urls
2014-03-31 13:10:34 +02:00
Fabien Potencier 3e678e7923 minor #10590 [2.3] Use `Filesystem::chmod` instead of `chmod` when dumping file (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Use `Filesystem::chmod` instead of `chmod` when dumping file

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

This adds consistency as discussed in ca5eea5c19 (commitcomment-5804089)

Commits
-------

c2ffefd Use `Filesystem::chmod` instead of `chmod` when dumping file
2014-03-31 13:09:33 +02:00
Fabien Potencier 0a6a1c44c0 bug #10591 [Form] Buttons are now disabled if their containing form is disabled (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Buttons are now disabled if their containing form is disabled

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

Commits
-------

ebfee72 [Form] Added test for disabling buttons
6bb355e [Form] Added check for parent disabled status in Button form elements
2014-03-31 12:57:57 +02:00
Romain Neutron c2ffefd0ef Use `Filesystem::chmod` instead of `chmod` when dumping file
This adds consistency as discussed in ca5eea5c19 (commitcomment-5804089)
2014-03-31 12:15:50 +02:00
Bernhard Schussek ebfee723c9 [Form] Added test for disabling buttons 2014-03-31 11:59:54 +02:00
Adrià López Lozano 6bb355e2fd [Form] Added check for parent disabled status in Button form elements
The Button form element did not check for the parent disabled configuration status,
making them behave differently to all other form widgets.
2014-03-31 11:59:54 +02:00
Tim Nagel 91e226e06e Fixes URL validator to accept single part urls 2014-03-31 10:23:29 +11:00
Fabien Potencier c778b030a9 minor #10578 tweaked Travis configuration to get more tests running (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

tweaked Travis configuration to get more tests running

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

This allows test for APC and tests for the French locales to be actually executed (they are currently skipped.)

Commits
-------

89742b0 tweaked Travis configuration to get more tests running
2014-03-30 09:39:38 +02:00
Fabien Potencier 89742b0275 tweaked Travis configuration to get more tests running 2014-03-30 09:39:38 +02:00
Fabien Potencier 78e52ae517 bug #10579 HHVM fixes (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

HHVM fixes

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

Fixes support for HHVM in the Process component and upgraded PHPUnit to version 4 for the same reason.

Commits
-------

9e6af95 fixed float comparison in unit tests for HHVM
73189b1 upgraded PHPUnit to version 4 for better HHVM support
8fbea0f [Process] fixed HHVM usage on the CLI
2014-03-30 09:33:31 +02:00
Fabien Potencier 9e6af955f5 fixed float comparison in unit tests for HHVM 2014-03-30 09:33:31 +02:00
Fabien Potencier 73189b1774 upgraded PHPUnit to version 4 for better HHVM support 2014-03-30 09:33:31 +02:00
Fabien Potencier 8fbea0fe4d [Process] fixed HHVM usage on the CLI 2014-03-30 09:33:30 +02:00
Fabien Potencier 9f25978643 minor #10577 [ClassLoader] Fix class names in ApcUniversalClassLoader tests. (idn2104)
This PR was merged into the 2.3 branch.

Discussion
----------

[ClassLoader] Fix class names in ApcUniversalClassLoader tests.

[ClassLoader] These tests were failing due to a leading slash in the class name. Support for the leading slash in findFile was removed a while ago, but the Apc tests were not updated. See #10576 for more details.

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

Commits
-------

dc0f8f9 Fix class names in ApcUniversalClassLoader tests.
2014-03-29 07:58:16 +01:00
Ioan Negulescu dc0f8f9df8 Fix class names in ApcUniversalClassLoader tests. 2014-03-29 07:58:16 +01:00
Fabien Potencier 73f6c16163 bug #10564 fixed the profiler when an uncalled listener throws an exception when instantiated (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

fixed the profiler when an uncalled listener throws an exception when instantiated

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

When the profiler gets the uncalled listeners, the current page is broken without a very clear message. That happens when a listener is a service that depends for instance on the request; creating this service throws an exception.

After this patch, if we cannot get the listeners, we give up and add a log message about the problem (the error message is an info as the problem is not really related to the toolbar but more about how things work).

Commits
-------

79540d4 fixed the profiler when an uncalled listener throws an exception when instantiated
2014-03-28 12:42:50 +01:00
Fabien Potencier 79540d4b6e fixed the profiler when an uncalled listener throws an exception when instantiated 2014-03-28 12:42:49 +01:00
Fabien Potencier 8a19b9ac08 fixed CS 2014-03-28 11:34:27 +01:00
Fabien Potencier e2b82d36cb bug #10568 [Form] Fixed hashing of choice lists containing non-UTF-8 characters (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Fixed hashing of choice lists containing non-UTF-8 characters

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

Commits
-------

18dc9a7 Added test case for 4c6a2d15095c13b2a35751b2b2712b183be489c4
73d56f7 Fixed bug in ChoiceType triggering a warning when not using utf-8
2014-03-28 11:31:34 +01:00
Bernhard Schussek 18dc9a7f5f Added test case for 4c6a2d15095c13b2a35751b2b2712b183be489c4 2014-03-28 11:31:34 +01:00
Koen Kuipers 73d56f7a1a Fixed bug in ChoiceType triggering a warning when not using utf-8
This fixes issue #10409 by not using json_encode anymore, but serialize
instead.
2014-03-28 11:31:34 +01:00
Fabien Potencier f4ffd95713 fixed CS 2014-03-27 19:14:33 +01:00
Fabien Potencier 128ca44437 bug #10536 Avoid levenshtein comparison when using ContainerBuilder. (catch56)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10536).

Discussion
----------

Avoid levenshtein comparison when using ContainerBuilder.

[DependencyInjection] ContainerBuilder catches exceptions when a service isn't found by Container::get().

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

In the process of building the exception message, I saw over 13k calls to levenshtein() when profiling a Drupal request where there's no compiled container yet, this adds around 36ms+ to the request for the function calls themselves, more for the overall logic.

Made the levenshtein calls optional based on a property on the class, then ContainerBuilder can set that to false and skip the suggestions.

![lev-before](https://f.cloud.github.com/assets/116285/2525110/d6dd3a90-b4eb-11e3-934a-a3726e0f8f09.png)
![lev-after](https://f.cloud.github.com/assets/116285/2525114/dd2de0fc-b4eb-11e3-8df0-598cadf2286b.png)

Commits
-------

cc9cc37 Avoid levenshtein comparison when using ContainerBuilder.
2014-03-27 19:13:32 +01:00
catch cc9cc37e79 Avoid levenshtein comparison when using ContainerBuilder. 2014-03-27 19:13:32 +01:00
Fabien Potencier ea4b8bf993 minor #10558 [DependencyInjection] added missing unit test (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] added missing unit test

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

Added a unit test to ensure that #10536 won't break BC.

Commits
-------

47d1592 added missing unit test
2014-03-27 15:52:08 +01:00
Fabien Potencier 47d1592b56 added missing unit test 2014-03-27 15:52:07 +01:00
Fabien Potencier 0380d1456a bug #10549 Fixed server values in BrowserKit (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

Fixed server values in BrowserKit

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9527, #9762, #9821, #9901
| License       | MIT
| Doc PR        | n/a

Commits
-------

65b9810 fixed too greedy replacements
d9cf28d fixed protocol-relative URLs
289da16 added override power to server parameters provided on request method
2014-03-27 10:14:18 +01:00
Fabien Potencier 65b98102d1 fixed too greedy replacements 2014-03-27 10:14:18 +01:00
Fabien Potencier d9cf28d016 fixed protocol-relative URLs 2014-03-27 10:14:18 +01:00
Luis Cordova 289da16681 added override power to server parameters provided on request method 2014-03-27 10:14:17 +01:00
Fabien Potencier 9068875a5e bug #10540 [HttpKernel] made parsing controllers more robust (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] made parsing controllers more robust

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

Under some circumstances (like passing an object without an __invoke method), the Controller resolver would lead to a PHP fatal. This PR fixes that, improved error messages, and refactored the unit tests.

Commits
-------

6dba229 made parsing controllers more robust
2014-03-27 08:52:42 +01:00
Fabien Potencier 6dba2296f1 made parsing controllers more robust 2014-03-27 08:52:42 +01:00
Fabien Potencier e4ff8ae22f bug #10545 [DependencyInjection] Fixed YamlFileLoader imports path (jrnickell)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Fixed YamlFileLoader imports path

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10516
| License       | MIT
| Doc PR        | http://symfony.com/doc/current/book/service_container.html#importing-configuration-with-imports

YamlFileLoader used the resource name as the current directory during import, which can cause a failed import when using a relative path. Using the $path variable output from the locator is consistent with other loaders and fixes the bug.

Commits
-------

fd1d48b Fixed YamlFileLoader imports path
2014-03-27 08:28:37 +01:00
John Nickell fd1d48b54f Fixed YamlFileLoader imports path
YamlFileLoader used the resource name as the current directory during import, which can cause a failed import when using a relative path. Using the $path variable output from the locator is consistent with other loaders and fixes the bug.
2014-03-27 08:28:37 +01:00
Fabien Potencier 58f5f4afb4 bug #10523 [Debug] Check headers sent before sending PHP response (GromNaN)
This PR was merged into the 2.3 branch.

Discussion
----------

[Debug] Check headers sent before sending PHP response

If the response contents has been sent before an error occurs, PHP triggers the warning "Cannot modify header information - headers already sent".

This change ensure that the useful error message is echoed, while it's impossible to change the HTTP status code and headers.

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

Commits
-------

97591c1 Check headers sent before sending PHP response
2014-03-26 19:06:50 +01:00
Jerome TAMARELLE 97591c1b30 Check headers sent before sending PHP response
If the response contents has been sent before an error occurs, PHP
triggers the warning "Cannot modify header information - headers already sent"

This change ensure that the error message is echoed, while it's impossible
to change the HTTP status code and headers.
2014-03-26 19:06:50 +01:00
Fabien Potencier 26d4db3e8b bug #10275 [Validator] Fixed ACE domain checks on UrlValidator (#10031) (aeoris)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Fixed ACE domain checks on UrlValidator (#10031)

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

I added some checks to allow internationalised domain names as per reported on #10031 and some extra testcases to cover ACE domain names.

Commits
-------

7a2f154 Fixed ACE domain checks on UrlValidator (#10031)
2014-03-26 18:48:23 +01:00
Diego Agulló 7a2f154533 Fixed ACE domain checks on UrlValidator (#10031) 2014-03-26 18:48:23 +01:00
Fabien Potencier 22caebcd8e bug #10123 handle array root element (greg0ire)
This PR was submitted for the 2.4 branch but it was merged into the 2.3 branch instead (closes #10123).

Discussion
----------

handle array root element

An array to string conversion notice was thrown when the root element of the thing being validated is an array.

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

Commits
-------

17ed8bf handle array root element
2014-03-26 18:31:52 +01:00
Grégoire Paris 17ed8bf563 handle array root element
An array to string conversion notice was thrown when the root element of
the thing being validated is an array.
2014-03-26 18:31:52 +01:00
Fabien Potencier ca5eea5c19 bug #10532 Fixed regression when using Symfony on filesystems without chmod support (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

Fixed regression when using Symfony on filesystems without chmod support

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

Commits
-------

cefb67a Fix #8205 : Deprecate file mode update when calling dumpFile
2014-03-26 08:33:01 +01:00
Romain Neutron cefb67a340 Fix #8205 : Deprecate file mode update when calling dumpFile 2014-03-26 08:33:01 +01:00
Fabien Potencier 16434b5611 bug #10502 [HttpKernel] Fix #10437: Catch exceptions when reloading a no-cache request (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Fix #10437: Catch exceptions when reloading a no-cache request

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

Commits
-------

8e3a395 Fix #10437: Catch exceptions when reloading a no-cache request
2014-03-26 08:25:06 +01:00
Romain Neutron 8e3a3951e3 Fix #10437: Catch exceptions when reloading a no-cache request 2014-03-26 08:25:06 +01:00
Fabien Potencier 1a26d28581 bug #10493 [2.3] Fix libxml_use_internal_errors and libxml_disable_entity_loader usage (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Fix libxml_use_internal_errors and libxml_disable_entity_loader usage

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9731, #9483
| License       | MIT

This should fix #9731 and #9483 that seems to be triggered when `libxml_disable_entity_loader` has been called with `true` (see https://bugs.php.net/bug.php?id=62577)
As `libxml_disable_entity_loader` is non thread safe (see https://bugs.php.net/bug.php?id=64938) and as we have some calls that might leave the setting to `true`, I think the bug should be fixed.

I've checked the use of both `libxml_use_internal_errors` and `libxml_disable_entity_loader` among symfony code.

You can see I prefered to skip DomDocument::loadXML warnings using the `@` instead of using `LIBXML_NOERROR | LIBXML_NO_WARNING` because we can log these errors whereas libxml errors would be furtives.

 - [x] Check calls to DOMDocument::load
 - [x] Check calls to DOMDocument::loadXML
 - [x] Check calls to DOMDocument::loadHTML
 - [x] Check calls to DOMDocument::loadHTMLFile
 - [x] Add more tests

Commits
-------

489b8ae Fix libxml_use_internal_errors and libxml_disable_entity_loader usage
2014-03-26 08:21:50 +01:00
Romain Neutron 489b8aea90 Fix libxml_use_internal_errors and libxml_disable_entity_loader usage 2014-03-26 08:21:50 +01:00
Fabien Potencier 88f670c4f3 bug #9784 [HttpFoundation] Removed ini check to make Uploadedfile work on Google App Engine (micheleorselli)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #9784).

Discussion
----------

[HttpFoundation] Removed ini check to make Uploadedfile work on Google App Engine

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

related to #9238

Commits
-------

ecb6481 removed ini check to make uploadedfile work on gae
2014-03-25 17:54:15 +01:00
Michele Orselli ecb6481117 removed ini check to make uploadedfile work on gae 2014-03-25 17:54:15 +01:00