Commit Graph

10756 Commits

Author SHA1 Message Date
lsmith77
cdfbe72be4 handle inheritance in config:dump-reference when a bundle name is passed to the command 2012-07-31 15:20:04 +02:00
Fabien Potencier
de958c722c merged branch bschussek/optimize-events (PR #5089)
Commits
-------

a845a28 [Form] Optimized form events to only be created on demand

Discussion
----------

[Form] Optimized form events to only be created on demand

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-07-28 09:25:08 +02:00
Bernhard Schussek
a845a28a76 [Form] Optimized form events to only be created on demand 2012-07-28 08:47:13 +02:00
Fabien Potencier
180f4a66ed merged branch pborreli/filesystem-windows (PR #5088)
Commits
-------

03c3712 [Filesystem] Fixed 2 tests throwing error on windows
3689bb8 [Filesystem] Fixed 3 failing tests on windows

Discussion
----------

[Filesystem] Fixed 5 tests on windows

Fixing 3 test expecting wrong folders :

```
-'C:\Users\pascal\AppData\Local\Temp\\1343425847694\file'
+'C:\Users\pascal\AppData\Local\Temp\1343425847694\file'
```

Fixed 2 tests on Windows caused by symlink function throwing error when first argument is not existent :
```
symlink(): Could not fetch file information(error 2)
```
2012-07-28 08:26:08 +02:00
Fabien Potencier
c56f47141f merged branch Dattaya/framework-bundle/assets-install-command (PR #5084)
Commits
-------

f402a16 [FrameworkBundle] AssetsInstallCommand. Made 'web' as a default folder.

Discussion
----------

[FrameworkBundle] AssetsInstallCommand. Made 'web' as a default folder.

Bug fix: no
Feature addition: yes
Backwards compatibility break: not sure
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT

>'The target directory (usually "web")'

It is indeed a folder that's usually used to install assets, why not making it as a default value?
2012-07-28 08:22:01 +02:00
Fabien Potencier
21d7b63ee8 merged branch Crell/redirect-set-target (PR #5081)
Commits
-------

76815fe Allow the targetUrl on a redirect response to be set explicilty.

Discussion
----------

Allow the targetUrl on a redirect response to be set explicilty.

Currently, RedirectResponse gets a Url set only when it's created, in the constructor.  There is no way to change it later.  That's a problem, because then you cannot change that Url from, say, a Kernel.response event listener.  That's a use case that Drupal in particular needs, because on redirects we allow modules to change the redirect target.  We also allow for redirect overrides via a GET parameter.

This PR refactors RedirectResponse to allow for a setTargetUrl() method.  It gets called from the constructor now, and can also be called from wherever.  It does not deal with changing the status code, just the Url (and by implication the content body).

Hopefully I got the coding style right this time... :-)

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

by vicb at 2012-07-27T15:45:47Z

> Currently, RedirectResponse gets a Url set only when it's created, in the constructor. There is no way to change it later. That's a problem, because then you cannot change that Url from, say, a Kernel.response event listener.

You can not change the target URL, but you can create a new `RedirectResponse` to override the original one (by calling `$event->setResponse()` in the listener).
2012-07-28 08:21:01 +02:00
Pascal Borreli
03c3712fb3 [Filesystem] Fixed 2 tests throwing error on windows 2012-07-28 02:26:14 +00:00
Pascal Borreli
3689bb8b9d [Filesystem] Fixed 3 failing tests on windows 2012-07-27 21:54:21 +00:00
Yaroslav Kiliba
f402a1643c [FrameworkBundle] AssetsInstallCommand. Made 'web' as a default folder. 2012-07-27 18:49:52 +03:00
Larry Garfield
76815fe664 Allow the targetUrl on a redirect response to be set explicilty. 2012-07-27 09:40:11 -05:00
Fabien Potencier
21d4973f79 merged branch pborreli/request-time (PR #5079)
Commits
-------

3e4c9b2 [Routing] Fixed alteration of $_SERVER

Discussion
----------

[Routing] Fixed alteration of $_SERVER

For test purpose [a method](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Routing/Tests/Matcher/ApacheUrlMatcherTest.php#L29) is altering $_SERVER variable.

One visible effect : phpunit crashes when trying to render coverage as it use $_SERVER['REQUEST_TIME'] which just have been unsetted by this test method.
2012-07-27 13:20:06 +02:00
Pascal Borreli
3e4c9b2824 [Routing] Fixed alteration of $_SERVER 2012-07-27 10:50:12 +00:00
Fabien Potencier
b6954e7f0b merged branch hason/ipv6matcher (PR #5078)
Commits
-------

b384c82 [HttpFoundation] Fixed checking IPv6 address without bit-length of the prefix

Discussion
----------

[HttpFoundation] Fixed checking IPv6 address without bit-length of the p...

...refix

Replaces #5031
2012-07-27 11:14:30 +02:00
Martin Hasoň
b384c82ea6 [HttpFoundation] Fixed checking IPv6 address without bit-length of the prefix 2012-07-27 11:07:24 +02:00
Fabien Potencier
beb000908c [Finder] fixed various CS issues and added a reference to the relevant PHP bug 2012-07-27 09:35:03 +02:00
Fabien Potencier
7b1d6b806e merged branch alebo/ticket_4922 (PR #4993)
Commits
-------

ae6016c [Finder] Workaround for FilterIterator-FilesystemIterator-rewind issue

Discussion
----------

[Finder] Workaround for the problem with rewind of FilterIterator with inner FilesystemIterator.

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

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

by stof at 2012-07-20T10:28:05Z

Please add some tests

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

by alebo at 2012-07-24T09:50:36Z

Any feedback yet? The new commit includes tests.
2012-07-27 09:24:52 +02:00
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
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
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