Skip to content

Commit

Permalink
Merge branch 'master' of git.php.net:php-src
Browse files Browse the repository at this point in the history
* 'master' of git.php.net:php-src:
  remove support for string|unicode in tests
  improve extension skeleton generator
  • Loading branch information
dstogov committed Feb 22, 2018
2 parents bd908f6 + b895690 commit 75f6b0c
Show file tree
Hide file tree
Showing 67 changed files with 376 additions and 286 deletions.
2 changes: 1 addition & 1 deletion Zend/tests/bug46665.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ new $baz();

?>
--EXPECTF--
%string|unicode%(11) "Foo\Bar\Baz"
string(11) "Foo\Bar\Baz"
2 changes: 1 addition & 1 deletion Zend/tests/call_user_func_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace testing {

?>
--EXPECTF--
%string|unicode%(6) "foobar"
string(6) "foobar"

Warning: call_user_func() expects parameter 1 to be a valid callback, cannot access private method testing\foo::priv() in %s on line %d

Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/call_user_func_005.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var_dump(call_user_func(array('foo', 'teste')));
?>
--EXPECTF--
Deprecated: %son-static method foo::teste() should not be called statically in %s on line %d
%string|unicode%(1) "x"
string(1) "x"
array(1) {
[0]=>
object(Closure)#%d (1) {
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/get_required_files.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ var_dump($files);
--EXPECTF--
array(1) {
[0]=>
%string|unicode%(%d)%s
string(%d)%s
}
4 changes: 2 additions & 2 deletions ext/curl/tests/bug48514.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ var_dump(get_resource_type($ch2));
?>
--EXPECTF--
resource(%d) of type (curl)
%string|unicode%(4) "curl"
string(4) "curl"
resource(%d) of type (curl_multi)
%string|unicode%(10) "curl_multi"
string(10) "curl_multi"
2 changes: 1 addition & 1 deletion ext/curl/tests/curl_basic_007.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ curl_close($ch);

?>
--EXPECTF--
%string|unicode%(%d) "No URL set!%w"
string(%d) "No URL set!%w"
int(3)
4 changes: 2 additions & 2 deletions ext/date/tests/bug46108.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ var_dump(unserialize(serialize(new Datetime)));
--EXPECTF--
object(DateTime)#%d (3) {
["date"]=>
%string|unicode%(%d) "%s"
string(%d) "%s"
["timezone_type"]=>
int(%d)
["timezone"]=>
%string|unicode%(%d) "America/Sao_Paulo"
string(%d) "America/Sao_Paulo"
}
12 changes: 6 additions & 6 deletions ext/date/tests/strtotime_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ var_dump(date('Y-m-d', strtotime('second Monday December 2008')));
var_dump(date('Y-m-d', strtotime('third Monday December 2008')));
?>
--EXPECTF--
%string|unicode%(10) "2008-12-01"
%string|unicode%(10) "2008-12-08"
%string|unicode%(10) "2008-12-15"
%string|unicode%(10) "2008-12-08"
%string|unicode%(10) "2008-12-15"
%string|unicode%(10) "2008-12-22"
string(10) "2008-12-01"
string(10) "2008-12-08"
string(10) "2008-12-15"
string(10) "2008-12-08"
string(10) "2008-12-15"
string(10) "2008-12-22"
8 changes: 4 additions & 4 deletions ext/date/tests/strtotime_variation_scottish.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Checking whisky time
var_dump(date('H:i:s', strtotime('front of 19')));
?>
--EXPECTF--
%string|unicode%(8) "07:15:00"
%string|unicode%(8) "06:45:00"
%string|unicode%(8) "19:15:00"
%string|unicode%(8) "18:45:00"
string(8) "07:15:00"
string(8) "06:45:00"
string(8) "19:15:00"
string(8) "18:45:00"
6 changes: 2 additions & 4 deletions ext/ext_skel.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function process_args($argv, $argc) {
continue;
}

$options[$opt] = ($opt == 'dir' ? realpath($argv[$i + 1]) : $argv[$i + 1]);
$options[$opt] = ($opt == 'dir' ? realpath($argv[$i + 1]) . DIRECTORY_SEPARATOR : $argv[$i + 1]);
}
break;
default: {
Expand Down Expand Up @@ -249,9 +249,7 @@ function copy_config_scripts() {
$files[] = 'config.w32';
}

if (!$files) {
return;
}
$files[] = '.gitignore';

foreach($files as $config_script) {
$new_config_script = $options['dir'] . $options['ext'] . DIRECTORY_SEPARATOR . $config_script;
Expand Down
8 changes: 4 additions & 4 deletions ext/imap/tests/imap_binary_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ var_dump(bin2hex($base64));
--EXPECTF--
*** Testing imap_binary() : basic functionality ***
Encode as short string
%string|unicode%(136) "5647687063794270637942686269426c654746746347786c49484e30636d6c755a794230627942695a53426959584e6c49445930494756755932396b0d0a5a57513d0d0a"
string(136) "5647687063794270637942686269426c654746746347786c49484e30636d6c755a794230627942695a53426959584e6c49445930494756755932396b0d0a5a57513d0d0a"
Encode a string which results in more than 60 charters of output
%string|unicode%(200) "56476870637942706379426849477876626d6367633352796157356e4948647064476767636d567a64577830637942706269427462334a6c4948526f0d0a595734674e6a416759326868636d466a64475679637942765a694276645852776458513d0d0a"
string(200) "56476870637942706379426849477876626d6367633352796157356e4948647064476767636d567a64577830637942706269427462334a6c4948526f0d0a595734674e6a416759326868636d466a64475679637942765a694276645852776458513d0d0a"
Encode a string with special characters
%string|unicode%(60) "5879737450587464573130374f30422b497a3876506934384c413d3d0d0a"
string(60) "5879737450587464573130374f30422b497a3876506934384c413d3d0d0a"
Encode some hexadecimal data
%string|unicode%(144) "65444177584867774d5678344d444a636544417a584867774e4678344d445663654441325848684751567834526b4a6365455a4458486847524678340d0a526b566365455a470d0a"
string(144) "65444177584867774d5678344d444a636544417a584867774e4678344d445663654441325848684751567834526b4a6365455a4458486847524678340d0a526b566365455a470d0a"
===Done===
10 changes: 5 additions & 5 deletions ext/imap/tests/imap_fetch_overview_variation1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ NULL
Warning: imap_fetch_overview() expects parameter 1 to be resource, bool given in %s on line %d
NULL

-- Testing with first argument value: %string|unicode%(0) ""
-- Testing with first argument value: string(0) ""

Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d
NULL

-- Testing with first argument value: %string|unicode%(0) ""
-- Testing with first argument value: string(0) ""

Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d
NULL
Expand All @@ -188,17 +188,17 @@ NULL
Warning: imap_fetch_overview() expects parameter 1 to be resource, array given in %s on line %d
NULL

-- Testing with first argument value: %string|unicode%(6) "string"
-- Testing with first argument value: string(6) "string"

Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d
NULL

-- Testing with first argument value: %string|unicode%(6) "string"
-- Testing with first argument value: string(6) "string"

Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d
NULL

-- Testing with first argument value: %string|unicode%(11) "hello world"
-- Testing with first argument value: string(11) "hello world"

Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d
NULL
Expand Down
10 changes: 5 additions & 5 deletions ext/imap/tests/imap_fetch_overview_variation2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ udate is OK
-- Testing with second argument value: bool(false)
Sequence out of range

-- Testing with second argument value: %string|unicode%(0) ""
-- Testing with second argument value: string(0) ""
Sequence out of range

-- Testing with second argument value: %string|unicode%(0) ""
-- Testing with second argument value: string(0) ""
Sequence out of range

-- Testing with second argument value: array(0) {
Expand All @@ -204,13 +204,13 @@ Sequence out of range
Warning: imap_fetch_overview() expects parameter 2 to be string, array given in %s on line %d
Sequence out of range

-- Testing with second argument value: %string|unicode%(6) "string"
-- Testing with second argument value: string(6) "string"
Syntax error in sequence

-- Testing with second argument value: %string|unicode%(6) "string"
-- Testing with second argument value: string(6) "string"
Syntax error in sequence

-- Testing with second argument value: %string|unicode%(11) "hello world"
-- Testing with second argument value: string(11) "hello world"
Syntax error in sequence

-- Testing with second argument value: object(classA)#1 (0) {
Expand Down
2 changes: 1 addition & 1 deletion ext/imap/tests/imap_fetch_overview_variation3.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ require_once(dirname(__FILE__).'/clean.inc');
Create a temporary mailbox and add 1 msgs
.. mailbox '{%s}%s' created

Testing with option value:%string|unicode%(1) "1"
Testing with option value:string(1) "1"
imap_fetch_overview() returns an object

Testing with option value:bool(true)
Expand Down
2 changes: 1 addition & 1 deletion ext/interbase/tests/ibase_close_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ bool(true)
bool(true)
bool(true)

Warning: ibase_close() expects parameter 1 to be resource,%string given in %s on line %d
Warning: ibase_close() expects parameter 1 to be resource, string given in %s on line %d
NULL
8 changes: 4 additions & 4 deletions ext/pcre/tests/bug47229.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ var_dump($m);

?>
--EXPECTF--
%string|unicode%(13) "\-oh really\?"
string(13) "\-oh really\?"
array(1) {
[0]=>
%string|unicode%(4) "a---"
string(4) "a---"
}
array(1) {
[0]=>
%string|unicode%(1) "a"
string(1) "a"
}
array(1) {
[0]=>
%string|unicode%(5) "a----"
string(5) "a----"
}
array(0) {
}
20 changes: 10 additions & 10 deletions ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,19 @@ var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'inexistent')));
--EXPECTF--
object(PDOStatement)#%d (1) {
["queryString"]=>
%string|unicode%(21) "SELECT * FROM testing"
string(21) "SELECT * FROM testing"
}
data: 1, php
object(PDOStatement)#%d (1) {
["queryString"]=>
%string|unicode%(21) "SELECT * FROM testing"
string(21) "SELECT * FROM testing"
}
data: 2,
array(2) {
[0]=>
%string|unicode%(3) "PHP"
string(3) "PHP"
[1]=>
%string|unicode%(0) ""
string(0) ""
}

Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function 'nothing' not found or invalid function name in %s on line %d
Expand All @@ -106,24 +106,24 @@ Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: class 'PDOSta
bool(false)
array(2) {
[0]=>
%string|unicode%(9) "--- 1 ---"
string(9) "--- 1 ---"
[1]=>
%string|unicode%(9) "--- 2 ---"
string(9) "--- 2 ---"
}
array(2) {
[0]=>
%string|unicode%(7) "1---php"
string(7) "1---php"
[1]=>
%string|unicode%(4) "2---"
string(4) "2---"
}

Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: cannot access private method bar::test2() in %s on line %d
bool(false)
array(2) {
[0]=>
%string|unicode%(7) "1===php"
string(7) "1===php"
[1]=>
%string|unicode%(4) "2==="
string(4) "2==="
}

Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: class 'bar' does not have a method 'inexistent' in %s on line %d
Expand Down
4 changes: 2 additions & 2 deletions ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $db->query('DROP TABLE foobar');
--EXPECTF--
array(2) {
["testing(name)"]=>
%string|unicode%(2) "12"
string(2) "12"
[0]=>
%string|unicode%(2) "12"
string(2) "12"
}
8 changes: 4 additions & 4 deletions ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ $db->query('DROP TABLE foobar');
--EXPECTF--
array(2) {
["testing(name)"]=>
%string|unicode%(3) "php"
string(3) "php"
[0]=>
%string|unicode%(3) "php"
string(3) "php"
}
array(2) {
["testing(name)"]=>
%string|unicode%(4) "php6"
string(4) "php6"
[0]=>
%string|unicode%(4) "php6"
string(4) "php6"
}
6 changes: 3 additions & 3 deletions ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ $db->query('DROP TABLE foo');
--EXPECTF--
object(PDOStatement)#2 (1) {
["queryString"]=>
%string|unicode%(17) "SELECT * FROM foo"
string(17) "SELECT * FROM foo"
}
array(3) {
[0]=>
%string|unicode%(5) "00000"
string(5) "00000"
[1]=>
NULL
[2]=>
NULL
}
%string|unicode%(1) "2"
string(1) "2"
4 changes: 2 additions & 2 deletions ext/phar/tests/badparameters.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ echo $e->getMessage() . "\n";
?>
===DONE===
--EXPECTF--
Warning: Phar::mungServer() expects parameter 1 to be array, %string given in %sbadparameters.php on line %d
Warning: Phar::mungServer() expects parameter 1 to be array, string given in %sbadparameters.php on line %d

