Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop PHP 8.0 support #5543

Merged
merged 2 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ environment:
- db: mssql
driver: sqlsrv
db_version: sql2017
php: 8.0
php: 8.1
- db: mssql
driver: pdo_sqlsrv
db_version: sql2017
php: 8.0
php: 8.1

init:
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;C:\tools\composer;%PATH%
Expand Down Expand Up @@ -64,8 +64,7 @@ install:
Add-Content php.ini "`n extension=php_sqlite3.dll"
Add-Content php.ini "`n extension=php_curl.dll"

# Get and install the latest stable sqlsrv DLL's
$DLLVersion = (Invoke-WebRequest "https://pecl.php.net/rest/r/sqlsrv/stable.txt").Content
$DLLVersion = "5.10.0"
Copy link
Member Author

@morozov morozov Jul 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows builds are not always up to speed with PECL. According to PECL, the latest stable version is 5.10.1 but there are no corresponding Windows binaries.

It's been working so far thanks to the AppVeyor cache. We can switch back to the latest stable later once they sync up.

cd c:\tools\php\ext
$source = "https://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vs16-x64.zip"
$destination = "c:\tools\php\ext\php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vs16-x64.zip"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ jobs:
coding-standards:
name: "Coding Standards"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@1.1.1"
with:
php-version: "8.1"
52 changes: 11 additions & 41 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,15 @@ jobs:
os:
- "ubuntu-20.04"
php-version:
- "8.0"
- "8.1"
- "8.2"
dependencies:
- "highest"
include:
- os: "ubuntu-20.04"
php-version: "8.0"
php-version: "8.1"
dependencies: "lowest"
- os: "ubuntu-18.04"
- os: "ubuntu-20.04"
php-version: "8.1"
dependencies: "highest"

Expand Down Expand Up @@ -201,14 +200,12 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "8.1"
postgres-version:
- "10"
- "13"
- "14"
include:
- php-version: "8.1"
postgres-version: "14"
- php-version: "8.2"
postgres-version: "14"

Expand Down Expand Up @@ -259,7 +256,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "8.1"
mariadb-version:
- "10.2"
- "10.5"
Expand All @@ -268,18 +265,6 @@ jobs:
- "mysqli"
- "pdo_mysql"
include:
- php-version: "8.1"
mariadb-version: "10.5"
extension: "mysqli"
- php-version: "8.1"
mariadb-version: "10.5"
extension: "pdo_mysql"
- php-version: "8.1"
mariadb-version: "10.7"
extension: "mysqli"
- php-version: "8.1"
mariadb-version: "10.7"
extension: "pdo_mysql"
- php-version: "8.2"
mariadb-version: "10.7"
extension: "mysqli"
Expand Down Expand Up @@ -336,7 +321,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "8.1"
mysql-version:
- "5.7"
- "8.0"
Expand All @@ -346,25 +331,10 @@ jobs:
config-file-suffix:
- ""
include:
- mysql-version: "5.7"
- mysql-version: "8.0"
# https://stackoverflow.com/questions/60902904/how-to-pass-mysql-native-password-to-mysql-service-in-github-actions
custom-entrypoint: >-
--entrypoint sh mysql:8 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
- config-file-suffix: "-tls"
php-version: "8.0"
mysql-version: "8.0"
extension: "mysqli"
- php-version: "8.1"
php-version: "8.1"
mysql-version: "8.0"
extension: "mysqli"
custom-entrypoint: >-
--entrypoint sh mysql:8 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
- php-version: "8.1"
mysql-version: "8.0"
extension: "pdo_mysql"
custom-entrypoint: >-
--entrypoint sh mysql:8 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
- php-version: "8.2"
mysql-version: "8.0"
extension: "mysqli"
Expand Down Expand Up @@ -434,10 +404,10 @@ jobs:
- "Latin1_General_100_CI_AS_SC_UTF8"
include:
- collation: "Latin1_General_100_CS_AS_SC_UTF8"
php-version: "8.0"
php-version: "8.1"
extension: "sqlsrv"
- collation: "Latin1_General_100_CS_AS_SC_UTF8"
php-version: "8.0"
php-version: "8.1"
extension: "pdo_sqlsrv"

services:
Expand Down Expand Up @@ -485,13 +455,13 @@ jobs:

phpunit-ibm-db2:
name: "PHPUnit with IBM DB2"
runs-on: "ubuntu-18.04"
runs-on: "ubuntu-20.04"
needs: "phpunit-smoke-check"

strategy:
matrix:
php-version:
- "8.0"
- "8.1"

services:
ibm_db2:
Expand Down Expand Up @@ -547,7 +517,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "8.1"

steps:
- name: "Checkout"
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{"name": "Jonathan Wage", "email": "jonwage@gmail.com"}
],
"require": {
"php": "^8.0",
"php": "^8.1",
"composer-runtime-api": "^2",
"doctrine/deprecations": "^0.5.3|^1",
"doctrine/event-manager": "^1.0",
Expand All @@ -48,7 +48,7 @@
"psalm/plugin-phpunit": "0.17.0",
"squizlabs/php_codesniffer": "3.7.1",
"symfony/cache": "^5.4|^6.0",
"symfony/console": "^4.4|^5.4|^6.0",
"symfony/console": "^4.4.30|^5.4|^6.0",
"vimeo/psalm": "4.24.0"
},
"suggest": {
Expand Down
6 changes: 2 additions & 4 deletions src/Types/DecimalType.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
use function is_float;
use function is_int;

use const PHP_VERSION_ID;

/**
* Type that maps an SQL DECIMAL to a PHP string.
*/
Expand All @@ -26,9 +24,9 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform): st

public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?string
{
// Some drivers starting from PHP 8.1 can represent decimals as float/int
// Some drivers can represent decimals as float/int
// See also: https://github.com/doctrine/dbal/pull/4818
if (PHP_VERSION_ID >= 80100 && (is_float($value) || is_int($value))) {
if (is_float($value) || is_int($value)) {
return (string) $value;
}

Expand Down