Skip to content

Commit

Permalink
Adjust Symfony bundle code to work with newer versions
Browse files Browse the repository at this point in the history
  • Loading branch information
stloyd committed Dec 15, 2023
1 parent 7171446 commit cea1922
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Aeon\RateLimiter\Algorithm\LeakyBucketAlgorithm;
use Aeon\RateLimiter\Algorithm\SlidingWindowAlgorithm;
use Aeon\RateLimiter\RateLimiter;
use Aeon\Symfony\AeonBundle\DependencyInjection\Loader\Configurator\LegacyConfigurator;
use Aeon\Symfony\AeonBundle\EventListener\RateLimitExceptionListener;
use Aeon\Symfony\AeonBundle\RateLimiter\RateLimitHttpProtocol;
use Aeon\Symfony\AeonBundle\RateLimiter\RequestIdentificationStrategy\HeaderRequestIdentificationStrategy;
Expand All @@ -29,9 +28,6 @@ final class AeonExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container) : void
{
// Trigger autoloading of legacy service function
\class_exists(LegacyConfigurator::class);

$config = $this->processConfiguration($this->getConfiguration($configs, $container), $configs);

$loader = new PhpFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

final class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
public function getConfigTreeBuilder() : TreeBuilder
{
$treeBuilder = new TreeBuilder('aeon');
/**
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class AeonDateTimeToDateTimeTransformer implements DataTransformerInterfac
/**
* @psalm-suppress MissingReturnType
*/
public function transform($value)
public function transform($value) : mixed
{
if ($value instanceof DateTime) {
return $value->toDateTimeImmutable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class AeonDayToDateTimeTransformer implements DataTransformerInterface
/**
* @psalm-suppress MissingReturnType
*/
public function transform($value)
public function transform($value) : mixed
{
if ($value instanceof Day) {
return $value->toDateTimeImmutable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class AeonTimeToDateTimeTransformer implements DataTransformerInterface
/**
* @psalm-suppress MissingReturnType
*/
public function transform($value)
public function transform($value) : mixed
{
if ($value instanceof Time) {
return new \DateTimeImmutable($value->toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class AeonTimeZoneToDateTimeTransformer implements DataTransformerInterfac
/**
* @psalm-suppress MissingReturnType
*/
public function transform($value)
public function transform($value) : mixed
{
if ($value instanceof TimeZone) {
return $value->toDateTimeZone();
Expand Down

0 comments on commit cea1922

Please sign in to comment.