This has absolutlely nothing to do with PSR-0, just remove the bundle
suffix from the directory aswell. It is not a necessary component of the
last namespace segment.

Acme/Foo/Entity/Bar.php => Acme\Foo\Entity\Bar
Acme/Foo/AcmeFooBundle.php => Acme\Foo\AcmeFooBundle

Adding Bundle back is absolutely no option, this was discussed and voted
+1 by a vast majority of people at the last meeting.

On Wed, 30 Mar 2011 05:43:37 -0700 (PDT), Albert Jessurum
<[email protected]> wrote:
> On Wednesday, March 30, 2011 2:24:38 PM UTC+2, beberlei wrote:
>>
>> Your namespace does not have to contain the Bundle name, it could be:
>>
>> Acme\Foo\Entity\Bar
>> Acme\Foo\Entity\BarRepository
>>
>> The "Bundle" prefix is completly unnecessary there.
>>
> It has to be there in the namespace, if we adhere to the PSR-0 standard,
> as 
> the folder name still contains the Bundle suffix (and that won't be
> changed, 
> and I'm fine with that):
> https://groups.google.com/d/msg/symfony-devs/l4Cqr35cxK4/DG4L0ke9H7IJ
>  
> 
>> The only place where bundle IS encouraged (but even there not necessary
>> technically afaik) is in the Bundle class:
>>
>> Acme/Foo/AcmeFooBundle.php
>>
>> The confusion only steems from bundles not having updated their
>> namespaces.
>>
>> gretings,
>> Benjamin
>>
>> On Wed, 30 Mar 2011 05:19:06 -0700 (PDT), Albert Jessurum
>> <[email protected]> wrote:
>> > First of all. Please don't kill me :)
>> > I want to propose to add the "Bundle" suffix back to the shortname
(if
>> my 
>> > arguments below are correct), and here is my reasoning:
>> > 
>> > I supported the removal of the Bundle suffix when the decision was
>> taken,
>> > up 
>> > until yesterday, when I upgraded to PR9, and saw there will be some 
>> > inconsistencies with namespaces which might be confusing to users. If
>> the 
>> > suffix stays off, this have to be made very clear to users.
>> > 
>> > Namespaces are the only place where the Bundle suffix is still
applied,
>> > and 
>> > can't be taken off [1]. So unless the Bundle suffix is actually
removed
>> > from 
>> > the Bundle names, which I know won't happen, and makes even less
sense
>> to 
>> > remove, there will be inconsistencies left on calling xyz vs
xyzBundle
>> in 
>> > the following places, which are all namespace related:
>> > 
>> >    - Namespace declarations, obviously
>> >    - Entity relationships from another 
>> >    bundle: @orm:ManyToOne(targetEntity="Acme\FooBundle\Entity\Bar")
>> >    - Entity Repository Annotations: 
>> >    @orm:Entity(repositoryClass="Acme\FooBundle\Entity\BarRepository")
>> >    - Queries:
>> >       - shortname: $em->createQuery('SELECT b FROM AcmeFoo:Bar
>> >       - longname:  $em->createQuery('SELECT b FROM
>> >       Acme\FooBundle\Entity\Bar
>> >    
>> > I don't know if I left anything off.
>> > 
>> > This is not meaning to create an argument, and I'm fine either way
the 
>> > decision is taken. Just want to put this forth, to make sure we are
all
>> > fine 
>> > with this.
>> > If we have to change back, like it happened with the html.twig vs
>> > twig.html 
>> > issue, now is better than any other time. This is why PRs are
created,
>> to 
>> > test things out in the "real world", though I know this changes are
>> > painful 
>> > sometimes :)
>> > 
>> > ------
>> > [1] We comply with the PSR-0 standard - 
>> > https://groups.google.com/d/msg/symfony-devs/l4Cqr35cxK4/DG4L0ke9H7IJ
>>
>>

-- 
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