Commit Graph

31027 Commits

Author SHA1 Message Date
Jordi Boggiano
c6dbbb857a [Form] Removed dead code 2010-11-16 07:28:24 +01:00
Jordi Boggiano
fbc29f061c [Form] Coding style fixes 2010-11-16 07:28:20 +01:00
Jordi Boggiano
0bdb271608 [Form] Added parent calls to all configure() methods of Fields and Transformers
The calls that were on top of the function have also been moved to the bottom for safety (see previous commit)
2010-11-16 07:28:12 +01:00
GordonsLondon
23ac47e011 [Form] Added support for __get and __set in PropertyPath 2010-11-16 07:28:07 +01:00
Benjamin Eberlei
5aeb358721 [Validator] Made the namespace prefix for annotations configurable
Modified the framework bundle to use validation => Symfony\Component\Validator\Validator defaults.
Enhanced Framework Extension validator configuration to allow to extend this configuration with
user-specified annotations, for example:

    validation:
        enabled: true
        annotations:
            namespaces:
                myprojectvalidator: MyProject\Validator\

to register @myprojectvalidator:Validator(...)
2010-11-16 07:28:02 +01:00
Fabien Potencier
0131ff21c5 [Translation] removed unneeded assignement 2010-11-16 07:22:39 +01:00
Jordi Boggiano
3cbc99c180 [Translation] Added flatten method on ArrayLoader
This allows the translations to be deeply nested arrays that will be flattened, allowing for namespacing of translations easily.

The following:
  'key' => array('key2' => array('key3' => 'value'))
Becomes:
  'key.key2.key3' => 'value'

This isn't applied to Xliff since it does not make sense within the scope of the XLIFF standard
2010-11-16 07:20:57 +01:00
Fabien Potencier
4e5c99dab0 [EventDispatcher] removed the possibility to remove one listener for an event 2010-11-15 23:14:36 +01:00
Jordi Boggiano
d45954af07 [Form][TwigBundle] Making sure all field types are rendered with the proper template 2010-11-15 14:54:11 +01:00
Fabien Potencier
f6cc63c99c removed ArrayAccess interface for Container and Controller 2010-11-15 10:05:28 +01:00
Fabien Potencier
53dd4e39c7 [DependencyInjection] changed the YAML notation for optional services from @@ to @? 2010-11-15 10:00:59 +01:00
Fabien Potencier
92f3d9e7ec [DependencyInjection] removed the leading _ for anonymous service ids (the usage of strtr() in the conversion between ids and methods does not take leading _ into account like camelize() does) 2010-11-15 09:56:20 +01:00
Fabien Potencier
a45baed812 [HttpFoundation] removed optimization for setLocale() as it breaks when locale is not the default and the user wants to switch back to the default locale 2010-11-15 09:50:01 +01:00
Ryan Weaver
58a240baba [HttpFoundation] Allow the SERVER_PORT key of the server ParameterBag in Request to be a string value without confusing Request::getHttpHost().
The idea of a string port is probably semantically wrong, but it actually follows the convention of at least some web servers ($_SERVER['SERVER_PORT'] is actually a string). And since the $port variable is used as a string in getHttpHost(), it's correct to allow the types not to match.
2010-11-15 09:45:59 +01:00
Jordi Boggiano
3813eecf17 [Translation] Added YamlFileLoader 2010-11-15 09:33:00 +01:00
Jordi Boggiano
f2107e4b3a [Translation] Explicitly mark methods as public 2010-11-15 09:29:18 +01:00
Ryan Weaver
81272b22fa [HttpFoundation] Adding PHPDoc to the Request class and removing two unused variables. 2010-11-13 16:03:57 +01:00
Fabien Potencier
98f3ac65f4 fixed configuration bugs 2010-11-12 20:11:22 +01:00
Fabien Potencier
7257571be4 [HttpFoundation] added missing code for last commit 2010-11-12 19:49:01 +01:00
Fabien Potencier
942104a5ff [HttpFoundation] added a setCache() method to ease setting the HTTP cache headers in one simple call 2010-11-12 19:46:39 +01:00
Fabien Potencier
f669674293 [HttpFoundation] added a missing phpdoc 2010-11-12 19:46:22 +01:00
Fabien Potencier
f6ddeeb36b [HttpFoundation] added Response::setPublic() and changed setPrivate() to not take any argument 2010-11-12 19:45:28 +01:00
jeff
69cd21d8be [Validator] Fixed annotation loader to not add parent constraints twice 2010-11-12 17:56:09 +01:00
Bernhard Schussek
48b3e92504 [Form] Fixed: parent::configure() should always be called after adding options to overrule options in the parent class 2010-11-12 17:55:52 +01:00
Jordi Boggiano
a198bbcf43 [Form] throw an exception if session_id() is empty when a csrf token is generated 2010-11-12 17:53:29 +01:00
ever.zet
4c340c5cc9 [Form] fixed forms grouped validation
Added ability to specify **match-all** validation group, which
constraints will runs on every specified validation group.
Added groups="*" option to `Form::data` Valid validator.
2010-11-12 17:53:17 +01:00
Bernhard Schussek
f5b451f5b9 [Form] Fixed MoneyToLocalizedStringTransformer and added tests 2010-11-12 17:52:56 +01:00
Fabien Potencier
efed6005cb [DependencyInjection] fixed PHP dumper
In the dumped PHP class, we must use get() and not get*Service() methods to get services.
That's because all calls must be managed by get(). From the outside, you can call
get*Service() because as they are protected, they are caught by the __call() method;
which is not the case obviously when it is used internally.

