Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bundle page to reflect best practices #15881 #16389

Closed
wants to merge 2 commits into from

Conversation

BafS
Copy link
Contributor

@BafS BafS commented Jan 12, 2022

Fix documentation to reflect best practices page: https://symfony.com/doc/5.4/bundles/best_practices.html#directory-structure

See: #15881

@carsonbot
Copy link
Collaborator

Hey!

Oh no, it looks like you have made this PR towards a branch that is not maintained anymore. :/
Could you update the PR base branch to target one of these branches instead? 4.4, 5.3, 5.4, 6.0, 6.1.

Cheers!

Carsonbot

@carsonbot carsonbot added this to the 5.0 milestone Jan 12, 2022
@BafS BafS requested a review from xabbuh as a code owner January 12, 2022 11:56
@BafS BafS changed the base branch from 5.0 to 5.4 January 12, 2022 11:57
@gnito-org
Copy link
Contributor

It appears that the recommended bundle directory structure does not work by default: #15881

Perhaps the extra steps needed to make it work also needs to be documented.

Additionally, many (most?) Symfony bundles use the old directory structure.

@mbabker
Copy link
Contributor

mbabker commented Mar 7, 2022

It appears that the recommended bundle directory structure does not work by default: #15881

Perhaps the extra steps needed to make it work also needs to be documented.

I'd say add the one extra step needed to https://github.com/BafS/symfony-docs/blob/patch-9/bundles.rst#creating-a-bundle - specifically, you need to override the getPath() method:

    public function getPath(): string
    {
        return \dirname(__DIR__);
    }

Additionally, many (most?) Symfony bundles use the old directory structure.

The bundles in the Symfony monorepo probably will never change unless the framework forces a change. In the ecosystem, I imagine between this stuff being documented and Symfony 3.4 support being dropped, it might get some more uptake.

@OskarStark OskarStark modified the milestones: 5.0, 5.4 Aug 14, 2023
@javiereguiluz
Copy link
Member

Closing because this article was updated a while ago ... and we're updating the remaining articles to always prioritize the new dir structure and the AbstractBundle class. See #19793

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants