Commit Graph

8708 Commits

Author SHA1 Message Date
Jérémy CROMBEZ
3c6a8e53d3 [BrowserKit] Missing @return Crawler annotation for the click() Client method. 2012-03-03 14:34:04 +01:00
Fabien Potencier
c4ded6aadc [HttpKernel] fixed CS 2012-03-03 01:45:26 +01:00
Fabien Potencier
8f7218313f merged branch pulzarraider/redis_profiler_storage (PR #3451)
Commits
-------

86ebe5b Redis Profiler Storage

Discussion
----------

[HttpKernel] Redis Profiler Storage added

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

Usage:

```yml
#config_dev.yml
framework:
...
    profiler:
    ...
        dsn: redis://127.0.0.1:6379
```

Redis PHP extension: https://github.com/nicolasff/phpredis

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

by fabpot at 2012-03-02T20:38:57Z

#3454 has been merged now.

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

by pulzarraider at 2012-03-02T23:41:12Z

@fabpot Tests updated and passed.
2012-03-03 01:41:07 +01:00
Fabien Potencier
77297b0602 [EventDispatcher] fixed CS 2012-03-03 01:31:12 +01:00
Fabien Potencier
f758884c2b [FrameworkBundle] ContainerAwareEventDispatcher::removeListener() (closes #3115) 2012-03-03 01:31:08 +01:00
Fabien Potencier
ffce6be671 [FrameworkBundle] fixed CS 2012-03-03 01:31:05 +01:00
Andrej Hudec
86ebe5bcb9 Redis Profiler Storage
fixed typo and tests

- updated profiler tests
- added testPurge() method
- fixed find() method
2012-03-03 00:34:31 +01:00
Fabien Potencier
3f948fb484 [Console] added some missing method in InputInterface (closes #3098) 2012-03-02 23:21:35 +01:00
Fabien Potencier
8fe6ee3d62 [Console] fixed help command when used from the shell (closes #3480) 2012-03-02 23:14:57 +01:00
Fabien Potencier
70fc80292a [BrowserKit] added a unit test (refs #3385) 2012-03-02 23:01:01 +01:00
Fabien Potencier
ddeac9a9ea [Security] added support for the remember_me parameter in the query (closes #3460) 2012-03-02 21:45:57 +01:00
Fabien Potencier
ab75727f43 fixed CS 2012-03-02 21:43:08 +01:00
Fabien Potencier
cda5ffaeeb merged branch Toflar/patch-1 (PR #3408)
Commits
-------

4f8e8ef Improving performance on digit filtering

Discussion
----------

Improving performance on digit filtering

I haven't tested it on a productive system but I think it should be way faster to use filter_var() instead of preg_replace() for several reasons.

This is my first pull request for symfony and I don't know how you do those kind of performance tests but please verify my assumption if you can :-)

Maybe we can also use filter_var() to replace other regular expressions :-)

HTH =)

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

by drak at 2012-02-22T00:35:44Z

@Toflar - nice move +1

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

by drak at 2012-02-22T18:53:40Z

@Toflar - Maybe you can bench the changes using this as a template: https://gist.github.com/1356129

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

by Toflar at 2012-02-23T13:18:18Z

I have already. And it's way faster, otherwise I wouldn't have opened a pull request ;) But obviously it strongly depends on the length of the string and the environment. That's why I was wondering whether you have a general performance tests environment ;) Because the results strongly depend on other factors, there's - in my opinion - no point in exact results. If a general info is sufficient: my tests for the regex resulted in about 7 - 8 microseconds whereas the filter version only took 1.5 - 2 microseconds for the same string.
2012-03-02 21:42:36 +01:00
Fabien Potencier
64132b9256 merged branch jonathaningram/patch-6 (PR #3422)
Commits
-------

88ccb9b Added another corner case
7c4343f Added 4 assertions related to simple URLs containing ? and #

Discussion
----------

[Validator] added assertions related to simple URLs containing ? and #

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

This adds 5 assertions for corner cases when validating a URL containing `?` and/or `#`.

Note: this does not actually fix any bugs, it just adds a few more cases.

I hope I've sent this to the correct branch - it's not a bug fix so I've not sent it to 2.0.x, but it's not a feature either...
2012-03-02 21:41:13 +01:00
Fabien Potencier
c4256688d1 merged branch jmikola/patch-3 (PR #3450)
Commits
-------

265360d [DoctrineBridge] Simpler result checking in UniqueEntityValidator

Discussion
----------

[DoctrineBridge] Simpler result checking in UniqueEntityValidator

In 928e352d09, support for MongoDB cursors was implemented by converting an Iterable, non-ArrayAccess object to an array. The ArrayAccess check didn't seem purposeful, since cursors are only Iterable and ORM returns real arrays. Since we only need to access the first element of the cursor (and only in cases where the count is exactly 1), we can simply use current() to handle Iterables and arrays.

@henrikbjorn: Any thoughts on this? I was testing @stof's work in doctrine/DoctrineMongoDBBundle#68 and our Symfony submodule was a bit old, so I fixed UniqueEntityValidator on my local machine before I realized you had come up with a solution a few weeks ago.
2012-03-02 21:39:39 +01:00
Fabien Potencier
1bebf30454 merged branch snc/profiler-tests (PR #3454)
Commits
-------

ed8c1c0 Fixed AbstractProfilerStorageTest and some minor CS changes.
1ac581e Overwrite the profile data if the token already exists like in the other implementations.
198d406 Return profiler results sorted by time in descending order like in the other implementations.
9d8e3f2 Refactored profiler storage tests to share some code.

Discussion
----------

[WIP] Refactored profiler tests including some storage fixes

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

While refactoring the tests I came across some inconsistencies. Two of them are already fixed in this PR.

One thing left is the [MongoDbProfilerStorageTest::testCleanup()](9d8e3f2da4/tests/Symfony/Tests/Component/HttpKernel/Profiler/MongoDbProfilerStorageTest.php (L51)) test which fails in all other storage implementations. The mongodb implementation uses the `time` value from the profiler data to clean up the storage while the others additionally save a `created_at` value which is then used. For me this `created_at` value does not make any sense and I would suggest to change the other implementations to use the `time` value for cleaning up. What do you think?

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

by pulzarraider at 2012-02-27T06:55:06Z

+1 for refactoring profiler tests, I will update my RedisProfilerStorage after your changes will be merged.

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

by snc at 2012-02-28T20:05:12Z

Any suggestions about the cleanup issue?
2012-03-02 21:37:15 +01:00
Fabien Potencier
d189db78a6 merged branch blogsh/router-patch-1 (PR #3483)
Commits
-------

ba251d8 [Routing] Updated Router::match and Router::generate documentation
2ce15bd [Routing] Fixed Router::match documentation

Discussion
----------

[Routing] Fixed Router::match and Router::generate documentation

Documentation of Router::match has been deprecated/invalid.

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

by stof at 2012-03-01T17:41:41Z

even better way to fix this: replace it with ``{@inheritdoc}``

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

by blogsh at 2012-03-01T19:22:06Z

Okay, wasn't sure whether this is appreciated because it inherits the method over 3 corners :)
2012-03-02 19:06:56 +01:00
Fabien Potencier
003c2e4175 merged branch stealth35/patch-17 (PR #3491)
Commits
-------

8fa2ff0 [FrameworkBundle] fix DependencyInjection/*FrameworkExtensionTest for Windows

Discussion
----------

[FrameworkBundle] fix DependencyInjection/*FrameworkExtensionTest for Windows
2012-03-02 19:06:02 +01:00
stealth35
8fa2ff0582 [FrameworkBundle] fix DependencyInjection/*FrameworkExtensionTest for Windows 2012-03-02 17:54:28 +01:00
Fabien Potencier
3d0341bcec merged branch vicb/patch-1 (PR #3481)
Commits
-------

5886c55 [WebProfilerBundle] Router panel: take the request method into account

Discussion
----------

[WebProfilerBundle] Router panel: take the request method into account

Before this change we were always using the default method (i.e. 'GET').
2012-03-02 17:38:49 +01:00
Fabien Potencier
a705ee9d13 merged branch stealth35/patch-16 (PR #3487)
Commits
-------

caa44ae Only work with the cli sapi
e2fc3cd [Process] PHP_BINARY return the current process

Discussion
----------

[Process] PHP_BINARY only return the current sapi process

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

PHP_BINARY return the current process, so under the apache module I get (on Windows) `httpd.exe`

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

by vicb at 2012-03-02T14:48:04Z

Could it be '.../php5' ?
Is it a PHP bug ?

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

by stealth35 at 2012-03-02T15:00:57Z

@vicb

> Could it be '.../php5' ?

Yes, but it's not the standard installation, you also call you php executable 'blabla.exe'

> Is it a PHP bug ?

I'don't now, I think it's get the SAPI but If it's work under Unix so yes it's a PHP Bug
http://lxr.php.net/opengrok/xref/PHP_5_4/main/main.c#binary_location

I'll test this on my Mac

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

by vicb at 2012-03-02T15:08:25Z

@stealth35

* asking about 'php5' because it seems some systems use this name,
* would testing for a cli sapi be more robust than making assumptions about the process name ?

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

by stealth35 at 2012-03-02T15:24:24Z

@vicb yes I think it's better

Anybody can test `PHP_BINARY` with some sapi like : `cgi`, `cgi-fcgi`, `fpm-fcgi` ... ?
2012-03-02 17:27:58 +01:00
stealth35
caa44aefc1 Only work with the cli sapi 2012-03-02 16:42:35 +01:00
stealth35
e2fc3cde90 [Process] PHP_BINARY return the current process 2012-03-02 14:33:12 +01:00
Rafael Dohms
b73c703d71 Reverting return type left by mistake 2012-03-01 23:47:51 +01:00
Rafael Dohms
881d290c47 Updating use of DoctrineBundle Registry to use the proper path to Doctrine\Bundle\DoctrineBundle\Registry 2012-03-01 21:21:53 +01:00
Sebastian Hörl
ba251d8100 [Routing] Updated Router::match and Router::generate documentation 2012-03-01 20:27:36 +01:00
Sebastian Hörl
2ce15bdd26 [Routing] Fixed Router::match documentation 2012-03-01 18:02:52 +01:00
Victor Berchet
5886c55510 [WebProfilerBundle] Router panel: take the request method into account 2012-03-01 14:33:22 +01:00
Fabien Potencier
42923f3044 merged branch mvrhov/session_cookie_merge (PR #3423)
Commits
-------

471b564 auto_start should be false
6e2a7da Support session cookie options with cookie_ prefix
e0fba80 Properly merge session cookie_* parameters

Discussion
----------

Set session.cookie_* parameters properly

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

Cookie parameters in $options are not prefixed with cookie_ the same is true for data returned from session_get_cookie_params.

I've marked this as BC because the options that get dumped into the container have different name. But I don't think anybody was actually changing them or accessing them in their bundles.

P.S. @drak also desires some credits for this PR as I incorporated some lines written by him in one of the iterations.

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

by drak at 2012-02-23T14:24:42Z

@mvrhov - what does this fix exactly? It looks like a different way of doing the same thing but now there is no default value on `cookie_httponly`.

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

by mvrhov at 2012-02-23T15:09:17Z

Like I said in description. $option contains some cookie options and none of them has cookie_ prefix.
And this prefix is needed in two cases:
- to properly merge defaults and override them with what user set
- in a foreach for for proper ini_set

Sorry non native speaker an a bit hard to explain, could you ping me in a couple of hours on IRC if this still doesn't make any sense.

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

by drak at 2012-02-23T15:29:41Z

@mvrhov - I wrote some tests for this particular code and I still don't see what this PR fixes. I'll try to catch you on IRC later on but can't guarantee it.

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

by mvrhov at 2012-02-23T16:02:41Z

added test

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

by drak at 2012-02-24T08:30:51Z

Just for reference for those reading this ticket, `session_set_cookie_params()` alters the runtime ini settings it corresponds to see http://docs.php.net/manual/en/function.session-set-cookie-params.php so we agreed to remove the special handling that was present since it is redundant.

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

by dlsniper at 2012-02-28T22:19:32Z

Hi, Is this patch relevant or not after all?
ping @drak @mvrhov

Thanks :)

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

by drak at 2012-02-29T03:34:22Z

It is relevant.  Maybe I'll do the cleanup this PR by forking it if @mvrhov doesn't have time.

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

by mvrhov at 2012-02-29T05:40:47Z

Fixed the typo and changed the false to ture as reported in comments. I've also rebased. I'll see what I can do about config file change later today. Sorry for the delay, been too busy for the past week.

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

by mvrhov at 2012-02-29T08:49:23Z

I've also done the config part.

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

by mvrhov at 2012-02-29T11:01:14Z

Ok, this should be it.

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

by drak at 2012-03-01T00:59:16Z

@fabpot - looks good from my side.
2012-03-01 11:39:59 +01:00
Fabien Potencier
828003313e merged branch drak/session_docblocks (PR #3413)
Commits
-------

09be5cb [HttpFoundation] Documentation.
7f8c293 [HttpFoudation] Add ability to configure sqlite session storage.

Discussion
----------

[HttpFoundation] Session docblocks

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

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

by drak at 2012-02-22T18:19:45Z

Please note the documentation referred to will be published a php.net this Friday (docs are built weekly).

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

by drak at 2012-02-24T11:16:57Z

@fabpot - this is ready for merge.

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

by fabpot at 2012-03-01T00:02:09Z

Can you squash your commits before I merge? Thanks.

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

by drak at 2012-03-01T00:57:50Z

Done.
2012-03-01 11:37:50 +01:00
Drak
09be5cb87c [HttpFoundation] Documentation.
Added blocks, updated links and references and fixed typos.
Note it is not possible to throw exceptions in the write or close methods of a session save handler.
2012-03-01 07:19:15 +05:45
Drak
7f8c293070 [HttpFoudation] Add ability to configure sqlite session storage. 2012-03-01 06:42:02 +05:45
Fabien Potencier
4c1cea7093 merged branch jmikola/doctrine-lazy-event-manager (PR #3434)
Commits
-------

71493a2 [DoctrineBridge] Compiler pass for registering event listeners/subscribers
f15dde6 [DoctrineBridge] ContainerAwareEventManager class

Discussion
----------

[DoctrineBridge] ContainerAwareEventManager class

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

[![Build Status](https://secure.travis-ci.org/jmikola/symfony.png?branch=doctrine-lazy-event-manager)](http://travis-ci.org/jmikola/symfony)

This allows services to be registered (and lazily loaded) with Doctrine Common's EventManager.

It is ported from @schmittjoh's previous commits here: doctrine/DoctrineBundle#23. I'd like to integrate this with DoctrineMongoDBBundle, so the Bridge once again seemed like an ideal alternative to duplicating code.

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

by jmikola at 2012-02-23T20:37:51Z

Per conversation with @stof in doctrine/DoctrineBundle#23, I'm also going to integrate the compiler pass (an abstract version both bundles can use) into this PR.

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

by jmikola at 2012-02-23T21:56:47Z

Just realized there's an issue with the naming assumptions, since Doctrine ORM uses "doctrine" as its registry service ID but "doctrine.dbal" as its event manager prefix. Fixing.
2012-03-01 01:01:15 +01:00
Fabien Potencier
4976010c09 merged branch jmikola/doctrine-fixture-loader-test (PR #3464)
Commits
-------

48a288e [DoctrineBridge] Add tests for data fixture ContainerAwareLoader

Discussion
----------

[DoctrineBridge] Add tests for data fixture ContainerAwareLoader

```
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3328 (PR was missing this test)
Todo: -
```

The test is skipped unless the optional `doctrine/data-fixtures` is available. I confirmed that it passes with it installed. Once this is merged, the DoctrineFixturesBundle will contain nothing more than a console command, which can be merged into DoctrineBundle.
2012-03-01 00:57:30 +01:00
Fabien Potencier
241e4fccbd merged branch michal-pipa/test-fix (PR #3470)
Commits
-------

515b581 [FrameworkBundle] Fixed test

Discussion
----------

[FrameworkBundle] Fixed test on Ubuntu 10.04 LTS

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

Test was failing on Ubuntu 10.04 LTS because Ubuntu adds it's own PHP extra version number, which was greater than 5.3.2.

The same bug exist in master branch.
2012-03-01 00:56:40 +01:00
Miha Vrhovnik
471b5648ef auto_start should be false 2012-02-29 15:34:20 +01:00
Miha Vrhovnik
6e2a7dabb6 Support session cookie options with cookie_ prefix 2012-02-29 11:54:23 +01:00
Michał Pipa
515b581937 [FrameworkBundle] Fixed test 2012-02-29 07:49:03 +01:00
Miha Vrhovnik
e0fba80057 Properly merge session cookie_* parameters
Prefixed following session options: 'lifetime', 'path', 'domain', 'secure',
 'httponly' because this results in better session driver code
2012-02-29 06:35:26 +01:00
H. Westphal
ed8c1c0572 Fixed AbstractProfilerStorageTest and some minor CS changes. 2012-02-28 20:43:34 +01:00
Jeremy Mikola
48a288e9db [DoctrineBridge] Add tests for data fixture ContainerAwareLoader 2012-02-27 17:16:55 -05:00
Fabien Potencier
9e6dcf0746 merged branch beberlei/PDOSessionTest (PR #3462)
Commits
-------

5a6ce20 [Session] Add Test for PDO Session Storage with SQLite in Memory DB.

Discussion
----------

[Session] PDO Session Storage tests

The PDO Session storage was untested previously.

This test is for the 2.0 API. The methods names all changed in the master branch and have to be adjusted when 2.0 is merged into master.
2012-02-27 16:52:10 +01:00
Benjamin Eberlei
5a6ce200e2 [Session] Add Test for PDO Session Storage with SQLite in Memory DB. 2012-02-27 16:32:07 +01:00
Fabien Potencier
8bdd01f633 merged branch beberlei/PdoSessionStorageSqlSrvFix (PR #3461)
Commits
-------

dc2d5a0 [HttpFoundation][Session] Fix bug in PDO Session Storage with SQLSRV making assumptions about parameters with length being OUTPUT not INPUT parameters.

Discussion
----------

[HttpFoundation][Session] PDO session storage sql srv fix

...ing assumptions about parameters with length being OUTPUT not INPUT parameters.

See also http://social.msdn.microsoft.com/Forums/en/sqldriverforphp/thread/c7431849-8594-4da2-bef6-8702b72391cc

Addtionally PDO Session Storage has no tests on either master or 2.0, i will provide a PR with a basic coverage in a seperate commit.
2012-02-27 16:12:17 +01:00
Benjamin Eberlei
dc2d5a0581 [HttpFoundation][Session] Fix bug in PDO Session Storage with SQLSRV making assumptions about parameters with length being OUTPUT not INPUT parameters. 2012-02-27 15:57:52 +01:00
Fabien Potencier
3de31c62d6 merged branch snc/session-handler (PR #3436)
Commits
-------

9c8a283 Some \SessionHandlerInterface related documentation updates
9b2de81 Fixed \SessionHandlerInterface in DbalSessionStorage

Discussion
----------

Some \SessionHandlerInterface related updates

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

by snc at 2012-02-23T20:01:51Z

I checked the `Locale` stub in the documentation and it looks like the `\` is not prefixed, so I'll change this, too.

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

by drak at 2012-02-24T07:40:39Z

We really need some tests for the bridge classes, even if they stubs which cause the compiler to at least parse the class, would pick up refactorings like this.
2012-02-27 10:09:42 +01:00
Fabien Potencier
d9959af406 merged branch Seldaek/composer_alias (PR #3457)
Commits
-------

bafcaaf Removed version field
f9d9dc7 Add branch-alias for composer

Discussion
----------

Add branch-alias for composer

This should restore the 2.1-dev version (as an alias of dev-master) so that `2.*` or `2.1.*` constraints work again. I'll adjust packagist soon to also display those aliases.
2012-02-27 10:07:31 +01:00
Fabien Potencier
e7b17ce6c8 merged branch dlsniper/patch-1 (PR #3447)
Commits
-------

eb58dd1 Removed useless parameter from Memcached::set()

Discussion
----------

Removed useless parameter from Memcached::set() which makes users unable to set session expiry time.

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

The parameter count is wrong so it makes setting session expiration useless.

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

by stof at 2012-02-25T16:06:16Z

Already fixed in 15c6ba93f

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

by stof at 2012-02-25T16:06:46Z

ah sorry, it was the profiler storage
2012-02-27 10:05:08 +01:00
Fabien Potencier
c319ff5939 merged branch kriswallsmith/wdt/no-session-fix (PR #3444)
Commits
-------

95ec4eb [WebProfilerBundle] fixed session assumption

Discussion
----------

[WebProfilerBundle] fixed session assumption

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

[![Build Status](https://secure.travis-ci.org/kriswallsmith/symfony.png?branch=wdt/no-session-fix)](http://travis-ci.org/kriswallsmith/symfony)
2012-02-27 10:04:49 +01:00
Fabien Potencier
518b96e7db merged branch Seldaek/fixtests (PR #3443)
Commits
-------

d95d63d Ignore destructive memcached tests by default

Discussion
----------

Ignore destructive memcached tests by default

Follow up for #3438
2012-02-27 10:03:51 +01:00