Skip to content

Commit

Permalink
Bump to PHP 7.2, stick to phpunit 8.5
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Sep 9, 2024
1 parent 1419e0d commit f02dbba
Show file tree
Hide file tree
Showing 36 changed files with 26 additions and 716 deletions.
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
9 changes: 4 additions & 5 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 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
19 changes: 0 additions & 19 deletions src/Php72/LICENSE

This file was deleted.

Loading

0 comments on commit f02dbba

Please sign in to comment.