Skip to content

fix: pass Closure to SettingsMigrator::update() instead of raw values#18

Merged
delicatacurtis merged 2 commits intomainfrom
copilot/fix-social-media-settings-update
Mar 6, 2026
Merged

fix: pass Closure to SettingsMigrator::update() instead of raw values#18
delicatacurtis merged 2 commits intomainfrom
copilot/fix-social-media-settings-update

Conversation

Copy link
Contributor

Copilot AI commented Mar 6, 2026

SettingsMigrator::update() requires a Closure as its second argument, but 2026_03_06_000000_update_social_media_settings.php was passing raw strings and null directly, causing a TypeError at runtime.

Changes

  • database/settings/2026_03_06_000000_update_social_media_settings.php: Wrapped all values in arrow functions in both up() and down().
// Before
$this->migrator->update('site.github_url', 'https://www.github.com/liberusoftware');

// After
$this->migrator->update('site.github_url', fn () => 'https://www.github.com/liberusoftware');

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@delicatacurtis delicatacurtis marked this pull request as ready for review March 6, 2026 14:29
Co-authored-by: delicatacurtis <247246500+delicatacurtis@users.noreply.github.com>
@delicatacurtis delicatacurtis merged commit 16e0a39 into main Mar 6, 2026
Copilot AI changed the title [WIP] Fix TypeError in social media settings migration fix: pass Closure to SettingsMigrator::update() instead of raw values Mar 6, 2026
Copilot stopped work on behalf of delicatacurtis due to an error March 6, 2026 14:29
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

Successfully merging this pull request may close these issues.

2 participants