File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 2525 name : Setup PHP
2626 uses : shivammathur/setup-php@v2
2727 with :
28- php-version : " 8.1 "
28+ php-version : " 8.5 "
2929 extensions : mbstring, zip
3030 tools : composer:2, php-cs-fixer:3
3131 coverage : none
4343 matrix :
4444 php-version :
4545 - " 5.3"
46- - " 8.4 "
46+ - " 8.5 "
4747 steps :
4848 -
4949 name : Setup PHP
@@ -91,13 +91,14 @@ jobs:
9191 - " 8.2"
9292 - " 8.3"
9393 - " 8.4"
94+ - " 8.5"
9495 include :
9596 - os : windows-latest
9697 php-version : " 5.6"
9798 - os : windows-latest
9899 php-version : " 7.4"
99100 - os : windows-latest
100- php-version : " 8.4 "
101+ php-version : " 8.5 "
101102 runs-on : ${{ matrix.os }}
102103 steps :
103104 -
Original file line number Diff line number Diff line change @@ -173,14 +173,24 @@ class DocumentStorage
173173 private function fetch ($ path )
174174 {
175175 $ url = $ this ->baseUrl . '/ ' . ltrim ($ path , '/ ' );
176+ if (defined ('PHP_VERSION_ID ' ) && \PHP_VERSION_ID >= 80400 ) {
177+ http_clear_last_response_headers ();
178+ }
176179 set_error_handler (function () {}, -1 );
177180 $ content = file_get_contents ($ url , false , $ this ->context );
178181 restore_error_handler ();
179182 if ($ content === false ) {
180183 $ details = '' ;
181- /** @var array $http_response_header */
182- if (!empty ($ http_response_header )) {
183- $ details = " - {$ http_response_header [0 ]}" ;
184+ if (defined ('PHP_VERSION_ID ' ) && \PHP_VERSION_ID >= 80400 ) {
185+ $ lastResponseHeaders = http_get_last_response_headers ();
186+ } elseif (!empty ($ http_response_header )) {
187+ $ varName = 'http_response_header ' ;
188+ $ lastResponseHeaders = $ {$ varName };
189+ } else {
190+ $ lastResponseHeaders = null ;
191+ }
192+ if (!empty ($ lastResponseHeaders )) {
193+ $ details = " - {$ lastResponseHeaders [0 ]}" ;
184194 }
185195 throw new RuntimeException ("Failed to download from {$ url }{$ details }" );
186196 }
You can’t perform that action at this time.
0 commit comments