added cache service definition
[HttpFoundation][Session] change possible replace() & set() for set only()
[HttpFoundation][Session] Assume that memcache(d) instances are already configured
[Session] Pdo Handler cleanup
[Form] Removed index_generation mention from the UPGRADE instructions as the option no longer exists.
Replaced &raquo; by &#187; (for XHTML compatibility)
Replaced &raquo; and &nbsp; for XHTML compatibility
[Session] Fix the PDO handler for mysql concurrent write
[Validator] corrected small docblock typo
Provide a clearer error message when message in trans tag is not a simple text.
merged branch pgodel/patch-1 (PR #4238)

Commits
-------

190024a Provide a clearer error message when message in trans tag is not a simple text.

Discussion
----------

Clearer error message when message in trans tag is not a simple text

Provide a clearer error message when message in trans tag is not a simple text.

---------------------------------------------------------------------------

by travisbot at 2012-05-09T13:34:52Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1285069) (merged 190024ae into e54f4e46).
merged branch shieldo/patch-4 (PR #4234)

Commits
-------

8009675 [Validator] corrected small docblock typo

Discussion
----------

[Validator] corrected small docblock typo

---------------------------------------------------------------------------

by travisbot at 2012-05-09T10:30:15Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1284151) (merged 8009675d into e54f4e46).
merged branch corphi/master (PR #4231)

Commits
-------

be35099 Replaced &raquo; and &nbsp; for XHTML compatibility
0a0e74b Replaced &raquo; by &#187; (for XHTML compatibility)

Discussion
----------

Changes for XHTML compatibility

When using Symfony in XHTML mode, some entities cause YSODs. These changes should prevent that.

---------------------------------------------------------------------------

by travisbot at 2012-05-09T00:24:35Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1281344) (merged be350994 into e54f4e46).

---------------------------------------------------------------------------

by Tobion at 2012-05-09T00:46:19Z

