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

Bump to PHP 7.2, stick to phpunit 8.5 #492

Merged
merged 1 commit into from
Sep 9, 2024
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
8 changes: 1 addition & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ jobs:

env:
COMPOSER_ROOT_VERSION: 1.x-dev
SYMFONY_PHPUNIT_VERSION: 9.5
SYMFONY_PHPUNIT_VERSION: 8.5

strategy:
matrix:
include:
- php: '7.1'
- php: '7.2'
- php: '7.3'
- php: '7.4'
Expand All @@ -44,11 +43,6 @@ jobs:
- name: Install dependencies
run: composer --prefer-source --no-progress --ansi install

- name: Configure for PHP <= 7.2
if: "${{ matrix.php <= '7.2' }}"
run: |
echo SYMFONY_PHPUNIT_VERSION=7.5 >> $GITHUB_ENV

- name: Run tests
run: |
ok=0
Expand Down
13 changes: 7 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@ init:
- SET PATH=c:\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET PHP=1
- SET SYMFONY_PHPUNIT_VERSION=7.5
- SET SYMFONY_PHPUNIT_VERSION=8.5

install:
- cinst wget
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
- cd c:\php
- IF %PHP%==1 appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-7.1.3-Win32-VC14-x86.zip
- IF %PHP%==1 7z x php-7.1.3-Win32-VC14-x86.zip -y >nul
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-7.2.5-Win32-VC15-x86.zip
- IF %PHP%==1 appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-7.2.5-Win32-VC15-x86.zip
- IF %PHP%==1 7z x php-7.2.5-Win32-VC15-x86.zip -y >nul
- IF %PHP%==1 del /Q *.zip
- IF %PHP%==1 cd ext
- IF %PHP%==1 appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php_apcu-5.1.8-7.1-ts-vc14-x86.zip
- IF %PHP%==1 7z x php_apcu-5.1.8-7.1-ts-vc14-x86.zip -y >nul
- IF %PHP%==1 appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php_apcu-5.1.19-7.2-ts-vc15-x86.zip
- IF %PHP%==1 7z x php_apcu-5.1.19-7.2-ts-vc15-x86.zip -y >nul
- IF %PHP%==1 del /Q *.zip
- IF %PHP%==1 cd ..
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
Expand All @@ -37,7 +38,7 @@ install:
- IF %PHP%==1 echo extension=php_intl.dll >> php.ini
- IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
- IF %PHP%==1 echo extension=php_ldap.dll >> php.ini
- appveyor DownloadFile https://github.com/composer/composer/releases/download/2.0.12/composer.phar
- appveyor DownloadFile https://github.com/composer/composer/releases/download/2.7.9/composer.phar
- cd c:\projects\polyfill
- mkdir %APPDATA%\Composer && copy /Y .github\composer-config.json %APPDATA%\Composer\config.json
- SET COMPOSER_ROOT_VERSION=1.x-dev
Expand Down
12 changes: 5 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@
}
],
"require": {
"php": ">=7.1"
"php": ">=7.2"
},
"require-dev": {
"symfony/intl": "^4.4|^5.0|^6.0",
"symfony/phpunit-bridge": "^5.3|^6.0",
"symfony/var-dumper": "^4.4|^5.1|^6.0"
"symfony/intl": "^5.4|^6.4",
"symfony/phpunit-bridge": "^6.4",
"symfony/var-dumper": "^5.4|^6.4"
},
"replace": {
"symfony/polyfill-apcu": "self.version",
"symfony/polyfill-ctype": "self.version",
"symfony/polyfill-php72": "self.version",
"symfony/polyfill-php73": "self.version",
"symfony/polyfill-php74": "self.version",
"symfony/polyfill-php80": "self.version",
Expand All @@ -42,8 +41,7 @@
"symfony/polyfill-intl-normalizer": "self.version",
"symfony/polyfill-mbstring": "self.version",
"symfony/polyfill-util": "self.version",
"symfony/polyfill-uuid": "self.version",
"symfony/polyfill-xml": "self.version"
"symfony/polyfill-uuid": "self.version"
},
"autoload": {
"psr-4": { "Symfony\\Polyfill\\": "src/" },
Expand Down
2 changes: 1 addition & 1 deletion src/Apcu/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=7.1"
"php": ">=7.2"
},
"autoload": {
"psr-4": { "Symfony\\Polyfill\\Apcu\\": "" },
Expand Down
2 changes: 1 addition & 1 deletion src/Ctype/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=7.1"
"php": ">=7.2"
},
"provide": {
"ext-ctype": "*"
Expand Down
2 changes: 1 addition & 1 deletion src/Iconv/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=7.1"
"php": ">=7.2"
},
"provide": {
"ext-iconv": "*"
Expand Down
2 changes: 1 addition & 1 deletion src/Intl/Grapheme/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=7.1"
"php": ">=7.2"
},
"autoload": {
"psr-4": { "Symfony\\Polyfill\\Intl\\Grapheme\\": "" },
Expand Down
2 changes: 1 addition & 1 deletion src/Intl/Icu/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=7.1"
"php": ">=7.2"
},
"autoload": {
"files": [ "bootstrap.php" ],
Expand Down
4 changes: 2 additions & 2 deletions src/Intl/Idn/Idn.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ final class Idn
*/
public static function idn_to_ascii($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = [])
{
if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
if (self::INTL_IDNA_VARIANT_2003 === $variant) {
@trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED);
}

Expand Down Expand Up @@ -198,7 +198,7 @@ public static function idn_to_ascii($domainName, $options = self::IDNA_DEFAULT,
*/
public static function idn_to_utf8($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = [])
{
if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
if (self::INTL_IDNA_VARIANT_2003 === $variant) {
@trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED);
}

Expand Down
5 changes: 2 additions & 3 deletions src/Intl/Idn/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
}
],
"require": {
"php": ">=7.1",
"symfony/polyfill-intl-normalizer": "^1.10",
"symfony/polyfill-php72": "^1.10"
"php": ">=7.2",
"symfony/polyfill-intl-normalizer": "^1.10"
},
"autoload": {
"psr-4": { "Symfony\\Polyfill\\Intl\\Idn\\": "" },
Expand Down
2 changes: 1 addition & 1 deletion src/Intl/MessageFormatter/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=7.1"
"php": ">=7.2"
},
"autoload": {
"psr-4": { "Symfony\\Polyfill\\Intl\\MessageFormatter\\": "" },
Expand Down
2 changes: 1 addition & 1 deletion src/Intl/Normalizer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=7.1"
"php": ">=7.2"
},
"autoload": {
"psr-4": { "Symfony\\Polyfill\\Intl\\Normalizer\\": "" },
Expand Down
12 changes: 0 additions & 12 deletions src/Mbstring/Mbstring.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,6 @@ final class Mbstring
public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
{
if (\is_array($s)) {
if (\PHP_VERSION_ID < 70200) {
trigger_error('mb_convert_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING);

return null;
}

$r = [];
foreach ($s as $str) {
$r[] = self::mb_convert_encoding($str, $toEncoding, $fromEncoding);
Expand Down Expand Up @@ -430,12 +424,6 @@ public static function mb_encoding_aliases($encoding)

public static function mb_check_encoding($var = null, $encoding = null)
{
if (\PHP_VERSION_ID < 70200 && \is_array($var)) {
trigger_error('mb_check_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING);

return null;
}

if (null === $encoding) {
if (null === $var) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/Mbstring/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=7.1"
"php": ">=7.2"
},
"provide": {
"ext-mbstring": "*"
Expand Down
Loading
Loading