Commit Graph

1262 Commits

Author SHA1 Message Date
Bernhard Schussek
f467317bab [Form] Renamed view variable "name" to "full_name"
The variable "name" now contains the local, short name (equivalent to $form->getName()).
2011-05-18 22:16:16 +02:00
Bernhard Schussek
b39a21fbaf [Form] Renamed collection option "type_options" to "options" to be consistent with the repeated type 2011-05-18 21:52:59 +02:00
Bernhard Schussek
2711fbc418 Merge remote branch 'jaugustin/fix_form' into jaugustin_merge
Conflicts:
	src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php
	src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php
2011-05-18 21:40:20 +02:00
Johannes Schmitt
0eb7564f7d Merge remote branch 'origin/master' into security
Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Listener/RequestAttributeInitializingListener.php
2011-05-18 12:54:47 +02:00
Johannes Schmitt
53f5c23c8f [Security/Acl] small voter refactoring 2011-05-18 12:48:50 +02:00
Fabien Potencier
2cd04547fd [Routing] renamed some exceptions 2011-05-17 16:52:02 +02:00
Fabien Potencier
0168241014 [DependencyInjection] renamed NonExistentParameterException and NonExistentServiceException to ParameterNotFoundException and ServiceNotFoundException 2011-05-17 16:26:08 +02:00
Fabien Potencier
eb202bb7b7 merged kriswallsmith/form/csrf-intention 2011-05-17 15:25:50 +02:00
alexandresalome
1d6b94189b [Routing] Use routing exceptions in the dumper and add tests. 2011-05-17 11:31:47 +02:00
Martin Hason
b7c417feaa [Bridge][Twig] removed the possibility to pass a message to the transchoice tag 2011-05-17 10:33:48 +02:00
Fabien Potencier
02e77ec4e3 [Routing] moved Matcher exceptions 2011-05-17 10:11:27 +02:00
Fabien Potencier
51eb746925 Merge remote branch 'alexandresalome/feat-routing-exceptions'
* alexandresalome/feat-routing-exceptions:
  [Routing] Fix the exception inheritance + Add the LICENCE block in new files
  [Routing] Change the Exception namespacing + base class for every exception + update PHPDoc
  [Routing] Add specific exceptions for the UrlGenerator
2011-05-17 09:52:44 +02:00
Fabien Potencier
86a2d27da9 Merge remote branch 'stloyd/ipvalidator_fix'
* stloyd/ipvalidator_fix:
  Better comment about no test IP6 addresses for "FILTER_FLAG_NO_RES_RANGE"
  Refactoring of IpValidator to use native php filter extension, also adding additional flag support and test cover.
2011-05-17 09:25:04 +02:00
Fabien Potencier
0872813278 Merge remote branch 'Seldaek/test_fix'
* Seldaek/test_fix:
  [HttpFoundation] Windows test fixes
2011-05-17 09:16:46 +02:00
Kris Wallsmith
914620f948 [Form] renamed CSRF page_id to intention 2011-05-16 14:16:29 -07:00
Johannes Schmitt
796d9af0c4 some updates 2011-05-16 22:26:24 +02:00
Johannes Schmitt
fa0ef500ae [Tests] updated invalid use statement 2011-05-16 11:57:12 +02:00
Johannes Schmitt
8e5b11a226 Merge remote branch 'origin/master' into annotations 2011-05-15 18:35:25 +02:00
Fabien Potencier
0bfb260f44 Merge remote branch 'usefulthink/issue913-yaml-utf8-checking'
* usefulthink/issue913-yaml-utf8-checking:
  CS fixes in unit-test
  [Yaml] added exceptions when non-utf8 encoding is detected
2011-05-14 17:35:56 +02:00
Fabien Potencier
439f4c34f6 Merge remote branch 'stloyd/patch-5'
* stloyd/patch-5:
  Fix MimeTypeTest
2011-05-14 17:30:00 +02:00
Fabien Potencier
1e7108d624 Merge remote branch 'stloyd/tests_fix'
* stloyd/tests_fix:
  Skip tests if some vendor are not available (prevents fatal errors)
