Skip to content

remove getPublicDir() documentation #12908

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

Merged
merged 1 commit into from
Jan 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions bundles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,35 +117,6 @@ database, create and validate forms, create translations for your application,
write tests and much more. Each of these has their own place and role within
the bundle.

Overridding the Bundle Directory Structure
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Some of the bundle directories are conventions that can be overridden if needed.
For example, the **public directory**, which by default is located at
``<your-bundle>/Resources/public/``, can be changed by defining the
``getPublicDir()`` method in the bundle class::

// src/Acme/TestBundle/AcmeTestBundle.php
namespace App\Acme\TestBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class AcmeTestBundle extends Bundle
{
// ...

// the returned value must be relative to the bundle root directory
// (public dir is now <your-bundle>/public/ instead of <your-bundle>/Resources/public/)
public function getPublicDir(): string
{
return 'public/';
}
}

.. versionadded:: 4.4

The ``getPublicDir()`` method was introduced in Symfony 4.4.

Learn more
----------

Expand Down