Skip to content

Commit d3a2fc4

Browse files
Add php 8.4 support (#30)
1 parent 9033be9 commit d3a2fc4

8 files changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
php:
4040
- 8.2
4141
- 8.3
42+
- 8.4
4243

4344
steps:
4445
- name: Checkout
@@ -63,7 +64,7 @@ jobs:
6364
run: echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
6465

6566
- name: Cache dependencies installed with composer
66-
uses: actions/cache@v2
67+
uses: actions/cache@v4
6768
with:
6869
path: ${{ env.COMPOSER_CACHE_DIR }}
6970
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}

.github/workflows/composer-dependency-analyser.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
php:
4141
- 8.2
4242
- 8.3
43+
- 8.4
4344

4445
steps:
4546
- name: Checkout

.github/workflows/static.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
php:
3636
- 8.2
3737
- 8.3
38+
- 8.4
3839

3940
steps:
4041
- name: Checkout
@@ -51,7 +52,7 @@ jobs:
5152
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
5253

5354
- name: Cache dependencies installed with composer
54-
uses: actions/cache@v2
55+
uses: actions/cache@v4
5556
with:
5657
path: ${{ env.COMPOSER_CACHE_DIR }}
5758
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"minimum-stability": "stable",
1313
"require": {
14-
"php": "^8.2",
14+
"php": "~8.2||~8.3||~8.4",
1515
"botasis/telegram-client": "^1.0",
1616
"psr/container": "^2.0",
1717
"psr/event-dispatcher": "^1.0",

src/Console/GetUpdatesCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function __construct(
2626
private readonly Application $application,
2727
private readonly UpdateFactory $updateFactory,
2828
private readonly LoggerInterface $logger = new NullLogger(),
29-
string $name = null,
29+
?string $name = null,
3030
) {
3131
parent::__construct($name);
3232
}

src/Console/SetTelegramWebhookCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final class SetTelegramWebhookCommand extends Command
2424
public function __construct(
2525
private readonly ClientInterface $client,
2626
private readonly QuestionHelper $questionHelper,
27-
string $name = null
27+
?string $name = null
2828
) {
2929
parent::__construct($name);
3030
}

tests/Middleware/MiddlewareDispatcherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function handle(Update $update): ResponseInterface
205205
}
206206

207207
private function createDispatcher(
208-
ContainerInterface $container = null,
208+
?ContainerInterface $container = null,
209209
?EventDispatcherInterface $eventDispatcher = null
210210
): MiddlewareDispatcher {
211211
$container = $container ?? $this->createContainer();

tests/Middleware/MiddlewareFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function testInvalidMiddlewareWithWrongArrayWithIntItems(): void
179179
$this->getMiddlewareFactory()->create([7, 42]);
180180
}
181181

182-
private function getMiddlewareFactory(ContainerInterface $container = null): MiddlewareFactoryInterface
182+
private function getMiddlewareFactory(?ContainerInterface $container = null): MiddlewareFactoryInterface
183183
{
184184
$container = $container ?? $this->getContainer();
185185

0 commit comments

Comments
 (0)