Commit Graph

1020 Commits

Author SHA1 Message Date
Pascal Borreli
df3947019e [HttpFoundation][Windows] Fixed test after removal of realpath 03bb3580a6 2011-04-22 20:49:07 +00:00
Fabien Potencier
417839345f Merge remote branch 'lsmith77/request_format_tweaks'
* lsmith77/request_format_tweaks:
  added text/html to default format mapping
  return "q" from splitHttpAcceptHeader() to enable more complex accept header negotiations
  added support for setting a custom default format in Request::getRequestFormat()
2011-04-22 15:33:01 +02:00
Fabien Potencier
fd05f02b23 [HttpFoundation] added logic to automatically add the charset when not present in the Content-Type for relevant Content-Types 2011-04-22 15:26:38 +02:00
Bernhard Schussek
a97366fbcb [Form] Split signature of FormFactory::create() into create() and createNamed()
The data can now be passed to all creation methods:

    $form = $factory->create('form', $data);

By default, a form will receive the name of its type ("form" in above example). If you wish to pass a custom name, use createNamed():

    $form = $factory->createNamed('form', 'myform', $data);
2011-04-22 10:42:21 +02:00
Fabien Potencier
0069a70e42 Merge branch 'form'
* form: (291 commits)
  [FrameworkBundle] updated method call
  [Form] Removing excess option in the TimezoneType
  [FrameworkBundle] Adding check for invalid form type for better exception message
  [TwigBundle] Removing dbug text in form template
  [Form] Removed obsolete code in TextType
  [Form] fixed translations escaping
  [Form] Adding a check that the choice_list option on the ChoiceType implements the ChoiceListInterface.
  [Form] added support for groups in form validation (when using array data)
  [Form] fixed error bubbling for choices when expanded is true
  [Form] added a unit test
  [Form] Removed obsolete view variables
  [Form] Renamed ChoiceUtil to FormUtil and gave its methods more general names
  [Form] Changed separator for Twig blocks from double underscore to single underscore to match the PHP template separator
  [Form] Removed StripTagsListenerTest
  [Form] Removed StripTagsListener. Its implementation is insufficient and needs to be replaced by a better one.
  [Form] added a way to specify the form constraint when building the form (useful if you work with arrays instead of objects)
  [Form] Added test for 'email' type and fixed a few bugs
  [Form] Removed obsolete constraints from validation.xml
  Revert "[Form] removed validation.xml file (not used anymore)"
  Added html5 email input to the forms
  ...
2011-04-22 09:36:52 +02:00
Fabien Potencier
1118fbdae7 [Validator] fixed unit test 2011-04-22 08:41:58 +02:00
Eriksen Costa
589b0ab4ed Merge branch 'master' into form-frameworkbundle-form-guessers-fix
Conflicts:
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddFormGuessersPass.php
	src/Symfony/Component/Form/MoneyField.php
2011-04-21 23:03:40 -03:00
Fabien Potencier
8b2b8e16dc Merge remote branch 'schmittjoh/referenceValidation'
* schmittjoh/referenceValidation:
  [DependencyInjection] also check references of inlined services
  [DependencyInjection] adds emulation of "exception-on-invalid-reference" behavior
2011-04-21 22:44:20 +02:00
Fabien Potencier
7e33159723 [Routing] the global parameters must not be added in the QS when generating URLs 2011-04-21 09:52:35 +02:00
Fabien Potencier
286c45733e removed the possibility to pass a message to the trans tag
The trans tag should only be used with static texts as automatic output escaping does not occur.
2011-04-21 09:10:47 +02:00
Fabien Potencier
54b77d24dd made the %count% variable automatically available when using the transchoice filter (similar to how the tag works) 2011-04-21 09:01:11 +02:00
Fabien Potencier
d721cbe1e2 Merge remote branch 'kriswallsmith/http/filesystem-session-fix'
* kriswallsmith/http/filesystem-session-fix:
  [HttpFoundation] fixed FilesystemSessionStorage
2011-04-20 23:09:04 +02:00
Fabien Potencier
f7d44148df [Routing] removed unused defaults variable 2011-04-20 22:55:23 +02:00
Kris Wallsmith
30511d2965 [HttpFoundation] fixed FilesystemSessionStorage 2011-04-20 13:20:21 -07:00
Fabien Potencier
fd1636b324 [Routing] added RedirectableUrlMatcher 2011-04-20 15:54:48 +02:00
Ryan Weaver
967a42b797 [Form] Adding a check that the choice_list option on the ChoiceType implements the ChoiceListInterface.
Also removed an unused "use" statement.
2011-04-20 08:52:31 -05:00
Fabien Potencier
9d2ea4ec31 Merge remote branch 'kriswallsmith/dic/method-renames'
* kriswallsmith/dic/method-renames:
  added method renames to UPDATE
  [DependencyInjection] renamed ContainerBuilder::remove() as removeDefinition() to be more consistent with other definition-related methods
  [DependencyInjection] renamed Definition::setArgument() as replaceArgument() to be more specific
