Commit Graph

15934 Commits

Author SHA1 Message Date
Fabien Potencier 7bd0873550 updated CHANGELOG for 2.3.15 2014-05-22 19:23:43 +02:00
Fabien Potencier 57a64a0fa6 Revert "bug #10908 [HttpFoundation] implement session locking for PDO (Tobion)"
This reverts commit 8c71454f47, reversing
changes made to 735e9a4768.
2014-05-22 18:20:26 +02:00
Fabien Potencier 08bc4d9203 bumped Symfony version to 2.3.15 2014-05-22 18:18:05 +02:00
Fabien Potencier a037f31de8 updated VERSION for 2.3.14 2014-05-22 16:27:03 +02:00
Fabien Potencier 5a66baf22c update CONTRIBUTORS for 2.3.14 2014-05-22 16:26:40 +02:00
Fabien Potencier 2ee1df31cd updated CHANGELOG for 2.3.14 2014-05-22 16:26:18 +02:00
Fabien Potencier 2723e44797 bug #10849 [WIP][Finder] Fix wrong implementation on sortable callback comparator (ProPheT777)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10849).

Discussion
----------

[WIP][Finder] Fix wrong implementation on sortable callback comparator

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

Working on this issue, i find SORT_BY_ACCESSED_TIME, SORT_BY_CHANGED_TIME, SORT_BY_MODIFIED_TIME was not tested.

- [x] Add test for SORT_BY_ACCESSED_TIME case
- [x] Add test for SORT_BY_CHANGED_TIME case
- [x] add test for SORT_BY_MODIFIED_TIME case

Commits
-------

b965fa2 [WIP][Finder] Fix wrong implementation on sortable callback comparator
2014-05-22 15:42:36 +02:00
prophet777 b965fa23a6 [WIP][Finder] Fix wrong implementation on sortable callback comparator 2014-05-22 15:42:36 +02:00
Fabien Potencier c8476ee744 bug #10929 [2.3][Process] Add validation on Process input (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Process] Add validation on Process input

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

This adds validation on Process input. For the moment, passing a stream would result in a PHP error.
I propose to deprecate values that are not strictly string in 2.6 (see upcoming PR)

Commits
-------

583092b [Process] Add validation on Process input
2014-05-22 15:40:43 +02:00
Fabien Potencier c505a639b2 minor #10956 [Validator] Fixed StaticMethodLoaderTest on systems that don't have E_STRICT enabled by default (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Fixed StaticMethodLoaderTest on systems that don't have E_STRICT enabled by default

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

Commits
-------

a470ae2 [Validator] Fixed StaticMethodLoader on systems that don't have E_STRICT enabled by default
2014-05-22 15:29:31 +02:00
Fabien Potencier be3b541608 minor #10964 ommited space in validation message (apodgorbunschih)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10964).

Discussion
----------

ommited space in validation message

Commits
-------

7d0811c ommited space
2014-05-22 14:40:41 +02:00
apodgorbunschih 7d0811cfba ommited space 2014-05-22 14:40:41 +02:00
Bernhard Schussek a470ae2bb9 [Validator] Fixed StaticMethodLoader on systems that don't have E_STRICT enabled by default 2014-05-22 10:35:37 +02:00
Fabien Potencier 95f196ff2d minor #10945 [Component][Translation][Loader] Include file path in exception message (skafandri)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10945).

Discussion
----------

[Component][Translation][Loader] Include file path in exception message

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

When Translation component tryes to load an invalid YAML file, you get

    InvalidResourceException: Error parsing YAML.
Which is not very helpful, I spent 1 hour looking for the invalid file, I think is better to include the file path in the exception message.

Commits
-------

3d576ef Include file path in exception
2014-05-21 18:08:06 +02:00
ilyes kooli 3d576eff19 Include file path in exception 2014-05-21 18:08:05 +02:00
Fabien Potencier 4eb4a6056c bug #10958 [DomCrawler] Fixed filterXPath() chaining loosing the parent DOM nodes (stof, robbertkl)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] Fixed filterXPath() chaining loosing the parent DOM nodes

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

