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

Fixed bug #69196 (PharData should extends Phar) #1157

Closed
wants to merge 1 commit into from

Conversation

reeze
Copy link
Contributor

@reeze reeze commented Mar 7, 2015

Doc: http://php.net/manual/en/class.phardata.php
clearly declared that PharData extends Phar.

@reeze
Copy link
Contributor Author

reeze commented Mar 7, 2015

I am going to merge this if no objections.

@laruence
Copy link
Member

laruence commented Mar 7, 2015

please hold for one or two days, before someone know this fields really see..

@reeze
Copy link
Contributor Author

reeze commented Mar 7, 2015

OK~~

@ghost
Copy link

ghost commented Mar 7, 2015

Can one of the admins verify this patch?

@@ -5239,6 +5239,41 @@ ZEND_END_ARG_INFO()

#endif /* HAVE_SPL */

/* PharData share the implement of Phar class, override are implemented inside those methods */
Copy link
Contributor

Choose a reason for hiding this comment

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

so why you need to copy the whole function table? I'm not sure I understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @smalyshev, It is not the whole function table, this function table contains only functions for PharData class. (from the doc: http://php.net/phardata), those method internally handle different classes like this https://github.com/php/php-src/blob/master/ext/phar/phar_object.c#L1126 .

@@ -5370,8 +5405,8 @@ void phar_object_init(TSRMLS_D) /* {{{ */
phar_ce_archive = zend_register_internal_class(&ce TSRMLS_CC);
phar_ce_archive->ce_flags |= ZEND_ACC_FINAL_CLASS;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure it's a good practice to extend a final class. In general, if we extend it maybe it should not be final, but if we need it to be final, maybe set it to final after we extend it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point!

@krakjoe
Copy link
Member

krakjoe commented Jan 5, 2017

Since this targets an unsupported branch, and a patch against a supported branch would have to look different, in addition there seems to be unresolved problems or questions about the implementation (asked by the author himself), I'm closing this PR.

Please take this action as encouragement to open a clean PR against a supported branch.

@krakjoe krakjoe closed this Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants