Commit Graph

1069 Commits

Author SHA1 Message Date
Victor Berchet
3cd3dd39ba [Kernel] Make resources overriding consistent across bundle directories and resource directories 2011-04-04 11:24:51 +02:00
Victor Berchet
d0b6ed2bb6 [Kernel] Improve test semantic 2011-04-04 11:24:51 +02:00
Victor Berchet
3e64106aae [Kernel] Update tests with shorter bundle names 2011-04-04 11:24:51 +02:00
Victor Berchet
dcd727c092 [Kernel] Restore the tests for the locateResource method 2011-04-04 11:24:51 +02:00
Fabien Potencier
f232b3cdda reverted Merge remote branch 'kriswallsmith/kernel/shorter-bundle-names' 2011-04-04 11:10:56 +02:00
Fabien Potencier
6a5356290a Revert "[HttpKernel] updated tests for shorter bundle names"
This reverts commit fb7e87da7d.
2011-04-04 11:08:37 +02:00
Fabien Potencier
ad4a0bda1c [Console] changed returned value of CommandTester to the command exit code 2011-04-03 22:30:40 +02:00
Fabien Potencier
53274512e2 Merge remote branch 'weaverryan/better_import_exception_and_bug_fix'
* weaverryan/better_import_exception_and_bug_fix:
  [Config] Improving the exception when a resource cannot be imported
  [DependencyInjection] Fixing a bug where "ignore_errors" doesn't work in YAML and XML
2011-04-02 18:37:51 +02:00
Bernhard Schussek
72a41f8c94 [Form] Fixed: Booleans can be used as choice keys now 2011-04-02 18:26:28 +02:00
Bernhard Schussek
a5d0b3aea6 [Form] Changed FormBuilder::set(Client|Norm)Transformer to FormBuilder::prepend(Client|Norm)Transformer and FormBuilder::append(Client|Norm)Transformer to facilitate extension of types 2011-04-02 16:39:19 +02:00
Bernhard Schussek
fc59936740 [Form] Fixed: ThemeRenderer::isChoiceSelected() works correctly for boolean choices 2011-04-02 16:00:46 +02:00
Bernhard Schussek
a4bbc40ac6 [Form] Cleaned up ChoiceListInterface 2011-04-02 15:41:43 +02:00
Pascal Borreli
8a82aee56f [Locale][Windows] Fixing tests for old ICU version (default in php.net packages) 2011-04-02 13:19:30 +00:00
Bernhard Schussek
d3b7c4e8c1 [Form] Moved getLabel(), isChoiceSelected() and isChoiceGroup() from ChoiceListInterface to ThemeRenderer 2011-04-02 14:14:18 +02:00
Bernhard Schussek
94f2baa895 [Form] Fixed BooleanToStringTransformer::reverseTransform() to accept NULL values. Fixes ChoiceTypeTest 2011-04-02 13:00:19 +02:00
Bernhard Schussek
37e8e1270c [Form][FrameworkBundle][TwigBundle] Renamed view variable 'disabled' to 'read_only' to match with the according FormInterface methods 2011-04-02 12:18:43 +02:00
Bernhard Schussek
39b0aafc00 Merge remote branch 'symfony/master' into experimental
Conflicts:
	src/Symfony/Bundle/DoctrineBundle/Resources/config/orm.xml
