Commit Graph

10442 Commits

Author SHA1 Message Date
Fabien Potencier 5da1bc6a4f added missing listener priority changes in the UPGRADE file (refs #2680) 2012-07-11 09:36:00 +02:00
Fabien Potencier 75dfc8fe97 merged branch bschussek/issue3162 (PR #4839)
Commits
-------

ded6c03 [Form] DateTimeType now handles RFC 3339 dates as provided by HTML5
7e8b622 [Form] Added the option "format" to DateTimeType
9eeb200 [Form] Changed the default format of DateType to "yyyy-MM-dd" to support HTML 5 out of the box
d621a76 [Form] Improved DateTimeType code

Discussion
----------

[Form] Changed DateType and DateTimeType to support HTML5 by default

Bug fix: no
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #2849, #3162
Todo: -

This PR changes DateType and DateTimeType to support HTML5 by default when setting the option "widget" to "single_text".

Also, the option "format" was added to DateTimeType.

---------------------------------------------------------------------------

by stof at 2012-07-10T15:38:44Z

This loos OK to me

---------------------------------------------------------------------------

by MDrollette at 2012-07-10T16:36:26Z

@stof typo: "looks" #meta-stoffed
2012-07-11 09:09:08 +02:00
Bernhard Schussek ded6c0305c [Form] DateTimeType now handles RFC 3339 dates as provided by HTML5 2012-07-11 09:06:31 +02:00
Fabien Potencier a94d41d97b merged branch jonathaningram/override_kernel_name (PR #4846)
Commits
-------

02e0a8f Allow Kernel::$name to be overridden by subclasses

Discussion
----------

Allow Kernel::$name to be overridden by subclasses

Because the name of the kernel is calculated in the constructor,
any child class that had overriden the kernel name, will be
ignored.

By setting the kernel name in the child class, we can avoid having
to execute the regex to calculate the name upon every construction
of a Kernel.

A test (and a kernel fixture) is added to prove that the override
works correctly.

Note: the Kernel API has not been touched, so there should be no
issues with BC.

What do you think?
2012-07-11 08:25:20 +02:00
Fabien Potencier bfda8a3c29 merged branch aharonp/master (PR #4842)
Commits
-------

6def8d1 Refactored Filesystem::makePathRelative function to correctly handle more use-cases

Discussion
----------

Refactored the makePathRelative function

The function was failing in a number of different use cases because the function was incorrectly using a character offset comparison to determine where the common path stops.

I've fixed this by splitting up the paths into their individual directories and then comparing the directory names.

If the paths match then the function will return `./` and not an empty string. This is for consistency sake, to ensure all returned paths end with `/`.
2012-07-11 08:24:17 +02:00
Jonathan Ingram 02e0a8f232 Allow Kernel::$name to be overridden by subclasses
Because the name of the kernel is calculated in the constructor,
any child class that had overriden the kernel name, will be
ignored.

By setting the kernel name in the child class, we can avoid having
to execute the regex to calculate the name upon every construction
of a Kernel.

A test (and a kernel fixture) is added to prove that the override
works correctly.

Note: the Kernel API has not been touched, so there should be no
issues with BC.
2012-07-11 16:13:02 +10:00
Aharon Perkel 6def8d1dd1 Refactored Filesystem::makePathRelative function to correctly handle more use-cases 2012-07-11 01:22:37 +03:00
Fabien Potencier 064ad6255c [HttpFoundation] allow _method to be set in the query string (closes #4202) 2012-07-10 22:17:24 +02:00
Fabien Potencier 9a2c61780b [ClassLoader] fixed order of interfaces in generated class collection caches (closes #4841) 2012-07-10 20:28:16 +02:00
Bernhard Schussek 7e8b622802 [Form] Added the option "format" to DateTimeType 2012-07-10 17:23:19 +02:00
Fabien Potencier e83c1a590a [HttpKernel] tweaked a phpdoc 2012-07-10 16:40:07 +02:00
Fabien Potencier 97b2256b69 merged branch rdohms/enumNode-bug (PR #4838)
Commits
-------

1b08cd1 `values()` function did not return the object, this breaking the fluent interface.

Discussion
----------

[Config][EnumNode] Fluent Interface is broken

`values()` function did not return the object, this breaking the fluent interface.

Added a `return $this` so that usage of this node works as expected:

    ->enumNode('foo')->values(array('a', 'b'))->end()

---------------------------------------------------------------------------

by fabpot at 2012-07-10T14:21:25Z

Can you reopen a PR for the 2.0 branch instead? Thanks.

---------------------------------------------------------------------------

by rdohms at 2012-07-10T14:25:05Z

@fabpot yeah.

---------------------------------------------------------------------------

by rdohms at 2012-07-10T14:27:42Z

@fabpot Actually, sorry, this node is not in 2.0 it was introduced in 2.1 last month.
2012-07-10 16:28:28 +02:00
Rafael Dohms 1b08cd1058 `values()` function did not return the object, this breaking the fluent interface.
Added a `return $this` so that usage of this node works as expected:
    ->enumNode('foo')->values(array('a', 'b'))->end()
2012-07-10 16:14:17 +02:00
Bernhard Schussek 9eeb20044f [Form] Changed the default format of DateType to "yyyy-MM-dd" to support HTML 5 out of the box 2012-07-10 16:10:57 +02:00
Fabien Potencier 6782c78b95 merged branch jfsimon/issue-4752 (PR #4832)
Commits
-------

50cf928 [Console] Removed pointless constant.
14bd5ba [Console] 'formatBlock' helper now escape messages.
aaf4950 [Console] Implemented '<' escaping.
8cf82b7 [Console] Added '<' escaping tests.

Discussion
----------

Issue 4752

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4752

This PR adds possibility to escape `<` chars with `\` to avoid formatting mess.
In addition, `FormatterHelper::formatBlock()` method auto-escapes messages.
2012-07-10 15:25:29 +02:00
Fabien Potencier 884fffa9c0 [Process] fixed setTimeout() to not allow negative timeout values (closes #4647) 2012-07-10 15:21:59 +02:00
Fabien Potencier 80040c6a29 [Process] removed uninteresting tests 2012-07-10 15:19:05 +02:00
Bernhard Schussek d621a76f28 [Form] Improved DateTimeType code 2012-07-10 15:18:47 +02:00
Fabien Potencier 5f5efaf5c2 merged branch bschussek/issue3387 (PR #4835)
Commits
-------

5b057f8 [Form] Fixed DateType to use "format" for creating the year and day choices

Discussion
----------

[Form] Fixed DateType to use "format" for creating the year and day choices

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3490
Todo: -
2012-07-10 14:58:28 +02:00
Fabien Potencier c47bbc129e [HttpKernel] tried to clarify the goal of Bundle::getParent() (closes #4347) 2012-07-10 14:55:30 +02:00
Bernhard Schussek 5b057f89b0 [Form] Fixed DateType to use "format" for creating the year and day choices 2012-07-10 14:53:17 +02:00
jfsimon 50cf9287be [Console] Removed pointless constant. 2012-07-10 14:40:39 +02:00
Fabien Potencier 7a181002d5 [Console] replaced var_export with json_encode for default values when exported as text/xml to make them more readable (closes #4193) 2012-07-10 13:24:16 +02:00
Fabien Potencier 5487a1f076 merged branch ChrisTickner/formbuilder_remove_bug_fix (PR #4826)
Commits
-------

f71e2a8 [Form] FormBuilder Bug Fix: remove() was not properly removing children

Discussion
----------

[Form] FormBuilder Bug Fix: remove() was not properly removing children

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4803
License of the code: MIT

FormBuilder initially sets unresolved children as NULL, until resolved.
 If FormBuilder::remove() is called before that child is resolved, the
if statement turns false, because isset(null) is false, when it should
be true.  Instead, we should check to see if the key exists, and if so,
process and unset it.

Closes #4803

---------------------------------------------------------------------------

by bschussek at 2012-07-10T07:41:55Z

Can you please add a test covering this case?

---------------------------------------------------------------------------

by ChrisTickner at 2012-07-10T09:43:07Z

Sure, added a test case.  It fails before the patch and passes after.

---------------------------------------------------------------------------

by bschussek at 2012-07-10T09:47:06Z

Thanks. Can you please add a comment to the test with the URL of this PR? Also, please squash your commits into one when your done.

---------------------------------------------------------------------------

by ChrisTickner at 2012-07-10T10:02:16Z

Oops, I deleted the remote branch and re-pushed without realizing we'd lose some history on this PR page.  Live and learn I suppose.

---------------------------------------------------------------------------

by bschussek at 2012-07-10T10:18:20Z

Thanks!
2012-07-10 12:18:45 +02:00
Fabien Potencier ade6448547 merged branch bschussek/issue4102 (PR #4831)
Commits
-------

87fe487 Revert "[Form] Add default validation to TextType field (and related)"

Discussion
----------

Revert "[Form] Add default validation to TextType field (and related)"

This reverts commit 49d2685bff.

Conflicts:

	src/Symfony/Component/Form/Extension/Core/DataTransformer/ValueToStringTransformer.php
	src/Symfony/Component/Form/Extension/Core/Type/TextType.php
	src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToStringTransformerTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php
2012-07-10 12:01:07 +02:00
jfsimon 14bd5ba37c [Console] 'formatBlock' helper now escape messages. 2012-07-10 12:00:17 +02:00
Chris Tickner f71e2a8c7a [Form] FormBuilder Bug Fix: remove() was not properly removing children
FormBuilder initially sets unresolved children as NULL, until resolved.
 If FormBuilder::remove() is called before that child is resolved, the
if statement turns false, because isset(null) is false, when it should
be true.  Instead, we should check to see if the key exists, and if so,
process and unset it.

Closes #4803
2012-07-10 06:56:48 -03:00
Bernhard Schussek 87fe4871cd Revert "[Form] Add default validation to TextType field (and related)"
This reverts commit 49d2685bff.

Conflicts:

	src/Symfony/Component/Form/Extension/Core/DataTransformer/ValueToStringTransformer.php
	src/Symfony/Component/Form/Extension/Core/Type/TextType.php
	src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToStringTransformerTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php
2012-07-10 11:56:29 +02:00
Fabien Potencier 878e86db8a added global variables access in a form theme (closes #3058) 2012-07-10 11:44:08 +02:00
jfsimon aaf4950d4f [Console] Implemented '<' escaping. 2012-07-10 11:13:16 +02:00
jfsimon 8cf82b7a11 [Console] Added '<' escaping tests. 2012-07-10 11:12:54 +02:00
Fabien Potencier 7f0274462f merged branch SamsonIT/property_path_error (PR #4829)
Commits
-------

6ad4018 [Form] Also display the hint about adder/remover on invalid property access

Discussion
----------

[Form] Also display the hint about adder/remover on invalid property access

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -

This PR follows up #4777. In this case the hint about adders and removers is also added when a property is found, but is not public, a common case.
2012-07-10 10:52:04 +02:00
Fabien Potencier 98e10c6175 merged branch bschussek/optionfix (PR #4830)
Commits
-------

c6cb8b2 [Form] Removed unused option "inline" that was introduced by accident

Discussion
----------

[Form] Removed unused option "inline" that was introduced by accident

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-07-10 10:50:43 +02:00
Bernhard Schussek c6cb8b2855 [Form] Removed unused option "inline" that was introduced by accident 2012-07-10 10:49:15 +02:00
Bart van den Burg 6ad4018ff5 [Form] Also display the hint about adder/remover on invalid property access 2012-07-10 10:23:34 +02:00
Fabien Potencier a640a33a24 merged branch mythmakr/3686-min-max-validators-to-ignore-empty-string (PR #4188)
Commits
-------

f30bf36 Min/Max Validators ignore empty string
e9f5f13 Added test Min/Max validators should ignore empty string

Discussion
----------

[Validator] Min/Max validators should ignore empty string

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes ![Build status](https://secure.travis-ci.org/mythmakr/symfony.png?branch=3686-min-max-validators-to-ignore-empty-string)
Fixes the following tickets: #3686
Closed related PR #3687
Todo:
2012-07-10 10:21:58 +02:00
Fabien Potencier 412d9c27be Merge branch '2.0'
* 2.0:
  [Form] Fixed errors not to be added onto non-synchronized forms
2012-07-10 10:06:58 +02:00
Fabien Potencier b260f30a2e merged branch bschussek/issue4686 (PR #4828)
Commits
-------

854daa8 [Form] Fixed errors not to be added onto non-synchronized forms

Discussion
----------

[Form] Fixed errors not to be added onto non-synchronized forms

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4686
Todo: -
2012-07-10 10:05:53 +02:00
Bernhard Schussek 854daa8f83 [Form] Fixed errors not to be added onto non-synchronized forms 2012-07-10 10:03:06 +02:00
Fabien Potencier c8c26d05a0 merged branch bschussek/issue4535 (PR #4827)
Commits
-------

e8bb834 [Form] Fixed data to be written back by PropertyPath if it cannot be handled by reference

Discussion
----------

[Form] Fixed data to be written back by PropertyPath if it cannot be handled by reference

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4535
Todo: -
2012-07-10 09:41:45 +02:00
Bernhard Schussek e8bb834a54 [Form] Fixed data to be written back by PropertyPath if it cannot be handled by reference 2012-07-10 09:38:32 +02:00
Fabien Potencier 9e32d9029f [FrameworkBundle] tweaked previous merge 2012-07-10 08:56:32 +02:00
Fabien Potencier f2958b3fb6 merged branch merk/routing-bug (PR #4823)
Commits
-------

c061c30 Router#resolveString should return null instead of empty string when $value is null
a1d1a02 Null default value route regression

Discussion
----------

[Router] Null default value route regression

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4823
Todo:
License of the code: MIT
Documentation PR:

---

The commit by @vicb 0555913fbb introduces a regression in the handling of default values that are null, while there are requirements still set for this value.

This is a failing test case and fix for the issue.

---------------------------------------------------------------------------

by merk at 2012-07-10T04:24:40Z

Now contains a fix, tests now pass.
2012-07-10 08:50:31 +02:00
Fabien Potencier 2c6b825068 merged branch zachbadgett/framework_bundle_delegating_engine (PR #4824)
Commits
-------

2fa98e8 [FrameworkBundle] Changed DelegatingEngine::renderResponse to use specified engine's renderResponse

Discussion
----------

[FrameworkBundle] Changed DelegatingEngine::renderResponse to use specified engine's renderResponse

Currently the DelegatingEngine in the FrameworkBundle has a renderResponse method that creates a new response, it should use the engine's renderResponse since EngineInterface requires a renderResponse to be defined and gives more flexibly to change the response object when creating a new templating engine.

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
2012-07-10 08:42:11 +02:00
Fabien Potencier 4bab36b2c7 merged branch bschussek/issue3899 (PR #4813)
Commits
-------

9c94b48 [Form] Fixed the "data" option to supersede default data set in the model

Discussion
----------

[Form] Fixed the "data" option to supersede default data set in the model

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3899
Todo: -
2012-07-10 08:22:37 +02:00
Fabien Potencier feab81117b merged branch bschussek/bind_request (PR #4811)
Commits
-------

7727de7 [Form] Deprecated Form::bindRequest() and replaced it by a PRE_BIND listener

Discussion
----------

[Form] Deprecated Form::bindRequest() and replaced it by a PRE_BIND listener

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

Instead of `bindRequest`, you should now simply call `bind`:

Before:

```
$form->bindRequest($request);
```

After:

```
$form->bind($request);
```
2012-07-10 08:21:54 +02:00
Fabien Potencier aa007c235f merged branch fixe/patch-4 (PR #4821)
Commits
-------

c4d4d2e Removed extra new line

Discussion
----------

Removed extra new line
2012-07-10 07:48:15 +02:00
Fabien Potencier 1e138ae702 merged branch fixe/patch-5 (PR #4822)
Commits
-------

f5cf28f Updated Portuguese translation

Discussion
----------

Updated Portuguese translation

Based on #4820
2012-07-10 07:47:32 +02:00
Fabien Potencier 3051a82eb7 merged branch eriksencosta/pt-br-translation (PR #4820)
Commits
-------

19cdc8f updated Brazilian Portuguese translation

Discussion
----------

updated Brazilian Portuguese translation
2012-07-10 07:47:15 +02:00
Fabien Potencier 5345b59dd8 merged branch Nanocom/twigbundle_fix_error_message (PR #4818)
Commits
-------

dc4d343 [TwigBundle] Fixed error message

Discussion
----------

[TwigBundle] Fixed error message

Small fix to display the filename that cannot be read in the Twig Lint command.
2012-07-10 07:46:57 +02:00