If not, if you override a service with set(), this won't work when a service
depends on this one (the default one will still be used).
2010-11-12 17:38:32 +01:00
Fabien Potencier
44ccd44dd6 [Routing] fixed ApacheMatcherDumper default config 2010-11-11 23:22:15 +01:00
Fabien Potencier
51a3d0ba6a refactored session configuration
The configuration names have been changed to avoid confusion (user was
ambiguous)

    Before:
          <app:user default_locale="fr">
              <app:session name="SYMFONY" type="Native" lifetime="3600" />
          </app:user>

    After:
          <app:session default_locale="fr" name="SYMFONY" storage_id="native" lifetime="3600" />
2010-11-10 10:47:03 +01:00
GordonsLondon
bfae4ad86c [Form] PercentField fixed option collision 2010-11-10 07:49:53 +01:00
Fabien Potencier
7b02766373 fixed session management
Some explanations on how it works now:

 * The Session is an optional dependency of the Request. If you create the
   Request yourself (which is mandatory now in the front controller) and if
   you don't inject a Session yourself (which is recommended if you want the
   session to be configured via dependency injection), the Symfony2 Kernel
   will associate the Session configured in the Container with the Request
   automatically.

 * When duplicating a request, the session is shared between the parent and
   the child (that's because duplicated requests are sub-requests of the main
   one most of the time.) Notice that when you use ::create(), the behavior is
   the same as for the constructor; no session is attached to the Request.

 * Symfony2 tries hard to not create a session cookie when it is not needed
   but a Session object is always available (the cookie is only created when
   "something" is stored in the session.)

 * Symfony2 only starts a session when:

   * A session already exists in the request ($_COOKIE[session_name()] is
     defined -- this is done by RequestListener);

   * There is something written in the session object (the cookie will be sent
     to the Client).

 * Notice that reading from the session does not start the session anymore (as
   we don't need to start a new session to get the default values, and because
   if a session exists, it has already been started by RequestListener.)
2010-11-09 22:34:48 +01:00
Oleg Zinchenko
6f28511ee4 [Form] add type for FileField class 2010-11-06 19:34:30 +01:00
Fabien Potencier
4d4f9f344e added request attributes in the request data collector and web profiler 2010-11-06 16:47:49 +01:00
Fabien Potencier
a471f65759 [HttpKernel] tweaked HttpKernelInterface 2010-11-06 15:13:23 +01:00
Fabien Potencier
f6cd582afc [HttpKernel] updated bootstrap.php 2010-11-05 02:35:30 +01:00
Johannes Schmitt
6aacfa3216 fixes a bug where in most cases cookies with path / were not set properly 2010-11-03 18:33:50 +01:00
Kris Wallsmith
c991b250ea [DependencyInjection] updated TaggedContainerInterface to extend ContainerInterface 2010-11-03 17:16:57 +01:00
ornicar
1d9aa5bf8a [HttpKernel] Fix parameters order in Client::filterRequest 2010-11-03 15:15:24 +01:00
ornicar
cf8d473313 [BrowserKit] Fix parameters order in Client::submit 2010-11-03 15:15:21 +01:00
Fabien Potencier
5bd03e1c58 [HttpKernel] added unit tests for ESI 2010-11-02 20:00:18 +01:00
Fabien Potencier
556bfcb804 [HttpKernel] added some more unit tests 2010-11-02 18:38:11 +01:00
Fabien Potencier
a19cdce1bc [Security] added some missing unit tests 2010-10-31 23:41:36 +01:00
Fabien Potencier
58bd4acdd1 [Translation] added some unit tests 2010-10-31 23:23:42 +01:00
Fabien Potencier
ec417578ca [Security] added unit tests to some authenticated providers (code coverage is more than 96% for the Security component now) 2010-10-31 15:41:15 +01:00
Fabien Potencier
1185a26eb9 [HttpKernel] simplified code a bit 2010-10-31 14:44:35 +01:00
Fabien Potencier
3d5054f21f [Security] added unit tests for the Authentication sub-namespace 2010-10-31 13:39:12 +01:00
Fabien Potencier
eb4d51f181 [HttpKernel] fixed phpdoc typos 2010-10-31 12:55:30 +01:00
Fabien Potencier
3506dfabff [HttpKernel] added a return value to the purge() method of the Cache store class 2010-10-30 21:15:43 +02:00
Fabien Potencier
dd9b77ed96 [HttpFoundation] added Response::setVary() 2010-10-30 21:02:05 +02:00
jeff
ae888b80f6 [HttpFoundation] removed port number from HOST header
To be consistent with backup values (SERVER_NAME, SERVER_ADDR).
fix a problem with getUriForPath($path) where port number may be present twice.
2010-10-28 15:14:48 +02:00
jeff
a5d4acc54d [HttpFoundation] updated get() signature to get($key, $default = null, $first = true)
This is more consistent with the get() method of ParameterBag
2010-10-28 15:12:48 +02:00
Fabien Potencier
13f36b1657 Removed logic that tried to avoid double-escaping
Because that's just not possible (have a look at the unit tests to see all possibilities
-- as you will notice, there is no way we can determine the context and whether the
data are already escaped or not).

So, we always escape data, which means that sometimes, we will try to escape already
escaped data. This is not a problem for everything except strings. That's because
strings are not wrapped with an object like everything else (for performance reason).

This means that all escapers must be able to avoid double-escaping (that's the case
for the default escapers as both htmlspecialchars() and htmlentities() have a flag
that does just this).
2010-10-28 13:32:10 +02:00
Fabien Potencier
3eee458430 [OutputEscaper] replaced the JS escaper with the one from Twig 2010-10-28 13:31:02 +02:00
Fabien Potencier
4cf5b440a9 [OutputEscaper] fixed variable init 2010-10-28 13:00:12 +02:00
Fabien Potencier
7f8c540a20 [Routing] fixed XML loader on Windows (there is no need to urlencode here as schemaValidate() takes a filename, not a URL) 2010-10-28 09:17:11 +02:00
Fabien Potencier
c448429e62 [HttpFoundation] fixed date format for HTTP headers (format must be RFC1123, not RFC2822 -- the difference is that RFC1123 dates always use GMT for the timezone) 2010-10-27 10:56:56 +02:00
Fabien Potencier
e23c3cc702 [OutputEscaper] made getEscaper*() methods more consistent with the way you can change the escaping strategy in __call() 2010-10-26 22:39:01 +02:00
Fabien Potencier
c065be88b5 [OutputEscaper] refactored the component 2010-10-26 22:28:33 +02:00
Fabien Potencier
988722b23b [DependencyInjection] fixed phpdoc 2010-10-26 16:01:39 +02:00
Johannes M. Schmitt
3463f47698 applies base64 encoding directly to the binary data instead of their hexadecimal representation 2010-10-24 10:57:06 +02:00
Dominique Bongiraud
6885f90f17 [HttpKernel\Security]Fixed use statement and updated parameters constructor 2010-10-24 09:55:40 +02:00
Dominique Bongiraud
c0ef9fb0ea [HttpKernel\Security]Fixed markup 2010-10-24 09:55:37 +02:00
Dominique Bongiraud
a85bca395a [Security]Fixed markup 2010-10-24 09:55:32 +02:00
Dominique Bongiraud
66ff8073b9 [Security]Fixed CS 2010-10-24 09:55:31 +02:00
Fabien Potencier
4027f751e3 [Security] added more unit tests 2010-10-22 17:48:58 +02:00
Fabien Potencier
d2b184e058 [Security] removed type hint in AuthenticationException as the extra information can be of different classes 2010-10-22 15:19:13 +02:00
Johannes Schmitt
d077ac4158 [Security] changed encoders to use hash() function whenver possible and replaced sha1 with sha256 as default algorithm 2010-10-22 13:24:29 +02:00
Ryan Weaver
84a60d74d1 Allowing a routes node to be specified without any child import or route nodes.
This is not really a bug or a big issue, but if you need to temporarily empty a routes node, Symfony shouldn't care - it's not an actual validation failure (a routes node still makes sense without an route or import children).
2010-10-22 13:21:55 +02:00
Bernhard Schussek
96a0bff915 [Form] Made InputField instantiable so that simple input fields can be created on the fly 2010-10-22 08:30:14 +02:00
Bernhard Schussek
e9fcacdad7 [HttpFoundation] Fixed: File/UploadedFile did not adjust path when moved 2010-10-22 08:30:14 +02:00
Bernhard Schussek
72dcee594a [Form] Added validiation of hours, minutes and seconds to TimeField 2010-10-22 08:30:14 +02:00
Bernhard Schussek
6c7fab212b [Form] Added validation of years, months and days to DateField 2010-10-22 08:30:13 +02:00
Bernhard Schussek
e4c21708ca [Form] Separated value transformers from normalization transformers.
Fields can now easier support different data types in their underlying object.
These datatypes can be normalized to a single datatype using a normalization
transformer. The normalized value can then be transformed to the user's
representation with the value transformer (better name required?).
2010-10-22 08:30:13 +02:00
Bernhard Schussek
733290c112 [Form] Implemented UrlField 2010-10-22 08:30:13 +02:00
Bernhard Schussek
eaef939141 [Form] Changed value transformers to be responsible for processing empty values to be able to chain them properly. This change fixes the bug that DateField did not return NULL when submitted without values 2010-10-22 08:30:13 +02:00
Ryan Weaver
cc4f2bd955 Adding a type-hint to XmlFileLoader::validate(). 2010-10-22 08:22:08 +02:00
Victor Berchet
4dacdcc4ec [Security] Use a negative length parameter to simplify the code 2010-10-21 18:24:57 +02:00
Fabien Potencier
82f8ab839f [Security] added some unit tests (WIP) 2010-10-21 18:14:32 +02:00
Fabien Potencier
836c512585 fixed interfaces problems 2010-10-21 17:16:31 +02:00
Fabien Potencier
bf3659d5bb added an exception when trying to extend a template with a decorator that uses a different renderer (for instance when a Twig template tries to extend a PHP one) 2010-10-21 08:57:31 +02:00
Artur Kotyrba
2682bc2be5 [Security] Fixed typo 2010-10-21 08:30:46 +02:00
Fabien Potencier
92c56a5066 Revert "[Routing] allowed multiple routing requirement with xml loader, using comma separated values"
This reverts commit e8bcbcba57.
2010-10-21 08:13:10 +02:00
Jordi Boggiano
48155ccc2f [DependencyInjection] Regex optimization 2010-10-21 07:48:12 +02:00
Jordi Boggiano
2186535848 [DependencyInjection] Removed useless code 2010-10-21 07:48:06 +02:00
Fabien Potencier
0749038e73 [Security] changed the way passwords are compared to avoid timing attacks 2010-10-21 07:36:55 +02:00
fivestar
cb0f63f84b [HttpKernel] fixed typo at Security\Firewall\DigestAuthenticationListener 2010-10-20 18:37:35 +02:00
ornicar
e8bcbcba57 [Routing] allowed multiple routing requirement with xml loader, using comma separated values 2010-10-20 14:32:36 +02:00
Justin Hileman
0ccc9805f5 Fix UniversalClassLoader issues with leading slashes.
This fixes a bug in UniversalClassLoader when attempting to autoload class names with leading slashes:

    $namespacedClass = "\\Foo\\Bar";
    $pearlikeClass   = "\\Foo_Bar";

    $namespaced = new $namespacedClass();
    $pearlike   = new $pearlikeClass();

