Skip to content

Support test-ini also for phpize builds #8787

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

Closed
wants to merge 1 commit into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Jun 15, 2022

Automatically generating and using test INI files is supported for
in-tree build (buildconf) for a long time, and this can make sense
for phpize builds too, especially when the build extension is a zend
extension, so it can be properly loaded.

Thus we make --enable-test-ini and --with-test-ini-ext-exclude
available for phpize, but default to false for full BC.

Automatically generating and using test INI files is supported for
in-tree build (`buildconf`) for a long time, and this can make sense
for phpize builds too, especially when the build extension is a zend
extension, so it can be properly loaded.

Thus we make `--enable-test-ini` and `--with-test-ini-ext-exclude`
available for phpize, but default to false for full BC.
@cmb69
Copy link
Member Author

cmb69 commented Aug 22, 2022

If there are no objections, I'll merge this by the end of the week.

@cmb69 cmb69 closed this in c643cbf Aug 26, 2022
@cmb69 cmb69 deleted the cmb/phpize-test-ini branch August 26, 2022 12:25
@reeperbahnause
Copy link

Hi @cmb69
I have a quick question regarding this change:
https://github.com/php/php-src/pull/8787/files#diff-f20feddec2eff215acf86d20606f15e32aa0c8c4265419c6f7282f38e0b208e7R47
image
The $(TESTS) argument was moved to the end of the command.
Because of this change the tests of the mailparse extension are not working anymore for php > 8.1.
This is because the mbstring extension has to be loaded before the new compiled mailparse extension.
Do you have any advice how I could solve this or do you want me to open a new issue?

@cmb69
Copy link
Member Author

cmb69 commented Jul 22, 2024

Argh! I have no idea why I canged the order of the arguments back then, but obviously that indeed broke running tests with nmake test for extensions requiring other extensions to be loaded first. It might be best to fix this (after all, bug fixes still may target PHP-8.2), although I'm not sure. Did you already report that elsewhere?

Without the fix, it's still possible to work around the issue by configuring with --enable-test-ini and then manually prepending the additional extension; see php/pecl-mail-mailparse@0b757f6. If the setup-php-sdk action would output the path to the build folder (which would be useful for other purposes, too), that "patch ini" step could be reduced to two lines. But still, there need to be additional conditions to control the job flow to support older as well as newer PHP versions (since old phpize versions don't support --enable-test-ini).

And there is https://github.com/php/php-windows-builder which might support this out-of-the-box. I haven't yet looked closely at this, though.

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