Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interfaces can't have PHP4 constructors
Summary: Don't raise errors for them fixes #8121 Reviewed By: markw65 Differential Revision: D7418115
- Loading branch information
1 parent
aeb5357
commit 305fa86
Showing
4 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
error_reporting(E_ALL | E_STRICT | E_DEPRECATED); | ||
|
||
// No PHP4 constructor | ||
interface foo { | ||
public function foo(); | ||
} | ||
|
||
// No PHP4 constructor | ||
class bar implements foo { | ||
public function foo() {} | ||
} | ||
|
||
// No PHP4 constructor | ||
trait herp { | ||
public function derp() {} | ||
} | ||
|
||
// PHP4 constructor via trait | ||
class derp { | ||
use herp; | ||
} | ||
|
||
// direct PHP4 constructor | ||
class MyClass { | ||
public function MyClass() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; MyClass has a deprecated constructor in %s/test/slow/php7_bcbreak/php4-constructors.php on line 26 | ||
|
||
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; derp has a deprecated constructor in %s/test/slow/php7_bcbreak/php4-constructors.php on line 21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
hhvm.php7.all=1 |