Commit Graph

14042 Commits

Author SHA1 Message Date
Bernhard Schussek
6d2af217aa [PropertyAccess] Added isReadable() and isWritable() 2014-03-28 17:21:37 +01:00
Bernhard Schussek
20e6bf8f49 [PropertyAccess] Refactored PropertyAccessorCollectionTest 2014-03-28 17:07:20 +01:00
Bernhard Schussek
0488389d95 [PropertyAccess] Refactored PropertyAccessorTest 2014-03-28 15:56:23 +01:00
Bernhard Schussek
b44e07b7f6 [Form] Added test case for 4759e062ed004749dbdc2ba31aef0f8ac2601895 2014-03-28 12:45:50 +01:00
Matt Janssen
7bc7a8a6ec [Form] Accept interfaces to be passed to "data_class" 2014-03-28 12:44:51 +01:00
Fabien Potencier
584b5c0508 fixed typos 2014-03-28 10:40:08 +01:00
Fabien Potencier
4a0382b58a fixed CS 2014-03-27 21:36:23 +01:00
Fabien Potencier
9e78a0603e Merge branch '2.4'
* 2.4:
  added missing unit test
  fixed too greedy replacements
  fixed protocol-relative URLs
  added override power to server parameters provided on request method
  made parsing controllers more robust
  Fixed YamlFileLoader imports path
2014-03-27 15:53:24 +01:00
Fabien Potencier
82cbf698b7 Merge branch '2.3' into 2.4
* 2.3:
  added missing unit test
  fixed too greedy replacements
  fixed protocol-relative URLs
  added override power to server parameters provided on request method
  made parsing controllers more robust
  Fixed YamlFileLoader imports path

Conflicts:
	src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php
2014-03-27 15:53:17 +01:00
Fabien Potencier
47d1592b56 added missing unit test 2014-03-27 15:52:07 +01:00
Inal DJAFAR
6aa1050793 Add parameter descriptors 2014-03-27 12:26:27 +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
Jordi Boggiano
7d61154e7a Add command to list twig functions, filters, globals and tests 2014-03-27 08:58:32 +01:00
Fabien Potencier
6dba2296f1 made parsing controllers more robust 2014-03-27 08:52:42 +01:00
Manuel Reinhard
ec428445a1 Improved ISBN validator 2014-03-27 08:46:43 +01:00
Fabien Potencier
711788b794 fixed CS 2014-03-27 08:45:48 +01:00
Sascha Grossenbacher
e7389aa24c Move normalizer cache to getNormalier()/getDenormalizer(), use those in normalizeObject()/denormalizeObject() 2014-03-27 08:44:58 +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
Eduardo Gulias Davis
3368630482 #1581 - Strict in Email constraint and use of Egulias\EmailValidator 2014-03-27 07:02:30 +01:00
Fabien Potencier
e0de9586aa Merge branch '2.4'
* 2.4:
  Check headers sent before sending PHP response
  Fix issue symfony/symfony#10345 '[FrameworkBundle][Console] container:debug --parameter="" not working anymore'
  Fixed ACE domain checks on UrlValidator (#10031)
  handle array root element
2014-03-26 19:07:49 +01:00
Fabien Potencier
af6d11c9c6 Merge branch '2.3' into 2.4
* 2.3:
  Check headers sent before sending PHP response
  Fixed ACE domain checks on UrlValidator (#10031)
  handle array root element
2014-03-26 19:07:42 +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
steveYeah
304cbe99fe Add UnprocessableEntityHttpException to HttpKernel Exceptions 2014-03-26 19:03:23 +01:00
Andrew Moore
b278aa4b02 Fix issue symfony/symfony#10345 '[FrameworkBundle][Console] container:debug --parameter="" not working anymore' 2014-03-26 18:53:45 +01:00
Colin O'Dell
19931c984c Added new validator for UUIDs 2014-03-26 18:50:25 +01:00
Diego Agulló
7a2f154533 Fixed ACE domain checks on UrlValidator (#10031) 2014-03-26 18:48:23 +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
Gleb Sidora
9bb602fdd5 added explicit swiftmailer flush after ConsoleEvents::TERMINATE 2014-03-26 15:23:10 +01:00
Cedric LOMBARDOT
81e94d084b Model choice accept custom unique column
Use now ->add('my_field', 'model', array('class' => 'MyClassWithSlug', 'index_property' => 'slug'));
To make choice list keys as slug
2014-03-26 15:17:28 +01:00
Stefano Sala
e2d8944076 Fixed tests after merging pattern deprecation 2014-03-26 14:16:33 +01:00
Fabien Potencier
58bdf842b7 Merge branch '2.4'
* 2.4:
  [DomCrawler] fixed wrong merge
  [Filesystem] fixed a test broken after merging the 2.3 branch
2014-03-26 13:01:00 +01:00
Fabien Potencier
5808287d52 [DomCrawler] fixed wrong merge 2014-03-26 13:00:53 +01:00
Fabien Potencier
7a29818d77 [Filesystem] fixed a test broken after merging the 2.3 branch 2014-03-26 12:55:03 +01:00
Fabien Potencier
3baa43b44e Merge branch '2.4'
* 2.4: (52 commits)
  Fix #8205 : Deprecate file mode update when calling dumpFile
  Fix #10437: Catch exceptions when reloading a no-cache request
  Fix libxml_use_internal_errors and libxml_disable_entity_loader usage
  removed ini check to make uploadedfile work on gae
  Update OptionsResolver.php
  fixed comment in forms.xml file
  Clean KernelInterface docblocks
  Cast the group name as a string
  Fixed doc of InitAclCommand
  [Form] Fix "Array was modified outside object" in ResizeFormListener.
  Fix IBAN validator
  [Process] Remove unreachable code + avoid skipping tests in sigchild environment
  Fixed bug that incorrectly causes the "required" attribute to be omitted from select even though it contains the "multiple" attribute
  Added travis_retry to .travis.yml
  [Process] fix some typos and refactor some code
  [Process] Fix unit tests in sigchild disabled environment
  [Process] Trow exceptions in case a Process method is supposed to be called after termination
  fixed typo
  [Process] fixed fatal errors in getOutput and getErrorOutput when process was not started
  [Process] Fix escaping on Windows
  ...

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php
	src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php
	src/Symfony/Component/Process/Process.php
	src/Symfony/Component/Process/ProcessPipes.php
	src/Symfony/Component/Process/Tests/AbstractProcessTest.php
2014-03-26 12:51:10 +01:00
Fabien Potencier
ab42e9cbc4 Merge branch '2.3' into 2.4
* 2.3: (34 commits)
  Fix #8205 : Deprecate file mode update when calling dumpFile
  Fix #10437: Catch exceptions when reloading a no-cache request
  Fix libxml_use_internal_errors and libxml_disable_entity_loader usage
  removed ini check to make uploadedfile work on gae
  Update OptionsResolver.php
  fixed comment in forms.xml file
  Clean KernelInterface docblocks
  Cast the group name as a string
  Fixed doc of InitAclCommand
  [Form] Fix "Array was modified outside object" in ResizeFormListener.
  Fix IBAN validator
  [Process] Remove unreachable code + avoid skipping tests in sigchild environment
  Fixed bug that incorrectly causes the "required" attribute to be omitted from select even though it contains the "multiple" attribute
  Added travis_retry to .travis.yml
  [Process] fix some typos and refactor some code
  [Process] Fix unit tests in sigchild disabled environment
  [Process] Trow exceptions in case a Process method is supposed to be called after termination
  fixed typo
  [Process] fixed fatal errors in getOutput and getErrorOutput when process was not started
  [Process] Fix escaping on Windows
  ...

Conflicts:
	src/Symfony/Component/DomCrawler/Crawler.php
	src/Symfony/Component/Filesystem/Filesystem.php
	src/Symfony/Component/Process/Process.php
2014-03-26 12:35:33 +01:00
kor3k
43451e9f50 made HttpFoundationRequestHandler a service 2014-03-26 10:57:26 +01:00
Stefano Sala
52c07c74ea Deprecated max_length and pattern options 2014-03-26 10:50:40 +01:00
Romain Neutron
cefb67a340 Fix #8205 : Deprecate file mode update when calling dumpFile 2014-03-26 08:33:01 +01:00
Romain Neutron
8e3a3951e3 Fix #10437: Catch exceptions when reloading a no-cache request 2014-03-26 08:25:06 +01:00
Romain Neutron
489b8aea90 Fix libxml_use_internal_errors and libxml_disable_entity_loader usage 2014-03-26 08:21:50 +01:00
Baptiste Clavié
849703a784 When a process fails, check if the output is enabled
With the recent addition of the ability to disable the output, it was
not taken into account within the `ProcessFailedException`.

So, if the output was indeed disabled, and the process returns an
error (i.e via a `mustRun`) we could have another LogicException which
is not expected.
2014-03-25 23:03:32 +01:00
Michele Orselli
ecb6481117 removed ini check to make uploadedfile work on gae 2014-03-25 17:54:15 +01:00
Sergey Kolodyazhnyy
5f3be0e7cb Fix Exception messages for ObjectIdentity ObjectIdentityInterface doesn't require implementing __toString method, so we need to make sure that object can be converted to string. 2014-03-25 17:45:52 +01:00
Shady
79ceb094f0 Update OptionsResolver.php
Deleting an extra space in the exception.
2014-03-25 14:10:48 +01:00
Fabien Potencier
f66bed7bac feature #10506 [Debug] sync with deprecation in DebugClassLoader (nicolas-grekas)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Debug] sync with deprecation in DebugClassLoader

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

Commits
-------

c70a468 [Debug] sync with deprecation in DebugClassLoader
2014-03-24 19:05:20 +01:00
Hugo Hamon
33c1ba7c79 fixed comment in forms.xml file 2014-03-24 19:01:48 +01:00
Sam Ward
e850b38464 Clean KernelInterface docblocks
- Fixed questionable grammar
- Added missing periods to make it consistent
2014-03-24 19:00:42 +01:00
Tobias Schultze
e3f17f9d30 add scheme option to router:match command 2014-03-21 17:50:06 +01:00
Luiz “Felds” Liscia
d685d7d08b Cast the group name as a string
This allows the options to be grouped by association fields.
2014-03-21 12:48:42 +01:00
Nicolas Grekas
c70a46837d [Debug] sync with deprecation in DebugClassLoader 2014-03-21 10:31:50 +01:00
Kévin Dunglas
c5e8a884f8 Fixed doc of InitAclCommand 2014-03-19 21:51:09 +01:00
Fabien Potencier
fc251dbcd4 bug #10410 [Form] Fix "Array was modified outside object" in ResizeFormListener. (Chekote)
This PR was squashed before being merged into the 2.3 branch (closes #10410).

Discussion
----------

[Form] Fix "Array was modified outside object" in ResizeFormListener.

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

This is the second pull request for this issue. The history of this is as follows:

Original Fix was added Feb 11th under Pull Request #10232.
Users began complaining of Doctrine ArrayCollection not being updated in forms.
Revert was added Feb 15th under Pull Request #10269.
Issue #10405 was opened on 7th Mar for the original bug.

Pull Request #10269 has a failing test that illustrates users concerns.
I have added failing tests to this pull request to illustrate the problems described in #10405.

All tests now pass, and all forms of $data are now supported, including arrays, DoctrineCollection, ArrayObject, and other IteratorAggregates.

__Details as follows:__

The onSubmit() method of the ResizeFormListener class is assuming the data is an array, and calling unset directly inside a foreach. This works fine in most scenarios, but if data is an instance of IteratorAggregate that is iterating over $data by reference, it breaks with the following error:

Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener::onSubmit(): ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in ./vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php line 142

This is because the foreach loop is using an Iterator in the background, but the ResizeFormListener has unset the underlying data directly, causing the value that the Iterators internal pointer is pointing to to change.

The Iterator provided by IteratorAggregate may or may not have the ability to modify it's underlying data. So it is not possible to rely on the Iterator to modify the data. Instead, it is simpler to avoid modifying $data at all while we are iterating over it. So instead, we simply iterate over $data once to determine the keys we need to delete, and store them. Then we iterate over the keys and delete them from $data.

Commits
-------

aa63fae [Form] Fix "Array was modified outside object" in ResizeFormListener.
2014-03-19 17:44:48 +01:00
Chekote
aa63faea06 [Form] Fix "Array was modified outside object" in ResizeFormListener. 2014-03-19 17:44:48 +01:00
Fabien Potencier
65f024234d bug #10494 [2.3][Validator] Minor fix in IBAN validator (sprain)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Validator] Minor fix in IBAN validator

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

Added more values to unit tests of IBAN validator to make clear it doesn't accept lower case letters.

> Permitted IBAN characters are the digits 0 to 9 and the 26 upper-case Latin alphabetic characters A to Z.
http://en.wikipedia.org/wiki/International_Bank_Account_Number

Also made little adjustment to code which meant to validate lowercase letters but actually was useless.

Commits
-------

3eeb306 Fix IBAN validator
2014-03-19 17:10:10 +01:00
Manuel Reinhard
3eeb3067e3 Fix IBAN validator 2014-03-19 17:04:05 +01:00
Fabien Potencier
c29b4214b6 minor #10492 [2.3][Process] Remove unreachable code + avoid skipping tests in sigchild environment (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Process] Remove unreachable code + avoid skipping tests in sigchild environment

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

As mentioned by @Tobion in https://github.com/symfony/symfony/pull/10480#issuecomment-38002910, I removed the dead code. I also fixed/updated the test suite on PHP compiled with `--enable-sigchild`.

Commits
-------

d52dd32 [Process] Remove unreachable code + avoid skipping tests in sigchild environment
2014-03-19 16:52:49 +01:00
Fabien Potencier
6586eaa35f feature #10194 [Console] Added standalone PSR-3 compliant logger (dunglas)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Console] Added standalone PSR-3 compliant logger

This PR adds a standalone, PSR-3 compliant, logger to the Console component. It logs all messages on the console output. Messages of `DEBUG`, `INFO` and `NOTICE` levels are displayed using the `info` format (default to green). Higher levels are displayed using the `error` formatter (default to red).

This logger is similar to the [Monolog's Console Handler](http://symfony.com/doc/current/cookbook/logging/monolog_console.html) but does not have any external dependency (except `php-fig/log`). This is useful for console applications and commands needing a lightweight PSR-3 compliant logger (e.g. required by a dependency or to display basic informations to the user).

An usage example is available here: https://github.com/dunglas/php-schema.org-model/blob/master/src/SchemaOrgModel/Command/GenerateEntitiesCommand.php#L71

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

Commits
-------

e40b34d [Console] Added standalone PSR-3 compliant logger
2014-03-19 16:49:37 +01:00
Kévin Dunglas
e40b34d59d [Console] Added standalone PSR-3 compliant logger 2014-03-19 16:21:15 +01:00
Romain Neutron
d52dd32bad [Process] Remove unreachable code + avoid skipping tests in sigchild environment 2014-03-19 14:56:52 +01:00
Nick Stemerdink
861d3075b3 Fixed bug that incorrectly causes the "required" attribute to be omitted from select even though it contains the "multiple" attribute 2014-03-19 14:38:32 +01:00
Philipp Rieber
e8b6978d3a [Validator] Added hasser support for entity method validation 2014-03-19 10:45:16 +01:00
Fabien Potencier
cc5f606356 minor #10484 [Process] fix some typos and refactor some code (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] fix some typos and refactor some code

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

Commits
-------

b422613 [Process] fix some typos and refactor some code
2014-03-19 07:27:25 +01:00
Fabien Potencier
b14fa26b67 feature #10476 [Console] Fixed unsetting of setted attributes on OutputFormatterStyle (Badkill)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Console] Fixed unsetting of setted attributes on OutputFormatterStyle

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

Unset only previous setted styles in place of all styles, before this fix,
OutputFormatterStyle reset all attributes with '\e[0m' sequence.
Now, if a foreground is setted, reset only the foreground so you can use innested attributes

Conflicts:
	src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php
	src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
	src/Symfony/Component/Console/Tests/Output/OutputTest.php

Commits
-------

ce0c4b4 [Console] Fixed unsetting of setted attributes on OutputFormatterStyle
2014-03-19 07:24:10 +01:00
Fabien Potencier
1e9e8afa5d bug #10479 [2.3][Process] Fix escaping on Windows (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Process] Fix escaping on Windows

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

Windows escaping is broken since the last merges.

After digging more on Windows escaping, I realised some things:
 - We forbid environment variable expansion by escaping `%APPDATA%` to `^%"APPDATA"^%`
 - We explicitly ask for variable expansion at runtime (running the command line with the [`/V:ON`](https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Process/Process.php#L235) flag). Running a command containing `!APPDATA!` will be escaped and expanded (our previous rule is easily overriden)
 - On platform that are not windows, we use strong escaping that prevents any variable expansion (`$PATH` will be escaped to `'$PATH'` that is not interpreted as the current PATH)

We have three possibilities:
 - Keep this behavior as this.
 - Prefer a consistent API and use a strong escaping strategy everywhere, but it would result in a BC break (see #8975).
 - Allow environment variable expansion and escape `%APPDATA%` to `"%APPDATA%"`

Any thoughts about this ?

Commits
-------

0f65f90 [Process] Fix escaping on Windows
2014-03-19 07:22:00 +01:00
Danilo Silva
ce0c4b4284 [Console] Fixed unsetting of setted attributes on OutputFormatterStyle
Unset only previous setted styles in place of all styles, before this fix,
OutputFormatterStyle reset all attributes with '\e[0m' sequence.
Now, if a foreground is setted, reset only the foreground so you can use innested attributes

Conflicts:
	src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php
	src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
	src/Symfony/Component/Console/Tests/Output/OutputTest.php
2014-03-18 22:29:59 +01:00
Tobias Schultze
b4226137f6 [Process] fix some typos and refactor some code 2014-03-18 21:00:58 +01:00
Romain Neutron
5f6ee1205a [Process] Fix unit tests in sigchild disabled environment 2014-03-18 19:09:01 +01:00
Fabien Potencier
c57fbdad25 bug #10480 [Process] Fixed fatal errors in getOutput and getErrorOutput when process was not started (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Fixed fatal errors in getOutput and getErrorOutput when process was not started

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

This PR replaces #9452 and address the latest changes.
Side note : I've not updated `getExitCode`, `getExitCodeText` and `isSuccessful` as they were explicitly tested to return null in case the process is not started or terminated. I think it would be a BC break to do that.

Commits
-------

449fe01 [Process] Trow exceptions in case a Process method is supposed to be called after termination
0ae6858 [Process] fixed fatal errors in getOutput and getErrorOutput when process was not started
2014-03-18 19:00:11 +01:00
Romain Neutron
449fe01992 [Process] Trow exceptions in case a Process method is supposed to be called after termination 2014-03-18 18:34:51 +01:00
Fabien Potencier
e4c4a7d538 fixed typo 2014-03-18 17:51:19 +01:00
Max Voloshin
0ae685878c [Process] fixed fatal errors in getOutput and getErrorOutput when process was not started 2014-03-18 15:14:03 +01:00
Romain Neutron
0f65f90b06 [Process] Fix escaping on Windows
Windows escaping is broken since the last merges.
2014-03-18 15:00:41 +01:00
Fabien Potencier
8170db84b3 feature #10473 [WebProfilerBundle] enhance logs display (nicolas-grekas)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[WebProfilerBundle] enhance logs display

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

Commits
-------

3e6c940 [WebProfilerBundle] enhance logs display
2014-03-18 14:44:19 +01:00
Romain Neutron
1f5bf324fe [Process] Make Process::start non-blocking on Windows platform 2014-03-18 10:55:01 +01:00
Nicolas Grekas
3e6c940495 [WebProfilerBundle] enhance logs display 2014-03-18 10:04:14 +01:00
Grégoire Pineau
6786f6db18 [Console] Rename Command::setProcessName to Command::setProcessTitle
To be more consistant with the underlying system.
2014-03-18 00:05:29 +01:00
Fabien Potencier
71dc07ce08 feature #10466 [Debug] add a screaming mode to ErrorHandler (nicolas-grekas)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Debug] add a screaming mode to ErrorHandler

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

Collect and display silenced PHP errors in the debug toolbar.

Commits
-------

5cc817d [Debug] add a screaming mode to ErrorHandler
2014-03-17 16:55:06 +01:00
Fabien Potencier
02088bc62f fixed CS 2014-03-17 16:43:11 +01:00
Wouter J
6871a614b9 [#10461] Add docs about custom environment 2014-03-17 16:16:17 +01:00
Nicolas Grekas
5cc817d1bd [Debug] add a screaming mode to ErrorHandler 2014-03-17 14:44:56 +00:00
Luis Cordova
89bde6e03b fix class namespace by @insekticid and doc block fix 2014-03-17 07:23:37 -07:00
J Bruni
d02e2aa7e8 Typo fix at UploadedFile.php documentation 2014-03-16 09:02:27 +01:00
Fabien Potencier
48c9985e73 feature #10451 [TwigBundle] Add possibility to generate absolute assets urls (romainneutron)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[TwigBundle] Add possibility to generate absolute assets urls

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/3683

This is another approach of #7722

 - [x] Add unit tests
 - [x] Update doc

Commits
-------

76b8851 [TwigBundle] Add possibility to generate absolute assets urls
2014-03-15 09:47:57 +01:00
Fabien Potencier
a635c4f9a3 bug #10456 [Process] Handle idle timeout and disabled output conflict (romainneutron)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Process] Handle idle timeout and disabled output conflict

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10453
| License       | MIT
| Doc PR        | WIP (a note should be added in the doc)

Commits
-------

ae84810 [Process] Increase tests speed
40c08c6 [Process] Handle idle timeout and disable output conflict
2014-03-15 09:40:48 +01:00
Romain Neutron
783e377eed [Process] Avoid failures because of slow IOs
See example of failure here https://travis-ci.org/symfony/symfony/jobs/20701462
2014-03-14 19:58:01 +01:00
Romain Neutron
ae8481038e [Process] Increase tests speed 2014-03-14 19:46:29 +01:00
Romain Neutron
40c08c640e [Process] Handle idle timeout and disable output conflict 2014-03-14 19:08:20 +01:00
Romain Neutron
238565e93a [Process] Avoid failure because of a slow process
See example of failure here https://travis-ci.org/symfony/symfony/jobs/20761834.
2014-03-14 18:34:18 +01:00
Romain Neutron
173f8c5fd2 [Process] Avoid failure when calling Process::stop in edge cases
See https://travis-ci.org/symfony/symfony/jobs/20664994 for an example of failure.
2014-03-14 18:34:18 +01:00
Romain Neutron
76b88511a6 [TwigBundle] Add possibility to generate absolute assets urls 2014-03-14 14:43:21 +01:00
ureimers
7fc0c5f1fd Update DefaultAuthenticationSuccessHandler.php 2014-03-14 13:21:43 +01:00
Daniel Tschinder
a8e9ed5cf1 Make it possible to match the request based on HTTP methods in the firewall configuration 2014-03-14 12:27:42 +01:00
Fabien Potencier
f0c0c2c99d tweaked sentence 2014-03-14 12:08:56 +01:00
Fabien Potencier
fe91a2ca62 bug #10448 [2.3][Process] Fix quoted arguments escaping (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Process] Fix quoted arguments escaping

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

This PR replaces #8972

Commits
-------

de681cb [Process] Add tests on ProcessUtils::escapeArgument
85fb495 [Process] Fix: Arguments including space and quote are not correctly escaped (win)
2014-03-14 12:05:38 +01:00
Fabien Potencier
79e92f95d6 bug #10444 [DomCrawler] Fixed incorrect value name conversion in getPhpValues() and getPhpFiles() (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] Fixed incorrect value name conversion in getPhpValues() and getPhpFiles()

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

This PR replaces #10193

Commits
-------

89c599e [DomCrawler] Add tests for recursive cases of getPhpValues() and getPhpFiles()
e961f57 [DomCrawler] Fixed incorrect value name conversion in getPhpValues() and getPhpFiles()
2014-03-14 12:04:24 +01:00
Fabien Potencier
bdddf3ab8c fixed typo 2014-03-14 11:12:00 +01:00
Romain Neutron
de681cbf5c [Process] Add tests on ProcessUtils::escapeArgument 2014-03-14 10:50:34 +01:00
Michal Gebauer
85fb495a30 [Process] Fix: Arguments including space and quote are not correctly escaped (win)
Bad
`"bin" "command" \""bin"\"" "\""another command"\"`

Better
`"bin" "command" "\"bin" \"another command\""`
2014-03-14 10:10:26 +01:00
Karolis Daužickas
a8fcc416b8 Minor style fix 2014-03-14 08:52:52 +01:00
Romain Neutron
5d704d906b [HttpFoundation] Add dev-dependency on Symfony Expression-Language for unit tests
This component is needed to test ExpressionRequestMatcher
2014-03-13 17:54:12 +01:00
Romain Neutron
89c599e5b7 [DomCrawler] Add tests for recursive cases of getPhpValues() and getPhpFiles() 2014-03-13 17:35:57 +01:00
Robbert Klarenbeek
e961f570b1 [DomCrawler] Fixed incorrect value name conversion in getPhpValues() and getPhpFiles() 2014-03-13 17:06:21 +01:00
Romain Neutron
85a2fbf27c [FrameworkBundle] Use DIC parameter as default host value if available 2014-03-13 16:54:59 +01:00
pmartelletti
acc66b9d72 [FrameworkBundle] Add posibility to specify method and host in router:match command 2014-03-13 14:26:26 +01:00
Fabien Potencier
1d19ca2395 Merge branch '2.3' into 2.4
* 2.3:
  [Config] made a condition more explicit
  convertDomElementToArray should handle zero values
  prefixed http:// to url output on server:run command in order to make it clickable
  Fixed data in pipe being truncated if not read before process termination
2014-03-13 06:40:32 +01:00
Fabien Potencier
c14d67c11d [SecurityBundle] changed a hardcoded string to its constant equivalent 2014-03-13 06:12:30 +01:00
Fabien Potencier
ea0598ae78 minor #10390 [Security] Add constants for access decision strategies (c960657)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Security] Add constants for access decision strategies

I suggest adding constants for the three access decision strategies (affirmative, consensus, unanimous).

They are difficult to spell, and without constants they are difficult to identify when reading the code.

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

Commits
-------

5d6ef00 Add class constants for access decision strategies.
2014-03-13 06:11:00 +01:00
Fabien Potencier
cbc2f9fd36 [Config] made a condition more explicit 2014-03-13 06:07:25 +01:00
Ben Davies
34720c921e convertDomElementToArray should handle zero values 2014-03-13 06:06:04 +01:00
Fabien Potencier
1e0fea61e8 minor #10432 clean up framework bundle commands (cordoval)
This PR was merged into the 2.5-dev branch.

Discussion
----------

clean up framework bundle commands

|Q            |A  |
|---          |---|
|Bug Fix?     |no |
|New Feature? |no |
|BC Breaks?   |no |
|Deprecations?|no |
|Tests Pass?  |yes|
|Fixed Tickets|   |
|License      |MIT|
|Doc PR       |na |

Commits
-------

0984313 clean up commands from framework bundle
2014-03-13 06:03:27 +01:00
Luis Cordova
09843131ba clean up commands from framework bundle 2014-03-12 23:58:17 -05:00
Luis Cordova
6498518925 prefixed http:// to url output on server:run command in order to make it clickable 2014-03-12 20:16:46 -05:00
Fabien Potencier
3d0913464d bug #10153 [Process] Fixed data in pipe being truncated if not read before process termination (astephens25)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Fixed data in pipe being truncated if not read before process termination

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

This is a repeat of the botched pull request #9630.

Commits
-------

7e51913 Fixed data in pipe being truncated if not read before process termination
2014-03-12 19:39:04 +01:00
Fabien Potencier
126b97a8a3 minor #10424 [2.4][Process] Fix some unit tests that create the process object instead of delegate it to the implementation (romainneutron)
This PR was merged into the 2.4 branch.

Discussion
----------

[2.4][Process] Fix some unit tests that create the process object instead of delegate it to the implementation

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

This follows #10421 in branch 2.4

Commits
-------

741a8c1 [Process] Fix some unit tests that create the process object instead of delegate it to the implementation
2014-03-12 19:30:12 +01:00
Fabien Potencier
76fbd89e02 Merge branch '2.3' into 2.4
* 2.3:
  [Process] Fix #9160 : escaping an argument with a trailing backslash on windows fails
  [Process] Fix some unit tests that create the process object instead of delegate it to the implementation
  [Process] Make process tests more accurate on exception messages
  [Process] Fix process status in TTY mode
  [Process] Use assertSame instead of assertEquals to avoid comparison against `null`
  [HttpFoundation] added some unit tests
  10158 get vary multiple
  made Cookie stringification more robust
  [Yaml] fix for a HHVM bug
2014-03-12 19:29:58 +01:00
Romain Neutron
10e903aa5d [Process] Fix #9160 : escaping an argument with a trailing backslash on windows fails 2014-03-12 15:47:04 +01:00
Aaron Stephens
7e5191375b Fixed data in pipe being truncated if not read before process termination 2014-03-12 11:51:01 +00:00
Romain Neutron
a891e14d11 [Process] Add Process::disableOutput and Process::enableOutput methods 2014-03-12 12:02:04 +01:00
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
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
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
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
Beth Binkovitz
3a4a3cbe30 10158 get vary multiple 2014-03-05 08:12:46 +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
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
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
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