Skip to content

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Aug 9, 2025

@Girgias
Copy link
Member Author

Girgias commented Sep 11, 2025

@nielsdos do you have any idea why the CI is failling with a memory exhaustion? I can't seem to reproduce this locally at all :|

@TimWolla
Copy link
Member

do you have any idea why the CI is failling with a memory exhaustion?

It happens during output collection. Could it be that one test emits an extreme amount of deprecations?

@TimWolla
Copy link
Member

You could try removing the --no-progress and -g flags from the test runner invocation in CI.

@Girgias Girgias marked this pull request as ready for review September 11, 2025 19:43
@Girgias Girgias requested a review from a team September 11, 2025 19:43
php_error_docref(NULL, E_DEPRECATED,
"Providing a string which is not one byte long is deprecated, use ord($str[0]) instead");
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if the deprecation is converted to an exception - should RETURN_LONG still be used? Can you add a test case for that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of a conversion, the return value is simply discarded by the VM or JIT. So no special exception handling is needed

Copy link
Member

@edorian edorian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RM approval

"Providing an empty string is deprecated");
} else {
php_error_docref(NULL, E_DEPRECATED,
"Providing a string which is not one byte long is deprecated, use ord($str[0]) instead");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the restrictive vs non-restrictive clause thing, so it needs to be "that" instead of "which" ?

Suggested change
"Providing a string which is not one byte long is deprecated, use ord($str[0]) instead");
"Providing a string that is not one byte long is deprecated, use ord($str[0]) instead");

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Crell any opinion on the wording?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a restrictive clause, so that is slightly more correct but both are widely used. I'd say go with that.

https://www.merriam-webster.com/grammar/when-to-use-that-and-which

The bigger issue is that the comma should be a period, and use should start a new sentence. Otherwise it's a run-on sentence.

Copy link
Contributor

@alexdowad alexdowad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks.

Copy link
Contributor

@youkidearitai youkidearitai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from mbstring.

@Girgias Girgias merged commit 93676a0 into php:master Sep 14, 2025
8 of 9 checks passed
@Girgias Girgias deleted the 8.5-dep-ord branch September 14, 2025 10:47
nicolas-grekas added a commit to symfony/symfony that referenced this pull request Sep 26, 2025
This PR was merged into the 6.4 branch.

Discussion
----------

[Console] do not pass the empty string to ord()

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        |
| License       | MIT

see php/php-src#19440 and https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_string_which_are_not_one_byte_long_to_ord

Commits
-------

30037a1 do not pass the empty string to ord()
fabpot added a commit to symfony/symfony that referenced this pull request Sep 28, 2025
This PR was merged into the 7.3 branch.

Discussion
----------

[JsonPath] do not pass more than one byte to ord()

| Q             | A
| ------------- | ---
| Branch?       | 7.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        |
| License       | MIT

see php/php-src#19440

Commits
-------

cbdcffc do not pass more than one byte to ord()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants