Commit Graph

14482 Commits

Author SHA1 Message Date
Fabien Potencier fa42a90bd8 merged branch jakzal/2.3-tests-on-php-5.5 (PR #8324)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] Fixed tests failing on PHP 5.5 and removed this version from the allowed failures

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

Commits
-------

69ec7c8 Removed PHP 5.5 from the allowed failures.
3492186 [Intl] Fixed tests failing on PHP 5.5
2013-06-23 09:01:37 +02:00
Jakub Zalas 69ec7c8363 Removed PHP 5.5 from the allowed failures. 2013-06-21 09:32:21 +01:00
Jakub Zalas 349218692e [Intl] Fixed tests failing on PHP 5.5 2013-06-21 09:19:25 +01:00
Fabien Potencier e01c6c22e8 merged branch jakzal/bugfix/di-tests-segfault (PR #8298)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Replaced try/catch block with an @expectedException annotation

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

This fix doesn't seem like changing anything but thanks to it, PHP 5.3.3 stops segfaulting.

Tests started failing after merging #8285. However, it's not the change which made them failing (the change is totally unrelated to the segfaulting test case). I suspect it has something to do with memory management in the early PHP 5.3 versions. We've had this kind of failures in the past.

Commits
-------

494e803 [DependencyInjection] Replaced try/catch block with an @expectedException annotation in a test.
2013-06-17 15:51:03 +02:00
Jakub Zalas 494e8035ad [DependencyInjection] Replaced try/catch block with an @expectedException annotation in a test. 2013-06-17 14:32:29 +01:00
Fabien Potencier caaaec3155 [CssSelector] tweaked README file (closes #8287) 2013-06-17 09:15:51 +02:00
Fabien Potencier 46cb3b8095 merged branch jfsimon/css-selector-readme-update (PR #8287)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #8287).

Discussion
----------

[CssSelector] added a node about HTML extension in readme

It's a common mistake to use `CssSelector` with XML without knowing that `HTML` extension must be disbaled first (see #8286). This PR adds a note about that in the component's readme file.

Commits
-------

4235b26 [CssSelector] added a node about HTML extension in readme
2013-06-17 09:13:34 +02:00
Jean-François Simon 0cb95e07ac added a node about HTML extension in readme 2013-06-17 09:13:34 +02:00
Fabien Potencier 0da84dac18 merged branch jakzal/bugfix/table-helper-multi-byte (PR #8285)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] Fixed the table rendering with multi-byte strings.

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

Commits
-------

ab1439e [Console] Fixed the table rendering with multi-byte strings.
2013-06-16 14:10:21 +02:00
Jakub Zalas ab1439eb32 [Console] Fixed the table rendering with multi-byte strings. 2013-06-15 18:55:04 +01:00
Fabien Potencier 092fae1f6b merged branch hostnet/feature/fix-unit-tests (PR #8275)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #8275).

Discussion
----------

Feature/fix unit tests

Fixed two cases where tests were relying on the pcntl extension

Commits
-------

39477dd Feature/fix unit tests
2013-06-14 11:45:32 +02:00
Rick Prent 3381f3f897 Feature/fix unit tests 2013-06-14 11:45:32 +02:00
Fabien Potencier f554ada374 merged branch fabpot/bcrypt-salt (PR #8266)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] fixed usage of the salt for the bcrypt encoder (refs #8210)

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

see #8210

Commits
-------

b5ded81 [Security] fixed usage of the salt for the bcrypt encoder (refs #8210)
2013-06-13 17:24:34 +02:00
Fabien Potencier 6d2bec72b4 merged branch lsmith77/container_check_alias_in_has_method (PR #8252)
This PR was merged into the 2.3 branch.

Discussion
----------

Container check alias in has method

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | [![Build Status](https://travis-ci.org/lsmith77/symfony.png?branch=container_check_alias_in_has_method)](https://travis-ci.org/lsmith77/symfony)
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This bug might also be in 2.2 but we encountered it in 2.3 and the relevant code was changed slightly from 2.2 to 2.3. We noticed this issue here:
https://github.com/symfony-cmf/RoutingBundle/issues/109

The issue is caused by the ``$container->has->('router')`` check in the Router related commands:
https://github.com/symfony/FrameworkBundle/blob/master/Command/RouterDebugCommand.php#L32

As with the CMF we use a chain router service that is aliased to ``router``, the commands do not get registered.

One could classify this as a BC break, but imho its a bug fix.

Commits
-------

aa79393 also consider alias in Container::has()
2013-06-13 12:54:18 +02:00
Fabien Potencier d849d5d134 Merge branch '2.2' into 2.3
* 2.2:
  Throw exception if value is passed to VALUE_NONE input, long syntax
  fixed date type format pattern regex
  [FrameworkBundle] tweaked previous merge (refs #8242)
  do not re-register commands each time a Console\Application is run
  [Process] moved env check to the Process class (refs #8227)
  fix issue where $_ENV contains array vals
  [DomCrawler] Fix handling file:// without a host
  [Form] corrected interface bind() method defined against in deprecation notice
  [Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol

Conflicts:
	src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php
	src/Symfony/Component/DomCrawler/Link.php
	src/Symfony/Component/Form/Form.php
2013-06-13 09:51:49 +02:00
Fabien Potencier 9a76c4f017 merged branch tiagojsag/console_input_options_fix (PR #8199)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8199).

Discussion
----------

[Console] Throw exception if value is passed to VALUE_NONE input optin, long syntax

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

Input options with InputOption::VALUE_NONE accept values in both short and long syntaxes:
- When using the long syntax, no exception is thrown;
- When using short, a "The %s option does not exist" exception is thrown.

This PR only addresses the long syntax case. The short syntax case would require considerable refactoring of the parse code, which I believe should be discussed.

I included a test that illustrates the above mentioned problem for the long syntax scenario.

Commits
-------

32ea77f Throw exception if value is passed to VALUE_NONE input, long syntax
2013-06-13 09:48:34 +02:00
Tiago Garcia bcbbb28f76 Throw exception if value is passed to VALUE_NONE input, long syntax 2013-06-13 09:47:06 +02:00
Fabien Potencier fb0a0a708b merged branch bamarni/date-format-regex (PR #8198)
This PR was submitted for the 2.1 branch but it was merged into the 2.2 branch instead (closes #8198).

Discussion
----------

[Form] fixed date type format pattern regex

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

I don't understand what is the rationale behind the current regex, why is there mandatory in-between characters?

The current regex passes with the format option set to ```dMyyyy``` while it doesn't with ```dMy```, on the linked icu documentation it is stated that ```y``` is equivalent to ```yyyy```.

So when setting this format option to dMy, fields are rendered in a wrong order because of the fallback (year, month, day).

Commits
-------

6a91bbb [Form] fixed date type format pattern regex
2013-06-13 09:35:18 +02:00
Bilal Amarni 6b715136c8 fixed date type format pattern regex 2013-06-13 09:35:18 +02:00
Fabien Potencier b5ded812fe [Security] fixed usage of the salt for the bcrypt encoder (refs #8210) 2013-06-13 09:21:46 +02:00
Fabien Potencier 24a07fbab8 [FrameworkBundle] tweaked previous merge (refs #8242) 2013-06-13 09:07:59 +02:00
Fabien Potencier 3b068378e8 merged branch tomglue/console_reregister_commands_fix (PR #8242)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8242).

Discussion
----------

[FrameworkBundle] do not re-register commands each time a Console\Application is run

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

I have been experimenting with using the Symfony console application inside of a React event loop which works quite well.

In this scenario, I re-use an instances of a Console\Application to run multiple tasks. This works well apart from unnecessarily reloading the command classes from all included bundles each time doRun() is called (https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Console/Application.php#L68). This can also lead to running out of file descriptors under heavy load as bootstrap.php.cache uses a RecursiveDirectoryIterator to load the command.

Commits
-------

1983fc3 [FrameworkBundle] do not re-register commands each time a Console\Application is run
2013-06-13 09:04:56 +02:00
Tom Maguire 842f3fa3d2 do not re-register commands each time a Console\Application is run 2013-06-13 09:04:38 +02:00
Fabien Potencier 0991cd0b9d [Process] moved env check to the Process class (refs #8227) 2013-06-13 08:52:49 +02:00
Fabien Potencier 6089f32d61 merged branch oodle/ticket_7196 (PR #8227)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8227).

Discussion
----------

[Process] fix issue where $_ENV contains array vals

There are cases where $env or $_ENV can contain a value that is an array
This will cause Process to throw an Array to String conversion exception
Initially I submitted a patch of Process.php, however Fabien indicated
that it shouldn't be fixed there (see below pull request).

Before recently, a simple work around would be in php.ini to set:

  register_argc_argv = On

However with recent changes, this seems to no longer work.

Original pull request: https://github.com/symfony/symfony/pull/7354

See ticket https://github.com/symfony/symfony/issues/7196

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

Commits
-------

2c6af95 [Process] fix issue where $_ENV contains array vals
2013-06-13 08:44:22 +02:00
Matthew J Mucklo 8764944c69 fix issue where $_ENV contains array vals
There are cases where $env or $_ENV can contain a value that is an array
This will cause Process to throw an Array to String conversion exception
Initially I submitted a patch of Process.php, however Fabien indicated
that it shouldn't be fixed there (see below pull request).

Before recently, a simple work around would be in php.ini to set:

  register_argc_argv = On

However with recent changes, this seems to no longer work.

Original pull request: https://github.com/symfony/symfony/pull/7354

See ticket https://github.com/symfony/symfony/issues/7196
2013-06-13 08:44:22 +02:00
Fabien Potencier c27735df29 merged branch lazyhammer/fix-crawler-file-scheme (PR #8264)
This PR was merged into the 2.2 branch.

Discussion
----------

[DomCrawler] Fix handling file:// without a host

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

4139936 [DomCrawler] Fix handling file:// without a host
2013-06-13 08:39:46 +02:00
Fabien Potencier 4dc58adbad merged branch AntonioAngelino/2.3 (PR #8258)
This PR was merged into the 2.3 branch.

Discussion
----------

fix-progressbar-start

lastMessagesLength and barCharOriginal should be reset if you want to use 2 or more Progress Bars in the same command flow.

Commits
-------

e65723c fix-progressbar-start
2013-06-13 08:08:11 +02:00
Dmitrii Chekaliuk 41399360e8 [DomCrawler] Fix handling file:// without a host 2013-06-13 02:54:36 +03:00
Antonio Angelino e65723c000 fix-progressbar-start
lastMessagesLength and barCharOriginal should be reset if you want to use 2 or more Progress Bars in the same command flow.
2013-06-12 16:52:32 +02:00
Lukas Kahwe Smith aa79393054 also consider alias in Container::has() 2013-06-12 12:05:56 +02:00
Fabien Potencier 839047bafa merged branch alquerci/ticket_8219 (PR #8243)
This PR was merged into the 2.2 branch.

Discussion
----------

[Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol

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

Commits
-------

849f3ed [Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol
2013-06-11 22:19:40 +02:00
Fabien Potencier 8d29c64dcc bumped Symfony version to 2.3.2-DEV-DEV 2013-06-11 15:34:17 +02:00
Fabien Potencier 0902c606b4 updated VERSION for 2.3.1 2013-06-11 13:46:38 +02:00
Fabien Potencier a2f6a41dd6 updated CHANGELOG for 2.3.1 2013-06-11 13:46:15 +02:00
Fabien Potencier 8ec7962f92 merged branch shieldo/correct_bind_interface (PR #8248)
This PR was merged into the 2.2 branch.

Discussion
----------

[Form] corrected interface bind() method defined against in deprecation ...

...notice

The 'bind' method is defined against `FormInterface` not `FormConfigInterface`. This corrects the deprecation notice in the `Form` implementation.

Commits
-------

de289d2 [Form] corrected interface bind() method defined against in deprecation notice
2013-06-11 13:39:42 +02:00
Douglas Greenshields de289d2cfd [Form] corrected interface bind() method defined against in deprecation notice 2013-06-11 12:21:03 +01:00
Fabien Potencier 2f915f72f6 Merge branch '2.2' into 2.3
* 2.2:
  Revert "[Console] ensure exit code between 0-254"
  fix many-to-many Propel1 ModelChoiceList
  [Console] ensure exit code between 0-254
  [DomCrawler] Fixed a fatal error when setting a value in a malformed field name.
  [Console] fix status code when Exception::getCode returns something like 0.1
  Fixed exit code for exceptions with error code 0
  instantiate valid commands only

Conflicts:
	src/Symfony/Component/Console/Application.php
2013-06-11 09:15:14 +02: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
alquerci 849f3ed7e9 [Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol 2013-06-10 20:35:46 +02:00
Fabien Potencier 847951ec80 merged branch rubenrua/master (PR #8236)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #8236).

Discussion
----------

Added missing galician (gl) translations

Commits
-------

e179510 Added missing galician (gl) translations
2013-06-10 18:23:26 +02:00
rubenrua b8c13b670f Added missing galician (gl) translations 2013-06-10 18:23:25 +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
Fabien Potencier af098ebb2d merged branch lancergr/greek_validator (PR #8225)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #8225).

Discussion
----------

[Validator] Added Greek translation

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

Commits
-------

278090b [Validator] Added Greek translation
2013-06-08 16:57:40 +02:00
lancergr 68b33604e5 Added Greek translation 2013-06-08 16:57:40 +02:00