feature #28572 Make it clear that the profiler is for dev only (fabpot)

This PR was merged into the 4.2-dev branch.

Discussion
----------

Make it clear that the profiler is for dev only

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | kinda yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes (permanent one)
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | symfony/symfony-docs#10386

Commits
-------

54fda55fd9 made it clear that the profiler is for dev only
This commit is contained in:
Fabien Potencier 2018-09-24 13:27:51 +02:00
commit 3d2124e128
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