Skip to content

Conversation

@Girgias
Copy link
Member

@Girgias Girgias commented Jan 5, 2026

Commits should be reviewed individually.

The primary motivation for me to introduce the newer FCC APIs was to make it easier to handle userland callables as the class autoloading system had a few bugs due to the complex semantics.

This is effectively taking the class autoloading part of #8294 as it is a straight-up code clarity improvement.

@Girgias Girgias requested a review from ndossche January 5, 2026 17:50
@Girgias Girgias marked this pull request as ready for review January 5, 2026 23:43
}

zend_hash_next_index_insert_ptr(spl_autoload_functions, alfi);
zend_fcall_info_cache *entry = emalloc(sizeof(zend_fcall_info_cache));
Copy link
Member

Choose a reason for hiding this comment

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

Could use zend_hash_next_index_insert_mem here

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think this is correct, as I need to do a "deep" copy of the FCC by increasing refcounts rather than a shallow dup. Will add a comment to explain this.

Remove unused parameter
Use zend_string_concat2() API
Use size_t for ext_len parameter type
Return bool instead of int
This is used only once anyway
@Girgias Girgias force-pushed the autoloader-fcc-api branch from 9304196 to cb596b2 Compare January 11, 2026 14:28
@Girgias Girgias requested a review from ndossche January 11, 2026 14:28
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.

2 participants