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/HttpKernel
Fabien Potencier a00c1f5927 merged branch Wotre/profiler_mongodb (PR #1784)
Commits
-------

41b7a19 Updated the tests so that tests will be marked as skipped when there is no MongoDB server present!
233c7db Updated the code to follow the symfony coding standards
7b24de5 Updated the code to follow the symfony coding standard using stof his remarks
fbcbdde - Fixed a small bug - Updated some phpdoc
00fdfec Added a MongoDbProfilerStorage engine

Discussion
----------

[2.1] [HttpKernel] MongoDb storage for Profiler

As a documentbased database like MongoDB is [supposedly fantastic in logging](http://blog.mongodb.org/post/172254834/mongodb-is-fantastic-for-logging) I implemented a storage engine for the profiler that should enable us to use this database as storage for this.

Activate it using this way:

    framework:
        profiler:
            dsn:     mongodb://user:pass@location/database/collection

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

by stof at 2011/07/24 11:23:06 -0700

btw, the MongoDB session storage has already be rejected from the core so this should probably be moved to the DoctrineMongoDBBundle (even if it uses only the PHP extension and not Doctrine). @fabpot thoughts about this ?

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

by Wotre at 2011/07/24 11:52:56 -0700

Just my personal opinion, if it is prefered that way I will move this into the DoctrineMongoDBBundle.

While it is reasonable to bundle all Mongo related things together, I do believe that in the case of logging we want to avoid as many depencies as possible. Some exceptions can occur pretty early inside the framework, and it would be a shame if those aren't logged because this layer is written on top of doctrine. I'm not exactly familliar enough with the symfony internals as I only started using it a few days ago, but I can imagine that this can make a difference with some exceptions.

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

by stof at 2011/07/24 11:59:10 -0700

I don't ask you to use Doctrine in this code. It is fine to use the extension directly if it is enough.

Btw, the profiler is *not* used early. :)

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

by Wotre at 2011/07/26 10:45:05 -0700

So... Any final remark whether this should be moved to [the DoctrineMongoDBBundle](https://github.com/symfony/DoctrineMongoDBBundle) or not?

If it has to be moved, any comment on where in that bundle this should be put?

Also, if it has to be moved, how can we arrange the configuration using DI? Currently I've put a line in the FrameworkExtension file to use this engine for everything with a $dsn starting with mongodb; I imagine this kind of ugly depency can't really exist between the FrameworkBundle and another one.

Although it seems completely illogical to me, I will move it, but I do need some directions on how to elegantly do this...

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

by stof at 2011/07/26 11:03:04 -0700

@fabpot what do you think ?

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

by stof at 2011/09/04 01:28:48 -0700

@fabpot what do you think about the place where this should be done ?
2011-09-06 07:53:28 +02:00
..
Bundle fixed CS 2011-06-08 19:56:59 +02:00
CacheWarmer Add missing "tearDown" functions, and some missing variable declaration (this saves for me almost 20MB when run all tests) 2011-06-16 15:06:36 +02:00
Controller [HttpKernel] fixed ControllerResolver when the controller is a class name with an __invoke() method 2011-08-08 23:20:03 +02:00
DataCollector added more information about a resource in error and debug messages 2011-06-20 10:16:09 +02:00
Debug moved all listener classes under a common EventListener sub-namespace 2011-05-31 10:43:20 +02:00
DependencyInjection [HttpKernel] added BundleInterface::getContainerExtension() which is implicitly loaded 2011-04-25 21:12:35 -07:00
EventListener Renamed core.* events to kernel.* and CoreEvents to KernelEvents 2011-06-21 16:35:14 +02:00
Exception [HttpKernel] fixed recursion when flattenning an exception stack trace 2011-07-07 10:59:18 +02:00
Fixtures removed empty lines/trailing spaces 2011-04-15 21:12:02 +02:00
HttpCache [Tests] Use proper phpunit assertion functions: "assertTrue", "assertFalse", "assertNull" 2011-08-25 15:41:15 +02:00
Profiler merged branch Wotre/profiler_mongodb (PR #1784) 2011-09-06 07:53:28 +02:00
ClientTest.php [HttpKernel] added a test for uploading a file via an array instead of an UploadedFile instance 2011-08-25 10:07:28 +02:00
HttpKernelTest.php Renamed core.* events to kernel.* and CoreEvents to KernelEvents 2011-06-21 16:35:14 +02:00
KernelTest.php fixed tests 2011-06-20 08:06:32 +02:00
Logger.php [HttpKernel] Added the context in the LoggerInterface 2011-06-17 12:26:12 +02:00
TestHttpKernel.php [HttpKernel] Simplify test code 2011-08-18 09:32:26 +02:00