Commit Graph

2159 Commits

Author SHA1 Message Date
Bernhard Schussek
6ff4120784 [Form] Added Form option "by_reference" so that objects received from parent forms are modified by reference when this option is true (the default)
The implication is that set<Reference>() in the object of the parent form will not be called (and thus not has to be implemented/public).

If you want to suppress this behaviour, manually set "by_reference" to false.
2011-02-06 19:46:28 +01:00
Javier Eguíluz
42a3e404b2 translated validators resources into Spanish 2011-02-06 19:40:21 +01:00
hidenorigoto
39ed62de46 translated validators resources into Japanese 2011-02-06 17:11:14 +01:00
José Nahuel Cuesta Luengo
f08c9480ee [CssSelector] Fixed PHPDoc blocks. 2011-02-06 16:18:25 +01:00
ornicar
9ba2943aff [HttpKernel] Add unit tests for Kernel. Also slightly modify Kernel to make it more testable. 2011-02-06 16:17:35 +01:00
John Kary
c251a36935 [HttpFoundation] Add tests for Cookie 2011-02-06 16:16:05 +01:00
Kris Wallsmith
4f6256b713 [FrameworkBundle] fixed invalid template filename 2011-02-06 16:14:37 +01:00
ornicar
bd97471954 [HttpKernel] Add test coverage for cache warming 2011-02-05 23:54:09 +01:00
José Nahuel Cuesta Luengo
562ebd5608 [CssSelector] Added PHPDoc blocks to first-level classes. 2011-02-05 23:28:22 +01:00
pborreli
f56a6efbf5 [HttpFoundation] File/File full coverage 2011-02-05 23:24:00 +01:00
Fabien Potencier
e5403490e7 removed the need to define getNamespace() and getPath() in bundles 2011-02-05 22:40:30 +01:00
Fabien Potencier
523e652d9d [FrameworkBundle] fixed the way profiler configuration works 2011-02-05 22:19:14 +01:00
Fabien Potencier
bfe701a2da fixed code coverage 2011-02-05 21:36:20 +01:00
ornicar
80b03f92b3 [HttpKernel] Throw exception when SQLite statement execution failed
This fixes SQLiteProfilerStorageTest, that was failing using PDO.
2011-02-05 20:44:51 +01:00
Jeremy Mikola
743f25a287 [DependencyInjection] Create explicit factoryClass property for Definitions
Previously, the Definition class was used both for type inference and factory construction (if factoryService was absent). This is fine for cases where classes create instances of themselves (e.g. getInstance() or create()), but leads to ambiguity when we have a separate factory class.
2011-02-05 20:39:42 +01:00
ornicar
575b75a9df [DependencyInjection] Fix fixture class loaded twice during dumper tests 2011-02-05 20:27:47 +01:00
Jeremy Mikola
f9138d313b [FrameworkBundle] Implemented single-pass config loading with intelligent option merging for FrameworkExtension
Restructured config format to make processing more straightforward. Important changes that might break existing configs:

 * Added "enabled" option for translator (improves multi-format compat)
 * Removed hash variation of validation annotations option (only boolean)
 * Moved namespace option directly under validation (improves multi-format compat)

The new merge process depends on an internal array of all supported options and their default values, which is used for both validating the config schema and inferring how to merge options (as an added benefit, it helps make the extension self-documenting). Exceptions will now be thrown for merge errors resulting from unrecognized options or invalid types. Since incoming configurations are all merged atop the defaults, many isset() checks were removed. As a rule of thumb, we probably only want to ignore null values when an option would be used to set a parameter.

Also:

 * Added missing attributes to symfony-1.0.xsd
   * profiler: added only-exceptions attribute
   * session: fix types and add pdo attributes
 * Create FrameworkExtension tests with PHP/XML/YAML fixtures
 * Use "%" syntax instead of calling getParameter() within FrameworkExtension
 * Normalize config keys and arrays with helper methods for PHP/XML/YAML compatibility

Earlier changes:

 * Remove nonexistent "DependencyInjection/Resources/" path from XmlFileLoaders
 * Remove hasDefinition() checks, as register methods should only execute once
 * Remove first-run logic from registerTranslatorConfiguration(), as it is only run once
 * Removed apparently obsolete clearTags() calls on definitions for non-enabled features
2011-02-05 20:01:15 +01:00
Fabien Potencier
199e6bf893 [BrowserKit] removed annotation in a unit test to fix coverage 2011-02-05 16:02:59 +01:00
Fabien Potencier
2ae542748a [TwigBundle] made error message more explicit 2011-02-05 01:17:59 +01:00
Fabien Potencier
e2ea634df4 [TwigBundle] fixed inheritance problem 2011-02-04 22:14:25 +01:00
Fabien Potencier
67c9fdf412 [TwigBundle] fixed theme for forms 2011-02-04 21:19:38 +01:00
Fabien Potencier
7f6fc6f0fb [TwigBundle] fixed form template inheritance 2011-02-04 20:41:31 +01:00
Fabien Potencier
37537e3e8c fixed previous commit 2011-02-04 19:38:42 +01:00
Lukas Kahwe Smith
dd71501f54 some fixes by just "blindly" trying to make phpStorm code analysis happier 2011-02-04 19:30:28 +01:00
Fabien Potencier
195c971da6 removed load() from EngineInterface 2011-02-04 19:28:14 +01:00
Martijn Evers
1e3dc1479c [Testing][HttpKernel] Added possibility to functional test raw body data 2011-02-04 13:07:13 +01:00
Fabien Potencier
710a1e56b0 [TwigBundle] added support for template as Twig_Template instances 2011-02-04 13:04:02 +01:00
Fabien Potencier
c68b326665 [TwigBundle] fixed error messages when an error occurs during template compilation 2011-02-04 12:54:53 +01:00
Fabien Potencier
2dfac2a881 fixed typo 2011-02-04 12:20:47 +01:00
Fabien Potencier
f455700b88 fixed previous commit 2011-02-04 12:18:26 +01:00
Victor Berchet
3ed47114d6 [Bundle] Make getPath() less error prone by allowing both backward and forward slashes 2011-02-04 12:12:19 +01:00
Victor Berchet
2a97f89897 [Bundle] Small optimization 2011-02-04 12:10:16 +01:00
Victor Berchet
84bbb945d7 [UniversalClassLoader] Small optimization 2011-02-04 12:10:16 +01:00
marc.weistroff
1316fb547e Reverted e557500c97 and edf57fc392 which deleted the getRequest() method in HttpCache as this methods is needed in the Esi class. 2011-02-04 11:37:09 +01:00
Bernhard Schussek
2276b98fc1 [Form] Fixed: ChoiceFields never validated 2011-02-04 11:30:49 +01:00
Fabien Potencier
6ed7dc1e5a made a small optimization 2011-02-04 05:45:07 +01:00
Kris Wallsmith
ea536b0d9e [FrameworkBundle] added cache warmer priority 2011-02-04 00:59:44 +01:00
Fabien Potencier
6b7e4ad2f9 [TwigBundle] fixed typo 2011-02-04 00:54:09 +01:00
Justin Hileman
5516ac21a2 Fix Doctrine Migrations commands to work with new bundles. 2011-02-04 00:37:02 +01:00
Lukas Kahwe Smith
661d5d236c fixed method call, cosmetic variable rename 2011-02-04 00:32:15 +01:00
Fabien Potencier
93fc26d869 [EventDispatcher] simplified code (thanks Kris Wallsmith for the tip) 2011-02-04 00:29:28 +01:00
Daniel Holmes
b01805a5c4 [FrameworkBundle] added port number to the context passed in to the router 2011-02-04 00:26:18 +01:00
Daniel Holmes
f4282eea98 [Routing] added support for non-standard port numbers in absolute urls 2011-02-04 00:25:25 +01:00
Fabien Potencier
b6f400a2bc [DependencyInjection] made an optimization on dumped DIC
When dumping a Container, and if it is frozen, we use a plain
PHP array for parameters instead of a ParameterBag.
2011-02-04 00:17:51 +01:00
Fabien Potencier
2d69369c69 [ClassLoader] added the possibility to define more than one directory for a namespace or a prefix 2011-02-03 22:44:22 +01:00
Fabien Potencier
c05fb03c7d [HttpKernel] changed the core.view event to only be notified when the controller does not return a Response 2011-02-03 19:39:28 +01:00
Bernhard Schussek
a725415440 [Form] Fixed RepeatedField not to trigger NotNull/NotBlank errors if any of the fields was filled in 2011-02-03 13:28:29 +01:00
Bernhard Schussek
39c148197f [Form] Fixed form validation
Separated validation of data and form had serious drawbacks. When a form had nested form whose data was not connected to the data of the root form, this data would not be validated.

The new implementation validates the whole object graph at once. Class Form has a new method validateData(), that manually passes the data to the GraphWalker of the Validator and overrides the Default group with the groups set in the form.
2011-02-03 13:21:44 +01:00
Bernhard Schussek
1a34743990 [Validator] Fixed: Collections annotated with @Valid may contain scalar values. These values are ignored by the GraphWalker 2011-02-03 13:21:37 +01:00
Bernhard Schussek
50955a3919 [Validator] Fixed PropertyPath to read array indices with special characters 2011-02-03 11:28:51 +01:00