Skip to content

Some fixes for bundle best practices #5312

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
Aug 8, 2015
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
5 changes: 3 additions & 2 deletions cookbook/bundles/best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class name is ``Acme\BlogBundle\Controller\ContentController``.
All classes and files must follow the :doc:`Symfony coding standards </contributing/code/standards>`.

Some classes should be seen as facades and should be as short as possible, like
Commands, Helpers, Listeners, and Controllers.
Commands, Helpers, Listeners and Controllers.

Classes that connect to the event dispatcher should be suffixed with
``Listener``.
Expand All @@ -159,7 +159,7 @@ Vendors
A bundle must not embed third-party PHP libraries. It should rely on the
standard Symfony autoloading instead.

A bundle should not embed third-party libraries written in JavaScript, CSS, or
A bundle should not embed third-party libraries written in JavaScript, CSS or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this recommendation we tell the developer what not to do, but we don't provide neither reasons nor alternatives. In the previous paragraph we say: "don't embed PHP libraries ... but use Symfony autoloading instead". Maybe we could add a short phrase like: "Use Grunt or XXX to manage those front-end dependencies."

any other language.

Tests
Expand All @@ -175,6 +175,7 @@ the ``Tests/`` directory. Tests should follow the following principles:
* The tests should cover at least 95% of the code base.

.. note::

A test suite must not contain ``AllTests.php`` scripts, but must rely on the
existence of a ``phpunit.xml.dist`` file.

Expand Down