Skip to content

Commit

Permalink
Switch to using Composer\InstalledVersions for AboutCommand to reduce…
Browse files Browse the repository at this point in the history
… necessity to update ServiceProvider with each update (#1748)
  • Loading branch information
lrljoe authored Jul 1, 2024
1 parent ce95a70 commit 5c40472
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/LaravelLivewireTablesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ class LaravelLivewireTablesServiceProvider extends ServiceProvider
public function boot(): void
{

AboutCommand::add('Rappasoft Laravel Livewire Tables', fn () => ['Version' => '3.2.7']);
if (class_exists(AboutCommand::class) && class_exists(\Composer\InstalledVersions::class)) {
AboutCommand::add('Rappasoft Laravel Livewire Tables', [
'Version' => \Composer\InstalledVersions::getPrettyVersion('rappasoft/laravel-livewire-tables'),
]);
}

$this->mergeConfigFrom(
__DIR__.'/../config/livewire-tables.php', 'livewire-tables'
Expand Down

0 comments on commit 5c40472

Please sign in to comment.