Commit Graph

9952 Commits

Author SHA1 Message Date
Fabien Potencier
9e9519913d merged branch bschussek/emailfix (PR #4421)
Commits
-------

9051622 Fixing email

Discussion
----------

Fixing email address

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

by travisbot at 2012-05-26T07:54:42Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1440253) (merged 90516223 into 7e28a06d).
2012-05-26 10:01:58 +02:00
Bernhard Schussek
90516223ab Fixing email 2012-05-26 09:48:33 +02:00
Fabien Potencier
7e28a06de6 merged branch jaugustin/patch-1 (PR #4410)
Commits
-------

09e5f46 fix markdown for code

Discussion
----------

fix markdown for code in  UPGRADE-2.1.md

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

by travisbot at 2012-05-25T12:20:04Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1432391) (merged 09e5f462 into 023dbf80).

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

by jaugustin at 2012-05-25T12:22:13Z

great I didn't break anything :D
2012-05-26 08:39:18 +02:00
Fabien Potencier
ff56c78424 merged branch schmittjoh/enumNode (PR #4420)
Commits
-------

8308aea [Config] added EnumNode

Discussion
----------

[Config] added EnumNode

This adds an EnumNode which should be used instead of a Closure and manual validation.

The benefit is that you can retrieve the allowed values. It is also a bit shorter, but that is not the main point here.

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

by travisbot at 2012-05-26T03:52:50Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1439264) (merged 8308aea9 into ff4d446c).
2012-05-26 08:38:44 +02:00
Fabien Potencier
def316fcd9 merged branch shieldo/patch-5 (PR #4415)
Commits
-------

3c507ee fixed CS (whitespace)

Discussion
----------

fixed CS (whitespace)

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

by travisbot at 2012-05-25T17:50:41Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1435274) (merged 3c507ee4 into ff4d446c).
2012-05-26 08:38:27 +02:00
Fabien Potencier
05f9cfed0a merged branch yethee/form_cleanup (PR #4417)
Commits
-------

b4e2818 [Form] Using new methods instead of the deprecated

Discussion
----------

[Form] Using new methods instead of the deprecated

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

by travisbot at 2012-05-25T21:05:11Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1436891) (merged b4e28186 into ff4d446c).
2012-05-26 08:38:09 +02:00
Fabien Potencier
0a473895c8 merged branch Tobion/pp-refactor (PR #4418)
Commits
-------

e673a04 [OptionsResolver] clarify phpdoc
0cac404 [Form] refactored PropertyPth

Discussion
----------

PropertyPath refactoring + CS fix

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

by travisbot at 2012-05-25T21:49:01Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1437257) (merged e673a041 into ff4d446c).
2012-05-26 08:37:14 +02:00
Fabien Potencier
96bfdacb3f merged branch zerkalica/master (PR #4328)
Commits
-------

c688166 [Form] fixing form type translation_domain inheritance fixed bug with parent property fix is_required field fixed subform translation_domain inheritance some translation_domain inheritance code refactoring added form type translation_domain inheritance tests changed methods place in form type test changed arguments in createNamed method call in FormTypeTest

Discussion
----------

FormType translation_domain inheritance

Fixes: #3286, #3872, #3938

I found bug in form type parameters inheritance. It's better to inherit some child form element options from parent: translation_domain, required.

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

by travisbot at 2012-05-18T13:11:45Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1366275) (merged afc32247 into 1e15f210).

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

by travisbot at 2012-05-18T13:14:46Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1366288) (merged 1794dc79 into 1e15f210).

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

by travisbot at 2012-05-18T13:54:41Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1366673) (merged 2f5d0377 into 1e15f210).

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

by travisbot at 2012-05-18T14:53:58Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1367306) (merged a4027f38 into 1e15f210).

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

by bschussek at 2012-05-20T14:55:14Z

This PR has a few outstanding issues and is missing some tests (check read_only tests in FormTypeTest). Otherwise this looks good.

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

by travisbot at 2012-05-22T04:48:47Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1396892) (merged 68534d7e into 1e15f210).

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

by bschussek at 2012-05-22T07:36:47Z

Looks good. Could you please squash your commits into one commit (git rebase -i) and add the prefix "[Form]" to the message of that commit?

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

by zerkalica at 2012-05-22T09:36:33Z

