Laravel 5.6 updates
Travis config update Removed HHVM script as Laravel no longer support HHVM after releasing 5.3
This commit is contained in:
@@ -63,7 +63,7 @@ abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRendere
|
||||
{
|
||||
if (!$this->surrogate || !$this->surrogate->hasSurrogateCapability($request)) {
|
||||
if ($uri instanceof ControllerReference && $this->containsNonScalars($uri->attributes)) {
|
||||
@trigger_error('Passing non-scalar values as part of URI attributes to the ESI and SSI rendering strategies is deprecated since Symfony 3.1, and will be removed in 4.0. Use a different rendering strategy or pass scalar values.', E_USER_DEPRECATED);
|
||||
throw new \InvalidArgumentException('Passing non-scalar values as part of URI attributes to the ESI and SSI rendering strategies is not supported. Use a different rendering strategy or pass scalar values.');
|
||||
}
|
||||
|
||||
return $this->inlineStrategy->render($uri, $request, $options);
|
||||
@@ -83,7 +83,7 @@ abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRendere
|
||||
return new Response($tag);
|
||||
}
|
||||
|
||||
private function generateSignedFragmentUri($uri, Request $request)
|
||||
private function generateSignedFragmentUri($uri, Request $request): string
|
||||
{
|
||||
if (null === $this->signer) {
|
||||
throw new \LogicException('You must use a URI when using the ESI rendering strategy or set a URL signer.');
|
||||
@@ -95,7 +95,7 @@ abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRendere
|
||||
return substr($fragmentUri, \strlen($request->getSchemeAndHttpHost()));
|
||||
}
|
||||
|
||||
private function containsNonScalars(array $values)
|
||||
private function containsNonScalars(array $values): bool
|
||||
{
|
||||
foreach ($values as $value) {
|
||||
if (\is_array($value)) {
|
||||
|
@@ -37,7 +37,7 @@ class FragmentHandler
|
||||
* @param FragmentRendererInterface[] $renderers An array of FragmentRendererInterface instances
|
||||
* @param bool $debug Whether the debug mode is enabled or not
|
||||
*/
|
||||
public function __construct(RequestStack $requestStack, array $renderers = array(), $debug = false)
|
||||
public function __construct(RequestStack $requestStack, array $renderers = array(), bool $debug = false)
|
||||
{
|
||||
$this->requestStack = $requestStack;
|
||||
foreach ($renderers as $renderer) {
|
||||
|
@@ -38,7 +38,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
|
||||
* @param string $globalDefaultTemplate The global default content (it can be a template name or the content)
|
||||
* @param string $charset
|
||||
*/
|
||||
public function __construct($templating = null, UriSigner $signer = null, $globalDefaultTemplate = null, $charset = 'utf-8')
|
||||
public function __construct($templating = null, UriSigner $signer = null, string $globalDefaultTemplate = null, string $charset = 'utf-8')
|
||||
{
|
||||
$this->setTemplating($templating);
|
||||
$this->globalDefaultTemplate = $globalDefaultTemplate;
|
||||
@@ -121,12 +121,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
|
||||
return new Response(sprintf('<hx:include src="%s"%s>%s</hx:include>', $uri, $renderedAttributes, $content));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $template
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function templateExists($template)
|
||||
private function templateExists(string $template): bool
|
||||
{
|
||||
if ($this->templating instanceof EngineInterface) {
|
||||
try {
|
||||
|
@@ -118,9 +118,12 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer
|
||||
$subRequest->headers->set('Surrogate-Capability', $request->headers->get('Surrogate-Capability'));
|
||||
}
|
||||
|
||||
if ($session = $request->getSession()) {
|
||||
$subRequest->setSession($session);
|
||||
static $setSession;
|
||||
|
||||
if (null === $setSession) {
|
||||
$setSession = \Closure::bind(function ($subRequest, $request) { $subRequest->session = $request->session; }, null, Request::class);
|
||||
}
|
||||
$setSession($subRequest, $request);
|
||||
|
||||
return $subRequest;
|
||||
}
|
||||
|
Reference in New Issue
Block a user