2011-04-02 12:08:27 +02:00
Bernhard Schussek
35d9b7f800 [Form] Improved test coverage of Form. The emptyValue closure now receives the Form instance to use form data when constructing new objects 2011-04-02 12:00:19 +02:00
Bernhard Schussek
4f39234741 [Form] bind() is ignored if a form is read-only 2011-04-02 11:39:15 +02:00
Bernhard Schussek
ca20aef379 [Form] Improved test coverage of DelegatingValidator and fixed validation group inheritance 2011-04-02 11:35:58 +02:00
Bernhard Schussek
33b0011f86 [Form] Improved test coverage of Form 2011-04-02 11:22:29 +02:00
Ryan Weaver
65ac5ec7c0 [DependencyInjection] Fixing a bug where "ignore_errors" doesn't work in YAML and XML
Tests added, the arguments were simply mismatched.
2011-04-01 18:59:45 -05:00
Fabien Potencier
1a486492b8 [HttpKernel] fixed test 2011-04-01 18:07:22 +02:00
Kris Wallsmith
c51b716180 [Config] simplified DirectoryResource to only allow one regex 2011-04-01 04:56:50 -07:00
Fabien Potencier
a9160eee70 [Validator] made fields the default option for Collection constraint 2011-03-31 15:36:04 +02:00
Bernhard Schussek
c864d7fae1 [Form] Improved test coverage of Form class 2011-03-31 15:23:33 +02:00
Bernhard Schussek
1ef18360fa [Form] Made name immutable in FormBuilder to avoid synchronization problems with name and property path 2011-03-31 13:48:06 +02:00
Bernhard Schussek
bbeddf7789 Merge remote branch 'symfony/master' into experimental 2011-03-31 12:32:20 +02:00
Fabien Potencier
59ef0c991c [Form] fixed two unit tests 2011-03-31 07:36:52 +02:00
Fabien Potencier
c7ccb6643b [Form] removed unused constructor argument from Type\FieldType (themeFactory and template) 2011-03-31 07:34:04 +02:00
Jeremy Mikola
e295bfc7a5 [Config] Alias used classes in NodeBuilderTest to avoid conflicts with fixture classes required in TreeBuilderTest
Depending on the order of execution of Config\Definition\Builder tests (due to filesystem ordering), namespace conflicts can occur between real classes and fixtures loaded by the TreeBuilderTest.
2011-03-30 19:52:00 -04:00
Fabien Potencier
f92055ce42 [Validator] renamed methods that do not follow CS
requiredOptions -> getRequiredOptions
targets -> getTargets
defaultOption -> getDefaultOption
2011-03-30 23:18:20 +02:00
Fabien Potencier
525702b5c6 [Validator] renamed method to follow CS 2011-03-30 23:10:30 +02:00
Fabien Potencier
f77b94074f [HttpFoundation] replaced the option argument of Session by defaultLocale 2011-03-30 17:26:13 +02:00
Bernhard Schussek
55c14680d3 Merge remote branch 'symfony/master' into experimental 2011-03-30 10:31:21 +02:00
Pascal Borreli
33d887e154 [Finder][Windows] Fixed windows tests 2011-03-29 14:32:18 +00:00
Pascal Borreli
0199b5c70d [HttpFoundation][Windows] Fixed guesser tests if Fileinfo extension is not loaded
Didn't test for presence of mime_content_type function since it's obsolete (deprecated) in PHP5
2011-03-29 14:32:17 +00:00
Bernhard Schussek
53838abf3f Merge remote branch 'symfony/master' into experimental
Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/money_field.html.php
	src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/percent_field.html.php
	src/Symfony/Component/Form/Resources/config/validation.xml
2011-03-28 22:52:15 +02:00
Kris Wallsmith
fb7e87da7d [HttpKernel] updated tests for shorter bundle names 2011-03-28 11:37:19 -07:00
Fabien Potencier
49063a5314 Merge remote branch 'kriswallsmith/kernel/shorter-bundle-names'
* kriswallsmith/kernel/shorter-bundle-names:
  updated codebase to use shorter bundle names
  [HttpKernel] updated component to work with shorter bundle names
  [HttpKernel] updated Bundle::getName() to validate bundle class name and rtrim "Bundle"
2011-03-28 18:06:41 +02:00
Fabien Potencier
786f165dae Merge remote branch 'bschussek/validator'
* bschussek/validator:
  removed Assert prefix from all constraints, renamed annotation namespace to assert
2011-03-28 17:05:22 +02:00
Fabien Potencier
faf9782e6f renamed Twig TransExtension to TranslationExtension 2011-03-28 16:16:54 +02:00
Bernhard Schussek
1fa004ceb2 [Form] Simplified the interface names of the Renderer subnamespace 2011-03-27 23:39:01 +02:00
Bernhard Schussek
cfaa03eeec [Form] Fixed: empty objects are only created upon binding forms with empty data 2011-03-27 23:07:30 +02:00
Bernhard Schussek
edfae73cd4 [Form] Moved PropertyPath, PropertyPathIterator and VirtualFormAwareIterator to subnamespace Util 2011-03-27 15:37:13 +02:00
Kris Wallsmith
ade83e2e80 updated codebase to use shorter bundle names
Controllers:
"BlogBundle:Post:show" is now "Blog:Post:show"

Templates:
"BlogBundle:Post:show.html.twig" is now "Blog:Post:show.html.twig"

Resources:
"@BlogBundle/Resources/config/blog.xml" is now "@Blog/Resources/config/blog.xml"

Doctrine:
"$em->find('BlogBundle:Post', $id)" is now "$em->find('Blog:Post', $id)"
2011-03-27 06:25:43 -07:00
Bernhard Schussek
b180319371 [Form] Moved creation of empty data to Form to clean up DataMapperInterface 2011-03-27 15:12:35 +02:00
Bernhard Schussek
6588a47ba7 [Form] Removed FormBuilder::setDataClass(). Use the FieldType option "data_class" instead.
The problem was that "data_class" was used in two places: FormBuilder::build() and PropertyPathMapper.

