Commit Graph

9780 Commits

Author SHA1 Message Date
Tobias Schultze
9af91a362b add composer to gitignore in 2.0 2012-05-10 16:15:45 +03:00
Ondrej Slinták
f2caf07f83 Fixed minor typo in slovak translation (validator.sk.xliff). 2012-05-10 16:11:03 +03:00
Fabien Potencier
fae4523f3b merged branch vicb/session_pdo_cleanup (PR #4246)
Commits
-------

51b753a [Session] cleanup of the PDO storage

Discussion
----------

[Session] cleanup of the PDO storage

and adding what was missing from #4244

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

by travisbot at 2012-05-10T10:40:33Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1293901) (merged 51b753a6 into 62594291).
2012-05-10 13:54:53 +02:00
Victor Berchet
51b753a6b8 [Session] cleanup of the PDO storage 2012-05-10 12:33:43 +02:00
Fabien Potencier
62594291e4 [Form] fixed wrong class path (closes #4239) 2012-05-10 12:15:10 +02:00
Fabien Potencier
bed0b90bea 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: ebc2f01e5b (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).
2012-05-10 11:48:38 +02:00
Fabien Potencier
28d045ed48 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
2012-05-10 11:47:04 +02:00
Martin Hasoň
077a5949ab Added Czech plural messages 2012-05-10 09:41:12 +02:00
Victor Berchet
12e22c0d1f [Session] Memcache/d cleanup, test improvements 2012-05-10 09:28:59 +02:00
Fabien Potencier
48099a852c [HttpKernel] added more fine-grained information about the version (the constant are named after the PHP ones) 2012-05-10 08:02:55 +02:00
Fabien Potencier
f9aa6f7d1e 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

👍

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

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
2012-05-10 07:18:48 +02:00
Fabien Potencier
82b3cdc0b9 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).
2012-05-10 07:17:24 +02:00
Fabien Potencier
1d2065eff0 merged branch corphi/master (PR #4231)
Commits
-------

be35099 Replaced » and   for XHTML compatibility
0a0e74b Replaced » by » (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
2012-05-10 07:16:44 +02:00
Fabien Potencier
68eca0f9b9 merged branch willdurand/fix-typo (PR #4240)
Commits
-------

6f343b4 [Console] Fixed typo

Discussion
----------

Fix typo

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

by travisbot at 2012-05-09T16:45:36Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1286723) (merged 6f343b43 into 906f6f66).
2012-05-10 07:16:15 +02:00
William DURAND
6f343b4328 [Console] Fixed typo 2012-05-09 18:42:13 +02:00
Fabien Potencier
e66a0bb32a 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).
2012-05-09 16:04:48 +02:00
Fabien Potencier
818005232c 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).
2012-05-09 16:04:01 +02:00
Pablo Godel
190024aeeb Provide a clearer error message when message in trans tag is not a simple text. 2012-05-09 10:13:29 -03:00
Douglas Greenshields
8009675dba [Validator] corrected small docblock typo 2012-05-09 12:25:32 +02:00
Victor Berchet
b865b096b5 [Session] Fix the PDO handler for mysql concurrent write 2012-05-09 10:13:10 +02:00
corphi
be350994cc Replaced » and   for XHTML compatibility 2012-05-09 03:07:25 +03:00
corphi
0a0e74b9af Replaced » by » (for XHTML compatibility) 2012-05-09 03:05:23 +03:00
Jakub Zalas
942cfc7a06 [Form] Removed index_generation mention from the UPGRADE instructions as the option no longer exists. 2012-05-08 13:56:34 +01:00
Victor Berchet
788adfb6c0 [Session] Pdo Handler cleanup 2012-05-08 11:30:40 +02:00
Victor Berchet
0216e05605 [HttpFoundation][Session] Assume that memcache(d) instances are already configured 2012-05-08 11:20:17 +02:00
Victor Berchet
72d21c6614 [HttpFoundation][Session] change possible replace() & set() for set only() 2012-05-08 10:05:47 +02:00
Fabien Potencier
e54f4e46c9 merged branch gajdaw/2_1_component_yaml_fix_4022 (PR #4126)
Commits
-------

80a2a92 [2.1][Component][Yaml] fix 4022

Discussion
----------

[2.1][Component][Yaml] fix 4022

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/gajdaw/symfony.png?branch=2_1_component_yaml_fix_4022)](http://travis-ci.org/gajdaw/symfony)
Fixes the following tickets: #4121, #4022, #4135
Todo:

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

by stof at 2012-04-27T13:03:15Z

Why is it marked as ``[2.2]`` if it is a bugfix ?

@fabpot ping

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

by gajdaw at 2012-04-27T14:42:21Z

The title should be [2.1] - now it is correct.

I marked it 2.0 and PR was for 2.0 originally.

Fabien suggested that it should go to master branch: https://github.com/symfony/symfony/pull/4121#issuecomment-5362990

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

by fabpot at 2012-05-07T09:17:31Z

That does not work when you have something after the unindented collection:

    collection:
        key:
        - a
        - b
        - c
    foo: bar

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

by gajdaw at 2012-05-07T11:11:30Z

@fabpot Last commit contains test with your yaml:

    collection:
        key:
        - a
        - b
        - c
    foo: bar

Everything seems fine. Can you give me a hint: what do you mean, when you say "That does not work"?

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

by fabpot at 2012-05-07T12:36:19Z

Sorry, the failing test is the following:

    test: Key/value after unindented collection
    brief: >
        Key/value after unindented collection
    yaml: |
        collection:
            key:
            - a
            - b
            - c
            foo: bar
    php: |
        array('collection' => array('key' => array('a', 'b', 'c'), 'foo' => 'bar'))

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

by gajdaw at 2012-05-07T15:48:26Z

@fabpot Last commit passed your test.

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

by fabpot at 2012-05-07T17:28:21Z

Can you squash your commits? Thanks.

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

by travisbot at 2012-05-08T05:32:58Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1273487) (merged 20891c58 into 919604ab).

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

