Hi guys!

It's not really an issue, just a difference in opinion about 18 months ago
:). Repository classes can go anywhere, so it's just about having a "best
practice" location. I think I probably suggested that they *might* go into
a Repository namespace via the docs and the generator supposed that they
might go inside the entity directory itself. Regardless, it makes most
sense to be consistent, so I've opened up an issue here:
https://github.com/symfony/symfony-docs/issues/1316

Thanks everyone!

Ryan Weaver
US Office Head & Trainer - KnpLabs - Nashville, TN
http://www.knplabs.com <http://www.knplabs.com/en>
http://knpuniversity.com
Twitter: @weaverryan


On Thu, Apr 26, 2012 at 3:46 AM, r1pp3rj4ck <[email protected]> wrote:

> I've never even realized it should be in Repository namespace/directory,
> because I always generate repositories when generating entities, so I can
> confirm this issue.
>
>
> On Monday, April 23, 2012 6:46:08 PM UTC+2, Jeff Mott wrote:
>>
>> php app/console doctrine:generate:entity
>>
>> No arguments, so you enter interactive mode. Entity shortcut name can be
>> whatever; AcmeDemoBundle:Test will work. Configuration format can be
>> whatever; I used the default. Fields can be whatever; for this test, you
>> don't need to bother adding any.
>>
>> Then it asks: Do you wan to generate an empty repository class? Answer
>> yes.
>>
>> Finally, confirm generation.
>>
>> Both the Test entity and the TestRepository class are put in the Entity
>> namespace. Seems to me that the TestRepository class should be put in the
>> Repository namespace.
>>
>> On Monday, April 16, 2012 6:56:45 AM UTC-7, mz wrote:
>>>
>>> Can't reproduce, I set repository-class="Company\**MyBundle\Repository\*
>>> *ProductRepository" and it generates the repository in the right place
>>> (sf 2.0.12 SE).
>>>
>>> On Mon, Apr 16, 2012 at 6:05 AM, Jeff Mott <[email protected]>wrote:
>>>
>>>> Hi folks,
>>>>
>>>> I'm hoping someone more knowledgeable than I can determine if this is
>>>> indeed a bug, and report it appropriately.
>>>>
>>>> The Doctrine chapter of the Symfony2 book seems to suggest placing
>>>> repository classes in a bundle's Repository directory. But when I
>>>> generated a repository class using doctrine:generate:entity, it put
>>>> the repository class in the Entity directory.
>>>>
>>>> Obviously a low-priority issue, if an issue at all.
>>>>
>>>> --
>>>> If you want to report a vulnerability issue on symfony, please send it
>>>> to security at symfony-project.com
>>>>
>>>> You received this message because you are subscribed to the Google
>>>> Groups "symfony developers" group.
>>>> To post to this group, send email to [email protected]
>>>> To unsubscribe from this group, send email to
>>>> symfony-devs+unsubscribe@**googlegroups.com<symfony-devs%[email protected]>
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/symfony-devs?hl=en<http://groups.google.com/group/symfony-devs?hl=en>
>>>>
>>>
>>>  --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to