Skip to content

Commit

Permalink
feat: require C++17 and ICU >=75.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ramsey committed Dec 5, 2024
1 parent 94780fa commit 595254e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
php:
- "8.2"
icu:
- "70.1"
- "75.1"

steps:
- name: "Checkout repository"
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
php:
- "8.3"
icu:
- "73.2"
- "75.1"

steps:
- name: "Checkout repository"
Expand Down Expand Up @@ -146,11 +146,7 @@ jobs:
- "8.2"
- "8.3"
icu:
- "70.1"
- "71.1"
- "72.1"
- "73.1"
- "73.2"
- "75.1"

steps:
- name: "Checkout repository"
Expand Down
4 changes: 2 additions & 2 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ PHP_ARG_ENABLE(
)

if test "$PHP_ECMA_INTL" != "no"; then
PKG_CHECK_MODULES([ICU], [icu-uc >= 70.1 icu-i18n icu-io])
PKG_CHECK_MODULES([ICU], [icu-uc >= 75.1 icu-i18n icu-io])

PHP_EVAL_INCLINE($ICU_CFLAGS)
PHP_EVAL_LIBLINE($ICU_LIBS, ECMA_INTL_SHARED_LIBADD)
Expand Down Expand Up @@ -88,7 +88,7 @@ if test "$PHP_ECMA_INTL" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/php/classes)

PHP_REQUIRE_CXX()
PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_ECMA_INTL_STDCXX)
PHP_CXX_COMPILE_STDCXX(17, mandatory, PHP_ECMA_INTL_STDCXX)

EXTRA_CXXFLAGS="$PHP_ECMA_INTL_STDCXX $ICU_CXXFLAGS"
PHP_SUBST(EXTRA_CXXFLAGS)
Expand Down
2 changes: 1 addition & 1 deletion tests/criterion/ecma402/category_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define CATEGORY_VALUES_TEST(name, category, capacity) \
Test(TEST_SUITE, supportedValuesFor##name##Category) \
{ \
const char **values = (const char **)malloc(sizeof(const char *) * capacity); \
const char **values = (const char **)malloc(sizeof(char *) * capacity); \
const int count = ecma402_supportedValuesForCategory(category, values); \
cr_expect(values != NULL); \
cr_expect(gt(int, count, 0)); \
Expand Down
8 changes: 4 additions & 4 deletions tests/criterion/ecma402/util_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ ParameterizedTest(struct splitTestTuple *tup, TEST_SUITE, split)

ParameterizedTestParameters(TEST_SUITE, toAsciiLower)
{
struct charTestTuple tests[189];
static struct charTestTuple tests[190];
int i = 0;

// For each printable ASCII character...
Expand All @@ -570,7 +570,7 @@ ParameterizedTestParameters(TEST_SUITE, toAsciiLower)
}

// For each printable Latin-1 supplement character...
for (wchar_t c = 160; c < 255; c++) {
for (wchar_t c = 160; c <= 255; c++) {
tests[i].test = c;
tests[i].expected = c;

Expand All @@ -588,7 +588,7 @@ ParameterizedTest(struct charTestTuple *tup, TEST_SUITE, toAsciiLower)

ParameterizedTestParameters(TEST_SUITE, toAsciiUpper)
{
struct charTestTuple tests[189];
static struct charTestTuple tests[190];
int i = 0;

// For each printable ASCII character...
Expand All @@ -607,7 +607,7 @@ ParameterizedTestParameters(TEST_SUITE, toAsciiUpper)
}

// For each printable Latin-1 supplement character...
for (wchar_t c = 160; c < 255; c++) {
for (wchar_t c = 160; c <= 255; c++) {
tests[i].test = c;
tests[i].expected = c;

Expand Down

0 comments on commit 595254e

Please sign in to comment.