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

php4 style constructors halt on deprecated under php7 compatability #7229

Closed
photodude opened this issue Jul 14, 2016 · 5 comments
Closed

php4 style constructors halt on deprecated under php7 compatability #7229

photodude opened this issue Jul 14, 2016 · 5 comments

Comments

@photodude
Copy link
Contributor

HHVM Version

3.12.4 / 3.14.2

Standalone code, or other way to reproduce the problem

travis ci unit test of Joomla showing the error and point processing halts
Methods with the same name as their class will not be constructors in a future version of PHP; Cache_Lite has a deprecated constructor: in JCacheStorageTest::casesGetInstance

Expected result

with PHP 7 compatability turned on php4 style constructors halt on deprecated under php7 compatability.

Deprecation messages should throw a deprecation message, and should not halt the processing of the file.

Actual result

Program halts on message :
Methods with the same name as their class will not be constructors in a future version of PHP; Cache_Lite has a deprecated constructor: in JCacheStorageTest::casesGetInstance

@photodude
Copy link
Contributor Author

photodude commented Sep 1, 2016

PHP unit says this is likely an HHVM issue sebastianbergmann/phpunit#2278 (comment)

@simonwelsh

@aorenste
Copy link
Contributor

I tried to create a small test and it seems that the deprecation message doesn't halt processing of the file:

<?php
class Foo {
  function Foo() { printf("in Foo::Foo\n"); }
}
$x = new Foo();
printf("After Foo()\n");
$ hhvm -d hhvm.php7.all=1 tmp.php

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Foo has a deprecated constr$
in Foo::Foo
After Foo()

Am I misunderstanding the issue?

@photodude
Copy link
Contributor Author

Perhaps it's just causing phpunit to halt and no longer to process files. It's not the same behavior that I'm seeing with php 7.

@photodude
Copy link
Contributor Author

Here is a travis test comparison
HHVM php unit tests dies at about 13% https://travis-ci.org/photodude/joomla-cms/jobs/142317919
PHP 7 php unit tests completes https://travis-ci.org/photodude/joomla-cms/jobs/163263564

I would re-run a current test but I'm no longer able to run HHVM tests in php 7 mode due to #7198

@photodude
Copy link
Contributor Author

Closing as I no longer interested in HHVM.

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

3 participants