Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Issue #16113

Closed
LSNIGHTSHOT opened this issue Jan 22, 2025 · 9 comments
Closed

Upgrade Issue #16113

LSNIGHTSHOT opened this issue Jan 22, 2025 · 9 comments

Comments

@LSNIGHTSHOT
Copy link

I'm having an issue getting passed the backup portion (step 4) of the upgrade.php script. Ran a git pull first as well.

This is running on Windows Server 2019
Using IIS and MariaDB version 10.9.8.0 and PHP version 8.2.27

The error is as follows:
STEP 4: Backing up database:

--
TypeError

Carbon\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type array, bool given, called in C:\inetpub\wwwroot\snipe-it\vendor\nesbot\carbon\src\Carbon\Traits\Creator.php on line 98

at C:\inetpub\wwwroot\snipe-it\vendor\nesbot\carbon\src\Carbon\Traits\Creator.php:928
924▕ * @param array $lastErrors
925▕ *
926▕ * @return void
927▕ */
➜ 928▕ private static function setLastErrors(array $lastErrors)
929▕ {
930▕ static::$lastErrors = $lastErrors;
931▕ }
932▕

Whoops\Exception\ErrorException

Using ${var} in strings is deprecated, use {$var} instead

at C:\inetpub\wwwroot\snipe-it\vendor\facade\ignition\src\SolutionProviders\MergeConflictSolutionProvider.php:52
48▕ }
49▕
50▕ protected function getCurrentBranch(string $directory): string
51▕ {
➜ 52▕ $branch = "'".trim(shell_exec("cd ${directory}; git branch | grep \* | cut -d ' ' -f2"))."'";
53▕
54▕ if ($branch === "''") {
55▕ $branch = 'current branch';
56▕ }

Symfony\Component\ErrorHandler\Error\FatalError

Uncaught Whoops\Exception\ErrorException: Using ${var} in strings is deprecated, use {$var} instead in C:\inetpub\wwwroot\snipe-it\vendor\facade\ignition\src\SolutionProviders\MergeConflictSolutionProvider.php:52
Stack trace:
#0 C:\inetpub\wwwroot\snipe-it\vendor\composer\ClassLoader.php(576): Whoops\Run->handleError()
#1 C:\inetpub\wwwroot\snipe-it\vendor\composer\ClassLoader.php(576): include()
#2 C:\inetpub\wwwroot\snipe-it\vendor\composer\ClassLoader.php(427): Composer\Autoload{closure}()
#3 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#4 C:\inetpub\wwwroot\snipe-it\vendor\facade\ignition\src\SolutionProviders\SolutionProviderRepository.php(50): class_implements()
#5 [internal function]: Facade\Ignition\SolutionProviders\SolutionProviderRepository->Facade\Ignition\SolutionProviders{closure}()
#6 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Collections\Arr.php(717): array_filter()
#7 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Collections\Collection.php(358): Illuminate\Support\Arr::where()
#8 C:\inetpub\wwwroot\snipe-it\vendor\facade\ignition\src\SolutionProviders\SolutionProviderRepository.php(49): Illuminate\Support\Collection->filter()
#9 C:\inetpub\wwwroot\snipe-it\vendor\nunomaduro\collision\src\Adapters\Laravel\IgnitionSolutionsRepository.php(36): Facade\Ignition\SolutionProviders\SolutionProviderRepository->getSolutionsForThrowable()
#10 C:\inetpub\wwwroot\snipe-it\vendor\nunomaduro\collision\src\Writer.php(244): NunoMaduro\Collision\Adapters\Laravel\IgnitionSolutionsRepository->getFromThrowable()
#11 C:\inetpub\wwwroot\snipe-it\vendor\nunomaduro\collision\src\Writer.php(123): NunoMaduro\Collision\Writer->renderSolution()
#12 C:\inetpub\wwwroot\snipe-it\vendor\nunomaduro\collision\src\Handler.php(39): NunoMaduro\Collision\Writer->write()
#13 C:\inetpub\wwwroot\snipe-it\vendor\filp\whoops\src\Whoops\Run.php(370): NunoMaduro\Collision\Handler->handle()
#14 [internal function]: Whoops\Run->handleException()
#15 {main}
thrown

at C:\inetpub\wwwroot\snipe-it\vendor\facade\ignition\src\SolutionProviders\MergeConflictSolutionProvider.php:52
48▕ }
49▕
50▕ protected function getCurrentBranch(string $directory): string
51▕ {
➜ 52▕ $branch = "'".trim(shell_exec("cd ${directory}; git branch | grep \* | cut -d ' ' -f2"))."'";
53▕
54▕ if ($branch === "''") {
55▕ $branch = 'current branch';
56▕ }

Something went wrong with your backup. Aborting!

@snipe
Copy link
Owner

snipe commented Jan 22, 2025

When you run php -v from the command line, what do you see?

@snipe
Copy link
Owner

snipe commented Jan 22, 2025

You can also try skipping the upgrade.php and just run the commands manually.

git pull
php composer.phar install --no-dev --prefer-source
php composer.phar dump-autoload
php artisan migrate
php artisan config:clear
php artisan route:clear
php artisan cache:clear
php artisan view:clear

(Note that if you have composer installed globally, you would use composer instead of composer.phar)

@LSNIGHTSHOT
Copy link
Author

php -v posted:
PHP 8.2.27 (cli) (built: Dec 17 2024 14:38:53) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.2.27, Copyright (c) Zend Technologies

running php.composer.phar install --no-dev --prefer-sourfce returns:
Could not open input file: composer.phar

@snipe
Copy link
Owner

snipe commented Jan 22, 2025

Running php.composer.phar install --no-dev --prefer-sourfce returns:
Could not open input file: composer.phar

See above. "(Note that if you have composer installed globally, you would use composer instead of composer.phar)"

@LSNIGHTSHOT
Copy link
Author

Maybe I'm missing something this is the output of the command

C:\inetpub\wwwroot\snipe-it>php composer --no-dev --prefer-source
Could not open input file: composer

@snipe
Copy link
Owner

snipe commented Jan 22, 2025

I don't know where you've got composer installed. If it's not global and it's not using composer.phar, you'll need to prepend the path. You'll need to figure out where composer lives in your system.

@LSNIGHTSHOT
Copy link
Author

I've installed it in the same directory I'm launching the command from.

@LSNIGHTSHOT
Copy link
Author

Ended up doing a reinstall of the application to resolve the problem.

Thanks for your help today.

@snipe
Copy link
Owner

snipe commented Jan 22, 2025

Glad to hear you're all sorted! In the future, if you've resolved your issue, please try to remember to close your ticket - it helps us out a lot. (We have to manage a lot of tickets.)

tenant-tyvm

@snipe snipe closed this as completed Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants