snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
11.09k stars 3.18k forks source link

Errors after updateing PHP and composer #12552

Open Mynty100 opened 1 year ago

Mynty100 commented 1 year ago

Debug mode

Describe the bug

After trying to upgrading to php8.0 the site would load a message saying "Your Composer dependencies require a PHP version ">= 7.4.0" and had to go back to 7.4. after running composer self-update with php8.0 enables and then rerunning php upgrade.php i am now getting the following errors and have unfortunately no way to roll back. I have tried rolling composer back and php7.4 but this still is not working and we now have a white screen when accessing our site.

Issues start as database is backed up.

================================================================================


WELCOME TO THE SNIPE-IT UPGRADER!

This script will attempt to:


STEP 1: Checking .env file:

√ Your APP_KEY is not blank. √ Your APP_URL is not null or blank. It is set to https://oursite.com √ Your APP_URL is set to https://oursite.com and starts with the protocol (https:// or http://) √ Your APP_URL (https://oursite.com does not have a trailing slash.


STEP 2: Checking PHP requirements:

Current PHP version: (7.4.33) is at least 7.4.0 - continuing... FYI: The php.ini used by this PHP is: /etc/php/7.4/cli/php.ini

Checking Required PHP extensions...

√ bcmath is installed! √ curl is installed! √ fileinfo is installed! √ gd is installed! √ json is installed! √ ldap is installed! √ mbstring is installed! √ mysqli is installed! √ openssl is installed! √ PDO is installed! √ sodium is installed! √ tokenizer is installed! √ xml is installed! √ zip is installed!


STEP 3: Checking directory permissions:

√ /var/www/snipeit/bootstrap/cache is writable √ /var/www/snipeit/storage is writable √ /var/www/snipeit/storage/logs is writable √ /var/www/snipeit/storage/logs/laravel.log is writable √ /var/www/snipeit/storage/framework is writable √ /var/www/snipeit/storage/framework/cache is writable √ /var/www/snipeit/storage/framework/sessions is writable √ /var/www/snipeit/storage/framework/views is writable √ /var/www/snipeit/storage/app is writable √ /var/www/snipeit/storage/app/backups is writable √ /var/www/snipeit/storage/app/backup-temp is writable √ /var/www/snipeit/storage/private_uploads is writable √ /var/www/snipeit/public/uploads is writable


STEP 4: Backing up database:

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

--


STEP 5: Putting application into maintenance mode:

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

--

STEP 6: Pulling latest from Git (master branch):

Git is installed. Already on 'master' -- Saved working directory and index state WIP on master: adb166fb8 Merge remote-tracking branch 'origin/develop' -- M composer.json Your branch is up to date with 'origin/master'. -- Already up to date.


STEP 7: Cleaning up old cached files:

√ No bootstrap/cache/compiled.php, so nothing to delete. √ Deleting bootstrap/cache/services.php. It is no longer used. √ No bootstrap/cache/config.php, so nothing to delete. √ No vendor/symfony/translation/TranslatorInterface.php, so nothing to delete.

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22



STEP 8: Updating composer dependencies: (This may take a moment.)

-- Running the app in production mode. √ Local composer.phar detected, so we'll use that.

-- Updating local composer.phar

You are already using the latest available Composer version 2.5.4 (stable channel).

Installing dependencies from lock file Verifying lock file contents can be installed on current platform. Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run composer update or composer update <package name>. Nothing to install, update or remove Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead. Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead. Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested. Generating optimized autoload files Class ParsedownTest located in ./vendor/erusev/parsedown/test/ParsedownTest.php does not comply with psr-0 autoloading standard. Skipping.

Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255 Class ParsedownTest located in ./vendor/erusev/parsedown/test/ParsedownTest.php does not comply with psr-0 autoloading standard. Skipping. Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255 Generating optimized autoload files


STEP 9: Migrating database:

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22


STEP 10: Checking for OAuth keys:

√ OAuth keys detected. Skipping passport install.


STEP 11: Taking application out of maintenance mode:

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

PHP Fatal error: Uncaught Error: Interface 'Psr\Log\LoggerInterface' not found in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:22 Stack trace:

0 /var/www/snipeit/vendor/composer/ClassLoader.php(582): include()

1 /var/www/snipeit/vendor/composer/ClassLoader.php(433): Composer\Autoload{closure}()

2 [internal function]: Composer\Autoload\ClassLoader->loadClass()

3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php(17): spl_autoload_call()

4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Log\LogServiceProvider->Illuminate\Log{closure}()

5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()

6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()

7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\App in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 22

-- ---------------------- FINISHED! ----------------------- All done! Clear your browser cookies and re-login to use your upgraded Snipe-IT!

================================================================================

Thanking you in advance a millon times over.

Reproduction steps

refer to me description

Expected behavior

Be able to upgrade to php8.0 as we been told its required but having this issue.

Screenshots

No response

Snipe-IT Version

6.0.14

Operating System

Ubuntu

Web Server

Apache

PHP Version

8.0

Operating System

Windows

Browser

Firefox

Version

110

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

