Commit Graph

16816 Commits

Author SHA1 Message Date
Romain Neutron 741a8c1184 [Process] Fix some unit tests that create the process object instead of delegate it to the implementation
This is the patch for version 2.4
2014-03-11 18:38:12 +01:00
Romain Neutron 227b85bc27 [Process] Fix some unit tests that create the process object instead of delegate it to the implementation 2014-03-11 18:33:11 +01:00
Fabien Potencier c2d4be1d6b feature #10418 [Form] Removed "magic" from FormErrorIterator (webmozart)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Form] Removed "magic" from FormErrorIterator

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

Commits
-------

daac66e [Form] Removed "magic" from FormErrorIterator
2014-03-11 18:20:42 +01:00
Fabien Potencier 53a0403fb1 minor #10419 [2.3][Process] Make process tests more accurate on exception messages (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Process] Make process tests more accurate on exception messages

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

I need exception message to be checked more accurately in my upcoming PR about windows.
I decided to make a separated PR as the other one will probably take some time before being merged

Commits
-------

1b1768a [Process] Make process tests more accurate on exception messages
2014-03-11 18:19:55 +01:00
Romain Neutron 1b1768aced [Process] Make process tests more accurate on exception messages 2014-03-11 17:00:25 +01:00
Bernhard Schussek daac66e719 [Form] Removed "magic" from FormErrorIterator 2014-03-11 16:57:35 +01:00
Fabien Potencier 5b07e0abb6 feature #10414 [Validator] Checked the constraint class in constraint validators (webmozart)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Validator] Checked the constraint class in constraint validators

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

Commits
-------

df56c23 [Validator] Checked the constraint class in constraint validators
2014-03-11 11:03:48 +01:00
Fabien Potencier ce8119913f feature #9918 [Form] Changed Form::getErrors() to return an iterator and added two optional parameters $deep and $flatten (webmozart)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Form] Changed Form::getErrors() to return an iterator and added two optional parameters $deep and $flatten

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

See the changes in the UPGRADE files for more information.

Commits
-------

6b3fbb5 [Form] Changed the default value of $flatten in Form::getErrors() to true
a9268c4 [Form] Changed Form::getErrors() to return an iterator and added two optional parameters $deep and $flatten
2014-03-11 10:37:33 +01:00
Fabien Potencier 0738f8387d bug #10412 [Process] Fix process status in TTY mode (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Fix process status in TTY mode

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

When running a process with TTY mode, status in automatically set to `terminated`
once it's started.

It's wrong for two reasons :
 - The status of the process is not yet terminated.
 - The exitcode value is never caught

Commits
-------

51c70f8 [Process] Fix process status in TTY mode
2014-03-10 20:57:38 +01:00
Fabien Potencier 6fcf5d37a3 minor #10411 [Process] Fix comparisons against process exitcode (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Fix comparisons against process exitcode

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

Use identical comparison instead of equal. In case the exitcode has not been caught, `Process::isSuccessful` returns true instead of false. It should not happen, but it's much more clean like that.

Commits
-------

d66f63f [Process] Use assertSame instead of assertEquals to avoid comparison against `null`
2014-03-10 20:56:54 +01:00
Romain Neutron 51c70f85dd [Process] Fix process status in TTY mode
When running a process with TTY mode, status in automatically set to `terminated`
once it's started.

It's wrong for two reasons :
 - The status of the process is not yet terminated.
 - The exitcode value is never caught