Ok, but how to push rebased branch ? Use forced push (git push origin :master) or make new branch and new pull request ?

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

by bschussek at 2012-05-22T09:43:15Z

    git push -f origin master

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

by travisbot at 2012-05-22T09:53:13Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1398573) (merged 05a57095 into e4e3ce6c).

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

by bschussek at 2012-05-22T09:56:29Z

Could you please add a test to FormTypeTest to verify that this actually works? The test already contains tests for the "read_only" functionality that can serve you as template.

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

by bschussek at 2012-05-25T06:26:26Z

You need to rebase the branch on symfony master so that it becomes mergable:

    git rebase symfony/master

Also, please squash the 8 commits into one.

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

by travisbot at 2012-05-25T17:23:01Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1435037) (merged 57ee25a1 into ff4d446c).
2012-05-26 08:34:37 +02:00
Johannes M. Schmitt
8308aea9d1 [Config] added EnumNode 2012-05-25 22:44:51 -05:00
Tobias Schultze
e673a041be [OptionsResolver] clarify phpdoc 2012-05-25 23:40:38 +02:00
Tobias Schultze
0cac4049f7 [Form] refactored PropertyPth 2012-05-25 23:39:40 +02:00
Deni
b4e2818608 [Form] Using new methods instead of the deprecated 2012-05-26 00:59:04 +04:00
Sergey Yuferev
c6881668fe [Form] fixing form type translation_domain inheritance
fixed bug with parent property
fix is_required field
fixed subform translation_domain inheritance
some translation_domain inheritance code refactoring
added form type translation_domain inheritance tests
changed methods place in form type test
changed arguments in createNamed method call in FormTypeTest
2012-05-25 22:00:33 +04:00
Douglas Greenshields
3c507ee47a fixed CS (whitespace) 2012-05-25 19:46:18 +02:00
Fabien Potencier
ff4d446c5e merged branch bschussek/violationmapperfix (PR #4414)
Commits
-------

8c23d7f [Form] Fixed: "error_mapping" is not an attribute anymore, but an option

Discussion
----------

[Form] Fixed: "error_mapping" is not an attribute anymore, but an option

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

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

by craue at 2012-05-25T14:56:34Z

👍

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

by travisbot at 2012-05-25T14:58:41Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1433732) (merged 8c23d7fd into 023dbf80).
2012-05-25 17:18:28 +02:00
Bernhard Schussek
8c23d7fdfe [Form] Fixed: "error_mapping" is not an attribute anymore, but an option 2012-05-25 16:50:31 +02:00
Jérémie Augustin
09e5f4629d fix markdown for code 2012-05-25 15:14:30 +03:00
Fabien Potencier
023dbf809a merged branch bschussek/issue3879 (PR #4387)
Commits
-------

bc15e2d [Form] Some code cleanup
94f6f77 Restructured Form section of UPGRADE
3d800af [Form] Remove usages of deprecated features
ee803cd [Form] Renamed setVars() to addVars() in FormViewInterface
1c4f632 [Form] Fixed API docs and usage of FormBuilderInterface instead of FormBuilder
2e6cdd1 [Form] Inverted the logic of "single_control" and renamed it to "compound". The opposite is now "simple".
98a7c0c [Form] Consolidated FormInterface, FormBuilderInterface and FormViewInterface
8e128fc [Form][OptionsResolver] Fixed typos
877d8f7 [Form] Reversed the order of $type and $name in FormFactory::createNamed[Builder]()
33fecca [Form] Merged various form events and added class FormEvent
bec8015 [Form] Renamed client and application format to view and model format
8cae328 [Form] setDefaultOptions() is now coded against OptionsResolverInterface
1ecddbc [OptionsResolver] Renamed recommended method to setDefaultOptions()
dc2fa9d [OptionsResolver] Added OptionsResolverInterface
2cd99e8 [Form] Added FormBuilderInterface and FormViewInterface and cleaned up FormTypeInterface and FormTypeExtensionInterface
0ef4066 [Form] Options are now passed to buildView() and buildViewBottomUp()
027259e [Form] Changed getDefaultOptions() to setDefaultOptions(OptionsResolver $resolver) in FormTypeInterface
b4e8bcf [OptionsResolver] Relaxed tests to check that allowed values can also be passed as scalars
97de004 [OptionsResolver] Added option type validation capabilities
0af5f06 [OptionsResolver] Added method setFilters() for augmenting the final option values

Discussion
----------

[Form] Cleaned up the Form API

Bug fix: no
Feature addition: no
Backwards compatibility break: **YES**
Symfony2 tests pass: yes
Fixes the following tickets: #3855, #3879, #4342, #4371, #4375
Todo: -

This PR cleans up the Form API as described in the referenced tickets in order to stabilize and freeze this API in the future. BC is kept wherever possible. After this PR, form types are expected to follow the following interface:

```php
<?php

class MyType extends AbstractType
{
	public function buildForm(FormBuilderInterface $builder, array $options)
	{
	}

	public function buildView(FormViewInterface $view, FormInterface $form, array $options)
	{
	}

	public function finishView(FormViewInterface $view, FormInterface $form, array $options)
	{
	}

	public function setDefaultOptions(OptionsResolverInterface $resolver)
	{
	}

	public function getParent()
	{
	    return 'form';
	}

	public function getName()
	{
	    return 'my_type';
	}
}
```

Note that the options are now passed to `buildView` and `finishView` (formerly `buildViewBottomUp`) as well, reducing the need for creating form attributes in most cases.

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

by travisbot at 2012-05-23T19:07:44Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1414486) (merged 277f5f78 into e0238071).

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