[2023-02-23 15:50:33] production.ERROR: Error: Call to undefined method Closure::__set_state() in /var/www/snipeit/bootstrap/cache/config.php:928
Stack trace:
#0 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php(67): require()
#1 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Foundation\Console\ConfigCacheCommand->handle()
#2 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\Container\BoundMethod::call()
#6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\Container\Container->call()
#7 /var/www/snipeit/vendor/symfony/console/Command/Command.php(298): Illuminate\Console\Command->execute()
#8 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run()
#9 /var/www/snipeit/vendor/symfony/console/Application.php(1024): Illuminate\Console\Command->run()
#10 /var/www/snipeit/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand()
#11 /var/www/snipeit/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#12 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Application.php(94): Symfony\Component\Console\Application->run()
#13 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Console\Application->run()
#14 /var/www/snipeit/artisan(35): Illuminate\Foundation\Console\Kernel->handle()
#15 {main}

Next LogicException: Your configuration files are not serializable. in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php:71
Stack trace:
#0 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Foundation\Console\ConfigCacheCommand->handle()
#1 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#2 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\Container\BoundMethod::call()
#5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\Container\Container->call()
#6 /var/www/snipeit/vendor/symfony/console/Command/Command.php(298): Illuminate\Console\Command->execute()
#7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run()
#8 /var/www/snipeit/vendor/symfony/console/Application.php(1024): Illuminate\Console\Command->run()
#9 /var/www/snipeit/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand()
#10 /var/www/snipeit/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#11 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Application.php(94): Symfony\Component\Console\Application->run()
#12 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Console\Application->run()
#13 /var/www/snipeit/artisan(35): Illuminate\Foundation\Console\Kernel->handle()
#14 {main}  
[2023-02-23 15:50:33] production.ERROR: Your configuration files are not serializable. {"exception":"[object] (LogicException(code: 0): Your configuration files are not serializable. at /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php:71)
[stacktrace]
#0 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Foundation\\Console\\ConfigCacheCommand->handle()
#1 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#2 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\\Container\\BoundMethod::call()
#5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\\Container\\Container->call()
#6 /var/www/snipeit/vendor/symfony/console/Command/Command.php(298): Illuminate\\Console\\Command->execute()
#7 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\\Component\\Console\\Command\\Command->run()
#8 /var/www/snipeit/vendor/symfony/console/Application.php(1024): Illuminate\\Console\\Command->run()
#9 /var/www/snipeit/vendor/symfony/console/Application.php(299): Symfony\\Component\\Console\\Application->doRunCommand()
#10 /var/www/snipeit/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun()
#11 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Application.php(94): Symfony\\Component\\Console\\Application->run()
#12 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\\Console\\Application->run()
#13 /var/www/snipeit/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#14 {main}

[previous exception] [object] (Error(code: 0): Call to undefined method Closure::__set_state() at /var/www/snipeit/bootstrap/cache/config.php:928)
[stacktrace]
#0 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php(67): require()
#1 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Foundation\\Console\\ConfigCacheCommand->handle()
#2 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#3 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#4 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#5 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\\Container\\BoundMethod::call()
#6 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\\Container\\Container->call()
#7 /var/www/snipeit/vendor/symfony/console/Command/Command.php(298): Illuminate\\Console\\Command->execute()
#8 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\\Component\\Console\\Command\\Command->run()
#9 /var/www/snipeit/vendor/symfony/console/Application.php(1024): Illuminate\\Console\\Command->run()
#10 /var/www/snipeit/vendor/symfony/console/Application.php(299): Symfony\\Component\\Console\\Application->doRunCommand()
#11 /var/www/snipeit/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun()
#12 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Console/Application.php(94): Symfony\\Component\\Console\\Application->run()
#13 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\\Console\\Application->run()
#14 /var/www/snipeit/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#15 {main}
"}

Additional context

No response

Mynty100 commented 1 year ago

Hi sorry resolved by deleting vendor and composer.lock file then reinstalling composer with php7.4 enabled. all back up and working. Apologies for the panic on this. We use snipeit for a lot of automation. Thanks again for the best asset manager!

snipe commented 1 year ago

You shouldn't have needed to downgrade PHP though. Current Snipe-IT runs just fine on PHP8, and you're going to need to get the system up on PHP8 for future versions of Snipe-IT anyway, so I'd be more inclined to figure out what happened on your system in the first place.

When you upgraded PHP, you included both the cli version of PHP and the module/fast-cgi version, right?

Mynty100 commented 1 year ago

Yeah every time I change over to php8.0 run >php upgrade.php Try and visit the site I get this error.

Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.4.0".

If I change back to php7.4 the site seems to work as normal.

Mynty100 commented 1 year ago

So just having a look again today. Go through and disable php7.4 and enable 8.0 Then also run >sudo update-alternatives --config php Set to php8.0. restart apache2 services and confirm >php -v = 8.0

Interesting enough on Step 2 of the update says

Current PHP version: (8.0.28) is the at the latest 7.4.0 - continuing... FYI: The php,ini used by this PHP is: /etc/php/8.0/cli/php.ini

Deleting Vendor folder, lock and composer.json then rerun >php upgrade.php This did not go well and after site still said required 7.4.

Undid everything back to php7.4 and deleted vendor, lock and composer.json. Site back up and running. Not sure why having such an issue with composer not liking php8.0.