Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Feature/update php jwt use php8 #246

Open
wants to merge 13 commits into
base: 3.x
Choose a base branch
from
Prev Previous commit
Next Next commit
fix: remove readonly keyword
  • Loading branch information
Gabriel Berthier committed Oct 19, 2023
commit 5801fb9f1c4ddc9c5683203f92d2a0aa9078ed52
1 change: 1 addition & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Updgrading from 2.x to 3.x

## New namespace

For most cases it is enough just to update the classname. Instead of using the old `Slim\Middleware` namespace:

```php
28 changes: 14 additions & 14 deletions src/JwtAuthentication/JwtAuthOptions.php
Original file line number Diff line number Diff line change
@@ -44,28 +44,28 @@
*/
class JwtAuthOptions
{
public readonly string $secret;
public string $secret;

public readonly bool $secure;
public bool $secure;

/** @var array<string> */
public readonly array $relaxed;
public readonly string $algorithm;
public readonly string $header;
public readonly string $regexp;
public readonly string $cookie;
public readonly string $attribute;
public array $relaxed;
public string $algorithm;
public string $header;
public string $regexp;
public string $cookie;
public string $attribute;
/** @var array<string> */
public readonly array $path;
public array $path;

/** @var RuleInterface[] $rules */
public readonly array $rules;
public array $rules;

/** @var array<string> */
public readonly array $ignore;
public readonly ?\Closure $before;
public readonly ?\Closure $after;
public readonly ?\Closure $error;
public array $ignore;
public ?\Closure $before;
public ?\Closure $after;
public ?\Closure $error;

private JwtAuthentication $jwtAuthentication;