PropertyPathMapper was already constructed during FormType::buildForm(), so any data class changes made to the FormBuilder wouldn't affect the data class of the PropertyPathMapper anymore and so lead to an inconsistent state.
2011-03-27 14:34:48 +02:00
Kris Wallsmith
dd9ad97a0c [HttpKernel] updated Bundle::getName() to validate bundle class name and rtrim "Bundle" 2011-03-27 05:31:57 -07:00
Bernhard Schussek
364b0f5208 [Form] Fixed: FormBuilder::add() accepts FormTypeInterface instances 2011-03-27 14:05:06 +02:00
Bernhard Schussek
dc38eeffe3 [Form] Changed the default value of the 'property_path' option to NULL. Explicitely set it to '' or false to disable mapping for a field/form 2011-03-27 14:02:24 +02:00
Bernhard Schussek
b21929423e [Form] Completely removed the fields variable in the renderer. The renderer itself supports ArrayAccess and Traversable 2011-03-27 13:48:36 +02:00
Bernhard Schussek
eaff9c641e [Form] Fixed: the default template is only set on the root renderer and reused by children 2011-03-26 19:39:31 +01:00
Bernhard Schussek
a58cfab37d [Form] Removed form.type.loader tag and according compiler pass to simplify configuration. Custom types that are not in the DIC can be instantiated manually and passed wherever a type is desired. 2011-03-26 18:48:55 +01:00
Bernhard Schussek
9ff91dc997 Merge remote branch 'beberlei/FormsCollectionPrototype' into beberlei-merge 2011-03-26 18:39:20 +01:00
Bernhard Schussek
fae319e77a [Form] Renderers are now created explicitely using FormFactory::createRenderer(). This improves performance on requests where a form does not need to be rendered 2011-03-26 16:03:34 +01:00
Bernhard Schussek
8c7a93c90c [Form] Added FormTypeInterface::buildRendererBottomUp() which is called after children are initialized 2011-03-26 16:03:34 +01:00
Bernhard Schussek
c786fac303 [Form] Sample fix implementation of renderers 2011-03-26 16:03:34 +01:00
Bernhard Schussek
a396f8fdc8 Merge remote branch 'symfony/master' into experimental 2011-03-26 16:03:21 +01:00
Johannes M. Schmitt
7887f04dc2 removed Assert prefix from all constraints, renamed annotation namespace to assert 2011-03-26 15:26:05 +01:00
Benjamin Eberlei
d87651b6a2 [Form] Add option "prototype" defaulting to true. 2011-03-26 14:52:03 +01:00
Benjamin Eberlei
f882a511a0 [Form] Initialize on iterator access. 2011-03-26 12:28:46 +01:00
Benjamin Eberlei
cd1ce86aee [Form] Iterator support for ThemeRenderer 2011-03-26 12:25:47 +01:00
Fabien Potencier
4594cd223b [HttpKernel] fixed a test that randomly fails 2011-03-26 12:07:57 +01:00
Johannes Schmitt
db2089de0d Merge branch 'acl-fix' of https://github.com/comfortablynumb/symfony into security 2011-03-26 01:11:11 +01:00
Bernhard Schussek
18b98353d5 Merge branch 'master' into experimental
Conflicts:
	src/Symfony/Component/Form/Resources/config/validation.xml
2011-03-25 16:07:19 +01:00
Fabien Potencier
8d84fdfedc [Finder] added Finder::append() method to be able to combine several Finder instances into one 2011-03-25 15:50:47 +01:00
Bernhard Schussek
7585dce8dd [Form] Added options validation to field creation 2011-03-25 15:30:33 +01:00
Bernhard Schussek
6825ea2489 [Form] Improved test coverage of PropertyPathMapper 2011-03-25 11:27:20 +01:00
Bernhard Schussek
e3ac248617 [Form] Errors are mapped to subforms correctly and bubble up again if necessary 2011-03-25 10:53:36 +01:00
Bernhard Schussek
7b412cc762 [Form] Removed FormFactory::addGuessers() and moved guessers to constructor arg instead 2011-03-25 02:26:14 +01:00
Bernhard Schussek
9b1b8cbffa [Form] Replaced various occurences of 'field' by 'form' 2011-03-25 02:12:01 +01:00
Bernhard Schussek
3c412ffba0 [Form] Moved Form::validateData() to DelegatingValidator::validateFormData() 2011-03-25 01:59:28 +01:00
Gustavo Adrian
bedbe51081 [Security] ACL: AclVoter::vote only gets an ObjectIdentity if $object is not an instance of ObjectIdentityInterface 2011-03-24 21:54:21 -03:00
Bernhard Schussek
729438fdea Merge branch 'rename-execute' into experimental
Conflicts:
	src/Symfony/Component/Form/FileField.php
	src/Symfony/Component/Form/Resources/config/validation.xml
