Lumen 5.7.5 breaks Binding Resolution











up vote
0
down vote

favorite












UPDATE:



See my answer



Lumen Version: 5.7.5



PHP Version: 7.2



I've just done an upgrade from 5.5 to 5.6 to 5.7 until 5.7.4 everything works as expected, as soon as I pull in 5.7.5.
PHP Artisan gives me



"Target [IlluminateContractsDebugExceptionHandler] is not instantiable."



Example:



PHP artisan



In Container.php line 945:



Target [IlluminateContractsDebugExceptionHandler] is not instantiable.
Steps To Reproduce:
upgrade from 5.5 to 5.6 to 5.7 and fin ally from 5.7.4 to 5.7.5.



I'm checking all the code changes and what could be causing this.



Maybe you guys have an idea ?



Here is the stack trace:



[2018-11-15 15:30:50] local.ERROR: IlluminateContractsContainerBindingResolutionException: Target [IlluminateContractsDebugExceptionHandler] is not instantiable. in /project/vendor/illuminate/container/Container.php:945
Stack trace:
0 project/vendor/illuminate/container/Container.php(785): IlluminateContainerContainer->notInstantiable('Illuminate\Cont...')
1 project/vendor/illuminate/container/Container.php(658): IlluminateContainerContainer->build('Illuminate\Cont...')
2 project/vendor/illuminate/container/Container.php(609): IlluminateContainerContainer->resolve('Illuminate\Cont...', Array)
3 project/vendor/laravel/lumen-framework/src/Application.php(260): IlluminateContainerContainer->make('Illuminate\Cont...', Array)
4 project/vendor/illuminate/container/Container.php(1222): LaravelLumenApplication->make('Illuminate\Cont...')
5 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(223): IlluminateContainerContainer->offsetGet('Illuminate\Cont...')
#6 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(117): LaravelLumenConsoleKernel->reportException(Object(IlluminateContractsContainerBindingResolutionException))
#7 project/artisan(43): LaravelLumenConsoleKernel->handle(Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))
#8 {main} {"exception":"[object] (Illuminate\Contracts\Container\BindingResolutionException(code: 0): Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. at project/vendor/illuminate/container/Container.php:945)
#[stacktrace]
#0 project/vendor/illuminate/container/Container.php(785): Illuminate\Container\Container->notInstantiable('Illuminate\\Cont...')
#1 project/vendor/illuminate/container/Container.php(658): Illuminate\Container\Container->build('Illuminate\\Cont...')
#2 project/vendor/illuminate/container/Container.php(609): Illuminate\Container\Container->resolve('Illuminate\\Cont...', Array)
#3 project/vendor/laravel/lumen-framework/src/Application.php(260): Illuminate\Container\Container->make('Illuminate\\Cont...', Array)
#4 project/vendor/illuminate/container/Container.php(1222): Laravel\Lumen\Application->make('Illuminate\\Cont...')
#5 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(223): Illuminate\Container\Container->offsetGet('Illuminate\\Cont...')
#6 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(117): Laravel\Lumen\Console\Kernel->reportException(Object(Illuminate\Contracts\Container\BindingResolutionException))
#7 project/artisan(43): Laravel\Lumen\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 {main}


I've therefore created an issue on Github:



https://github.com/laravel/lumen-framework/issues/849










