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

Re-enable runkit_import with very limited feature support (doesn't support changing properties, even for new classes) #107

Merged
merged 9 commits into from
Aug 17, 2017

Conversation

TysonAndre
Copy link
Member

@TysonAndre TysonAndre commented Aug 12, 2017

For #73

Property manipulation isn't supported for runkit_import (Code hasn't been fully ported to php 7 yet, and would crash if it were requested)

  • As a result, property manipulation is rejected, with or without overrides (The same runkit C functions are used to add properties whether or not the class already existed, and they won't add properties properly at the moment.
  • Removing this check (Preventing properties from being manipulated) from C may result in crashes.
  • TODO: investigate how to initialize a class with a new properties table, and the associated lookup

Method manipulation and function manipulation should work.

Constant manipulation works, but has the same limitations as runkit_constant_add/redefine/remove in this fork, due to aggressive inlining by the PHP compiler.

TysonAndre and others added 9 commits August 16, 2017 17:41
TODO: tests/runkit_add_old_style_ctor_by_importing.inc segfaults

Work on getting runkit_import.c to compile, add runkit_import to
functions declared by runkit
FIXME this doesn't copy the properties yet. Just the methods.
The ALIAS is an alias from an internal (C) function to a user-defined
PHP function. This should assert the inside is a ZEND_USER_FUNCTION.
@TysonAndre TysonAndre changed the title WIP (incomplete, lacks property support) - Work on reenabling runkit_import Re-enable runkit_import with very limited features support (doesn't support changing properties, even for new classes) Aug 17, 2017
@TysonAndre TysonAndre changed the title Re-enable runkit_import with very limited features support (doesn't support changing properties, even for new classes) Re-enable runkit_import with very limited feature support (doesn't support changing properties, even for new classes) Aug 17, 2017
@TysonAndre TysonAndre merged commit de331c0 into master Aug 17, 2017
@TysonAndre TysonAndre deleted the work-on-runkit_import branch November 17, 2017 17:01
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.

None yet

2 participants