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

Add PHP 8.3 support #9019

Merged
merged 4 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 7 additions & 3 deletions .github/workflows/loristest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.1', '8.2']
php: ['8.1', '8.2', '8.3']
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2']
php: ['8.1', '8.2', '8.3']
apiversion: ['v0.0.3', 'v0.0.4-dev']
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
fail-fast: false
matrix:
testsuite: ['integration']
php: ['8.1','8.2']
php: ['8.1','8.2', '8.3']
ci_node_index: [0,1,2,3]

include:
Expand All @@ -220,10 +220,14 @@ jobs:
php: '8.1'
- testsuite: 'static'
php: '8.2'
- testsuite: 'static'
php: '8.3'
- testsuite: 'unit'
php: '8.1'
- testsuite: 'unit'
php: '8.2'
- testsuite: 'unit'
php: '8.3'

steps:
- uses: actions/checkout@v2
Expand Down
66 changes: 34 additions & 32 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{ pkgs ? import <nixpkgs> {} }:
let
php = pkgs.php82.withExtensions ({ enabled, all }:
php = pkgs.php83.withExtensions ({ enabled, all }:
enabled ++ [ all.ast ]);
in
pkgs.mkShell {
buildInputs = with pkgs; [ php git nodejs php82Packages.composer ];
buildInputs = with pkgs; [ php git nodejs php83Packages.composer ];
shellHook =
''
php -v;
Expand Down
4 changes: 2 additions & 2 deletions src/Http/DataIteratorBinaryStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ public function getContents()
* stream_get_meta_data() function.
*
* @see http://php.net/manual/en/function.stream-get-meta-data.php
* @param string $key Specific metadata to retrieve.
* @param ?string $key Specific metadata to retrieve.
* @return array|mixed|null Returns an associative array if no key is
* provided. Returns a specific key value if a key is provided and the
* value is found, or null if the key is not found.
*/
public function getMetadata($key = null)
public function getMetadata(?string $key = null)
{
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Http/StringStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,15 @@ public function getContents()
* The keys returned are identical to the keys returned from PHP's
* stream_get_meta_data() function.
*
* @param string $key Specific metadata to retrieve.
* @param ?string $key Specific metadata to retrieve.
*
* @see http://php.net/manual/en/function.stream-get-meta-data.php
*
* @return array|mixed|null Returns an associative array if no key is
* provided. Returns a specific key value if a key is provided and the
* value is found, or null if the key is not found.
*/
public function getMetadata($key = null)
public function getMetadata(?string $key = null)
{
$metadata = stream_get_meta_data($this->stream);
if ($key === null) {
Expand Down
4 changes: 2 additions & 2 deletions src/Router/BaseRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function handle(ServerRequestInterface $request) : ResponseInterface
$baseurl = $uri->withPath($baseurl)->withQuery("");
$request = $request->withAttribute("baseurl", $baseurl->__toString());

$factory->setBaseURL($baseurl);
$factory->setBaseURL((string )$baseurl);

$module = $this->loris->getModule($modulename);
$module->registerAutoloader();
Expand All @@ -137,7 +137,7 @@ public function handle(ServerRequestInterface $request) : ResponseInterface
if (preg_match("/^([0-9]{6})$/", $components[0])) {
$baseurl = $uri->withPath("")->withQuery("");

$factory->setBaseURL($baseurl);
$factory->setBaseURL((string )$baseurl);
if (count($components) == 1) {
$request = $request
->withAttribute("baseurl", $baseurl->__toString())
Expand Down
Loading