+1
merged branch jakzal/UpgradeFix (PR #4229)

Commits
-------

942cfc7 [Form] Removed index_generation mention from the UPGRADE instructions as the option no longer exists.

Discussion
----------

[Form] Removed index_generation mention from the UPGRADE instructions

The index_generation option no longer exists.

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/jakzal/symfony.png?branch=UpgradeFix)](http://travis-ci.org/jakzal/symfony)
Fixes the following tickets: #4108

---------------------------------------------------------------------------

by travisbot at 2012-05-08T13:05:58Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1275789) (merged 942cfc7a into e54f4e46).
merged branch bamarni/master (PR #4153)

Commits
-------

a2b3d3c added cache service definition

Discussion
----------

[Doctrine Bridge] Added a method to load a cache definition

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

Following this discussion (https://github.com/doctrine/DoctrineBundle/pull/62), this will let DoctrineBundle, MongodbBundle and CouchdbBundle share the same code for cache definitions.

---------------------------------------------------------------------------

by dlsniper at 2012-04-30T06:56:49Z

+1 for this PR.

---------------------------------------------------------------------------

by stof at 2012-04-30T06:57:58Z

:+1:

---------------------------------------------------------------------------

by fabpot at 2012-04-30T15:41:05Z

Can you add a note abou this change in the CHANGELOG?

---------------------------------------------------------------------------

by stof at 2012-04-30T15:46:48Z

does it really need to be in the changelog ? End-users don't know about this at all. The only guys affected by this change are the maintainers of the different Doctrine bundles as they can remove some code now.

---------------------------------------------------------------------------

by fabpot at 2012-04-30T16:41:21Z

@stof: right

@bamarni: Can you squash your commits?

---------------------------------------------------------------------------

by bamarni at 2012-04-30T17:03:38Z

@fabpot : done

---------------------------------------------------------------------------

by dlsniper at 2012-04-30T17:22:07Z

@bamarni can you also do a patch for the docs after this gets merged so that people know about this change and know how to use it?

Thank you!

---------------------------------------------------------------------------

by bamarni at 2012-04-30T17:29:05Z

@dlsniper : no problem ;)

---------------------------------------------------------------------------

by fabpot at 2012-04-30T18:29:03Z

ping @beberlei
[HttpKernel] added more fine-grained information about the version (the constant are named after the PHP ones)
[Session] Memcache/d cleanup, test improvements
merged branch vicb/session_nnhandlers (PR #4227)

Commits
-------

12e22c0 [Session] Memcache/d cleanup, test improvements
788adfb [Session] Pdo Handler cleanup
0216e05 [HttpFoundation][Session] Assume that memcache(d) instances are already configured
72d21c6 [HttpFoundation][Session] change possible replace() & set() for set only()

Discussion
----------

[Session] Non-native Session handlers

A few item to discuss. Needs @drak inputs.

* 72d21c66 is trivial,
* 0216e056 is about memcache(d) handlers
    * I don't think the handlers should configure the memcache(d) instances. Those instances are injected into the storage so they should already be confidured (this will be done in the CacheBundle when available)
    * A SW prefix has been added to the memcached handlers so that the same instance of memcached can be shared - you can still set the `Memcached::OPT_PREFIX_KEY` before injecting the memcached instance.
    * It was not possible to use an expiration > 30days before, see [php.net](http://www.php.net/manual/en/memcached.expiration.php)
* 788adfb6 is trivial (cleanup in the PDO handler)

---------------------------------------------------------------------------

by travisbot at 2012-05-08T09:49:03Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1274808) (merged 788adfb6 into e54f4e46).

---------------------------------------------------------------------------

by drak at 2012-05-09T15:20:38Z

Overall this PR looks good to me. Since Memcache/d objects are passed by DI anyway, there is no need to provide a way to configure the objects here.

However, I am not sure it's consistent to provide internal handling of the prefix/expire if we are saying the objects should be configured and injected - if we hand over all configuration to the injected objects, that's exactly what we should do. In the case of the `Memcache` handler there is no handling for prefix by the Memcache object that is why it's handled internally.

Unless there are some other technical consideration I've missed, I would also not expect the same Memcache/d object to be used in all use cases (e.g. session storage and database caching layer).   I realise we are trying to unify things in one cache component, but I am not entirely convinced session storage would necessarily have to be part of that nor that "one object fits all" is practical or wise.

As far as I am aware, apart from default settings, memcache/memcached instances retain their own settings once configured so it's quite feasible to expect there might be a couple of differently configured instances in a complex system.

In summary, I would remove the `$memcachedOptions` config entirely from the `MemcachedHander` along with the associated prefix and time and let it all be configured by the injected `Memcached` instance.

---------------------------------------------------------------------------

by travisbot at 2012-05-10T07:32:53Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1293064) (merged 12e22c0d into e54f4e46).

---------------------------------------------------------------------------

by vicb at 2012-05-10T07:34:31Z

@drak thanks for your feeback.

About the prefix: it might be necessary to avoid collisions when you re-use the same instance of `memcache/d`. This is why the prefix is handled internally and not by `memcached` (it would be global and not serve the purpose then).

About the ttl:

* `memcache/d` can not handle ttl > 30 days (they would consider the time as an absolute timestamp then) and this is why the PR always convert the ttl to an absolute ts (`time() + $ttl`)
* Moreover I think that the ttl should be initialized by the `Session`: there is no reason why the ttl should be different from the `gc_maxlifetime`. I think this is out of the scope of this PR.

About sharing `memcache/d ` instances: it will be possible but it does not mean that you have to, you still can use different instances if this suit your needs.

The tests have been improved.

If you are ok with the latest changes, this PR should be ready to be merged

---------------------------------------------------------------------------

by drak at 2012-05-10T09:29:18Z

@vicb - I think it's ok to merge now. You are right about the TTL since PHP will pass a maxlifetime not a timestamp, and since memcached varies how it treats $expire, it does need to be normalised in the handler. I'm not necessarily 100% convinced about the prefix, but I don't object.  Nice work.

/cc @fabpot
merged branch vicb/session_pdo_storage (PR #4244)

Commits
-------

b865b09 [Session] Fix the PDO handler for mysql concurrent write

Discussion
----------

[RFC][Session] Make the PDO handler looks less hacky

Related discussion: https://github.com/symfony/symfony/commit/ebc2f01e5b4e567c49ae99cb6bd01b4d07039748#commitcomment-1304221

The current code works but looks hacky (`$dbTimeCol = CASE WHEN $dbTimeCol = :time THEN (VALUES($dbTimeCol) + 1) ELSE VALUES($dbTimeCol) END`).

Todo: wrap the mysql specific code in a `try...catch` if we choose this PR way (to be consistent with all other PDO invocations).

---------------------------------------------------------------------------

by travisbot at 2012-05-10T07:50:39Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1293131) (merged b865b096 into 48099a85).
[Form] fixed wrong class path (closes #4239)