Skip to content

Commit 808956d

Browse files
committed
Removing all "Sensio" namespace references to "Acme" so that we're consistent across the board
The Sensio namespace is legitimately used in the standard distribution, meaning if you try to start playing around with with the standard distribution using using the Sensio namespace, you'll have extra autoloading difficulties
1 parent 2ededbb commit 808956d

File tree

17 files changed

+162
-162
lines changed

17 files changed

+162
-162
lines changed

book/bundles.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ Here are some valid bundle namespaces and class names:
3737
=================================== ==============================
3838
Namespace Bundle Class Name
3939
=================================== ==============================
40-
``Sensio\Bundle\BlogBundle`` ``SensioBlogBundle``
41-
``Sensio\Bundle\Social\BlogBundle`` ``SensioSocialBlogBundle``
42-
``Sensio\BlogBundle`` ``SensioBlogBundle``
40+
``Acme\Bundle\BlogBundle`` ``AcmeBlogBundle``
41+
``Acme\Bundle\Social\BlogBundle`` ``AcmeSocialBlogBundle``
42+
``Acme\BlogBundle`` ``AcmeBlogBundle``
4343
=================================== ==============================
4444

4545
By convention, the ``getName()`` method of the bundle class should return the
@@ -48,7 +48,7 @@ class name.
4848
.. note::
4949

5050
If you share your bundle publicly, you must use the bundle class name as
51-
the name of the repository (``SensioBlogBundle`` and not ``BlogBundle``
51+
the name of the repository (``AcmeBlogBundle`` and not ``BlogBundle``
5252
for instance).
5353

5454
Directory Structure
@@ -203,8 +203,8 @@ using the Symfony2 built-in mechanisms.
203203
For simple configuration settings, rely on the default ``parameters`` entry of
204204
the Symfony2 configuration. Symfony2 parameters are simple key/value pairs; a
205205
value being any valid PHP value. Each parameter name must start with a
206-
lower-cased version of the bundle name (``hello`` for ``HelloBundle``, or
207-
``sensio.social.blog`` for ``Sensio\Social\BlogBundle`` for instance).
206+
lower-cased version of the bundle name (``acme.hello`` for ``AcmeHelloBundle``,
207+
or ``sensio.social.blog`` for ``Acme\Social\BlogBundle`` for instance).
208208

209209
The end user can provide values in any configuration file:
210210

book/controller.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ object. Controllers are also called *actions*.
8181

8282
.. code-block:: php
8383
84-
// src/Sensio/HelloBundle/Controller/HelloController.php
84+
// src/Acme/HelloBundle/Controller/HelloController.php
8585
86-
namespace Sensio\HelloBundle\Controller;
86+
namespace Acme\HelloBundle\Controller;
8787
use Symfony\Component\HttpFoundation\Response;
8888
8989
class HelloController
@@ -138,21 +138,21 @@ but let's create a simple route to our controller:
138138

139139
.. code-block:: yaml
140140
141-
# src/Sensio/HelloBundle/Resources/config/routing.yml
141+
# src/Acme/HelloBundle/Resources/config/routing.yml
142142
hello:
143143
pattern: /hello/{name}
144144
defaults: { _controller: Hello:Hello:index }
145145
146146
.. code-block:: xml
147147
148-
<!-- src/Sensio/HelloBundle/Resources/config/routing.xml -->
148+
<!-- src/Acme/HelloBundle/Resources/config/routing.xml -->
149149
<route id="hello" pattern="/hello/{name}">
150150
<default key="_controller">Hello:Hello:index</default>
151151
</route>
152152
153153
.. code-block:: php
154154
155-
// src/Sensio/HelloBundle/Resources/config/routing.php
155+
// src/Acme/HelloBundle/Resources/config/routing.php
156156
$collection->add('hello', new Route('/hello/{name}', array(
157157
'_controller' => 'Hello:Hello:index',
158158
)));
@@ -195,9 +195,9 @@ passed to that method:
195195
.. code-block:: php
196196
197197
<?php
198-
// src/Sensio/HelloBundle/Controller/HelloController.php
198+
// src/Acme/HelloBundle/Controller/HelloController.php
199199
200-
namespace Sensio\HelloBundle\Controller;
200+
namespace Acme\HelloBundle\Controller;
201201
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
202202
203203
class HelloController extends Controller
@@ -218,22 +218,22 @@ example:
218218

219219
.. code-block:: yaml
220220
221-
# src/Sensio/HelloBundle/Resources/config/routing.yml
221+
# src/Acme/HelloBundle/Resources/config/routing.yml
222222
hello:
223223
pattern: /hello/{first_name}/{last_name}
224224
defaults: { _controller: Hello:Hello:index, color: green }
225225
226226
.. code-block:: xml
227227
228-
<!-- src/Sensio/HelloBundle/Resources/config/routing.xml -->
228+
<!-- src/Acme/HelloBundle/Resources/config/routing.xml -->
229229
<route id="hello" pattern="/hello/{first_name}/{last_name}">
230230
<default key="_controller">Hello:Hello:index</default>
231231
<default key="color">green</default>
232232
</route>
233233
234234
.. code-block:: php
235235
236-
// src/Sensio/HelloBundle/Resources/config/routing.php
236+
// src/Acme/HelloBundle/Resources/config/routing.php
237237
$collection->add('hello', new Route('/hello/{first_name}/{last_name}', array(
238238
'_controller' => 'Hello:Hello:index',
239239
'color' => 'green',
@@ -320,9 +320,9 @@ Add the ``use`` statement atop the ``Controller`` class and then modify the
320320

321321
.. code-block:: php
322322
323-
// src/Sensio/HelloBundle/Controller/HelloController.php
323+
// src/Acme/HelloBundle/Controller/HelloController.php
324324
325-
namespace Sensio\HelloBundle\Controller;
325+
namespace Acme\HelloBundle\Controller;
326326
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
327327
use Symfony\Component\HttpFoundation\Response;
328328

book/doctrine/mongodb-odm/configuration.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ can control. The following configuration options exist for a mapping:
9393
share. This prefix should never conflict with prefixes of other defined
9494
mappings otherwise some of your documents cannot be found by Doctrine. This
9595
option defaults to the bundle namespace + ``Document``, for example for an
96-
application bundle called "HelloBundle" prefix would be
97-
``Sensio\HelloBundle\Document``.
96+
application bundle called ``AcmeHelloBundle``, the prefix would be
97+
``Acme\HelloBundle\Document``.
9898
- ``alias`` Doctrine offers a way to alias document namespaces to simpler,
9999
shorter names to be used in queries or for Repository access.
100100
- ``is_bundle`` This option is a derived value from ``dir`` and by default is
@@ -107,7 +107,7 @@ To avoid having to configure lots of information for your mappings you should
107107
follow these conventions:
108108

109109
1. Put all your entities in a directory ``Document/`` inside your bundle. For
110-
example ``Sensio/HelloBundle/Document/``.
110+
example ``Acme/HelloBundle/Document/``.
111111
2. If you are using xml, yml or php mapping put all your configuration files
112112
into the ``Resources/config/doctrine/metadata/doctrine/mongodb/`` directory
113113
suffixed with dcm.xml, dcm.yml or dcm.php respectively.
@@ -244,9 +244,9 @@ First, let's write a simple User class.
244244

245245
.. code-block:: php
246246
247-
// src/Sensio/HelloBundle/Document/User.php
247+
// src/Acme/HelloBundle/Document/User.php
248248
249-
namespace Sensio\HelloBundle\Document;
249+
namespace Acme\HelloBundle\Document;
250250
251251
class User
252252
{

book/doctrine/mongodb-odm/overview.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ yaml.
3333

3434
.. code-block:: php-annotations
3535
36-
// Sensio/HelloBundle/Document/User.php
36+
// Acme/HelloBundle/Document/User.php
3737
38-
namespace Sensio\HelloBundle\Document;
38+
namespace Acme\HelloBundle\Document;
3939
4040
/**
4141
* @mongodb:Document(collection="users")
@@ -85,8 +85,8 @@ yaml.
8585
8686
.. code-block:: yaml
8787
88-
# Sensio/HelloBundle/Resources/config/doctrine/metadata/mongodb/Sensio.HelloBundle.Document.User.dcm.yml
89-
Sensio\HelloBundle\Document\User:
88+
# Acme/HelloBundle/Resources/config/doctrine/metadata/mongodb/Acme.HelloBundle.Document.User.dcm.yml
89+
Acme\HelloBundle\Document\User:
9090
type: document
9191
collection: user
9292
fields:
@@ -98,13 +98,13 @@ yaml.
9898
9999
.. code-block:: xml
100100
101-
<!-- Sensio/HelloBundle/Resources/config/doctrine/metadata/mongodb/Sensio.HelloBundle.Document.User.dcm.xml -->
101+
<!-- Acme/HelloBundle/Resources/config/doctrine/metadata/mongodb/Acme.HelloBundle.Document.User.dcm.xml -->
102102
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
103103
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
104104
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
105105
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
106106
107-
<document name="Sensio\HelloBundle\Document\User" collection="user">
107+
<document name="Acme\HelloBundle\Document\User" collection="user">
108108
<field name="id" id="true" />
109109
<field name="name" type="string" length="255" />
110110
</document>
@@ -126,7 +126,7 @@ Now, use your document and manage its persistent state with Doctrine:
126126

127127
.. code-block:: php
128128
129-
use Sensio\HelloBundle\Document\User;
129+
use Acme\HelloBundle\Document\User;
130130
131131
class UserController extends Controller
132132
{

book/doctrine/orm/configuration.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ can control. The following configuration options exist for a mapping:
8080
share. This prefix should never conflict with prefixes of other defined
8181
mappings otherwise some of your entities cannot be found by Doctrine. This
8282
option defaults to the bundle namespace + ``Entity``, for example for an
83-
application bundle called "HelloBundle" prefix would be
84-
``Sensio\HelloBundle\Entity``.
83+
application bundle called ``AcmeHelloBundle`` prefix would be
84+
``Acme\HelloBundle\Entity``.
8585
- ``alias`` Doctrine offers a way to alias entity namespaces to simpler,
8686
shorter names to be used in DQL queries or for Repository access. When using a
8787
bundle the alias defaults to the bundle name.
@@ -95,7 +95,7 @@ To avoid having to configure lots of information for your mappings you should
9595
follow these conventions:
9696

9797
1. Put all your entities in a directory ``Entity/`` inside your bundle. For
98-
example ``Sensio/HelloBundle/Entity/``.
98+
example ``Acme/HelloBundle/Entity/``.
9999
2. If you are using xml, yml or php mapping put all your configuration files
100100
into the "Resources/config/doctrine/metadata/doctrine/orm/" directory
101101
suffixed with dcm.xml, dcm.yml or dcm.php respectively.

book/doctrine/orm/form.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ choices from which an entity can be selected.
1717
1818
$field = new EntityChoiceField('users', array(
1919
'em' => $em,
20-
'class' => 'Sensio\\HelloBundle\\Entity\\User',
20+
'class' => 'Acme\\HelloBundle\\Entity\\User',
2121
'property' => 'username',
2222
'query_builder' => $qb,
2323
));

book/doctrine/orm/overview.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ any PHP class:
5959

6060
.. code-block:: php
6161
62-
// Sensio/HelloBundle/Entity/User.php
63-
namespace Sensio\HelloBundle\Entity;
62+
// Acme/HelloBundle/Entity/User.php
63+
namespace Acme\HelloBundle\Entity;
6464
6565
class User
6666
{
@@ -97,8 +97,8 @@ write mapping information with annotations, XML, or YAML:
9797

9898
.. code-block:: php-annotations
9999
100-
// Sensio/HelloBundle/Entity/User.php
101-
namespace Sensio\HelloBundle\Entity;
100+
// Acme/HelloBundle/Entity/User.php
101+
namespace Acme\HelloBundle\Entity;
102102
103103
/**
104104
* @orm:Entity
@@ -120,8 +120,8 @@ write mapping information with annotations, XML, or YAML:
120120
121121
.. code-block:: yaml
122122
123-
# Sensio/HelloBundle/Resources/config/doctrine/metadata/orm/Sensio.HelloBundle.Entity.User.dcm.yml
124-
Sensio\HelloBundle\Entity\User:
123+
# Acme/HelloBundle/Resources/config/doctrine/metadata/orm/Acme.HelloBundle.Entity.User.dcm.yml
124+
Acme\HelloBundle\Entity\User:
125125
type: entity
126126
table: user
127127
id:
@@ -136,13 +136,13 @@ write mapping information with annotations, XML, or YAML:
136136
137137
.. code-block:: xml
138138
139-
<!-- Sensio/HelloBundle/Resources/config/doctrine/metadata/orm/Sensio.HelloBundle.Entity.User.dcm.xml -->
139+
<!-- Acme/HelloBundle/Resources/config/doctrine/metadata/orm/Acme.HelloBundle.Entity.User.dcm.xml -->
140140
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
141141
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
142142
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
143143
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
144144
145-
<entity name="Sensio\HelloBundle\Entity\User" table="user">
145+
<entity name="Acme\HelloBundle\Entity\User" table="user">
146146
<id name="id" type="integer" column="id">
147147
<generator strategy="AUTO"/>
148148
</id>
@@ -174,10 +174,10 @@ Eventually, use your entity and manage its persistent state with Doctrine:
174174

175175
.. code-block:: php
176176
177-
// Sensio/HelloBundle/Controller/UserController.php
178-
namespace Sensio\HelloBundle\Controller;
177+
// Acme/HelloBundle/Controller/UserController.php
178+
namespace Acme\HelloBundle\Controller;
179179
180-
use Sensio\HelloBundle\Entity\User;
180+
use Acme\HelloBundle\Entity\User;
181181
182182
class UserController extends Controller
183183
{
@@ -222,7 +222,7 @@ entity:
222222

223223
.. code-block:: php
224224
225-
namespace Sensio\HelloBundle\Entity;
225+
namespace Acme\HelloBundle\Entity;
226226
227227
/** @orm:Entity */
228228
class User

0 commit comments

Comments
 (0)