From 23cd10e51d72aa0009708a1c84a148bbe38ccf04 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 12:01:19 +0800 Subject: [PATCH 01/19] [11.x] Fixes `config:publish` with `dontMergeFrameworkConfiguration()` set to `true` fixes #51736 Signed-off-by: Mior Muhammad Zaki --- src/Illuminate/Foundation/Console/ConfigPublishCommand.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Console/ConfigPublishCommand.php b/src/Illuminate/Foundation/Console/ConfigPublishCommand.php index 54ebce46eb94..12145e0a8dc3 100644 --- a/src/Illuminate/Foundation/Console/ConfigPublishCommand.php +++ b/src/Illuminate/Foundation/Console/ConfigPublishCommand.php @@ -91,10 +91,14 @@ protected function getBaseConfigurationFiles() { $config = []; + $dontMergeFrameworkConfiguration = $this->laravel->dontMergeFrameworkConfiguration(); + foreach (Finder::create()->files()->name('*.php')->in(__DIR__.'/../../../../config') as $file) { $name = basename($file->getRealPath(), '.php'); - $config[$name] = file_exists($stubPath = (__DIR__.'/../../../../config-stubs/'.$name.'.php')) ? $stubPath : $file->getRealPath(); + $config[$name] = ($dontMergeFrameworkConfiguration === true && file_exists($stubPath = (__DIR__.'/../../../../config-stubs/'.$name.'.php'))) + ? $stubPath + : $file->getRealPath(); } return collect($config)->sortKeys()->all(); From 57fef6ed1873b1fadf2a403e8612f2cf93f06453 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 12:03:45 +0800 Subject: [PATCH 02/19] wip Signed-off-by: Mior Muhammad Zaki --- src/Illuminate/Foundation/Console/ConfigPublishCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/Console/ConfigPublishCommand.php b/src/Illuminate/Foundation/Console/ConfigPublishCommand.php index 12145e0a8dc3..9369fb02e0c2 100644 --- a/src/Illuminate/Foundation/Console/ConfigPublishCommand.php +++ b/src/Illuminate/Foundation/Console/ConfigPublishCommand.php @@ -91,12 +91,12 @@ protected function getBaseConfigurationFiles() { $config = []; - $dontMergeFrameworkConfiguration = $this->laravel->dontMergeFrameworkConfiguration(); + $dontMergeConfiguration = $this->laravel->dontMergeFrameworkConfiguration(); foreach (Finder::create()->files()->name('*.php')->in(__DIR__.'/../../../../config') as $file) { $name = basename($file->getRealPath(), '.php'); - $config[$name] = ($dontMergeFrameworkConfiguration === true && file_exists($stubPath = (__DIR__.'/../../../../config-stubs/'.$name.'.php'))) + $config[$name] = ($dontMergeConfiguration === true && file_exists($stubPath = (__DIR__.'/../../../../config-stubs/'.$name.'.php'))) ? $stubPath : $file->getRealPath(); } From ff2c3429e7c8ce8c2e92860197fe7fb9d0ed8f5a Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 13:32:40 +0800 Subject: [PATCH 03/19] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 2 +- .../Bootstrap/RegisterProviders.php | 2 + .../Console/ConfigPublishCommandTest.php | 71 +++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 tests/Integration/Foundation/Console/ConfigPublishCommandTest.php diff --git a/composer.json b/composer.json index c9d8d71a2c02..404bb56f28b0 100644 --- a/composer.json +++ b/composer.json @@ -106,7 +106,7 @@ "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.6", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^9.1.4", + "orchestra/testbench-core": "9.1.x-dev", "pda/pheanstalk": "^5.0", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.5|^11.0", diff --git a/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php b/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php index 700651913caf..cfce0f6ca86e 100644 --- a/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php +++ b/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php @@ -3,6 +3,7 @@ namespace Illuminate\Foundation\Bootstrap; use Illuminate\Contracts\Foundation\Application; +use Illuminate\Support\DefaultProviders; class RegisterProviders { @@ -54,6 +55,7 @@ protected function mergeAdditionalProviders(Application $app) } } + $app->make('config')->set( 'app.providers', array_merge( diff --git a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php new file mode 100644 index 000000000000..00d58d9fb965 --- /dev/null +++ b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php @@ -0,0 +1,71 @@ + + */ + #[\Override] + protected function getApplicationProviders($app) + { + return ServiceProvider::defaultProviders()->toArray(); + } + + /** + * Resolve application core configuration implementation. + * + * @param \Illuminate\Foundation\Application $app + * @return void + */ + #[\Override] + protected function resolveApplicationConfiguration($app) + { + $app->instance('files', $files = new Filesystem()); + + $files->ensureDirectoryExists($app->basePath('config-stubs')); + + $app->instance(LoadConfiguration::class, new LoadConfiguration()); + + parent::resolveApplicationConfiguration($app); + } + + public function testItCanPublishConfigFilesWhenConfiguredWithDontMergeFrameworkConfiguration() + { + + $this->app->useConfigPath(base_path('config-stubs')); + + $this->app->dontMergeFrameworkConfiguration(); + + $this->artisan('config:publish', ['--all' => true])->assertOk(); + + foreach([ + 'app', 'auth', 'broadcasting', 'cache', 'cors', + 'database', 'filesystems', 'hashing', 'logging', + 'mail', 'queue', 'services', 'session', 'view' + ] as $file) { + $this->assertFilenameExists("config-stubs/{$file}.php"); + $this->assertStringContainsString( + file_get_contents(package_path(['config', "{$file}.php"])), file_get_contents(config_path("{$file}.php")) + ); + } + } +} From ea53fe0f550fca7b057751460d6b13b3b4e4c361 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Mon, 10 Jun 2024 05:33:06 +0000 Subject: [PATCH 04/19] Apply fixes from StyleCI --- src/Illuminate/Foundation/Bootstrap/RegisterProviders.php | 2 -- .../Foundation/Console/ConfigPublishCommandTest.php | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php b/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php index cfce0f6ca86e..700651913caf 100644 --- a/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php +++ b/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php @@ -3,7 +3,6 @@ namespace Illuminate\Foundation\Bootstrap; use Illuminate\Contracts\Foundation\Application; -use Illuminate\Support\DefaultProviders; class RegisterProviders { @@ -55,7 +54,6 @@ protected function mergeAdditionalProviders(Application $app) } } - $app->make('config')->set( 'app.providers', array_merge( diff --git a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php index 00d58d9fb965..72fd3ae4ec35 100644 --- a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php +++ b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php @@ -50,17 +50,16 @@ protected function resolveApplicationConfiguration($app) public function testItCanPublishConfigFilesWhenConfiguredWithDontMergeFrameworkConfiguration() { - $this->app->useConfigPath(base_path('config-stubs')); $this->app->dontMergeFrameworkConfiguration(); $this->artisan('config:publish', ['--all' => true])->assertOk(); - foreach([ + foreach ([ 'app', 'auth', 'broadcasting', 'cache', 'cors', 'database', 'filesystems', 'hashing', 'logging', - 'mail', 'queue', 'services', 'session', 'view' + 'mail', 'queue', 'services', 'session', 'view', ] as $file) { $this->assertFilenameExists("config-stubs/{$file}.php"); $this->assertStringContainsString( From c9fd802d10c97793144e2849fd483f91d334cbda Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 13:40:31 +0800 Subject: [PATCH 05/19] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 404bb56f28b0..c9d8d71a2c02 100644 --- a/composer.json +++ b/composer.json @@ -106,7 +106,7 @@ "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.6", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "9.1.x-dev", + "orchestra/testbench-core": "^9.1.4", "pda/pheanstalk": "^5.0", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.5|^11.0", From 9f46dcf06d762462009d4521c3362b942e3b9fc8 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 13:41:50 +0800 Subject: [PATCH 06/19] wip Signed-off-by: Mior Muhammad Zaki --- src/Illuminate/Foundation/Console/ConfigPublishCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/Console/ConfigPublishCommand.php b/src/Illuminate/Foundation/Console/ConfigPublishCommand.php index 9369fb02e0c2..8e87f064e24d 100644 --- a/src/Illuminate/Foundation/Console/ConfigPublishCommand.php +++ b/src/Illuminate/Foundation/Console/ConfigPublishCommand.php @@ -91,12 +91,12 @@ protected function getBaseConfigurationFiles() { $config = []; - $dontMergeConfiguration = $this->laravel->dontMergeFrameworkConfiguration(); + $shouldMergeConfiguration = $this->laravel->shouldMergeFrameworkConfiguration(); foreach (Finder::create()->files()->name('*.php')->in(__DIR__.'/../../../../config') as $file) { $name = basename($file->getRealPath(), '.php'); - $config[$name] = ($dontMergeConfiguration === true && file_exists($stubPath = (__DIR__.'/../../../../config-stubs/'.$name.'.php'))) + $config[$name] = ($shouldMergeConfiguration === true && file_exists($stubPath = (__DIR__.'/../../../../config-stubs/'.$name.'.php'))) ? $stubPath : $file->getRealPath(); } From 4dbfc3b33c5e7bf44513d7580f9806b1c34fa087 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 13:58:35 +0800 Subject: [PATCH 07/19] wip Signed-off-by: Mior Muhammad Zaki --- .../Foundation/Console/ConfigPublishCommandTest.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php index 72fd3ae4ec35..098a54e7deb6 100644 --- a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php +++ b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php @@ -2,7 +2,6 @@ namespace Illuminate\Tests\Integration\Foundation\Console; -use Illuminate\Filesystem\Filesystem; use Illuminate\Foundation\Bootstrap\LoadConfiguration; use Illuminate\Support\ServiceProvider; use Orchestra\Testbench\Concerns\InteractsWithPublishedFiles; @@ -39,10 +38,6 @@ protected function getApplicationProviders($app) #[\Override] protected function resolveApplicationConfiguration($app) { - $app->instance('files', $files = new Filesystem()); - - $files->ensureDirectoryExists($app->basePath('config-stubs')); - $app->instance(LoadConfiguration::class, new LoadConfiguration()); parent::resolveApplicationConfiguration($app); From da8a50add00380f4b709a3806fb0beff1e113736 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 14:08:45 +0800 Subject: [PATCH 08/19] wip Signed-off-by: Mior Muhammad Zaki --- .../Console/ConfigPublishCommandTest.php | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php index 098a54e7deb6..51cf6e229e1c 100644 --- a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php +++ b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php @@ -2,11 +2,11 @@ namespace Illuminate\Tests\Integration\Foundation\Console; +use Illuminate\Filesystem\Filesystem; use Illuminate\Foundation\Bootstrap\LoadConfiguration; use Illuminate\Support\ServiceProvider; use Orchestra\Testbench\Concerns\InteractsWithPublishedFiles; use Orchestra\Testbench\TestCase; - use function Orchestra\Testbench\package_path; class ConfigPublishCommandTest extends TestCase @@ -17,24 +17,28 @@ class ConfigPublishCommandTest extends TestCase 'config-stubs/*.php', ]; - /** - * Get application providers. - * - * @param \Illuminate\Foundation\Application $app - * @return array - */ + #[\Override] + protected function setUp(): void + { + $files = new Filesystem(); + + $this->afterApplicationCreated(function () use ($files) { + $files->ensureDirectoryExists($this->app->basePath('config-stubs')); + }); + + $this->beforeApplicationDestroyed(function () use ($files) { + $files->deleteDirectory($this->app->basePath('config-stubs')); + }); + + parent::setUp(); + } + #[\Override] protected function getApplicationProviders($app) { return ServiceProvider::defaultProviders()->toArray(); } - /** - * Resolve application core configuration implementation. - * - * @param \Illuminate\Foundation\Application $app - * @return void - */ #[\Override] protected function resolveApplicationConfiguration($app) { From 88c4a9bab724f09dfb7512785a0007c6cb83cdaf Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Mon, 10 Jun 2024 06:08:58 +0000 Subject: [PATCH 09/19] Apply fixes from StyleCI --- .../Integration/Foundation/Console/ConfigPublishCommandTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php index 51cf6e229e1c..3a723183132b 100644 --- a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php +++ b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php @@ -7,6 +7,7 @@ use Illuminate\Support\ServiceProvider; use Orchestra\Testbench\Concerns\InteractsWithPublishedFiles; use Orchestra\Testbench\TestCase; + use function Orchestra\Testbench\package_path; class ConfigPublishCommandTest extends TestCase From 50922dbb57e681b578d54126fe5659ab4032fe1d Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 14:23:30 +0800 Subject: [PATCH 10/19] wip Signed-off-by: Mior Muhammad Zaki --- .../Integration/Foundation/Console/ConfigPublishCommandTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php index 3a723183132b..429de1dfcd99 100644 --- a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php +++ b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php @@ -45,6 +45,8 @@ protected function resolveApplicationConfiguration($app) { $app->instance(LoadConfiguration::class, new LoadConfiguration()); + $app->dontMergeFrameworkConfiguration(); + parent::resolveApplicationConfiguration($app); } From a1f89a8b14a8c698c4f4f7c15a59bacefe396446 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 14:26:39 +0800 Subject: [PATCH 11/19] wip Signed-off-by: Mior Muhammad Zaki --- .../Foundation/Console/ConfigPublishCommandTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php index 429de1dfcd99..410eb15eb9fc 100644 --- a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php +++ b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php @@ -45,6 +45,8 @@ protected function resolveApplicationConfiguration($app) { $app->instance(LoadConfiguration::class, new LoadConfiguration()); + $app->useConfigPath($app->basePath('config-stubs')); + $app->dontMergeFrameworkConfiguration(); parent::resolveApplicationConfiguration($app); @@ -52,7 +54,7 @@ protected function resolveApplicationConfiguration($app) public function testItCanPublishConfigFilesWhenConfiguredWithDontMergeFrameworkConfiguration() { - $this->app->useConfigPath(base_path('config-stubs')); + // $this->app->useConfigPath(base_path('config-stubs')); $this->app->dontMergeFrameworkConfiguration(); From 39e06ee7fb47d3d930017e980bb864714ccd5a81 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 14:31:24 +0800 Subject: [PATCH 12/19] wip Signed-off-by: Mior Muhammad Zaki --- src/Illuminate/Foundation/Bootstrap/RegisterProviders.php | 3 ++- .../Foundation/Console/ConfigPublishCommandTest.php | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php b/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php index 700651913caf..2c608430063f 100644 --- a/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php +++ b/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php @@ -3,6 +3,7 @@ namespace Illuminate\Foundation\Bootstrap; use Illuminate\Contracts\Foundation\Application; +use Illuminate\Support\ServiceProvider; class RegisterProviders { @@ -57,7 +58,7 @@ protected function mergeAdditionalProviders(Application $app) $app->make('config')->set( 'app.providers', array_merge( - $app->make('config')->get('app.providers'), + $app->make('config')->get('app.providers') ?? ServiceProvider::defaultProviders()->toArray(), static::$merge, array_values($packageProviders ?? []), ), diff --git a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php index 410eb15eb9fc..cbdaf660792d 100644 --- a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php +++ b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php @@ -54,8 +54,6 @@ protected function resolveApplicationConfiguration($app) public function testItCanPublishConfigFilesWhenConfiguredWithDontMergeFrameworkConfiguration() { - // $this->app->useConfigPath(base_path('config-stubs')); - $this->app->dontMergeFrameworkConfiguration(); $this->artisan('config:publish', ['--all' => true])->assertOk(); From be048633422b3a53ee02b0c2c15990441f0b8397 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 14:49:31 +0800 Subject: [PATCH 13/19] Update ConfigPublishCommandTest.php --- .../Foundation/Console/ConfigPublishCommandTest.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php index cbdaf660792d..07810b7c30d6 100644 --- a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php +++ b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php @@ -34,12 +34,6 @@ protected function setUp(): void parent::setUp(); } - #[\Override] - protected function getApplicationProviders($app) - { - return ServiceProvider::defaultProviders()->toArray(); - } - #[\Override] protected function resolveApplicationConfiguration($app) { From e252e693fa40810521871480727be9a1567afe0a Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Mon, 10 Jun 2024 06:49:39 +0000 Subject: [PATCH 14/19] Apply fixes from StyleCI --- .../Integration/Foundation/Console/ConfigPublishCommandTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php index 07810b7c30d6..4e2a0c44fc25 100644 --- a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php +++ b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php @@ -4,7 +4,6 @@ use Illuminate\Filesystem\Filesystem; use Illuminate\Foundation\Bootstrap\LoadConfiguration; -use Illuminate\Support\ServiceProvider; use Orchestra\Testbench\Concerns\InteractsWithPublishedFiles; use Orchestra\Testbench\TestCase; From d42f151e401dd7251e8fccb50dfd83393d9b8699 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 14:56:22 +0800 Subject: [PATCH 15/19] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c9d8d71a2c02..ad1ddeff5906 100644 --- a/composer.json +++ b/composer.json @@ -106,7 +106,7 @@ "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.6", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^9.1.4", + "orchestra/testbench-core": "^9.1.5", "pda/pheanstalk": "^5.0", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.5|^11.0", From 6b4d7c05b8fbabe893dc03210210230073cae88f Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 15:00:26 +0800 Subject: [PATCH 16/19] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ad1ddeff5906..404bb56f28b0 100644 --- a/composer.json +++ b/composer.json @@ -106,7 +106,7 @@ "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.6", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^9.1.5", + "orchestra/testbench-core": "9.1.x-dev", "pda/pheanstalk": "^5.0", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.5|^11.0", From cdc10529013484885dd9083367c6694ee6ae0eb8 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 15:08:34 +0800 Subject: [PATCH 17/19] Update ConfigPublishCommandTest.php --- .../Integration/Foundation/Console/ConfigPublishCommandTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php index 4e2a0c44fc25..2411ca817bab 100644 --- a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php +++ b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php @@ -47,8 +47,6 @@ protected function resolveApplicationConfiguration($app) public function testItCanPublishConfigFilesWhenConfiguredWithDontMergeFrameworkConfiguration() { - $this->app->dontMergeFrameworkConfiguration(); - $this->artisan('config:publish', ['--all' => true])->assertOk(); foreach ([ From 84913ace0aaa2fa9c0d42867fa63782f1df4b9a9 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 17:25:19 +0800 Subject: [PATCH 18/19] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 404bb56f28b0..ad1ddeff5906 100644 --- a/composer.json +++ b/composer.json @@ -106,7 +106,7 @@ "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.6", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "9.1.x-dev", + "orchestra/testbench-core": "^9.1.5", "pda/pheanstalk": "^5.0", "phpstan/phpstan": "^1.4.7", "phpunit/phpunit": "^10.5|^11.0", From 5bca51039fa04f07f8b9bb087c2db4ab153da988 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 10 Jun 2024 18:47:26 +0800 Subject: [PATCH 19/19] wip Signed-off-by: Mior Muhammad Zaki --- .../Foundation/Console/ConfigPublishCommandTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php index 2411ca817bab..4fd08ebc6d54 100644 --- a/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php +++ b/tests/Integration/Foundation/Console/ConfigPublishCommandTest.php @@ -4,6 +4,7 @@ use Illuminate\Filesystem\Filesystem; use Illuminate\Foundation\Bootstrap\LoadConfiguration; +use Illuminate\Support\ServiceProvider; use Orchestra\Testbench\Concerns\InteractsWithPublishedFiles; use Orchestra\Testbench\TestCase; @@ -59,5 +60,7 @@ public function testItCanPublishConfigFilesWhenConfiguredWithDontMergeFrameworkC file_get_contents(package_path(['config', "{$file}.php"])), file_get_contents(config_path("{$file}.php")) ); } + + $this->assertSame(config('app.providers'), ServiceProvider::defaultProviders()->toArray()); } }