Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Dec 11, 2024
1 parent a2b6238 commit 62a76b3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
],
"require": {
"php": ">=8.1",
"spiral/core": "^3.15",
"spiral/files": "^3.15",
"spiral/config": "^3.15",
"spiral/debug": "^3.15",
"spiral/exceptions": "^3.15",
"spiral/core": "^3.14.8",
"spiral/files": "^3.14.8",
"spiral/config": "^3.14.8",
"spiral/debug": "^3.14.8",
"spiral/exceptions": "^3.14.8",
"spiral/attributes": "^2.8|^3.0",
"spiral/events": "^3.15"
"spiral/events": "^3.14.8"
},
"require-dev": {
"phpunit/phpunit": "^10.1",
Expand Down
7 changes: 0 additions & 7 deletions src/Environment/AppEnvironment.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ public static function detect(EnvironmentInterface $environment): self
{
$value = $environment->get('APP_ENV');

// Aliases
$value = match ($value) {
'production' => self::Production->value,
'test' => self::Testing->value,
default => $value,
};

return \is_string($value)
? (self::tryFrom($value) ?? self::Local)
: self::Local;
Expand Down
2 changes: 1 addition & 1 deletion src/Injector/EnumInjector.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(
) {
}

public function createInjection(\ReflectionClass $class, string $context = null): UnitEnum
public function createInjection(\ReflectionClass $class, ?string $context = null): UnitEnum
{
$attribute = $this->reader->firstClassMetadata($class, ProvideFrom::class);
if ($attribute === null) {
Expand Down
4 changes: 0 additions & 4 deletions tests/Environment/AppEnvironmentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,9 @@ public static function envVariablesDataProvider(): \Traversable
{
yield ['wrong', AppEnvironment::Local];
yield ['prod', AppEnvironment::Production];
yield ['production', AppEnvironment::Production];
yield ['stage', AppEnvironment::Stage];
yield ['local', AppEnvironment::Local];
yield ['dev', AppEnvironment::Local];
yield ['development', AppEnvironment::Local];
yield ['testing', AppEnvironment::Testing];
yield ['test', AppEnvironment::Testing];
}

public function testClassMethods(): void
Expand Down

0 comments on commit 62a76b3

Please sign in to comment.