Skip to content

Adding check for environments #10239

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
Sep 5, 2018
Merged

Conversation

cryptiklemur
Copy link
Contributor

Wasn't sure the best way to change these, but basically, the @profiler service (as I understand it) won't exist unless in dev or test by default. The example should allow for null to be passed for the profiler, and do nothing if it is null.

@@ -37,13 +40,13 @@ create an alias pointing to the existing ``profiler`` service:

.. code-block:: yaml

# config/services.yaml
# config/dev/services.yaml
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be config/services_dev.yaml instead?

@xabbuh xabbuh added this to the 4.1 milestone Sep 3, 2018
@javiereguiluz javiereguiluz merged commit 8f91078 into symfony:4.1 Sep 5, 2018
javiereguiluz added a commit that referenced this pull request Sep 5, 2018
This PR was merged into the 4.1 branch.

Discussion
----------

Adding check for environments

Wasn't sure the best way to change these, but basically, the `@profiler` service (as I understand it) won't exist unless in `dev` or `test` by default. The example should allow for `null` to be passed for the profiler, and do nothing if it is null.

Commits
-------

8f91078 Adding check for environments
@javiereguiluz
Copy link
Member

@aequasi thanks for improving this article to show the entire code needed to make it work.

@cryptiklemur cryptiklemur deleted the patch-2 branch September 5, 2018 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants