Skip to content

Conversation

@omarchouman
Copy link
Contributor

@omarchouman omarchouman commented Nov 3, 2025

This PR removes unused $app parameter from closure that doesn't use the application container instance.

Changes:

  • ConfigPublishCommand singleton: Remove unused $app parameter

Benefits:

  • Cleaner code that clearly shows when container access is not needed
  • Eliminates unused parameter warnings in static analysis tools
  • Consistent with Laravel's coding standards

Testing:

  • All existing tests continue to pass
  • No functional changes to service registration
  • Service is still properly registered as singleton

Before:

$this->app->singleton(ConfigPublishCommand::class, function ($app) {
    return new ConfigPublishCommand;
});

After:

$this->app->singleton(ConfigPublishCommand::class, function () {
    return new ConfigPublishCommand;
});

Remove unused $app parameter from ConfigPublishCommand singleton
closure as it is not needed.
@omarchouman omarchouman changed the title refactor: remove unused $app parameter in ArtisanServiceProvider refactor: remove unused parameter in ArtisanServiceProvider Nov 3, 2025
@taylorotwell taylorotwell merged commit b398db0 into laravel:12.x Nov 3, 2025
68 checks passed
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