Commit Graph

573 Commits

Author SHA1 Message Date
Igor Wiedler
69f56dbbd9 [Locale] move intl bugs to skipped tests 2011-02-23 14:20:38 +01:00
Igor Wiedler
8c1146974f [Locale] add support for escaping, give specifics on implementation used in tests 2011-02-23 14:20:38 +01:00
Igor Wiedler
55ac407458 [Locale] first implementation of StubIntlDateFormatter 2011-02-23 14:20:37 +01:00
Eriksen Costa
b649843e00 [Locale] added implementation to StubNumberFormatter::getLocale(), matching StubIntlDateFormatter::getLocale() 2011-02-23 13:26:05 +01:00
Eriksen Costa
b58e25cc83 [Locale] added static constructor 2011-02-23 13:26:05 +01:00
Eriksen Costa
69b0e09d6a [Locale] added stub implementations of Locale and NumberFormatter classes
Updated update-data.php script to extract locales, countries names, languages and currencies
from ICU to be used by the stub implementations
2011-02-23 13:26:05 +01:00
Kris Wallsmith
fb005396dc [HttpKernel] fixed another test where an explicit cache-control header is necessary 2011-02-21 21:53:04 -08:00
Kris Wallsmith
3e131f5b70 [HttpKernel] fixed invalid test
According to ResponseHeaderBag::computeCacheControlValue(), a response with an ETag but no explicit Cache-Control header should have a sensible Cache-Control of "private, must-revalidate" set. According to Response::isCacheable(), a response that includes a private Cache-Controls is not considered cacheable. Therefore, in order for this test response to be cacheable and stored, it requires an explicit Cache-Control of public.
2011-02-21 20:09:50 -08:00
Kris Wallsmith
a0bae94f88 [HttpFoundation] updated ResponseHeaderBag to compute Cache-Control whenever any of the headers it considers changes 2011-02-21 19:57:05 -08:00
Fabien Potencier
fc372bc217 [HttpKernel] changed core.view event to use notifyUntil() instead of filter() -- as soon as a listener returns a Response, we are done 2011-02-21 18:24:55 +01:00
Fabien Potencier
bf20238178 fixed a bug in Response content-type auto-detection
Without this patch, if you call __toString() on a Response,
the content-type auto-detection would never be trigerred
as __toString() changes the default content-type.
2011-02-21 16:57:25 +01:00
Fabien Potencier
9619c7dade [Routing] removing the routing hack where we add a / at the beginning if it does not exist 2011-02-21 10:25:22 +01:00
Matthew Lewinski
c56bcd9ff4 Fix unit test breakage from ProfilerStorageInterface change. 2011-02-20 20:06:36 -06:00
yclian
092403909e [DependencyInjection] Test for Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass. 2011-02-20 20:23:40 +08:00
yclian
3275820a6f [DependencyInjection] Add Symfony\Tests\Component\DependencyInjection\ContainerBuilderTest::testAddGetCompilerPass(). 2011-02-20 20:23:32 +08:00
Yuen-Chi Lian
a0e00ff159 [DependencyInjection] Aesthetic changes on ContainerTest, consequence of not using a formatter. 2011-02-19 19:50:57 +01:00
Yuen-Chi Lian
c42f38523f [DependencyInjection] Test coverage improvements and corrections on Container. 2011-02-19 19:49:26 +01: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
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
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
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
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
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
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
Victor Berchet
0a33cbb403 [Finder] Add support for relative path 2011-02-17 07:23:55 +01:00
Bernhard Schussek
9569262635 [Form] Fixed date handling classes to use server timezone by default 2011-02-16 23:05:22 +01:00
Bernhard Schussek
0a260b96fb [Form] Fixed error handling in DateTimeToArrayTransformer 2011-02-16 23:05:22 +01:00
Bernhard Schussek
df011ed1ef [Form] Fixed isXXXWithinRange() methods in TimeField and DateField to ignore empty dropdowns 2011-02-16 23:05:22 +01:00
Bernhard Schussek
14c3518c6e [Form] Fixed: If a DateField or TimeField is displayed with select boxes, either all or no select box must have a value selected 2011-02-16 23:05:22 +01:00
Bernhard Schussek
40acc6ac79 [Form] Fixed ChoiceField::isChoiceSelected() to differentiate between zero and empty 2011-02-16 23:05:21 +01:00
Bernhard Schussek
1593d6f75d [Form] Added method FieldInterface::isEmpty() 2011-02-16 23:05:21 +01:00
Johannes M. Schmitt
53f3ff8258 [Security] adds a chain user provider 2011-02-16 23:00:27 +01:00
Victor Berchet
bad3a97ad6 [Finder] tweak code 2011-02-16 22:51:06 +01:00
Fabien Potencier
a29a413c48 made DIC extensions members of the Container instead of static members 2011-02-15 22:22:32 +01:00
Fabien Potencier
62e3053769 refactored previous commit, fixed tests
How to upgrade?

For XML configuration files:

 * All extensions should now use the config tag (this is just a convention as
   the YAML configurations files do not use it anymore):

 * The previous change means that the doctrine and security bundles now are
   wrapped under a main "config" tag:

        <doctrine:config>
            <doctrine:orm />
            <doctrine:dbal />
        </doctrine:config>

        <security:config>
            <security:acl />
            ...
        </security:config>

For YAML configuration files:

 * The main keys have been renamed as follows:

        * assetic:config -> assetic
        * app:config -> framework
        * webprofiler:config -> web_profiler
        * doctrine_odm.mongodb -> doctrine_mongo_db
        * doctrine:orm -> doctrine: { orm: ... }
        * doctrine:dbal -> doctrine: { dbal: ... }
        * security:config -> security
        * security:acl -> security: { acl: ... }
        * twig.config -> twig
        * zend.config -> zend
2011-02-15 22:22:28 +01:00
Pablo Godel
02492d2ab3 renamed SQLiteProfilerStorage to SqliteProfilerStorage 2011-02-15 21:57:09 +01:00
Pablo Godel
f6a1c2d195 renamed SQLiteProfilerStorage to SqliteProfilerStorage 2011-02-15 21:57:09 +01:00
Pablo Godel
c3649882f6 renamed file 2011-02-15 21:57:08 +01:00
Pablo Godel
05f651ae87 renamed file 2011-02-15 21:57:08 +01:00
Jeremy Mikola
cc4eb6b40f [Security] Add providerKey to PreAuthenticatedToken tokens constructed by PreAuthenticatedAuthenticationProvider 2011-02-15 21:55:24 +01:00
Kris Wallsmith
ba239905d7 [HttpFoundation] removed unknown constructor arg from tests 2011-02-15 21:51:21 +01:00