@@ -31,7 +31,7 @@ Bundle Name
3131A bundle is also a PHP namespace. The namespace must follow the `PSR-0 `_ or
3232`PSR-4 `_ interoperability standards for PHP namespaces and class names: it starts
3333with a vendor segment, followed by zero or more category segments, and it ends
34- with the namespace short name, which must end with a ``Bundle `` suffix .
34+ with the namespace short name, which must end with ``Bundle ``.
3535
3636A namespace becomes a bundle as soon as you add a bundle class to it. The
3737bundle class name must follow these simple rules:
@@ -48,8 +48,8 @@ Here are some valid bundle namespaces and class names:
4848========================== ==================
4949Namespace Bundle Class Name
5050========================== ==================
51- ``Acme\Bundle\BlogBundle `` `` AcmeBlogBundle ``
52- ``Acme\BlogBundle `` `` AcmeBlogBundle ``
51+ ``Acme\Bundle\BlogBundle `` AcmeBlogBundle
52+ ``Acme\BlogBundle `` AcmeBlogBundle
5353========================== ==================
5454
5555By convention, the ``getName() `` method of the bundle class should return the
@@ -58,8 +58,7 @@ class name.
5858.. note ::
5959
6060 If you share your bundle publicly, you must use the bundle class name as
61- the name of the repository (``AcmeBlogBundle `` and not ``BlogBundle ``
62- for instance).
61+ the name of the repository (AcmeBlogBundle and not BlogBundle for instance).
6362
6463.. note ::
6564
@@ -68,7 +67,7 @@ class name.
6867 :class: `Symfony\\ Bundle\\ FrameworkBundle\\ FrameworkBundle `.
6968
7069Each bundle has an alias, which is the lower-cased short version of the bundle
71- name using underscores (``acme_blog `` for `` AcmeBlogBundle `` ). This alias
70+ name using underscores (``acme_blog `` for AcmeBlogBundle). This alias
7271is used to enforce uniqueness within a project and for defining bundle's
7372configuration options (see below for some usage examples).
7473
@@ -105,8 +104,8 @@ that automated tools can rely on:
105104 bundles are published under the MIT license, but you can `choose any license `_;
106105* ``Resources/doc/index.rst ``: The root file for the Bundle documentation.
107106
108- The depth of sub-directories should be kept to the minimum for most used
109- classes and files (two levels maximum) .
107+ The depth of subdirectories should be kept to a minimum for the most used
108+ classes and files. Two levels is the maximum.
110109
111110The bundle directory is read-only. If you need to write temporary files, store
112111them under the ``cache/ `` or ``log/ `` directory of the host application. Tools
@@ -138,9 +137,9 @@ Classes
138137-------
139138
140139The bundle directory structure is used as the namespace hierarchy. For
141- instance, a ``ContentController `` controller is stored in
142- ``Acme/BlogBundle/Controller/ContentController.php `` and the fully qualified
143- class name is ``Acme\BlogBundle\Controller\ContentController ``.
140+ instance, a ``ContentController `` controller which is stored in
141+ ``Acme/BlogBundle/Controller/ContentController.php `` would have the fully
142+ qualified class name of ``Acme\BlogBundle\Controller\ContentController ``.
144143
145144All classes and files must follow the :doc: `Symfony coding standards </contributing/code/standards >`.
146145
@@ -158,8 +157,8 @@ Vendors
158157A bundle must not embed third-party PHP libraries. It should rely on the
159158standard Symfony autoloading instead.
160159
161- A bundle should not embed third-party libraries written in JavaScript, CSS or
162- any other language.
160+ A bundle should also not embed third-party libraries written in JavaScript,
161+ CSS or any other language.
163162
164163Tests
165164-----
@@ -183,10 +182,13 @@ Documentation
183182
184183All classes and functions must come with full PHPDoc.
185184
186- Extensive documentation should also be provided in the
187- :doc: `reStructuredText </contributing/documentation/format >` format, under
188- the ``Resources/doc/ `` directory; the ``Resources/doc/index.rst `` file is
189- the only mandatory file and must be the entry point for the documentation.
185+ Extensive documentation should also be provided in the ``Resources/doc/ ``
186+ directory.
187+ The index file (for example ``Resources/doc/index.rst `` or
188+ ``Resources/doc/index.md ``) is the only mandatory file and must be the entry
189+ point for the documentation. The
190+ :doc: `reStructuredText (rST) </contributing/documentation/format >` is the format
191+ used to render the documentation on symfony.com.
190192
191193Installation Instructions
192194~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -232,7 +234,6 @@ following standardized instructions in your ``README.md`` file.
232234 {
233235 $bundles = array(
234236 // ...
235-
236237 new <vendor>\<bundle-name>\<bundle-long-name>(),
237238 );
238239
@@ -399,9 +400,9 @@ The ``composer.json`` file should include at least the following metadata:
399400``name ``
400401 Consists of the vendor and the short bundle name. If you are releasing the
401402 bundle on your own instead of on behalf of a company, use your personal name
402- (e.g. ``johnsmith/blog-bundle ``). The bundle short name excludes the vendor
403- name and separates each word with an hyphen. For example: `` AcmeBlogBundle ``
404- is transformed into ``blog-bundle `` and `` AcmeSocialConnectBundle `` is
403+ (e.g. ``johnsmith/blog-bundle ``). Exclude the vendor name from the bundle
404+ short name and separate each word with an hyphen. For example: AcmeBlogBundle
405+ is transformed into ``blog-bundle `` and AcmeSocialConnectBundle is
405406 transformed into ``social-connect-bundle ``.
406407
407408``description ``
@@ -411,8 +412,7 @@ The ``composer.json`` file should include at least the following metadata:
411412 Use the ``symfony-bundle `` value.
412413
413414``license ``
414- ``MIT `` is the preferred license for Symfony bundles, but you can use any
415- other license.
415+ a string (or array of strings) with a `valid license identifier `_, such as ``MIT ``.
416416
417417``autoload ``
418418 This information is used by Symfony to load the classes of the bundle. The
@@ -497,3 +497,4 @@ Learn more
497497.. _`Semantic Versioning Standard` : http://semver.org/
498498.. _`Packagist` : https://packagist.org/
499499.. _`choose any license` : http://choosealicense.com/
500+ .. _`valid license identifier` : https://spdx.org/licenses/
0 commit comments