Commit Graph

1283 Commits

Author SHA1 Message Date
Fabien Potencier
60bbb8f380 [DependencyInjection] optimized compiled containers
* removed the __call() method in Container: it means that now, there is only
   one way to get a service: via the get() method;

 * removed the $shared variable in the dumped Container classes (we now use
   the $services variable from the parent class directly -- this is where we
   have a performance improvement);

 * optimized the PHP Dumper output.
2010-11-23 22:43:09 +01:00
Francis Besset
5e150931c9 [TwigBundle] Fix call to a member function get() on a non-object 2010-11-23 22:04:51 +01:00
Fabien Potencier
c094de148f [FrameworkBundle] the app:escaping config can be empty 2010-11-23 18:49:34 +01:00
Fabien Potencier
a40d317f49 made a slight optimization 2010-11-23 18:44:04 +01:00
Fabien Potencier
ad68092291 removed the OutputEscaper component, added escape mechanism in the Templating Engine class 2010-11-23 12:59:21 +01:00
H. Westphal
5b056b2b9a Refactored web profiler template definitions to make it easier for bundle developers to add their templates 2010-11-23 12:48:35 +01:00
H. Westphal
1271656b56 Microseconds to milliseconds conversion in web profiler db twig template 2010-11-23 12:46:04 +01:00
H. Westphal
c1c591b2c6 Fixed time display in web profiler db twig template and made the toolbar block more compact 2010-11-23 12:45:55 +01:00
H. Westphal
331466f1eb Fixed web profiler mongodb twig template 2010-11-23 12:45:47 +01:00
Fabien Potencier
30ccd0b794 [Form] fixed unit test paths 2010-11-23 06:59:26 +01:00
Bernhard Schussek
e0aa3f30a8 [Form] Improved FileField to store files in a temporary location in case validation fails 2010-11-23 06:51:30 +01:00
Bernhard Schussek
f2f0d044c3 [Form][FrameworkBundle] Fixed default values of CheckboxFields 2010-11-23 06:51:23 +01:00
Bernhard Schussek
d95d33666d [HttpFoundation] Fixed class Request to convert empty files to NULL 2010-11-23 06:51:17 +01:00
Bernhard Schussek
f9e830caa2 [Form] Added hook method preprocessData() to FieldGroup 2010-11-23 06:51:13 +01:00
Bernhard Schussek
4aa12248c5 [Form] Field can now be instantiated to create anonymous fields 2010-11-23 06:51:10 +01:00
Dominique Bongiraud
73daccd6c3 [HttpFoundation] Fixed coding style, fixed wrong parameter method, added omitted split ip and added upper limit to the netmask ip 2010-11-22 22:28:21 +01:00
Lukas Kahwe Smith
14520d565b tweaked phpdoc comment descriptions to explain how multiple base URL's are handled 2010-11-22 18:54:33 +01:00
Fabien Potencier
a79ed13624 [Routing] removed the variable_prefixes and variable_regex Route options 2010-11-22 11:04:53 +01:00
Fabien Potencier
e9d4d990df [WebProfiler] renamed block names for data collector templates 2010-11-22 08:43:30 +01:00
Fabien Potencier
7b835cbc57 [FrameworkBundle] added @ before using ob_get_clean() for compatibility with PHP 5.4 2010-11-21 21:51:19 +01:00
Fabien Potencier
ba9e3dec69 [Templating] fix problem with PHP 5.4 2010-11-21 21:23:28 +01:00
Fabien Potencier
381347bcfe [WebProfilerBundle] fixed data collector loading (they should always be loaded as you can enable the web profiler without the web debug toolbar) 2010-11-21 15:51:50 +01:00
H. Westphal
97d4dce614 Adds the ability to configure additional web profiler templates 2010-11-21 15:48:01 +01:00
Fabien Potencier
6fa943ad54 moved Exception and WebProfiler templates to Twig 2010-11-21 15:37:01 +01:00
Bulat Shakirzyanov
21f088d86a [DependencyInjection] replaced assertEquals(spl_object_hash()) with assertSame 2010-11-21 15:26:25 +01:00
fivestar
bfba386536 Fixed typo 2010-11-21 15:25:44 +01:00
ornicar
faf0182be0 [HttpFoundation] Rename HeaderBag::validateCookieName to HeaderBag::validateCookie 2010-11-21 15:24:52 +01:00
Fabien Potencier
67f6889287 [TwigBundle] added support for Twig_Template instances as argument to include tag 2010-11-21 09:33:35 +01:00
Fabien Potencier
cbb22b4ec4 [Templating] added an Engine::load() method 2010-11-21 09:33:03 +01:00
Fabien Potencier
e3551b5f87 [TwigBundle] renamed yaml filter to yaml_encode (to be coherent with json_encode) 2010-11-19 13:30:14 +01:00
Fabien Potencier
a323dd0e93 [TwigBundle] added filters from Code helpers 2010-11-19 10:14:45 +01:00
Fabien Potencier
c881329719 [TwigBundle] removed unneeded use statement 2010-11-19 09:54:52 +01:00
Fabien Potencier
84cf5698c5 [TwigBundle] fixed include tag to reflect the new syntax from Twig 2010-11-19 09:51:12 +01:00
Fabien Potencier
17c500e0f0 [TwigBundle] added a yaml filter 2010-11-19 09:50:32 +01:00
Bernhard Schussek
e0d6aad5f4 [Form][FrameworkBundle][TwigBundle] Introduced class FieldError to wrap form errors 2010-11-19 07:11:29 +01:00
Bernhard Schussek
68cebd667a [Validator] Group sequences must now always contain the group "<ClassName>" and never the group "Default" since that group is redefined by the group sequence 2010-11-19 07:11:26 +01:00
Bernhard Schussek
a71cad480a [Validator] Added @validation:GroupSequence to annotation driver 2010-11-19 07:11:23 +01:00
Bernhard Schussek
6176063b30 [TwigBundle] Fixed variable reference in the errors block of the form.twig template 2010-11-19 07:11:20 +01:00
Bernhard Schussek
681ce7f46a [Form] Fixed: FieldGroup::hasErrors() does not return true if only children have errors 2010-11-19 07:11:17 +01:00
henrikbjorn
c5ceb37f8b Changed bag.php and request_panel.php to dump arrays and objects as yaml. 2010-11-18 19:54:29 +01:00
Fabien Potencier
333504a201 [OutputEscaper] fixed output escaping when a variable was decorated with SafeDecorator and passed to another part of the system where decoration also happens on the same un-decorated variable
This is the case for instance when you pass a variable to a template like this:

new SafeDecorator($var);

and in the template, you pass it again to another embedded template:

$view->render('...', array('var' => $var);

The second time, $var will be escaped as the SafeDecorator wrapper will have been removed
by the escaper.
2010-11-18 19:25:18 +01:00
Fabien Potencier
3ce745cf6e fixed typo 2010-11-18 18:49:08 +01:00
Fabien Potencier
b6923dd7b9 changed Cache-Control default value behavior
The PHP native cache limiter feature has been disabled as this is now managed
by the HeaderBag class directly instead (see below.)

The HeaderBag class uses the following rules to define a sensible and
convervative default value for the Response 'Cache-Control' header:

 * If no cache header is defined ('Cache-Control', 'ETag', 'Last-Modified',
   and 'Expires'), 'Cache-Control' is set to 'no-cache';

 * If 'Cache-Control' is empty, its value is set to "private, max-age=0,
   must-revalidate";

 * But if at least one 'Cache-Control' directive is set, and no 'public' or
   'private' directives have been explicitely added, Symfony2 adds the
   'private' directive automatically (except when 's-maxage' is set.)

So, remember to explicitly add the 'public' directive to 'Cache-Control' when
you want shared caches to store your application resources:

    // The Response is private by default
    $response->setEtag($etag);
    $response->setLastModified($date);
    $response->setMaxAge(10);

    // Change the Response to be public
    $response->setPublic();

    // Set cache settings in one call
    $response->setCache(array(
        'etag'          => $etag,
        'last_modified' => $date,
        'max_age'       => 10,
        'public'        => true,
    ));
2010-11-18 17:05:05 +01:00
Thomas
d9239d1c64 fix doctrine command getBundleMetadatas function 2010-11-18 16:48:28 +01:00
Thomas
e204a1845b [DoctrineBundle] make the task works with vendor bundle namespace 2010-11-18 16:48:18 +01:00
Jordi Boggiano
ac0081f8b9 Switching doctypes to HTML5, it's the future 2010-11-18 07:01:03 +01:00
Jordi Boggiano
e69c5ae860 Coding style fixes 2010-11-18 07:00:03 +01:00
Jordi Boggiano
db3e12b122 [Routing] Fixed tests for windows 2010-11-18 06:59:16 +01:00
Jordi Boggiano
7a255fe39f [HttpFoundation] Fixed tests for windows 2010-11-18 06:59:12 +01:00
Jordi Boggiano
b2bd7ce57d [Validator] Skipping AnnotationLoader tests if doctrine-common is not present 2010-11-18 06:59:09 +01:00