`UniversalClassLoader::loadClass()` was unable to load PEAR-like classes with leading slashes because it found the slash and assumed that the requested class was namespaced. It was unable to load namespaced classes with leading slashes because it would look them up in the autoloader's registered namespaces, and was unable to match '\Foo' to 'Foo'. One (ugly) workaround for the namespaced classes was to register all namespaces twice:

    $loader->registerNamespaces(array(
        'Foo'  => __DIR__ . '/lib',
        '\Foo' => __DIR__ . '/lib',
    ));

But that's not very pretty, nor does it solve the bug with PEAR-like classes. Stripping the leading slash before trying to autoload allows UniversalClassLoader to load both namespaced and PEAR-like classes.
2010-10-20 14:20:12 +02:00
Fabien Potencier
dd4f87b8c2 made form login configurable 2010-10-20 11:42:19 +02:00
Pascal Borreli
437f8c7a86 [Security] Fixed typo 2010-10-20 07:07:54 +02:00
Jeremy Mikola
0aba8ef720 [DependencyInjection] XmlFileLoader should allow "factory-service" attribute without "class" for <service> 2010-10-19 21:10:07 +02:00
Pascal Borreli
d067d5da69 [Security] Fixed coding standard 2010-10-19 17:22:31 +02:00
Pascal Borreli
fde278d7a8 [Security] Fixed typo 2010-10-19 17:21:28 +02:00
Pascal Borreli
8df4567a82 [CssSelector] Fixed typo 2010-10-19 17:20:34 +02:00
Fabien Potencier
f216f313e8 added the Security Component and its integration into the MVC framework
Happy birthday symfony!
2010-10-19 13:33:17 +02:00
Fabien Potencier
0fc6b15c17 [HttpFoundation] added a way to clear the session attributes 2010-10-19 13:13:20 +02:00
Fabien Potencier
94347f73c5 [HttpFoundation] added a way to generate a URI based on the current one and a path 2010-10-19 13:13:14 +02:00
Kris Wallsmith
4a18624927 [Validator] removed ftp and ftps from default url protocols 2010-10-18 16:57:07 +02:00
Kris Wallsmith
f79e23ffb5 Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Kris Wallsmith
0b1f3145ae Removed unnecessary "public" from interface method signatures. 2010-10-18 16:55:09 +02:00
Artur Kotyrba
308e85a5a7 Removed methods which implemented interfaces by throwing \LogicException('You must override...'). 2010-10-17 07:54:18 +02:00
pborreli
80868f1712 [Translation] Fixed phpdoc, thx Koc 2010-10-17 07:52:22 +02:00
pborreli
86cc6a11d9 [Component] Fixed some spelling typos 2010-10-17 07:51:50 +02:00
pborreli
082090d880 [Validator] Fixed coding standard 2010-10-16 10:49:41 +02:00
Kris Wallsmith
5d4c80f27b [Validator] removed DependencyInjection integration 2010-10-16 08:34:36 +02:00
Kris Wallsmith
ef4f61bb9f [DependencyInjection] Added TaggedContainerInterface to signature of generated container classes 2010-10-16 08:32:07 +02:00
Fabien Potencier
7e66933876 fixed inconsistency when calling the Http Kernel instance from an event 2010-10-15 11:02:35 +02:00
Jeremy Mikola
df9ef79953 [Form] readPropertyPath should return null instead of empty array
When reading the last bit of a property path mapped to a missing array index, the method would initialize the value to an empty array.  This makes sense for cases where readPropertyPath would again be called recursively, but not when the value would be immediately returned (null would be preferable in that case).

