Commit Graph

13591 Commits

Author SHA1 Message Date
Douglas Greenshields
de289d2cfd [Form] corrected interface bind() method defined against in deprecation notice 2013-06-11 12:21:03 +01:00
Fabien Potencier
d85ce5e5ad Merge branch '2.1' into 2.2
* 2.1:
  Revert "[Console] ensure exit code between 0-254"
  [Console] ensure exit code between 0-254
  [Console] fix status code when Exception::getCode returns something like 0.1
  Fixed exit code for exceptions with error code 0
2013-06-11 09:14:33 +02:00
Fabien Potencier
84867b78f8 Revert "[Console] ensure exit code between 0-254"
This reverts commit 6b9180a23d.
2013-06-11 09:13:58 +02:00
Fabien Potencier
82e555263f merged branch Tobion/console-status-code (PR #8202)
This PR was merged into the 2.1 branch.

Discussion
----------

[Console] fix status and exit code

Fix https://github.com/symfony/symfony/pull/8183#discussion_r4525267
and
http://www.php.net/manual/en/function.exit.php
> Exit statuses should be in the range 0 to 254, the exit status 255 is reserved by PHP and shall not be used. The status 0 is used to terminate the program successfully.

Commits
-------

6b9180a [Console] ensure exit code between 0-254
445b2e3 [Console] fix status code when Exception::getCode returns something like 0.1
2013-06-11 09:13:57 +02:00
Fabien Potencier
f4788121eb merged branch havvg/2.2 (PR #8240)
This PR was merged into the 2.2 branch.

Discussion
----------

[Propel1] fix many-to-many Propel1 ModelChoiceList

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

replaces #8223

Commits
-------

25e3abd fix many-to-many Propel1 ModelChoiceList
2013-06-10 16:56:21 +02:00
Toni Uebernickel
25e3abd683 fix many-to-many Propel1 ModelChoiceList 2013-06-10 12:43:24 +02:00
Tobias Schultze
6b9180a23d [Console] ensure exit code between 0-254
255 is reserved by PHP and should not be used

also put this code inside the codeCoverageIgnore block because it cannot be tested with phpunit
2013-06-09 14:59:14 +02:00
Fabien Potencier
1f26887d4b merged branch pylebecq/2.2 (PR #8221)
This PR was merged into the 2.2 branch.

Discussion
----------

[DomCrawler] Fixed a fatal error when setting a value in a malformed field name

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

Hi,

I found a case where a fatal error happen when trying to set a value in a form field with a malformed name.

```
Fatal error: Call to a member function setValue() on a non-object in /home/pierreyves/projects/symfony2/symfony/src/Symfony/Component/DomCrawler/FormFieldRegistry.php on line 128

Call Stack:
    0.0001     231832   1. {main}() /home/pierreyves/projects/symfony2/symfony/vendor/phpunit/phpunit/composer/bin/phpunit:0
    0.0035     688768   2. PHPUnit_TextUI_Command::main() /home/pierreyves/projects/symfony2/symfony/vendor/phpunit/phpunit/composer/bin/phpunit:63
    0.0035     689000   3. PHPUnit_TextUI_Command->run() /home/pierreyves/projects/symfony2/symfony/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:129
    0.0224    2705448   4. PHPUnit_TextUI_TestRunner->doRun() /home/pierreyves/projects/symfony2/symfony/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:176
    0.0301    2997392   5. PHPUnit_Framework_TestSuite->run() /home/pierreyves/projects/symfony2/symfony/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php:349
    0.0477    3613296   6. PHPUnit_Framework_TestSuite->runTest() /home/pierreyves/projects/symfony2/symfony/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:745
    0.0477    3613296   7. PHPUnit_Framework_TestCase->run() /home/pierreyves/projects/symfony2/symfony/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:775
    0.0477    3613296   8. PHPUnit_Framework_TestResult->run() /home/pierreyves/projects/symfony2/symfony/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:776
    0.0478    3614208   9. PHPUnit_Framework_TestCase->runBare() /home/pierreyves/projects/symfony2/symfony/vendor/phpunit/phpunit/PHPUnit/Framework/TestResult.php:648
    0.0478    3630992  10. PHPUnit_Framework_TestCase->runTest() /home/pierreyves/projects/symfony2/symfony/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:831
    0.0478    3631856  11. ReflectionMethod->invokeArgs() /home/pierreyves/projects/symfony2/symfony/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:976
    0.0478    3631888  12. Symfony\Component\DomCrawler\Tests\FormTest->testSetValueOnMultiValuedFieldsWithMalformedName() /home/pierreyves/projects/symfony2/symfony/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:976
    0.0481    3635560  13. Symfony\Component\DomCrawler\Form->offsetSet() /home/pierreyves/projects/symfony2/symfony/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:255
    0.0481    3635560  14. Symfony\Component\DomCrawler\FormFieldRegistry->set() /home/pierreyves/projects/symfony2/symfony/src/Symfony/Component/DomCrawler/Form.php:320
```

In this case, `FormFieldRegistry::getSegments('foo[bar')` method is called and it will return `array('foo')` only. Therefore the return of `FormFieldRegistry::get('foo[bar')` returns an array instead of a `FormField` and so the `setValue()` call happen on the array which leads to the fatal error.

I tried to fix that. I don't know if it's the best way to do this so, as always, comments are welcome.

Commits
-------

bce6bd2 [DomCrawler] Fixed a fatal error when setting a value in a malformed field name.
2013-06-08 17:01:11 +02:00
Pierre-Yves LEBECQ
bce6bd2858 [DomCrawler] Fixed a fatal error when setting a value in a malformed field name. 2013-06-08 13:27:47 +02:00
Tobias Schultze
445b2e3dad [Console] fix status code when Exception::getCode returns something like 0.1 2013-06-05 10:14:54 +02:00
Fabien Potencier
18f55ffe5e merged branch havvg/hotfix/fix-bundle-command-instantiation (PR #8182)
This PR was merged into the 2.2 branch.

Discussion
----------

[HttpKernel] instantiate valid commands only

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

This skips the default behavior to instantiate `Command` that cannot simply be instantiated. The respective commands have to be registered by other means.

Commits
-------

afad9c7 instantiate valid commands only
2013-06-04 17:00:11 +02:00
Fabien Potencier
28a900150e merged branch Stelian/2.2 (PR #8183)
This PR was submitted for the 2.2 branch but it was merged into the 2.1 branch instead (closes #8183).

Discussion
----------

Fixed exit code for exceptions with error code 0

Covers https://github.com/symfony/symfony/issues/8180

Commits
-------

48e77f8 Fixed exit code for exceptions with error code 0
2013-06-04 16:58:25 +02:00
Stelian
bbfde62d7c Fixed exit code for exceptions with error code 0 2013-06-04 16:58:25 +02:00
Toni Uebernickel
afad9c7894 instantiate valid commands only 2013-06-04 12:08:18 +02:00
Fabien Potencier
bc1bf3202d bumped Symfony version to 2.2.3-DEV 2013-06-02 18:01:55 +02:00
Fabien Potencier
34430e8dbf updated VERSION for 2.2.2 2013-06-02 15:03:09 +02:00
Fabien Potencier
b9ca806048 updated CHANGELOG for 2.2.2 2013-06-02 15:02:48 +02:00
Fabien Potencier
93585f6514 removed CHANGELOG for 2.1 2013-06-02 14:54:39 +02:00
Fabien Potencier
57f93b89e8 Merge branch '2.1' into 2.2
* 2.1:
  updated VERSION for 2.1.11
  update CONTRIBUTORS for 2.1.11
  updated CHANGELOG for 2.1.11

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2013-06-02 14:53:48 +02:00
Fabien Potencier
e029409fc8 updated VERSION for 2.1.11 2013-06-02 14:29:05 +02:00
Fabien Potencier
b2c0861089 update CONTRIBUTORS for 2.1.11 2013-06-02 14:28:43 +02:00
Fabien Potencier
47c4a4f8cd updated CHANGELOG for 2.1.11 2013-06-02 14:28:22 +02:00
Fabien Potencier
afe18722d2 Merge branch '2.1' into 2.2
* 2.1:
  fixed typo in CS translation (closes #8069)
  [Form] [Validator] Fixed post_max_size = 0 bug (Issue #8065)

Conflicts:
	src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php
	src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf
2013-06-02 14:05:41 +02:00
Fabien Potencier
49006b42a9 merged branch odi86/check-post-max-size-zero (PR #8149)
This PR was merged into the 2.1 branch.

Discussion
----------

[Form] [Validator] Fixed post_max_size = 0 bug (issue #8065)

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

Commits
-------

2038329 [Form] [Validator] Fixed post_max_size = 0 bug (Issue #8065)
2013-06-02 14:03:10 +02:00
Fabien Potencier
6d55422fd0 fixed typo in CS translation (closes #8069) 2013-06-02 13:57:02 +02:00
Fabien Potencier
b677538205 merged branch bghazy/master (PR #8169)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8169).

Discussion
----------

fix arab translation

fix arab translation

Commits
-------

e9051b3 fix arab translation
2013-05-31 16:46:43 +02:00
ghazy ben ahmed
009c50dd5b fix arab translation 2013-05-31 16:46:42 +02:00
Fabien Potencier
afee664e8a merged branch jakzal/bugfix/finder-test (PR #8150)
This PR was merged into the 2.2 branch.

Discussion
----------

[Finder] Fixed a path in a test

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

Test case was introduced in 45b68e02bd.

It's probably better to be explicit rather than to rely on a path position in the array. Position in 2.1 was different than in the other branches.

Commits
-------

127f3bd [Finder] Fixed a path in a test.
2013-05-27 22:40:05 +02:00
Jakub Zalas
127f3bd500 [Finder] Fixed a path in a test.
Its probably better to be explicit rather than to rely on a path position in the array. Position has changed during a merge.
2013-05-27 21:26:32 +01:00
Fabien Potencier
1ead34ff8c Merge branch '2.1' into 2.2
* 2.1:
  Fix several instances of doubled words
  [Finder] Fix iteration fails with non-rewindable streams
  [Finder] Fix unexpected duplicate sub path related AppendIterator issue
  Added type of return value in VoterInterface.
  Fixed two bugs in HttpCache

Conflicts:
	src/Symfony/Component/Finder/Tests/FinderTest.php
2013-05-27 16:47:40 +02:00
Stefan Oderbolz
2038329114 [Form] [Validator] Fixed post_max_size = 0 bug (Issue #8065) 2013-05-27 16:27:36 +02:00
Fabien Potencier
d52d9aeba0 merged branch jbafford/doubled-word-fixes (PR #8144)
This PR was merged into the 2.1 branch.

Discussion
----------

Fix several instances of doubled words

| 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

One correction to an exception; the rest in docblocks.

Commits
-------

52fed7b Fix several instances of doubled words
2013-05-27 08:45:55 +02:00
John Bafford
52fed7b1d2 Fix several instances of doubled words
One in an exception; the rest in docblocks.
2013-05-26 14:42:07 -04:00
Fabien Potencier
e9f43bf675 merged branch alquerci/ticket-3585-7834 (PR #8120)
This PR was squashed before being merged into the 2.1 branch (closes

Discussion
----------

[Finder] Fix iteration fails with non-rewindable streams

<table>
  <tr>
    <th>Q</th><th>A</th>
  </tr>
  <tr>
    <td>Bug fix?</td><td>yes</td>
  </tr>
  <tr>
    <td>New feature?</td><td>no</td>
  </tr>
  <tr>
    <td>BC breaks?</td><td>no</td>
  </tr>
  <tr>
    <td>Deprecations?</td><td>no</td>
  </tr>
  <tr>
    <td>Tests pass?</td><td>yes</td>
  </tr>
  <tr>
    <td>Fixed tickets</td><td>#3585, #7834</td>
  </tr>
  <tr>
    <td>License?</td><td>MIT</td>
  </tr>
</table>

- [x] Add a good detection of non seekable stream
- [x] Add some unit tests

But the iteration under ftp stream still not work properly. Edit: need
tests for that.

Commits
-------

169c0b9 [Finder] Fix iteration fails with non-rewindable streams
2013-05-25 17:47:15 +02:00
alquerci
169c0b93b5 [Finder] Fix iteration fails with non-rewindable streams 2013-05-25 17:42:42 +02:00
Fabien Potencier
927718afa9 merged branch alquerci/issue-4922 (PR #8127)
This PR was squashed before being merged into the 2.1 branch (closes #8127).

Discussion
----------

 [Finder] Fix unexpected duplicate sub path related AppendIterator issue

Bug fix: yes
New feature: no
BC breaks: no
Deprecations: no
Tests pass: yes
Fixes: https://github.com/symfony/symfony/pull/4993#issuecomment-8515845
Todo: -
License of the code: MIT

> @dg:  I am afraid it is not working, see this example http://davidgrudl.com/tmp/appenditerator-finder.zip.

Commits
-------

45b68e0  [Finder] Fix unexpected duplicate sub path related AppendIterator issue
2013-05-25 17:38:59 +02:00
alquerci
45b68e02bd [Finder] Fix unexpected duplicate sub path related AppendIterator issue 2013-05-25 17:38:59 +02:00
Fabien Potencier
e789a02d5a merged branch richsage/voterinterface-docblock-type (PR #8117)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #8117).

Discussion
----------

[Security] Added type of return value in VoterInterface.

| Q             | A
| ------------- | ---
| Fixed tickets | none
| License       | MIT

Simple addition of the return type for the `supportsClass` method, as per the `supportsAttribute` method doc in the interface.

Commits
-------

c176d1e [Security] Added type of return value in VoterInterface.
2013-05-23 04:09:04 +02:00
Rich Sage
97b38edeff Added type of return value in VoterInterface. 2013-05-23 04:09:04 +02:00
Fabien Potencier
e9802047c0 merged branch jdesrosiers/ticket_8097 (PR #8098)
This PR was submitted for the 2.0 branch but it was merged into the 2.1 branch instead (closes #8098).

Discussion
----------

[HttpKernel] Fixed two bugs in HttpCache

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

1. 304 responses always send "Content-Type: text/html; charset=UTF-8"
header
I discovered that the HttpCache::handle method calls Response::prepare
after calling Response::isModified.  Response::isModified removes the
Content-Type header as it should, but Response::handle adds in the
default Content-Type header when none is set.  If the default
Content-Type is not the correct Content-Type, then the Content-Type in
the cache gets clobered.  I solved this problem by moving the
Response::isModified call after the Response::prepare call.  I updated
the testRespondsWith304WhenIfModifiedSinceMatchesLastModified and
testRespondsWith304WhenIfNoneMatchMatchesETag tests to verify that the
Content-Type header was not being sent for 304 responses.

2. Failure to invalidate cached entities referred to by the Location
header
I discovered that the Store::invalidate method was looking for Location
and Content-Location headers to invalidate, but it was looking in the
request headers instead of the response headers.  Because the
Store::invalidate method doesn't take a response, I decided it was
better to move this logic to the HttpCache::invalidate method instead.
I updated the testInvalidatesCachedResponsesOnPost test to verify that
Location headers are getting invalidated correctly.

Commits
-------

a4251bd [HttpKernel] Fixed two bugs in HttpCache
2013-05-21 00:28:52 +02:00
Jason Desrosiers
532160026f Fixed two bugs in HttpCache
1. 304 responses always send "Content-Type: text/html; charset=UTF-8"
header
I discovered that the HttpCache::handle method calls Response::prepare
after calling Response::isModified.  Response::isModified removes the
Content-Type header as it should, but Response::handle adds in the
default Content-Type header when none is set.  If the default
Content-Type is not the correct Content-Type, then the Content-Type in
the cache gets clobered.  I solved this problem by moving the
Response::isModified call after the Response::prepare call.  I updated
the testRespondsWith304WhenIfModifiedSinceMatchesLastModified and
testRespondsWith304WhenIfNoneMatchMatchesETag tests to verify that the
Content-Type header was not being sent for 304 responses.

2. Failure to invalidate cached entities referred to by the Location
header
I discovered that the Store::invalidate method was looking for Location
and Content-Location headers to invalidate, but it was looking in the
request headers instead of the response headers.  Because the
Store::invalidate method doesn't take a response, I decided it was
better to move this logic to the HttpCache::invalidate method instead.
I updated the testInvalidatesCachedResponsesOnPost test to verify that
Location headers are getting invalidated correctly.
2013-05-21 00:25:38 +02:00
Fabien Potencier
f213a851e6 Merge branch '2.1' into 2.2
* 2.1:
  [Console] fix and refactor exit code handling
2013-05-19 21:04:48 +02:00
Fabien Potencier
92399ff79a merged branch Tobion/console-exit-code (PR #8080)
This PR was merged into the 2.1 branch.

Discussion
----------

[Console] fix and refactor exit code handling

Split of #8038

Commits
-------

5c317b7 [Console] fix and refactor exit code handling
2013-05-19 21:02:55 +02:00
Fabien Potencier
7b5e68053f Merge branch '2.1' into 2.2
* 2.1:
  [CssSelector] Fix :nth-last-child() translation
  Fix Crawler::children() to not trigger a notice for childless node
2013-05-19 21:00:13 +02:00
Fabien Potencier
b31769b551 merged branch lazyhammer/issue-8068-2.1 (PR #8073)
This PR was merged into the 2.1 branch.

Discussion
----------

[CssSelector] Fix :nth-last-child() translation

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

Same as #8072, but for < 2.3

Commits
-------

1469953 [CssSelector] Fix :nth-last-child() translation
2013-05-19 20:58:42 +02:00
Tobias Schultze
5c317b77e8 [Console] fix and refactor exit code handling 2013-05-17 23:54:02 +02:00
Dmitrii Chekaliuk
1469953df4 [CssSelector] Fix :nth-last-child() translation 2013-05-17 03:31:34 +03:00
Fabien Potencier
419f0f039c merged branch lazyhammer/issue-8048 (PR #8054)
This PR was merged into the 2.1 branch.

Discussion
----------

[DomCrawler] Fix Crawler::children() to not trigger a notice for childless node

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

Commits
-------

91b8490 Fix Crawler::children() to not trigger a notice for childless node
2013-05-16 11:51:41 +02:00
Fabien Potencier
6bc3179113 Merge branch '2.1' into 2.2
* 2.1:
  removed CHANGELOG for 2.0 as it is not maintained anymore

Conflicts:
	CHANGELOG-2.0.md
2013-05-16 09:49:40 +02:00
Dmitrii Chekaliuk
91b84903b7 Fix Crawler::children() to not trigger a notice for childless node 2013-05-16 03:06:15 +03:00