Skip to content

Commit

Permalink
refactor: upgrade for ecphp/cas-lib >= 4
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Apr 8, 2024
1 parent 3b0068c commit 6c1702c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 46 deletions.
10 changes: 4 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@
],
"homepage": "https://github.com/ecphp/",
"require": {
"php": ">= 8.0.2",
"php": ">= 8.1",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-simplexml": "*",
"ecphp/cas-lib": "^2.0",
"ecphp/cas-lib": "^3.0",
"laravel/framework": "^9 || ^10"
},
"require-dev": {
Expand All @@ -37,9 +35,9 @@
},
"config": {
"allow-plugins": {
"phpstan/extension-installer": true,
"ergebnis/composer-normalize": true,
"phpro/grumphp": true,
"ergebnis/composer-normalize": true
"phpstan/extension-installer": true
}
}
}
42 changes: 2 additions & 40 deletions src/Config/Laravel.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use EcPhp\CasLib\Contract\Configuration\PropertiesInterface;
use Illuminate\Routing\Router;
use Illuminate\Routing\Router as RouterInterface;
use ReturnTypeWillChange;
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

Expand All @@ -39,46 +38,9 @@ public function __construct(
);
}

public function all(): array
public function jsonSerialize(): mixed
{
return $this->cas->all();
}

/**
* @param mixed $offset
*/
#[ReturnTypeWillChange]
public function offsetExists($offset): bool
{
return $this->cas->offsetExists($offset);
}

/**
* @param mixed $offset
*
* @return array<string, mixed>|mixed
*/
#[ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->cas->offsetGet($offset);
}

/**
* @param mixed $offset
* @param mixed $value
*/
public function offsetSet($offset, $value): void
{
$this->cas->offsetSet($offset, $value);
}

/**
* @param mixed $offset
*/
public function offsetUnset($offset): void
{
$this->cas->offsetUnset($offset);
return $this->cas->jsonSerialize();
}

/**
Expand Down

0 comments on commit 6c1702c

Please sign in to comment.