Return if no egg was selected in the Installer - #2073
Conversation
📝 WalkthroughWalkthroughRemoves the Changes
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/Livewire/Installer/PanelInstaller.php (1)
249-249: Remove redundant return statement.The
return;statement on line 249 is redundant since it's at the end of the try block. The method will naturally exit at this point, and the only code after this is the catch block which handles exceptions.🔎 Proposed cleanup
->persistent() ->send(); - - return; } catch (Exception $exception) {
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/Livewire/Installer/PanelInstaller.php
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: Boy132
Repo: pelican-dev/panel PR: 1947
File: app/Http/Controllers/Api/Application/Eggs/EggController.php:88-104
Timestamp: 2025-12-15T22:09:08.200Z
Learning: In the pelican-dev/panel codebase, the YAML parser used by EggImporterService can natively handle JSON content, so there's no need to explicitly specify the format when importing eggs.
🔇 Additional comments (2)
app/Livewire/Installer/PanelInstaller.php (2)
228-234: Excellent fix for issue #2072!The early return when no eggs are selected correctly prevents the "Egg Install Started" notification from displaying when zero eggs are present. Since
array_get()on line 231 defaults to an empty array, the checkif (!$selectedEggs)will properly detect the empty state and return early.
131-131: No external callers affected by signature change.Verification confirms that no callers of the
submit()method pass the removedEggImporterServiceparameter, making this a safe refactoring. The service remains properly used elsewhere in the codebase (notably inInstallEgg::handle()), confirming the parameter removal was intentional.
Closes #2072