Skip to content
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

fix: compile on php84 #60

Merged
merged 1 commit into from
Sep 27, 2024
Merged

fix: compile on php84 #60

merged 1 commit into from
Sep 27, 2024

Conversation

tessus
Copy link
Member

@tessus tessus commented Sep 27, 2024

The functions php_strto* were removed in PHP 8.4.

The replacement functions have been around since PHP 5.4, thus we do not need a conditional macro via define.

@tessus
Copy link
Member Author

tessus commented Sep 27, 2024

The Windows pipeline fails with:

Run cmb69/[email protected]
Run D:\a\_actions\cmb69\setup-php-sdk\v0.6/run -version 7.4 -arch x64 -ts ts -deps @()
toolset not available
At D:\a\_actions\cmb69\setup-php-sdk\v0.6\run.ps1:43 char:5
+     throw "toolset not available"
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (toolset not available:String) [], RuntimeException
    + FullyQualifiedErrorId : toolset not available
 
Error: Process completed with exit code 1.

I haven't touched Windows since Win 3.11, thus I have no clue how to fix this. ;-)

@NattyNarwhal
Copy link
Member

I think the action being used moved over to https://github.com/php/setup-php-sdk; I'll raise the version in CI but this LGTM.

@NattyNarwhal NattyNarwhal merged commit 267f969 into master Sep 27, 2024
7 of 11 checks passed
@NattyNarwhal
Copy link
Member

I think the action used for Windows dropped support for unsupported PHP versions. Also shoutout to how CI is very "submit punch cards and hope for the best".

@NattyNarwhal
Copy link
Member

Well, we have a new error in Windows CI:

ibm_db2.obj : error LNK2019: unresolved external symbol zend_str_toupper_dup referenced in function _php_db2_bind_fetch_helper

It is also warning in Linux, albeit bizarrely it is linking just fine (and passing tests, too):

/home/runner/work/pecl-database-ibm_db2/pecl-database-ibm_db2/ibm_db2.c:6239:60: warning: implicit declaration of function ‘zend_str_toupper_dup’; did you mean ‘zend_str_tolower_dup’? [-Wimplicit-function-declaration]
 6239 |                 stmt_res->column_info[i].name = (SQLCHAR *)zend_str_toupper_dup((char *)stmt_res->column_info[i].name, strlen((char *)stmt_res->column_info[i].name));
      |                                                            ^~~~~~~~~~~~~~~~~~~~
      |                                                            zend_str_tolower_dup

I looked at least the 8.1 branch and zend_str_toupper_dup isn't there, but zend_str_tolower_dup is. Looks like it appeared in PHP 8.2.

@tessus
Copy link
Member Author

tessus commented Sep 27, 2024

In that case I'll create another PR that uses a define....

@tessus
Copy link
Member Author

tessus commented Sep 27, 2024

Ah, just saw that you pushed another commit already.... thx

@kadler
Copy link
Contributor

kadler commented Sep 30, 2024

I think the action used for Windows dropped support for unsupported PHP versions. Also shoutout to how CI is very "submit punch cards and hope for the best".

TBH I think "submit punch cards" would be more stable than public CI systems.

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.

3 participants