Commit Graph

2187 Commits

Author SHA1 Message Date
Jordi Boggiano e67f8d4a82 Properly skip memcached tests when no memcached server is present 2012-02-23 20:37:26 +01:00
Jordi Boggiano 005d86f4db Broaden timer tests limits 2012-02-23 20:36:56 +01:00
Jordi Boggiano 001c4fd064 Fix windows fs tests 2012-02-23 20:36:22 +01:00
Fabien Potencier be92973512 merged branch arnaud-lb/apache-matcher-fixes (PR #3406)
Commits
-------

e6e9b5a [Routing] Return the _route parameter from ApacheUrlMatcher

Discussion
----------

[Routing] Return the _route parameter from ApacheUrlMatcher

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

by fabpot at 2012-02-22T23:13:49Z

Can you squash  your commits before I merge? Thanks.

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

by arnaud-lb at 2012-02-23T09:12:45Z

sure, done
2012-02-23 19:06:54 +01:00
Arnaud Le Blanc e6e9b5adbe [Routing] Return the _route parameter from ApacheUrlMatcher 2012-02-23 10:11:35 +01:00
Fabien Potencier 611b241f56 fixed CS 2012-02-22 19:03:34 +01:00
Fabien Potencier f373085928 merged 2.0 2012-02-22 18:59:56 +01:00
Fabien Potencier 333b4f72fc merged branch stealth35/trans_res_dump (PR #3412)
Commits
-------

bffbb5e typo
b82862a [Translation] Add IcuResFileDumper
8e569dd [Translation] ResourceBundleLoader to IcuRes/DatFileLoader

Discussion
----------

[Translation] Refactor ResourceBundle Translation

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

 - Rename `ResourceBundleLoader` to `IcuResFileLoader` and `IcuDatFileLoader`
 - Proud to announce the `IcuResFileDumper`
2012-02-22 16:48:57 +01:00
Fabien Potencier 7ef09ab28d merged branch vicb/config/proto/default (PR #3403)
Commits
-------

b269e27 [Config] Improve handling of PrototypedArrayNode defaults
4feba09 [Config] implements feedback
bc122bd [Config] Fix nested prototyped array nodes
675e5eb [Config] Take advantage of the new PrototypedArrayNode API in the core bundles
cba2c33 [Config] Improve error messages & extensibility
bca2b0e [Config] Improve PrototypedArrayNode default value management

Discussion
----------

[Config] Improve prototype nodes usability, error messages, extensibility

### First commit

*Before* (you should set multiple defalutValues)

```php
<?php
$root
    ->arrayNode('node')
    ->prototype('array')
        // when the node is not set
        ->defaultValue(array('foo' => 'bar')
        ->children()
            // when the key is not set
            ->scalarNode('foo')->defaultValue('bar')->end()

$root
    ->arrayNode('node')
    ->prototype('array')
        // when the node is not set
        ->defaultValue(array('defaults' => array('foo1' => 'bar1', 'foo2' => 'bar2')
        ->children()
            ->arrayNode('bar')
                // when the node is not set
                ->addDefautsIfNotSet()
                // when some values are not set (node being set)
                ->scalarNode('foo1')->defaultValue('bar1')->end()
                ->scalarNode('foo2')->defaultValue('bar2')->end()
```

*after*

```php
<?php
$root
    ->arrayNode('node')
    ->addDefaultChildrenWhenNoneSet()
    ->prototype('array')
        ->children()
            ->scalarNode('foo')->defaultValue('bar')->end()

$root
    ->arrayNode('node')
    ->addDefaultChildrenWhenNoneSet()
    ->prototype('array')
        ->children()
            ->arrayNode('bar')
                ->scalarNode('foo1')->defaultValue('bar1')->end()
                ->scalarNode('foo2')->defaultValue('bar2')->end()
```

*more* (exclusive configs)

```php
<?php
$root
    ->arrayNode('node')
    // Add a default node named 'defaults'
    ->addDefaultChildrenWhenNoneSet()
    // Add a default node named 'foo'
    ->addDefaultChildrenWhenNoneSet('foo')
    // Add two default nodes named 'foo', 'bar'
    ->addDefaultChildrenWhenNoneSet(array('foo', 'bar'))
    // Add two default nodes
    ->addDefaultChildrenWhenNoneSet(2)
```

### Second commit

Improves error messages (print the path to the error) & extensibility.

@schmittjoh I would appreciate you feedback on both the commits. Do you think a boolean $throw switch on `getNode` would make sense (i.e. to prevent throwing excs in prod ?).

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

by schmittjoh at 2012-02-20T15:43:18Z

The error improvements seem uncontroversial.

I'm not so convinced by the other changes though. What if the prototype is a map and not a simple list?

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

by vicb at 2012-02-20T16:07:51Z

I think there's one caveat left in the code as it is now that I will fix (nested prototypes).

Could you please give me more details on the use case you are referring to ?

You do not have to use the new feature but It can be really helpful [here](https://github.com/symfony/symfony/pull/3225/files#L4R38) for example.

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

by schmittjoh at 2012-02-20T17:20:02Z

What I mean is something like this:

```php
->arrayNode("foo")
    ->useAttributeAsKey("name")
    ->prototype(/* ...
```

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

by vicb at 2012-02-20T17:28:01Z

What would be wrong then ? (that's the use case I link in my previous msg)

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

by schmittjoh at 2012-02-20T17:28:55Z

How would adding defaults look like?

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

by vicb at 2012-02-20T17:36:35Z

Check the "more" part of the PR message.

In the linked use case, it would add a "defaults" server using the default host / port / weight. In this case I do not care about the name but the values are important to help alias the equivalent configs. You can override the "defaults" name by using a parameter.

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

by vicb at 2012-02-20T17:47:27Z

```php
<?php
// [...]
    ->arrayNode('servers')
        ->addDefaultChildrenWhenNodeSet()
        ->useAttributeAsKey('name')
        ->prototype('array')
            ->children()
```

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

by schmittjoh at 2012-02-20T17:47:54Z

What I was thinking about is having two nodes with different default values. Right now, both nodes while having different keys would still have the same default values which does not make much sense to me. However, we can address this in another PR.

One thing that we should fix though is that we should require keys in case of a map, and forbid them in case of a list. It might make sense to split it into different methods. Like the following examples make no sense (but are possible atm):

```php
->arrayNode("foo")
    ->useAttributeAsKey("name")
    ->addDefaultChildrenIfNotSet(5)

->arrayNode("foo")
    ->addDefaultChildrenIfNotSet("foo")
    ->prototype("scalar")->end()
```

Another minor nitpick, please rename "when" to "if".

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

by vicb at 2012-02-20T18:03:19Z

@schmittjoh thank you for your feedback.

message-2:

* I think the first case is fine (children "1" to "5"). Sometimes you just don't care about the names so it should not be forbidden.
* I also think the second case is fine as you would write `foo: value` in your config file anyway.

Let me know your thoughts about the previous statements.

Agree to change when to if.

message-1:

Will change

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

by vicb at 2012-02-20T18:06:33Z

I think "IfNoneSet" is more accurate than "IfNotSet" ?

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

by schmittjoh at 2012-02-20T18:09:59Z

If you call "useAttributeAsKey" it automatically means that the keys are meaningful to you (otherwise there is no point in calling it). In such a case, keys should be explicitly given.

On the other hand, if you do not call it, then the keys are ignored/dropped by the Config component. So if you give a key, it is an obvious error that we should catch. The second case I linked would look like ``foo: [value]`` in contrast to ``foo: { foo: value }``.

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

by schmittjoh at 2012-02-20T18:14:44Z

I'm not feeling strongly about this, but "IfNotSet" is more consistent with
"addDefaultsIfNotSet" and basically reads as "if array node is not set, do
...". Your example would refer to the children and read as "if none
(children) have been defined, do ...".

On Mon, Feb 20, 2012 at 12:06 PM, Victor Berchet <
reply@reply.github.com
> wrote:

> I think "IfNoneSet" is more accurate than "IfNotSet" ?
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/symfony/symfony/pull/3403#issuecomment-4058579
>

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

by vicb at 2012-02-20T18:30:21Z

message-2:

* Agree on first point, will change
* You could specify the keys in your config file if the prototype is an array (you used a scalar). Should we implement a switch in the validation (i.e. array / not array) or just go with numeric / null arg  as you suggest ?

message-1:

> Your example would refer to the children and read as "if none (children) have been defined, do ..."

QED

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

by vicb at 2012-02-20T22:11:05Z

@schmittjoh I have implemented your suggestions (other than the "NoneSet"). Let me know if you think this is ok. Thanks.

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

by schmittjoh at 2012-02-21T03:24:19Z

Looks good to me.

As an additional improvement we might consider to allow to prepopulate an prototyped with values. For example, in the FOSRestBundle there is a case where this could be used.

```php
->arrayNode('formats')
    ->prepopulateValues(array('application/json' => 'json', 'application/xhtml+xml' => 'xml'))
    ->useAttributeAsKey('name')
    ->prototype('scalar')->canBeUnset()->end()
```

This could be done in a separate PR however and is not strictly related to these improvements.

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

by vicb at 2012-02-21T07:51:59Z

@schmittjoh that would be a great addition but I think need some thinking (i.e. the name, `initialValues` ?, should we handle duplicates, how - in case we are not using attribue as key, ...) so let's make an other PR, I'd like this one to be merged asap as I need this for the Cache Bundle.

@fabpot ready
2012-02-22 16:32:31 +01:00
stealth35 b82862aef5 [Translation] Add IcuResFileDumper 2012-02-22 16:15:11 +01:00
stealth35 8e569dd976 [Translation] ResourceBundleLoader to IcuRes/DatFileLoader 2012-02-22 16:14:47 +01:00
Drak e585ca783d [HttpFoundation] Added forward compatibility for \SessionHandlerInterface 2012-02-22 07:07:07 +05:45
Drak d339e74bc5 [ClassLoader] Add ability to incrementally register fallbacks.
This is useful in the cases where you might be adding forward compat
classes to several components.
2012-02-22 07:07:03 +05:45
Fabien Potencier 74ebd057a1 merged branch tna/session-cache-limiter (PR #3400)
Commits
-------

fb2bb65 [HttpFoundation] Fix session.cache_limiter is not set correctly

Discussion
----------

[HttpFoundation] Fix session.cache_limiter is not set correctly

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

Fixes a regression after the session refactoring where extra cache control http headers are sent.

This was previously handled by [calling session_cache_limiter(false) in NativeSessionStorage](https://github.com/symfony/symfony/blob/2.0/src/Symfony/Component/HttpFoundation/SessionStorage/NativeSessionStorage.php#L81)

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

by drak at 2012-02-21T12:23:48Z

@fabpot - this code can be merged imo.
2012-02-21 14:47:46 +01:00
Fabien Potencier dc1ff89a94 merged branch mazen/fix-memcached-sessions (PR #3399)
Commits
-------

6fbd290 Improved unit tests for MemcacheSessionStorage
b4c5323 Added comma to array initializer, reverted permissions back to 644
3dd851a Use correct parameters
0e01418 Fix default if no serverpool is provided
2a65121 Fix several issues in MemccheSessionStorage which prevented it from being used correctly

Discussion
----------

Fix several issues in MemcacheSessionStorage

Apperently this could never have worked unless someone passed wrong arguments to the options.

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

by mazen at 2012-02-19T07:58:52Z

```
[marcel@development symfony]$ phpunit tests/Symfony/Tests/Component/HttpFoundation/Session/Storage/MemcacheSessionStorageTest.php
PHPUnit 3.6.10 by Sebastian Bergmann.

Configuration read from /www/includes/vendor/symfony/phpunit.xml.dist

......

Time: 0 seconds, Memory: 3.75Mb

OK (6 tests, 11 assertions)
```

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

by lsmith77 at 2012-02-19T16:10:13Z

cc @drak

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

by drak at 2012-02-19T17:44:00Z

Looks like we could do with some tests for the constructor that also test the defaults and the internal properties.  And also more extensively tests the mock to test the addServer behaviour.

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

by helmer at 2012-02-19T18:02:03Z

@mazen You've changed file permissions from 644->755 ..

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

by drak at 2012-02-21T12:25:11Z

@fabpot - with the extra tests added in 6fbd290 I believe this code is ready for merge.
2012-02-21 14:47:18 +01:00
Victor Berchet b269e27191 [Config] Improve handling of PrototypedArrayNode defaults 2012-02-20 23:07:03 +01:00
Victor Berchet 4feba09aa9 [Config] implements feedback 2012-02-20 19:15:01 +01:00
Victor Berchet bc122bdb2d [Config] Fix nested prototyped array nodes 2012-02-20 18:01:14 +01:00
Fabien Potencier 9356be3a1b Revert "fixed tests for the latest Twig"
This reverts commit 3236fc5af3.
2012-02-20 13:28:51 +01:00
Victor Berchet bca2b0edf3 [Config] Improve PrototypedArrayNode default value management 2012-02-20 10:45:21 +01:00
Tobias Naumann fb2bb65b1e [HttpFoundation] Fix session.cache_limiter is not set correctly 2012-02-19 21:07:38 +01:00
Marcel Beerta 6fbd2902be Improved unit tests for MemcacheSessionStorage 2012-02-19 19:54:54 +01:00
Fabien Potencier 3236fc5af3 fixed tests for the latest Twig 2012-02-18 10:54:20 +01:00
Fabien Potencier 7b8acbccf4 removed usage of a deprecated function in previous merge 2012-02-16 07:27:52 +01:00
Fabien Potencier 883637d43d merged branch vicb/config/master/fix (PR #3365)
Commits
-------

0a176eb [FrameworkBundle] Fix configuration errors
6745b28 [Config] Throw exceptions on invalid definition
fb27de0 [Config] cleanup

Discussion
----------

[Config] Cleanup, error detection, fixes

see #3357

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

by stloyd at 2012-02-15T10:56:00Z

@vicb As you added new exceptions, IMO you should add some tests to cover it.

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

by vicb at 2012-02-15T10:56:50Z

good point, I'll do.

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

by vicb at 2012-02-15T13:49:44Z

@stloyd that was a great idea, I realized I had miss a case. It has been added and should be covered by UT + fixes made.

I am done with the fixes, should be ready to merge.

And time to give the `PrototypedArrayNode` some more usability now.
2012-02-16 07:24:06 +01:00
Kris Wallsmith 1e8236cfb3 [Security] added AccessMapInterface 2012-02-15 14:14:40 -08:00
Victor Berchet 6745b28b3d [Config] Throw exceptions on invalid definition 2012-02-15 14:38:31 +01:00
Fabien Potencier 60846105c3 merged branch drak/session_tests (PR #3360)
Commits
-------

d077ede [HttpFoundation] Increase test coverage.
cbb3e69 [HttpFoundation] Increase test coverage.

Discussion
----------

[HttpFoundation] Increase session test coverage.

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
2012-02-15 11:02:16 +01:00
Fabien Potencier 803fba887a merged branch vicb/routing-ok (PR #3313)
Commits
-------

9d6eb82 [Routing] Fix a bug in the TraceableUrlMatcher
9fc8d28 [FrameworkBundle] Fix a bug in the RedirectableUrlMatcher
4fcf9ef [Routing] Small optimization in the UrlMatcher
abc2141 [Routing] Added a missing property declaration
d86e1eb [Routing] Remove a weird dependency

Discussion
----------

[Routing] Remove a dependency on a derived class, fixes, optim

Subset of #3296 which should be acceptable.

Travis is happy.

The side effect of removing the dependency is that the `UrlMatcher` does not throw an exception any more when the scheme does not match the required scheme. I think it is better because:

* it removes a dependency on a derived class,
* it was an undocumented "feature",
* other thrown excs are component specific while this one was raw SPL.

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

by vicb at 2012-02-09T14:43:02Z

let me know what should go in 2.0 as well.
2012-02-15 00:01:15 +01:00
Fabien Potencier 9f05d4a103 merged branch lyrixx/feat-auto-suggest (PR #3325)
Commits
-------

e5edf5a [Console] Fixed CS
8abf506 [Console] Added abbreviation into search for bad command / namespace
c6203bc [Console] Added namespace suggest on bad namespace name
117359a [Console] fixed CS according to PR comment
dd0d97e [Console] Added suggest on bad command name

Discussion
----------

[Console] Added suggest on bad command name

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

Added something like in `git` :  if user type a wrong command and if a close alternative exists, Command compenent will display a list of similar command(s).

Note : It does not work with namespace. If this PR will be merged, I could work on namespace.

see : https://github.com/fabpot/Twig/blob/master/lib/Twig/Environment.php#L1003

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

by fabpot at 2012-02-11T18:54:49Z

I think we need it to also work on namespace before merging. Is it possible?

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

by henrikbjorn at 2012-02-11T19:01:06Z

could maybe use similar_text ?

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

by lyrixx at 2012-02-11T19:01:55Z

Yes.
I will work on it asap

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

by lyrixx at 2012-02-11T20:06:43Z

I added code for namespace

@henrikbjorn I did the same logic as in twig.

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

by lyrixx at 2012-02-11T20:27:48Z

Note : Travis tests failed : http://travis-ci.org/#!/lyrixx/symfony/builds/663216
```before_script: Execution of 'php vendors.php' took longer than 600 seconds and was terminated.
Consider rewriting your stuff in AssemblyScript, we've heard it handles Web Scale™```

But tests are OK on my laptop

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

by stof at 2012-02-11T20:41:15Z

Well, it may be due to github issues during the setup of the vendors. There is some issues regularly because of the DDoS attack.

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

by lyrixx at 2012-02-11T20:58:07Z

Yes, i guessed it :-) that's why i notice it work on my laptop

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

by fabpot at 2012-02-11T23:11:08Z

This code won't work if you use abbreviations instead of the full namespace or command name.

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

by lyrixx at 2012-02-12T23:30:04Z

I added code to manage abbreviations. But I'm not sure what you are expecting. Can you try it and give me some feedback ?

P.S. : Travis failed again, but tests pass on my laptop.
2012-02-14 23:47:26 +01:00
Fabien Potencier 4b9535c26f [Propel1] fixed unit tests when Propel is not available 2012-02-14 23:36:40 +01:00
Fabien Potencier b86e6db035 merged branch eriksencosta/ticket_2781 (PR #3350)
Commits
-------

beb4fc0 [WIP][Locale] StubIntlDateFormatter::parse was throwing exception instead of returning Boolean false like intl implementation
b61dff7 fixed CS

Discussion
----------

[WIP][Locale] StubIntlDateFormatter::parse was throwing exception instead of returning Boolean false like intl implementation

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: ![travis.ci](https://secure.travis-ci.org/eriksencosta/symfony.png?branch=ticket_2781)
Fixes the following tickets: #2781
Todo: A test fail in 32 bit environment, executed tests only with PHP 5.3.2 and ext-intl ICU 4.2 based

Failed test:

    1) Symfony\Tests\Component\Locale\Stub\StubIntlDateFormatterTest::testFormatWithDefaultTimezoneIntl
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'1969-12-31 21:00:00'
    +'1969-12-31 16:00:00'
2012-02-14 23:34:14 +01:00
Drak d077edebb4 [HttpFoundation] Increase test coverage. 2012-02-14 21:41:27 +05:45
Drak cbb3e69b36 [HttpFoundation] Increase test coverage. 2012-02-14 21:10:15 +05:45
Fabien Potencier ec7fb0bdd6 [Routing] added a proper exception when a route pattern references the same variable more than once (closes #3344) 2012-02-14 11:41:45 +01:00
Eriksen Costa beb4fc0899 [WIP][Locale] StubIntlDateFormatter::parse was throwing exception instead of returning Boolean false like intl implementation 2012-02-14 01:35:14 -02:00
William DURAND 97cbf900cc [Propel] Added tests for the PropelDataCollector 2012-02-14 00:59:48 +01:00
William DURAND d9ce9825b6 [Propel] Added tests for CollectionToArrayTransformer 2012-02-14 00:40:32 +01:00
William DURAND 4878af44cc [Propel] Fixed CS 2012-02-14 00:29:43 +01:00
Fabien Potencier b80951c21c [Process] added Process::getExitCodeText() (closes #2818) 2012-02-13 07:32:01 +01:00
Drak 388a9c2861 [HttpFoundation] Make SessionHandlerInterface compatible with PHP 5.4's SessionHandlerInterface 2012-02-13 11:35:29 +05:45
Drak cab1060a76 [HttpFoundation] Add tests for session memcache/d storage drivers. 2012-02-12 20:08:50 +05:45
Fabien Potencier fc7d0110f7 [HttpFoundation] removed Serializable from SessionInterface
If you need to serialize the session, you need to get the bags and
serialize them instead.
2012-02-12 14:51:23 +01:00
Fabien Potencier e986b9b7e5 merged branch pulzarraider/memcache_profiler_storage (PR #2766)
Commits
-------

7474293 memcache profiler storage support added

Discussion
----------

[HttpKernel] [FrameworkBundle] Memcache(d) Profiler Storage added

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

There are 2 memcache PHP extensions: Memcache and MemcacheD (with "D" at the end) - both are supported.

How to use Memcache Profiler Storage (Memcache php extension is used):
change (or add if there isn't) "dsn" in framework/profiler section in config_dev.yml

```
...
framework:
    ...
    profiler:
        ...
        dsn: memcache://127.0.0.1/11211
...
```

How to use Memcached Profiler Storage (MemcacheD php extension is used):
change "dsn" in framework/profiler section in config_dev.yml

```
...
framework:
    ...
    profiler:
        ...
        dsn: memcached://127.0.0.1/11211
...
```

Last changes:
- memcached support addedd
- optimized performance (serialization done in extension, index is created with ```append``` function)
- updated to last version of Profiler (find by method, avoid duplications)
- done squash on commits

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

by stloyd at 2011-12-01T23:36:02Z

You need to add check for index name size, AFAIK memcache will fail if key is longer than 250 characters.

Also please do an `squash` for all those commits.

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

by pulzarraider at 2011-12-02T00:15:28Z

@stloyd Thanks. I will add the check for key length.

I am just starting with git. Could you please add some tutorial about squash to a documentation page: http://symfony.com/doc/2.0/contributing/code/patches.html ? It will help me (and maybe some others) to do it correct way.

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

by stof at 2011-12-02T00:19:01Z

http://help.github.com/rebase/

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

by pulzarraider at 2011-12-03T18:56:11Z

Thanks @stof, rebase done.

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

by dlsniper at 2011-12-11T14:00:17Z

Hi,

Would it be possible to either use Memcached instead of Memcache or make it configurable to use either Memcache or Memcached?
I've did a little digging on the benefits of using Memcached over Memcache (like for example: http://stackoverflow.com/questions/1442411/using-memcache-vs-memcached-with-php http://devzone.zend.com/1869/zendcon-sessions-episode-040-memcached-the-better-memcache-interface/ ) and maybe this will also help in not having two extensions installed for people who are using Memcached already.

Regards.

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

by pulzarraider at 2011-12-11T16:15:58Z

@dlsniper  thanks for great comment. I will add memcached support.

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

by stof at 2011-12-12T20:49:00Z

@pulzarraider what is the status of this PR ? Is it still a WIP ?

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

by pulzarraider at 2011-12-12T22:58:48Z

@stof Yes, it's still WIP. I'm working on a memcached (with D at the end) support. It will be finished in the next few days.

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

by dlsniper at 2011-12-15T12:51:52Z

@pulzarraider if I can help you with the PR let me know.

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

by pulzarraider at 2012-01-08T20:22:24Z

@dlsniper @stof I've finally added memcached support and done some optimizations. Memcache(d) profiler storage is now ready.

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

by dlsniper at 2012-01-08T22:12:29Z

I'm glad you finished this @pulzarraider
Thanks! for your hard work!

+1 for this PR

@stof, @fabpot is it good to go on master?

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

by pulzarraider at 2012-01-28T19:45:56Z

@stof, @fabpot ping
2012-02-12 13:26:06 +01:00
Fabien Potencier 7995b80bad merged branch vicb/profiler.terminate (PR #3223)
Commits
-------

3dd3d58 [EventListener] Fix an issue with sub-requests
71bf279 cleanup
acdb325 [StopWatch] Provide a cleaner API
acd1287 [Stopwatch] rename the section event to avoid collisions
eb540be [Profiler] Allow profiling the terminate event
4ccdc53 [HttpKernel] Cleanup of PdoProfilerStorage
814876f [HttpKernel] Tweak the code of the ProfilerListener

Discussion
----------

[Profiler] Allow profiling the terminate event

![Travis](https://secure.travis-ci.org/vicb/symfony.png?branch=profiler.terminate)

This PR is mainly about allowing to profile the terminate event (i.e. see it in the timeline panel)

There are some other tweaks.

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

by vicb at 2012-02-02T14:43:20Z

please don't merge for now. good question. bad answer.

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

by vicb at 2012-02-06T15:05:46Z

While first commits were focused on problem solving, the last brings a clean API with the ability to re-open an existing section in order to add events (re-setting event origins and merging them were just hacks).

Should be ready to be merged.

_Edit: Sorry, couldn't resist adding a private helper class again!_

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

by stof at 2012-02-06T18:30:09Z

@vicb you should stop adding such classes defined in the same file. Otherwise we will have to change the CS (and to stop telling we respect the PSR-0 standard)

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

by vicb at 2012-02-06T18:33:36Z

Once again PSR-0 is about autoloading which is exactly why I do not want in such cases. CS are an other matter and yes I think they should be changed to allow this (and I am going to submit a PR right now).

The only argument I could accept is whether this class should be private or not.

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

by vicb at 2012-02-06T19:57:06Z

Thanks for your valuable feedback @stof

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

by fabpot at 2012-02-11T20:53:03Z

Have you tested it on a project? Because it breaks my simple examples (where I have some sub-requests).

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

by vicb at 2012-02-12T09:47:23Z

my bad, should be ok now.
2012-02-12 13:12:18 +01:00
Fabien Potencier 1da8deee4e merged branch drak/session_memcache_tests (PR #3335)
Commits
-------

fe870be [HttpFoundation] Added tests for memcache/d storage drivers.

Discussion
----------

[WIP][2.1][HttpFoundation] Add tests for session memcache/d storage drivers.

__[WIP] pending merge of PR 3333, no review please.__

Bug fix: no
Feature addition: no
Backwards compatibility break: no
__Symfony2 tests pass: no__
Fixes the following tickets: -
Todo: -
2012-02-12 13:08:22 +01:00
Drak fe870beae3 [HttpFoundation] Added tests for memcache/d storage drivers. 2012-02-12 16:06:54 +05:45
Drak 805dd76fcd [HttpFoundation] Added tests for Session class. 2012-02-12 10:23:04 +05:45
Fabien Potencier 7e4f4dcdf9 merged branch bschussek/issue3022 (PR #3322)
Commits
-------

cde34fd [Form] Throwing an AlreadyBoundException in `add`, `remove`, `setParent`, `bind` and `setData` if called on a bound form

Discussion
----------

[Form] Throwing an AlreadyBoundException in `add`, `remove`, `setParent`, `bind` and `setData` if called on a bound form

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

![Travis Build Status](https://secure.travis-ci.org/bschussek/symfony.png?branch=issue3022)

The above mentioned methods now throw an exception because when invoked on a bound form they might cause strange side effects. You should rely on event listeners instead of modifying bound forms.

See also #3022
2012-02-12 00:48:39 +01:00
Fabien Potencier 745b9a6d6c [HttpKernel] fixed function support in ControllerResolver (closes #3331) 2012-02-12 00:34:53 +01:00