Skip to content

Commit

Permalink
feat: upgrade min php version to 8
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Upgraded minimum php version to 8.1
  • Loading branch information
Orkuncakilkaya committed Jul 17, 2024
1 parent 5abf4ca commit 5698871
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
max-parallel: 1
matrix:
php_version: [ "7.3", "7.4", "8.0", "8.1", "8.2" ]
php_version: [ "8.1", "8.2", "8.3" ]
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
php_version: [ "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ]
php_version: [ "8.1", "8.2", "8.3" ]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}
],
"require": {
"php": ">=7.1",
"php": ">=8.1",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ services:
volumes:
- ./:/app
php:
image: php:7.2-cli
image: php:8.1-cli
volumes:
- ./:/app
working_dir: /app
env_file:
- .env
phpunit:
image: php:7.2-cli
image: php:8.1-cli
volumes:
- ./:/app
working_dir: /app
Expand Down
2 changes: 1 addition & 1 deletion scripts/functional.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker container run --env-file .env --rm -v $(pwd):/app/ php:7.2-cli php /app/run_checks.php
docker container run --env-file .env --rm -v $(pwd):/app/ php:8.1-cli php /app/run_checks.php
9 changes: 0 additions & 9 deletions src/Api/FingerprintApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ public function __construct(
$this->client = $client ?: new Client();
$this->config = $config ?: new Configuration();
$this->headerSelector = $selector ?: new HeaderSelector();

// TODO Remove on next major release
if(version_compare(
PHP_VERSION,
'8.1',
'<'
)) {
trigger_error('You are using a PHP version that has reached EOL. Support for it will be removed in next major release of this SDK. Please consider upgrading to PHP 8.1 or higher.', E_USER_WARNING);
}
}

/**
Expand Down
9 changes: 0 additions & 9 deletions template/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,6 @@ use {{invokerPackage}}\ObjectSerializer;
$this->client = $client ?: new Client();
$this->config = $config ?: new Configuration();
$this->headerSelector = $selector ?: new HeaderSelector();
// TODO Remove on next major release
if(version_compare(
PHP_VERSION,
'8.1',
'<'
)) {
trigger_error('You are using a PHP version that has reached EOL. Support for it will be removed in next major release of this SDK. Please consider upgrading to PHP 8.1 or higher.', E_USER_WARNING);
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion template/composer.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
],
"require": {
"php": ">=7.1",
"php": ">=8.1",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
Expand Down

0 comments on commit 5698871

Please sign in to comment.