Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update run-tests.yml #111

Closed
wants to merge 32 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0633e32
Update run-tests.yml
askdkc Jan 16, 2024
aa7ae71
Update run-tests.yml
askdkc Jan 16, 2024
3d20762
Update composer.json
askdkc Jan 16, 2024
aa55527
Update composer.json
askdkc Jan 16, 2024
5956821
Update install command for Laravel 11
askdkc Jan 16, 2024
843a825
Fix styling
askdkc Jan 16, 2024
7f60983
Update test to support Laravel 11
askdkc Jan 16, 2024
72c8e5c
Merge branch 'laravel11' of github.com:askdkc/breezejp into laravel11
askdkc Jan 16, 2024
f083efc
Fix styling
askdkc Jan 16, 2024
d96130c
Fix to adopt Laravel 11 .env
askdkc Jan 16, 2024
e116fce
Fix styling
askdkc Jan 16, 2024
6126252
Using Laravel version for test
askdkc Jan 16, 2024
fdba968
Merge branch 'laravel11' of github.com:askdkc/breezejp into laravel11
askdkc Jan 16, 2024
1aca61c
Fix styling
askdkc Jan 16, 2024
b4905e2
Fix condition
askdkc Jan 16, 2024
4385358
Fix condition
askdkc Jan 16, 2024
fba9937
Merge branch 'laravel11' of github.com:askdkc/breezejp into laravel11
askdkc Jan 16, 2024
92ff933
Update run-tests.yml
askdkc Jan 16, 2024
95f976f
Update test case for 11
askdkc Jan 16, 2024
2a3f8b0
Fix styling
askdkc Jan 16, 2024
f95f848
Update CommandTest.php
askdkc Jan 16, 2024
c0e1a78
Merge branch 'laravel11' of github.com:askdkc/breezejp into laravel11
askdkc Jan 16, 2024
a75cd7f
debug
askdkc Jan 17, 2024
a42b217
Update CommandTest.php
askdkc Jan 17, 2024
5ae1d96
Fix styling
askdkc Jan 17, 2024
952dc88
Update BreezejpCommand.php
askdkc Jan 17, 2024
2042c83
Merge branch 'laravel11' of github.com:askdkc/breezejp into laravel11
askdkc Jan 17, 2024
24562bb
Fix styling
askdkc Jan 17, 2024
4acfa5a
Update BreezejpCommand.php
askdkc Jan 17, 2024
807f0c0
Fix Laravel 11 Issue
askdkc Jan 17, 2024
7b8658b
Fix styling
askdkc Jan 17, 2024
a039b23
Update run-tests.yml
askdkc Jan 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix to adopt Laravel 11 .env
askdkc committed Jan 16, 2024
commit d96130c9b77f29dd1b7c2fa6e0f2a72c3d777fc6
8 changes: 4 additions & 4 deletions src/Commands/BreezejpCommand.php
Original file line number Diff line number Diff line change
@@ -61,19 +61,19 @@
}

// For Laravel 11 and above
$this->info('.envのlocaleをjaにします');
$this->info('.envのAPP_LOCALEやTAPP_IMEZONEを日本にします');
// Read the contents of the file into a string
$configfile = file_get_contents(base_path('.env'));

// Modify the contents of the string
$configfile = str_replace("'locale' => 'en'", "'locale' => 'ja'", $configfile);
$configfile = str_replace("'faker_locale' => 'en_US'", "'faker_locale' => 'ja_JP'", $configfile);
$configfile = str_replace("'timezone' => 'UTC'", "'timezone' => 'Asia/Tokyo'", $configfile);
$configfile = str_replace("APP_LOCALE=en", "APP_LOCALE=ja", $configfile);
$configfile = str_replace("APP_FAKER_LOCALE=en", "APP_FAKER_LOCALE=ja_JP", $configfile);
$configfile = str_replace("APP_TIMEZONE=UTC", "APP_TIMEZONE=Asia/Tokyo", $configfile);

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

if ($this->confirm('GitHubリポジトリにスターの御協力をお願いします🙏', true)) {

Check failure on line 76 in src/Commands/BreezejpCommand.php

GitHub Actions / phpstan

Method Askdkc\Breezejp\Commands\BreezejpCommand::handle() should return int but return statement is missing.
$repoUrl = 'https://github.com/askdkc/breezejp';

if (PHP_OS_FAMILY == 'Darwin') {
8 changes: 4 additions & 4 deletions tests/CommandTest.php
Original file line number Diff line number Diff line change
@@ -28,9 +28,9 @@
$this->assertStringContainsString("'timezone' => 'Asia/Tokyo'", $configfile);
} else { // For Laravel 11 and above
$configfile = file_get_contents(base_path('.env'));
$this->assertStringContainsString("'locale' => 'ja'", $configfile);
$this->assertStringContainsString("'faker_locale' => 'ja_JP'", $configfile);
$this->assertStringContainsString("'timezone' => 'Asia/Tokyo'", $configfile);
$this->assertStringContainsString("APP_LOCALE=ja", $configfile);
$this->assertStringContainsString("APP_FAKER_LOCALE=ja_JP", $configfile);
$this->assertStringContainsString("APP_TIMEZONE=Asia/Tokyo", $configfile);
}
});

@@ -46,6 +46,6 @@
$this->assertStringContainsString("'timezone' => 'Asia/Tokyo'", $configfile);
} else { // For Laravel 11 and above
$configfile = file_get_contents(base_path('.env'));
$this->assertStringContainsString("'timezone' => 'Asia/Tokyo'", $configfile);
$this->assertStringContainsString("APP_TIMEZONE=Asia/Tokyo", $configfile);
}
});