This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/tests/Symfony/Tests/Component
Fabien Potencier e2463caacd merged branch snc/mongodb-profiler (PR #2129)
Commits
-------

a0329c3 Added lifetime/cleanup support.
365e73a Fixed the find() method and changed the way the profile data is stored.
beeec5e Allow socket dsn (for example mongodb:///tmp/mongodb-27017.sock).
218eaba Fixed storage of time value.
85c3806 Added support for sorting by time like other profiler storage implementations.
73692c6 Fixed MongoDbProfilerStorage::find() when passing empty parameters.
4cd2dec Use token as identifier to make usage of the automatically created index.

Discussion
----------

[2.1] [HttpKernel] MongoDB profiler updates

I fixed one issue within the MongoDbProfilerStorage::find() function and made some more changes.

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

by snc at 2011/09/11 02:28:35 -0700

Please don't merge this in yet. There are some more commits pending...

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

by fabpot at 2011/09/14 01:07:39 -0700

@snc: is it ready for a merge?

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

by snc at 2011/09/14 01:20:32 -0700

Unfortunately not... while testing I found out that the currently merged in implementation does not work completely. The web profiler search function errors because the find function returns the wrong data. I fixed this already but now I have some strange "maximum function nesting level reached" errors when viewing profiles with children. I will work on it later today.

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

by snc at 2011/09/14 13:27:50 -0700

Now only one thing is missing... the generated container code looks like this:

`$this->services['profiler'] = $instance = new \Symfony\Component\HttpKernel\Profiler\Profiler(new \Symfony\Component\HttpKernel\Profiler\MongoDbProfilerStorage('mongodb://localhost/sf2-mongo-profiler/profiler', '', '', 86400), $a);`

The current constructor only uses the first parameter (dsn). What about the username, password and lifetime? Username and passwort can already be passed via the dsn... but the lifetime feature is not part of the interface... should I implement it?

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

by fabpot at 2011/09/15 11:03:02 -0700

The `lifetime` is used to cleanup the database (see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php#L136). So, it should probably be implemented for MongoDB as well (but it can probably be done in another PR).

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

by snc at 2011/09/19 13:42:52 -0700

Sorry for the delay, lifetime support is now implemented. What do you think about an AbstractProfilerStorageTest class to share some testing code between the different implementations (of cause in a separate PR)?
2011-09-20 07:19:49 +02:00
..
BrowserKit [Tests] Use proper phpunit assertion functions: "assertTrue", "assertFalse", "assertNull" 2011-08-25 15:41:15 +02:00
ClassLoader [Classloader] Fixed failing test on Windows 2011-09-12 13:21:31 +02:00
Config added some missing accessors/mutators 2011-09-16 13:43:09 +02:00
Console [Console] Improved checks for InputArgument and InputOption constructor's $mode parameter. 2011-08-31 23:53:00 +02:00
CssSelector UnitTest 2011-06-29 18:22:32 +02:00
DependencyInjection added some missing accessors/mutators 2011-09-16 13:43:09 +02:00
DomCrawler [Tests] Use proper phpunit assertion functions: "assertTrue", "assertFalse", "assertNull" 2011-08-25 15:41:15 +02:00
EventDispatcher [EventDispatcher] Fix removeSubscriber() to work with priority syntax 2011-08-23 16:41:08 -04:00
Finder [Finder] added a convenience method Finder::create() 2011-06-14 14:18:24 +02:00
Form merged 2.0 branch 2011-09-15 07:39:20 +02:00
HttpFoundation Adjust the way of checking for windows 2011-09-17 12:57:47 +02:00
HttpKernel Added lifetime/cleanup support. 2011-09-19 22:37:12 +02:00
Locale [Locale] Fix #2179 StubIntlDateFormatter support yy format 2011-09-16 13:12:22 +02:00
Process Adjust the way of checking for windows 2011-09-17 12:57:47 +02:00
Routing [Routing] fixed annotation loaders for abstract classes, added more unit tests 2011-08-30 20:57:43 +02:00
Security Removed executable bits from all php files 2011-09-09 15:16:17 +02:00
Serializer fix tests 2011-06-10 01:11:51 +02:00
Templating fixed CS 2011-06-23 13:39:36 +02:00
Translation [Translation] support Ini file 2011-09-19 17:00:58 +02:00
Validator Removed executable bits from all php files 2011-09-09 15:16:17 +02:00
Yaml merged branch jmikola/yaml-numeric-strings (PR #1688) 2011-07-15 08:39:27 +02:00