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

PHP7 support #87

Open
RikudouSage opened this issue Aug 27, 2015 · 43 comments
Open

PHP7 support #87

RikudouSage opened this issue Aug 27, 2015 · 43 comments

Comments

@RikudouSage
Copy link

Hello, is there a plan for php 7 support? I use your module and recently I installed php 7 so I can start testing my apps and I would really appreciate if you make a php 7 version :)

@zenovich
Copy link
Owner

zenovich commented Sep 5, 2015

Show me the money ;)

@RikudouSage
Copy link
Author

Okay, I will donate you, if you make the php 7 version :)

@TysonAndre
Copy link
Contributor

TysonAndre commented Sep 9, 2015

I forked the project to support a subset of runkit's functions for PHP7:
https://github.com/runkit7/runkit7

EDIT: Current status can be seen at https://github.com/runkit7/runkit7#compatability-php70-to-php-72

  • This has been compiled in 64-bit builds of PHP on Linux
    EDIT: and 32-bit builds work equally well, as well as on windows.
  • ... and will run (downhill, downwind, in a hurricane). There are bugs related to segmentation faults and memory management. There are also bugs related to language features that have changed in PHP7.
    EDIT: Any segfaults were fixed, memory management is still not freed (to avoid crashes), but should be suitable for unit testing
  • 59/177 of runkit's tests are passing in the PHP7 fork
  • 32-bit builds haven't been tested, and probably aren't working yet.
  • The enabled runkit functions are
  • runkit_method_add
  • runkit_method_copy
  • runkit_method_redefine
  • runkit_method_remove
  • runkit_function_add
  • runkit_function_copy
  • runkit_function_remove, and
  • runkit_function_redefine.
  • EDIT: runkit_object_id was added
  • EDIT: runkit_import is in progress for a subset of flags, doesn't allow importing properties yet

Help is welcome from people with experience creating/maintaining/upgrading PHP extensions, or who are familiar with Zend internals.


👍 on PHP7 support. I use runkit for unit testing, and want to test out a PHP5 project on PHP7.

EDIT: More tests are working, including some(but not all) of the tests of constants (Zend VM aggressively inlines constants within the same scope/file). I still don't have class manipulation, properties or import working, sadly.
EDIT: tests are passing, except for some expected failures for constant manipulation (some inlined by Zend VM optimizations). property manipulation was disabled.
EDIT: runkit_import has partial support, but doesn't support all of the flags
EDIT: This now supports php 7.2 and 7.3alpha2 as well

@zenovich
Copy link
Owner

zenovich commented Sep 9, 2015

I don't like the idea of castrating Runkit for PHP7.

@RikudouSage
Copy link
Author

Why castrating? PHP 5 will be a thing of past in few years, why do you think it's best idea to port it for PHP7?

@zenovich
Copy link
Owner

zenovich commented Sep 9, 2015

Now people use PHP 5 and there are no reasons to discard it.
Anyway now I already have "Tests passed: 90" and I will not participate in @TysonAndre 's branch. Sorry.

@RikudouSage
Copy link
Author

I'm okay with that, it's your choice, I just do not understand your point of view, that's all. Anyway, thanks for your work on this module, I use it in my project :)

@TysonAndre
Copy link
Contributor

That's fine.

To clarify: you're developing a branch of runkit that works with the latest release candidate of PHP 7, and 90/177 tests are passing?

Also, which way do you plan to port runkit to PHP7?

  • A single branch that should compile with both PHP 7 and PHP <= 5.6?
  • A separate branch for PHP7?

@zenovich
Copy link
Owner

zenovich commented Sep 9, 2015

Yes, actually 97/175 with php7rc2, a single branch for all PHP versions.

@tristanleboss
Copy link

I do agree with @zenovich, it's better to keep every change to this repository in order to have a single runkit version compatible with both PHP 5 and PHP 7 because PHP 5 will be used for another decade.

@RikudouSage
Copy link
Author

@tristanleboss I would agree with zenovich too, but he stated that he does not "like the idea of castrating Runkit for PHP7".

@mishan
Copy link

mishan commented Oct 8, 2015

@tristanleboss @RikudouSage To be fair, I think @TysonAndre 's intention was to simply get it working with PHP7 as a proof of concept, not to drop the support for good. If I were to try to do it myself, I'd probably figure it out how to make it work for PHP7 first and then bother with the older PHP versions. The intent would not be to "castrate" it.

@zenovich
Copy link
Owner

zenovich commented Oct 8, 2015

Sorry, guys, but Runkit that works only with PHP 7 x64 without importing, without constants and properties manipulations, and without classes adoption or emancipation was definitely castrated.

@mishan
Copy link

mishan commented Oct 8, 2015

@zenovich It wasn't the plan to leave it out, I think that was just testing around. At least that's how I would have approached it and that's how it looks to me.

EDiT: So, to clarify, I totally agree that it would be "castrating" it to remove older PHP and I am not disagreeing with you. I'm just pointing out that this was not actually intended as something that would be ever released.

@zenovich
Copy link
Owner

zenovich commented Oct 8, 2015

Again, I already know how to achieve the full support of PHP 7 compatibly with PHP 5, but it is big work and I'm sure this work should be paid for. Sponsors are welcomed to discuss this via email dzenovich@gmail.com

@mishan
Copy link

mishan commented Oct 8, 2015

@zenovich Well you are the guy to do it :) We've spoken over email already and what we've discussed still stands.

@duchnoun
Copy link

Some news about support runkit on Php 7 ^^

@taylorotwell
Copy link

How much money? 😄

@zenovich
Copy link
Owner

We can talk about this in person if you want to. My email is dzenovich@gmail.com.

@digitalist
Copy link

digitalist commented Jun 15, 2016

@zenovich didn't you think about https://www.kickstarter.com/discover/categories/technology/software ? set some reasonable price and it will be faster I guess

@zenovich
Copy link
Owner

@digitalist I thought of different things, but I have no time to do them.

@mircea-soaica
Copy link

Are there any news regarding php7 support?
Runkit would fit perfectly for our use case but we use PHP 7 in development and also in production in a short time.

Can we start investing in runkit or should we find an alternative?

@TysonAndre
Copy link
Contributor

TysonAndre commented Oct 19, 2016

I mentioned my unaffiliated runkit7 fork earlier.

See https://github.com/runkit7/runkit7#compatability-php70-partial-buggy and https://github.com/runkit7/runkit7#reasons-for-disabling-property-manipulation to see if that fits your use case.

@mircea-soaica
Copy link

@TysonAndre I've seen your repo, but that is an incomplete implementation "Runkit that (mostly) works in PHP7" and as I said, we need to run this in production.

@ghost
Copy link

ghost commented Jan 25, 2017

I managed to get the fork installed but am struggling with "unknown type" on a string argument (in debug the variable looks like a string).

Any suggestions?

@TysonAndre
Copy link
Contributor

@pfalsoncup File a bug in https://github.com/runkit7/runkit7 instead of this thread for issues with the fork.

If you can create a self-contained test case (E.g. a repo with instructions to reproduce the bug, or preferably a self-contained php file, php-config output, and optionally ini settings), that would help with fixing that.

@ghost
Copy link

ghost commented Jan 25, 2017

nvm...I ended up using json/decode+encode.

FWIW I'm just trying to trace when laravel urldecodes (as I have an app that works on one box but not another).

@ForbiddenEra
Copy link

Please support PHP7. I would consider donating as well. Several users have offered.

The current source won't even compile! I wanna use a spoon, not a fork!

@dricket
Copy link

dricket commented Mar 2, 2017

@zenovich How about name your price on kickstarter? $50k? $100k? I wouldn't be surprised if business users would put in real money. As it stands php5 is now officially deprecated (support ended in Jan 17) so my company is moving to php7, which that means we will lose runkit for our tests.

@zenovich
Copy link
Owner

@dricket
A year and a half ago I had a lot of free time and started working on support for PHP7 in Runkit. I thought there had to be some people and companies interested in and willing to pay for that. There were some, actually, but $1,000 were the most generous offer from them. For that reason, I postponed the PHP7 support although I had implemented some part of this task.

Now I have a regular job and don't have much time for doing something else. But, of course, if it's possible to fundraise $100,000 for that, I will spend all my free time working on the project.

I haven't tried Kickstarter yet. Do you think it can help indeed?

@BuaaJoseph
Copy link

Is there a runkit project to suport PHP7?

@cpriest
Copy link

cpriest commented Jul 20, 2017

@zenovich I was just exploring upgrading to PHP 7 and found this sad thread. We use Runkit Sandbox extensively. I'm certain that if you setup a kickstarter/gofundme/... project that you would get some, perhaps a lot, of support.

@cpriest
Copy link

cpriest commented Jul 20, 2017

Especially if you added bonus spiff levels such as "Runkit for PHP7 with small feature addition." or "Runkit for PHP7 with large feature edition."

@zenovich
Copy link
Owner

@cpriest what do you mean by "some" and "a lot" of support? just write an order of magnitude

@cpriest
Copy link

cpriest commented Jul 23, 2017

You'd have a better idea of that, I've no idea how many companies / people use runkit.

@mike-bailey
Copy link

mike-bailey commented Aug 25, 2017

So, just to recap, instead of actually having partial, kinda buggy, PHP7 support a year ago we though it'd be better to have none?

@mishan
Copy link

mishan commented Aug 25, 2017

Folks (sorry Dima) -- you can always try https://github.com/runkit7/runkit7

A colleague developed it and thanks to it we were able to move to PHP 7 and beyond. If there are issues you have, you can always file an issue on the issue tracker on GitHub. Contributions of code are welcome, too!

@mike-bailey
Copy link

Just to be clear, I am aware of this, I was just commenting on how it's funny how we needed two repos/projects for this because reasons. Thanks for it!

@loonies
Copy link

loonies commented Aug 26, 2017

Alternatives: UOPZ and SoftMocks

@cpriest
Copy link

cpriest commented Sep 14, 2018

What happened?

@alfredleo
Copy link

Zenovich is not dead. France-ioi/AlgoreaBackend@029788b

@mike-bailey
Copy link

Commit's even GPG signed...

@vipcoders
Copy link

Hello, is there a plan for php 7 support? I use your module and recently I installed php 7 so I can start testing my apps and I would really appreciate if you make a php 7 version :)

I can change your product and it will works on both versions like PHP 5+ and PHP 7 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests