munkireport / munkireport-php

A reporting tool for munki
MIT License
392 stars 138 forks source link

Error runing ./please migrate #1544

Closed InsulT closed 2 months ago

InsulT commented 2 months ago

Hi,

I set up a Azure Web app + database service and when try to run the please migrate command, got the following error:

[10-Jun-2024 09:33:24 UTC] PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/site/munkireport-php/app/Console/Commands/MigrationCommand.php on line 72 [10-Jun-2024 09:33:24 UTC] PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/site/munkireport-php/app/Console/Commands/MigrationCommand.php on line 72 [10-Jun-2024 09:33:24 UTC] PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/site/munkireport-php/app/Console/Commands/MigrationCommand.php on line 84 [10-Jun-2024 09:33:24 UTC] PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/site/munkireport-php/app/Console/Commands/MigrationCommand.php on line 84 [10-Jun-2024 09:33:24 UTC] PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/site/munkireport-php/app/Console/Commands/MigrationCommand.php on line 95 [10-Jun-2024 09:33:24 UTC] PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/site/munkireport-php/app/Console/Commands/MigrationCommand.php on line 165 [10-Jun-2024 09:33:24 UTC] PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/site/munkireport-php/app/Console/Commands/MigrationCommand.php on line 165 [10-Jun-2024 09:33:24 UTC] PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/site/munkireport-php/app/Console/Commands/MigrationCommand.php on line 165 [10-Jun-2024 09:33:24 UTC] PHP Fatal error: Uncaught Error: Call to undefined method Illuminate\Container\Container::runningUnitTests() in /home/site/munkireport-php/vendor/illuminate/console/Concerns/ConfiguresPrompts.php:31 Stack trace:

0 /home/site/munkireport-php/vendor/illuminate/console/Command.php(177): Illuminate\Console\Command->configurePrompts(Object(Symfony\Component\Console\Input\ArgvInput))

1 /home/site/munkireport-php/vendor/symfony/console/Application.php(1078): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

2 /home/site/munkireport-php/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\MigrateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

3 /home/site/munkireport-php/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

4 /home/site/munkireport-php/please(39): Symfony\Component\Console\Application->run()

5 {main}

thrown in /home/site/munkireport-php/vendor/illuminate/console/Concerns/ConfiguresPrompts.php on line 31

Any idea?

SSStechnical commented 2 months ago

I'm seeing the same error. What was your fix?

tuxudo commented 2 months ago

Make sure you are using PHP 8.1-8.3, update to the latest version of Composer, and make the following changes to the composer.json as outlined here https://github.com/munkireport/munkireport-php/pull/1531/files

SSStechnical commented 2 months ago

Thanks for your reply. Turns out I had a very old version of composer (1.10.10) hiding somewhere. Removed that and issue resolved