Commit Graph

2338 Commits

Author SHA1 Message Date
Kris Wallsmith
c01be42933 [AsseticBundle] made the filter manager lazy 2011-02-19 12:31:51 +01:00
Kris Wallsmith
a9fb0f3a4b [AsseticBundle] moved test 2011-02-19 12:31:51 +01:00
Christophe Coevoet
d2684f3f73 [AsseticBundle] Converted to use a Configuration class 2011-02-19 12:30:52 +01:00
Fabien Potencier
dff3585162 fixed profiler when using ESI in dev env 2011-02-19 12:18:49 +01:00
Ryan Weaver
c9406b62b2 [SecurityBundle] Allowing the main Configuration tree to allow "factories" without a validation exception.
The main tree doesn't actually process the factories (that's done in an earlier step), so it doesn't actually need their real value. It does, however, need to *not* throw an exception when they're present. An alternative to this approach would be to call ignoreExtraKeys() on the root node of the main tree, but this would allow extra keys to be passed in at the root level, which I thought was a less-desirable solution.
2011-02-18 16:12:12 -06:00
Ryan Weaver
b20ee0fb71 [SecurityBundle] Removing an old configuration key in a test - caught by the Configuration validation. 2011-02-18 13:36:10 -06:00
Ryan Weaver
a334a576cf [SecurityBundle] Adding the ignoreExtraFields option to the factories tree so that there aren't validation errors on all the other unknown fields. 2011-02-18 13:35:19 -06:00
Ryan Weaver
026ab6c6ce [Config] Adding an ignoreExtraKeys options, which allows you to let options simply be ignore without throwing a validation exception.
I had thought that this was unnecessary - when would you ever want to just let "extra" options fail silently?

But, the SecurityExtension takes advantage of this by creating two separate config trees. The first tree looks for just one particular value on the configuration array and ignores the rest. So, there *is* a use-case for allowing all extra fields to simply be ignored, though this should not be the norm.
2011-02-18 13:31:14 -06:00
Ryan Weaver
d2971e0f5f [Config] Reverting some meaningless changes that are no longer needed to minimize the true diff of the changes. Increasing the test precision. 2011-02-18 13:08:53 -06:00
Ryan Weaver
6f17b6d58e [Config] Reverting the preventExtraKeys option. This is a revert of functionality that would have allowed "unnamed" children to be added to an array node.
We decided that this is not necessary and that it's leaving too many things wide open. Instead, in these cases where we have an array with unknown items, a prototype should be used.

Further functionality will need to be added later to allow you to specify a few nodes that you *do* know about under an array and then also specify a prototype to catch everything else.
2011-02-18 12:59:27 -06:00
Jeremy Mikola
f0d2ce7f32 [TwigBundle] Refactored TwigExtension class and implemented configuration tree
Added config fixtures in each format to demonstrate the possible styles of all of the extension options. These should all be covered by the updated tests. Made XSD slightly more restrictive, with regards to the "type" attribute on globals. This is coupled with validation in the configuration class.
2011-02-18 12:58:04 -05:00
Ryan Weaver
6d24d37b16 [Config] Moving the removal of the key attribute on ArrayNode onto the setKeyAttribute() method per Johannes.
This is more consistent with how this was handled elsewhere, and it really is an "option" on the keyAttribute idea.
2011-02-18 08:41:30 -06:00
Ryan Weaver
48459e9082 [Config] Renaming the key attribute removal property for consistency per Johannes' recommendation. Also fixing a PHPDoc typo per Stof. 2011-02-18 08:38:09 -06:00
Ryan Weaver
663dcbcb32 [SwiftmailerBundle] Removing unnecessary "enabled" key in a test.
I double-checked with Stof - this is obviously unnecessary and there was no meaning behind including it. This caused the test to fail with the new validation.
2011-02-18 07:55:39 -06:00
Ryan Weaver
2d94f2d8d0 [FrameworkBundle] Removing the "namespace" key when it's defined in its own weird location in XML. This prevents that key, which we move in this same location, from looking like an invalid option during validation. 2011-02-18 07:43:36 -06:00
Ryan Weaver
d6617f6fba [Config] Renaming NodeBuilder::nodeBuilder() to NodeBuilder::builder() due to the fact that PHP can get confused when you have a __construct() method *and* a method that has the same name as the class (looks like two constructors to PHP). 2011-02-18 07:31:00 -06:00
Ryan Weaver
ea768fe6fc [Config] Making the option to remove a key attribute optional.
This is *usually* what you want (and is defaulted this way). If you have an entry in an array *just* so it can become the key to that entry later, then you shouldn't normally still need it in the resulting array.

