Skip to content

Commit

Permalink
Fixed deprecation warning since PHP 8 when using registerEAB method
Browse files Browse the repository at this point in the history
* Fixes PHP 8 deprecation: Optional parameter declared before required parameter

* updated README.md / version number
  • Loading branch information
skoerfgen committed Aug 3, 2022
1 parent 7065648 commit 5cf724c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ACMECert

PHP client library for [Let's Encrypt](https://letsencrypt.org/) and other [ACME v2 - RFC 8555](https://tools.ietf.org/html/rfc8555) compatible Certificate Authorities.
Version: 3.2.0
Version: 3.2.1

## Description

Expand Down Expand Up @@ -467,7 +467,7 @@ public array ACMECert::register ( bool $termsOfServiceAgreed = FALSE [, mixed $c

Associate the loaded account key with the CA account using External Account Binding (EAB) credentials and optionally specify contacts.
```php
public array ACMECert::registerEAB ( bool $termsOfServiceAgreed = FALSE, string $eab_kid, string $eab_hmac [, mixed $contacts = array() ] )
public array ACMECert::registerEAB ( bool $termsOfServiceAgreed, string $eab_kid, string $eab_hmac [, mixed $contacts = array() ] )
```
###### Parameters
> **`termsOfServiceAgreed`**
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "skoerfgen/acmecert",
"version": "3.2.0",
"version": "3.2.1",
"description": "PHP client library for Let's Encrypt and other ACME v2 - RFC 8555 compatible Certificate Authorities",
"license": "MIT",
"authors": [
Expand Down
2 changes: 1 addition & 1 deletion src/ACMECert.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function register($termsOfServiceAgreed=false,$contacts=array()){
return $this->_register($termsOfServiceAgreed,$contacts);
}

public function registerEAB($termsOfServiceAgreed=false,$eab_kid,$eab_hmac,$contacts=array()){
public function registerEAB($termsOfServiceAgreed,$eab_kid,$eab_hmac,$contacts=array()){
if (!$this->resources) $this->readDirectory();

$protected=array(
Expand Down
2 changes: 1 addition & 1 deletion src/ACMEv2.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ private function http_request($url,$data=null){
}

$method=$data===false?'HEAD':($data===null?'GET':'POST');
$user_agent='ACMECert v3.2.0 (+https://github.com/skoerfgen/ACMECert)';
$user_agent='ACMECert v3.2.1 (+https://github.com/skoerfgen/ACMECert)';
$header=($data===null||$data===false)?array():array('Content-Type: application/jose+json');
if ($this->ch) {
$headers=array();
Expand Down

0 comments on commit 5cf724c

Please sign in to comment.