File tree Expand file tree Collapse file tree 2 files changed +49
-1
lines changed Expand file tree Collapse file tree 2 files changed +49
-1
lines changed Original file line number Diff line number Diff line change 4646
4747 - name : Test benchmarks
4848 run : composer run bench -- --runs=1
49+
50+ laravel :
51+
52+ name : Laravel
53+ runs-on : ubuntu-latest
54+ timeout-minutes : 5
55+
56+ services :
57+ redis :
58+ image : redis
59+ ports :
60+ - 6379:6379
61+ options : >-
62+ --health-cmd "redis-cli ping"
63+ --health-interval 1s
64+ --health-timeout 1s
65+ --health-retries 5
66+
67+ steps :
68+ - name : Checkout code
69+ uses : actions/checkout@v3
70+
71+ - name : Setup PHP
72+ uses : shivammathur/setup-php@v2
73+ with :
74+ php-version : ' 8.2'
75+ extensions : redis, relay
76+ tools : composer
77+ coverage : none
78+
79+ - name : Install Laravel installer
80+ run : composer require laravel/installer --no-interaction --prefer-dist --optimize-autoloader
81+
82+ - name : Install Laravel example app
83+ run : composer exec laravel new example-app
84+
85+ - name : Install Composer dependencies
86+ working-directory : example-app
87+ run : |
88+ composer config repositories.cachewerk/relay path ${{ github.workspace }}
89+ composer require cachewerk/relay @dev
90+
91+ - name : Make and run test command
92+ working-directory : example-app
93+ run : |
94+ php artisan make:command VerifyRelay --no-interaction
95+ sed -i 's|//|dump(\\CacheWerk\\Relay\\Laravel\\Relay::stats(), \\Illuminate\\Support\\Facades\\Redis::info());|' app/Console/Commands/VerifyRelay.php
96+ REDIS_CLIENT=relay php artisan app:verify-relay
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ protected function establishConnection($client, array $config)
136136
137137 $ parameters = [
138138 $ this ->formatHost ($ config ),
139- $ config ['port ' ],
139+ is_scalar ( $ config ['port ' ]) ? ( int ) $ config [ ' port ' ] : 0 ,
140140 Arr::get ($ config , 'timeout ' , 0.0 ),
141141 $ persistent ? Arr::get ($ config , 'persistent_id ' , null ) : null ,
142142 Arr::get ($ config , 'retry_interval ' , 0 ),
You can’t perform that action at this time.
0 commit comments