Skip to content

Make it clear that the profiler is for dev only #28572

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 24, 2018
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions src/Symfony/Bundle/WebProfilerBundle/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
WebProfilerBundle
=================

The Web profiler bundle is a **development tool** that gives detailed
Copy link
Member

Choose a reason for hiding this comment

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

should we add this message on branch 2.8 also?

Copy link
Member Author

Choose a reason for hiding this comment

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

see #28575

information about the execution of any request.

**Never** enable it on production servers as it will lead to major security
vulnerabilities in your project.

Resources
---------

Expand Down
8 changes: 6 additions & 2 deletions src/Symfony/Bundle/WebProfilerBundle/WebProfilerBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@
use Symfony\Component\HttpKernel\Bundle\Bundle;

/**
* Bundle.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class WebProfilerBundle extends Bundle
{
public function boot()
{
if ('prod' === $this->container->getParameter('kernel.environment')) {
@trigger_error('Using WebProfilerBundle in production is not supported and puts your project at risk, disable it.', E_USER_WARNING);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
/**
* ProfilerStorageInterface.
*
* This interface exists for historical reasons. The only supported
* implementation is FileProfilerStorage.
*
* As the profiler must only be used on non-production servers, the file storage
* is more than enough and no other implementations will ever be supported.
*
* @internal since 4.2
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface ProfilerStorageInterface
Expand Down