Skip to content

Update FFI constant ID #3214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 5, 2024
Merged

Update FFI constant ID #3214

merged 4 commits into from
Mar 5, 2024

Conversation

haszi
Copy link
Contributor

@haszi haszi commented Feb 28, 2024

Update FFI constant ID to the "standard" class constant ID format.

Add bash script this update was made with so that it can be applied to translations as well.

@haszi
Copy link
Contributor Author

haszi commented Feb 29, 2024

The bash script:

#! /bin/bash

\grep -lrE --include='*.xml' '"ffi-ffi\.constants\.biggest-alignment"' | xargs -d '\n' sed -i 's/"ffi-ffi\.constants\.biggest-alignment"/"ffi\.constants\.--biggest-alignment--"/g'

@@ -64,7 +64,7 @@
<section xml:id="ffi-ffi.constants">
&reftitle.constants;
<variablelist>
<varlistentry xml:id="ffi-ffi.constants.biggest-alignment">
<varlistentry xml:id="ffi.constants.--biggest-alignment--">
Copy link
Member

Choose a reason for hiding this comment

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

Ditto same as magic constants, also the ffi-ffi is think is used to distinguish between global FFI constants and constants on the FFI class

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a constant of the FFI class that's why it's in the classname.constants.constant-name format. Global (non-class) constant IDs are in the constant.constant-name format.

Looking at the stub and arginfo files, FFI doesn't seem to have any global (non-class) constants.

Copy link
Member

Choose a reason for hiding this comment

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

Ah right, okay that makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And this is the script for the latest ID:

\grep -lrE --include='*.xml' '"ffi-ffi\.constants\.biggest-alignment"' | xargs -d '\n' sed -i 's/"ffi-ffi\.constants\.biggest-alignment"/"ffi\.constants\.biggest-alignment"/g'

@Girgias Girgias merged commit 246772c into php:master Mar 5, 2024
@haszi haszi deleted the Update-FFI-constant-ID branch March 6, 2024 08:39
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.

2 participants