2011-03-25 01:38:49 +01:00
Bernhard Schussek
3e29348d21 [Validator] Added support for static callbacks to Callback constraint 2011-03-25 01:36:58 +01:00
Bernhard Schussek
9c6a6e13bf [Validator] Renamed Execute constraint to Callback 2011-03-25 01:34:35 +01:00
Bernhard Schussek
770d403a52 [Form] Improved error mapping in DelegatingValidator 2011-03-25 00:57:35 +01:00
Bernhard Schussek
4372bd5dc8 [Form] Fixed: Bubbling errors are caught correctly 2011-03-25 00:18:58 +01:00
Bernhard Schussek
262bdcb21d [Form] Fixed validation 2011-03-25 00:16:21 +01:00
Bernhard Schussek
ef334dbc4a Merge remote branch 'beberlei/AttributeSupport' into beberlei-merge 2011-03-24 22:53:39 +01:00
Bernhard Schussek
3f390aa271 [Form] Removed EntityType from DefaultTypeLoader 2011-03-24 22:50:39 +01:00
Benjamin Eberlei
ee96ad0e81 [Form] [DoctrineBridge] Move EntityType and DoctrineTypeLoader into Doctrine Bridge 2011-03-24 22:43:00 +01:00
Benjamin Eberlei
8d6dd2b9af [Form] Add Arbitrary Attribute Support to Form Rendering. 2011-03-24 22:08:08 +01:00
Benjamin Eberlei
6bcc04905c [Form] Introduce ArrayTypeLoader, Remove EntityManager and FormFactory interface from DefaultTypeLoader 2011-03-24 20:00:17 +01:00
Bernhard Schussek
2faa47d03b [Form] Added fallback templates to TwigThemeFactory 2011-03-24 15:11:43 +01:00
Bernhard Schussek
1211d77f49 [Form] Introduced renderer theme factories so that themes can be changed during runtime 2011-03-24 14:27:21 +01:00
Fabien Potencier
8cb400a5d8 [Console] fixed a test 2011-03-24 14:03:56 +01:00
Bernhard Schussek
5b41810b6d Revert "[Form] Changed naming of Themes to ThemeEngines. Theme templates are now 'themes'"
This reverts commit 1efd680b68.
2011-03-24 10:55:12 +01:00
Bernhard Schussek
5078a63c74 Revert "[Form] Fixed more naming of themes and theme engines"
This reverts commit 1aa34b7240.
2011-03-24 10:54:47 +01:00
Fabien Potencier
f5ab021386 Merge remote branch 'aurelijus/clear_name_for_goto'
* aurelijus/clear_name_for_goto:
  removes unwanted characters from goto name
2011-03-24 10:00:31 +01:00
Fabien Potencier
ff3c66753f [BrowserKit] tagged the guaranteed BC API 2011-03-24 09:25:46 +01:00
Aurelijus
38318f8f80 removes unwanted characters from goto name 2011-03-24 10:03:59 +02:00
Bernhard Schussek
1aa34b7240 [Form] Fixed more naming of themes and theme engines 2011-03-23 22:51:37 +01:00
Bernhard Schussek
1efd680b68 [Form] Changed naming of Themes to ThemeEngines. Theme templates are now 'themes' 2011-03-23 22:34:58 +01:00
Fabien Potencier
06d00f36ba Merge remote branch 'kriswallsmith/framework/protocol-relative-base-urls'
* kriswallsmith/framework/protocol-relative-base-urls:
  [Templating] updated assets helper to leave protocol-relative URLs untouched
  [FrameworkBundle] cleaned up test class
2011-03-23 22:03:48 +01:00
Fabien Potencier
a6e6cbbb27 [HttpFoundation] removed the hardcoded ^ and $ from the RequestMatcher 2011-03-23 21:27:04 +01:00
Bernhard Schussek
c01419d856 Merge remote branch 'johnwards/renderer_tests' into renderer-tests-merge 2011-03-23 21:13:36 +01:00
Kris Wallsmith
55671be888 [Templating] updated assets helper to leave protocol-relative URLs untouched 2011-03-23 13:02:49 -07:00
Fabien Potencier
76cf89b800 [Finder] fixed some tests that were failing on the CI server 2011-03-23 20:58:14 +01:00
Fabien Potencier
cb62fde8c9 [Serializer] fixed some tests that were failing on the CI server 2011-03-23 20:27:58 +01:00
Fabien Potencier
b5857528e0 [Routing] moved protected to private 2011-03-23 19:25:56 +01:00
Bernhard Schussek
9839aafb7d Merge remote branch 'symfony/master' into experimental 2011-03-23 19:18:38 +01:00
Bernhard Schussek
08a09240f6 [Form] Fixed order of input and output timezone to a more natural one 2011-03-23 17:12:04 +01:00
Bernhard Schussek
a880f8d0d1 [Form] Fixed coding conventions 2011-03-23 16:14:53 +01:00
Bernhard Schussek
9e025440ca Merge remote branch 'johnwards/configuration' into configurable-merge 2011-03-23 16:05:16 +01:00
Fabien Potencier
e912b347f0 moved integration between the Translation component and Twig to a Symfony Bridge 2011-03-23 15:23:52 +01:00
John Wards
1a014d130e [Form] Tests for Renderer Plugins 2011-03-22 22:19:51 +00:00
John Wards
2e750f7287 [Form] Coding conventions 2011-03-22 21:02:02 +00:00
John Wards
ef8113c50f [Form] Base tests for renderers 2011-03-22 20:51:19 +00:00
Fabien Potencier
a95f72fff3 Merge remote branch 'l3l0/routing-tests'
* l3l0/routing-tests:
  [Routing] added tearDown with cleanup the file system tmp directory
  [Routing] moved clean up the directory from tearDown to setUp. Removed setUpBeforeClass method
  [Routing] modified place when we store temporary file
  [Routing] modified unit test for PhpGeneratorDumper class
  [Routing] add unit test for PhpGeneratorDumper class
  [Routing] added more tests for UrlGenerator class
2011-03-22 21:44:31 +01:00
Leszek
05a105f641 [Routing] added tearDown with cleanup the file system tmp directory 2011-03-22 21:21:43 +01:00
Leszek
9b80591133 [Routing] moved clean up the directory from tearDown to setUp. Removed setUpBeforeClass method 2011-03-22 21:21:43 +01:00
Leszek
389810e12a [Routing] modified place when we store temporary file 2011-03-22 21:21:43 +01:00
Leszek
2b820ac9d0 [Routing] modified unit test for PhpGeneratorDumper class 2011-03-22 21:21:43 +01:00
Leszek
1059f7cb82 [Routing] add unit test for PhpGeneratorDumper class 2011-03-22 21:21:42 +01:00
Leszek
fc5295436b [Routing] added more tests for UrlGenerator class 2011-03-22 21:21:42 +01:00
Fabien Potencier
e159c47cc9 [Routing] fixed UrlMatcher when no method requirement is defined 2011-03-22 20:56:55 +01:00
Fabien Potencier
03282f8d4e [Config] fixed a test 2011-03-22 19:55:16 +01:00
Fabien Potencier
af9c292001 Merge remote branch 'subsven/master'
* subsven/master:
  re-add filename based directory filter to the AnnotationDirectoryLoader, now restricting to *.php files and therefore disregarding e.g. SVN metadata files
  revert adding filename based filter to the directory resource
  Eleminate the need to manually clear the cache if a new controller file containing routing annotations is added - part II * add unit tests * introduce filename filter to DirectoryResource (to restrict change monitoring to a subset of files) * modify AnnotationDirectoryLoader.php to use filename filter set on Controller\.php$
2011-03-22 19:52:55 +01:00
Fabien Potencier
3c0ecf277e Merge remote branch 'jaypea/PhpDumperFix'
* jaypea/PhpDumperFix:
  Fixed PhpDumper isSimpleService and changed test fixtures
