Skip to content

Commit 20f4153

Browse files
authored
PHP 8 4 support (ecotoneframework#477)
* feat: PHP 8.4 * handle ecotone deprecations * localstack and aws sdk * clean up * Fixes
1 parent edc9036 commit 20f4153

29 files changed

+50
-50
lines changed

.github/workflows/benchmark-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
ports:
5555
- 5432:5432
5656
localstack:
57-
image: localstack/localstack:2.2.0
57+
image: localstack/localstack:3.0.0
5858
env:
5959
SERVICES: 'sqs,sns'
6060
ports:

.github/workflows/quickstart-examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: 'Quickstart'
2020
package: 'ecotone/quickstart-examples'
2121
directory: 'quickstart-examples'
22-
php-versions: [ '8.3' ]
22+
php-versions: [ '8.4' ]
2323
stability: [prefer-stable]
2424

2525
services:
@@ -76,7 +76,7 @@ jobs:
7676
ports:
7777
- 5432:5432
7878
localstack:
79-
image: localstack/localstack:2.2.0
79+
image: localstack/localstack:3.0.0
8080
env:
8181
SERVICES: 'sqs,sns'
8282
ports:

.github/workflows/split-testing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
fail-fast: true
4141
matrix:
4242
package: ${{ fromJson(needs.get_packages.outputs.matrix) }}
43-
php-versions: [ '8.1', '8.3' ]
43+
php-versions: [ '8.1', '8.4' ]
4444
stability: [prefer-stable, prefer-lowest]
4545

4646
services:
@@ -97,7 +97,7 @@ jobs:
9797
ports:
9898
- 5432:5432
9999
localstack:
100-
image: localstack/localstack:2.2.0
100+
image: localstack/localstack:3.0.0
101101
env:
102102
SERVICES: 'sqs,sns'
103103
ports:

.github/workflows/test-monorepo.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fail-fast: true # Fail the entire workflow if any job fails
1717
matrix:
1818
operating-system: [ ubuntu-latest ]
19-
php-versions: [ '8.3' ]
19+
php-versions: [ '8.4' ]
2020
stability: [prefer-stable]
2121
services:
2222
kafka:
@@ -72,7 +72,7 @@ jobs:
7272
ports:
7373
- 5432:5432
7474
localstack:
75-
image: localstack/localstack:2.2.0
75+
image: localstack/localstack:3.0.0
7676
env:
7777
SERVICES: 'sqs,sns'
7878
ports:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
"predis/predis": "^1.1.10",
153153
"symfony/expression-language": "^6.0|^7.0",
154154
"symplify/monorepo-builder": "11.1.21",
155-
"aws/aws-sdk-php": "<=3.269.5",
155+
"aws/aws-sdk-php": ">=3.340.5",
156156
"symfony/messenger": "^5.4|^6.0|^7.0",
157157
"symfony/amqp-messenger": "^5.4.31|^6.0|^7.0",
158158
"symfony/doctrine-messenger": "^5.4|^6.0|^7.0",

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "3.8"
22

33
services:
44
app:
5-
image: simplycodedsoftware/php:8.3.10
5+
image: simplycodedsoftware/php:8.4.6
66
volumes:
77
- "$PWD:/data/app"
88
working_dir: "/data/app"
@@ -84,7 +84,7 @@ services:
8484
- "15672:15672"
8585
- "5672:5672"
8686
localstack:
87-
image: localstack/localstack:2.2.0
87+
image: localstack/localstack:3.0.0
8888
environment:
8989
LOCALSTACK_HOST: 'localstack'
9090
SERVICES: 'sqs,sns'

packages/Dbal/src/EnqueueDbal/DbalConnectionFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private function establishConnection(): Connection
131131
return $this->connection;
132132
}
133133

134-
private function parseDsn(string $dsn, array $config = null): array
134+
private function parseDsn(string $dsn, ?array $config = null): array
135135
{
136136
$parsedDsn = Dsn::parseFirst($dsn);
137137

packages/Dbal/src/EnqueueDbal/DbalMessage.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function setRedelivered(bool $redelivered): void
148148
$this->redelivered = $redelivered;
149149
}
150150