by bschussek at 2012-05-23T19:51:40Z

The PR now also contains the fix for #4342.

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

by travisbot at 2012-05-23T19:51:55Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1414932) (merged 13d284ba into e0238071).

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

by travisbot at 2012-05-24T06:55:35Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1419776) (merged 5aba0778 into e0238071).

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

by travisbot at 2012-05-24T06:56:28Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1419783) (merged 00c4f7ee into b07fb3c4).

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

by travisbot at 2012-05-24T12:26:25Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1421748) (merged 73cd9f8e into b07fb3c4).

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

by bschussek at 2012-05-24T12:27:32Z

The FormView changes described in #4371 are now contained as well. Invitation for final review.

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

by travisbot at 2012-05-24T14:03:10Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1422116) (merged e1f502b9 into b07fb3c4).

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

by cordoval at 2012-05-25T03:26:05Z

any ETA @bschussek ? I want to use it for tackling the problem of dynamic selects city-state
here http://www.craftitonline.com/2011/08/symfony2-ajax-form-republish/

I am told:
"getDefaultOptions is changed to setDefaultOptions which will allow you to set depenedent values based on other forms"

so I am most interested +300!

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

by bschussek at 2012-05-25T06:08:53Z

@cordoval I think you misunderstood this. The OptionsResolver allows you to set options dependent on other options, but of the same field. Also, this is already possible before this merge by setting an option to a closure as described in the README of the OptionsResolver component.

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

by travisbot at 2012-05-25T06:35:53Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1430534) (merged b61cc555 into b07fb3c4).

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

by vicb at 2012-05-25T06:42:24Z

@bschussek great changes ! I have just sent you a PR with some modifs related to deprecated features. I'll rebase and submit the other one we have already discussed.

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

by travisbot at 2012-05-25T07:16:18Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1430699) (merged e18830da into b07fb3c4).

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

by cordoval at 2012-05-25T07:19:07Z

@bschussek what is already possilble @ "Also, this is already possible before"

I am confused could you link to what you are referring to please?

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

by travisbot at 2012-05-25T07:22:07Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1430727) (merged 20c02a72 into b07fb3c4).

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

by bschussek at 2012-05-25T07:22:29Z

