statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

PHP 7.4 breaks Statamic #2469

Closed dannyuk1982 closed 4 years ago

dannyuk1982 commented 4 years ago

PHP 7.4 gives a warning:

Deprecated: join(): Passing glue string after array is deprecated. Swap the parameters in /statamic/core/API/Path.php on line 137

And the error:

ErrorException in Path.php line 137:
join(): Passing glue string after array is deprecated. Swap the parameters

Fix:

In statamic/core/API/Path.php line 137

Change

return self::tidy(join($args, '/'));

to

return self::tidy(join('/',$args));
roelofr commented 4 years ago

That doesn't fix all encounters of this bug. I dove deeper into it on the forums, but it's better discussed here.

I've recently updated my server, but noticed that Statamic 2.11.15 starts to cry, since it's using the – now deprecated – inverse-order of implode. This is easily resolved by flipping these arguments, which I've done in this diff.

After fixing this, however, you'll still hear Statamic cry over burnt cookies and a broken dependency (but mostly the cookies). The michelf/php-markdown package supports PHP 7.4 from version 1.9, but it's locked at 1.7. This diff file performs an atomic update on your composer.lock (so just the broken dependency gets updated) and solves this issue.

Now I've already encountered a far harder bug. Laravel 5.1 depends on packages which depend on nikic/php-parser version 2 (capped by psy/psysh), but the PHP 7.4 compatibility has been fixed in ^4.2.3.

~Looks like this'll be a hard one.~ See Edit 2


Edit: If you want to see how deeply nested that package is, I suggest you have a look at Statamic's dependency tree:

cd ./statamic
composer why --recursive --tree nikic/php-parser

Edit 2 (2019-12-19): I can't seem to get any issues anymore with nikic/php-parser, so I can no longer vouch for the difficulty this upgrade may cause.

jasonvarga commented 4 years ago

I don't know if we'll able to support 7.4 because of the dependency tree, as @roelofr has pointed out.

dannyuk1982 commented 4 years ago

Fair enough, I haven't noticed any other issues - is it just markdown that would be affected?

roelofr commented 4 years ago

Well, the php please optimize command is very much broken on PHP 7.4, which signals that more issues might arise.

jasonvarga commented 4 years ago

@roelofr Not sure what issue you're seeing with markdown or php-parser. Where/how are you running into it?

roelofr commented 4 years ago

~@jasonvarga I tried replicating the error, but cannot seem to get it to pop up again.~

Got it!

I run my websites in Docker, and when I switched from php:7.3-apache to php:7.4-apache I got the error again.

I used the following file as site/content/pages/index.md:

---
posts: 3
title: Homepage
template: home
fieldset: home
id: db0ae4e3-4f10-4802-bc40-0b880cbf02c7
---
Our latest blog posts:

This resulted in the following error log:

