Refactor Doctrine ManagerRegistry to be generic
Refactored ParamConverter and add some tests
Add standalone testing autoloading
add doctrine common autoloading
Ignore vendor dir
mark test as skipped if doctrine managerregisty is not availible
change class_exists to interface_exists
doctrine autoloading
Added documentation on how to use the controller as a service
Merge pull request #1 from henrikbjorn/DoctrineManagerRegistry

Doctrine manager registry
Dont run vendor directory tests
Add simple test for ConfigurationAnnotation
merged branch beberlei/DoctrineManagerRegistry (PR #74)

Commits
-------

9fcdbfd Merge pull request #1 from henrikbjorn/DoctrineManagerRegistry
07ba5da doctrine autoloading
e921615 change class_exists to interface_exists
2f92111 mark test as skipped if doctrine managerregisty is not availible
8c73373 Ignore vendor dir
d095d21 add doctrine common autoloading
193389d Add standalone testing autoloading
9ebe009 Refactored ParamConverter and add some tests
da8dd75 Refactor Doctrine ManagerRegistry to be generic

Discussion
----------

Doctrine Manager Registry

Refactored the DoctrineParamConverter to use the Common Registry.

Also refactored some other parts of the converter to use a more clean part of the Doctrine API.

Problem now is, this would work with MongoDB and the other ODMs, however its bound against the doctrine service. I am not sure how we can fix that. Essentially we could make it configurable, but then it would still only work with exactly one registry.

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

by fabpot at 2011/11/23 02:19:45 -0800

The tests do not pass for me. I have updated all Doctrine repositories to origin/master.

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

by beberlei at 2011/11/23 05:13:06 -0800

How do they fail? Sometihng with the mocks?

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

by fabpot at 2011/11/23 05:32:38 -0800

    Fatal error: Call to undefined method Mock_ManagerRegistry_44700eba::getManager() in .../vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/DoctrineParamConverter.php on line 68

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

by henrikbjorn at 2011/11/23 06:00:27 -0800

With the registry breaking BC can #56 be merged aswell ? i would happily do a update to DoctrineParamConverter to make it compatible

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

by fabpot at 2011/11/23 06:05:58 -0800

@henrikbjorn: yes, I will merge it just after this one on the master branch.

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

by henrikbjorn at 2011/11/23 06:11:24 -0800

@fabpot sweet, can you ping me first then i can have the doctrine converter ready when its merged

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

by henrikbjorn at 2011/11/24 06:50:07 -0800

@fabpot should be okay to merge now :). The reason for the error was that it couldnt find ManagerRegistry class when doing the tests.

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

by beberlei at 2011/11/25 01:49:05 -0800

If the change by henrik makes your tests work again fabien then something with your Doctrine Common checkout is wrong. Maybe it didnt switch to origin/master correctly and is still on the "local" master?

Regarding the "entity_manager" i am unsure to rename to "object_manager". Since this PR only theoretically makes the converter support the ODMs. One solution to support all the ORM, ODMs would be to register a parameter converter per Doctrine ManagerRegistry automatically, i.e. if it finds the bundles or better something with tags (i.e. tag "doctrine.manager_registry")
merged branch henrikbjorn/configuration-annotation-test (PR #76)

Commits
-------

ce1787d Add simple test for ConfigurationAnnotation
49c4d6a Dont run vendor directory tests

Discussion
----------

Configuration annotation test

If using `phpunit --coverage-html="coverage"` it would try to generate for the vendor dir aswell so added ./vendor to the exclude part of phpunit.xml.dist

Also added a simple test for ConfigurationAnnotation to test it does infact throw exception when a method with setSomething dosnt exists.
Change apply method to always return a boolean value. This makes converting attributes with the name name as a action parameter possible
Cleanup
merged branch henrikbjorn/parameter-name-bug (PR #56)

Commits
-------

22c69c0 Cleanup
76c521f Change apply method to always return a boolean value. This makes converting attributes with the name name as a action parameter possible

Discussion
----------

Change apply method to always return a boolean value. This makes converti

Change apply method to always return a boolean value. This makes converting attributes with the name name as a action parameter possible.

https://github.com/symfony/symfony/issues/1547#issuecomment-1807290

Before this patch it was not possible to have a /blog/archive/{date} route and a action like `myAction(DateTime $date)` as the request attribute would already exists and the paramconverter would not be called.

This path is breaking BC for the apply method on ParamConverterInterface which now MUST return a boolean value indicating if a conversion was done.

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

by fabpot at 2011/08/23 02:43:57 -0700

The semantic of the converters is also changed with this patch. Currently, we only convert parameters that are not yet in the attributes. After the patch, you convert all parameters even if they are already in the request attributes.

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

by henrikbjorn at 2011/08/23 03:50:06 -0700

The problem with having to abort the parameter conversion when the attribute is already there is if you give a route a default it will already be present and not converted.

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

by henrikbjorn at 2011/08/23 03:50:59 -0700

And the conversion of a parameter is aborted if a converter returns true, the converter should be able to handle default parameters :)

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

by henrikbjorn at 2011/08/29 06:44:03 -0700

As you might want to load a default category object if no specific category was provided.

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

by henrikbjorn at 2011/11/25 08:15:11 -0800

@fabpot rebased and tests pass :) good to go.
added a CHANGELOG
Add template name guesser service (with suggested changes)
merged branch lenar/template-guesser (PR #78)

Commits
-------

929e093 Add template name guesser service (with suggested changes)

Discussion
----------

Add template name guesser service

This change would help @schmittjoh's override of template name guessing in [JMSDiExtraBundle](/schmittjoh/JMSDiExtraBundle)  to be implemented in a way that does not disrupt [FOSRestBundle](/FriendsOfSymfony/FOSRestBundle) as described in schmittjoh/JMSDiExtraBundle#14.

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

by lenar at 2011/11/30 05:01:44 -0800

I implemented your suggestions. And added the changes to existing files I somehow managed to not-commit before.

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

by stof at 2011/11/30 05:06:57 -0800

This template guesser is used nowhere so it seems like part of your patch is missing

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

by lenar at 2011/11/30 05:13:43 -0800

@stof, @henrikbjorn: Sorry I messed up the commits multiple times. It seems my mind has been taken over by the "demons" of hg.

I've implemented the changes suggested so far and added the changes that were missing. Made a clean push to branch.

Really, sorry for the inconveniences.