2011-04-20 14:28:09 +02:00
Fabien Potencier
0dbfa18c46 [Routing] made a small optimization to the route dumper 2011-04-20 14:19:33 +02:00
Fabien Potencier
117321d3c6 replaced array for request context in Routing by a RequestContext class 2011-04-20 14:19:32 +02:00
Kris Wallsmith
cdf706d357 [DependencyInjection] renamed Definition::setArgument() as replaceArgument() to be more specific 2011-04-20 04:47:44 -07:00
Fabien Potencier
07aae98495 [Routing] added support for _scheme requirement
The _scheme requirement can be used to force routes to always match one given scheme
and to always be generated with the given scheme.

So, if _scheme is set to https, URL generation will force an absolute URL if the
current scheme is http. And if you request the URL with http, you will be redirected
to the https URL.
2011-04-20 10:49:32 +02:00
Fabien Potencier
7c54518626 [Routing] refactored some unit tests 2011-04-19 23:21:22 +02:00
Fabien Potencier
2014ff6856 merged lsmith77/url_generator_null_parameter 2011-04-19 14:21:14 +02:00
Fabien Potencier
95d4bcc5db fixed unit tests (broken by previous commit) 2011-04-19 14:10:41 +02:00
Fabien Potencier
e09a0f9f80 Merge remote branch 'brikou/coding_standards'
* brikou/coding_standards:
  removed empty lines/trailing spaces
2011-04-19 14:06:30 +02:00
Fabien Potencier
33498bffa4 [Form] added a unit test 2011-04-18 19:01:09 +02:00
Lukas Kahwe Smith
1ecaade68d added support for parameters with default null 2011-04-18 15:35:05 +02:00
Bernhard Schussek
b93f5a372a [Form] Renamed ChoiceUtil to FormUtil and gave its methods more general names 2011-04-18 15:07:12 +02:00
Bernhard Schussek
f078554c2a [Form] Removed StripTagsListenerTest 2011-04-18 14:27:18 +02:00
Bernhard Schussek
57722550de [Form] Added test for 'email' type and fixed a few bugs 2011-04-18 13:04:18 +02:00
Fabien Potencier
b71f9d2708 [Form] added a unit tests for previous commit 2011-04-18 08:21:18 +02:00
Bernhard Schussek
be5738564f [Form] Improved regular expression in AbstractType::getName() and added unit tests 2011-04-17 18:01:22 +02:00
Lukas Kahwe Smith
c2ac8304b0 added text/html to default format mapping 2011-04-17 14:39:07 +02:00
Lukas Kahwe Smith
53c7bcf3aa added support for setting a custom default format in Request::getRequestFormat() 2011-04-17 14:37:35 +02:00
hidenorigoto
43952b3175 [BrowserKit] added tests for setServerParameter/getServerParameter methods 2011-04-17 11:24:55 +09:00
Fabien Potencier
c6818d8bf7 [HttpKernel] added support for controllers as arrays and object with an __invoke method
Controllers can now be any valid PHP callable
2011-04-16 16:26:15 +02:00
Brikou CARRE
e898445b94 removed empty lines/trailing spaces 2011-04-15 21:12:02 +02:00
Bernhard Schussek
2ea68dfcd2 [Form] Improved test coverage of NumberToLocalizedStringTransformer 2011-04-15 16:25:48 +02:00
Bernhard Schussek
30922d9375 [Form] Fixed: Checkboxes in an expanded choice field never have the 'required' HTML5 attribute. Closes http://trac.symfony-project.org/ticket/9588 2011-04-15 16:10:04 +02:00
Bernhard Schussek
9582221862 [Form] ResizeFormListener::preBind() now handles empty strings. Fixes https://github.com/symfony/symfony/pull/40 2011-04-15 15:43:02 +02:00
Bernhard Schussek
d0c572716a Merge remote branch 'henrikbjorn/form' into henrik_merge 2011-04-15 15:34:29 +02:00
Bernhard Schussek
bc0efff28d [Form][FrameworkBundle] Fixed escaping of choice widgets 2011-04-15 15:27:15 +02:00
Henrik Bjørnskov
e687685f98 [Form] change FormView::setVar,getVar,getVars,hasVar to set,get,all,has
[Form] Fixed {get,set,has}Var references in templating php

[Form] Added getVars to FormView to ease usage in Twig. Also added some phpdoc and cleaned up the get method by adding a default value

[Form] Fix

[Form] Delete file generated by test
2011-04-15 15:25:37 +02:00
Bernhard Schussek
e787d5dc22 [Form] PropertyPath now can handle elements with special characters 2011-04-15 15:25:19 +02:00
Bernhard Schussek
4f1ae660fa [Form] Fixed choice labels in expanded choice fields 2011-04-15 15:04:44 +02:00
Bernhard Schussek
41c6ab0ac7 [Form] Field labels can now be passed in the 'label' option 2011-04-15 15:03:10 +02:00
Bernhard Schussek
3d92549382 [FrameworkBundle] Fixed various escaping problems and added test cases for them 2011-04-15 14:38:46 +02:00
Bernhard Schussek
990bef8afb [Form][FrameworkBundle][TwigBundle] Fixed: CSRF fields are not rendered for nested forms anymore 2011-04-15 14:05:33 +02:00
Bernhard Schussek
8fe21285ba [Form] Renamed Form::getView() to createView() to clearly indicate that each call returns a new object 2011-04-15 13:52:11 +02:00
Bernhard Schussek
276b23a344 [Form] Moved creation logic of FormView to Form class 2011-04-15 13:41:45 +02:00