For example, we have an object with a property called "options" that's an array of arbitrary key/value pairs.  That "options" property (and getOptions()) maps directly to a FieldGroup within the Form for this object.  That FieldGroup contains multiple TextFields for a few expected keys in the array.  As-is, if those keys were not defined, the default data set for those TextFields could end up being "Array" (string representation of an empty array).  If readPropertyPath instead returns null for this case, the default data would be transformed into an empty string.
2010-10-13 08:17:05 +02:00
Fabien Potencier
2b8dfe1ccf [EventDispatcher] fixed possible PHP warning 2010-10-13 07:44:14 +02:00
Benjamin Zikarsky
d376596f7e [EventDispatcher] fixed bug in EventDispatcher::disconnect if the second argument is null or ommitted 2010-10-13 07:41:56 +02:00
Tom Van Looy
44f54c2578 [Console] fixed status code when it is > 255 2010-10-13 07:33:49 +02:00
Ryan Weaver
c39635680f added PHPDoc 2010-10-13 07:29:41 +02:00
Fabien Potencier
2a9ddee162 [HttpFoundation] added Session::invalidate() 2010-10-12 08:58:12 +02:00
Ryan Weaver
7fb3b2ab9d Adding basic PHPDoc to the Routing\DelegatingLoader class. 2010-10-12 06:58:54 +02:00
Ryan Weaver
8c70a2ee24 Adding basic PHPDoc to the Routing\DelegatingLoader class. 2010-10-12 06:58:51 +02:00
Bernhard Schussek
b902cb31d7 [Form] PropertyPath camelizes property names when setting values 2010-10-11 12:52:22 +02:00
Bernhard Schussek
a66d883afd [Form] Removed CSRF setters because they have no effect once CSRF protection is enabled. Re-enable CSRF protection with the desired values instead 2010-10-11 12:52:17 +02:00
Bernhard Schussek
e1be4e9689 [Form] Refactored logic to read and set values from Field to PropertyPath 2010-10-11 12:52:10 +02:00
ornicar
06a6b15e22 [Form] Fix FieldGroup::getHiddenFields, add tests for FieldGroup::getHiddenFields and FieldGroup::getVisibleFields 2010-10-09 14:20:06 +02:00
Fabien Potencier
fafcd02684 [HttpFoundation] changed RequestMatcher pattern syntax 2010-10-07 19:12:53 +02:00
Jordi Boggiano
d8f4cb79c9 [Form] Turned FieldGroup::getFields() into 4 specialized methods for more flexibility
It's better to be able to fetch all the visible and all the hidden fields separately for display purposes (hidden fields in <ul> tags without an <li> do not validate)
2010-10-06 15:34:07 +02:00
Jordi Boggiano
bf1eb56a34 [EventDispatched] Event doesn't need to implement ArrayAccess 2010-10-06 14:33:52 +02:00
Fabien Potencier
1d1a437edc added some missing methods 2010-10-06 14:18:36 +02:00
Benjamin Eberlei
ec3b3f7637 Added and tested EntityToIDTransformer to transform Many-To-One and One-To-One entities into their identifier values 2010-10-06 14:16:55 +02:00
Benjamin Eberlei
0d9d4ac583 Optimize some code in Form/Configurable, Have ChoiceField always pass data to transformers, implemented and fully unit-tested two Doctrine ORM specific transformers that do Collection to String/Choice Transformations 2010-10-06 14:16:51 +02:00
Benjamin Eberlei
f033fc5578 Refactor ValueTransformers to recieve the original value when reverseTransform() is called. This is required for expensive value transformations for example Doctrine Collections or Proxies to allow access to a value that does not trigger expensive operations (such as database calls) anymore. 2010-10-06 14:16:47 +02:00
Fabien Potencier
dbde494424 made locale determination for translation lazy-loaded
This allows to have a stateless-website (without any cookie)
for instance if the locale is part of the domain name
and not attached to the user.
2010-10-06 11:57:38 +02:00
Fabien Potencier
caa9d82746 [HttpFoundation] added support for attributes in RequestMatcher 2010-10-05 20:20:28 +02:00
Fabien Potencier
2525998f6e replaced form field rendering with plain templates
Documentation available here:

http://docs.symfony-reloaded.org/master/guides/form/
2010-10-05 08:34:33 +02:00
Fabien Potencier
0fc8906feb [Validator] forced all validation annotations to be in the validation namespace to avoid collisions, removed the need for the wrapping @Validation annotation
Before:

    /**
     * @Validation({@DateTime()})
     */

After:

    /**
     * @validation:DateTime()
     */

The @validation:Validation() construct is not needed anymore (it is still supported
as this is useful when you have several annotations with the same class).

So, the above is equivalent to:

    /**
     * @validation:Validation({@validation:DateTime()})
     */