2011-03-22 19:46:58 +01:00
Jan Prieser
67aaf5ce91 Fixed PhpDumper isSimpleService and changed test fixtures 2011-03-22 17:01:03 +01:00
Fabien Potencier
1991437766 Merge remote branch 'kriswallsmith/router/method-not-allowed' 2011-03-22 16:40:41 +01:00
Bernhard Schussek
ea0e5bb2d6 [Form] Renamed FieldTypeInterface to FormTypeInterface 2011-03-22 12:36:41 +01:00
Bernhard Schussek
270a98e413 [Form] Added support for types that are not registered in the DIC. These are identified by their FQ class name. 2011-03-22 12:33:15 +01:00
Sven Paulus
f93e4b2d73 Eleminate the need to manually clear the cache if a new controller file containing routing annotations is added - part II
* add unit tests
* introduce filename filter to DirectoryResource (to restrict change monitoring to a subset of files)
* modify AnnotationDirectoryLoader.php to use filename filter set on Controller\.php$
2011-03-22 09:03:45 +01:00
John Wards
5a5fdd0529 Merge remote branch 'bernhard/experimental' into configuration 2011-03-22 07:43:47 +00:00
Bernhard Schussek
33692eae4a [Form] Renamed Form::isTransformationSuccessful() to isSynchronized(). This method now indicates whether the data in the different representations is synchronized. Moved 'invalid' error to DefaultValidator 2011-03-22 02:03:22 +01:00
Bernhard Schussek
16d65f6f16 [Form] Moved previously skipped tests from FormTypeTest to FormTest and fixed them 2011-03-22 01:40:02 +01:00
Bernhard Schussek
577e106361 [Form] Implemented custom mapping of data errors to form fields 2011-03-22 01:15:48 +01:00
John Wards
b4406f254d [Form] Removing Configurable from DataTransformers 2011-03-21 23:01:10 +00:00
John Wards
27267e8007 [Form] Refactoring tests for new DataTransfomer 2011-03-21 21:46:20 +00:00
Bernhard Schussek
87665bc380 [Form] Decoupled FormBuilder from CSRF protection 2011-03-21 22:41:19 +01:00
Bernhard Schussek
c1abf08d9c [Form] Implemented error bubbling 2011-03-21 22:13:02 +01:00
Bernhard Schussek
01a47457d0 [Form] Improved naming of various interfaces. Renamed DefaultRenderer to ThemeRenderer 2011-03-21 20:57:38 +01:00
Bernhard Schussek
321d40b21a [Form] Decoupled FormBuilder from ThemeInterface 2011-03-21 20:46:43 +01:00
Bernhard Schussek
61804bbd8b Merge remote branch 'symfony/master' into experimental 2011-03-21 20:27:39 +01:00
Kris Wallsmith
66cbad3433 [Routing] updated test fixture 2011-03-21 06:18:54 -07:00
Kris Wallsmith
b2f5ac8beb [Routing] refactored URL matching to support 405 Method Not Allowed responses 2011-03-21 05:56:53 -07:00
hhamon
230b3fff53 added unit tests for User::equals() method 2011-03-21 09:26:09 +01:00
Bernhard Schussek
4989e965cd [Form] Moved form type tests into according namespace 2011-03-20 15:45:09 +01:00
Bernhard Schussek
119866e06d [Form] Renamed FormBuilder::getInstance() to getForm() 2011-03-20 15:17:25 +01:00
Bernhard Schussek
2dbb41714a [Form] Merged Field and Form. Merged FieldBuilder and FormBuilder. After the refactoring, the distinction between the two concepts is small enough to merge them 2011-03-20 13:35:19 +01:00
Bernhard Schussek
fc7281bcab [Form] Extracted validation logic of form. Fields can now contain multiple validators 2011-03-20 12:00:19 +01:00
Bernhard Schussek
cb599f417e [Form] Renamed field option 'disabled' to 'read_only'. How to render read-only fields is now the responsibility of the renderer 2011-03-20 10:35:16 +01:00
Bernhard Schussek
295d01745b [Form] Renamed StripTagsFilter to StripTagsListener until we have better conventions 2011-03-20 10:26:38 +01:00
Bernhard Schussek
2c6c89d898 Merge remote branch 'beberlei/forms' into beberlei-merge 2011-03-20 10:15:59 +01:00
Jakub Zalas
e09b320cdb [Routing] Added PhpFileLoader tests. 2011-03-19 23:37:58 +01:00
Jakub Zalas
29922faa33 [Routing] Added XmlFileLoader tests handling invalid xml files (schema validation based). 2011-03-19 23:37:58 +01:00
Jakub Zalas
14b7f12349 [Routing] Added XmlFileLoader tests handling invalid xml files when schema validation is not used. 2011-03-19 23:37:58 +01:00
Jakub Zalas
2a17126309 [Routing] Added XmlFileLoader tests for valid resource and pattern routing definitions. 2011-03-19 23:37:58 +01:00
Jakub Zalas
6235f42cd5 [Routing] Added YamlFileLoader test verifying if pattern is required by parseRoute. 2011-03-19 23:37:58 +01:00
Jakub Zalas
4244ae7794 [Routing] Added YamlFileLoader tests. 2011-03-19 23:37:58 +01:00
Jakub Zalas
f981b6c8d2 [Routing] Added Route test. 2011-03-19 23:35:31 +01:00
Jakub Zalas
25d8e279ad [Routing] Covered Annotation\Route by tests. 2011-03-19 23:35:31 +01:00
Benjamin Eberlei
b43318ee3e [Form] Add tests for untested classes. 2011-03-19 22:03:49 +01:00
Benjamin Eberlei
d62213662e Merge branch 'experimental' of git://github.com/bschussek/symfony into forms 2011-03-19 20:36:56 +01:00
Benjamin Eberlei
864a3ec45f [Form] Add StripTagsFilter EventListener 2011-03-19 20:36:49 +01:00
Bernhard Schussek
6793bcd698 [Form] Removed magic from method signature of add() 2011-03-19 19:20:55 +01:00
Bernhard Schussek
c4b7a77ece Merge remote branch 'beberlei/forms' into beberlei-merge
Conflicts:
	src/Symfony/Component/Form/Type/Loader/DefaultTypeLoader.php
