Commit Graph

1104 Commits

Author SHA1 Message Date
Fabien Potencier
fefee0d5e5 [Routing] fixed URL generation when an optional variable value is 0 2011-04-26 09:50:57 +02:00
Fabien Potencier
035afc1f4e [Routing] fixed regression in Routing matching algorithm 2011-04-26 09:01:25 +02:00
Fabien Potencier
3cd0a4d2d2 [ClassLoader] fixed CS 2011-04-26 07:07:52 +02:00
Dustin Whittle
f86bab78ff [Classloader] Fixed tests teardown when apc is not available 2011-04-25 16:12:36 -07:00
Fabien Potencier
7c95bda751 [Routing] simplified route compiler 2011-04-25 12:38:20 +02:00
Fabien Potencier
889c422d6e Merge remote branch 'igorw/ipv6'
* igorw/ipv6:
  [HttpFoundation] minor optimization
  minor adjustments suggested by vicb
  [HttpFoundation] IPv6 support for RequestMatcher
  [HttpFoundation] refactor RequestMatcherTest to use dataProvider
  [Validator] use full iPv6 regex
  [Validator] add IPv6 support to UrlValidator
  [HttpFoundation] add IPv6 support to Request
  [HttpFoundation] test Request::create with an IP as host name
  [HttpFoundation] refactor Request::getClientIp test
2011-04-24 22:04:25 +02:00
Fabien Potencier
36a63be0a5 Merge remote branch 'dustinwhittle/master'
* dustinwhittle/master:
  [Classloader] Added phpdoc with example usage + refactored unit tests fixtures
  [Classloader] Refactored ApcUniversalClassLoader to use setUp() to detect APC
  [Classloader] Fixed typo + coding standards in ApcUniversalClassLoader test
  [Classloader] Fixed APC class loader + added unit tests
2011-04-24 22:02:59 +02:00
Fabien Potencier
2f3ddb88ef Merge remote branch 'bschussek/form'
* bschussek/form:
  [Form] Automatically setting "data_class" option if objects are passed at the creation of a form
  [Form] Improved the way passed data is handled in FormFactory
  [Form] Simplified FileType code
  [HttpFoundation] TemporaryStorage automatically creates the directory if it doesn't exist yet
  [Form] Changed FormBuilder::build() to FormBuilder::create(). You hvae to pass the resulting builder to FormBuilder::add() manually now
  [Form] Added FieldTypeValidatorExtension and fixed FQCN of DelegatingValidator
2011-04-24 21:53:24 +02:00
Dustin Whittle
e8bb64c17c [Classloader] Added phpdoc with example usage + refactored unit tests fixtures 2011-04-24 07:00:27 -07:00
Dustin Whittle
29802faef4 [Classloader] Refactored ApcUniversalClassLoader to use setUp() to detect APC 2011-04-24 07:00:26 -07:00
Dustin Whittle
1f3a968ef2 [Classloader] Fixed typo + coding standards in ApcUniversalClassLoader test 2011-04-24 07:00:26 -07:00
Dustin Whittle
dbb5ca459d [Classloader] Fixed APC class loader + added unit tests 2011-04-24 07:00:26 -07:00
Fabien Potencier
4ed8d4f6b5 [Routing] fixed URL generation when a non-optional variable is empty 2011-04-24 13:06:02 +02:00
Bernhard Schussek
675e5ded9e [Form] Changed FormBuilder::build() to FormBuilder::create(). You hvae to pass the resulting builder to FormBuilder::add() manually now
$builder->add(
    $builder->create('child', 'form')
        ->add('foo', 'text')
        ->add('bar', 'text')
);
2011-04-24 12:08:50 +02:00
Fabien Potencier
8eb1dfc6a0 [Translation] forced translated id to strings 2011-04-24 09:42:41 +02:00
Fabien Potencier
b906cb59b8 Merge remote branch 'lsmith77/getAllPrevious'
* lsmith77/getAllPrevious:
  renamed getPreviouses() to getAllPrevious
2011-04-24 08:46:54 +02:00
Ryan Weaver
af8aad9c34 [Form] Throwing exception for invalid "input" type of DateType
Also fixed typo in test of previous commit
2011-04-23 20:36:40 -05:00
Ryan Weaver
66cc555bb1 [Form] Tweak to FileTypeTest to avoid warning 2011-04-23 19:47:14 -05:00
Ryan Weaver
78b2062c5e [Form] Adding an exception for an invalid widget option in DateType 2011-04-23 19:42:40 -05:00
Lukas Kahwe Smith
fd97c0caca renamed getPreviouses() to getAllPrevious 2011-04-24 01:08:15 +02:00
Fabien Potencier
81deedfc1b [Form] fixed unit tests 2011-04-23 22:17:51 +02:00
Fabien Potencier
8b74c6eb9c [DomCrawler] refactored URLs management in Link and Form 2011-04-23 21:45:44 +02:00
Lukas Kahwe Smith
d9491a743e removed support for interface injection as well as all relevant tests 2011-04-23 11:42:31 +02:00
Fabien Potencier
9a4da005a2 Merge remote branch 'bschussek/form-extensions'
* bschussek/form-extensions:
  [Form] Refactored code from CoreExtension to new ValidatorExtension
  [Form] Added FormTypeExtensionInterface
  [Form] Reorganized code into "form extensions"
2011-04-23 09:11:25 +02:00
Pascal Borreli
df3947019e [HttpFoundation][Windows] Fixed test after removal of realpath 03bb3580a6 2011-04-22 20:49:07 +00:00
Bernhard Schussek
6f1bc356a8 [Form] Refactored code from CoreExtension to new ValidatorExtension
CoreExtension is now independent of the Symfony2 validator.
2011-04-22 19:38:21 +02:00
Bernhard Schussek
1ce2db87e2 [Form] Added FormTypeExtensionInterface
With implementations of this interface, existing types can be amended.
The Csrf extension, for example, now contains a class FormTypeCsrfExtension
that adds CSRF capabilities to the "form" type.

To register new type extensions in the DIC, tag them with "form.type_extension"
and the name of the extended type as alias.
2011-04-22 19:24:38 +02:00
Bernhard Schussek
54e66c518f [Form] Reorganized code into "form extensions"
The extension classes are now the only constructor argument of the FormFactory class. They replace the existing "type loader" classes.

    new FormFactory(array(
        new CoreExtension($validator, $storage),
        new CsrfExtension($csrfProvider),
        new DoctrineOrmExtension($em),
    ));

Together with a few upcoming commits this mechanism will make

 * extension of the form framework in bundles and
 * usage of the forms outside of Symfony2

much easier.
2011-04-22 17:41:21 +02:00
Igor Wiedler
9ae5023a70 [HttpFoundation] IPv6 support for RequestMatcher 2011-04-22 17:37:22 +02:00
Igor Wiedler
5a80c2ff17 [HttpFoundation] refactor RequestMatcherTest to use dataProvider 2011-04-22 17:07:57 +02:00
Igor Wiedler
afcdbf8b79 [Validator] add IPv6 support to UrlValidator 2011-04-22 17:07:44 +02:00
Igor Wiedler
82699c5a98 [HttpFoundation] add IPv6 support to Request 2011-04-22 17:07:44 +02:00
Igor Wiedler
18e9268112 [HttpFoundation] test Request::create with an IP as host name 2011-04-22 17:07:35 +02:00
Igor Wiedler
7815bbf3ea [HttpFoundation] refactor Request::getClientIp test 2011-04-22 17:07:24 +02: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