151-
public function setReplyTo(string $replyTo = null): void
151+
public function setReplyTo(?string $replyTo = null): void
152152
{
153153
$this->setHeader('reply_to', $replyTo);
154154
}
@@ -163,7 +163,7 @@ public function getPriority(): ?int
163163
return $this->priority;
164164
}
165165

166-
public function setPriority(int $priority = null): void
166+
public function setPriority(?int $priority = null): void
167167
{
168168
$this->priority = $priority;
169169
}
@@ -176,7 +176,7 @@ public function getDeliveryDelay(): ?int
176176
/**
177177
* Set delay in milliseconds.
178178
*/
179-
public function setDeliveryDelay(int $deliveryDelay = null): void
179+
public function setDeliveryDelay(?int $deliveryDelay = null): void
180180
{
181181
$this->deliveryDelay = $deliveryDelay;
182182
}
@@ -192,12 +192,12 @@ public function getTimeToLive(): ?int
192192
/**
193193
* Set time to live in milliseconds.
194194
*/
195-
public function setTimeToLive(int $timeToLive = null): void
195+
public function setTimeToLive(?int $timeToLive = null): void
196196
{
197197
$this->timeToLive = $timeToLive;
198198
}
199199

200-
public function setCorrelationId(string $correlationId = null): void
200+
public function setCorrelationId(?string $correlationId = null): void
201201
{
202202
$this->setHeader('correlation_id', $correlationId);
203203
}
@@ -207,7 +207,7 @@ public function getCorrelationId(): ?string
207207
return $this->getHeader('correlation_id', null);
208208
}
209209

210-
public function setMessageId(string $messageId = null): void
210+
public function setMessageId(?string $messageId = null): void
211211
{
212212
$this->setHeader('message_id', $messageId);
213213
}
@@ -224,7 +224,7 @@ public function getTimestamp(): ?int
224224
return null === $value ? null : $value;
225225
}
226226

227-
public function setTimestamp(int $timestamp = null): void
227+
public function setTimestamp(?int $timestamp = null): void
228228
{
229229
$this->setHeader('timestamp', $timestamp);
230230
}
@@ -244,7 +244,7 @@ public function getRedeliverAfter(): int
244244
return $this->redeliverAfter;
245245
}
246246

247-
public function setRedeliverAfter(int $redeliverAfter = null): void
247+
public function setRedeliverAfter(?int $redeliverAfter = null): void
248248
{
249249
$this->redeliverAfter = $redeliverAfter;
250250
}
@@ -254,7 +254,7 @@ public function getPublishedAt(): ?int
254254
return $this->publishedAt;
255255
}
256256

257-
public function setPublishedAt(int $publishedAt = null): void
257+
public function setPublishedAt(?int $publishedAt = null): void
258258
{
259259
$this->publishedAt = $publishedAt;
260260
}

packages/Dbal/src/EnqueueDbal/DbalProducer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function send(Destination $destination, Message $message): void
132132
}
133133
}
134134

135-
public function setDeliveryDelay(int $deliveryDelay = null): Producer
135+
public function setDeliveryDelay(?int $deliveryDelay = null): Producer
136136
{
137137
$this->deliveryDelay = $deliveryDelay;
138138

@@ -144,7 +144,7 @@ public function getDeliveryDelay(): ?int
144144
return $this->deliveryDelay;
145145
}
146146

147-
public function setPriority(int $priority = null): Producer
147+
public function setPriority(?int $priority = null): Producer
148148
{
149149
$this->priority = $priority;
150150

@@ -156,7 +156,7 @@ public function getPriority(): ?int
156156
return $this->priority;
157157
}
158158

159-
public function setTimeToLive(int $timeToLive = null): Producer
159+
public function setTimeToLive(?int $timeToLive = null): Producer
160160
{
161161
$this->timeToLive = $timeToLive;
162162

packages/Dbal/tests/Integration/Recoverability/DbalDeadLetterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function test_storing_wrapped_error_message()
5050
);
5151
}
5252

53-
private function createFailedMessage(Message $message, Throwable $exception = null): Message
53+
private function createFailedMessage(Message $message, ?Throwable $exception = null): Message
5454
{
5555
return ErrorMessage::create(MessageHandlingException::fromOtherException($exception ?? new MessageHandlingException(), $message));
5656
}

0 commit comments

Comments
 (0)