-
-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Laravel] Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. #7048
Comments
Could you give me more informations? Can you try commenting this: core/src/Laravel/ApiPlatformDeferredProvider.php Lines 251 to 268 in eaf0075
Run your install again and let me know what's happening. I probably need to find a better way to extend the error handler. |
I think this patch will help #7049 would you be able to try installing it? |
@soyuka I tried what you suggested, but it didn’t help. This is a very strange issue. I’ve done a lot of debugging, but I haven’t gotten very far. I’ll describe what’s happening—maybe we can figure something out. Basically, the error occurs when running So, if I run it on version php artisan package:discover --ansi PHP Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /app/vendor/laravel/framework/src/Illuminate/Container/Container.php:1216
Stack trace:
#0 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(968): Illuminate\Container\Container->notInstantiable('Illuminate\\Cont...')
#1 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(832): Illuminate\Container\Container->build('Illuminate\\Cont...')
#2 /app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\Container\Container->resolve('Illuminate\\Cont...', Array, true)
#3 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(763): Illuminate\Foundation\Application->resolve('Illuminate\\Cont...', Array)
#4 /app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\Container\Container->make('Illuminate\\Cont...', Array)
#5 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(289): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
#6 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(208): Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler()
#7 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(190): Illuminate\Foundation\Bootstrap\HandleExceptions->renderForConsole(Object(Illuminate\Contracts\Container\BindingResolutionException))
#8 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(256): Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Illuminate\Contracts\Container\BindingResolutionException))
#9 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(Object(Illuminate\Contracts\Container\BindingResolutionException))
#10 {main}
thrown in /app/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1216
PHP Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /app/vendor/laravel/framework/src/Illuminate/Container/Container.php:1216
Stack trace:
#0 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(968): Illuminate\Container\Container->notInstantiable('Illuminate\\Cont...')
#1 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(832): Illuminate\Container\Container->build('Illuminate\\Cont...')
#2 /app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\Container\Container->resolve('Illuminate\\Cont...', Array, true)
#3 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(763): Illuminate\Foundation\Application->resolve('Illuminate\\Cont...', Array)
#4 /app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\Container\Container->make('Illuminate\\Cont...', Array)
#5 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(289): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
#6 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(208): Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler()
#7 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(190): Illuminate\Foundation\Bootstrap\HandleExceptions->renderForConsole(Object(Symfony\Component\ErrorHandler\Error\FatalError))
#8 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(232): Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Symfony\Component\ErrorHandler\Error\FatalError))
#9 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(256): Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown()
#10 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()
#11 {main}
thrown in /app/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1216 If I revert to version composer update Loading composer repositories with package information Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
- Downgrading api-platform/laravel (v4.1.3 => v4.1.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Downgrading api-platform/laravel (v4.1.3 => v4.1.1): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
112 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found. php artisan package:discover --ansi INFO Discovering packages.
api-platform/laravel .................................................. DONE
barryvdh/laravel-debugbar ............................................. DONE
laravel/sail .......................................................... DONE
laravel/tinker ........................................................ DONE
lorisleiva/laravel-actions ............................................ DONE
lorisleiva/lody ....................................................... DONE
nesbot/carbon ......................................................... DONE
nunomaduro/collision .................................................. DONE
nunomaduro/termwind ................................................... DONE
robsontenorio/laravel-keycloak-guard .................................. DONE
spatie/laravel-data ................................................... DONE
spatie/laravel-ignition ............................................... DONE
spatie/php-structure-discoverer ....................................... DONE
tightenco/ziggy ....................................................... DONE
vladimir-yuldashev/laravel-queue-rabbitmq ............................. DONE And here comes the interesting part! If I revert to composer update Loading composer repositories with package information Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
- Upgrading api-platform/laravel (v4.1.1 => v4.1.3)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Upgrading api-platform/laravel (v4.1.1 => v4.1.3): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
112 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found. php artisan package:discover --ansi PHP Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /app/vendor/laravel/framework/src/Illuminate/Container/Container.php:1216
Stack trace:
... composer remove api-platform/laravel ./composer.json has been updated
Running composer update api-platform/laravel
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 0 updates, 17 removals
- Removing api-platform/documentation (v4.1.3)
- Removing api-platform/hydra (v4.1.3)
- Removing api-platform/json-api (v4.1.3)
- Removing api-platform/json-hal (v4.1.3)
- Removing api-platform/json-schema (v4.1.3)
- Removing api-platform/jsonld (v4.1.3)
- Removing api-platform/laravel (v4.1.3)
- Removing api-platform/metadata (v4.1.3)
- Removing api-platform/openapi (v4.1.3)
- Removing api-platform/serializer (v4.1.3)
- Removing api-platform/state (v4.1.3)
- Removing psr/cache (3.0.0)
- Removing psr/link (2.0.1)
- Removing symfony/filesystem (v7.2.0)
- Removing symfony/validator (v7.2.4)
- Removing symfony/web-link (v7.2.0)
- Removing willdurand/negotiation (3.1.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 0 updates, 17 removals
- Removing willdurand/negotiation (3.1.0)
- Removing symfony/web-link (v7.2.0)
- Removing symfony/validator (v7.2.4)
- Removing symfony/filesystem (v7.2.0)
- Removing psr/link (2.0.1)
- Removing psr/cache (3.0.0)
- Removing api-platform/state (v4.1.3)
- Removing api-platform/serializer (v4.1.3)
- Removing api-platform/openapi (v4.1.3)
- Removing api-platform/metadata (v4.1.3)
- Removing api-platform/laravel (v4.1.3)
- Removing api-platform/jsonld (v4.1.3)
- Removing api-platform/json-schema (v4.1.3)
- Removing api-platform/json-hal (v4.1.3)
- Removing api-platform/json-api (v4.1.3)
- Removing api-platform/hydra (v4.1.3)
- Removing api-platform/documentation (v4.1.3)
0/7 [>---------------------------] 0%
6/7 [========================>---] 85%
7/7 [============================] 100%
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
109 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found. php artisan package:discover --ansi PHP Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /app/vendor/laravel/framework/src/Illuminate/Container/Container.php:1216
Stack trace:
... If I then revert back to composer require api-platform/laravel:4.1.1 ./composer.json has been updated
Running composer update api-platform/laravel
Loading composer repositories with package information Updating dependencies
Lock file operations: 17 installs, 0 updates, 0 removals
- Locking api-platform/documentation (v4.1.3)
- Locking api-platform/hydra (v4.1.3)
- Locking api-platform/json-api (v4.1.3)
- Locking api-platform/json-hal (v4.1.3)
- Locking api-platform/json-schema (v4.1.3)
- Locking api-platform/jsonld (v4.1.3)
- Locking api-platform/laravel (v4.1.1)
- Locking api-platform/metadata (v4.1.3)
- Locking api-platform/openapi (v4.1.3)
- Locking api-platform/serializer (v4.1.3)
- Locking api-platform/state (v4.1.3)
- Locking psr/cache (3.0.0)
- Locking psr/link (2.0.1)
- Locking symfony/filesystem (v7.2.0)
- Locking symfony/validator (v7.2.4)
- Locking symfony/web-link (v7.2.0)
- Locking willdurand/negotiation (3.1.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 17 installs, 0 updates, 0 removals
0 [>---------------------------] 0 [->--------------------------]
- Installing willdurand/negotiation (3.1.0): Extracting archive
- Installing psr/link (2.0.1): Extracting archive
- Installing symfony/web-link (v7.2.0): Extracting archive
- Installing psr/cache (3.0.0): Extracting archive
- Installing api-platform/metadata (v4.1.3): Extracting archive
- Installing api-platform/state (v4.1.3): Extracting archive
- Installing symfony/validator (v7.2.4): Extracting archive
- Installing api-platform/serializer (v4.1.3): Extracting archive
- Installing symfony/filesystem (v7.2.0): Extracting archive
- Installing api-platform/json-schema (v4.1.3): Extracting archive
- Installing api-platform/openapi (v4.1.3): Extracting archive
- Installing api-platform/jsonld (v4.1.3): Extracting archive
- Installing api-platform/json-hal (v4.1.3): Extracting archive
- Installing api-platform/documentation (v4.1.3): Extracting archive
- Installing api-platform/json-api (v4.1.3): Extracting archive
- Installing api-platform/hydra (v4.1.3): Extracting archive
- Installing api-platform/laravel (v4.1.1): Extracting archive
0/17 [>---------------------------] 0%
8/17 [=============>--------------] 47%
16/17 [==========================>-] 94%
17/17 [============================] 100%
6 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
112 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found. php artisan package:discover --ansi INFO Discovering packages.
api-platform/laravel .................................................. DONE
barryvdh/laravel-debugbar ............................................. DONE
laravel/sail .......................................................... DONE
laravel/tinker ........................................................ DONE
lorisleiva/laravel-actions ............................................ DONE
lorisleiva/lody ....................................................... DONE
nesbot/carbon ......................................................... DONE
nunomaduro/collision .................................................. DONE
nunomaduro/termwind ................................................... DONE
robsontenorio/laravel-keycloak-guard .................................. DONE
spatie/laravel-data ................................................... DONE
spatie/laravel-ignition ............................................... DONE
spatie/php-structure-discoverer ....................................... DONE
tightenco/ziggy ....................................................... DONE
vladimir-yuldashev/laravel-queue-rabbitmq ............................. DONE By the way, if I revert to It’s as if, even without Api Platform and under |
But if you comment out the exception handler service it should work and you'll get a proper error. |
Awwww, I found a solution here: laravel/framework#51233 (comment) My |
But if you comment the exception handler service it should work and you'll get a proper error. Wow I'm so glad you found your issue thanks for the tries!! |
API Platform version(s) affected: 4.1.3
Description
The recent fix solved the #7044 issue, but I still get a different error during installation:
The text was updated successfully, but these errors were encountered: