Commit Graph

1163 Commits

Author SHA1 Message Date
John Boehr
59558ffd96 Fix issues with phpt and EXTENSION on windows (BUG 75042)
* Commands are not properly escaped for windows
* Specifying "-n" to check loaded modules causes "Module already loaded"
warning
* Extensions to be loaded need the "php_" prefix on Windows

Bug: https://bugs.php.net/bug.php?id=75042

Add back -n flag to fetch loaded extensions in run-tests.php

Add test for phpt EXTENSIONS directive

Add a second test for bug 75042

Add test to test loading of nonexistent shared module

with the EXTENSIONS phpt block

Pass ini settings when checking loaded extensions
2017-08-18 17:34:48 +02:00
Andrea Faulds
f877b86604 Merge branch 'PHP-7.1' into PHP-7.2 2017-08-12 01:38:46 +01:00
Andrea Faulds
e88ab74886 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-12 01:37:47 +01:00
Andrea Faulds
b59718bdc4 Fix bug #74725 (html_errors=1 breaks unhandled exceptions) 2017-08-12 01:37:20 +01:00
Xinchen Hui
9b87b73fec Req #74963 (Improved error message on fetching property of non-object) 2017-07-31 11:51:23 +08:00
Sara Golemon
e23c132940 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix compile-time optimization of NAN comparisons
2017-07-22 21:23:29 -04:00
Sara Golemon
1229b0f8cb Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix compile-time optimization of NAN comparisons
2017-07-22 21:23:17 -04:00
Sara Golemon
c562d44321
Fix compile-time optimization of NAN comparisons 2017-07-22 21:22:51 -04:00
Anatol Belski
e08c0ed8ce Bug #74815 crash with a combination of INI entries at startup
TS related VCWD routines depend on CWD. Thus, a premature CWD
deactivation renders the VCWD layer unusable. Same issue seems to
persist in versions < 7.2, just that the code path is actually unused so
the issue didn't show up. Still might make sense to backport this into
lower branches.
2017-06-27 16:30:10 +02:00
Tom Van Looy
04fb3f28ff Remove superfluous semicolons 2017-06-26 00:23:25 +02:00
Michał Brzuchalski
8e10c9d373 Implement object type annotation
RFC: https://wiki.php.net/rfc/object-typehint
2017-06-25 21:49:41 +02:00
Rowan Collins
1b565f1393 Change 'undefined constant' from E_NOTICE to E_WARNING and mention deprecation
Implements RFC "Deprecate and Remove Bareword (Unquoted) Strings"
[https://wiki.php.net/rfc/deprecate-bareword-strings]
2017-03-23 18:52:43 +01:00
Kalle Sommer Nielsen
f9959ee7c2 Change PHP_OS_FAMILY slightly
* PHP_OS_FAMILY is now a macro, to allow extensions to take advantage of it, it is defined in php.h
* Values are not upper-case-first, not always uppercase. Windows is no longer just "Win", if we want the short version for testing then PHP_OS is always WINNT anyway
2017-02-22 12:31:06 +01:00
Niklas Keller
2edc3cf8d2 Implement Parameter Type Widening RFC 2017-02-04 23:33:24 +01:00
Nikita Popov
06a0340162 Deprecate each() 2017-02-03 21:02:52 +01:00
Nikita Popov
6ba7206620 Deprecate assert() with string argument 2017-02-03 21:02:52 +01:00
Nikita Popov
c61daf415d Deprecate track_errors / $php_errormsg 2017-02-03 21:02:52 +01:00
Nikita Popov
162aa1a5fc Deprecate __autoload() 2017-02-03 18:52:57 +01:00
Nikita Popov
eaeecc523b Deprecate create_function() 2017-02-03 18:52:57 +01:00
Joe Watkins
6400ce5017
Merge branch 'PHP-7.1'
* PHP-7.1:
  increase wait time in timeout_variation_9.phpt by 1 second
2017-02-03 06:01:10 +00:00
Joe Watkins
e9209e15a2
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  increase wait time in timeout_variation_9.phpt by 1 second
2017-02-03 06:00:53 +00:00
Rodrigo Prado
0b56ba51d0
increase wait time in timeout_variation_9.phpt by 1 second 2017-02-03 05:57:26 +00:00
Joe Watkins
309d3daa39
Merge branch 'PHP-7.1'
* PHP-7.1:
  increase wait time in timeout_variation_10.phpt by 1 second
2017-02-03 05:55:29 +00:00
Joe Watkins
a52afd27ab
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  increase wait time in timeout_variation_10.phpt by 1 second
2017-02-03 05:55:16 +00:00
Rodrigo Prado
8faf5f979c
increase wait time in timeout_variation_10.phpt by 1 second 2017-02-03 05:53:28 +00:00
Nikita Popov
a8d901a80c Remove zend_version() checks from tests 2017-01-30 22:50:25 +01:00
Stricted
bb059fe0a7
add PHP_OS_FAMILY constant to determine on which os we are 2017-01-25 20:50:14 +00:00
Joe Watkins
8782e847b4
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed #73969 - Fixed segmentation fault when debug_print_backtrace called
2017-01-22 16:12:27 +00:00
Joe Watkins
8bda542064
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #73969 - Fixed segmentation fault when debug_print_backtrace called
2017-01-22 16:11:57 +00:00
andrewnester
6f912f7c04
Fixed #73969 - Fixed segmentation fault when debug_print_backtrace called 2017-01-22 16:11:25 +00:00
Joe Watkins
d83828540e
Merge branch 'PHP-7.1'
* PHP-7.1:
  get_defined_functions additional parameter to exclude disabled functions
  news entry for PR #1312
2017-01-04 13:37:06 +00:00
Joe Watkins
6c9164047e
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  get_defined_functions additional parameter to exclude disabled functions
  news entry for PR #1312
2017-01-04 13:36:04 +00:00
Joe Watkins
63d116e571
Merge branch 'pull-request/1312' into PHP-7.0
* pull-request/1312:
  get_defined_functions extra parameter to exclude disabled functions
  news entry for PR #1312
2017-01-04 13:34:31 +00:00
Christoph M. Becker
ced66cd6ca Merge branch 'PHP-7.1' 2016-12-07 13:50:11 +01:00
Christoph M. Becker
00ee42e385 Merge branch 'PHP-7.0' into PHP-7.1 2016-12-07 13:45:18 +01:00
Markus Staab
dd77116fb0 Fixed typo in skipif error message 2016-12-07 13:35:58 +01:00
Nikita Popov
5af586bec5 Remove more PHP 6 leftovers from tests 2016-11-24 22:39:39 +01:00
Dmitry Stogov
68ee168c75 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed memory leak (Bob)
2016-11-22 11:23:17 +03:00
Dmitry Stogov
db5bbe94be Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed memory leak (Bob)
2016-11-22 11:22:55 +03:00
Dmitry Stogov
63ea4d194b Fixed memory leak (Bob) 2016-11-22 11:22:10 +03:00
Nikita Popov
45f7b2bcc8 Fix CRLF line-endings in tests
Also fix a single instance of CRLF in ibase_query.c.
2016-11-20 22:31:24 +01:00
Anatol Belski
c482ee6020 Introduce SKIP_IO_CAPTURE_TESTS group
to workaround false positives with some CI systems
2016-11-06 00:04:53 +01:00
Michele Locati
33301d5bae Add VT100 support for Windows
Fix function names prefix

Use Unicode version of GetFinalPathNameByHandle

Use EG(windows_version_info) instead of RtlGetVersion

Use the specified handle_id instead of STD_OUTPUT_HANDLE

Switch from stream name to stream resource

Allow running tests capturing only stdout and/or stderr

Add tests for stream_vt100_support function

Export Win32 console functions

Fix x64 build

Use zend_long instead of long long, use GetConsole instead of GetFinalPathNameByHandleW to check if a handle is a valid console stream

Always use zend_long on any platform

Use _get_osfhandle to determine the standard handle

Accept stream names

Raise warnings in case of invalid stream parameter

Return true if disabling VT100 support on a not-console/redirected stream or on old Windows versions

Remove php_win32_console_os_supports_vt100

Differentiate stdin vs stdout/stderr

Simplify setting flag

Allow avoid piping STDIN

Let stream_vt100_support accept only resources

Fix run-tests

Revert console flags in case of failure

Simplify logic of stream_vt100_support when setting the flag

Return true if succeeded, false otherwise

Drop support for STDIN

More comprehensive tests for stream_vt100_support

Remove old tests

Fix name of included file and use absolute paths

Enable ENABLE_VIRTUAL_TERMINAL_PROCESSING on Windows by default

Remove tests for stream_vt100_support

Split stream_vt100_support into stream_isatty+sapi_windows_vt100_support

Add tests for stream_isatty

Add tests for sapi_windows_vt100_support

Return null from stream_isatty is neither Windows nor Posix

Fallback to S_ISCHR if neither Windows nor Posix

Avoid defining argc since it's only used once

Better comment about php_win32_console_fileno_is_console

Use events instead of cNumberOfEvents

Do not restore previous console mode

We need to restore previous console mode on failing SetConsole calls only for STDIN

Don't configure STDOUT/STDERR on Windows with PHP_CLI_WIN32_NO_CONSOLE
2016-10-28 19:23:00 +02:00
Anatol Belski
671f647739 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73329 (Float)"Nano" == NAN
2016-10-18 19:14:14 +02:00
Anatol Belski
9f2ab75b10 Fixed bug #73329 (Float)"Nano" == NAN
The special cases (float)"inf", etc. were never intended and are
caused by the updated strtod lib. While it might be nice as an
easy way to produce Inf and NaN special values, it was never
documented and cause BC breaches.
2016-10-18 19:11:18 +02:00
Anatol Belski
4e3746380a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73172 parse error: Invalid numeric literal
2016-09-26 18:49:40 +02:00
Anatol Belski
39e5991705 Fixed bug #73172 parse error: Invalid numeric literal 2016-09-26 18:47:30 +02:00
Davey Shafik
12ee17d5e0 Implement \ArgumentCountError exception 2016-08-30 19:35:56 -07:00
Xinchen Hui
26d74a0420 Fixed tests 2016-08-23 11:32:21 +08:00
Nikita Popov
37b0dcc8e0 Decouple DEBUG_FILE_UPLOAD from ZEND_DEBUG
Enabling ZEND_DEBUG should not result in intrusive program
behavior changes.
2016-08-19 00:34:13 +02:00
Andrea Faulds
1dab96c1db Show "or null" in TypeErrors for nullable arg_infos 2016-08-11 18:44:43 +02:00
Nikita Popov
32eaf7cdc1 Merge branch 'PHP-7.0' 2016-07-14 23:22:41 +02:00
Nikita Popov
0b0e7520a9 Fix test output
The error is now detected earlier, so the message ends up being
different.
2016-07-14 23:22:09 +02:00
Jakub Zelenka
71774c241e Add decimal point in double serialization 2016-06-26 13:26:43 +01:00
Yasuo Ohgaki
b509b24e35 Add better value to test 2016-06-26 13:26:43 +01:00
Yasuo Ohgaki
a160b518d0 Remove unneeded output from test 2016-06-26 13:26:43 +01:00
Yasuo Ohgaki
c71550472a Fix mode when precision=0. Add test 2016-06-26 13:26:43 +01:00
Dmitry Stogov
ff363e2e7c Implemented RFC: Replace "Missing argument" warning with "Too few arguments" exception
Squashed commit of the following:

commit 8b45fa2acb
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jun 16 01:52:50 2016 +0300

    Separate slow path of ZEND_RECV into a cold function.

commit 9e18895ee5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 23:26:28 2016 +0300

    Required argument can't be IS_UNDEF anymore.

commit 662db66e39
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 31 17:14:50 2016 +0300

    Replace "Missing argument" warning by "Too few arguments" exception.
2016-06-16 02:32:02 +03:00
Dmitry Stogov
a9512af810 Implemented RFC: Fix inconsistent behavior of $this variable
Squashed commit of the following:

commit bdd3b6895c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jun 16 00:19:42 2016 +0300

    Fixed GOTO VM

commit 2f1d7c8b89
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 21:01:57 2016 +0300

    Removed unused variable

commit cf749c42b0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 19:06:16 2016 +0300

    Protection from $this reassign through mb_parse_str()

commit 59a9a6c83c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 18:14:50 2016 +0300

    Added type inference rule for FETCH_THIS opcode

commit 73f8d14a85
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 18:11:18 2016 +0300

    Restored PHP-7 behavior of isset($this->foo).
    It throws exception if not in object context.
    Removed useless opcode handlers.

commit fa0881381e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 31 12:25:47 2016 +0300

    Changed "Notice: Undefined variable: this" into "Exception: Using $this when not in object context".

commit e32cc528c0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 24 02:02:43 2016 +0300

    Throw exception on attempt to re-assign $this through extract() and parse_str().

commit 41f1531b52
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon May 23 22:18:36 2016 +0300

    Fixed inconsistent $this behavior
2016-06-16 02:30:23 +03:00
Nikita Popov
1b29e0cacd Switch zend_print_zval_r to use smart_str
Instead of directly writing to stdout. This allows doing a print_r
into a string, without using output buffering.

The motivation for this is bug #67467: print_r() in return mode
will still dump the string to stdout (causing a potential information
leak) if a fatal error occurs.
2016-06-13 18:04:22 +02:00
Andrea Faulds
660e88c19d Fix bug #71897 2016-05-04 19:26:24 +01:00
Dmitry Stogov
40b2048f72 Skip test on ZTS build 2016-04-25 14:48:36 +03:00
Dmitry Stogov
5b92b65591 Fixed race conditions in test 2016-04-25 13:01:14 +03:00
Bob Weinand
643d6277b3 Merge branch 'PHP-7.0' 2016-04-16 20:57:45 +02:00
Bob Weinand
6bb81d2c5f Fix non-/Zend tests too 2016-04-16 20:57:28 +02:00
Andrea Faulds
1e82ad8038 Warn about invalid strings in arithmetic
Squashed commit of the following:

commit e05d3b6732
Author: Andrea Faulds <ajf@ajf.me>
Date:   Wed Mar 30 01:43:35 2016 +0100

    UPGRADING and NEWS

commit 6caf1d4585
Author: Andrea Faulds <ajf@ajf.me>
Date:   Sun Mar 20 21:18:33 2016 +0000

    Fixes

commit 6dadb1b0ef
Author: Andrea Faulds <ajf@ajf.me>
Date:   Sun Feb 14 02:15:01 2016 +0000

    Add test for numeric string errors in assignment

commit bd5f04e8dd
Author: Andrea Faulds <ajf@ajf.me>
Date:   Sat Feb 13 23:53:05 2016 +0000

    Add test for numeric string errors

commit c72e92f16d
Author: Andrea Faulds <ajf@ajf.me>
Date:   Tue Jan 26 23:28:33 2016 +0000

    Add test for scientific notation in integer operations

commit d94c08852d
Author: Andrea Faulds <ajf@ajf.me>
Date:   Sun Feb 14 01:25:57 2016 +0000

    Disable optimiser evaluation for numeric string errors

commit 30ee954ed1
Author: Andrea Faulds <ajf@ajf.me>
Date:   Sun Feb 14 01:46:25 2016 +0000

    fixup

commit a6403b79e0
Author: Andrea Faulds <ajf@ajf.me>
Date:   Sat Feb 13 22:00:27 2016 +0000

    Do not convert error-causing numeric strings ahead-of-time

commit f9dc354014
Author: Andrea Faulds <ajf@ajf.me>
Date:   Sat Feb 13 19:15:38 2016 +0000

    Disable compile-time evaluation for numeric string errors

commit e05b0cc849
Author: Andrea Faulds <ajf@ajf.me>
Date:   Fri Feb 5 11:42:26 2016 +0000

    Make _zval_get_long_func_noisy function for inlining

commit 84d66321a5
Author: Andrea Faulds <ajf@ajf.me>
Date:   Tue Jan 26 23:10:00 2016 +0000

    Update tests

commit 5ac4a0cc4b
Author: Andrea Faulds <ajf@ajf.me>
Date:   Tue Jan 26 22:08:19 2016 +0000

    Use is_numeric_string_ex for zval_get_long etc.

commit c21f088485
Author: Andrea Faulds <ajf@ajf.me>
Date:   Thu Jan 7 21:13:04 2016 +0000

    Update tests

commit 63e214cf81
Author: Andrea Faulds <ajf@ajf.me>
Date:   Wed Jan 6 00:28:01 2016 +0000

    Warn on non-/bad numeric strings in arithmetic
2016-03-30 01:44:27 +01:00
Francois Laupretre
56fce8990f strpos()/stripos(): Add support for negative offsets 2016-03-09 14:41:37 +01:00
Xinchen Hui
4550e93b78 Merge branch 'PHP-7.0' 2016-01-06 00:03:01 +08:00
Anatol Belski
9a07245b72 Fixed bug #71273 A wrong ext directory setup in php.ini leads to crash 2016-01-05 18:54:46 +01:00
Julien Pauli
7a2f60d3c7 Merge branch 'PHP-7.0'
* PHP-7.0:
  Remove mentions of "type hint" and "typehint"
2015-12-24 15:19:54 +01:00
Levi Morrison
2a7eeff33e Remove mentions of "type hint" and "typehint" 2015-12-24 15:19:31 +01:00
Andrea Faulds
78155068e2 Merge branch 'PHP-7.0' 2015-12-18 19:32:20 +00:00
Andrea Faulds
8d217db369 Fix bug #66179
This also fixes ext/standard/tests/general_functions/var_export-locale.phpt
to actually run the floating-point section.
2015-12-18 19:31:21 +00:00
Xinchen Hui
18b97c94b2 Merge branch 'PHP-7.0' 2015-12-11 17:26:48 +08:00
Xinchen Hui
b5adfee320 Fixed bug memleak in header_register_callback 2015-12-11 17:26:31 +08:00
Dmitry Stogov
a75c195000 Implemented the RFC Support Class Constant Visibility.
Squashed commit of the following:

commit f11ca0e7a5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Dec 8 12:38:42 2015 +0300

    Fixed test expectation

commit 211f873f54
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Dec 8 12:28:38 2015 +0300

    Embed zend_class_constant.flags into zend_class_constants.value.u2.access_flags

commit 51deab84b2
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Dec 7 11:18:55 2015 +0300

    Fixed issues found by Nikita

commit 544dbd5b47
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Sat Dec 5 02:41:05 2015 +0300

    Refactored immplementation of https://wiki.php.net/rfc/class_const_visibility
    @reeze created an RFC here and I emailed internals here and didn't get any responses positive/negative.
2015-12-08 12:40:42 +03:00
Xinchen Hui
9397f52724 Fixed Bug #70967 (Weird error handling for __toString when Error is thrown) 2015-11-28 23:38:19 -08:00
Xinchen Hui
0e91e5fb90 Fixed test 2015-11-26 12:00:25 +08:00
Xinchen Hui
4a7e83f54a Fixed bug #70970 (Segfault when combining error handler with output buffering)
of course we can try to refactor the current flow to make this error can
be catched safly.

but as 7.0.0 is releasing,  I don't think a refactor is safe now. and
actually I don't see any gain to make this catchable.

so let's keep this be consistent with 5.6 and safe for now
2015-11-25 08:00:20 -08:00
Steven Hilder
24bb5698af Ensure timeout tests wait for the entire specified duration 2015-09-29 13:04:05 +02:00
Niklas Keller
91712c35f8 Fix Typos: exteption -> exception 2015-08-26 07:30:56 +02:00
Anatol Belski
c042c64c43 fix test
This fail has nothing together with any changes in run-tests.php
Using run-tests.php from the 5.5 branch brings the same result. So
merely it is about how PHP7 handles and buffers errors.
2015-08-17 23:12:50 +02:00
Xinchen Hui
69dbfa8e9f Fixed tests(I am not sure, these tests seems strange, anyway it passes
locally now)
2015-08-13 22:31:59 +08:00
Aaron Piotrowski
a1a83bf5f0 Switch code on thrown TypeError and ParseError to 0, update related tests 2015-07-07 16:54:39 -05:00
Dmitry Stogov
2f7b178fac Fixed test (shift operators throw Error) 2015-07-06 12:28:14 +03:00
Anatol Belski
a97f764472 bring back the division by zero warning 2015-07-05 20:18:17 +02:00
Xinchen Hui
e8f992c163 Catch the specifical exception 2015-07-03 11:18:53 +08:00
Bob Weinand
94722e12cf Introduce ArithmeticError 2015-07-02 20:47:44 +02:00
Bob Weinand
007d7ac7ca Use DivisionByZeroError instead of exception for %/intdiv() 2015-07-02 02:20:58 +02:00
Bob Weinand
f9724b93f6 Remove warning upon division by zero 2015-07-02 02:20:58 +02:00
Dmitry Stogov
66031cfe19 Restored old behavior 2015-06-29 14:10:46 +03:00
Dmitry Stogov
0b35e4a3be Revert "Fixed last previously broken tests"
This reverts commit 79b1832dd5.
2015-06-29 13:05:14 +03:00
Bob Weinand
79b1832dd5 Fixed last previously broken tests 2015-06-29 01:00:12 +02:00
Bob Weinand
e5fae77969 Show full signature upon inheritance mismatch 2015-06-29 01:00:12 +02:00
Nikita Popov
8a83aed458 Drop duplicate object-to-type notices
We already generate a recoverable fatal for these earlier, no need
to throw an additional notice.
2015-06-22 16:25:32 +02:00
Aaron Piotrowski
110e0a5a2c Merge branch 'master' into throwable-interface
# Conflicts:
#	Zend/zend_language_scanner.c
#	Zend/zend_language_scanner.l
#	ext/simplexml/tests/SimpleXMLElement_xpath.phpt
2015-06-14 18:53:11 -05:00
Andrea Faulds
05ef3b7c0d Fix typo in Unicode escape test 2015-06-06 15:29:56 +01:00
Willian Gustavo Veiga
33721742a5 Added "exclude_disabled" argument to "get_defined_functions". 2015-06-02 21:42:18 -03:00
Willian Gustavo Veiga
978832331a Fix bug #31875 - get_defined_functions() should not list disabled functions. 2015-05-30 12:29:27 -03:00
Bob Weinand
886cbea94f Merge context sensitive lexer RFC 2015-05-25 18:38:40 +02:00