2011-03-19 19:01:57 +01:00
Benjamin Eberlei
39c2d3f166 [Form] Add PhpTheme that relies on no Template Engine, generalize tests to use for PhpTheme and PhpEngineTheme. Fixed some bugs 2011-03-19 17:47:18 +01:00
Bernhard Schussek
43a24fa931 [Form] Renamed events to match terminology in Field 2011-03-19 16:59:23 +01:00
Bernhard Schussek
7f9284105d [Form] Moved namespace FieldGuesser to Type\Guesser 2011-03-19 16:46:03 +01:00
Bernhard Schussek
89215d167d Merge remote branch 'symfony/master' into experimental 2011-03-19 13:25:41 +01:00
Fabien Potencier
510c30693b [HttpFoundation] fixed a test 2011-03-19 12:29:23 +01:00
everzet
3fd50ea4e6 [Routing] throw an exception if route config has unsupported keys 2011-03-19 12:54:29 +02:00
Kris Wallsmith
e596931dc8 [DomCrawler] enabled removal of form fields to allow emulating javascript in a functional test 2011-03-18 09:39:08 -07:00
Bernhard Schussek
6bc79a1a12 [Form] Renamed different kinds of data transformers within a field for better clarity 2011-03-18 16:59:34 +01:00
Bernhard Schussek
2a1e394352 [Form] Renamed field configs to types. Everywhere else, we are referring to the name of the type as 'type' now (was 'identifier') 2011-03-18 16:20:00 +01:00
Bernhard Schussek
0b929ee342 [Form] Renamed ValueTransformers to DataTransformers to fit with DataMapper and DataValidator 2011-03-18 16:01:06 +01:00
Bernhard Schussek
97d0183d84 [Form] Moved properties propertyPath, modifyByReference, validationGroups and virtual to generic attributes because they are specific to the used data validator/mapper implementations 2011-03-18 15:26:02 +01:00
Bernhard Schussek
700c96e7fa [Form] Moved FieldFactoryTest to FormFactoryTest and fixed it 2011-03-18 14:37:54 +01:00
Bernhard Schussek
9caaf0f3a3 [Form] Introduced FieldBuilder for field/form creation and made Field/Form mostly immutable 2011-03-18 12:50:26 +01:00
Fabien Potencier
f0c558592c Merge remote branch 'everzet/console-formatter-refactoring' 2011-03-18 11:58:05 +01:00
Fabien Potencier
3627eee3c6 Merge remote branch 'vicb/cfg_rebase'
* vicb/cfg_rebase:
  [Config] Ability to add and override node types without having to subclass NodeBuilder
  [DoctrineBundle] Fix some typos
  [SwiftMailerBundle] Fix a merge issue in the configuration
  Tweak PHPDocs in the extension configuration files
  [Config] Component refactoring
2011-03-18 11:41:43 +01:00
Bernhard Schussek
3f70f89339 Merge remote branch 'symfony/master' into experimental
Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
	src/Symfony/Component/HttpFoundation/File/UploadedFile.php
2011-03-18 10:39:40 +01:00
Fabien Potencier
136b23ead4 [EventDispatcher] refactored the code
* The array returned by getListeners() now removes the listener hash as the key (as this is an implementation detail)
 * The sort method now guarantees that a listener registered before another will stay in the same order even for the same priority (for BC)
 * Made various optimizations
2011-03-18 09:01:22 +01:00
Fabien Potencier
69d324eca8 [EventDispatcher] added EventDispatcher::removeSubscriber() 2011-03-18 09:00:58 +01:00
Fabien Potencier
9e88fc4e66 Merge remote branch 'kriswallsmith/kernel/uploaded-file-for-test' 2011-03-18 08:02:16 +01:00
Victor Berchet
9fd7d05ecf [Config] Ability to add and override node types without having to subclass NodeBuilder 2011-03-18 00:32:35 +01:00
Kris Wallsmith
0a229947a6 [Form] updated tests for changes in HttpFoundation 2011-03-17 16:09:12 -07:00
Kris Wallsmith
ab3b8ac364 [HttpFoundation] cleaned up comments and coding standards, added better exception messages when filesystem functions throw errors, added "moved" arg to UploadedFile constructor, added FileNotFoundException to UploadedFile per the parent constructor 2011-03-17 16:07:53 -07:00
Kris Wallsmith
69609257ac [DomCrawler] updated upload logic to better emulate a real upload by copying the source file to the temp directory 2011-03-17 16:06:47 -07:00
Bernhard Schussek
a51321c264 [Form] Moved validation logic to ValidationListener 2011-03-17 21:47:12 +01:00
Bernhard Schussek
0799662361 [Form] Extracted data mapping logic from Form into ObjectMapperListener 2011-03-17 21:23:59 +01:00
Fabien Potencier
6c8e71c8e7 renamed filterCore* to onCore*
The onCore* events are fired at some pre-defined points during the
handling of a request. At this is more important than the fact
that you can change things from the event.
2011-03-17 17:01:59 +01:00
ever.zet
8b55c239a2 [Console] updated output tests after formatter adding 2011-03-17 17:53:28 +02:00
ever.zet
4fe2efd49e [Console] implemented output formatter to decorate and format output messages 2011-03-17 17:51:49 +02:00
ever.zet
e5700b817b [Console] implemented output formatter style class for defining custom styles 2011-03-17 17:51:25 +02:00
Victor Berchet
1e0ed22c55 [Config] Component refactoring
The Config component API have changed and the extension configuration files must be updated accordingly:

1. Array nodes must enclosed their children definition in ->children() ... ->end() calls:

Before:

    $treeBuilder->root('zend', 'array')
        ->arrayNode('logger')
            ->scalarNode('priority')->defaultValue('INFO')->end()
            ->booleanNode('log_errors')->defaultFalse()->end()
        ->end();

After:

    $treeBuilder->root('zend', 'array')
        ->children()
            ->arrayNode('logger')
                ->children()
                    ->scalarNode('priority')->defaultValue('INFO')->end()
                    ->booleanNode('log_errors')->defaultFalse()->end()
                ->end()
            ->end()
        ->end();

2. The 'builder' method (in NodeBuilder) has been dropped in favor of an 'append' method (in ArrayNodeDefinition)

Before:

    $treeBuilder->root('doctrine', 'array')
        ->arrayNode('dbal')
            ->builder($this->getDbalConnectionsNode())
        ->end();

After:

    $treeBuilder->root('doctrine', 'array')
        ->children()
            ->arrayNode('dbal')
                ->append($this->getDbalConnectionsNode())
            ->end()
        ->end();

3. The root of a TreeBuilder is now an NodeDefinition (and most probably an ArrayNodeDefinition):

Before:

    $root = $treeBuilder->root('doctrine', 'array');
    $this->addDbalSection($root);

    public function addDbalSection(NodeBuilder $node)
    {
        ...
    }

After:

    $root = $treeBuilder->root('doctrine', 'array');
    $this->addDbalSection($root);

    public function addDbalSection(ArrayNodeDefinition $node)
    {
        ...
    }

4. The NodeBuilder API has changed (this is seldom used):

Before:

    $node = new NodeBuilder('connections', 'array');

After:

The recommended way is to use a tree builder:

    $treeBuilder = new TreeBuilder();
    $node = $treeBuilder->root('connections', 'array');

An other way would be:

    $builder = new NodeBuilder();
    $node = $builder->node('connections', 'array');

Some notes:

- Tree root nodes should most always be array nodes, so this as been made the default:

    $treeBuilder->root('doctrine', 'array') is equivalent to $treeBuilder->root('doctrine')

- There could be more than one ->children() ... ->end() sections. This could help with the readability:

    $treeBuilder->root('doctrine')
        ->children()
            ->scalarNode('default_connection')->end()
        ->end()
        ->fixXmlConfig('type')
        ->children()
            ->arrayNode('types')
                ....
            ->end()
        ->end()
2011-03-17 16:26:15 +01:00
Fabien Potencier
1219b98ec5 renamed some methods in the event dispatcher 2011-03-17 15:27:42 +01:00
Bernhard Schussek
7a63b840f3 [Form] Renamed submit() to bind() 2011-03-17 14:55:26 +01:00
Bernhard Schussek
5bfd02bcd0 [Form] Renamed bind() to bindRequest(). It is now semantically the same as in symfony1 again 2011-03-17 14:51:22 +01:00
Bernhard Schussek
ffa5bd264a [Form] Moved logic of Field::isMultipart() to rendering layer 2011-03-17 14:40:34 +01:00
Bernhard Schussek
50ce0d53a0 [Form] Removed FieldInterface::getDisplayedData(). Use getTransformedData() instead 2011-03-17 14:28:59 +01:00
Bernhard Schussek
f0d841ef8c [Form] Fixed DateTimeToArrayTransformer when transforming empty values and the option 'fields' is set 2011-03-17 14:27:10 +01:00
Bernhard Schussek
1c9a00733f Merge branch 'event-manager' into experimental
Conflicts:
	src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php
	src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php
2011-03-17 13:38:24 +01:00
Bernhard Schussek
466f1b99c5 [Security] Fixed method names in the Firewall listeners 2011-03-17 13:24:23 +01:00
Bernhard Schussek
5f14d8d6aa Merge remote branch 'symfony/master' into event-manager
Conflicts:
	src/Symfony/Bundle/AsseticBundle/CacheWarmer/AssetWriterCacheWarmer.php
	src/Symfony/Bundle/AsseticBundle/Tests/CacheWarmer/AssetWriterCacheWarmerTest.php
	src/Symfony/Bundle/FrameworkBundle/Profiler/ProfilerListener.php
	src/Symfony/Bundle/FrameworkBundle/Resources/config/profiling.xml
	src/Symfony/Component/HttpKernel/HttpKernel.php
	src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php
	src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php
2011-03-17 12:34:12 +01:00
Fabien Potencier
c5c8e57754 [Locale] updated the tests so that we can be green again (previous version always add 2 skipped tests) 2011-03-17 12:20:37 +01:00