Skip to content

Commit

Permalink
Fix Laravel 11 Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
askdkc committed Jan 17, 2024
1 parent 4acfa5a commit 807f0c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Commands/BreezejpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public function handle(): int
(new Filesystem)->ensureDirectoryExists(lang_path());
(new Filesystem)->copyDirectory(__DIR__.'/../../stubs/lang/', lang_path());

if (file_exists(base_path('config/app.php'))) {
$envfile = file_get_contents(base_path('.env'));

if (strpos($envfile, "APP_FAKER_LOCALE") == false) {
$this->info('config/app.phpのlocaleをjaにします');
// Read the contents of the file into a string
$configfile = file_get_contents(base_path('config/app.php'));
Expand Down Expand Up @@ -70,8 +72,6 @@ public function handle(): int
$configfile = str_replace('APP_FAKER_LOCALE=en_US', 'APP_FAKER_LOCALE=ja_JP', $configfile);
$configfile = str_replace('APP_TIMEZONE=UTC', 'APP_TIMEZONE=Asia/Tokyo', $configfile);

var_dump($configfile);

// Save the modified contents back to the file
file_put_contents(base_path('.env'), $configfile);

Expand Down
1 change: 0 additions & 1 deletion tests/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

test('.env file exists', function () {
$this->assertFileExists(base_path('.env'));
var_dump(file_get_contents(base_path('.env')));
});

test('breezejp command successfully run and see all the published files', closure: function () {
Expand Down

0 comments on commit 807f0c0

Please sign in to comment.