diff options
| -rw-r--r-- | PHPINFO | 2 | ||||
| -rw-r--r-- | REFLECTION | 2 | ||||
| -rw-r--r-- | composer.json | 5 | ||||
| -rw-r--r-- | php-pecl-xlswriter.spec | 10 | ||||
| -rw-r--r-- | upstream.patch | 125 |
5 files changed, 10 insertions, 134 deletions
@@ -2,6 +2,6 @@ xlswriter xlswriter support => enabled -Version => 2.0.0 +Version => 2.0.1 bundled libxlsxwriter version => 1.1.6 bundled libxlsxreader version => self-maintained @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #138 xlswriter version 2.0.0 ] { +Extension [ <persistent> extension #138 xlswriter version 2.0.1 ] { - Functions { Function [ <internal:xlswriter> function xlswriter_get_version ] { diff --git a/composer.json b/composer.json index faeb352..e1e2629 100644 --- a/composer.json +++ b/composer.json @@ -8,10 +8,11 @@ }, "php-ext": { "extension-name": "xlswriter", + "download-url-method": "pre-packaged-source", "configure-options": [ { - "name": "enable-reader", - "description": "Enable reader support" + "name": "disable-reader", + "description": "Disable reader support" } ] } diff --git a/php-pecl-xlswriter.spec b/php-pecl-xlswriter.spec index cb7bf5a..be2cde0 100644 --- a/php-pecl-xlswriter.spec +++ b/php-pecl-xlswriter.spec @@ -27,16 +27,14 @@ Name: %{?scl_prefix}php-pecl-%{pecl_name} Summary: An efficient and fast xlsx file extension License: BSD-2-Clause -Version: 2.0.0 -Release: 2%{?dist} +Version: 2.0.1 +Release: 1%{?dist} %forgemeta URL: %{forgeurl} # use makesrc.sh to create a recursive snapshot Source0: %{gh_proj}-%{version}.tgz Source1: makesrc.sh -Patch0: upstream.patch - BuildRequires: %{?dtsprefix}gcc BuildRequires: make BuildRequires: %{?scl_prefix}php-devel >= 7.0 @@ -91,7 +89,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %forgesetup -%patch -P0 -p1 # Sanity check, really often broken extver=$(sed -n '/#define PHP_XLSWRITER_VERSION/{s/.* "//;s/".*$//;p}' php_xlswriter.h) @@ -203,6 +200,9 @@ cd .. %changelog +* Mon May 25 2026 Remi Collet <remi@remirepo.net> - 2.0.1-1 +- update to 2.0.1 + * Mon May 18 2026 Remi Collet <remi@remirepo.net> - 2.0.0-2 - test build with upstream patch diff --git a/upstream.patch b/upstream.patch deleted file mode 100644 index c633df4..0000000 --- a/upstream.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 4df543b41f574666dea020aeaf5e865488968053 Mon Sep 17 00:00:00 2001 -From: viest <wjx@php.net> -Date: Mon, 18 May 2026 20:45:11 +0800 -Subject: [PATCH] fix(7.0): make phpt suite + examples parse on PHP 7.0, extend - CI matrix -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Reported in #565 by Remi: package.xml + composer.json declare >= 7.0 but -three tests use 7.1-only syntax and one float assertion is sensitive to -PHP 7.0's serialize_precision default. - -Tests / examples: -- tests/conditional_format.phpt: replace `foreach (… as [\$range, \$cf])` - with `foreach (… as \$rule) { list(\$range, \$cf) = \$rule; }` (short-list - destructuring is PHP 7.1). -- tests/examples_smoke.phpt: drop `: void` return type from the closure - (void return type is PHP 7.1). -- tests/open_xlsx_next_row_with_formula.phpt: switch the float-bearing - line to --EXPECTF-- + %f so it accepts both '3.14' (7.1+) and - '3.1400000000000001' (7.0, default serialize_precision=17). -- examples/11_read_styles.php: drop `?array` nullable parameter syntax - (PHP 7.1). - -CI: -- main.yml matrix gets PHP 7.0/7.1/7.2/7.3 jobs on ubuntu-22.04 so the - declared minimum is actually exercised on every push. macOS-14 stays - on 7.4+ because setup-php's older bottles for ARM64 are unreliable. ---- - .github/workflows/main.yml | 13 +++++++++++++ - examples/11_read_styles.php | 3 ++- - tests/conditional_format.phpt | 5 ++++- - tests/examples_smoke.phpt | 5 +++-- - tests/open_xlsx_next_row_with_formula.phpt | 4 ++-- - 5 files changed, 24 insertions(+), 6 deletions(-) - -diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml -index 8919ff1..ef205a8 100644 ---- a/.github/workflows/main.yml -+++ b/.github/workflows/main.yml -@@ -11,6 +11,19 @@ jobs: - matrix: - operating-system: [ubuntu-22.04, macos-14] - php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] -+ include: -+ # Older PHP only on Linux — setup-php's macOS bottles for 7.0-7.3 -+ # are flaky on macos-14 (ARM64) and we don't ship binaries for -+ # those combos anyway. Linux coverage is the one that matters for -+ # downstream distros still on 7.x (EPEL etc.). -+ - operating-system: ubuntu-22.04 -+ php-versions: '7.0' -+ - operating-system: ubuntu-22.04 -+ php-versions: '7.1' -+ - operating-system: ubuntu-22.04 -+ php-versions: '7.2' -+ - operating-system: ubuntu-22.04 -+ php-versions: '7.3' - - steps: - - name: Checkout -diff --git a/examples/11_read_styles.php b/examples/11_read_styles.php -index 0fee464..8da9fe5 100644 ---- a/examples/11_read_styles.php -+++ b/examples/11_read_styles.php -@@ -26,7 +26,8 @@ - ->openFile($name) - ->openSheet(); - --$fmt_font = static function (?array $font): string { -+/* No `?array` nullable-type — that would require PHP 7.1. */ -+$fmt_font = static function ($font) { - if (!$font) return 'default'; - return sprintf('%s %dpt color=%s%s%s', - $font['name'], $font['size'], $font['color'], -diff --git a/tests/conditional_format.phpt b/tests/conditional_format.phpt -index f6d0723..c3a28f4 100644 ---- a/tests/conditional_format.phpt -+++ b/tests/conditional_format.phpt -@@ -53,7 +53,10 @@ $rules = [ - ]; - - $excel->insertText(0, 0, 'cf'); --foreach ($rules as [$range, $cf]) { -+/* Plain list() destructuring instead of `as [$range, $cf]` so the test -+ * parses on PHP 7.0 (short-list destructuring is a 7.1 feature). */ -+foreach ($rules as $rule) { -+ list($range, $cf) = $rule; - $excel->conditionalFormatRange($range, $cf); - } - $path = $excel->output(); -diff --git a/tests/examples_smoke.phpt b/tests/examples_smoke.phpt -index 16d4c52..c4017ef 100644 ---- a/tests/examples_smoke.phpt -+++ b/tests/examples_smoke.phpt -@@ -17,8 +17,9 @@ if (empty($files)) { - } - - /* Run each example in an isolated scope (closure) so they don't bleed -- * variables into each other, while still keeping the loaded extension. */ --$run = static function (string $file): void { -+ * variables into each other, while still keeping the loaded extension. -+ * No `: void` return type — that would require PHP 7.1. */ -+$run = static function ($file) { - /* The example writes to stdout — capture it so the smoke test only - * cares about whether the script ran without a fatal. */ - ob_start(); -diff --git a/tests/open_xlsx_next_row_with_formula.phpt b/tests/open_xlsx_next_row_with_formula.phpt -index b754363..b0b23b1 100644 ---- a/tests/open_xlsx_next_row_with_formula.phpt -+++ b/tests/open_xlsx_next_row_with_formula.phpt -@@ -47,11 +47,11 @@ var_dump($excel->nextRowWithFormula()); - <?php - @unlink(__DIR__ . '/open_xlsx_next_row_with_formula.xlsx'); - ?> ----EXPECT-- -+--EXPECTF-- - [0] type=string value='n' style_id=0 - [1] type=string value='s' style_id=0 - [0] type=number value=42 - [1] type=string value='hello' --[0] type=number value=3.14 -+[0] type=number value=%f - [1] type=string value='world' - NULL |
