made it clear that the profiler is for dev only

This commit is contained in:
Fabien Potencier 2018-09-24 08:25:08 +02:00
parent 31f8cb9706
commit 54fda55fd9
3 changed files with 20 additions and 2 deletions

View File

@ -1,6 +1,12 @@
WebProfilerBundle
=================
The Web profiler bundle is a **development tool** that gives detailed
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
---------

View File

@ -14,10 +14,14 @@ namespace Symfony\Bundle\WebProfilerBundle;
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);
}
}
}

View File

@ -14,6 +14,14 @@ namespace Symfony\Component\HttpKernel\Profiler;
/**
* 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