updated core and modules

This commit is contained in:
Bachir Soussi Chiadmi
2017-09-09 16:27:51 +02:00
parent 027aa99b32
commit 41863f872c
7810 changed files with 318922 additions and 83631 deletions
+8 -3
View File
@@ -11,6 +11,7 @@
namespace Symfony\Component\HttpKernel\Profiler;
use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface;
@@ -77,7 +78,7 @@ class Profiler
*
* @param Response $response A Response instance
*
* @return Profile A Profile instance
* @return Profile|false A Profile instance
*/
public function loadProfileFromResponse(Response $response)
{
@@ -152,7 +153,7 @@ class Profiler
*
* @param string $data A data string as exported by the export() method
*
* @return Profile A Profile instance
* @return Profile|false A Profile instance
*
* @deprecated since Symfony 2.8, to be removed in 3.0.
*/
@@ -208,9 +209,13 @@ class Profiler
$profile = new Profile(substr(hash('sha256', uniqid(mt_rand(), true)), 0, 6));
$profile->setTime(time());
$profile->setUrl($request->getUri());
$profile->setIp($request->getClientIp());
$profile->setMethod($request->getMethod());
$profile->setStatusCode($response->getStatusCode());
try {
$profile->setIp($request->getClientIp());
} catch (ConflictingHeadersException $e) {
$profile->setIp('Unknown');
}
$response->headers->set('X-Debug-Token', $profile->getToken());