Skip to content

Commit d3c8a76

Browse files
committed
Rename AcmeTestBundle in AcmeBlogBundle
1 parent 31d958c commit d3c8a76

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

bundles.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@ Creating a Bundle
4040
-----------------
4141

4242
This section creates and enables a new bundle to show there are only a few steps required.
43-
The new bundle is called AcmeTestBundle, where the ``Acme`` portion is an example
43+
The new bundle is called AcmeBlogBundle, where the ``Acme`` portion is an example
4444
name that should be replaced by some "vendor" name that represents you or your
45-
organization (e.g. AbcTestBundle for some company named ``Abc``).
45+
organization (e.g. AbcBlogBundle for some company named ``Abc``).
4646

47-
Start by creating a new class called ``AcmeTestBundle``::
47+
Start by creating a new class called ``AcmeBlogBundle``::
4848

49-
// src/AcmeTestBundle.php
50-
namespace Acme\TestBundle;
49+
// src/AcmeBlogBundle.php
50+
namespace Acme\BlogBundle;
5151

5252
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
5353

54-
class AcmeTestBundle extends AbstractBundle
54+
class AcmeBlogBundle extends AbstractBundle
5555
{
5656
}
5757

@@ -67,10 +67,10 @@ Start by creating a new class called ``AcmeTestBundle``::
6767

6868
.. tip::
6969

70-
The name AcmeTestBundle follows the standard
70+
The name AcmeBlogBundle follows the standard
7171
:ref:`Bundle naming conventions <bundles-naming-conventions>`. You could
72-
also choose to shorten the name of the bundle to simply TestBundle by naming
73-
this class TestBundle (and naming the file ``TestBundle.php``).
72+
also choose to shorten the name of the bundle to simply BlogBundle by naming
73+
this class BlogBundle (and naming the file ``BlogBundle.php``).
7474

7575
This empty class is the only piece you need to create the new bundle. Though
7676
commonly empty, this class is powerful and can be used to customize the behavior
@@ -79,10 +79,10 @@ of the bundle. Now that you've created the bundle, enable it::
7979
// config/bundles.php
8080
return [
8181
// ...
82-
Acme\TestBundle\AcmeTestBundle::class => ['all' => true],
82+
Acme\BlogBundle\AcmeBlogBundle::class => ['all' => true],
8383
];
8484

85-
And while it doesn't do anything yet, AcmeTestBundle is now ready to be used.
85+
And while it doesn't do anything yet, AcmeBlogBundle is now ready to be used.
8686

8787
Bundle Directory Structure
8888
--------------------------
@@ -101,7 +101,7 @@ to be adjusted if needed:
101101
Holds templates organized by controller name (e.g. ``random/index.html.twig``).
102102

103103
``translations/``
104-
Holds translations organized by domain and locale (e.g. ``AcmeTestBundle.en.xlf``).
104+
Holds translations organized by domain and locale (e.g. ``AcmeBlogBundle.en.xlf``).
105105

106106
``public/``
107107
Contains web assets (images, compiled CSS and JavaScript files, etc.) and is
@@ -126,7 +126,7 @@ to be adjusted if needed:
126126
new structure. Override the ``Bundle::getPath()`` method to change to
127127
the old structure::
128128

129-
class AcmeTestBundle extends AbstractBundle
129+
class AcmeBlogBundle extends AbstractBundle
130130
{
131131
public function getPath(): string
132132
{
@@ -145,12 +145,12 @@ to be adjusted if needed:
145145
{
146146
"autoload": {
147147
"psr-4": {
148-
"Acme\\TestBundle\\": "src/"
148+
"Acme\\BlogBundle\\": "src/"
149149
}
150150
},
151151
"autoload-dev": {
152152
"psr-4": {
153-
"Acme\\TestBundle\\Tests\\": "tests/"
153+
"Acme\\BlogBundle\\Tests\\": "tests/"
154154
}
155155
}
156156
}

0 commit comments

Comments
 (0)