2010-10-02 15:07:00 +02:00
Fabien Potencier
3a4d9cb185 [Validation] fixed license 2010-10-02 12:42:35 +02:00
Fabien Potencier
4deb82f842 [Form] fixed license and phpdoc 2010-10-02 12:38:14 +02:00
Fabien Potencier
1a055fc7f0 [Validator] fixed typo 2010-09-30 07:21:54 +02:00
Jordi Boggiano
d28b9ddcda [HttpFoundation] Fix session::remove() not initializing the session 2010-09-30 07:17:44 +02:00
Fabien Potencier
0d7c403769 [Form] fixed camelization problem when looking for a method (getCreated_at -> getCreatedAt) 2010-09-29 08:08:25 +02:00
Fabien Potencier
3b1e83380b [Validator] removed the convention that error parameters are delimited with %% 2010-09-29 07:59:45 +02:00
Fabien Potencier
6aa190b2a6 [OutputEscaper] added SafeDecoratorInterface 2010-09-28 22:19:17 +02:00
Fabien Potencier
4ac65cebcf [Translation] renamed Range to Interval 2010-09-28 07:14:43 +02:00
Fabien Potencier
9e50782b9d fixed request data collector 2010-09-27 21:17:37 +02:00
Fabien Potencier
707205410e added an IdentityTranslator to make it possible to always relies on the translator service, even if none is configured 2010-09-27 16:53:44 +02:00
Sebastian Ionescu
4edd0c269b updated some helper docblocks - fixed usage of helpers 2010-09-27 15:16:23 +02:00
Fabien Potencier
9580c74f0b [Validator] changed the convention for placeholders in messages to be compatible with Twig (from %limit% to {{ limit }}) 2010-09-27 09:46:56 +02:00
Fabien Potencier
a7537906b4 [Translation] added the component 2010-09-27 09:45:29 +02:00
Fabien Potencier
35ee15d131 [DependencyInjection] tweaked an error message to ease debugging 2010-09-26 16:59:40 +02:00
Brandon Turner
b2e4b452a4 [Form] added support for stdClass objects
ReflectionClass doesn't list properties on stdClass objects (or objects cast
from arrays).  This allows these annoymous objects to be used as field data.
2010-09-25 07:57:58 +02:00
Brandon Turner
9e84f450c2 [Form] fixed decimal rounding in IntegerField
Instead of rounding half-up (round to nearest neighbor) act as an integer cast
would and always round down (round towards zero).
2010-09-25 07:57:57 +02:00
Brandon Turner
a305eb063d [Form] added support for rounding-mode option on NumberFields 2010-09-25 07:57:57 +02:00
Brandon Turner
86b6aff5b6 [Form] fixed bug that prevented setLocale from working 2010-09-25 07:57:57 +02:00
Fabien Potencier
866c306dc8 removed the message interpolator system in the Validator component (i18n management should be done globally, not in a specific component) 2010-09-24 16:41:28 +02:00
Jordi Boggiano
82f6a68eb2 [Validator] Allow DateTime objects as valid DateTimes 2010-09-22 09:16:26 +02:00
Thomas
66ddacf2e5 [Process] remove fork references as proc_* functions start a command from an independant process, does not copy the parent memory space like pcntl_* function 2010-09-20 11:05:32 +02:00
Fabien Potencier
e093387179 [Finder] fixed a problem on Windows 2010-09-20 11:01:19 +02:00
Fabien Potencier
ec066a0843 fixed misplaced file 2010-09-20 10:56:35 +02:00
Jordi Boggiano
71cc3a7773 [Form] avoid double-escape and then unescape
htmlspecialchars' fourth parameter allows you to avoid double-escaping in the first place
2010-09-19 08:35:50 +02:00
Fabien Potencier
d657adbfa2 removed Symfony\Framework
Things have been moved to Symfony\Component\HttpKernel
and Symfony\Bundle\FrameworkBundle

The kernel configuration namespace was removed and merged
with the main web configuration namespace (kernel:config => web:config,
kernel:test => web:test, and kernel:session => web:session):

Before:
<kernel:config charset="UTF-8" error_handler="null" />

<web:config csrf-secret="xxxxxxxxxx">
    <web:router resource="%kernel.root_dir%/config/routing.xml" />
    <web:validation enabled="true" annotations="true" />
</web:config>

After:
<web:config csrf-secret="xxxxxxxxxx" charset="UTF-8" error-handler="null">
    <web:router resource="%kernel.root_dir%/config/routing.xml" />
    <web:validation enabled="true" annotations="true" />
</web:config>

Renamed classes:

