Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.4', '8.5']
php: ['8.3', '8.4', '8.5']
name: PHP ${{ matrix.php }}
steps:
- uses: actions/checkout@v7
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

## [Unreleased]

## [0.8.2] - 2026-11-09

### Changed

- Support PHP 8.3 again. The only PHP 8.4 functions in use were two
`array_any()` calls, now `array_filter()` checks with the same result.
The lock file resolves against PHP 8.3.0 and CI runs the regular suite on
PHP 8.3, 8.4 and 8.5.
- Require `openstatspec/spss-sav` ^3.2, the first codec release that runs on
PHP 8.3 and writes very long string records that IBM SPSS recognises.
The engine capability declaration now lists 3.2.0 as the CI-tested codec.

## [0.8.1] - 2026-11-09

### Changed
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ Only unencrypted SAV and ZSAV are supported. Encrypted files, Portable (`.por`)

## Requirements

- PHP 8.4.1 or later
- PHP 8.3 or later
- `ext-pdo`
- Selected PDO driver: `pdo_sqlite`, `pdo_pgsql`, or `pdo_mysql`
- `openstatspec/spss-sav` 3.x, installed by Composer. The php-spss V3 engine needs `ext-bcmath`, `ext-mbstring` and `ext-zlib`.

Composer resolves dependencies against PHP 8.4.1, the package minimum.
Composer resolves dependencies against PHP 8.3.0, the package minimum.

## API

Expand Down Expand Up @@ -272,7 +272,7 @@ bash tools/install-git-hooks.sh

`composer check` validates Composer configuration, lints PHP, checks style, runs PHPStan and runs PHPUnit. Use `composer fix` for safe style fixes, then rerun `composer check`.

GitHub Actions runs the regular suite on PHP 8.4 and 8.5. It also runs real
GitHub Actions runs the regular suite on PHP 8.3, 8.4 and 8.5. It also runs real
SAV and ZSAV integration round trips against exact PostgreSQL 17.10/18.4,
MySQL 8.4.11/9.7.2, MariaDB 11.4.12/11.8.8/12.3.2, and Dolt
2.2.2/2.2.3.
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
]
},
"require": {
"php": "^8.4.1",
"php": "^8.3",
"ext-mbstring": "*",
"ext-pdo": "*",
"brick/math": "^0.19",
"openstatspec/spss-sav": "^3.0"
"openstatspec/spss-sav": "^3.2"
},
"repositories": [
{
Expand Down Expand Up @@ -56,7 +56,7 @@
"config": {
"sort-packages": true,
"platform": {
"php": "8.4.1"
"php": "8.3.0"
}
},
"minimum-stability": "stable",
Expand Down
18 changes: 9 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Frontend/Spss/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ public function compile(BoundProgram $program): TransformationPlan
};
}

$contract = array_any(
$contract = array_filter(
$operations,
static fn(Operation $operation): bool => $operation->minimumContract() === PlanContract::V02,
) ? PlanContract::V02 : PlanContract::V01;
) !== [] ? PlanContract::V02 : PlanContract::V01;

return new TransformationPlan($contract, $program->inputAlias, $operations);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Spss/PhpSpssEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class PhpSpssEngine implements SpssEngine
public const READER_CLASS = 'SPSS\\Sav\\Reader';
public const WRITER_CLASS = 'SPSS\\Sav\\Writer';
public const CLAIMED_VERSION_RANGE = '>=3.0.0 <4.0.0';
public const CI_TESTED_VERSIONS = ['3.1.1'];
public const CI_TESTED_VERSIONS = ['3.2.0'];

public function isAvailable(): bool
{
Expand Down
2 changes: 1 addition & 1 deletion src/Sql/OperationJournal.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function fail(
$this->updateNormativeOperation($operationId, 'failed');
}

if (!array_any($diagnostics, static fn(FidelityDiagnostic $diagnostic): bool => $diagnostic->code === $failureCode)) {
if (array_filter($diagnostics, static fn(FidelityDiagnostic $diagnostic): bool => $diagnostic->code === $failureCode) === []) {
$diagnostics[] = new FidelityDiagnostic(
$failureCode,
$exception->getMessage(),
Expand Down
4 changes: 2 additions & 2 deletions tests/Core/CapabilityDeclarationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public function testDeclarationIsMachineReadableAndIncludesEveryProfileLimit():
], $contracts['opt_in_frontend_contracts']);
self::assertArrayNotHasKey('legacy_plan_contracts', $contracts);
self::assertFalse(class_exists(\OpenStatSpec\Transformation\Model\TransformationPlan::class));
self::assertSame('3.1.1', $declaration['engine']['active_version']);
self::assertSame('3.2.0', $declaration['engine']['active_version']);
self::assertSame('>=3.0.0 <4.0.0', $declaration['engine']['claimed_version_range']);
self::assertSame(['3.1.1'], $declaration['engine']['ci_tested_versions']);
self::assertSame(['3.2.0'], $declaration['engine']['ci_tested_versions']);
self::assertTrue($declaration['engine']['claimed_supported']);
self::assertNotEmpty($declaration['required_capabilities']);
foreach ($declaration['required_capabilities'] as $supported) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/OfficialSpssConformanceManifestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private function assertRequiredCapabilities(array $manifest, SpssAdapter $adapte
self::assertTrue($declaration['active_connection']['claimed_supported'], $profile . ': active server version is outside the claimed profile');
self::assertSame($declaration['sql_profiles'][$profile]['claimed_server_versions'], $declaration['active_connection']['matched_claim']);
self::assertTrue($declaration['engine']['claimed_supported']);
self::assertSame(['3.1.1'], $declaration['engine']['ci_tested_versions']);
self::assertSame(['3.2.0'], $declaration['engine']['ci_tested_versions']);
self::assertContains($profile, array_keys($declaration['sql_profiles'] ?? []));
self::assertContains('import', $declaration['directions'] ?? []);
self::assertContains('export', $declaration['directions'] ?? []);
Expand Down
6 changes: 3 additions & 3 deletions tests/Spss/SpssAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public function testComposerInstallsTheOfficialPhpSpssV3Engine(): void
self::assertTrue(class_exists(Dataset::class));
self::assertSame([
'package' => 'openstatspec/spss-sav',
'version' => '3.1.1',
'active_version' => '3.1.1',
'version' => '3.2.0',
'active_version' => '3.2.0',
'claimed_version_range' => '>=3.0.0 <4.0.0',
'ci_tested_versions' => ['3.1.1'],
'ci_tested_versions' => ['3.2.0'],
'claimed_supported' => true,
], (new PhpSpssEngine())->identity());
}
Expand Down
Loading