Update Error #281

Closed
opened 2026-02-04 18:16:36 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @m4ntic0r on GitHub (Feb 27, 2017).

from 0.14.3 to 0.15.0

git pull origin release && composer install && php artisan migrate

Von https://github.com/BookStackApp/BookStack

  • branch release -> FETCH_HEAD
    Already up-to-date.
    Do not run Composer as root/super user! See https://getcomposer.org/root for details
    Loading composer repositories with package information
    Installing dependencies (including require-dev) from lock file
    Nothing to install or update
    Generating autoload files

Illuminate\Foundation\ComposerScripts::postInstall
php artisan optimize
PHP Fatal error: Call to undefined method Illuminate\Events\Dispatcher::dispatch() in /var/www/html/bookstack/vend.php on line 479
PHP Fatal error: Uncaught exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to h()' in /var/www/html/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:479
Stack trace:
#0 {main}
thrown in /var/www/html/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 479
Script php artisan optimize handling the post-install-cmd event returned with error code 255

Originally created by @m4ntic0r on GitHub (Feb 27, 2017). from 0.14.3 to 0.15.0 git pull origin release && composer install && php artisan migrate Von https://github.com/BookStackApp/BookStack * branch release -> FETCH_HEAD Already up-to-date. Do not run Composer as root/super user! See https://getcomposer.org/root for details Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Nothing to install or update Generating autoload files > Illuminate\Foundation\ComposerScripts::postInstall > php artisan optimize PHP Fatal error: Call to undefined method Illuminate\Events\Dispatcher::dispatch() in /var/www/html/bookstack/vend.php on line 479 PHP Fatal error: Uncaught exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to h()' in /var/www/html/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:479 Stack trace: #0 {main} thrown in /var/www/html/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 479 Script php artisan optimize handling the post-install-cmd event returned with error code 255
Author
Owner

@ssddanbrown commented on GitHub (Feb 27, 2017):

@m4ntic0r I'm seeing the same thing, Thought It may have been the demo server though.

Can you try deleting the bootstrap/cache/compiled.php then re-running the update command?

Otherwise try deleting both the vendor folder and the bootstrap/cache/compiled.php file?

@ssddanbrown commented on GitHub (Feb 27, 2017): @m4ntic0r I'm seeing the same thing, Thought It may have been the demo server though. Can you try deleting the `bootstrap/cache/compiled.php` then re-running the update command? Otherwise try deleting both the `vendor` folder and the `bootstrap/cache/compiled.php` file?
Author
Owner

@m4ntic0r commented on GitHub (Feb 27, 2017):

deleting compiled.php and rerun the command fixed the problem

@m4ntic0r commented on GitHub (Feb 27, 2017): deleting compiled.php and rerun the command fixed the problem
Author
Owner

@svenkubiak commented on GitHub (Feb 27, 2017):

Had the same issue.

Deleting the bootstrap/cache/compiled.php file worked for me.

@svenkubiak commented on GitHub (Feb 27, 2017): Had the same issue. Deleting the bootstrap/cache/compiled.php file worked for me.
Author
Owner

@ssddanbrown commented on GitHub (Feb 27, 2017):

@m4ntic0r @svenkubiak Thank you both for confirming.

It appeared that this was an awkward component of Laravel. Services are cached to improved performance. This cache is loaded whenever the application is loaded. The command to clear it requires the application to be loaded thus when it's out of date, the command to clear the cache cannot be used without issues.

I've added a manual fix and published a new release to work around this to prevent others having the same issue.

@ssddanbrown commented on GitHub (Feb 27, 2017): @m4ntic0r @svenkubiak Thank you both for confirming. It appeared that this was an awkward component of Laravel. Services are cached to improved performance. This cache is loaded whenever the application is loaded. The command to clear it requires the application to be loaded thus when it's out of date, the command to clear the cache cannot be used without issues. I've [added a manual fix](bcafa73faf4a26810cf4f876efe2677b116d5aba) and [published a new release](https://github.com/BookStackApp/BookStack/releases/tag/v0.15.1) to work around this to prevent others having the same issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#281