Skip to content

Commit

Permalink
require php >= 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kpicaza committed Jul 2, 2023
1 parent 67ddc27 commit f999b3a
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 91 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
push:
branches:
- "1.x.x"
- "3.x.x"

jobs:
coding-standards:
Expand All @@ -19,9 +19,8 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
operating-system:
- "ubuntu-latest"

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/mutation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
push:
branches:
- "1.x.x"
- "3.x.x"

jobs:
mutation-tests:
Expand All @@ -19,9 +19,8 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
operating-system:
- "ubuntu-latest"

Expand Down Expand Up @@ -62,4 +61,4 @@ jobs:
env:
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

5 changes: 2 additions & 3 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
push:
branches:
- "1.x.x"
- "3.x.x"

jobs:
phpunit:
Expand All @@ -19,9 +19,8 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
operating-system:
- "ubuntu-latest"

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
push:
branches:
- "1.x.x"
- "3.x.x"

jobs:
static-analysis-psalm:
Expand All @@ -19,9 +19,8 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
operating-system:
- "ubuntu-latest"

Expand Down
67 changes: 0 additions & 67 deletions .github/workflows/release-on-milestone-closed.yml

This file was deleted.

13 changes: 8 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
}
],
"require": {
"php": ">=7.4.0|^8.0",
"psr/container": "^1.0"
"php": "~8.1.0 || ~8.2.0",
"psr/container": "^2.0"
},
"require-dev": {
"infection/infection": "^0.25",
"phpro/grumphp": "^1.0",
"phpstan/phpstan": "^1.2",
"phpunit/phpunit": "^9.0",
"roave/infection-static-analysis-plugin": "^1.11",
"roave/infection-static-analysis-plugin": "^1.32",
"squizlabs/php_codesniffer": "^3.4",
"symfony/var-dumper": "^5.0",
"vimeo/psalm": "^4.0.0"
Expand Down Expand Up @@ -60,6 +59,10 @@
}
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"infection/extension-installer": true,
"phpro/grumphp": true
}
}
}
1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
<psalm
totallyTyped="false"
errorLevel="1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
Expand Down
4 changes: 2 additions & 2 deletions src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(ContainerConfig $configuredDependencies, bool $autow
$this->resolver = new InstanceResolver($this->configuredDependencies, $this->loadedDependencies, $this);
}

public function get($id)
public function get(string $id)
{
if ($this->loadedDependencies->has($id)) {
return $this->loadedDependencies->get($id);
Expand All @@ -40,7 +40,7 @@ public function get($id)
return $this->loadedDependencies->get($id);
}

public function has($id): bool
public function has(string $id): bool
{
return $this->loadedDependencies->has($id)
|| $this->configuredDependencies->has($id);
Expand Down
6 changes: 3 additions & 3 deletions tests/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ public function testItShouldCreateAConfiguredContainerFromFrameworkConfigWithCon
InvalidArgumentException::class => [
'class' => InvalidArgumentException::class,
'arguments' => [
'message' => 'Oh Oh!!',
'code' => 0,
'previous' => null,
'$message' => 'Oh Oh!!',
'$code' => 0,
'$previous' => null,
]
],
],
Expand Down

0 comments on commit f999b3a

Please sign in to comment.