share|improve this question




























    up vote
    0
    down vote

    favorite












    UPDATE:



    See my answer



    Lumen Version: 5.7.5



    PHP Version: 7.2



    I've just done an upgrade from 5.5 to 5.6 to 5.7 until 5.7.4 everything works as expected, as soon as I pull in 5.7.5.
    PHP Artisan gives me



    "Target [IlluminateContractsDebugExceptionHandler] is not instantiable."



    Example:



    PHP artisan



    In Container.php line 945:



    Target [IlluminateContractsDebugExceptionHandler] is not instantiable.
    Steps To Reproduce:
    upgrade from 5.5 to 5.6 to 5.7 and fin ally from 5.7.4 to 5.7.5.



    I'm checking all the code changes and what could be causing this.



    Maybe you guys have an idea ?



    Here is the stack trace:



    [2018-11-15 15:30:50] local.ERROR: IlluminateContractsContainerBindingResolutionException: Target [IlluminateContractsDebugExceptionHandler] is not instantiable. in /project/vendor/illuminate/container/Container.php:945
    Stack trace:
    0 project/vendor/illuminate/container/Container.php(785): IlluminateContainerContainer->notInstantiable('Illuminate\Cont...')
    1 project/vendor/illuminate/container/Container.php(658): IlluminateContainerContainer->build('Illuminate\Cont...')
    2 project/vendor/illuminate/container/Container.php(609): IlluminateContainerContainer->resolve('Illuminate\Cont...', Array)
    3 project/vendor/laravel/lumen-framework/src/Application.php(260): IlluminateContainerContainer->make('Illuminate\Cont...', Array)
    4 project/vendor/illuminate/container/Container.php(1222): LaravelLumenApplication->make('Illuminate\Cont...')
    5 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(223): IlluminateContainerContainer->offsetGet('Illuminate\Cont...')
    #6 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(117): LaravelLumenConsoleKernel->reportException(Object(IlluminateContractsContainerBindingResolutionException))
    #7 project/artisan(43): LaravelLumenConsoleKernel->handle(Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))
    #8 {main} {"exception":"[object] (Illuminate\Contracts\Container\BindingResolutionException(code: 0): Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. at project/vendor/illuminate/container/Container.php:945)
    #[stacktrace]
    #0 project/vendor/illuminate/container/Container.php(785): Illuminate\Container\Container->notInstantiable('Illuminate\\Cont...')
    #1 project/vendor/illuminate/container/Container.php(658): Illuminate\Container\Container->build('Illuminate\\Cont...')
    #2 project/vendor/illuminate/container/Container.php(609): Illuminate\Container\Container->resolve('Illuminate\\Cont...', Array)
    #3 project/vendor/laravel/lumen-framework/src/Application.php(260): Illuminate\Container\Container->make('Illuminate\\Cont...', Array)
    #4 project/vendor/illuminate/container/Container.php(1222): Laravel\Lumen\Application->make('Illuminate\\Cont...')
    #5 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(223): Illuminate\Container\Container->offsetGet('Illuminate\\Cont...')
    #6 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(117): Laravel\Lumen\Console\Kernel->reportException(Object(Illuminate\Contracts\Container\BindingResolutionException))
    #7 project/artisan(43): Laravel\Lumen\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #8 {main}


    I've therefore created an issue on Github:



    https://github.com/laravel/lumen-framework/issues/849










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      UPDATE:



      See my answer



      Lumen Version: 5.7.5



      PHP Version: 7.2



      I've just done an upgrade from 5.5 to 5.6 to 5.7 until 5.7.4 everything works as expected, as soon as I pull in 5.7.5.
      PHP Artisan gives me



      "Target [IlluminateContractsDebugExceptionHandler] is not instantiable."



      Example:



      PHP artisan



      In Container.php line 945:



      Target [IlluminateContractsDebugExceptionHandler] is not instantiable.
      Steps To Reproduce:
      upgrade from 5.5 to 5.6 to 5.7 and fin ally from 5.7.4 to 5.7.5.



      I'm checking all the code changes and what could be causing this.



      Maybe you guys have an idea ?



      Here is the stack trace:



      [2018-11-15 15:30:50] local.ERROR: IlluminateContractsContainerBindingResolutionException: Target [IlluminateContractsDebugExceptionHandler] is not instantiable. in /project/vendor/illuminate/container/Container.php:945
      Stack trace:
      0 project/vendor/illuminate/container/Container.php(785): IlluminateContainerContainer->notInstantiable('Illuminate\Cont...')
      1 project/vendor/illuminate/container/Container.php(658): IlluminateContainerContainer->build('Illuminate\Cont...')
      2 project/vendor/illuminate/container/Container.php(609): IlluminateContainerContainer->resolve('Illuminate\Cont...', Array)
      3 project/vendor/laravel/lumen-framework/src/Application.php(260): IlluminateContainerContainer->make('Illuminate\Cont...', Array)
      4 project/vendor/illuminate/container/Container.php(1222): LaravelLumenApplication->make('Illuminate\Cont...')
      5 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(223): IlluminateContainerContainer->offsetGet('Illuminate\Cont...')
      #6 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(117): LaravelLumenConsoleKernel->reportException(Object(IlluminateContractsContainerBindingResolutionException))
      #7 project/artisan(43): LaravelLumenConsoleKernel->handle(Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))
      #8 {main} {"exception":"[object] (Illuminate\Contracts\Container\BindingResolutionException(code: 0): Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. at project/vendor/illuminate/container/Container.php:945)
      #[stacktrace]
      #0 project/vendor/illuminate/container/Container.php(785): Illuminate\Container\Container->notInstantiable('Illuminate\\Cont...')
      #1 project/vendor/illuminate/container/Container.php(658): Illuminate\Container\Container->build('Illuminate\\Cont...')
      #2 project/vendor/illuminate/container/Container.php(609): Illuminate\Container\Container->resolve('Illuminate\\Cont...', Array)
      #3 project/vendor/laravel/lumen-framework/src/Application.php(260): Illuminate\Container\Container->make('Illuminate\\Cont...', Array)
      #4 project/vendor/illuminate/container/Container.php(1222): Laravel\Lumen\Application->make('Illuminate\\Cont...')
      #5 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(223): Illuminate\Container\Container->offsetGet('Illuminate\\Cont...')
      #6 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(117): Laravel\Lumen\Console\Kernel->reportException(Object(Illuminate\Contracts\Container\BindingResolutionException))
      #7 project/artisan(43): Laravel\Lumen\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      #8 {main}


      I've therefore created an issue on Github:



      https://github.com/laravel/lumen-framework/issues/849










      share|improve this question















      UPDATE:



      See my answer



      Lumen Version: 5.7.5



      PHP Version: 7.2



      I've just done an upgrade from 5.5 to 5.6 to 5.7 until 5.7.4 everything works as expected, as soon as I pull in 5.7.5.
      PHP Artisan gives me



      "Target [IlluminateContractsDebugExceptionHandler] is not instantiable."



      Example:



      PHP artisan



      In Container.php line 945:



      Target [IlluminateContractsDebugExceptionHandler] is not instantiable.
      Steps To Reproduce:
      upgrade from 5.5 to 5.6 to 5.7 and fin ally from 5.7.4 to 5.7.5.



      I'm checking all the code changes and what could be causing this.



      Maybe you guys have an idea ?



      Here is the stack trace:



      [2018-11-15 15:30:50] local.ERROR: IlluminateContractsContainerBindingResolutionException: Target [IlluminateContractsDebugExceptionHandler] is not instantiable. in /project/vendor/illuminate/container/Container.php:945
      Stack trace:
      0 project/vendor/illuminate/container/Container.php(785): IlluminateContainerContainer->notInstantiable('Illuminate\Cont...')
      1 project/vendor/illuminate/container/Container.php(658): IlluminateContainerContainer->build('Illuminate\Cont...')
      2 project/vendor/illuminate/container/Container.php(609): IlluminateContainerContainer->resolve('Illuminate\Cont...', Array)
      3 project/vendor/laravel/lumen-framework/src/Application.php(260): IlluminateContainerContainer->make('Illuminate\Cont...', Array)
      4 project/vendor/illuminate/container/Container.php(1222): LaravelLumenApplication->make('Illuminate\Cont...')
      5 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(223): IlluminateContainerContainer->offsetGet('Illuminate\Cont...')
      #6 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(117): LaravelLumenConsoleKernel->reportException(Object(IlluminateContractsContainerBindingResolutionException))
      #7 project/artisan(43): LaravelLumenConsoleKernel->handle(Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))
      #8 {main} {"exception":"[object] (Illuminate\Contracts\Container\BindingResolutionException(code: 0): Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. at project/vendor/illuminate/container/Container.php:945)
      #[stacktrace]
      #0 project/vendor/illuminate/container/Container.php(785): Illuminate\Container\Container->notInstantiable('Illuminate\\Cont...')
      #1 project/vendor/illuminate/container/Container.php(658): Illuminate\Container\Container->build('Illuminate\\Cont...')
      #2 project/vendor/illuminate/container/Container.php(609): Illuminate\Container\Container->resolve('Illuminate\\Cont...', Array)
      #3 project/vendor/laravel/lumen-framework/src/Application.php(260): Illuminate\Container\Container->make('Illuminate\\Cont...', Array)
      #4 project/vendor/illuminate/container/Container.php(1222): Laravel\Lumen\Application->make('Illuminate\\Cont...')
      #5 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(223): Illuminate\Container\Container->offsetGet('Illuminate\\Cont...')
      #6 project/vendor/laravel/lumen-framework/src/Console/Kernel.php(117): Laravel\Lumen\Console\Kernel->reportException(Object(Illuminate\Contracts\Container\BindingResolutionException))
      #7 project/artisan(43): Laravel\Lumen\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      #8 {main}


      I've therefore created an issue on Github:



      https://github.com/laravel/lumen-framework/issues/849







      php laravel ioc-container lumen






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 days ago

























      asked Nov 15 at 16:36









      DevJ3rry

      385212




      385212
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          In Lumen V5.7.6 a fix was released.



          It basically boiled down to a path overwrite during bootstrapping.



          The application.php in Lumen has been using the command static:class instead of the class path.



          This was changed to self:class to reflect the correct current path.



          This is the commit that broke it



          This is the commit that fixes it



          In some cases you may want to overwrite the base application path therefore you could add an alias when overwriting the base application path for example in an app.php while bootstrapping the application.



          e.g.



          $app->alias(overwritepathApplication::class, LaravelLumenApplication::class);


          Hope this helps someone altho the new commit should fix any manual overwriting to reflect the correct class path.






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53324008%2flumen-5-7-5-breaks-binding-resolution%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote



            accepted










            In Lumen V5.7.6 a fix was released.



            It basically boiled down to a path overwrite during bootstrapping.



            The application.php in Lumen has been using the command static:class instead of the class path.



            This was changed to self:class to reflect the correct current path.



            This is the commit that broke it



            This is the commit that fixes it



            In some cases you may want to overwrite the base application path therefore you could add an alias when overwriting the base application path for example in an app.php while bootstrapping the application.



            e.g.



            $app->alias(overwritepathApplication::class, LaravelLumenApplication::class);


            Hope this helps someone altho the new commit should fix any manual overwriting to reflect the correct class path.






            share|improve this answer

























              up vote
              0
              down vote



              accepted










              In Lumen V5.7.6 a fix was released.



              It basically boiled down to a path overwrite during bootstrapping.



              The application.php in Lumen has been using the command static:class instead of the class path.



              This was changed to self:class to reflect the correct current path.



              This is the commit that broke it



              This is the commit that fixes it



              In some cases you may want to overwrite the base application path therefore you could add an alias when overwriting the base application path for example in an app.php while bootstrapping the application.



              e.g.



              $app->alias(overwritepathApplication::class, LaravelLumenApplication::class);


              Hope this helps someone altho the new commit should fix any manual overwriting to reflect the correct class path.






              share|improve this answer























                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                In Lumen V5.7.6 a fix was released.



                It basically boiled down to a path overwrite during bootstrapping.



                The application.php in Lumen has been using the command static:class instead of the class path.



                This was changed to self:class to reflect the correct current path.



                This is the commit that broke it



                This is the commit that fixes it



                In some cases you may want to overwrite the base application path therefore you could add an alias when overwriting the base application path for example in an app.php while bootstrapping the application.



                e.g.



                $app->alias(overwritepathApplication::class, LaravelLumenApplication::class);


                Hope this helps someone altho the new commit should fix any manual overwriting to reflect the correct class path.






                share|improve this answer












                In Lumen V5.7.6 a fix was released.



                It basically boiled down to a path overwrite during bootstrapping.



                The application.php in Lumen has been using the command static:class instead of the class path.



                This was changed to self:class to reflect the correct current path.



                This is the commit that broke it



                This is the commit that fixes it



                In some cases you may want to overwrite the base application path therefore you could add an alias when overwriting the base application path for example in an app.php while bootstrapping the application.



                e.g.



                $app->alias(overwritepathApplication::class, LaravelLumenApplication::class);


                Hope this helps someone altho the new commit should fix any manual overwriting to reflect the correct class path.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 2 days ago









                DevJ3rry

                385212




                385212






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53324008%2flumen-5-7-5-breaks-binding-resolution%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Wiesbaden

                    To store a contact into the json file from server.js file using a class in NodeJS

                    Marschland