Symfony\{Framework => Bundle\FrameworkBundle}\Cache\Cache
Symfony\{Framework => Bundle\FrameworkBundle}\Client
Symfony\{Framework => Bundle\FrameworkBundle}\Debug\EventDispatcher
Symfony\{Framework => Bundle\FrameworkBundle}\Debug\EventDispatcherTraceableInterface
Symfony\{Framework => Bundle\FrameworkBundle}\EventDispatcher
Symfony\{Framework => Component\HttpFoundation}\UniversalClassLoader
Symfony\{Framework => Component\HttpKernel}\Bundle\Bundle
Symfony\{Framework => Component\HttpKernel}\Bundle\BundleInterface
Symfony\{Framework => Component\HttpKernel}\ClassCollectionLoader
Symfony\{Framework => Component\HttpKernel}\Debug\ErrorException
Symfony\{Framework => Component\HttpKernel}\Debug\ErrorHandler
Symfony\{Bundle\FrameworkBundle => Component\HttpKernel}\Debug\ExceptionListener
Symfony\{Framework => Component\HttpKernel}\Kernel
2010-09-17 12:58:24 +02:00
Fabien Potencier
1990fc543b [HttpKernel] added Closure support to ControllerResolver 2010-09-16 10:53:59 +02:00
Fabien Potencier
7734f44bc5 [Process] added a Process:isSucessful() method 2010-09-16 08:55:44 +02:00
Fabien Pennequin
56935f85df [Console] Fixed invalid help command shortcut 2010-09-14 09:18:47 +02:00
Jeremy Mikola
a86bac44ce [Validator] Remove leading '@' when validating email domain MX record 2010-09-10 20:42:22 +02:00
Jeremy Mikola
77602239a4 [Form] Add new fields in CollectionField::setData() 2010-09-10 19:31:02 +02:00
Jeremy Mikola
57c0ce0ec1 [Form] Remove support for ArrayObject as ChoiceField's choices option
Internally, ChoiceField expects both choices and preferred_choices to be a simple array, so I replaced incomplete bits of code that attempted to not modify a possible ArrayObject and instead added type checks in the configure() method (with unit tests for expected exceptions).
2010-09-10 19:30:59 +02:00
Fabien Potencier
226277fd0e added a way to activate CSRF protection from the configuration 2010-09-10 14:32:33 +02:00
Fabien Potencier
0de1c08d8d reverted "[Form] fixed default CSRF token generation as a token must be tied to the user somewhat"
This reverts commit d326c398e2.
2010-09-10 14:16:59 +02:00
Fabien Potencier
d326c398e2 [Form] fixed default CSRF token generation as a token must be tied to the user somewhat 2010-09-10 14:13:56 +02:00
Antoine Hérault
4237fdd918 [Form] set file field as multipart 2010-09-10 12:34:32 +02:00
Antoine Hérault
7bd76610ca [HttpFoundation] fixed request files handling 2010-09-10 12:34:28 +02:00
Fabien Potencier
63793dd62e [Form] added missing use statement 2010-09-10 09:21:29 +02:00
Jeremy Mikola
fb24b291c8 [Form] FieldGroup::addError() can now map errors to fields within nested FieldGroups
Property paths such as fields[group].fields[innerGroup].data were not being resolved correctly, since the second iteration of addError() (based on "group") would attempt to call get('fields') instead of get('innerGroup').  Solution is to remember to bump the propertyPath forward if we're at the fields property
2010-09-09 16:29:38 -04:00
Jeremy Mikola
9be7cbb115 [Form] CollectionField::setData() should remove old fields missing from new data 2010-09-09 16:27:18 -04:00
Jeremy Mikola
6fc9b68fa7 [Form] Replace unset() with non-destructive logic in case the "choices" option is an object. 2010-09-09 16:01:34 -04:00
Fabien Potencier
50f039844b [Form] removed obsolete use statements 2010-09-09 18:29:50 +02:00
Fabien Potencier
a141c98917 [HttpFoundation] moved File Component into the HttpFoundation one 2010-09-09 17:01:48 +02:00
Fabien Potencier
fc9325a737 fixed file upload 2010-09-09 16:07:12 +02:00
Fabien Potencier
40c0fe854f [Form] added a FileField 2010-09-09 15:47:44 +02:00
Fabien Potencier
c53ebe7a8e [Form] fixed Form::bind() when no values are submitted 2010-09-09 15:23:28 +02:00
Bulat Shakirzyanov
bb51e7cb26 [Validator] fixed Xliff loader to use forward slashes in file path 2010-09-09 08:01:46 +02:00
Kris Wallsmith
1aefe7a762 [Process] made cwd argument optional 2010-09-09 06:58:28 +02:00
Marc Weistroff
15d840060b Fixed wrong variable name in Esi. 2010-09-07 18:42:54 +02:00
Fabien Potencier
c39534e258 [Routing] removed the autoloading trick, which is not needed anymore 2010-09-07 16:15:13 +02:00
Fabien Potencier
4d669d106e [Validator] changed Xliff loader to get XSD locally 2010-09-07 14:30:50 +02:00
Fabien Potencier
dadfaa271f [Validator] fixed indentation 2010-09-07 14:18:00 +02:00
Fabien Potencier
b753ea45b2 [Routing] added 'defaults' support in Annotation class loader 2010-09-07 13:55:45 +02:00
Fabien Potencier
130494066d [Routing] added an annotation loader 2010-09-07 09:44:08 +02:00
Kris Wallsmith
1443d4a0ba [HttpFoundation] updated getQueryString() to work in more scenarios 2010-09-06 08:48:11 +02:00
Fabien Potencier
7be00aa34e fixed previous commit 2010-09-03 16:18:04 +02:00
Sébastien HOUZE
179fe8e623 Symfony\Component\Routing\Route::setRequirements() _method requirement can be an array, no substr on it 2010-09-03 12:01:57 +02:00
Fabien Potencier
4c17ce8e5e changed calls to has() to use the new proxy method 2010-09-03 11:38:21 +02:00
Bulat Shakirzyanov
2ccaafa561 [DpependencyInjection] added hasParameter() 2010-09-03 11:37:03 +02:00
Fabien Potencier
81b73dc9e6 [Form] fixed problem with PHPUnit mocks (ugly hack but it works for now) 2010-09-03 09:56:52 +02:00
Jordi Boggiano
1719bfb871 [DomCrawler] Fixed URIs being incorrectly generated
When the path is not ending with a slash and the form/link has only ?get=params then the last bit of the path was incorrectly stripped
2010-09-03 09:13:07 +02:00
Jonathan H. Wage
436ca95f65 Fixing coding standards. 2010-09-02 21:38:31 +02:00
Jonathan H. Wage
c1d0262c19 Fixing issue with FieldGroup and its __clone() method not properly setting the parent. 2010-09-02 20:53:40 +02:00
Fabien Potencier
0b378d1b3e added a way to conditionnaly enable the profiler based on the request 2010-09-02 13:54:32 +02:00
Fabien Potencier
4f337615e3 [HttpFoundation] added request matcher 2010-09-02 13:39:49 +02:00
Fabien Potencier
af96c87104 [DependencyInjection] added methods to remove an alias and a definition from a ContainerBuilder instance 2010-09-02 12:20:20 +02:00
Fabien Potencier
7c1b42e81b [DependencyInjection] added a way to inject an anonymous service in an extension configuration
<foo:bar>
        <service class="Foo" />
        <service class="Bar" />
    </foo:bar>

