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.
Go to file
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
src/Symfony merged branch Wotre/profiler_mongodb (PR #1784) 2011-09-06 07:53:28 +02:00
tests merged branch Wotre/profiler_mongodb (PR #1784) 2011-09-06 07:53:28 +02:00
.gitignore Added vendor directory to .gitignore 2010-06-24 10:44:28 +02:00
autoload.php.dist fixed autoloader when tests are run on a machine without intl installed 2011-07-20 14:27:10 +02:00
CHANGELOG-2.0.md updated CHANGELOG for 2.0.1 2011-08-26 08:46:45 +02:00
CHANGELOG-2.1.md updated CHANGELOG for 2.1 2011-09-06 07:47:18 +02:00
check_cs fixed root search path to include only './src' and './tests' 2011-06-08 18:11:05 +02:00
CONTRIBUTORS.md update CONTRIBUTORS for 2.0.1 2011-08-26 08:45:12 +02:00
LICENSE added the LICENSE file for the YAML component 2011-02-18 11:52:11 +01:00
phpunit.xml.dist [Security] cleaned up opt-in to benchmark test 2011-03-06 20:06:13 +01:00
README.md updated the README file 2011-05-24 17:27:37 +02:00
UPDATE.ja.md updated translation of UPDATE file (Japanese RC5 added) 2011-07-30 02:08:25 +09:00
UPDATE.md updated UPDATE file 2011-07-22 17:45:02 +02:00
vendors.php updated vendors.php script to be more precise about the action (either install or update) 2011-09-02 09:22:14 +02:00

README

What is Symfony2?

Symfony2 is a PHP 5.3 full-stack web framework. It is written with speed and flexibility in mind. It allows developers to build better and easy to maintain websites with PHP.

Symfony can be used to develop all kind of websites, from your personal blog to high traffic ones like Dailymotion or Yahoo! Answers.

Requirements

Symfony2 is only supported on PHP 5.3.2 and up.

Installation

The best way to install Symfony2 is to download the Symfony Standard Edition available at http://symfony.com/download.

Documentation

The "Quick Tour" tutorial gives you a first feeling of the framework. If, like us, you think that Symfony2 can help speed up your development and take the quality of your work to the next level, read the official Symfony2 documentation.