When I upgrading my flarum to beta.7, it shows 'something when wrong' with no further information at database upgrade page.
When executing php flarum cache:clear
, the following error reported:
$ php flarum cache:clear
PHP Fatal error: Uncaught exception 'Illuminate\Contracts\Container\BindingResolutionException' with message 'Unresolvable dependency resolving [Parameter #1 [ <required> callable $userResolver ]] in class Flarum\Core\Access\Gate' in /path/to/flarum/vendor/illuminate/container/Container.php:828
Stack trace:
#0 /path/to/flarum/vendor/illuminate/container/Container.php(803): Illuminate\Container\Container->resolveNonClass(Object(ReflectionParameter))
#1 /path/to/flarum/vendor/illuminate/container/Container.php(776): Illuminate\Container\Container->getDependencies(Array, Array)
#2 /path/to/flarum/vendor/illuminate/container/Container.php(631): Illuminate\Container\Container->build('Flarum\\Core\\Acc...', Array)
#3 /path/to/flarum/vendor/flarum/core/src/Foundation/Application.php(514): Illuminate\Container\Container->make('Flarum\\Core\\Acc...', Array)
#4 /path/to/flarum/vendor/illuminate/container/Container.php(842): Flarum\Foundation\Application->make('Flarum\\Core\\Acc...')
#5 /path/to/flarum/vendor/illuminate/container/Container.php(805): Illumin in /path/to/flarum/vendor/illuminate/container/Container.php on line 828
In NGINX php error log:
2018/03/04 07:38:22 [error] 5567#0: *3351682 FastCGI sent in stderr: "PHP message: PHP Deprecated: The third argument to Zend\Stratigility\MiddlewarePipe() ($out) will be required starting with Stratigility version 2; please see https://docs.zendframework.com/zend-stratigility/migration/to-v2/ for more details on how to update your application to remove this message. in /path/to/flarum/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php on line 101" while reading response header from upstream, client: <reducted>, server: <reducted>, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "<reducted>"
2018/03/04 07:40:23 [error] 5568#0: *3352009 FastCGI sent in stderr: "PHP message: PHP Deprecated: The third argument to Zend\Stratigility\MiddlewarePipe() ($out) will be required starting with Stratigility version 2; please see https://docs.zendframework.com/zend-stratigility/migration/to-v2/ for more details on how to update your application to remove this message. in /path/to/flarum/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php on line 101
PHP message: PHP Deprecated: Usage of error middleware is deprecated as of 1.3.0, and will be removed in 2.0.0; please see https://docs.zendframework.com/zend-stratigility/migration/to-v2/ for details on how to update your application to remove this message. in /path/to/flarum/vendor/zendframework/zend-stratigility/src/Next.php on line 436" while reading response header from upstream, client: <reducted>, server: <reducted>, request: "GET /robots.txt HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "<reducted>"
2018/03/04 07:42:03 [error] 5565#0: *3352263 FastCGI sent in stderr: "PHP message: PHP Deprecated: The third argument to Zend\Stratigility\MiddlewarePipe() ($out) will be required starting with Stratigility version 2; please see https://docs.zendframework.com/zend-stratigility/migration/to-v2/ for more details on how to update your application to remove this message. in /path/to/flarum/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php on line 101" while reading response header from upstream, client: <reducted>, server: <reducted>, request: "GET /d/1228-2018 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "<reducted>"
2018/03/04 07:54:16 [error] 5567#0: *3353280 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected ':', expecting ';' or '{' in /path/to/flarum/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Comparator.php on line 512" while reading response header from upstream, client: <reducted>, server: <reducted>, request: "POST /admin HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "<reducted>", referrer: "https://<reducted>/admin"
So I changed version of "zendframework/zend-stratigility"
in composer.lock
to "^1.3.5"
and run composer update
again. After that database can be successfully upgraded and cache cleared without issue.
Hope this will help out someone.