2011-05-14 17:27:52 +02:00
Fabien Potencier
e46e53daa0 Merge remote branch 'stof/graphviz'
* stof/graphviz:
  [DependencyInjection] Fixed a property visibility in GraphvizDumper and removed a useless instanciation in the test
2011-05-14 17:23:50 +02:00
Joseph Bielawski
25c25ab4b1 Fix MimeTypeTest 2011-05-14 05:21:07 -07:00
Johannes Schmitt
48dc85dc43 [Security/Acl] fixes #853 2011-05-14 14:19:55 +02:00
Johannes Schmitt
2d8afd8dd6 Merge remote branch 'origin/master' into annotations
Conflicts:
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
	src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml
	src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
2011-05-14 12:51:05 +02:00
stloyd
039292bb94 Skip tests if some vendor are not available (prevents fatal errors) 2011-05-14 12:23:40 +02:00
Bernhard Schussek
e0ff61949e [Form] Renamed the value "text" of the "widget" option of the "date" type to "single-text" 2011-05-13 19:17:28 +02:00
Bernhard Schussek
da28f8e3b3 [Form] Added FormTypeInterface::getAllowedOptionValues() to better validate passed options 2011-05-13 18:44:03 +02:00
Bernhard Schussek
21013b930c [Form] Improved test coverage of FormFactory and improved error handling 2011-05-13 18:29:18 +02:00
alexandresalome
07b7dc0c86 [Routing] Change the Exception namespacing + base class for every exception + update PHPDoc 2011-05-13 17:46:31 +02:00
alexandresalome
05d9e74293 [Routing] Add specific exceptions for the UrlGenerator
When generating URL, thrown exceptions are InvalidArgumentException and
distinction of errors is quite difficult. This modification brings different
exceptions for different cases
2011-05-13 16:59:37 +02:00
Christophe Coevoet
c2f074b7d5 [DependencyInjection] Fixed a property visibility in GraphvizDumper and removed a useless instanciation in the test 2011-05-13 12:18:09 +02:00
Martin Schuhfuss
8340ac628d CS fixes in unit-test 2011-05-13 01:08:37 +02:00
Martin Schuhfuss
571768b9b9 [Yaml] added exceptions when non-utf8 encoding is detected
encoding is detected using the `mb_detect_encoding()`-function
in strict-mode. Checking is done before the parsing starts.
Without this patch, the calls to `preg_replace()` using the
'u'-modifier would cause the non-utf8-string being processed
to be empty when parsing starts which makes the parsing return
no result.
2011-05-12 22:02:56 +02:00
Joseph Bielawski
d43894b42e Remove invalid code-coverage annotions 2011-05-12 06:46:53 -07:00
Joseph Bielawski
bf87a35595 Better comment about no test IP6 addresses for "FILTER_FLAG_NO_RES_RANGE" 2011-05-11 14:18:45 -07:00
stloyd
5997b930a5 Refactoring of IpValidator to use native php filter extension, also adding additional flag support and test cover. 2011-05-11 13:19:03 +02:00
Jeremie Augustin
bea448339b [Form] replace assertEquals by assertFalse, assertTrue, assertNull 2011-05-11 11:19:21 +02:00
Jeremie Augustin
d3db844cfa [Form] fix file permissions to 644 again ;) 2011-05-11 11:19:21 +02:00
Jeremie Augustin
fb0a37f9ba [Form] add tests for type_options in collectionType 2011-05-11 11:19:21 +02:00
Fabien Potencier
1ae5ef6849 Merge remote branch 'vicb/form-padded-choice-list'
* vicb/form-padded-choice-list:
  [Form] Allow for arbitrary keys in PaddedChoiceList
2011-05-11 10:18:30 +02:00
Fabien Potencier
9abd53c2b4 merged Seldaek/serializer_fix 2011-05-11 10:16:15 +02:00
Fabien Potencier
a05b8fbb19 Merge remote branch 'schmittjoh/security'
* schmittjoh/security:
  [HttpFoundation] fixed php doc
  updated UPDATE file
  [Security] use deep flag when retrieving username + password
  [HttpFoundation] added $deep flag to Request::get()
  [HttpFoundation] removed getDeep(), added a boolean flag to get() instead
2011-05-11 10:14:15 +02:00
Fabien Potencier
9651175914 Merge remote branch 'vicb/form-transformers'
* vicb/form-transformers:
  [Form] Add argument type checking in BaseDateTimeTransformer
  [Form] Catch exceptions in DataTransformers
2011-05-11 10:12:23 +02:00
Victor Berchet
dac798c791 [Form] Catch exceptions in DataTransformers 2011-05-10 20:21:02 +02:00
Johannes Schmitt
89f60e04d1 [HttpFoundation] removed getDeep(), added a boolean flag to get() instead 2011-05-10 11:16:25 +02:00
Jordi Boggiano
99c67134fe [Serializer] Split decoder/encoder maps 2011-05-10 09:17:33 +02:00
digitalkaoz
5305454cc1 fixed code style 2011-05-09 23:36:56 +02:00
digitalkaoz
0ed7285828 [Process] added tests for Process and PhpExecutableFinder 2011-05-09 22:44:35 +02:00
Fabien Potencier
05e75e2712 [Finder] made the Custom filter accept all PHP callbacks 2011-05-09 15:30:41 +02:00
Victor Berchet
e0f03471ae Merge branch 'master' into form-padded-choice-list 2011-05-09 15:30:04 +02:00
Fabien Potencier
e1c52764ce [Finder] refactored SortableIterator 2011-05-09 15:14:42 +02:00
Fabien Potencier
50c1cce014 Merge remote branch 'schmittjoh/security'
* schmittjoh/security:
  [HttpFoundation] added unit test
  [Security][HttpFoundation] splits Request::hasSession() into hasSession(), and hasPreviousSession()
  [SecurityBundle] added some tests
  add provider to configuration
  update DI to handle change in config and another provider
  separate dbal specific acl config
  add provider to configuration
  update DI to handle change in config and another provider
  separate dbal specific acl config
2011-05-09 14:26:36 +02:00
Jordi Boggiano
f8447aa74c [Serializer] NormalizableInterface now takes a Serializer and make sure the is always optional 2011-05-09 13:59:54 +02:00
Pascal Borreli
b4e220dce9 [Validator] Added unit tests 2011-05-08 21:52:34 +00:00
Jordi Boggiano
2ea544f21b [Serializer] Fixed tests 2011-05-08 18:21:39 +02:00
Johannes Schmitt
f7e03f2d87 Merge remote branch 'origin/master' into annotations
Conflicts:
	UPDATE.md
	src/Symfony/Bundle/DoctrineBundle/Resources/config/orm.xml
	src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/AbstractDoctrineExtensionTest.php
2011-05-08 07:28:23 +02:00
Pascal Borreli
4c098c2dbc [Locale] Silenting error to test return value 2011-05-07 16:59:10 +00:00
Pascal Borreli
0839a2f6c9 [Locale] Added symfony 1 test cases 2011-05-07 16:59:07 +00:00
Pascal Borreli
5a432dd469 [EventDispatcher] Full coverage 2011-05-07 16:59:05 +00:00
Pascal Borreli
f061de2ff2 [DomCrawler] Full coverage 2011-05-07 16:59:02 +00:00
Pascal Borreli
cc6318b622 [Translation] Full coverage 2011-05-07 16:58:51 +00:00
Jordi Boggiano
b9a2eb66e9 [Serializer] CS fixes 2011-05-06 19:37:13 +02:00
Jordi Boggiano
ded30a2937 [Serializer] Split supports in supportsNormalization and supportsDenormalization 2011-05-06 19:36:56 +02:00
Victor Berchet
68b3d0d5ac [Form] Allow for arbitrary keys in PaddedChoiceList 2011-05-06 10:31:51 +02:00
Daniel Holmes
8d96f6c009 [Validator] fixed namespaces for validator tests 2011-05-06 02:37:03 +10:00
Johannes Schmitt
4d5db59e1e [HttpFoundation] added unit test 2011-05-05 09:14:48 +02:00
Fabien Potencier
3f69333acb [HttpKernel] refactored the ErrorHandler class 2011-05-05 08:53:16 +02:00
Fabien Potencier
fe9ef5c68b [Routing] fixed deep nested route collections (closes #770) 2011-05-04 23:29:47 +02:00
Fabien Potencier
36bcfcc5ee Merge remote branch 'bschussek/form'
* bschussek/form:
  [Form] CSRF fields are not included in the children of a FormView anymore if the view is not the root
  [Form] FormView::offsetUnset() is now supported. It was possible anyway using getChildren() and setChildren().
  [Form] Split the option "modifiable" of the "collection" type into "allow_add" and "allow_delete"
  [Form] Added test for last commit by kriswallsmith and improved dealing with original names
  [Form] Fixed variable scope when entering nested form helpers
  [Form] Added tests for blocks/templates in the format _<ID>_(widget|row|label|...)
  [Form] updated listener to check that data is an array
2011-05-04 22:13:33 +02:00
Kris Wallsmith
ae46150bc8 [HttpFoundation] added support for X-Forwarded-Port request header 2011-05-04 09:56:34 -07:00
Bernhard Schussek
74cca63938 [Form] CSRF fields are not included in the children of a FormView anymore if the view is not the root 2011-05-04 18:27:20 +02:00
Bernhard Schussek
3cc5d9f4cd [Form] Split the option "modifiable" of the "collection" type into "allow_add" and "allow_delete" 2011-05-04 17:29:59 +02:00
Bernhard Schussek
bf1dfbbe99 [Form] Added test for last commit by kriswallsmith and improved dealing with original names
The form component should now guarantee to always pass an UploadedFile object to your model. There you can call getOriginalName() to retrieve the original name of the uploaded file. For security reasons, the real file name is a generated hash value.
2011-05-04 17:04:44 +02:00
Bernhard Schussek
eb50d766da [Form] Fixed variable scope when entering nested form helpers
The consequence of this commit is that variables are accessible that have been passed to a surrounding form helper.

Example template:

{% block my_widget_label %}
    <label>{{ label }}
{% endblock %}

{% block my_widget_row %}
    {# It is not necessary to explicitely pass through the label variable #}
    {{ form_label(form) }}
    {{ form_widget(form) }}
{% endblock %}

Example usage:

{{ form_row(form.mywidget, { 'label': 'My Widget' }) }}
2011-05-04 15:40:15 +02:00
Bernhard Schussek
38098604af [Form] Added tests for blocks/templates in the format _<ID>_(widget|row|label|...) 2011-05-04 15:33:51 +02:00
Fabien Potencier
9230e712c3 fixed unit tests 2011-05-04 08:46:01 +02:00
Fabien Potencier
807c1d8f2f fixed test 2011-05-03 23:09:15 +02:00
Fabien Potencier
28fec7e4d8 [HttpKernel] fixed previous commit 2011-05-03 14:57:02 +02:00
Fabien Potencier
27d02a7d4a [Routing] fixed regression (/ should not be matched by /{foo} when foo has no default value) 2011-05-03 14:48:08 +02:00
Johannes Schmitt
672c4ef122 Merge remote branch 'origin/master' into annotations
Conflicts:
	UPDATE.md
2011-05-03 14:38:51 +02:00
Jordi Boggiano
b3ef74d309 [HttpKernel] Fix console output for reals 2011-05-03 09:25:56 +02:00
Fabien Potencier
0139a800f9 [HttpKernel] prevented output on the console when running the test 2011-05-03 09:00:56 +02:00
Fabien Potencier
d2a9b23c28 [Routing] fixed routing when a pattern has only one segment which is an optional variable 2011-05-03 08:54:33 +02:00
Jordi Boggiano
5f569efed6 [HttpFoundation] Windows test fixes 2011-05-02 18:39:39 +02:00
Jordi Boggiano
d05c59227d [HttpKernel] Prevent errors leaking out in the console on windows 2011-05-02 18:28:05 +02:00
Johannes Schmitt
f2160b2e79 [Validator] updated fixtures 2011-05-01 14:50:28 +02:00
Johannes Schmitt
0d0c737630 Merge remote branch 'origin/master' into annotations
Conflicts:
	UPDATE.md
2011-04-30 10:55:43 +02:00
Fabien Potencier
b048c44b46 Merge remote branch 'vicb/file-security'
* vicb/file-security:
  [HttpFoundation] Sanitize uploaded file original name
2011-04-30 07:21:47 +02:00
Igor Wiedler
907e693350 [HttpFoundation] Fix FileException checking in FileTest 2011-04-29 22:48:38 +02:00
Victor Berchet
dccac192d6 [HttpFoundation] Sanitize uploaded file original name 2011-04-29 19:27:53 +02:00
Johannes Schmitt
7e26575bbd [FrameworkBundle] added framework-wide annotation reader, updated validator tests 2011-04-29 15:54:44 +02:00
Eriksen Costa
12968f144c [Locale] updated ICU data, changes to note:
- The Indian Rupee sign was updated, few fonts supports it: http://en.wikipedia.org/wiki/Indian_rupee_sign
 - Updated LocaleTypeTest, zh_Hans_MO was removed from ICU
2011-04-28 11:57:55 -03:00
Fabien Potencier
40d256e058 Merge remote branch 'kriswallsmith/kernel/bundle-extension'
* kriswallsmith/kernel/bundle-extension:
  [HttpKernel] added check of default extension alias convention
  [AsseticBundle] coding standard and comment tweaks
  [HttpKernel] added BundleInterface::getContainerExtension() which is implicitly loaded
2011-04-28 08:48:57 +02:00
Fabien Potencier
4fb1035578 fixed Doctrine EntityType when the identifier is a string 2011-04-28 08:39:14 +02:00
Fabien Potencier
7d024125d3 [Form] fixed unit tests 2011-04-28 08:11:14 +02:00
Fabien Potencier
9e23189eb1 Merge remote branch 'Brouznouf/patch-2'
* Brouznouf/patch-2:
  [Serializer] [XmlEncoder] Add unit test for decoding / encoding root with attributes
  [Seriliazer] [XmlEncoder] Optimize conditions
  [Serializer] [XmlEncoder] Allow decoder to extract attributes in root element
2011-04-28 07:49:55 +02:00
Pascal Borreli
47948c8d2b [Form] Fixed bug creating empty "1" directory in root 2011-04-28 01:06:38 +00:00
Brouznouf
5712b3bd0e [Serializer] [XmlEncoder] Add unit test for decoding / encoding root with attributes 2011-04-27 22:16:24 +02:00
Victor Berchet
d350e01e33 File & UploadedFile tweaks 2011-04-27 09:10:41 +02:00
Fabien Potencier
00bfd10ca9 [HttpFoundation] refactored File management to be safer 2011-04-27 08:50:33 +02:00
Fabien Potencier
5bb9da4b6d [HttpFoundation] renamed getDefaultExtension() to guessExtension()
The renamed method now returns null if it cannot guess the extension. It allows
the developper to know whether the extension has been guessed or not.
2011-04-27 08:03:19 +02:00
Fabien Potencier
9f846997ef Merge remote branch 'Infranology/normalize-bools'
* Infranology/normalize-bools:
  capitalized 'boolean'
  replaced 'bool' with 'Boolean'
2011-04-27 07:48:12 +02:00
Eriksen Costa
164ce5210d capitalized 'boolean' 2011-04-27 02:35:10 -03:00
Eriksen Costa
4db0752894 replaced 'bool' with 'Boolean' 2011-04-27 02:35:03 -03:00
Fabien Potencier
aa3ec504ae removed File::getWebPath()
This has been removed for several reasons:

* the framework does not know where the document root is and should not care
* as the document root was static, it was impossible to have several document roots depending on some business rules (see next one)
* sometimes, the document root is not under the web root directory (so the logic of getWebPath() is not always correct)
* the feature was not used anywhere in the core
2011-04-27 06:49:05 +02:00
Kris Wallsmith
e726cdd917 changed some skipped tests to incomplete 2011-04-26 07:22:22 -07:00
Fabien Potencier
175f944f93 [DependencyInjection] added NonExistentParameterException that indicates where a non-existent parameter is being used 2011-04-26 12:36:25 +02:00
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
Kris Wallsmith
7a7b448680 [HttpKernel] added BundleInterface::getContainerExtension() which is implicitly loaded 2011-04-25 21:12:35 -07: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