Skip to content

Conversation

@aaa2000
Copy link
Contributor

@aaa2000 aaa2000 commented Dec 4, 2025

Q A
Branch main
License MIT

This PR updates the GitHub Actions workflow to use the latest stable PHP version, 8.5, in the CI pipeline.

… is deprecated since 8.5, as it has no effect

As of PHP 8.1.0, calling this method has no effect; all properties are accessible by default.

@see https://www.php.net/manual/en/reflectionproperty.setaccessible.php
@see https://wiki.php.net/rfc/deprecations_php_8_5#extreflection_deprecations
ArrayObject::__construct(): Using an object as a backing array for ArrayObject is deprecated, as it allows violating class constraints and invariants
Method SplObjectStorage::contains() is deprecated since 8.5, use method SplObjectStorage::offsetExists() instead
Method SplObjectStorage::detach() is deprecated since 8.5, use method SplObjectStorage::offsetUnset() instead
@aaa2000
Copy link
Contributor Author

aaa2000 commented Dec 5, 2025

The error of the "PHPUnit + Behat (PHP 8.5) (MongoDB)" job is already present on the main branch.

The errors of others behat jobs appear to be related to the following deprecation https://wiki.php.net/rfc/warnings-php-8-5#coercing_nan_to_other_types

<response>
	<title>An error occurred</title>
	<detail>Warning: unexpected NAN value was coerced to string in
		/code/vendor/doctrine/dbal/src/Driver/PDO/Statement.php line 26
	</detail>
	<status>500</status>
	<type>/errors/500</type>
	<trace>
		<function>handleError</function>
		<class>Behat\Testwork\Call\Handler\RuntimeCallHandler</class>
		<type><![CDATA[->]]></type>
	</trace>
	<trace>
		<file>/code/vendor/doctrine/dbal/src/Driver/PDO/Statement.php</file>
		<line>26</line>
		<function>bindValue</function>
		<class>PDOStatement</class>
		<type><![CDATA[->]]></type>
	</trace>

When the value is NaN, INF, or -INF, PDO::bindValue with PDO::PARAM_STR appears to convert to a string and throw the warning Warning: unexpected NAN value was coerced to string

Note: These values ​​are not compatible with SQLite, the value is 0, unlike postgres.

<?xml version="1.0"?><response><id>2</id><myFloatField>NAN</myFloatField></response>
<?xml version="1.0"?><response><id>3</id><myFloatField>INF</myFloatField></response>
`<?xml version="1.0"?>\n<response><id>4</id><myFloatField>-INF</myFloatField></response>

no idea how to fix it... Should the test be ignored in PHP 8.5?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant