Skip to content

Commit d64a20b

Browse files
Merge pull request #50 from privacyidea/46-upgrade-upgrade-to-php-80
46 upgrade to php 8.0
2 parents ebc52bb + c4192d1 commit d64a20b

20 files changed

+624
-565
lines changed

.github/workflows/runTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: php-actions/phpunit@master
3636
with:
3737
version: 9.6.7
38-
php_version: 7.3
38+
php_version: 8.0
3939
php_extensions: xdebug
4040
bootstrap: vendor/autoload.php
4141
configuration: test/utils/phpunit.xml

Changelog.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
### v1.0.0 27-01-2023
1+
### v2.0.0
2+
* Added an optional client parameter to forward the client IP with the server requests (#17)
3+
* Code updated to support PHP8 (#46)
4+
* Tests will be temporarily disabled until modernization of http-mock is complete (#46)
5+
* PrivacyIDEA and PIResponse classes made private (#51)
6+
7+
### v1.0.0
28
* Added a possibility to enroll a new token via challenge (#23)
39
* Implementation of the preferred client mode (#20)
410

5-
### v0.9.3 24-01-2022
11+
### v0.9.3
612

713
* Supporting following tokens: OTP, Push, WebAuthn, U2F
814
* Token enrollment in the application
915
* Multiple WebAuthn
1016

11-
### v0.9.0 16-06-2021
17+
### v0.9.0
1218
* First Version supporting /validate/check and /validate/triggerchallenge endpoints

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This project is intended to ease the use of the privacyIDEA server REST API.
55
## Requirements
66

77
Curl is required for this project to work. If this project is installed using composer, curl is installed automatically.
8-
A PHP Version >=7.3 is preferred.
8+
A PHP Version >=8.0 is preferred.
99

1010
## Composer
1111

composer.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,10 @@
2121
}
2222
],
2323
"require": {
24-
"php": ">=7.3",
24+
"php": ">=8.0",
2525
"curl/curl": "*",
2626
"ext-json": "*",
2727
"ext-curl": "*"
2828
},
29-
"require-dev": {
30-
"phpunit/phpunit": "<=9.6.7",
31-
"internations/http-mock": "*"
32-
}
29+
"_comment": "require-dev: phpunit/phpunit: *, internations/http-mock: *"
3330
}

src/AuthenticationStatus.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
<?php
2+
/*
3+
* Copyright 2024 NetKnights GmbH - [email protected]
4+
* <p>
5+
* Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3;
6+
* you may not use this file except in compliance with the License.
7+
*
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
214

315
abstract class AuthenticationStatus
416
{

src/Client-Autoloader.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/PIBadRequestException.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
<?php
2-
3-
//namespace PrivacyIdea\PHPClient;
2+
/*
3+
* Copyright 2024 NetKnights GmbH - [email protected]
4+
* <p>
5+
* Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3;
6+
* you may not use this file except in compliance with the License.
7+
*
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
414

515
class PIBadRequestException extends Exception
616
{
7-
}
17+
}

src/PIChallenge.php

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,43 @@
11
<?php
2-
3-
//namespace PrivacyIdea\PHPClient;
2+
/*
3+
* Copyright 2024 NetKnights GmbH - [email protected]
4+
* <p>
5+
* Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3;
6+
* you may not use this file except in compliance with the License.
7+
*
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
414

515
class PIChallenge
616
{
7-
/* @var string Type of the token this challenge is for. */
8-
public $type = "";
17+
/* @var string Type of token this challenge is for. */
18+
public string $type = "";
919

10-
/* @var string Message for this challenge. */
11-
public $message = "";
20+
/* @var string Message extracted from this challenge. */
21+
public string $message = "";
1222

13-
/* @var string Image data for this challenge. */
14-
public $image = "";
23+
/* @var string Image data extracted from this challenge. */
24+
public string $image = "";
1525

1626
/* @var string TransactionId to reference this challenge in later requests. */
17-
public $transactionID = "";
27+
public string $transactionID = "";
1828

1929
/* @var string Client mode in which the challenge should be processed. */
20-
public $clientMode = "";
30+
public string $clientMode = "";
2131

22-
/* @var string Serial of the token this challenge is for. */
23-
public $serial = "";
32+
/* @var string Serial of token this challenge is for. */
33+
public string $serial = "";
2434

2535
/* @var string Arbitrary attributes that can be appended to the challenge by the server. */
26-
public $attributes = "";
36+
public string $attributes = "";
2737

28-
/* @var string JSON format */
29-
public $webAuthnSignRequest = "";
38+
/* @var string WebAuthn sign request in JSON format */
39+
public string $webAuthnSignRequest = "";
3040

31-
/* @var string JSON format */
32-
public $u2fSignRequest = "";
41+
/* @var string U2F sign request in JSON format */
42+
public string $u2fSignRequest = "";
3343
}

src/PILog.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
<?php
2-
3-
//namespace PrivacyIdea\PHPClient;
2+
/*
3+
* Copyright 2024 NetKnights GmbH - [email protected]
4+
* <p>
5+
* Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3;
6+
* you may not use this file except in compliance with the License.
7+
*
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
414

515
/**
6-
* Logging interface. This is used to relay the log messages of the PHP-Client to the logger implementation of the project that uses the client.
16+
* Logging interface. This is used to relay the log
17+
* messages of the PHP-Client to the logger
18+
* implementation of the project that uses the client.
719
*/
820
interface PILog
921
{

0 commit comments

Comments
 (0)