In the foo:bar extension method, you can retrieve the services with:

    // always an array of services
    $config['_services']
2010-09-02 12:17:32 +02:00
Fabien Potencier
7e2f135245 simplified Profiler method names 2010-09-01 16:53:28 +02:00
Fabien Potencier
15cd2643c0 [HttpFoundation] added Request::getClientIp() 2010-09-01 13:56:20 +02:00
Fabien Potencier
3e24cef256 [HttpFoundation] fixed Request::hasSession() 2010-09-01 11:18:07 +02:00
Fabien Potencier
2d04ca3443 [EventDispatcher] added a way to disconnect all listeners for an event name 2010-09-01 11:10:31 +02:00
Fabien Potencier
84c383d729 [HttpKernel] fixed exception constructor signature 2010-09-01 09:48:48 +02:00
Fabien Potencier
48b6057c3a [HttpKernel] fixed Exception classes to implement the full constructor 2010-09-01 08:49:52 +02:00
Fabien Potencier
ab9be87354 [HttpKernel] fixed FlattenException status code 2010-09-01 08:49:19 +02:00
Fabien Potencier
ad835f8a16 [HttpKernel] added purge() in the profiler storage interface 2010-09-01 08:21:38 +02:00
Fabien Potencier
60ea1eef69 added a configuraiton to allow the profiler to be enabled only when an exception occurs 2010-08-31 22:22:31 +02:00
Fabien Potencier
1e1a4113c7 [HttpKernel] fixed missing use statement 2010-08-31 19:21:00 +02:00
Fabien Potencier
d17c2edb49 fixed perms 2010-08-30 20:46:16 +02:00
Noël GUILBERT
d40d1746e0 [ZendBundle] added an option to register zend logger as an error handler 2010-08-30 19:03:12 +02:00
Fabien Potencier
8c6478dab9 [HttpKernel] added import/export to Profiler 2010-08-30 16:04:50 +02:00
ornicar
9588860716 [HttpFoundation] fixed locale accessors in Session class 2010-08-30 07:12:05 +02:00
Fabien Potencier
ed33ce4d5f [HttpFoundation] fixed typo 2010-08-29 20:28:33 +02:00
Fabien Potencier
478fcca88d [Templating] added Engine::exists() 2010-08-29 16:09:02 +02:00
Fabien Potencier
0208800459 refactored exception management (removed the ExceptionManager) 2010-08-29 12:35:48 +02:00
Fabien Potencier
72db4c7342 refactored Profiler and DataCollector classes (the WDT has been removed and will be re-added in the upcoming WebProfilerBundle) 2010-08-29 12:17:06 +02:00
Fabien Potencier
83a64df542 added ContainerAwareInterface 2010-08-28 09:43:10 +02:00
Fabien Potencier
92f4b92cbb [HttpFoundation] fixed Session serialization 2010-08-27 09:07:47 +02:00
Fabien Potencier
82ff79064a added a priority to the event dispatcher listeners 2010-08-26 14:08:42 +02:00
Fabien Potencier
086708003a [HttpFoundation] added a keys() method to *Bag classes 2010-08-26 10:56:46 +02:00
Fabien Potencier
bf67562268 [Templating] fixed PHP renderer when using a template variable named 'template' 2010-08-25 11:30:59 +02:00
Fabien Potencier
a432417ab9 [DependencyInjection] added a way to ignore errors when importing a non-existent file (useful when you want to include an optional service file) 2010-08-24 16:37:41 +02:00
Fabien Potencier
b1e79963b1 [DependencyInjection] moved extension loading in the freezing process (opens more possibilities in the loading order of configs) 2010-08-24 16:25:08 +02:00
Fabien Potencier
ec8500bd64 [FrameworkBundle] added support for previous exceptions in the exception pages 2010-08-24 14:01:57 +02:00
Fabien Potencier
fe78d5f0f0 added a way to disable the profiler 2010-08-22 22:35:44 +02:00
Fabien Potencier
1277568997 [HttpFoundation] fixed Session 2010-08-22 15:31:51 +02:00
Fabien Potencier
2746bcc84c [HttpFoundation] added automatic session start() when changing something in the session, renamed accessor methods, added remove()/has() methods 2010-08-20 23:21:39 +02:00
Fabien Potencier
bf82cf42dd renamed Symfony\Components to Symfony\Component 2010-08-20 23:09:55 +02:00