by gajdaw at 2012-05-08T05:36:51Z

Done.

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

by travisbot at 2012-05-08T07:23:47Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1274162) (merged 80a2a92e into 898ff4e0).
2012-05-08 09:27:29 +02:00
Włodzimierz Gajda
80a2a92edb [2.1][Component][Yaml] fix 4022 2012-05-08 09:18:55 +02:00
Fabien Potencier
898ff4e0eb removed 5.3.3 from Travis as it is not (yet) available 2012-05-08 08:42:40 +02:00
Fabien Potencier
044dee206e raised the minimum version of Twig to 1.7 2012-05-08 08:17:19 +02:00
Fabien Potencier
919604ab71 merged branch symfony/domcrawler-encoding (PR #4214)
Commits
-------

c9ebe67 [DomCrawler] fixed encoding when using addHtmlContent() (fixes #3881)

Discussion
----------

[DomCrawler] fixed encoding when using addHtmlContent() (fixes #3881)

After looking around, this is clear that loadHtml() resets the encoding set on the DomDocument instance. So, the only workaround that actually works (and which is not an ugly hack) is to use `mb_convert_encoding` when it exists.

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

by Seldaek at 2012-05-07T12:38:43Z

+1 (Side note: Using your fork of symfony for PRs would be good I think, otherwise it creates noisy versions on packagist.)
2012-05-07 19:19:26 +02:00
Fabien Potencier
1dd92b6221 merged branch Seldaek/parambag (PR #4220)
Commits
-------

3d9990a [DependencyInjection] Add ParameterBag::remove

Discussion
----------

[DependencyInjection] Add ParameterBag::remove
2012-05-07 19:19:05 +02:00
Fabien Potencier
761579df7c merged branch shieldo/session_docblock_typos (PR #4216)
Commits
-------

8ff11c1 [HttpFoundation] fixed docblock typos in session class

Discussion
----------

[HttpFoundation] fixed docblock typos in session class
2012-05-07 19:18:56 +02:00
Fabien Potencier
f4fecdfb62 merged branch vicb/route_compiler (PR #4219)
Commits
-------

9907df2 [Routing] Fix a regression introduced by #4170

Discussion
----------

[Routing] Fix a regression introduced by #4170

See 8232aa150b (commitcomment-1300310)

Let's wait to confirm the fix is ok before merging

@stephpy, @mvrhov ?

(Travis is not ok since 5.3.3 is not supported).

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

by stephpy at 2012-05-07T16:17:44Z

Yes it's OK !

Thanks :)

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

by Tobion at 2012-05-07T16:20:38Z

So your originally proposed spec is not the same anymore.

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

by vicb at 2012-05-07T16:22:38Z

@Tobion

* fixed.
* no it is not as it couldn't work in this case.
2012-05-07 19:18:52 +02:00
Victor Berchet
9907df2569 [Routing] Fix a regression introduced by #4170 2012-05-07 18:20:56 +02:00
Jordi Boggiano
3d9990a0ec [DependencyInjection] Add ParameterBag::remove 2012-05-07 18:13:02 +02:00
Douglas Greenshields
8ff11c1ad3 [HttpFoundation] fixed docblock typos in session class 2012-05-07 15:20:20 +01:00
Fabien Potencier
c9ebe67d65 [DomCrawler] fixed encoding when using addHtmlContent() (fixes #3881) 2012-05-07 14:20:03 +02:00
Fabien Potencier
f14961b747 [DomCrawler] converted all usage of filter() to filterXPath() in unit tests to be less dependent on CssSelector 2012-05-07 14:03:55 +02:00
Fabien Potencier
906f6f662c [DependencyInjection] fixed private services removal when used as configurators (closes #3758) 2012-05-07 12:47:50 +02:00
Fabien Potencier
43249dea5f [DependencyInjection] added support for anonymous services as properties (closes #2964) 2012-05-07 12:30:49 +02:00
Fabien Potencier
23b5e60436 [DependencyInjection] fixed anonymous services handling in XmlFileLoader
Previous to this commit, it was not possible to have anonymous services
as arguments AND anonymous services in custom configs
2012-05-07 12:23:11 +02:00
Fabien Potencier
1244158ceb [DependencyInjection] made a small cleanup 2012-05-07 12:17:20 +02:00
Fabien Potencier
fe6b26c5d0 [TwigBundle] updated CHANGELOG 2012-05-07 10:53:05 +02:00
Fabien Potencier
6e6eb6c462 merged branch symfony/escaping-839 (PR #4105)
Commits
-------

1e84f1e [TwigBundle] implemented context auto-escaping in Twig templates based on the template extension

Discussion
----------

[2.2] Implements context escaping for Twig (fixes #839)
2012-05-07 10:51:11 +02:00
Fabien Potencier
a3ee885d08 merged branch vicb/validator/fix (PR #4200)
Commits
-------

bdc21b4 [Validator] Add a base AbstractLoader
ead4908 [Validator] Some cleanup of the GraphWalker
23e15bb [Validator] Fix a bug in the ExecutionContext

Discussion
----------

[Validator] Fix/cleanup

Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/vicb/symfony.png?branch=validator/fix)](http://travis-ci.org/vicb/symfony)

* d2100a27 has some fixes for the EC,
* 51769e03 has some cleanup in the graph walker,
* f9b3591c add an AbstractLoader (namespace aliases does not belong to FileLoaders).

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

by vicb at 2012-05-07T08:32:40Z

@fabpot PR ready
2012-05-07 10:44:17 +02:00
Fabien Potencier
b5ef264c07 fixed Travis configuration 2012-05-07 10:40:27 +02:00
Fabien Potencier
3719c70870 updated minimum PHP version to 5.3.3
5.3.3 has some interesting fixes and this is the version used by
Redhat 6 and Debian 6
2012-05-07 10:29:11 +02:00
Victor Berchet
bdc21b4dc4 [Validator] Add a base AbstractLoader 2012-05-07 10:27:33 +02:00
Victor Berchet
ead4908eff [Validator] Some cleanup of the GraphWalker 2012-05-07 10:27:10 +02:00