Skip to content

Commit 2b1532e

Browse files
feature #492 Bump to PHP 7.2, stick to phpunit 8.5 (nicolas-grekas)
This PR was merged into the 1.x branch. Discussion ---------- Bump to PHP 7.2, stick to phpunit 8.5 I think it's start to shade PHP 7.1 out. Of course the polyfill will be kept functional, but we won't care about it anymore from a maintenance PoV. Sticking to phpunit 8.5 so that we can focus on one version of it, and because it has [lifetime support](https://phpunit.de/supported-versions.html) and PHP 7.2 as a minimum version. Commits ------- 2043b0f Bump to PHP 7.2, stick to phpunit 8.5
2 parents 99111fb + 2043b0f commit 2b1532e

35 files changed

+36
-644
lines changed

.github/workflows/tests.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ jobs:
1212

1313
env:
1414
COMPOSER_ROOT_VERSION: 1.x-dev
15-
SYMFONY_PHPUNIT_VERSION: 9.5
15+
SYMFONY_PHPUNIT_VERSION: 8.5
1616

1717
strategy:
1818
matrix:
1919
include:
20-
- php: '7.1'
2120
- php: '7.2'
2221
- php: '7.3'
2322
- php: '7.4'
@@ -44,11 +43,6 @@ jobs:
4443
- name: Install dependencies
4544
run: composer --prefer-source --no-progress --ansi install
4645

47-
- name: Configure for PHP <= 7.2
48-
if: "${{ matrix.php <= '7.2' }}"
49-
run: |
50-
echo SYMFONY_PHPUNIT_VERSION=7.5 >> $GITHUB_ENV
51-
5246
- name: Run tests
5347
run: |
5448
ok=0

appveyor.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@ init:
1111
- SET PATH=c:\php;%PATH%
1212
- SET COMPOSER_NO_INTERACTION=1
1313
- SET PHP=1
14-
- SET SYMFONY_PHPUNIT_VERSION=7.5
14+
- SET SYMFONY_PHPUNIT_VERSION=8.5
1515

1616
install:
1717
- cinst wget
1818
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
1919
- cd c:\php
20-
- IF %PHP%==1 appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-7.1.3-Win32-VC14-x86.zip
21-
- IF %PHP%==1 7z x php-7.1.3-Win32-VC14-x86.zip -y >nul
20+
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-7.2.5-Win32-VC15-x86.zip
21+
- IF %PHP%==1 appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-7.2.5-Win32-VC15-x86.zip
22+
- IF %PHP%==1 7z x php-7.2.5-Win32-VC15-x86.zip -y >nul
2223
- IF %PHP%==1 del /Q *.zip
2324
- IF %PHP%==1 cd ext
24-
- 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
25-
- IF %PHP%==1 7z x php_apcu-5.1.8-7.1-ts-vc14-x86.zip -y >nul
25+
- 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
26+
- IF %PHP%==1 7z x php_apcu-5.1.19-7.2-ts-vc15-x86.zip -y >nul
2627
- IF %PHP%==1 del /Q *.zip
2728
- IF %PHP%==1 cd ..
2829
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
@@ -37,7 +38,7 @@ install:
3738
- IF %PHP%==1 echo extension=php_intl.dll >> php.ini
3839
- IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
3940
- IF %PHP%==1 echo extension=php_ldap.dll >> php.ini
40-
- appveyor DownloadFile https://github.com/composer/composer/releases/download/2.0.12/composer.phar
41+
- appveyor DownloadFile https://github.com/composer/composer/releases/download/2.7.9/composer.phar
4142
- cd c:\projects\polyfill
4243
- mkdir %APPDATA%\Composer && copy /Y .github\composer-config.json %APPDATA%\Composer\config.json
4344
- SET COMPOSER_ROOT_VERSION=1.x-dev

composer.json

+5-7
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=7.1"
19+
"php": ">=7.2"
2020
},
2121
"require-dev": {
22-
"symfony/intl": "^4.4|^5.0|^6.0",
23-
"symfony/phpunit-bridge": "^5.3|^6.0",
24-
"symfony/var-dumper": "^4.4|^5.1|^6.0"
22+
"symfony/intl": "^5.4|^6.4",
23+
"symfony/phpunit-bridge": "^6.4",
24+
"symfony/var-dumper": "^5.4|^6.4"
2525
},
2626
"replace": {
2727
"symfony/polyfill-apcu": "self.version",
2828
"symfony/polyfill-ctype": "self.version",
29-
"symfony/polyfill-php72": "self.version",
3029
"symfony/polyfill-php73": "self.version",
3130
"symfony/polyfill-php74": "self.version",
3231
"symfony/polyfill-php80": "self.version",
@@ -42,8 +41,7 @@
4241
"symfony/polyfill-intl-normalizer": "self.version",
4342
"symfony/polyfill-mbstring": "self.version",
4443
"symfony/polyfill-util": "self.version",
45-
"symfony/polyfill-uuid": "self.version",
46-
"symfony/polyfill-xml": "self.version"
44+
"symfony/polyfill-uuid": "self.version"
4745
},
4846
"autoload": {
4947
"psr-4": { "Symfony\\Polyfill\\": "src/" },

src/Apcu/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=7.1"
19+
"php": ">=7.2"
2020
},
2121
"autoload": {
2222
"psr-4": { "Symfony\\Polyfill\\Apcu\\": "" },

src/Ctype/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=7.1"
19+
"php": ">=7.2"
2020
},
2121
"provide": {
2222
"ext-ctype": "*"

src/Iconv/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=7.1"
19+
"php": ">=7.2"
2020
},
2121
"provide": {
2222
"ext-iconv": "*"

src/Intl/Grapheme/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=7.1"
19+
"php": ">=7.2"
2020
},
2121
"autoload": {
2222
"psr-4": { "Symfony\\Polyfill\\Intl\\Grapheme\\": "" },

src/Intl/Icu/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=7.1"
19+
"php": ">=7.2"
2020
},
2121
"autoload": {
2222
"files": [ "bootstrap.php" ],

src/Intl/Idn/Idn.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ final class Idn
145145
*/
146146
public static function idn_to_ascii($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = [])
147147
{
148-
if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
148+
if (self::INTL_IDNA_VARIANT_2003 === $variant) {
149149
@trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED);
150150
}
151151

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

src/Intl/Idn/composer.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
}
2121
],
2222
"require": {
23-
"php": ">=7.1",
24-
"symfony/polyfill-intl-normalizer": "^1.10",
25-
"symfony/polyfill-php72": "^1.10"
23+
"php": ">=7.2",
24+
"symfony/polyfill-intl-normalizer": "^1.10"
2625
},
2726
"autoload": {
2827
"psr-4": { "Symfony\\Polyfill\\Intl\\Idn\\": "" },

src/Intl/MessageFormatter/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=7.1"
19+
"php": ">=7.2"
2020
},
2121
"autoload": {
2222
"psr-4": { "Symfony\\Polyfill\\Intl\\MessageFormatter\\": "" },

src/Intl/Normalizer/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=7.1"
19+
"php": ">=7.2"
2020
},
2121
"autoload": {
2222
"psr-4": { "Symfony\\Polyfill\\Intl\\Normalizer\\": "" },

src/Mbstring/Mbstring.php

-12
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@ final class Mbstring
8686
public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
8787
{
8888
if (\is_array($s)) {
89-
if (\PHP_VERSION_ID < 70200) {
90-
trigger_error('mb_convert_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING);
91-
92-
return null;
93-
}
94-
9589
$r = [];
9690
foreach ($s as $str) {
9791
$r[] = self::mb_convert_encoding($str, $toEncoding, $fromEncoding);
@@ -430,12 +424,6 @@ public static function mb_encoding_aliases($encoding)
430424

431425
public static function mb_check_encoding($var = null, $encoding = null)
432426
{
433-
if (\PHP_VERSION_ID < 70200 && \is_array($var)) {
434-
trigger_error('mb_check_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING);
435-
436-
return null;
437-
}
438-
439427
if (null === $encoding) {
440428
if (null === $var) {
441429
return false;

src/Mbstring/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=7.1"
19+
"php": ">=7.2"
2020
},
2121
"provide": {
2222
"ext-mbstring": "*"

0 commit comments

Comments
 (0)