Skip to content

Bootstrap: ext/gd module skeleton — imagecreate() Error stub (#7407) - #7479

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-7407-gd-skeleton
Jun 7, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-7407-gd-skeleton

Conversation

@PurHur

@PurHur PurHur commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #7407

php-src reference

  • ext/gd/gd.c — PHP_FUNCTION(imagecreate), module init
  • ext/gd/php_gd.h — GD module registration

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php bin/vm.php -r "var_export(function_exists(\"imagecreate\")); echo PHP_EOL;"
ls ext/gd
php bin/vm.php -r "
try { imagecreate(1, 1); } catch (Throwable \$e) {
  echo get_class(\$e), \": \", \$e->getMessage(), \"\\n\";
}"'

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter gd_skeleton'
php script/bootstrap-inventory.php --check

Output:

true
BuiltinClasses.php GdFunction.php Module.php imagecreate.php imagecreatetruecolor.php
Error: imagecreate() is not implemented in this compiler build (issue #3496)
OK (2 tests, 2 assertions)
OK 1725/1725

PHP-in-PHP

Stubs live entirely in ext/gd/*.php; no new runtime/*.c logic.

Made with Cursor

Registers gd extension symbols so function_exists() probes succeed and calls throw catchable Error pointing to #3496 until full GD parity lands.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit faf865b into master Jun 7, 2026
@PurHur
PurHur deleted the agent/issue-7407-gd-skeleton branch June 7, 2026 10:23
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.

Bootstrap: ext/gd module skeleton — imagecreate() must Error cleanly until #3496

1 participant