Skip to content

Commit 1c516f4

Browse files
committed
Upgrade to PHP 8.1 and upgrade deps
1 parent 169f9fb commit 1c516f4

19 files changed

+66
-60
lines changed

.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
* text=auto
2-
31
/.github export-ignore
42
/tests export-ignore
53
/.editorconfig export-ignore

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: Setono

.github/dependabot.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# See https://github.com/Roave/BackwardCompatibilityCheck
2+
3+
name: "Backwards Compatibility Check"
4+
5+
on:
6+
pull_request: ~
7+
8+
jobs:
9+
backwards-compatibility-check:
10+
name: "Backwards Compatibility Check"
11+
12+
runs-on: "ubuntu-latest"
13+
14+
steps:
15+
- name: "Checkout"
16+
uses: "actions/checkout@v4"
17+
with:
18+
fetch-depth: 0
19+
20+
- name: "Setup PHP, with composer and extensions"
21+
uses: "shivammathur/setup-php@v2"
22+
with:
23+
php-version: "8.1"
24+
coverage: "none"
25+
26+
- name: "Install tool"
27+
run: "composer global require roave/backward-compatibility-check"
28+
29+
- name: "Check for BC breaks"
30+
run: "~/.composer/vendor/bin/roave-backward-compatibility-check --from=origin/${{ github.event.pull_request.base.ref }} --format=github-actions"

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Setono
3+
Copyright (c) 2025 Setono
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

composer-dependency-analyser.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
use ShipMonk\ComposerDependencyAnalyser\Config\Configuration;
4+
5+
return (new Configuration())
6+
->addPathToExclude(__DIR__ . '/tests')
7+
;

composer-require-checker.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=7.4",
13+
"php": ">=8.1",
1414
"ext-json": "*",
1515
"composer-runtime-api": "^2.0",
1616
"facebook/php-business-sdk": "^14.0",
@@ -26,7 +26,8 @@
2626
"nyholm/psr7": "^1.5",
2727
"phpunit/phpunit": "^9.5",
2828
"psalm/plugin-phpunit": "^0.17",
29-
"setono/code-quality-pack": "^2.2"
29+
"setono/code-quality-pack": "^2.2",
30+
"shipmonk/composer-dependency-analyser": "^1.8"
3031
},
3132
"prefer-stable": true,
3233
"autoload": {

ecs.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
declare(strict_types=1);
44

5-
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
6-
use Symplify\EasyCodingStandard\ValueObject\Option;
5+
use Symplify\EasyCodingStandard\Config\ECSConfig;
76

8-
return static function (ContainerConfigurator $containerConfigurator): void {
9-
$containerConfigurator->import('vendor/sylius-labs/coding-standard/ecs.php');
10-
$containerConfigurator->parameters()->set(Option::PATHS, [
11-
'src', 'tests'
7+
return static function (ECSConfig $config): void {
8+
$config->import('vendor/sylius-labs/coding-standard/ecs.php');
9+
$config->paths([
10+
'src',
11+
'tests',
1212
]);
1313
};

src/Client/Client.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function sendEvent(Event $event): void
6060

6161
$request = $requestFactory->createRequest(
6262
'POST',
63-
sprintf('https://graph.facebook.com/%s/%s/events', self::getEndpointVersion(), $pixel->id)
63+
sprintf('https://graph.facebook.com/%s/%s/events', self::getEndpointVersion(), $pixel->id),
6464
)
6565
->withHeader('Content-Type', 'application/x-www-form-urlencoded')
6666
->withHeader('Accept', 'application/json')
@@ -80,7 +80,7 @@ private function getHttpClient(): HttpClientInterface
8080
if (!class_exists(Curl::class)) {
8181
throw ClientException::missingDependency(
8282
Curl::class,
83-
sprintf('Either set the http client with %s or run composer require kriswallsmith/buzz', self::class . '::setHttpClient()')
83+
sprintf('Either set the http client with %s or run composer require kriswallsmith/buzz', self::class . '::setHttpClient()'),
8484
);
8585
}
8686

@@ -101,7 +101,7 @@ private function getRequestFactory(): RequestFactoryInterface
101101
if (!class_exists(Psr17Factory::class)) {
102102
throw ClientException::missingDependency(
103103
Psr17Factory::class,
104-
sprintf('Either set the request factory with %s or run composer require nyholm/psr7', self::class . '::setRequestFactory()')
104+
sprintf('Either set the request factory with %s or run composer require nyholm/psr7', self::class . '::setRequestFactory()'),
105105
);
106106
}
107107

@@ -122,7 +122,7 @@ private function getResponseFactory(): ResponseFactoryInterface
122122
if (!class_exists(Psr17Factory::class)) {
123123
throw ClientException::missingDependency(
124124
Psr17Factory::class,
125-
sprintf('Either set the response factory with %s or run composer require nyholm/psr7', self::class . '::setResponseFactory()')
125+
sprintf('Either set the response factory with %s or run composer require nyholm/psr7', self::class . '::setResponseFactory()'),
126126
);
127127
}
128128

@@ -143,7 +143,7 @@ private function getStreamFactory(): StreamFactoryInterface
143143
if (!class_exists(Psr17Factory::class)) {
144144
throw ClientException::missingDependency(
145145
Psr17Factory::class,
146-
sprintf('Either set the stream factory with %s or run composer require nyholm/psr7', self::class . '::setStreamFactory()')
146+
sprintf('Either set the stream factory with %s or run composer require nyholm/psr7', self::class . '::setStreamFactory()'),
147147
);
148148
}
149149

0 commit comments

Comments
 (0)