run-tests.php enforces error_reporting=E_ALL (including E_STRICT),
setting this explicitly in not necessary. Conversely, after the
removal of some E_STRICT errors, explicitly excluding it is no
longer necessary in some places.
* 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
Fix skipifs
* 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
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.
* 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
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
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.
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.
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
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.
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
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.
We currently don't show the argument at which the error actually
occured in the trace - should probably either add it or don't
display args on incomplete frames altogether, otherwise this'll
probably be confusing.
This implements a reduced variant of #1226 with just the following
change:
-Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d
+Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d
The '' wrapper around messages is very weird if the exception
message itself contains ''. Futhermore having the message wrapped
in '' doesn't work for the "and defined" suffix of
TypeExceptions.
TypeException stays as-is for now because it uses messages that are
incompatible with the way exception messages are displayed.
closure_038.phpt and a few others now show that we're generating
too many exceptions for compound operations on undefined properties
-- this needs to be fixed in a followup.
Primarily to avoid getting fatal errors from token_get_all().
Implemented using a magic E_ERROR token, which the lexer emits to
force a parser failure.
Squashed commit of the following:
commit 1e41295097
Author: Dmitry Stogov <dmitry@zend.com>
Date: Sat Jan 31 07:28:58 2015 +0300
Generalize HashTableIterator API to allows its usage without involvement of HashTable.nInternalPonter
commit 5406f21b11
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 18:08:43 2015 +0300
Reduced alghorithms complexity
commit b37f1d58d2
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 18:08:30 2015 +0300
Fixed test name
commit fb2d079645
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 18:08:05 2015 +0300
API cleanup
commit 08302c0d6d
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 14:20:46 2015 +0300
Make array_splice() to preserve foreach hash position
commit cc4b7be41e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 12:24:31 2015 +0300
Make internal function, operation on array passed by reference, to preserve foreach hash position
commit 5aa9712b0a
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 09:49:35 2015 +0300
Implement consistent behavior for foreach by value over plain object
commit 4c5b385ff5
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 07:56:37 2015 +0300
More careful iterators update.
commit 721fc9e80d
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jan 29 21:43:28 2015 +0300
Added new test
commit 15a23b1218
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jan 29 21:05:02 2015 +0300
Reimplement iteration magic with HashTableIterators (see https://wiki.php.net/rfc/php7_foreach#implementation_details)
commit 10a3260b1f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jan 29 21:04:44 2015 +0300
New test
commit eef80c5837
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 16:52:21 2015 +0300
Fixed foreach by reference iteration over constant array
commit 61e7391873
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 14:59:54 2015 +0300
Fixed temporary variable re-allocation pass
commit 92e90c09f0
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 12:44:57 2015 +0300
Fixed operand destruction in case of exceptions in iterator
commit dd2a36a207
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 10:02:34 2015 +0300
Use GET_OP1_ZVAL_PTR_DEREF() (IS_TMP_VAR and IS_CONST can't be IS_REFERENCE)
commit 4638f7b914
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 07:43:28 2015 +0300
Change "foreach" statement behavior (this is just a PoC yet)
- "foreach by value" don't relay on internal array/object pointer and doesnt perform array duplication. It just locks it incrementing reference counter. If the original array is modified by some code, the copy on write is performed and "foreach" still work with the old copy.
- it makes no difference if array given to "foreach by value" is reference itself
- "foreach by reference" still use internal array/object pointer and should work similar to PHP-5. (This id not completely implemented)
* zppFailOnOverflow:
Fix MySQLi tests
Fixed gd test
Refactor ZEND_LONG_MAX/MIN checks into ZEND_DOUBLE_FITS_LONG()
Fixed copy-and-paste error
Fix more 32-bit tests
Skip buncha tests on 32-bit
skip simplexml
skip posix 32-bit
skip tests on 32-bit
Fixes simplexml test
Fixes posix tests
Fixes iconv tests
Marked tests as 32-bit
Fixed more 32-bit tests
Fixed some 32-bit tests
Mark said ext/date tests as 32-bit only
Fixed ext/date tests broken by zpp error on overflow
Fixed broken tests
Make zpp fail if NaN passed for int, or out-of-range float for non-capping int
Conflicts:
ext/date/tests/getdate_variation7.phpt
ext/date/tests/localtime_variation3.phpt
As per https://wiki.php.net/rfc/remove_alternative_php_tags.
Removes:
* <% opening tag
* %> closing tag
* <%= short opening tag
* /<script\s+language\s*=\s*(php|"php"|'php')\s*>/i opening tag
* /</script>/i closing tag
* asp_tags ini directive
* coalesce_operator:
Extended coalesce operator test case for ordering/short-circuiting
Ensure not evaluated twice
Added test
Initial coalesce operator implementation
* master: (46 commits)
PHP_INT_MIN and _MAX tests
NEWS and UPGRADING
Added PHP_INT_MIN
Fix wrong lenght size
Bug #51096 - Remove unnecessary ? for first/last day of
Moved streams related functions to xp_ssl.c
Remove duplicate NEWS
Update NEWS
Update NEWS
Update NEWS
BFN
BFN
Fixed bug #67715 (php-milter does not build and crashes randomly).
We need to turn off any strict mode here for this warning to show up
Disable restrictions regarding arrays in constants at run-time. For the discussion around it, see the thread on the mailing list: http://www.mail-archive.com/internals@lists.php.net/msg68245.html
Revert "Fix bug #67064 in a BC safe way"
Updated NEWS for #67693
Updated NEWS for #67693
Fixed bug #67693 - incorrect push to the empty array
add missing entry to NEWS
...
Conflicts:
Zend/tests/errmsg_040.phpt
Zend/tests/ns_059.phpt
Zend/zend_language_parser.y
Zend/zend_vm_def.h
ext/openssl/openssl.c
ext/reflection/php_reflection.c
ext/session/session.c
ext/spl/spl_directory.c
ext/spl/spl_iterators.c
ext/sqlite3/sqlite3.c
ext/standard/array.c
* master: (40 commits)
Bug #67609: TLS connections fail behind HTTP proxy
Updated NEWS for #67594
Updated NEWS for #67594Fix#67594 - invisible colon should be stripped off header name
Updated NEWS for 34407
Updated NEWS for 34407
Updated NEWS for 34407
Fix for bug #34407 - ucwords and title case
fixed broken merged code
Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index.
fixed broken merged code
Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index.
Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index.
Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index.
Test output relies on expose_php being on
1.2 is a problematic float to print out Lower the default display precision for this test
The test output is dependent on expose_php ini
fix makefile in phpize mode
fixe output_as_table() when no ext was enabled
fix end of stream exception when generating makefile
...
Conflicts:
ext/standard/http_fopen_wrapper.c
ext/standard/string.c
sapi/cli/php_cli_server.c
* master: (41 commits)
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
NEWS
Fix Request #67453 Allow to unserialize empty data.
Update copyright year to 2014
Update copyright year for re2c generated files
Update copyright year to 2014
Update copyright year for re2c files as well
Fix patch for bug #67436
fix failed test
Fix test on modern distro where old unsecure algo are disabled in openssl config. Testing recent algo should be enough to check this function.
Added tests for bug 67436
Fixed wrong XFAIL test - already fixed
Fix typo in Bug #67406 NEWS entry
Fix typo in Bug #67406 NEWS entry
...
Conflicts:
Zend/zend_compile.c
ext/session/session.c
ext/standard/array.c
ext/standard/http_fopen_wrapper.c
tests/classes/bug63462.phpt
* master: (41 commits)
fix test - output can be chunked
fix test
fix test
Fixed test for commit 997be125eb
Add bug fix to NEWS
Update UPGRADING according to bug fix
fix test
improve CURL tests to allow testing without separate server
improve CURL tests to allow testing without separate server
Fixed bug #67199 mb_regex_encoding mishmash
Fix bug #67248 (imageaffinematrixget missing check of parameters)
Fix bug #67247 spl_fixedarray_resize integer overflow
fix news
add tests stuff to README
Updated NEWS
Fix Linux specific fail in error traces (cherry-picked and fix for bug #67245) Linux apparently does not like memcpy in overlapping regions...
- Fixed off-by-one in phar_build (patch by crrodriguez at opensuse dot org)
- Move checking
- Fixed missing NULL check in SimpleXMLElement::xpath()
- Fixed missing NULL check
...
Conflicts:
ext/bz2/bz2.c
ext/gd/gd.c
ext/mbstring/php_mbregex.c
ext/session/tests/031.phpt
ext/simplexml/simplexml.c
ext/spl/spl_fixedarray.c
When Wincache or APC are installed, the resource IDs are not the same.
This is because Wincache takes a few resource objects for itself. As a
result, these tests become false positives.
On Windows boxes, the microtime precision is not granular enough
to reliably register a difference if two calls to uniqid() are made
concurrently. This is a fix to the uniqid() test to avoid the false
positive when run on Windows machines. Also, added a test to exercise
the 'more_entropy' variant of uniqid().
When Wincache or APC are installed, the resource IDs are not the same.
This is because Wincache takes a few resource objects for itself. As a
result, these tests become false positives.
On Windows boxes, the microtime precision is not granular enough
to reliably register a difference if two calls to uniqid() are made
concurrently. This is a fix to the uniqid() test to avoid the false
positive when run on Windows machines. Also, added a test to exercise
the 'more_entropy' variant of uniqid().
This commit also prevents user classes from directly implementing
DateTimeInterface, because ext/date relies on classes implementing
it to support certain internal structures.
implements FR #55736
* 'issue-55736' of https://github.com/tistre/php-src:
run-tests.php: Adding support for sections EXPECT_EXTERNAL, EXPECTF_EXTERNAL and EXPECTREGEX_EXTERNAL. (Issue 55736)
* PHP-5.4:
Adding test to verify that __sleep can handle parent classes' private members
Adding test to stabelize keys used when converting objects to arrays
sys_get_temp_dir() returns a Windows-style path (\\ instead of /) on
Windows. This is why a Windows specific test is required.
Skipping req60524.phpt on Windows. Adding -win32 fork for use only on
Windows.
Fixes test bug #64396.
Added a new configuration directive which allows it to change the
temporary directory, the default behavior is unchanged.
This is a useful option if you use all/some hosts inside of one .ini file
with sections and want to change the temp dir per user (maybe it's not
allowed to write outside the users home directory). Since the TMPDIR
variable affects the whole php that way can not be used for this scenario.
(see https://bugs.php.net/bug.php?id=60524)
Verifies that after having unset a public property, any access to it, be it read or write, causes calls to public magic methods
Signed-off-by: Marco Pivetta <ocramius@gmail.com>
* generators: (70 commits)
Fix typos
Fix segfault when traversing a by-ref generator twice
Make sure that exception is thrown on rewind() after closing too
Remove implementation stubs for yield delegation
Fix several issues and allow rewind only at/before first yield
Run finally if generator is closed before finishing
Finally with return now works in generators too
Add dedicated opcode for returns from a generator
Disallow serialization and unserialization
Fix zts build (typo)
Drop Generator::close() method
Forgot to add test
Support trivial finally in generators (no yield, no return)
Fix implementation of Iterator interface
Add T_YIELD in tokenizer_data.c
Throw error also for return occuring before yield
Fix throwing of exceptions within a generator
Remove reference restrictions from foreach
Require parenthesis around yield expressions
Add some more tests
...
This is just an intial merge. It does not yet make generators and finally
work together.
Conflicts:
Zend/zend_language_scanner.c
Zend/zend_language_scanner_defs.h
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
Zend/zend_vm_execute.skl
Zend/zend_vm_opcodes.h
* pull-request/132:
OK, bye bye JavaScript, let's just include credits before license
Nicer (JSLint-compliant!) credits reveal JavaScript
Removed now-unnecessary expose_php checks for logo
Fixed small misalignment in prev commit
Removed Logo GUIDs and replaced with Data URIs and div hidden with JS
foreach only allowed variables to be traversed by reference. This never
really made sense because
a) Expressions like array(&$a, &$b) can be meaningfully iterated by-ref
b) Function calls can return by-ref (so they can also be meaningfully
iterated)
c) Iterators could at least in theory also be iterated by-ref (not
sure if any iterator makes use of this)
With by-ref generators the restriction makes even less sense, so I removed
it altogether.
- removed php_logo_guid()
- removed php_egg_logo_guid()
- removed php_real_logo_guid()
- removed zend_logo_guid()
- removed logo GUID handling
- removed logo GUIDs from source
- added logo data URIs instead for phpinfo()
- added credits to phpinfo() page, but hidden by default
in php_output_handler_op():
* if appending to buffer succeeds, just return HANDLER_NO_DATA
and do nothing else
* if a zero sized string or true is returned from the handler
function, reset the context as well as the handler's buffer
in php_output_handler_op():
* if appending to buffer succeeds, just return HANDLER_NO_DATA
and do nothing else
* if a zero sized string or true is returned from the handler
function, reset the context as well as the handler's buffer