[2019-12-19 11:16:44] dev.ERROR: ErrorException: Array and string offset access syntax with curly braces is deprecated in /var/www/statamic/statamic/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php:209
Stack trace:
#0 /var/www/statamic/statamic/vendor/composer/ClassLoader.php(444): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /var/www/statamic/statamic/vendor/composer/ClassLoader.php(444): include()
#2 /var/www/statamic/statamic/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
#3 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/statamic/statamic/bootstrap/helpers.php(498): spl_autoload_call()
#5 /var/www/statamic/statamic/core/Data/Data.php(488): markdown()
#6 /var/www/statamic/statamic/core/Data/Data.php(629): Statamic\Data\Data->parseContent()
#7 [internal function]: Statamic\Data\Data->toArray()
#8 /var/www/statamic/statamic/core/Data/LocalizedData.php(73): call_user_func_array()
#9 /var/www/statamic/statamic/core/Data/LocalizedData.php(93): Statamic\Data\LocalizedData->call()
#10 /var/www/statamic/statamic/bundles/Protect/ProtectAPI.php(30): Statamic\Data\LocalizedData->toArray()
#11 /var/www/statamic/statamic/core/Http/Controllers/StatamicController.php(371): Statamic\Addons\Protect\ProtectAPI->protect()
#12 /var/www/statamic/statamic/core/Http/Controllers/StatamicController.php(223): Statamic\Http\Controllers\StatamicController->protect()
#13 [internal function]: Statamic\Http\Controllers\StatamicController->index()
#14 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(256): call_user_func_array()
#15 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(164): Illuminate\Routing\Controller->callAction()
#16 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(112): Illuminate\Routing\ControllerDispatcher->call()
#17 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}()
#18 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func()
#19 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#20 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func()
#21 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Pipeline\Pipeline->then()
#22 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(68): Illuminate\Routing\ControllerDispatcher->callWithinStack()
#23 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Routing/Route.php(203): Illuminate\Routing\ControllerDispatcher->dispatch()
#24 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Routing/Route.php(134): Illuminate\Routing\Route->runWithCustomDispatcher()
#25 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(708): Illuminate\Routing\Route->run()
#26 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#27 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func()
#28 /var/www/statamic/statamic/core/StaticCaching/Middleware/Cache.php(30): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#29 [internal function]: Statamic\StaticCaching\Middleware\Cache->handle()
#30 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array()
#31 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#32 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func()
#33 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(710): Illuminate\Pipeline\Pipeline->then()
#34 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(674): Illuminate\Routing\Router->runRouteWithinStack()
#35 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->dispatchToRoute()
#36 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): Illuminate\Routing\Router->dispatch()
#37 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#38 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func()
#39 /var/www/statamic/statamic/core/Http/Middleware/TransformsRequest.php(31): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#40 [internal function]: Statamic\Http\Middleware\TransformsRequest->handle()
#41 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array()
#42 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#43 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#44 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array()
#45 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#46 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#47 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array()
#48 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#49 [internal function]: Illuminate\Session\Middleware\StartSession->handle()
#50 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array()
#51 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#52 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#53 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array()
#54 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#55 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle()
#56 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array()
#57 /var/www/statamic/statamic/core/StaticCaching/Middleware/Retrieve.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#58 [internal function]: Statamic\StaticCaching\Middleware\Retrieve->handle()
#59 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array()
#60 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#61 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle()
#62 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array()
#63 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#64 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func()
#65 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then()
#66 /var/www/statamic/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#67 /var/www/statamic/public/index.php(167): Illuminate\Foundation\Http\Kernel->handle()
#68 {main}  

Hope this somehow helps

roelofr commented 4 years ago

Ehh, I get we're getting very close to Christmas, and I want to solve this issue as much as anyone, but why was it closed without notice?

Merry Christmas anyhow 🎄

jasonvarga commented 4 years ago

2.11.16 was released with the fix.

dannyuk1982 commented 4 years ago

@jasonvarga I've found another problem, you can't save any settings from the CP, it gives the error:

#1 /statamic/vendor/symfony/console/Input/Input.php(51): Symfony\Component\Console\Input\ArrayInput->parse()
#2 /statamic/vendor/symfony/console/Command/Command.php(197): Symfony\Component\Console\Input\Input->bind(Object(Symfony\Component\Console\Input\InputDefinition))
#3 /statamic/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#4 /statamic/vendor/symfony/console/Application.php(840): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#5 /statamic/vendor/symfony/console/Application.php(190): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Cache\Console\ClearCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#6 /statamic/vendor/symfony/console/Application.php(114): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#7 /statamic/vendor/laravel/framework/src/Illuminate/Console/Application.php(64): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#8 /statamic/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(159): Illuminate\Console\Application->call('cache:clear', Object(Illuminate\Support\Collection))
#9 /statamic/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(215): Illuminate\Foundation\Console\Kernel->call('cache:clear')
#10 /statamic/core/API/Cache.php(72): Illuminate\Support\Facades\Facade::__callStatic('call', Array)
#11 /statamic/core/Http/Controllers/SettingsController.php(69): Statamic\API\Cache::clear()
#12 [internal function]: Statamic\Http\Controllers\SettingsController->update('system')
#13 /statamic/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(256): call_user_func_array(Array, Array)
#14 /statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(164): Illuminate\Routing\Controller->callAction('update', Array)
#15 /statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(112): Illuminate\Routing\ControllerDispatcher->call(Object(Statamic\Http\Controllers\SettingsController), Object(Illuminate\Routing\Route), 'update')
#16 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#17 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#18 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#19 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#20 /statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#21 /statamic/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(68): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(Statamic\Http\Controllers\SettingsController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'update')
#22 /statamic/vendor/laravel/framework/src/Illuminate/Routing/Route.php(203): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Statamic\\Http\\C...', 'update')
#23 /statamic/vendor/laravel/framework/src/Illuminate/Routing/Route.php(134): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))
#24 /statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(708): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#25 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#26 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#27 /statamic/core/Http/Middleware/CP/Configurable.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#28 [internal function]: Statamic\Http\Middleware\CP\Configurable->handle(Object(Illuminate\Http\Request), Object(Closure))
#29 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#30 /statamic/core/Http/Middleware/CP/Authenticate.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#31 [internal function]: Statamic\Http\Middleware\CP\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#33 /statamic/core/Http/Middleware/Outpost.php(48): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#34 [internal function]: Statamic\Http\Middleware\Outpost->handle(Object(Illuminate\Http\Request), Object(Closure))
#35 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#36 /statamic/core/Http/Middleware/CP/Localize.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#37 [internal function]: Statamic\Http\Middleware\CP\Localize->handle(Object(Illuminate\Http\Request), Object(Closure))
#38 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#39 /statamic/core/Http/Middleware/CP/DefaultLocale.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#40 [internal function]: Statamic\Http\Middleware\CP\DefaultLocale->handle(Object(Illuminate\Http\Request), Object(Closure))
#41 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#42 /statamic/core/Http/Middleware/CP/AddHeaders.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#43 [internal function]: Statamic\Http\Middleware\CP\AddHeaders->handle(Object(Illuminate\Http\Request), Object(Closure))
#44 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#45 /statamic/core/Http/Middleware/CpEnabled.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#46 [internal function]: Statamic\Http\Middleware\CpEnabled->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#48 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#49 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#50 /statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(710): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#51 /statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(674): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#52 /statamic/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#53 /statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#54 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#55 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#56 /statamic/vendor/barryvdh/laravel-debugbar/src/Middleware/Debugbar.php(51): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#57 [internal function]: Barryvdh\Debugbar\Middleware\Debugbar->handle(Object(Illuminate\Http\Request), Object(Closure))
#58 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#59 /statamic/core/Http/Middleware/TransformsRequest.php(31): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#60 [internal function]: Statamic\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#61 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#62 /statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#63 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#64 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#65 /statamic/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#66 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#67 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#68 /statamic/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#69 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#70 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#71 /statamic/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#72 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#73 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#74 /statamic/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#75 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#76 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#77 /statamic/core/StaticCaching/Middleware/Retrieve.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#78 [internal function]: Statamic\StaticCaching\Middleware\Retrieve->handle(Object(Illuminate\Http\Request), Object(Closure))
#79 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#80 /statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#81 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#82 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#83 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#84 /statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#85 /statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#86 /statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#87 /index.php(167): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#88 /Users/danny/.composer/vendor/laravel/valet/server.php(158): require('/Users/danny/On...')

Something to do with this bit, and a cache:clear parameter - but over my head though:

protected function parse()
    {
        foreach ($this->parameters as $key => $value) {

            if (0 === strpos($key, '--')) {
                $this->addLongOption(substr($key, 2), $value);
            } elseif ('-' === $key[0]) {
                $this->addShortOption(substr($key, 1), $value);
            } else {
                $this->addArgument($key, $value);
            }
        }
    }

It's line 121 of /statamic/vendor/symfony/console/Input/Input.php

FrittenKeeZ commented 4 years ago

The problem actually exists in Illuminate\Console\Application - at least if you try to run php please update:housekeeping.

Broken code:

public function call($command, array $parameters = [])
{
    $parameters = collect($parameters)->prepend($command);

    $this->lastOutput = new BufferedOutput;

    $this->setCatchExceptions(false);

    $result = $this->run(new ArrayInput($parameters->toArray()), $this->lastOutput);

    $this->setCatchExceptions(true);

    return $result;
}

Working code:

public function call($command, array $parameters = [])
{
    $this->lastOutput = new BufferedOutput;

    $this->setCatchExceptions(false);

    $result = $this->run(new ArrayInput(compact('command') + $parameters), $this->lastOutput);

    $this->setCatchExceptions(true);

    return $result;
}
jasonvarga commented 4 years ago

Thank you very much @FrittenKeeZ 👌 🎉

jasonvarga commented 4 years ago

These issues have been resolved in 2.11.19