Skip to content

Commit b0dce54

Browse files
authored
Merge pull request #2191 from opensource-workshop/2-laravel10
[phpライブラリ] 2ブランチのLaravel9を10へアップデート
2 parents 9ece121 + 2bc1478 commit b0dce54

File tree

75 files changed

+2820
-2443
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2820
-2443
lines changed

.env.example

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ REDIS_HOST=127.0.0.1
3939
REDIS_PASSWORD=null
4040
REDIS_PORT=6379
4141

42-
MAIL_DRIVER=smtp
42+
MAIL_MAILER=smtp
4343
MAIL_HOST=smtp.mailtrap.io
4444
MAIL_PORT=2525
4545
MAIL_USERNAME=null
@@ -168,6 +168,14 @@ FACE_AI_API_KEY="${COMMON_API_KEY}"
168168

169169
# --- Connect-CMS Dusk option
170170

171+
#DUSK_DRIVER_URL=
172+
173+
# Do not create manuals in Dusk.
174+
#DUSK_NO_MANUAL_ALL=true
175+
176+
# Do not run API tests in Dusk.
177+
#DUSK_NO_API_TEST_ALL=true
178+
171179
# dusk use uploads dir.
172180
#UPLOADS_DIRECTORY_BASE=uploads_dusk/
173181

.gitattributes

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
* text=auto
2-
*.css linguist-vendored
3-
*.scss linguist-vendored
4-
*.js linguist-vendored
1+
* text=auto eol=lf
2+
3+
*.blade.php diff=html
4+
*.css diff=css
5+
*.html diff=html
6+
*.md diff=markdown
7+
*.php diff=php
8+
9+
/.github export-ignore
510
CHANGELOG.md export-ignore
11+
.styleci.yml export-ignore
12+
13+
# Connect-CMS
614
*.bat text eol=crlf

.github/workflows/laravel_dusk_connect-cms-test-matrix-daily.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
php: ['7.4', '8.0', '8.1']
23+
php: ['8.1', '8.2', '8.3']
2424

2525
name: ubuntu-latest-mysql PHP ${{ matrix.php }}
2626

@@ -45,6 +45,10 @@ jobs:
4545
sed -i -e 's|PDF_THUMBNAIL_API_URL=""|PDF_THUMBNAIL_API_URL="http://localhost:8000"|g' .env
4646
sed -i -e 's|FACE_AI_API_URL=""|FACE_AI_API_URL="http://localhost:8000"|g' .env
4747
# sed -e "$ a MANUAL_PUT_BASE=\"$GITHUB_WORKSPACE/tests/Manual/html/\"" .env
48+
# マニュアル出力しない
49+
sed -i -e 's|#DUSK_NO_MANUAL_ALL=true|DUSK_NO_MANUAL_ALL=true|g' .env
50+
# APIテストを実行しない
51+
sed -i -e 's|#DUSK_NO_API_TEST_ALL=true|DUSK_NO_API_TEST_ALL=true|g' .env
4852
4953
# schedule でphpバージョン指定
5054
# - name: Set if input php_version is empty
@@ -127,9 +131,10 @@ jobs:
127131
- name: Chrome Version
128132
run: /opt/google/chrome/chrome --version
129133

130-
# https://readouble.com/laravel/8.x/ja/dusk.html#managing-chromedriver-installations
131-
#- name: Upgrade Chrome Driver
132-
# run: php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`
134+
# https://readouble.com/laravel/10.x/ja/dusk.html#managing-chromedriver-installations
135+
- name: Upgrade Chrome Driver
136+
# run: php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`
137+
run: php artisan dusk:chrome-driver --detect
133138

134139
# https://stackoverflow.com/questions/76980975/chrome-driver-failing-in-laravel-dusk-failed-to-open-stream-http-request-fai
135140
# https://voicetechno-jp.secure-web.jp/ChromeDriverV115orNewer.html
@@ -145,24 +150,24 @@ jobs:
145150
# - name: Downgrade Chrome driver to v114
146151
# run: php artisan dusk:chrome-driver 114
147152

148-
- name: Set env CHROME_VERSION
149-
run: |
150-
echo CHROME_VERSION=`/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1` >> $GITHUB_ENV
153+
# - name: Set env CHROME_VERSION
154+
# run: |
155+
# echo CHROME_VERSION=`/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1` >> $GITHUB_ENV
151156

152157
# https://github.com/browser-actions/setup-chrome (community)
153-
- name: Download Chrome and Chrome Driver(use Chrome Driver Only)
154-
uses: browser-actions/setup-chrome@v1
155-
id: setup-chrome
156-
with:
157-
chrome-version: ${{ env.CHROME_VERSION }}
158-
install-chromedriver: true
158+
# - name: Download Chrome and Chrome Driver(use Chrome Driver Only)
159+
# uses: browser-actions/setup-chrome@v1
160+
# id: setup-chrome
161+
# with:
162+
# chrome-version: ${{ env.CHROME_VERSION }}
163+
# install-chromedriver: true
159164

160-
- name: Chrome Driver Copy
161-
run: sudo \cp -f ${{ steps.setup-chrome.outputs.chromedriver-path }} ./vendor/laravel/dusk/bin/chromedriver-linux
165+
# - name: Chrome Driver Copy
166+
# run: sudo \cp -f ${{ steps.setup-chrome.outputs.chromedriver-path }} ./vendor/laravel/dusk/bin/chromedriver-linux
162167

163-
- name: Chrome Driver Permission Denied 対応
164-
run: |
165-
sudo chmod +x ./vendor/laravel/dusk/bin/chromedriver-linux
168+
# - name: Chrome Driver Permission Denied 対応
169+
# run: |
170+
# sudo chmod +x ./vendor/laravel/dusk/bin/chromedriver-linux
166171

167172
- name: Start Chrome Driver
168173
run: ./vendor/laravel/dusk/bin/chromedriver-linux --port=9515 &
@@ -175,9 +180,9 @@ jobs:
175180
# - 事前準備用の実行
176181
# ---------------------------------------------
177182

178-
- name: 'Run Dusk データ準備用 - ログ管理 - マニュアルなし'
183+
- name: 'Run Dusk データ準備用 - ログ管理'
179184
if: always()
180-
run: php artisan dusk tests/Browser/Manage/LogManageTest.php no_manual
185+
run: php artisan dusk tests/Browser/Manage/LogManageTest.php
181186

182187
# ---------------------------------------------
183188
# - 設計 ①
@@ -345,7 +350,7 @@ jobs:
345350

346351
- name: 'Run Dusk スライドショー'
347352
if: always()
348-
run: php artisan dusk tests/Browser/User/SlideshowsPluginTest.php no_api_test
353+
run: php artisan dusk tests/Browser/User/SlideshowsPluginTest.php
349354

350355
- name: 'Run Dusk 開館カレンダー'
351356
if: always()

.github/workflows/laravel_dusk_connect-cms-test-matrix.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
php: ['8.0', '8.1', '8.2']
23+
php: ['8.1', '8.2', '8.3']
2424

2525
name: ubuntu-latest-mysql PHP ${{ matrix.php }}
2626

@@ -44,6 +44,8 @@ jobs:
4444
sed -i -e 's|TRANSLATE_API_URL=""|TRANSLATE_API_URL="http://localhost:8000"|g' .env
4545
sed -i -e 's|PDF_THUMBNAIL_API_URL=""|PDF_THUMBNAIL_API_URL="http://localhost:8000"|g' .env
4646
sed -i -e 's|FACE_AI_API_URL=""|FACE_AI_API_URL="http://localhost:8000"|g' .env
47+
sed -i -e 's|#DUSK_NO_MANUAL_ALL=true|DUSK_NO_MANUAL_ALL=true|g' .env
48+
sed -i -e 's|#DUSK_NO_API_TEST_ALL=true|DUSK_NO_API_TEST_ALL=true|g' .env
4749
# sed -e "$ a MANUAL_PUT_BASE=\"$GITHUB_WORKSPACE/tests/Manual/html/\"" .env
4850
4951
# schedule でphpバージョン指定
@@ -127,21 +129,21 @@ jobs:
127129
- name: Chrome Version
128130
run: /opt/google/chrome/chrome --version
129131

130-
# https://readouble.com/laravel/9.x/ja/dusk.html#managing-chromedriver-installations
131-
# https://readouble.com/laravel/9.x/ja/dusk.html#running-tests-on-github-actions
132+
# https://readouble.com/laravel/10.x/ja/dusk.html#managing-chromedriver-installations
133+
# https://readouble.com/laravel/10.x/ja/dusk.html#running-tests-on-github-actions
132134
# Chrome Version と Chrome Driverを同じにする
133135
- name: Upgrade Chrome Driver
134-
# run: php artisan dusk:chrome-driver --detect
136+
run: php artisan dusk:chrome-driver --detect
135137
# run: php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`
136-
run: php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3`
138+
# run: php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3`
137139

138-
- name: Chrome Driver Copy
139-
run: sudo \cp -f ./vendor/laravel/dusk/bin/chromedriver-linux64/chromedriver ./vendor/laravel/dusk/bin/chromedriver-linux
140+
# - name: Chrome Driver Copy
141+
# run: sudo \cp -f ./vendor/laravel/dusk/bin/chromedriver-linux64/chromedriver ./vendor/laravel/dusk/bin/chromedriver-linux
140142

