com php-src: Merge branch 'PHP-7.4': ext/phar/tests/phar_comm itwrite.phpt ext/phar/tests/phar_create_in_cwd.phpt
ext/phar/tests/tar/phar_commitwrite.phpt ext/phar/test s/zip/phar_commitwrite.phpt
| From: | Nikita Popov | Date: | Fri, 22 Feb 2019 09:53:28 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.4': ext/phar/tests/phar_comm itwrite.phpt ext/phar/tests/phar_create_in_cwd.phpt ext/phar/tests/tar/phar_commitwrite.phpt ext/phar/test s/zip/phar_commitwrite.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-104825@lists.php.net to get a copy of this message | ||
Commit: 3b5e566e621e30f3c987629f3b814ed80e2a9034
Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 22 Feb 2019 10:53:28 +0100
Parents: 60eee277574e4b5a6e8dbc06ade392a885660242 d3e00decd425982e5b12db5c92f5c902cffdf1af
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3b5e566e621e30f3c987629f3b814ed80e2a9034
Log:
Merge branch 'PHP-7.4'
Changed paths:
MM ext/phar/tests/phar_commitwrite.phpt
MM ext/phar/tests/phar_create_in_cwd.phpt
MM ext/phar/tests/tar/phar_commitwrite.phpt
MM ext/phar/tests/zip/phar_commitwrite.phpt
Diff:
diff --cc ext/phar/tests/phar_commitwrite.phpt
index 56d3498,9671737..7a3b5e7
--- a/ext/phar/tests/phar_commitwrite.phpt
+++ b/ext/phar/tests/phar_commitwrite.phpt
@@@ -12,11 -12,12 +12,11 @@@ $p['file1.txt'] = 'hi'
$p->stopBuffering();
var_dump(strlen($p->getStub()));
$p->setStub("<?php
-function __autoload(\$class)
-{
+spl_autoload_register(function(\$class) {
include 'phar://' . str_replace('_', '/', \$class);
-}
+});
- Phar::mapPhar('brandnewphar.phar');
- include 'phar://brandnewphar.phar/startup.php';
+ Phar::mapPhar('phar_commitwrite.phar');
+ include 'phar://phar_commitwrite.phar/startup.php';
__HALT_COMPILER();
?>");
var_dump($p->getStub());
@@@ -30,11 -31,12 +30,11 @@@ __HALT_COMPILER()
--EXPECTF--
int(6641)
string(%d) "<?php
-function __autoload($class)
-{
+spl_autoload_register(function($class) {
include 'phar://' . str_replace('_', '/', $class);
-}
+});
- Phar::mapPhar('brandnewphar.phar');
- include 'phar://brandnewphar.phar/startup.php';
+ Phar::mapPhar('phar_commitwrite.phar');
+ include 'phar://phar_commitwrite.phar/startup.php';
__HALT_COMPILER(); ?>
"
===DONE===
diff --cc ext/phar/tests/phar_create_in_cwd.phpt
index c1ed955,52120fa..4a9bd23
--- a/ext/phar/tests/phar_create_in_cwd.phpt
+++ b/ext/phar/tests/phar_create_in_cwd.phpt
@@@ -13,11 -13,12 +13,11 @@@ try
$p['file1.txt'] = 'hi';
var_dump(strlen($p->getStub()));
$p->setStub("<?php
-function __autoload(\$class)
-{
+spl_autoload_register(function(\$class) {
include 'phar://' . str_replace('_', '/', \$class);
-}
+});
- Phar::mapPhar('brandnewphar.phar');
- include 'phar://brandnewphar.phar/startup.php';
+ Phar::mapPhar('phar_create_in_cwd.phar');
+ include 'phar://phar_create_in_cwd.phar/startup.php';
__HALT_COMPILER();
?>");
var_dump($p->getStub());
@@@ -33,11 -34,12 +33,11 @@@ unlink(dirname(__FILE__) . '/phar_creat
--EXPECTF--
int(6641)
string(%d) "<?php
-function __autoload($class)
-{
+spl_autoload_register(function($class) {
include 'phar://' . str_replace('_', '/', $class);
-}
+});
- Phar::mapPhar('brandnewphar.phar');
- include 'phar://brandnewphar.phar/startup.php';
+ Phar::mapPhar('phar_create_in_cwd.phar');
+ include 'phar://phar_create_in_cwd.phar/startup.php';
__HALT_COMPILER(); ?>
"
===DONE===
diff --cc ext/phar/tests/tar/phar_commitwrite.phpt
index 6d785d2,1f6d744..23d6800
--- a/ext/phar/tests/tar/phar_commitwrite.phpt
+++ b/ext/phar/tests/tar/phar_commitwrite.phpt
@@@ -12,11 -12,12 +12,11 @@@ $p['file1.txt'] = 'hi'
$p->stopBuffering();
var_dump($p->getStub());
$p->setStub("<?php
-function __autoload(\$class)
-{
+spl_autoload_register(function(\$class) {
include 'phar://' . str_replace('_', '/', \$class);
-}
+});
- Phar::mapPhar('brandnewphar.phar');
- include 'phar://brandnewphar.phar/startup.php';
+ Phar::mapPhar('phar_commitwrite.phar');
+ include 'phar://phar_commitwrite.phar/startup.php';
__HALT_COMPILER();
?>");
var_dump($p->getStub());
@@@ -31,11 -32,12 +31,11 @@@ unlink(dirname(__FILE__) . '/phar_commi
string(60) "<?php // tar-based phar archive stub file
__HALT_COMPILER();"
string(%d) "<?php
-function __autoload($class)
-{
+spl_autoload_register(function($class) {
include 'phar://' . str_replace('_', '/', $class);
-}
+});
- Phar::mapPhar('brandnewphar.phar');
- include 'phar://brandnewphar.phar/startup.php';
+ Phar::mapPhar('phar_commitwrite.phar');
+ include 'phar://phar_commitwrite.phar/startup.php';
__HALT_COMPILER(); ?>
"
bool(true)
diff --cc ext/phar/tests/zip/phar_commitwrite.phpt
index 7a7499e,fa9efc7..163622e
--- a/ext/phar/tests/zip/phar_commitwrite.phpt
+++ b/ext/phar/tests/zip/phar_commitwrite.phpt
@@@ -12,11 -12,12 +12,11 @@@ $p['file1.txt'] = 'hi'
$p->stopBuffering();
var_dump($p->getStub());
$p->setStub("<?php
-function __autoload(\$class)
-{
+spl_autoload_register(function(\$class) {
include 'phar://' . str_replace('_', '/', \$class);
-}
+});
- Phar::mapPhar('brandnewphar.phar');
- include 'phar://brandnewphar.phar/startup.php';
+ Phar::mapPhar('phar_commitwrite.phar');
+ include 'phar://phar_commitwrite.phar/startup.php';
__HALT_COMPILER();
?>");
var_dump($p->getStub());
@@@ -31,11 -32,12 +31,11 @@@ unlink(dirname(__FILE__) . '/phar_commi
string(60) "<?php // zip-based phar archive stub file
__HALT_COMPILER();"
string(%d) "<?php
-function __autoload($class)
-{
+spl_autoload_register(function($class) {
include 'phar://' . str_replace('_', '/', $class);
-}
+});
- Phar::mapPhar('brandnewphar.phar');
- include 'phar://brandnewphar.phar/startup.php';
+ Phar::mapPhar('phar_commitwrite.phar');
+ include 'phar://phar_commitwrite.phar/startup.php';
__HALT_COMPILER(); ?>
"
bool(true)