Warning: Phar::createDefaultStub() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d

Warning: Phar::loadPhar() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d

Warning: Phar::canCompress() expects parameter 1 to be int, %string given in %sbadparameters.php on line %d
Warning: Phar::canCompress() expects parameter 1 to be int, string given in %sbadparameters.php on line %d

Exception: Phar::__construct() expects parameter 1 to be a valid path, array given in %sbadparameters.php on line %d

Expand Down
4 changes: 2 additions & 2 deletions ext/phar/tests/bug46032.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ new phardata('0000000000000000000');
?>
===DONE===
--EXPECTF--
%string|unicode%(%d) "%smytest"
%string|unicode%(%d) "%smytest"
string(%d) "%smytest"
string(%d) "%smytest"

Fatal error: Uncaught UnexpectedValueException: Cannot create phar '0000000000000000000', file extension (or combination) not recognised or the directory does not exist in %sbug46032.php:%d
Stack trace:
Expand Down
2 changes: 1 addition & 1 deletion ext/phar/tests/cache_list/copyonwrite17.phar.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ phar.readonly=0
files/write17.phar
--EXPECTF--
NULL
%string|unicode%(2) "hi"
string(2) "hi"
ok
2 changes: 1 addition & 1 deletion ext/phar/tests/cache_list/copyonwrite19.phar.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ phar.readonly=0
files/write19.phar
--EXPECTF--
string(2) "hi"
%string|unicode%(3) "hi2"
string(3) "hi2"
ok
4 changes: 2 additions & 2 deletions ext/phar/tests/cache_list/frontcontroller22.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ files/frontcontroller13.phar
--EXPECTHEADERS--
Content-type: text/html; charset=UTF-8
--EXPECTF--
%string|unicode%(4) "test"
%string|unicode%(12) "oof/test.php"
string(4) "test"
string(12) "oof/test.php"

Warning: include(./hi.php): failed to open stream: No such file or directory in phar://%s/oof/test.php on line %d

Expand Down
2 changes: 1 addition & 1 deletion ext/reflection/tests/bug49719.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ var_dump($prop->getValue(new b2));
bool(false)
bool(false)
bool(false)
%string|unicode%(25) "Property a does not exist"
string(25) "Property a does not exist"
int(2)
Loading

0 comments on commit 75f6b0c

Please sign in to comment.