Symfony Exception

InvalidArgumentException

HTTP 500 Internal Server Error

Please provide a valid cache path.

Exception

InvalidArgumentException

  1. $shouldCache = true,
  2. $compiledExtension = 'php',
  3. $shouldCheckTimestamps = true,
  4. ) {
  5. if (! $cachePath) {
  6. throw new InvalidArgumentException('Please provide a valid cache path.');
  7. }
  8. $this->files = $files;
  9. $this->cachePath = $cachePath;
  10. $this->basePath = $basePath;
  1. * @return void
  2. */
  3. public function registerBladeCompiler()
  4. {
  5. $this->app->singleton('blade.compiler', function ($app) {
  6. return tap(new BladeCompiler(
  7. $app['files'],
  8. $app['config']['view.compiled'],
  9. $app['config']->get('view.relative_hash', false) ? $app->basePath() : '',
  10. $app['config']->get('view.cache', true),
  11. $app['config']->get('view.compiled_extension', 'php'),
  1. // used as resolvers for more fine-tuned resolution of these objects.
  2. if ($concrete instanceof Closure) {
  3. $this->buildStack[] = spl_object_hash($concrete);
  4. try {
  5. return $concrete($this, $this->getLastParameterOverride());
  6. } finally {
  7. array_pop($this->buildStack);
  8. }
  9. }
  1. // We're ready to instantiate an instance of the concrete type registered for
  2. // the binding. This will instantiate the types, as well as resolve any of
  3. // its "nested" dependencies recursively until all have gotten resolved.
  4. $object = $this->isBuildable($concrete, $abstract)
  5. ? $this->build($concrete)
  6. : $this->make($concrete);
  7. // If we defined any extenders for this type, we'll need to spin through them
  8. // and apply them to the object being built. This allows for the extension
  9. // of services, such as changing configuration or decorating the object.
  1. */
  2. protected function resolve($abstract, $parameters = [], $raiseEvents = true)
  3. {
  4. $this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract));
  5. return parent::resolve($abstract, $parameters, $raiseEvents);
  6. }
  7. /**
  8. * Load the deferred provider if the given type is a deferred service and the instance has not been loaded.
  9. *
  1. *
  2. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  3. */
  4. public function make($abstract, array $parameters = [])
  5. {
  6. return $this->resolve($abstract, $parameters);
  7. }
  8. /**
  9. * {@inheritdoc}
  10. *
  1. */
  2. public function make($abstract, array $parameters = [])
  3. {
  4. $this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract));
  5. return parent::make($abstract, $parameters);
  6. }
  7. /**
  8. * Resolve the given type from the container.
  9. *
  1. }
  2. try {
  3. return $parameter->isVariadic()
  4. ? $this->resolveVariadicClass($parameter)
  5. : $this->make($className);
  6. }
  7. // If we can not resolve the class instance, we will check to see if the value
  8. // is variadic. If it is, we will return an empty array as the value of the
  9. // dependency similarly to how we handle scalar values in this situation.
  1. // If the class is null, it means the dependency is a string or some other
  2. // primitive type which we can not resolve since it is not a class and
  3. // we will just bomb out with an error since we have no-where to go.
  4. $result ??= is_null(Util::getParameterClassName($dependency))
  5. ? $this->resolvePrimitive($dependency)
  6. : $this->resolveClass($dependency);
  7. $this->fireAfterResolvingAttributeCallbacks($dependency->getAttributes(), $result);
  8. if ($dependency->isVariadic()) {
  9. $results = array_merge($results, $result);
  1. // Once we have all the constructor's parameters we can create each of the
  2. // dependency instances and then use the reflection instances to make a
  3. // new instance of this class, injecting the created dependencies in.
  4. try {
  5. $instances = $this->resolveDependencies($dependencies);
  6. } catch (BindingResolutionException $e) {
  7. array_pop($this->buildStack);
  8. throw $e;
  9. }
  1. // We're ready to instantiate an instance of the concrete type registered for
  2. // the binding. This will instantiate the types, as well as resolve any of
  3. // its "nested" dependencies recursively until all have gotten resolved.
  4. $object = $this->isBuildable($concrete, $abstract)
  5. ? $this->build($concrete)
  6. : $this->make($concrete);
  7. // If we defined any extenders for this type, we'll need to spin through them
  8. // and apply them to the object being built. This allows for the extension
  9. // of services, such as changing configuration or decorating the object.
  1. */
  2. protected function resolve($abstract, $parameters = [], $raiseEvents = true)
  3. {
  4. $this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract));
  5. return parent::resolve($abstract, $parameters, $raiseEvents);
  6. }
  7. /**
  8. * Load the deferred provider if the given type is a deferred service and the instance has not been loaded.
  9. *
  1. *
  2. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  3. */
  4. public function make($abstract, array $parameters = [])
  5. {
  6. return $this->resolve($abstract, $parameters);
  7. }
  8. /**
  9. * {@inheritdoc}
  10. *
  1. */
  2. public function make($abstract, array $parameters = [])
  3. {
  4. $this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract));
  5. return parent::make($abstract, $parameters);
  6. }
  7. /**
  8. * Resolve the given type from the container.
  9. *
  1. return new Renderer(
  2. $app->make(Factory::class),
  3. $app->make(Listener::class),
  4. $errorRenderer,
  5. $app->make(BladeMapper::class),
  6. $app->basePath(),
  7. );
  8. });
  9. $this->app->singleton(Listener::class);
in /workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php -> Illuminate\Foundation\Providers\{closure} (line 1010)
  1. // used as resolvers for more fine-tuned resolution of these objects.
  2. if ($concrete instanceof Closure) {
  3. $this->buildStack[] = spl_object_hash($concrete);
  4. try {
  5. return $concrete($this, $this->getLastParameterOverride());
  6. } finally {
  7. array_pop($this->buildStack);
  8. }
  9. }
  1. // We're ready to instantiate an instance of the concrete type registered for
  2. // the binding. This will instantiate the types, as well as resolve any of
  3. // its "nested" dependencies recursively until all have gotten resolved.
  4. $object = $this->isBuildable($concrete, $abstract)
  5. ? $this->build($concrete)
  6. : $this->make($concrete);
  7. // If we defined any extenders for this type, we'll need to spin through them
  8. // and apply them to the object being built. This allows for the extension
  9. // of services, such as changing configuration or decorating the object.
  1. */
  2. protected function resolve($abstract, $parameters = [], $raiseEvents = true)
  3. {
  4. $this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract));
  5. return parent::resolve($abstract, $parameters, $raiseEvents);
  6. }
  7. /**
  8. * Load the deferred provider if the given type is a deferred service and the instance has not been loaded.
  9. *
  1. *
  2. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  3. */
  4. public function make($abstract, array $parameters = [])
  5. {
  6. return $this->resolve($abstract, $parameters);
  7. }
  8. /**
  9. * {@inheritdoc}
  10. *
  1. */
  2. public function make($abstract, array $parameters = [])
  3. {
  4. $this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract));
  5. return parent::make($abstract, $parameters);
  6. }
  7. /**
  8. * Resolve the given type from the container.
  9. *
  1. try {
  2. if (config('app.debug')) {
  3. if (app()->has(ExceptionRenderer::class)) {
  4. return $this->renderExceptionWithCustomRenderer($e);
  5. } elseif ($this->container->bound(Renderer::class)) {
  6. return $this->container->make(Renderer::class)->render(request(), $e);
  7. }
  8. }
  9. return $this->renderExceptionWithSymfony($e, config('app.debug'));
  10. } catch (Throwable $e) {
  1. * @return \Symfony\Component\HttpFoundation\Response
  2. */
  3. protected function convertExceptionToResponse(Throwable $e)
  4. {
  5. return new SymfonyResponse(
  6. $this->renderExceptionContent($e),
  7. $this->isHttpException($e) ? $e->getStatusCode() : 500,
  8. $this->isHttpException($e) ? $e->getHeaders() : []
  9. );
  10. }
  1. * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
  2. */
  3. protected function prepareResponse($request, Throwable $e)
  4. {
  5. if (! $this->isHttpException($e) && config('app.debug')) {
  6. return $this->toIlluminateResponse($this->convertExceptionToResponse($e), $e)->prepare($request);
  7. }
  8. if (! $this->isHttpException($e)) {
  9. $e = new HttpException(500, $e->getMessage(), $e);
  10. }
  1. */
  2. protected function renderExceptionResponse($request, Throwable $e)
  3. {
  4. return $this->shouldReturnJson($request, $e)
  5. ? $this->prepareJsonResponse($request, $e)
  6. : $this->prepareResponse($request, $e);
  7. }
  8. /**
  9. * Convert an authentication exception into a response.
  10. *
  1. return $this->finalizeRenderedResponse($request, match (true) {
  2. $e instanceof HttpResponseException => $e->getResponse(),
  3. $e instanceof AuthenticationException => $this->unauthenticated($request, $e),
  4. $e instanceof ValidationException => $this->convertValidationExceptionToResponse($e, $request),
  5. default => $this->renderExceptionResponse($request, $e),
  6. }, $e);
  7. }
  8. /**
  9. * Prepare the final, rendered response to be returned to the browser.
  1. * @param \Throwable $e
  2. * @return void
  3. */
  4. protected function renderHttpResponse(Throwable $e)
  5. {
  6. $this->getExceptionHandler()->render(static::$app['request'], $e)->send();
  7. }
  8. /**
  9. * Handle the PHP shutdown event.
  10. *
  1. if ($exceptionHandlerFailed ?? false) {
  2. exit(1);
  3. }
  4. } else {
  5. $this->renderHttpResponse($e);
  6. }
  7. }
  8. /**
  9. * Render an exception to the console.
  1. * @return callable
  2. */
  3. protected function forwardsTo($method)
  4. {
  5. return fn (...$arguments) => static::$app
  6. ? $this->{$method}(...$arguments)
  7. : false;
  8. }
  9. /**
  10. * Determine if the error level is a deprecation.
HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(object(UnexpectedValueException))

Stack Trace

InvalidArgumentException
InvalidArgumentException:
Please provide a valid cache path.

  at /workspace/vendor/laravel/framework/src/Illuminate/View/Compilers/Compiler.php:75
  at Illuminate\View\Compilers\Compiler->__construct(object(Filesystem), false, '', true, 'php', true)
     (/workspace/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php:97)
  at Illuminate\View\ViewServiceProvider->Illuminate\View\{closure}(object(Application), array())
     (/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php:1010)
  at Illuminate\Container\Container->build(object(Closure))
     (/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php:890)
  at Illuminate\Container\Container->resolve('blade.compiler', array(), true)
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1077)
  at Illuminate\Foundation\Application->resolve('blade.compiler', array())
     (/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php:821)
  at Illuminate\Container\Container->make('blade.compiler', array())
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1057)
  at Illuminate\Foundation\Application->make('blade.compiler')
     (/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php:1202)
  at Illuminate\Container\Container->resolveClass(object(ReflectionParameter))
     (/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php:1101)
  at Illuminate\Container\Container->resolveDependencies(array(object(ReflectionParameter), object(ReflectionParameter)))
     (/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php:1052)
  at Illuminate\Container\Container->build('Illuminate\\Foundation\\Exceptions\\Renderer\\Mappers\\BladeMapper')
     (/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php:890)
  at Illuminate\Container\Container->resolve('Illuminate\\Foundation\\Exceptions\\Renderer\\Mappers\\BladeMapper', array(), true)
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1077)
  at Illuminate\Foundation\Application->resolve('Illuminate\\Foundation\\Exceptions\\Renderer\\Mappers\\BladeMapper', array())
     (/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php:821)
  at Illuminate\Container\Container->make('Illuminate\\Foundation\\Exceptions\\Renderer\\Mappers\\BladeMapper', array())
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1057)
  at Illuminate\Foundation\Application->make('Illuminate\\Foundation\\Exceptions\\Renderer\\Mappers\\BladeMapper')
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php:271)
  at Illuminate\Foundation\Providers\FoundationServiceProvider->Illuminate\Foundation\Providers\{closure}(object(Application), array())
     (/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php:1010)
  at Illuminate\Container\Container->build(object(Closure))
     (/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php:890)
  at Illuminate\Container\Container->resolve('Illuminate\\Foundation\\Exceptions\\Renderer\\Renderer', array(), true)
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1077)
  at Illuminate\Foundation\Application->resolve('Illuminate\\Foundation\\Exceptions\\Renderer\\Renderer', array())
     (/workspace/vendor/laravel/framework/src/Illuminate/Container/Container.php:821)
  at Illuminate\Container\Container->make('Illuminate\\Foundation\\Exceptions\\Renderer\\Renderer', array())
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1057)
  at Illuminate\Foundation\Application->make('Illuminate\\Foundation\\Exceptions\\Renderer\\Renderer')
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:850)
  at Illuminate\Foundation\Exceptions\Handler->renderExceptionContent(object(UnexpectedValueException))
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:831)
  at Illuminate\Foundation\Exceptions\Handler->convertExceptionToResponse(object(UnexpectedValueException))
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:810)
  at Illuminate\Foundation\Exceptions\Handler->prepareResponse(object(Request), object(UnexpectedValueException))
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:709)
  at Illuminate\Foundation\Exceptions\Handler->renderExceptionResponse(object(Request), object(UnexpectedValueException))
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:597)
  at Illuminate\Foundation\Exceptions\Handler->render(object(Request), object(UnexpectedValueException))
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:219)
  at Illuminate\Foundation\Bootstrap\HandleExceptions->renderHttpResponse(object(UnexpectedValueException))
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:196)
  at Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(object(UnexpectedValueException))
     (/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:256)
  at Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(object(UnexpectedValueException))