The importance of this comes in with validation. Since we're throwing an exception if you have any unrecognized options, the presence of the "key" field in the resulting array will cause issues when it's not needed.
2011-02-18 07:15:59 -06:00
Ryan Weaver
554628cf5b [Config] Renaming the NodeBuilder::addNodeBuilder() to simply NodeBuilder::nodeBuilder() to be consistent with the other names: node(), arrayNode(). 2011-02-18 07:00:03 -06:00
Ryan Weaver
7a9243a220 [Config] Making changes per the recent movement of the Config builder into the Config component. 2011-02-18 06:59:35 -06:00
Ryan Weaver
e7c098e8a2 [DependencyInjection] Renaming allowUnnamedChildren to preventExtraKeys. Also moved the place where validation of extra configs occurs. 2011-02-18 06:52:44 -06:00
Ryan Weaver
fd5cdfc18f [DependencyInjection] Being sure to remove XML-remapped singular options and key attribute options after processing.
This prevents these keys from being validated as extra fields.
2011-02-18 06:52:44 -06:00
Ryan Weaver
bd15ddda96 [DependencyInjection] Adding a NodeBuilder::addNodeBuilder() method that helps achieve a fluid interface when a pre-built NodeBuilder needs to be added. 2011-02-18 06:51:56 -06:00
Ryan Weaver
f5b1cb18e1 [DependencyInjection] Initial implementation of an allowUnnamedChildren method on NodeBuilder. Also added an "extra field" exception.
This allows for an array node, which has any number of child values not represented by nodes.
2011-02-18 06:51:56 -06:00
Miha Vrhovnik
9b602626eb Added missing use statement 2011-02-18 13:48:22 +01:00
hhamon
f985da5a9c [HttpFoundation] fix Cache-Control header when forcing the Response to have an Expires header field. The RFC2616 Bis indicates that if the Response has both max-age (or s-maxage) and Expires header field, the Cache-Control maxage wins over Expires. The previous code in ResponseHeaderBag always returned "private, max-age=0, must-revalidate" even if the Expires header field was forced.
This commit breaks functional tests in Symfony\Component\HttpKernel\HttpCache\HttpCacheTest.php. I tried to fix functional tests but I didn\'t manage to. For your information, the "try { } catch" block in the HttpKernel\HttpCache::lookup() method seems strange because I suspect line 274 to never leverage any exception...
2011-02-18 12:34:33 +01:00
Juan Ases García
2ba9ebfee9 Fixed typo in json error template 2011-02-18 12:10:07 +01:00
Jordi Boggiano
3fbe366df2 [Yaml] Fix warning 2011-02-18 12:08:05 +01:00
Fabien Potencier
75238c6817 added the LICENSE file for the YAML component 2011-02-18 11:52:11 +01:00
Clément Jobeili
e8d39d6d32 Fix description 2011-02-18 10:43:34 +01:00
Clément Jobeili
aef85dde27 Add an example using the options in the help message 2011-02-18 10:41:34 +01:00
Clément Jobeili
438ccbdf8a Fix CS 2011-02-18 10:34:44 +01:00
Clément Jobeili
9b16f1a614 [SwiftMailer] Add the SendEmail Command (for the spool) 2011-02-18 10:22:14 +01:00
Christophe Coevoet
76262b2ccc Fixed spool handling 2011-02-18 08:32:43 +01:00
Christophe Coevoet
b3460653bc Revert "fix spooler handling"
This reverts commit 3607f1d334.
2011-02-18 08:32:43 +01:00
Justin Hileman
b8c531e1fc Add a namespace separator for console commands in Command sub-directories.
Fixes a bug in `Bundle::registerCommands` with console commands in sub-directories of `Command`. `MyBundle\Command\FooCommand` worked great, but with `MyBundle\Command\Bar\BazCommand` Bundle would try to register `MyBundle\CommandBar\BazCommand` instead.
2011-02-17 19:39:21 +01:00
hhamon
b61e288e0b [BrowserKit] fix phpdoc for Client::followRedirect() 2011-02-17 19:38:06 +01:00
hhamon
b687e52835 [DomCrawler] fix Form::getUri() when the form action attribute contains only a sharp (#) character. 2011-02-17 19:37:25 +01:00
Fabien Potencier
6b12c21261 moved DependencyInjection\Configuration to Config\Definition 2011-02-17 16:03:48 +01:00
Jordi Boggiano
38813c122e [TwigBundle] Resolve some TODOs in form templates 2011-02-17 16:00:28 +01:00
Ryan Weaver
c5e4dfb5a6 [DependencyInjection] Adding to InvalidArgumentException messages to clarify when a service is given an invalid "tags" value. 2011-02-17 15:59:39 +01:00
Ryan Weaver
a0fc4240f9 [HttpKernel] Adding a line break to the end of the Kernel die() statements so that the output is more natural when receiving this message from the terminal. 2011-02-17 15:58:45 +01:00
Fabien Potencier
d64277d101 fixed typo 2011-02-17 13:33:15 +01:00
Elliot Anderson
fed8162d5d Removed extraneous git log file 2011-02-17 13:31:46 +01:00
Victor Berchet
0a33cbb403 [Finder] Add support for relative path 2011-02-17 07:23:55 +01:00
Jeremy Mikola
92f50bbe4d [SwiftmailerBundle] Fix expected default value in SwiftmailerExtension unit test 2011-02-17 06:49:28 +01:00
Lukas Kahwe Smith
3607f1d334 fix spooler handling 2011-02-17 06:49:05 +01:00
Christophe Coevoet
9d2a9dd65d Updated the root node to match the new syntax 2011-02-16 23:07:12 +01:00
Christophe Coevoet
990910d601 Converted SwiftmailerBundle to use a Configuration class 2011-02-16 23:07:11 +01:00
Christophe Coevoet
ee8ad0c4e9 Fixed previous commit to handle the case of arrays 2011-02-16 23:07:11 +01:00
Christophe Coevoet
27e2ec139d Added the possibility to add the value in the exception message 2011-02-16 23:07:11 +01:00