Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Updated the Best Practices for Symfony 4 and Flex #8599

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 4 commits into from
Nov 12, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Fixed after Fabien's review
  • Loading branch information
javiereguiluz committed Nov 10, 2017
commit 335e461fe8800bb6a2c0ae99a8e49ee6e756b11d
13 changes: 5 additions & 8 deletions 13 best_practices/business-logic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ Services: Naming and Configuration
Use autowiring to automate the configuration of application services.

:doc:`Service autowiring </service_container/autowiring>` is a feature provided
by Symfony's Service Container to manage services with minimal configuration.
It reads the type-hints on your constructor (or other methods) and automatically
passes you the correct services. It can also add :doc:`service tags </service_container/tags>`
to the services needed them, such as Twig extensions, event subscribers, etc.
by Symfony's Service Container to manage services with minimal configuration. It
reads the type-hints on your constructor (or other methods) and automatically
passes the correct services to each method. It can also add
:doc:`service tags </service_container/tags>` to the services needed them, such
as Twig extensions, event subscribers, etc.

The blog application needs a utility that can transform a post title (e.g.
"Hello World") into a slug (e.g. "hello-world") to include it as part of the
Expand All @@ -61,10 +62,6 @@ If you're using the :ref:`default services.yaml configuration <service-container
this class is auto-registered as a service whose ID is ``App\Utils\Slugger`` (or
simply ``Slugger::class`` if the class is already imported in your code).

Traditionally, the naming convention for a service was a short, but unique
snake case key - e.g. ``app.utils.slugger``. But for most services, you should now
use the class name.

.. best-practice::

The id of your application's services should be equal to their class name,
Expand Down
8 changes: 4 additions & 4 deletions 8 best_practices/creating-the-project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Installing Symfony

Use Composer and Symfony Flex to create and manage Symfony applications.

`Composer`_ is the package manager used by modern PHP application to manage their
dependencies. `Symfony Flex`_ is a Composer plugin designed to automatize some
of the most common tasks performed in Symfony applications. Using Flex is optional
but recommended because it improves your productivity significantly.
`Composer`_ is the package manager used by modern PHP application to manage
their dependencies. `Symfony Flex`_ is a Composer plugin designed to automate
some of the most common tasks performed in Symfony applications. Using Flex is
optional but recommended because it improves your productivity significantly.

.. best-practice::

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.