This is a fixed version of #10207, preserving the BC for XPath queries. It is the rebased version of #10935 targetting 2.3

The example given in #10260 when reporting the regression in the previous attempt is covered by the new tests added in the first commit of the PR.
I also added many tests ensuring that the behavior is the same than in the current implementation.

Commits
-------

80438c2 Fixed the XPath filtering to have the same behavior than Symfony 2.4
711ac32 [DomCrawler] Fixed filterXPath() chaining
8f706c9 [DomCrawler] Added more tests for the XPath filtering
2014-05-21 17:44:46 +02:00
Christophe Coevoet 80438c2dd9 Fixed the XPath filtering to have the same behavior than Symfony 2.4 2014-05-21 15:39:40 +02:00
Robbert Klarenbeek 711ac32d71 [DomCrawler] Fixed filterXPath() chaining 2014-05-21 15:37:53 +02:00
Christophe Coevoet 8f706c97b9 [DomCrawler] Added more tests for the XPath filtering
This will ensure we don't introduce regressions again when fixing #10206.
2014-05-21 15:33:53 +02:00
Fabien Potencier 125b9e7347 bug #10953 [HttpKernel] fixed file uploads in functional tests without file selected (realmfoo)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10953).

Discussion
----------

[HttpKernel] fixed file uploads in functional tests without file selected

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

Commits
-------

6f56d87 [HttpKernel] fixed file uploads in functional tests when no file was selected
2014-05-21 14:41:36 +02:00
realmfoo 6f56d878c9 [HttpKernel] fixed file uploads in functional tests when no file was selected
Allow user to submit a form with no file selected.
2014-05-21 14:41:36 +02:00
Fabien Potencier 48980b0a1c minor #10955 Fixed test cases failing when the Intl extension is not installed (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

Fixed test cases failing when the Intl extension is not installed

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

I tested the 2.3 branch against PHP 5.5.12 with the following ICU versions:

* none
* 4.0
* 4.2
* 4.4
* 4.6
* 4.8
* 49
* 50
* 51
* 52
* 53

This PR contains the related fixes.

Commits
-------

