Commit Graph

11047 Commits

Author SHA1 Message Date
Fabien Potencier
87f89706f2 merged branch adrienbrault/patch-2 (PR #5065)
Commits
-------

4d09907 [Serializer] Add a docblock to help type hinting

Discussion
----------

[Serializer] Add a docblock to help type hinting

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo:
License of the code: MIT
Documentation PR:
2012-07-27 09:20:54 +02:00
Fabien Potencier
1da896dc7e merged branch diaspar/2.0-pdosessionstorage-issue3255 (PR #5070)
Commits
-------

9e28593 fixed error on oracle db related to clob data. https://github.com/symfony/symfony/issues/3255

Discussion
----------

fixed error on pdosession storage for oracle db. Related to clob data

Did a change on 2.0 branch to fix this error

https://github.com/symfony/symfony/issues/3255

Tested on mysql and Oracle DB.

I also ran a phpunit test before commit:

phpunit tests/Symfony/Tests/Component/HttpFoundation/SessionStorage/PdoSessionStorageTest.php
PHPUnit 3.6.10 by Sebastian Bergmann.

Time: 0 seconds, Memory: 2.75Mb

OK (3 tests, 5 assertions)

Time: 0 seconds, Memory: 2.75Mb
2012-07-27 07:31:54 +02:00
mauricio lopez
9e285937b9 fixed error on oracle db related to clob data.
https://github.com/symfony/symfony/issues/3255
2012-07-26 11:42:25 -05:00
Fabien Potencier
d92daec6e1 merged branch bschussek/issue3179 (PR #5069)
Commits
-------

9f4178b [Validator] Fixed: StaticMethodLoader does not try to invoke methods of interfaces anymore

Discussion
----------

[Validator] Fixed: StaticMethodLoader does not try to invoke methods of interfaces anymore

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3179
Todo: -
2012-07-26 17:49:39 +02:00
Bernhard Schussek
9f4178b672 [Validator] Fixed: StaticMethodLoader does not try to invoke methods of interfaces anymore 2012-07-26 16:39:18 +02:00
Fabien Potencier
e1c65fa9c0 merged branch marcw/request-context-params (PR #5059)
Commits
-------

d30943c [FrameworkBundle] Switched to parameters for request context host and scheme

Discussion
----------

[FrameworkBundle] Switched to parameters for request context host and scheme
2012-07-26 16:16:22 +02:00
Fabien Potencier
77ce04d0b1 merged branch bschussek/normalizer-performance (PR #5067)
Commits
-------

d858f7b [OptionsResolver] Optimized previous values of a lazy option not to be evaluated if the second argument is not defined
8a338cb [OptionsResolver] Micro-optimization
e659f0e [OptionsResolver] Improved the performance of normalizers

Discussion
----------

[OptionsResolver] Improved the performance of normalizers

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

Normalizers are now stored in the Options instance only once. Previously, normalizers were stored in Options upon resolving, which meant that they were added a lot of time if the same resolver was used for many different options arrays.

This improvement led to an improvement of 30ms on http://advancedform.gpserver.dk/app_dev.php/taxclasses/1

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

by beberlei at 2012-07-26T13:34:23Z

@bschussek do you have the code for this forms somewhere btw?

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

by bschussek at 2012-07-26T13:54:52Z

@beberlei https://github.com/stof/symfony-standard/tree/twig_forms
2012-07-26 15:55:52 +02:00
Bernhard Schussek
d858f7bdf3 [OptionsResolver] Optimized previous values of a lazy option not to be evaluated if the second argument is not defined 2012-07-26 15:36:09 +02:00
Bernhard Schussek
8a338cb6fa [OptionsResolver] Micro-optimization 2012-07-26 15:32:18 +02:00
Bernhard Schussek
e659f0e39d [OptionsResolver] Improved the performance of normalizers
Normalizers are now stored in the Options instance only once. Previously,
normalizers were stored in Options upon resolving, which meant that
they were added a lot of time if the same resolver was used for many
different options arrays.

This improvement led to an improvement of 30ms on
advancedform.gpserver.dk/app_dev.php/taxclasses/1
2012-07-26 15:21:14 +02:00
Adrien Brault
4d09907362 [Serializer] Add a docblock to help type hinting 2012-07-26 15:58:31 +03:00
marc.weistroff
d30943c2e8 [FrameworkBundle] Switched to parameters for request context host and scheme 2012-07-26 11:12:14 +02:00
Fabien Potencier
d21c93455a merged branch bschussek/setdatafrombind (PR #5058)
Commits
-------

6e59e6b [Form] Fixed: setData() is now guaranteed to be invoked before bind()

Discussion
----------

[Form] Fixed: setData() is now guaranteed to be invoked before bind()

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: see the comments in d4f4038f6d
Todo: -
2012-07-26 11:09:54 +02:00
Bernhard Schussek
6e59e6b085 [Form] Fixed: setData() is now guaranteed to be invoked before bind() 2012-07-26 10:55:40 +02:00
Fabien Potencier
e08e60ce31 merged branch bschussek/issue5024 (PR #5056)
Commits
-------

ef747ff [Form] Fixed exception message in ObjectChoiceList

Discussion
----------

[Form] Fixed exception message in ObjectChoiceList

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-07-26 08:35:57 +02:00
Bernhard Schussek
ef747ff767 [Form] Fixed exception message in ObjectChoiceList 2012-07-26 08:30:26 +02:00
Fabien Potencier
b122b37be7 [Security] tweaked previous merge 2012-07-26 08:13:41 +02:00
Fabien Potencier
aed3bd3936 merged branch jonathaningram/patch-9 (PR #5055)
Commits
-------

9030dc5 [Security] add docblocks to InteractiveLoginEvent

Discussion
----------

[Security] add docblocks to InteractiveLoginEvent

Close #5053 (was easier to just create a new PR).
2012-07-26 08:12:53 +02:00
Jonathan Ingram
9030dc5dfc [Security] add docblocks to InteractiveLoginEvent
Close #5053 (was easier to just create a new PR).
2012-07-26 16:07:46 +10:00
Fabien Potencier
c98f048022 merged branch Tobion/choicelist (PR #5024)
Commits
-------

4a5dadb [Form] raise exception when label for choice cannot be read
a3cbf6b [Form] add type hint in ChoiceList
8053933 [Form] fix ChoiceList and ObjectChoiceList when choices is a Traversable
6f7ea8d [Form] fix ObjectChoiceList when property path is '0'
8da33eb [Form] fixed phpdoc of ChoiceList

Discussion
----------

	[Form] fixed ChoiceList

see commits

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

by bschussek at 2012-07-25T12:22:36Z

`iterator_to_array()` enforces an additional iteration of the traversable object. Instead of doing this in the constructor, we can just as well leave the array type hint in and let userland implement the conversion to an array.

If we want to save that additional iteration though, removing the type hint is the only option.

I don't really mind which of the two approaches we take. I just don't like a mix of them.

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

by Tobion at 2012-07-25T23:18:08Z

Ok finished by allowing Traversable in the topmost hierarchy. Other Traversables as choice item are treated as-is.
Also added phpdoc, fixed `extractLabels`, unified raised exceptions and added exception when label cannot be read that would otherwise create a php notice.

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

by bschussek at 2012-07-26T05:28:04Z

Great, looks good! 👍
2012-07-26 07:57:20 +02:00
Tobias Schultze
4a5dadb520 [Form] raise exception when label for choice cannot be read 2012-07-26 01:10:54 +02:00
Tobias Schultze
a3cbf6bbf6 [Form] add type hint in ChoiceList 2012-07-26 01:10:53 +02:00
Tobias Schultze
805393303c [Form] fix ChoiceList and ObjectChoiceList when choices is a Traversable 2012-07-26 01:10:52 +02:00
Tobias Schultze
6f7ea8dbbe [Form] fix ObjectChoiceList when property path is '0' 2012-07-26 01:05:13 +02:00
Tobias Schultze
8da33eb5bc [Form] fixed phpdoc of ChoiceList 2012-07-26 01:05:12 +02:00
Fabien Potencier
c7bc4791c4 merged branch bschussek/issue5029 (PR #5046)
Commits
-------

2607390 [Form] Fixed SearchAndRenderBlockNode to really ignore empty labels

Discussion
----------

[Form] Fixed SearchAndRenderBlockNode to really ignore empty labels

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5029
Todo: -
2012-07-25 22:54:22 +02:00
Fabien Potencier
5005b444ab merged branch bschussek/testfix (PR #5052)
Commits
-------

0315d43 [Form] Fixed failing UniqueValidatorTest when Doctrine Common 2.2 is loaded

Discussion
----------

[Form] Fixed failing UniqueValidatorTest when Doctrine Common 2.2 is loaded

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-07-25 22:52:48 +02:00
Bernhard Schussek
0315d431f4 [Form] Fixed failing UniqueValidatorTest when Doctrine Common 2.2 is loaded 2012-07-25 22:49:37 +02:00
Fabien Potencier
af47e762c3 merged branch bschussek/testfix (PR #5051)
Commits
-------

b4b5408 [Form] Fixed failing tests

Discussion
----------

[Form] Fixed failing tests

Bug fix: yes
Feature addition: no
Backwards compatibility break:
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-07-25 22:18:58 +02:00
Bernhard Schussek
b4b5408fdc [Form] Fixed failing tests 2012-07-25 22:16:38 +02:00
Fabien Potencier
2ca73f9d7e merged branch pborreli/posix-fix (PR #5047)
Commits
-------

1d6611b [Filesystem] Fixed tests on system without posix

Discussion
----------

[Filesystem] Fixed tests on system without posix

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: master is broken
Fixes the following tickets: None
License of the code: MIT
2012-07-25 21:26:35 +02:00
Fabien Potencier
9b11485f21 merged branch bschussek/remove_size (PR #5048)
Commits
-------

9622703 [Validator] Removed the Size constraint which did not exist in 2.0

Discussion
----------

[Validator] Removed the Size constraint which did not exist in 2.0

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-07-25 21:09:00 +02:00
Bernhard Schussek
9622703302 [Validator] Removed the Size constraint which did not exist in 2.0 2012-07-25 20:30:38 +02:00
Bernhard Schussek
2607390309 [Form] Fixed SearchAndRenderBlockNode to really ignore empty labels 2012-07-25 19:15:43 +02:00
Pascal Borreli
1d6611be50 [Filesystem] Fixed tests on system without posix 2012-07-25 17:04:57 +00:00
Fabien Potencier
24e3e2a1cd merged branch bschussek/group-sequence (PR #5045)
Commits
-------

2a3235a [Validator] Fixed group sequence support in the XML and YAML drivers

Discussion
----------

[Validator] Fixed group sequence support in the XML and YAML drivers

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-07-25 17:44:16 +02:00
Fabien Potencier
c6f0987771 merged branch bschussek/issue5038 (PR #5044)
Commits
-------

eeb66dd [Form] Renamed the internal FormView variables "types" and "full_block_name"
6b17640 [Form] Fixed caching of block names when types of forms with the same unique block ID differ

Discussion
----------

[Form] Fixed caching of block names when types of forms with the same unique block ID differ

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5038
Todo: -
2012-07-25 17:41:52 +02:00
Bernhard Schussek
eeb66dd2ef [Form] Renamed the internal FormView variables "types" and "full_block_name" 2012-07-25 17:35:06 +02:00
Bernhard Schussek
6b17640647 [Form] Fixed caching of block names when types of forms with the same unique block ID differ 2012-07-25 17:31:36 +02:00
Bernhard Schussek
2a3235ac22 [Validator] Fixed group sequence support in the XML and YAML drivers 2012-07-25 17:27:01 +02:00
Fabien Potencier
2bc358dbcd merged branch bschussek/issue5029 (PR #5042)
Commits
-------

fb002d8 [Form] Fixed variable passing from outer to inner blocks of the same FormView instance

Discussion
----------

[Form] Fixed variable passing from outer to inner blocks of the same FormView instance

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

This PR fixes two bugs.

The first bug is described in #5029. The second parameter to the "form_label" function in Twig, if given, always overwrote whatever label was defined previously.

```
{# null would overwrite whatever is currently set #}
form_label(form, null, { ... })
```

The second bug affected passing variables from outer to inner blocks. In the following example, "label_attr" would not be forwarded to the "form_label" function.

```
form_row(form, { "label_attr": { "class": "my_class" }})
```

Both bugs are fixed now.
2012-07-25 17:21:35 +02:00
Fabien Potencier
b52cbf46d0 merged branch gedrox/patch-1 (PR #5041)
Commits
-------

0ea3769 Fix not recognized "type" option exception

Discussion
----------

[Form] Fixed not recognized "type" option exception

The exception about not recognized "type" option was raised when "date", "datetime", "time" type was guessed by validator type guesser using the date related constraint.

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

by bschussek at 2012-07-25T11:30:23Z

Thanks! 👍
2012-07-25 17:21:08 +02:00
Fabien Potencier
950fff2790 merged branch bschussek/data (PR #5023)
Commits
-------

686bf6b [Form] Made original data of a form and choices accessible in templates

Discussion
----------

[Form] Made original data of a form and choices accessible in templates

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

Now you can access the normalized data of a form in the template:
```
form.vars.data
```
You can also access the original data of a choice, for example the entities in an entity type:
```
choice.data
```
2012-07-25 17:18:20 +02:00
Bernhard Schussek
fb002d89ea [Form] Fixed variable passing from outer to inner blocks of the same FormView instance 2012-07-25 13:20:23 +02:00
gedrox
0ea3769664 Fix not recognized "type" option exception
The exception about not recognized "type" option was raised when "date", "datetime", "time" type was guessed by validator type guesser using the date related constraint.
2012-07-25 14:05:22 +03:00
Fabien Potencier
f4570d5e73 merged branch acasademont/use_referer_with_route_name (PR #5037)
Commits
-------

307d99c [Security] Fixed use_referer option not working properly when login_path is a route name

Discussion
----------

[Security] Fixed use_referer option not working properly when login_path...

... is a route name

When use_referer is set to true and the request comes from the login page,
the user should not be redirected to the login form again (the referer) but
to the default_target_path. The problem arises when our login_path option
is not a path but a route name, as the ```getUriForPath()``` method is not
made to create routes from route names.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/acasademont/symfony.png?branch=master)](http://travis-ci.org/acasademont/symfony)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

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

by stloyd at 2012-07-24T16:24:28Z

👍
2012-07-25 11:37:42 +02:00
Fabien Potencier
965fe3258b [HttpFoundation] fixed a PHP Notice (refs #5034) 2012-07-25 09:38:36 +02:00
Fabien Potencier
207124c973 fixed CS 2012-07-25 07:24:06 +02:00
Fabien Potencier
6414c886f7 merged branch jpauli/bug5033 (PR #5034)
Commits
-------

286d03b Fix for #5033

Discussion
----------

Fix for #5033

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: duknow
Fixes the following tickets: #5033
Todo: run tests, got no testing env here
License of the code: MIT
Documentation PR:
2012-07-25 07:23:42 +02:00
Albert Casademont
307d99c8f6 [Security] Fixed use_referer option not working properly when login_path is a route name
When use_referer is set to true and the request comes from the login page,
the user should not be redirected to the login form again (the referer) but
to the default_target_path. The problem arises when our login_path option
is not a path but a route name, as the ```getUriForPath()``` method is not
made to create routes from route names.
2012-07-24 17:37:00 +02:00