2014-03-10 19:08:27 +01:00
Romain Neutron d66f63f2b8 [Process] Use assertSame instead of assertEquals to avoid comparison against `null` 2014-03-10 19:06:36 +01:00
Bernhard Schussek df56c23d8f [Validator] Checked the constraint class in constraint validators 2014-03-10 12:58:20 +00:00
Fabien Potencier d16c0724e0 minor #10407 [Security] Use more accurate variable name (lyrixx)
This PR was submitted for the 2.4-dev branch but it was merged into the 2.4 branch instead (closes #10407).

Discussion
----------

[Security] Use more accurate variable name

| 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

Sorry for the noise, but everytime I open this class, I wonder what is `$exception`.

Commits
-------

f34e716 [Security] Use more accurate variable name
2014-03-09 20:38:15 +01:00
Grégoire Pineau 9e2aa9fced Use more accurate variable name 2014-03-09 20:38:15 +01:00
Christian Schmidt 5d6ef003ff Add class constants for access decision strategies. 2014-03-05 23:13:10 +01:00
Fabien Potencier 1017d83260 [HttpFoundation] added some unit tests 2014-03-05 08:16:11 +01:00
Fabien Potencier b6a6791f97 bug #10382 10158 get vary multiple (bbinkovitz)
This PR was squashed before being merged into the 2.3 branch (closes #10382).

Discussion
----------

10158 get vary multiple

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

Commits
-------

3a4a3cb 10158 get vary multiple
2014-03-05 08:12:47 +01:00
Beth Binkovitz 3a4a3cbe30 10158 get vary multiple 2014-03-05 08:12:46 +01:00
Fabien Potencier f15ea50b17 minor #10376 [Component][Serializer] Add fluent interface to GetSetMethodNormalizer (alexsegura)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Component][Serializer] Add fluent interface to GetSetMethodNormalizer

| 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

Commits
-------

2d42533 [Component][Serializer] Add fluent interface to GetSetMethodNormalizer
2014-03-04 21:00:43 +01:00
Fabien Potencier 50579442f8 minor #10380 fixed some HHVM bugs (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

fixed some HHVM bugs

| 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 is a workaround for facebook/hhvm#1161. I made the change as the workaround does the same thing and the eval is part of unit tests.

Commits
-------

d014dac made Cookie stringification more robust
fa24749 [Yaml] fix for a HHVM bug
2014-03-04 20:15:40 +01:00
Fabien Potencier 535d6c8096 minor #10377 [HttpKernel] Fix gitignore (florianv)
This PR was submitted for the 2.4-dev branch but it was merged into the 2.4 branch instead (closes #10377).

Discussion
----------

[HttpKernel] Fix gitignore

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

The kernel rootDir is Fixtures:

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Tests/KernelTest.php#L787-L789

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Tests/KernelTest.php#L800-L802

Commits
-------

9980ba2 [HttpKernel] Fix gitignore
2014-03-04 18:06:29 +01:00
florianv 0551363a84 Fix gitignore 2014-03-04 18:06:29 +01:00
Fabien Potencier d014dacce3 made Cookie stringification more robust 2014-03-04 17:47:46 +01:00
Fabien Potencier fa24749537 [Yaml] fix for a HHVM bug 2014-03-04 17:04:39 +01:00
Alexandre Segura 2d42533964 [Component][Serializer] Add fluent interface to GetSetMethodNormalizer 2014-03-04 15:58:09 +01:00
Fabien Potencier bc38d76f94 minor #10366 [FrameworkBundle] set a default value for gc_probability (fabpot)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[FrameworkBundle] set a default value for gc_probability

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

This sets the `gc_probability` to 1 by default (which is the default value in PHP). That should help mitigate #10349.

Commits
-------

7e1bdd7 [FrameworkBundle] set a default value for gc_probability
2014-03-04 10:28:13 +01:00
Fabien Potencier 1948d3647f Merge branch '2.4'
* 2.4:
  Revert "[HttpFoundation] removed test file not related to 2.3"
  [HttpFoundation] removed test file not related to 2.3
  [HttpKernel] fixed CS
  Add tests for RequestStack class
2014-03-04 08:36:44 +01:00
Fabien Potencier 91ceddcb42 Revert "[HttpFoundation] removed test file not related to 2.3"
This reverts commit 60ed3880d7.
2014-03-04 08:36:26 +01:00
Fabien Potencier 29edeeae66 Merge branch '2.3' into 2.4
* 2.3:
  [HttpFoundation] removed test file not related to 2.3
  [HttpKernel] fixed CS
  Add tests for RequestStack class
2014-03-04 08:36:00 +01:00
Fabien Potencier f6bc83fc07 minor #10373 added the BC docs to the contributing file (fabpot)
This PR was merged into the 2.5-dev branch.

Discussion
----------

added the BC docs to the contributing file

Commits
-------

2f9432a added the BC docs to the contributing file
2014-03-04 08:34:34 +01:00
Fabien Potencier b3cf27a184 minor #10372 [HttpKernel] fixed CS (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] fixed CS

Commits
-------

7539e41 [HttpKernel] fixed CS
2014-03-04 08:33:50 +01:00
Fabien Potencier 60ed3880d7 [HttpFoundation] removed test file not related to 2.3 2014-03-04 08:33:02 +01:00
Fabien Potencier 2f9432a45b added the BC docs to the contributing file 2014-03-04 08:26:38 +01:00
Fabien Potencier 7539e4197e [HttpKernel] fixed CS 2014-03-04 08:21:33 +01:00
Fabien Potencier 69d2c8e715 Merge branch '2.4'
* 2.4:
  [HttpKernel] fixed unit tests when using phpunit.phar
  add expression request matcher tests
2014-03-03 23:00:45 +01:00
Fabien Potencier 1c02456179 minor #10369 [HttpKernel] fixed unit tests when using phpunit.phar (fabpot)
This PR was merged into the 2.4 branch.

Discussion
----------

[HttpKernel] fixed unit tests when using phpunit.phar

| 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

Commits
-------

0edb192 [HttpKernel] fixed unit tests when using phpunit.phar
2014-03-03 23:00:13 +01:00
Fabien Potencier 0edb192d55 [HttpKernel] fixed unit tests when using phpunit.phar 2014-03-03 22:46:04 +01:00
Fabien Potencier e778cf19cd fixed previous merge 2014-03-03 19:01:36 +01:00
Fabien Potencier 0aeb3945bc feature #9739 [FrameworkBundle] Extract KernelTestCase from WebTestCase (johnkary)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[FrameworkBundle] Extract KernelTestCase from WebTestCase

| Q             | A
| ------------- | ---
| Bug fix?      | No
| New feature?  | Yes
| BC breaks?    | No
| Deprecations? | No
| Tests pass?   | Yes
| Fixed tickets | None
| License       | MIT
| Doc PR        | symfony/symfony-docs#3311

Previous discussion is in #7704. Opened new PR to target master branch.

This idea came to me while reading the Cookbook article [How to create a Console Command - Testing Commands](http://symfony.com/doc/master/cookbook/console/console_command.html#testing-commands) and I wanted to hear feedback from others before submitting a patch.

Basically the Cookbook article states that when testing a Command that extending `WebTestCase` is a good way to get access to the Kernel and thus the Container. This struck me as weird because I was wanting to test a Command, which doesn't really have anything to do with "the web."

Currently `WebTestCase` doesn't do anything internally that looks like web-specific work, and the class docblock itself states "WebTestCase is the base class for functional tests.".

After a suggestion in #7704 by @beberlei, I decided to take his advice and now have the following implementation:

Extracted a new class `KernelTestCase` from `WebTestCase` and instead allow WebTestCase to extend KernelTestCase. Pulled all methods up into KernelTestCase except `createClient()` because `createClient()` is focused solely on creating a Client for issuing web-based requests.

Benjamin's solution provides us a clear extension point from `KernelTestCase` for Command-based tests and also provides 100% backwards-compatibility without the need to deprecate WebTestCase.

Commits
-------

c4f14fb Extract new base test class KernelTestClass
2014-03-03 19:00:51 +01:00
Fabien Potencier 4d31d2f3cc fixed CS 2014-03-03 18:47:50 +01:00
Fabien Potencier c4b8e03332 feature #9852 [Translation] Added template for relative file paths in FileDumper (florianv)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Translation] Added template for relative file paths in FileDumper

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/9845
| License       | MIT
| Doc PR        |

Added ability to support templates for relative paths to translation files.
The file dumpers will try to create the directories if not existing.
Also made `IcuResFileDumper` extending `FileDumper`.

Commits
-------

a04175e Changed placeholders
623d149 Added a ConcreteDumper
84f0902 [Translation] Added template for relative file paths
2014-03-03 18:46:58 +01:00
Fabien Potencier 3e7da99de5 minor #10322 [HttpFoundation][Tests] Add expression request matcher tests (inalgnu)
This PR was submitted for the 2.4-dev branch but it was merged into the 2.4 branch instead (closes #10322).

Discussion
----------

[HttpFoundation][Tests] Add expression request matcher tests

| 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

Commits
-------

76fe21d [HttpFoundation][Tests] add expression request matcher tests
2014-03-03 18:30:42 +01:00
inalgnu 16b48d657f add expression request matcher tests 2014-03-03 18:30:41 +01:00
Fabien Potencier a9c174d639 minor #10326 [HttpFoundation][Tests] Add tests for RequestStack class (inalgnu)
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes #10326).

Discussion
----------

[HttpFoundation][Tests] Add tests for RequestStack class

| 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

Commits
-------

6f25d39 [HttpFoundation][Tests] Add tests for RequestStack class
2014-03-03 18:28:54 +01:00
Inal DJAFAR 466e5b87b0 Add tests for RequestStack class 2014-03-03 18:28:54 +01:00
Fabien Potencier 786c956a11 feature #10368 [FrameworkBundle] Added a translation:debug command (fabpot)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[FrameworkBundle] Added a translation:debug command

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

This PR is based on #10076 but fixes a bunch of issues for edge cases. It also uses the new Table helper.

Original description:

This pull request adds a `translation:debug` command that can be used to inspect unused / missing messages and compare them with the fallback ones (for example to detect copy pasted strings). This is inspired by this ruby project https://github.com/glebm/i18n-tasks

Example of output:

![image](https://f.cloud.github.com/assets/47313/2311673/84ae301c-a2f3-11e3-8bf6-96034369e46c.png)

Commits
-------

f039bde [FrameworkBundle] fixed edge cases for translation:debug and tweaked the output
597a310 Added a translation:debug command
2014-03-03 18:25:58 +01:00
Fabien Potencier f039bde3d8 [FrameworkBundle] fixed edge cases for translation:debug and tweaked the output 2014-03-03 18:24:37 +01:00
Fabien Potencier 5ea64372db [FrameworkBundle] refactored the built-in web server 2014-03-03 18:22:18 +01:00
florianv a04175ec9c Changed placeholders 2014-03-03 18:14:46 +01:00