Commit Graph

10899 Commits

Author SHA1 Message Date
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
Julien Pauli
286d03b5d2 Fix for #5033 2012-07-24 17:11:14 +02:00
Fabien Potencier
2aaa4ed84e bumped Symfony version to 2.1.0-DEV 2012-07-23 19:27:52 +02:00
Bernhard Schussek
686bf6b664 [Form] Made original data of a form and choices accessible in templates 2012-07-23 19:24:46 +02:00
Fabien Potencier
d81b9f56cb updated VERSION for 2.1.0-BETA4 2012-07-23 19:10:10 +02:00
Fabien Potencier
a5451e48b7 fixed typo 2012-07-23 18:54:03 +02:00
Fabien Potencier
7878449822 merged branch Tobion/patch-4 (PR #5022)
Commits
-------

22dfa7d remove relict in upgrade

Discussion
----------

remove relict in upgrade
2012-07-23 18:21:21 +02:00
Tobias Schultze
22dfa7de54 remove relict in upgrade 2012-07-23 19:12:06 +03:00
Fabien Potencier
8d33ba9fc5 merged 2.0 2012-07-23 16:25:26 +02:00
Fabien Potencier
bceb28ff7a merged branch parhs/2.0 (PR #5005)
Commits
-------

5bfc25e Fixed buildViewBottomUp docs

Discussion
----------

Fixed buildViewBottomUp docs

Fixed documentation
2012-07-23 16:23:36 +02:00
Fabien Potencier
76c1e26272 moved deps in recommend to suggest 2012-07-23 16:23:01 +02:00
Fabien Potencier
1c63821924 merged branch lyrixx/patch-security (PR #5020)
Commits
-------

e1f1d3a Added missing property

Discussion
----------

[Security] Added missing property

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
2012-07-23 16:21:26 +02:00
Grégoire Pineau
e1f1d3a1f7 Added missing property 2012-07-23 16:09:36 +02:00
Fabien Potencier
f58c27544d merged branch drak/nativefile_savepath (PR #5016)
Commits
-------

ff273af [HttpFoundation][Sessions] Micro-optimization
9bf3cb4 [HttpFoundation][Sessions] Add support for extended save_path for native files save handler

Discussion
----------

[Sessions] Add support for extended save_path for native files save handler

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4908
Todo: -
License of the code: MIT
Documentation PR: -
2012-07-23 15:55:36 +02:00
Fabien Potencier
208faf4f4b merged branch bamarni/patch-2 (PR #5018)
Commits
-------

91415b1 removed unneeded class to compile

Discussion
----------

removed unneeded class to compile

As the redirectable matcher a few lines below is a child class.

I'm not sure if it's the other one that should be removed instead? As it's not always required, when using the apache matcher for example.
2012-07-23 15:54:36 +02:00
Drak
ff273af546 [HttpFoundation][Sessions] Micro-optimization 2012-07-23 12:18:38 +01:00
Bilal Amarni
91415b1371 removed unneeded class to compile 2012-07-23 12:27:23 +03:00
Drak
9bf3cb4e97 [HttpFoundation][Sessions] Add support for extended save_path for native files save handler 2012-07-23 09:59:09 +01:00
Fabien Potencier
c20c1d18dc merged branch bschussek/propertypath (PR #5011)
Commits
-------

dd2aa54 [Form] Disabled manual singulars in PropertyPath until the syntax is finalized

Discussion
----------

[Form] Disabled manual singulars in PropertyPath until the syntax is finalized

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-07-22 10:03:04 +02:00
Fabien Potencier
4bafd1d788 [FrameworkBundle] removed temporary XDebug hack as the nesting issue has been resolved now 2012-07-22 10:02:56 +02:00
Bernhard Schussek
dd2aa54e15 [Form] Disabled manual singulars in PropertyPath until the syntax is finalized 2012-07-22 09:58:31 +02:00
Fabien Potencier
214e0554be merged branch bschussek/renderer (PR #5006)
Commits
-------

dc3a680 [Form] Improved FormRenderer API to reduce the size of the function call stack during rendering

Discussion
----------

[Form] Improved FormRenderer API to decrease the function call stack

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

This PR reduces the function call stack size when rendering by directly calling the methods `renderBlock` and `searchAndRenderBlock` (formerly `renderSection`) and removing the delegating methods `render(Widget|Label|Row|...)`.

It breaks BC in that PHP templates now need to pass the FormView instance to `block` (formerly `renderBlock`). This is necessary, otherwise that function may behave buggy in special circumstances.

Otherwise this PR cleans up API method and parameter names to improve clarity.
2012-07-22 09:50:28 +02:00
Fabien Potencier
8cc0cb7610 merged branch bschussek/issue4960 (PR #5010)
Commits
-------

eccc5bd [Form] Restored BC in AbstractType::getDefaultOptions() and getAllowedOptionValues()

Discussion
----------

[Form] Restored BC in AbstractType::getDefaultOptions() and getAllowedOptionValues()

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4960
Todo: -
2012-07-22 09:48:14 +02:00
Bernhard Schussek
eccc5bd0c6 [Form] Restored BC in AbstractType::getDefaultOptions() and getAllowedOptionValues() 2012-07-22 09:36:58 +02:00
Bernhard Schussek
dc3a680cd3 [Form] Improved FormRenderer API to reduce the size of the function call stack during rendering 2012-07-22 09:29:35 +02:00
Fabien Potencier
1be155ab8c [HttpFoundation] never send a 304 for non-safe HTTP methods 2012-07-21 21:52:19 +02:00
Fabien Potencier
019625d34e merged branch bschussek/options_performance (PR #5004)
Commits
-------

24b764e [Form] Fixed issues mentioned in the PR
9216816 [Form] Turned Twig filters into tests
310f985 [Form] Added a layer of 2.0 BC methods to FormView and updated UPGRADE and CHANGELOG
5984b18 [Form] Precalculated the closure for deciding whether a choice is selected (PHP +30ms, Twig +30ms)
5dc3c39 [Form] Moved the access to templating helpers out of the choice loop for performance reasons (PHP +100ms)
0ef9acb [Form] Moved the method isChoiceSelected() to the ChoiceView class (PHP +150ms)
8b72766 [Form] Tweaked the generation of option tags for performance (PHP +200ms, Twig +50ms)
400c95b [Form] Replace methods in ChoiceView by public properties (PHP +100ms, Twig +400ms)
d072f35 [Form] The properties of FormView are now accessed directly in order to increase performance (PHP +200ms, Twig +150ms)

Discussion
----------

[Form] Made FormView and ChoiceView properties public for performance reasons

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

This PR changes the access to properties of `FormView` and `ChoiceView` objects from getters to direct property accesses. On [my example form](http://advancedform.gpserver.dk/app_dev.php/taxclasses/1) this improves rendering performance for **300ms** with PHP templates and **550ms** with Twig on my local machine.

Unfortunately, this breaks BC both with 2.0 and with the current master in Form Types and PHP templates. Twig templates are not affected by this change.

2.0:
```
$formView->set('my_var', 'foobar');
$formView->get('my_var');
$formView->getChild('childName');
$formView['childName'];
```

master:
```
$formView->setVar('my_var', 'foobar');
$formView->getVar('my_var');
$formView->get('childName');
$formView['childName'];
```

this PR:
```
$formView->vars['my_var'] = 'foobar';
$formView->vars['my_var'];
$formView->children['childName'];
$formView['childName'];
```

Should we add methods to keep BC with 2.0?

The second part of this PR contains improvements to the rendering of choice fields. These gain another **~500ms** for PHP templates and **80ms** for Twig. These improvements are BC, unless you overwrote the block "choice_widget_options" in your form themes which then needs to be adapted.

**Update:**

The PR now includes a BC layer for 2.0.

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

by stof at 2012-07-21T11:37:41Z

@bschussek couldn't we keep the getters and setters for BC even if the rendering accesses the public properties directly ?

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

by bschussek at 2012-07-21T11:52:33Z

@stof A BC layer for 2.0 is now included. People who upgraded to master already unfortunately need to adapt their code.

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

by sstok at 2012-07-21T12:40:57Z

👍
2012-07-21 19:51:42 +02:00
Bernhard Schussek
24b764e066 [Form] Fixed issues mentioned in the PR 2012-07-21 19:45:31 +02:00
Bernhard Schussek
921681658c [Form] Turned Twig filters into tests 2012-07-21 17:26:50 +02:00
Bernhard Schussek
310f985b99 [Form] Added a layer of 2.0 BC methods to FormView and updated UPGRADE and CHANGELOG 2012-07-21 13:49:32 +02:00
Fabien Potencier
6c256b01b0 merged branch KaipiYann/Fix-DocBlock-attemptAuthentication (PR #4996)
Commits
-------

134cc84 [Security] Fix DocBlock of attemptAuthentication

Discussion
----------

[Security] Fix DocBlock of attemptAuthentication

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-21 13:16:18 +02:00
Fabien Potencier
70477b7c95 merged branch Slamdunk/hotfix/late-static-create (PR #4991)
Commits
-------

9dc2011 Late static factory method

Discussion
----------

Late static factory method

When using `Symfony\CS\Finder\DefaultFinder::create()`, we lose all `Symfony\CS\Finder\DefaultFinder::__construct()` properties because main `Finder` does not use late static binding.

This commit resolves the issue.
2012-07-21 13:14:55 +02:00
Fabien Potencier
deb98d9163 merged branch bschussek/setdata_performance (PR #5003)
Commits
-------

d4f4038 [Form] Reduced the number of setData() calls by deferring a Form's initialization (+40ms)

Discussion
----------

[Form] Reduced the number of setData() calls

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

This PR decreases the number of expensive `setData()` calls on `Form` instances by deferring the form's initialization with default data to the first call to a `get*Data()` method. If `setData()` is called manually before invoking `get*Data()`, the initialization with the default data will not take place.

Before:

```
$form = new Form($config); // implicit setData($config->getData());
$form->setData($object); // setData() is now called twice
```

After:

```
$form = new Form($config); // no implicit setData()
$form->getData(); // implicit setData($config->getData())

// or

$form = new Form($config);
$form->setData($object);
$form->getData(); // setData() was called only once
```
2012-07-21 13:12:45 +02:00
Fabien Potencier
a089b3c7d3 merged branch ddebree/patch-1 (PR #5001)
Commits
-------

37bbd0f Moved symfony/config from the "recommend" dependency to the "suggest" dependency. Cannot find "recommend" in composer documentation

Discussion
----------

Moved symfony/config from the "recommend" dependency to the "suggest" dependancy

Moved symfony/config from the "recommend" dependency to the "suggest" dependency. Cannot find "recommend" in composer documentation

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

by igorw at 2012-07-21T10:52:19Z

Recommend used to exist but was removed.

👍
2012-07-21 13:10:55 +02:00
Fabien Potencier
638058ad84 merged branch bschussek/filtertonormalizer (PR #5002)
Commits
-------

3075fa6 [OptionsResolver] Renamed filters to normalizers

Discussion
----------

[OptionsResolver] Renamed filters to normalizers

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

This PR fixes the naming to be in line with the Serializer component.
2012-07-21 13:09:22 +02:00
Bernhard Schussek
3075fa6b39 [OptionsResolver] Renamed filters to normalizers 2012-07-21 13:02:12 +02:00
Bernhard Schussek
d4f4038f6d [Form] Reduced the number of setData() calls by deferring a Form's initialization (+40ms) 2012-07-21 12:57:35 +02:00
Bernhard Schussek
5984b18a7a [Form] Precalculated the closure for deciding whether a choice is selected (PHP +30ms, Twig +30ms) 2012-07-21 12:56:50 +02:00
Bernhard Schussek
5dc3c39fd2 [Form] Moved the access to templating helpers out of the choice loop for performance reasons (PHP +100ms) 2012-07-21 12:56:50 +02:00
Bernhard Schussek
0ef9acb479 [Form] Moved the method isChoiceSelected() to the ChoiceView class (PHP +150ms) 2012-07-21 12:56:50 +02:00
Bernhard Schussek
8b72766473 [Form] Tweaked the generation of option tags for performance (PHP +200ms, Twig +50ms) 2012-07-21 12:56:50 +02:00
Bernhard Schussek
400c95bb4d [Form] Replace methods in ChoiceView by public properties (PHP +100ms, Twig +400ms) 2012-07-21 12:56:11 +02:00
Bernhard Schussek
d072f35ea0 [Form] The properties of FormView are now accessed directly in order to increase performance (PHP +200ms, Twig +150ms) 2012-07-21 12:56:11 +02:00
ddebree
37bbd0f60a Moved symfony/config from the "recommend" dependency to the "suggest" dependency. Cannot find "recommend" in composer documentation 2012-07-21 13:17:54 +03:00
parhs
5bfc25e6b3 Fixed buildViewBottomUp docs 2012-07-21 00:54:17 +03:00
Alex Bogomazov
ae6016c6fc [Finder] Workaround for FilterIterator-FilesystemIterator-rewind issue 2012-07-20 19:29:53 +03:00
Kaipi Yann
134cc84e99 [Security] Fix DocBlock of attemptAuthentication
Add Response as possible return type of the method because the method AbstractAuthenticationListener::handle() test if $returnValue is an instance of Response (line 148).
2012-07-20 15:46:05 +02:00
Filippo Tessarotto
9dc20116e3 Late static factory method 2012-07-20 11:54:42 +02:00
Fabien Potencier
9f157a1616 merged branch docteurklein/unique-entity-validator-with-custom-repository-method (PR #4979)
Commits
-------

4eb54a0 update CHANGELOG
db9ea09 [Doctrine] [Bridge] fix repositoryMethod test
2a6c222 Add a customRepository option to the uniqueEntity validator

Discussion
----------

[Doctrine] [Bridge] Add a "repositoryMethod" option to the uniqueEntity validator

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: ~

This allows to configure the repository method used to verify uniqueness of entity.
Before, it was always using `findBy`.

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

by fabpot at 2012-07-20T05:35:28Z

Can you add a note in the CHANGELOG?

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

by docteurklein at 2012-07-20T07:17:08Z

@fabpot done.
2012-07-20 11:35:08 +02:00