fad38e8 Fixed test cases failing when the Intl extension is not installed
2014-05-21 14:04:16 +02:00
Bernhard Schussek fad38e82f4 Fixed test cases failing when the Intl extension is not installed 2014-05-21 13:33:13 +02:00
Fabien Potencier 8850274234 minor #10950 Fixed the Travis build to avoid exiting too early (stof)
This PR was squashed before being merged into the 2.3 branch (closes #10950).

Discussion
----------

Fixed the Travis build to avoid exiting too early

currently, failed tests on Travis are exiting the build too early, avoiding to run some tests and maybe even loosing some output. See https://github.com/travis-ci/travis-ci/issues/2346 for more details

Commits
-------

2e64fb1 Fixed the Travis build to avoid exiting too early
2014-05-21 03:09:37 +02:00
Christophe Coevoet 2e64fb1db3 Fixed the Travis build to avoid exiting too early 2014-05-21 03:09:34 +02:00
Fabien Potencier 11816c5e51 fixed CS 2014-05-18 17:36:43 +02:00
Fabien Potencier 7dc8931969 bug #10937 [HttpKernel] Fix "absolute path" when we look to the cache directory (BenoitLeveque)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10937).

Discussion
----------

[HttpKernel] Fix "absolute path" when we look to the cache directory

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

We should get ``__DIR__`` instead of ``__DIR__ . '/.'``

I've seen this issue when trying to play with the symfony standard new directory structure

Commits
-------

4735e56 Fix "absolute path" when we look to the cache directory
2014-05-18 17:35:30 +02:00
Benoît Lévêque 4735e56c44 Fix "absolute path" when we look to the cache directory
We should get __DIR__ instead of __DIR__ . '/.'
2014-05-18 17:35:30 +02:00
Romain Neutron 583092b6da [Process] Add validation on Process input 2014-05-17 23:49:26 +02:00
Fabien Potencier 309046a207 minor #10928 [DomCrawler] Fixed the coding standards to use strict comparisons (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] Fixed the coding standards to use strict comparisons

| 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

Many places in DomCrawler are using loose comparison instead of strict comparison. I saw them while checking the whole component for DOMNode vs DOMElement usage whe working on #10927. However, I submitted this change to 2.3 instead, to ease merging between branches (applying the change only in master would likely create conflicts regularly when merging changes in DomCrawler between branches later)

Commits
-------

77b446c [DomCrawler] Fixed the coding standards to use strict comparisons
2014-05-17 18:25:57 +02:00
Fabien Potencier 8c71454f47 bug #10908 [HttpFoundation] implement session locking for PDO (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] implement session locking for PDO

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

This is probably the first Session Handler for databases that actually works with locking. I've seen many implementations of session handlers (mostly only for one database vendor) while researching and none used locking. Not even the [PHPs SQLite session handler](https://github.com/php/php-src/blob/PHP-5.3/ext/sqlite/sess_sqlite.c) or [PECL Postgres Handler](http://svn.php.net/viewvc/pecl/session_pgsql/trunk/session_pgsql.c?revision=326806&view=markup) implemented locking  correctly which is probably the reason why they have been discontinued. [Zend Session](https://github.com/zendframework/zf2/blob/master/library/Zend/Session/SaveHandler/DbTableGateway.php) seems not to use locking either. But it saves the lifetime together with the session which seems like a good idea because you could have different lifetimes for different sessions.

- Implements session locking for MySQL, Postgres, Oracle, SQL Server and SQLite.
Only tested it for MySQL. So would be good if someone can confirm it works as intended on the other databases as well.
- Also removed the custom RuntimeException which is not useful and a PDOException extends RuntimeException anyway, so no BC break.
- I added a default for the table name to be in line with the DoctrineSessionHandler.
- Check session.gc_maxlifetime in read(). Imagine we have only ever one user on an app. If maxlifetime is not checked in read, his session would never expire! What I don't get is why PHP calls gc() after read() instead of calling it before... Strange decision. For this reason I also had to do the following to improve performance.
- I delay gc() to close() so that it is executed outside the transactional and blocking read-write process. This way, pruning expired sessions does not block them from being started while the current session is used.
- Fixed time update for Oracle and SQL Server.

Commits
-------

50ec828 [HttpFoundation] implement session locking for PDO
2014-05-17 18:24:28 +02:00
Tobias Schultze 50ec828642 [HttpFoundation] implement session locking for PDO 2014-05-17 17:01:15 +02:00
Christophe Coevoet 77b446c904 [DomCrawler] Fixed the coding standards to use strict comparisons 2014-05-17 15:36:43 +02:00
Fabien Potencier 735e9a4768 bug #10894 [HttpKernel] removed absolute paths from the generated container (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] removed absolute paths from the generated container

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | first step to resolve #6484, #3079, and #9238
| License       | MIT
| Doc PR        | n/a

This PR converts absolute paths to relative ones in the dumped container. The code is a bit "ugly", but it gets the job done and I'm not sure that there is a more elegant way without breaking everything.

Commits
-------

c1450b4 [HttpKernel] removed absolute paths from the generated container
2014-05-17 15:25:10 +02:00
Fabien Potencier c1450b465c [HttpKernel] removed absolute paths from the generated container 2014-05-17 14:44:20 +02:00
Fabien Potencier 5c91dc1a3a bug #10926 [DomCrawler] Fixed the initial state for options without value attribute (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] Fixed the initial state for options without value attribute

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

Commits
-------

78cff96 [DomCrawler] Fixed the initial state for options without value attribute
2014-05-17 13:54:50 +02:00
Fabien Potencier e4a28dd420 bug #10925 [DomCrawler] Fixed the handling of boolean attributes in ChoiceFormField (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] Fixed the handling of boolean attributes in ChoiceFormField

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

An option is marked as selected by the presence of the selected attribute, not by the presence of a non-empty selected attribute. The same is true for checked radio buttons or checkboxes.

Commits
-------

b505708 Fixed the handling of boolean attributes in ChoiceFormField
2014-05-17 13:53:12 +02:00
Christophe Coevoet 78cff96230 [DomCrawler] Fixed the initial state for options without value attribute 2014-05-17 12:51:37 +02:00
Christophe Coevoet b505708ddd Fixed the handling of boolean attributes in ChoiceFormField
An option is marked as selected by the presence of the selected attribute,
not by the presence of a non-empty selected attribute. The same is true
for checked radio buttons or checkboxes.
2014-05-17 12:38:54 +02:00
Fabien Potencier 0762bae059 bug #10777 [Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed (tucksaun)
This PR was squashed before being merged into the 2.3 branch (closes #10777).

Discussion
----------

[Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed

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

Same issue as #9976 and #10203: when you add a `time` field to a form with options `single_text` (so HTML5) and `with_seconds`, the generated input does not contain the `step` attribute, therefore the browser does not show them, leading to an error at the submit because of an invalid format.

Compared to #9976/#10203:
* Unit testable
* Available directly in the component
* Available in other templating format than twig
* Still able to customise the step attribute by hand

Commits
-------

a379298 [Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed
2014-05-16 13:54:17 +02:00
Tugdual Saunier a379298db9 [Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed 2014-05-16 13:54:15 +02:00
Fabien Potencier 912a72f555 bug #10909 [PropertyAccess] Fixed plurals for -ves words (csarrazi)
This PR was merged into the 2.3 branch.

Discussion
----------

[PropertyAccess] Fixed plurals for -ves words

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

Fixes singularization for words like caves (cave), staves (staff).

Commits
-------

c7a77c5 Fixed incorrect regular plural for -ves words
2014-05-16 12:09:36 +02:00
Charles Sarrazin c7a77c55b7 Fixed incorrect regular plural for -ves words
Fixes singularization for words like caves (cave), staves (staff).
2014-05-16 11:27:00 +02:00
Fabien Potencier 6207389a6d bug #10899 Explicitly define the encoding. (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

Explicitly define the encoding.

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

Credits for discovering it go to @nicolas-grekas. Cheers!

Travis for PHP 5.6 cannot be enabled yet as there's one more test failing.

re #10714 #10714

Commits
-------

619ff58 Explicitly define the encoding.
2014-05-14 15:50:58 +02:00
Jakub Zalas 619ff5818f Explicitly define the encoding. 2014-05-14 14:35:53 +01:00
Fabien Potencier 7b93db5ba8 bug #10897 [Console] Fix a console test (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] Fix a console test

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

re #10714

Every wide character in the fixture file is actually 3 ansi-characters long.

Commits
-------

61108b9 Disable 5.6 until it is stable again.
8cadb49 Update the fixtures.
2014-05-14 08:44:39 +02:00
Jakub Zalas 61108b9185 Disable 5.6 until it is stable again. 2014-05-13 22:34:13 +01:00
Fabien Potencier a44945a306 bug #10896 [HttpKernel] Fixed cache behavior when TTL has expired and a default "global" TTL is defined (alquerci, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Fixed cache behavior when TTL has expired and a default "global" TTL is defined

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

From #9919:

"When the cache is stale the `validate` method `forward` the request to the backend. A new response will be created with or without TTL configuration. If the TTL was not set then the default one should be set like in the `fetch` method."

This PR fixes this issue, the tests provided in #9919 pass, and I've tweaked them to avoid the costly sleep calls.

Commits
-------

e3983e8 [HttpKernel] fixed default TTL not applied under certain conditions
bc42dae Added test when TTL has expired
2014-05-13 17:22:15 +02:00
Jakub Zalas 8cadb49613 Update the fixtures. 2014-05-13 14:44:05 +01:00
Fabien Potencier 46725c9cc8 fixed CS 2014-05-13 10:47:23 +02:00