141-
- name: Chrome Driver Permission Denied 対応
142-
run: |
143-
sudo chmod +x ./vendor/laravel/dusk/bin/chromedriver-linux64/chromedriver
144-
sudo chmod +x ./vendor/laravel/dusk/bin/chromedriver-linux
143+
# - name: Chrome Driver Permission Denied 対応
144+
# run: |
145+
# sudo chmod +x ./vendor/laravel/dusk/bin/chromedriver-linux64/chromedriver
146+
# sudo chmod +x ./vendor/laravel/dusk/bin/chromedriver-linux
145147

146148
# https://stackoverflow.com/questions/76980975/chrome-driver-failing-in-laravel-dusk-failed-to-open-stream-http-request-fai
147149
# https://voicetechno-jp.secure-web.jp/ChromeDriverV115orNewer.html
@@ -168,9 +170,9 @@ jobs:
168170
# - 事前準備用の実行
169171
# ---------------------------------------------
170172

171-
- name: 'Run Dusk データ準備用 - ログ管理 - マニュアルなし'
173+
- name: 'Run Dusk データ準備用 - ログ管理'
172174
if: always()
173-
run: php artisan dusk tests/Browser/Manage/LogManageTest.php no_manual
175+
run: php artisan dusk tests/Browser/Manage/LogManageTest.php
174176

175177
# ---------------------------------------------
176178
# - 設計 ①
@@ -338,7 +340,7 @@ jobs:
338340

339341
- name: 'Run Dusk スライドショー'
340342
if: always()
341-
run: php artisan dusk tests/Browser/User/SlideshowsPluginTest.php no_api_test
343+
run: php artisan dusk tests/Browser/User/SlideshowsPluginTest.php
342344

343345
- name: 'Run Dusk 開館カレンダー'
344346
if: always()

.github/workflows/laravel_dusk_connect-cms-test.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ on:
1212
description: 'テストするPHPバージョン'
1313
required: true
1414
options:
15-
- '8.0'
1615
- '8.1'
1716
- '8.2'
18-
default: '8.0'
17+
- '8.3'
18+
default: '8.1'
1919
# is_output_manual:
2020
# type: boolean
2121
# description: 'マニュアル出力'
2222
# default: 'false'
2323
env:
2424
# schedule用
25-
PHP_VERSION_DEFAULT: '8.0'
25+
PHP_VERSION_DEFAULT: '8.1'
2626
# IS_OUTPUT_MANUAL_DEFAULT: 'false'
2727

2828
jobs:
@@ -50,6 +50,10 @@ jobs:
5050
sed -i -e 's|PDF_THUMBNAIL_API_URL=""|PDF_THUMBNAIL_API_URL="http://localhost:8000"|g' .env
5151
sed -i -e 's|FACE_AI_API_URL=""|FACE_AI_API_URL="http://localhost:8000"|g' .env
5252
# sed -e "$ a MANUAL_PUT_BASE=\"$GITHUB_WORKSPACE/tests/Manual/html/\"" .env
53+
# マニュアル出力しない
54+
sed -i -e 's|#DUSK_NO_MANUAL_ALL=true|DUSK_NO_MANUAL_ALL=true|g' .env
55+
# APIテストを実行しない
56+
sed -i -e 's|#DUSK_NO_API_TEST_ALL=true|DUSK_NO_API_TEST_ALL=true|g' .env
5357
5458
# schedule でphpバージョン指定
5559
- name: Set if input php_version is empty
@@ -132,21 +136,21 @@ jobs:
132136
- name: Chrome Version
133137
run: /opt/google/chrome/chrome --version
134138

135-
# https://readouble.com/laravel/9.x/ja/dusk.html#managing-chromedriver-installations
136-
# https://readouble.com/laravel/9.x/ja/dusk.html#running-tests-on-github-actions
139+
# https://readouble.com/laravel/10.x/ja/dusk.html#managing-chromedriver-installations
140+
# https://readouble.com/laravel/10.x/ja/dusk.html#running-tests-on-github-actions
137141
# Chrome Version と Chrome Driverを同じにする
138142
- name: Upgrade Chrome Driver
139-
# run: php artisan dusk:chrome-driver --detect
143+
run: php artisan dusk:chrome-driver --detect
140144
# run: php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`
141-
run: php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3`
145+
# run: php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3`
142146

143-
- name: Chrome Driver Copy
144-
run: sudo \cp -f ./vendor/laravel/dusk/bin/chromedriver-linux64/chromedriver ./vendor/laravel/dusk/bin/chromedriver-linux
147+
# - name: Chrome Driver Copy
148+
# run: sudo \cp -f ./vendor/laravel/dusk/bin/chromedriver-linux64/chromedriver ./vendor/laravel/dusk/bin/chromedriver-linux
145149

146-
- name: Chrome Driver Permission Denied 対応
147-
run: |
148-
sudo chmod +x ./vendor/laravel/dusk/bin/chromedriver-linux64/chromedriver
149-
sudo chmod +x ./vendor/laravel/dusk/bin/chromedriver-linux
150+
# - name: Chrome Driver Permission Denied 対応
151+
# run: |
152+
# sudo chmod +x ./vendor/laravel/dusk/bin/chromedriver-linux64/chromedriver
153+
# sudo chmod +x ./vendor/laravel/dusk/bin/chromedriver-linux
150154

151155
# https://stackoverflow.com/questions/76980975/chrome-driver-failing-in-laravel-dusk-failed-to-open-stream-http-request-fai
152156
# https://voicetechno-jp.secure-web.jp/ChromeDriverV115orNewer.html
@@ -173,9 +177,9 @@ jobs:
173177
# - 事前準備用の実行
174178
# ---------------------------------------------
175179

176-
- name: 'Run Dusk データ準備用 - ログ管理 - マニュアルなし'
180+
- name: 'Run Dusk データ準備用 - ログ管理'
177181
if: always()
178-
run: php artisan dusk tests/Browser/Manage/LogManageTest.php no_manual
182+
run: php artisan dusk tests/Browser/Manage/LogManageTest.php
179183

180184
# ---------------------------------------------
181185
# - 設計 ①
@@ -343,7 +347,7 @@ jobs:
343347

344348
- name: 'Run Dusk スライドショー'
345349
if: always()
346-
run: php artisan dusk tests/Browser/User/SlideshowsPluginTest.php no_api_test
350+
run: php artisan dusk tests/Browser/User/SlideshowsPluginTest.php
347351

348352
- name: 'Run Dusk 開館カレンダー'
349353
if: always()

.github/workflows/phpcs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
workflow_dispatch:
2222

2323
env:
24-
PHP_VERSION: '8.0'
24+
PHP_VERSION: '8.1'
2525

2626
jobs:
2727
phpcs:

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
/.phpunit.cache
12
/node_modules
23
/public/debug
4+
/public/build
35
/public/hot
46
/public/storage
57
/public/themes/Users/*
@@ -11,16 +13,22 @@
1113
/vendor
1214
.env
1315
.env.backup
16+
.env.production
1417
.env.testing
1518
.env.dusk.*
1619
.phpunit.result.cache
1720
Homestead.json
1821
Homestead.yaml
22+
Homestead.json
23+
Homestead.yaml
24+
auth.json
1925
npm-debug.log
2026
yarn-error.log
27+
/.fleet
28+
/.idea
29+
/.vscode
2130
!.gitkeep
2231
/connect-cms.code-workspace
23-
.vscode/
2432
composer.phar
2533
migration_config.ini
2634
migration_config_nc3.ini

app/Console/Kernel.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ class Kernel extends ConsoleKernel
99
{
1010
/**
1111
* Define the application's command schedule.
12-
*
13-
* @param \Illuminate\Console\Scheduling\Schedule $schedule
14-
* @return void
1512
*/
16-
protected function schedule(Schedule $schedule)
13+
protected function schedule(Schedule $schedule): void
1714
{
1815
// $schedule->command('inspire')
1916
// ->hourly();
@@ -52,10 +49,8 @@ protected function schedule(Schedule $schedule)
5249

5350
/**
5451
* Register the commands for the application.
55-
*
56-
* @return void
5752
*/
58-
protected function commands()
53+
protected function commands(): void
5954
{
6055
$this->load(__DIR__.'/Commands');
6156
$this->load(__DIR__.'/CommandsOption');

app/Exceptions/Handler.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@
88

99
class Handler extends ExceptionHandler
1010
{
11-
/**
12-
* A list of the exception types that are not reported.
13-
*
14-
* @var array
15-
*/
16-
protected $dontReport = [
17-
//
18-
];
19-
2011
/**
2112
* A list of the inputs that are never flashed for validation exceptions.
2213
*
@@ -86,10 +77,9 @@ public function render($request, Throwable $exception)
8677
/**
8778
* Register the exception handling callbacks for the application.
8879
*
89-
* @return void
90-
* @link https://readouble.com/laravel/8.x/ja/errors.html#rendering-exceptions
80+
* @link https://readouble.com/laravel/10.x/ja/errors.html#rendering-exceptions
9181
*/
92-
public function register()
82+
public function register(): void
9383
{
9484
$this->renderable(function (\Swift_TransportException $e, $request) {
9585
// メール設定エラー

0 commit comments

Comments
 (0)