-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add install laravel/ui #65
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
Conversation
Pull Request Test Coverage Report for Build 18301550428Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@artengin as discussed, it seems that the main issue on the fresh laravel installations is the monologue package issue, let's try to fix it at first
> Illuminate\Foundation\ComposerScripts::prePackageUninstall
PHP Fatal error: Declaration of Monolog\Logger::emergency(Stringable|string $message, array $context = []): void must be compatible with Psr\Log\LoggerInterface::emergency($message, array $context = []) in /app/vendor/monolog/monolog/src/Monolog/Logger.php on line 683
PHP Fatal error: Uncaught Error: Class "Monolog\Logger" not found in /app/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php:60
Stack trace:
#0 /app/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php(38): Monolog\Handler\AbstractHandler->setLevel(Monolog\Level::Debug)
#1 /app/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php(52): Monolog\Handler\AbstractHandler->__construct(Monolog\Level::Debug, true)
#2 /app/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(197): Monolog\Handler\StreamHandler->__construct('/app/storage/lo...', Monolog\Level::Debug)
#3 /app/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(151): Illuminate\Log\LogManager->createEmergencyLogger()
#4 /app/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(125): Illuminate\Log\LogManager->get('stack')
#5 /app/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(703): Illuminate\Log\LogManager->driver()
#6 /app/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(403): Illuminate\Log\LogManager->error('Class "Monolog\\...', Array)
#7 /app/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(366): Illuminate\Foundation\Exceptions\Handler->reportThrowable(Object(Error))
#8 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(186): Illuminate\Foundation\Exceptions\Handler->report(Object(Error))
#9 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(258): Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Error))
#10 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->{closure:Illuminate\Foundation\Bootstrap\HandleExceptions::forwardsTo():257}(Object(Error))
#11 {main}
thrown in /app/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php on line 60
This error occurs when we choose to remove the initializer package after completion. The error can also be reproduced by simply installing a fresh Laravel instance and running these commands: composer create-project --prefer-dist laravel/laravel laravel-test
cd laravel-test
composer require ronasit/laravel-project-initializator --dev
composer remove ronasit/laravel-project-initializator --dev To fix the error, I added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds installation of the laravel/ui
package to the Laravel project initialization process and refactors the timing of when certain operations are performed.
- Adds
composer require laravel/ui
as the first command in the shell commands array - Moves the web login publishing step to execute after all composer requirements are installed
- Changes the package uninstallation to use
--no-script
flag and execute it separately at the end
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/Commands/InitCommand.php | Adds laravel/ui installation, refactors web login publishing timing, and improves package uninstallation handling |
tests/InitCommandTest.php | Updates test expectations to reflect the new command order and package installation changes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Refs: #39