```
public function getDefaultOptions()
{
    return array(
        'a' => 'foo',
        'b' => function (Options $options) {
            return 'bar' === $options['a'] ? 'x' : 'y';
        }
    );
}

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

by travisbot at 2012-05-25T10:38:04Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1431903) (merged bc15e2d6 into 45849ce3).
2012-05-25 12:39:27 +02:00
Victor Berchet
bc15e2d68b [Form] Some code cleanup 2012-05-25 12:34:17 +02:00
Bernhard Schussek
94f6f7776a Restructured Form section of UPGRADE 2012-05-25 12:34:17 +02:00
Victor Berchet
3d800afec3 [Form] Remove usages of deprecated features 2012-05-25 12:34:16 +02:00
Bernhard Schussek
ee803cd948 [Form] Renamed setVars() to addVars() in FormViewInterface 2012-05-25 12:34:16 +02:00
Bernhard Schussek
1c4f632f60 [Form] Fixed API docs and usage of FormBuilderInterface instead of FormBuilder 2012-05-25 12:34:16 +02:00
Bernhard Schussek
2e6cdd15c5 [Form] Inverted the logic of "single_control" and renamed it to "compound". The opposite is now "simple". 2012-05-25 12:34:16 +02:00
Bernhard Schussek
98a7c0cf5f [Form] Consolidated FormInterface, FormBuilderInterface and FormViewInterface 2012-05-25 12:34:16 +02:00
Bernhard Schussek
8e128fc644 [Form][OptionsResolver] Fixed typos 2012-05-25 12:34:16 +02:00
Bernhard Schussek
877d8f7195 [Form] Reversed the order of $type and $name in FormFactory::createNamed[Builder]() 2012-05-25 12:34:16 +02:00
Bernhard Schussek
33fecca210 [Form] Merged various form events and added class FormEvent 2012-05-25 12:34:16 +02:00
Bernhard Schussek
bec80157f9 [Form] Renamed client and application format to view and model format 2012-05-25 12:34:16 +02:00
Bernhard Schussek
8cae3282d8 [Form] setDefaultOptions() is now coded against OptionsResolverInterface 2012-05-25 12:34:16 +02:00
Bernhard Schussek
1ecddbc545 [OptionsResolver] Renamed recommended method to setDefaultOptions() 2012-05-25 12:34:15 +02:00
Bernhard Schussek
dc2fa9dc69 [OptionsResolver] Added OptionsResolverInterface 2012-05-25 12:34:15 +02:00
Bernhard Schussek
2cd99e80b6 [Form] Added FormBuilderInterface and FormViewInterface and cleaned up FormTypeInterface and FormTypeExtensionInterface 2012-05-25 12:28:17 +02:00
Bernhard Schussek
0ef4066983 [Form] Options are now passed to buildView() and buildViewBottomUp() 2012-05-25 12:28:17 +02:00
Bernhard Schussek
027259eba4 [Form] Changed getDefaultOptions() to setDefaultOptions(OptionsResolver $resolver) in FormTypeInterface 2012-05-25 12:28:17 +02:00
Bernhard Schussek
b4e8bcfc5a [OptionsResolver] Relaxed tests to check that allowed values can also be passed as scalars 2012-05-25 12:28:17 +02:00
Bernhard Schussek
97de0041a1 [OptionsResolver] Added option type validation capabilities 2012-05-25 12:28:17 +02:00
Bernhard Schussek
0af5f06703 [OptionsResolver] Added method setFilters() for augmenting the final option values 2012-05-25 12:28:17 +02:00
Fabien Potencier
45849ce306 merged branch Tobion/optionsresolver-optim (PR #4388)
Commits
-------

bad4a1f [OptionsResolver] CS fix in LazyOption
a54ea1b [OptionsResolver] small optimization in Options class
104dcf2 [OptionsResolver] fixed bugs concerning required options
1bfcff4 [OptionsResolver] added failing test cases to demonstrate two bugs
37a3a29 [OptionsResolver] optimized validation

Discussion
----------

[OptionsResolver] fixed two bugs and applied optimization

The first commit optimizes the validation in OptionsResolver by removing several unneeded method calls (without changing anything semantically).

Then I recognized two bugs in the current code that I wrote failing test cases for in the second commit.
1. setAllowedValues wrongly validated missing options
2. required options with defaults were considered missing by `resolve` (contrary to the `isRequired` method)

The third commit fixes these bugs.

The forth commit applies a small optimization in Options and uses a static function call for a static function.

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

by travisbot at 2012-05-24T03:39:34Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1418785) (merged a54ea1b6 into b07fb3c4).

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

by travisbot at 2012-05-24T05:22:33Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1419232) (merged bad4a1f7 into b07fb3c4).

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

by bschussek at 2012-05-24T06:20:02Z

I just tested this on my machine, and static calls are a tiny bit faster here, although this is really irrelevant for practical use. Even though I dislike useless micro-optimizations like this, I'm ok with this PR in general.

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

by Tobion at 2012-05-24T13:23:11Z

I didn't say that's an optimization in the first place. (The optimization was the removal of a variable assignment)
I just changed it because in other PRs I've been told, static functions should be called in a static way.

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

by Tobion at 2012-05-24T23:36:13Z

Please merge before 4387
2012-05-25 09:54:05 +02:00
Fabien Potencier
167779e546 merged branch jaugustin/fix-cache-clear-windows-2.0 (PR #4408)
Commits
-------

35b458f fix kernel root, linux dir separator on windows, to fix cache:clear issue

Discussion
----------

Fix cache clear windows 2.0

Hi,

This fix the issue #3453 for the 2.0 branch.

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

by travisbot at 2012-05-25T07:43:47Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1430935) (merged 35b458f6 into f9044e44).
2012-05-25 09:51:23 +02:00
jaugustin
35b458f6b8 fix kernel root, linux dir separator on windows, to fix cache:clear issue 2012-05-25 09:39:01 +02:00
Fabien Potencier
f9044e44cc merged branch jakzal/CacheWarmerPassNotice (PR #4404)
Commits
-------

8da880c Fixed notice in AddCacheWarmerPass if there is no cache warmer defined.
8c6c86c Added unit tests for AddCacheWarmerPass class.

Discussion
----------

[FrameworkBundle] Fix for notice in AddCacheWarmerPass

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

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

by travisbot at 2012-05-24T23:08:48Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1428180) (merged 8da880c3 into 7f93bf1f).
2012-05-25 09:35:02 +02:00
Fabien Potencier
48ccdaa31b merged branch Seldaek/process-win-fix (PR #4400)
Commits
-------

bcf8cf9 [Process] Refactor the windows handling so it is always executed
0c5aa8b [Process] Add failing test for callbacks on windows

Discussion
----------

[Process] Windows callback handling fix

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

by travisbot at 2012-05-24T18:10:56Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1424957) (merged bcf8cf91 into e2c36c54).
2012-05-25 09:28:10 +02:00
Fabien Potencier
2c50c2d971 merged branch Seldaek/travisfix (PR #4401)
Commits
-------

f2d1695 Force root package version in travis builds

Discussion
----------

Force root package version in travis builds

This hopefully fixes the composer builds. Let's see what travisbot thinks.

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

by travisbot at 2012-05-24T18:45:45Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1425314) (merged f2d16950 into e2c36c54).

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

by Seldaek at 2012-05-24T18:47:09Z

Thank you, @travisbot.

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

by beberlei at 2012-05-24T19:02:33Z

Whats that flag for?

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

by Seldaek at 2012-05-24T19:11:05Z

It just says that the current version of the root package is dev-master, because otherwise since the composer.json file has no version, we can't know, so it tries to guess from git info if it finds any, but in the case of a pull request, the version is not dev-master, so the branch-alias doesn't trigger, so it ends up having a version of symfony/symfony installed that's 1.0.0 - but some of the dependencies require another version, so it sort of conflicts with itself.
2012-05-25 09:11:23 +02:00
Jakub Zalas
8da880c394 Fixed notice in AddCacheWarmerPass if there is no cache warmer defined. 2012-05-24 23:58:50 +01:00
Jakub Zalas
8c6c86c9c9 Added unit tests for AddCacheWarmerPass class. 2012-05-24 23:42:04 +01:00
Jordi Boggiano
f2d169508d Force root package version in travis builds 2012-05-24 20:40:53 +02:00
Jordi Boggiano
bcf8cf9116 [Process] Refactor the windows handling so it is always executed
When regular pipes are closed, the file handlers fallback on windows
should still be processed until they are empty
2012-05-24 19:53:48 +02:00
Jordi Boggiano
0c5aa8bf7e [Process] Add failing test for callbacks on windows 2012-05-24 19:52:29 +02:00
Fabien Potencier
e2c36c544d merged branch craue/patch-22 (PR #4395)
Commits
-------

d11af63 avoid showing the web profiler toolbar loading error if status is 0

Discussion
----------

[WebProfilerBundle] avoid showing the web profiler toolbar loading error if status is 0

Currently, such error is also shown if loading the page is manually aborted, e.g. by clicking on a link before the toolbar has been loaded, which is quite annoying.

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

by travisbot at 2012-05-24T14:42:43Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1422610) (merged d11af636 into b07fb3c4).
2012-05-24 16:46:49 +02:00