Nikita Popov
eb1373e509
Revert "Fixed bug #74035 "
...
This reverts commit 9ffc6ca62f
.
2017-02-12 22:02:39 +01:00
andrewnester
9ffc6ca62f
Fixed bug #74035
2017-02-03 18:29:39 +01:00
Thomas Punt
a22f181736
Fix ce comparison
2017-01-18 05:05:53 +00:00
Sammy Kaye Powers
478f119ab9
Update copyright headers to 2017
2017-01-04 11:14:55 -06:00
Nikita Popov
c1af9f282f
Fix bug #46103
2016-12-18 17:10:19 +01:00
Andrea Faulds
d690014bf3
Remove zpp fallback code (always use Fast ZPP)
...
Squashed commit of the following:
commit 3e27fbb3d2
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Sep 11 19:14:37 2016 +0100
Keep dummy FAST_ZPP macro for compatibility
commit 8a7cfd00de
Author: Andrea Faulds <ajf@ajf.me>
Date: Mon Sep 5 22:36:03 2016 +0100
Remove FAST_ZPP macro and plain zpp fallback code
2016-09-11 22:44:46 +01:00
Xinchen Hui
60de74ebda
Fixed bug #72846 (getConstant for a array constant with constant values returns NULL/NFC/UKNOWN)
2016-08-15 23:22:55 +08:00
Nikita Popov
57c9983619
Merge branch 'PHP-5.6' into PHP-7.0
...
Conflicts:
ext/reflection/php_reflection.c
2016-07-13 21:48:05 +02:00
nikita2206
eb190b4e91
fix: bug72222 for PHP-5.6 reflection export of array consts
2016-07-13 21:39:55 +02:00
Nikita Popov
a1ed4ab3ca
Fixed bug #72174
...
Also fixes a memory leak if ::getValue() is used with __get().
2016-05-10 12:13:10 +02:00
Joe Watkins
98164714ea
Merge branch 'PHP-7.0' of https://github.com/php/php-src into PHP-7.0
2016-01-20 10:52:57 +00:00
Joe Watkins
b899656eb0
fix ReflectionClass::__toString doc block omitted
2016-01-20 10:52:27 +00:00
Lior Kaplan
ed35de784f
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf
Happy new year (Update copyright to 2016)
2016-01-01 19:21:47 +02:00
Xinchen Hui
0adbf6de77
Remove useless check
2015-12-09 11:37:40 +08:00
Xinchen Hui
3ae3341533
Fixed bug #71018 (ReflectionProperty::setValue() behavior changed)
2015-12-04 11:52:08 +08:00
Xinchen Hui
6cb6c04499
Fixed bug #70982 (setStaticPropertyValue behaviors inconsistently with 5.6)
2015-11-27 11:32:38 +08:00
Xinchen Hui
95446b4416
Indents
2015-10-23 11:19:30 +08:00
c9s
bbaf6daa9d
Fix boolean conversion warnings
...
Summary:
The compiler complains and raised some warnings about boolean
conversion:
warning: address of 'ce->constants_table' will always evaluate to
'true' [-Wpointer-bool-conversion]
Since the address of 'HashTable' will always evaluate to true. the
condition should be removed. The scope is kept for local variables.
Platform:
OS X 10.11
Compiler:
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
2015-10-23 11:19:19 +08:00
Bob Weinand
60b4355168
Do not create a fake Closure for real Closures
...
That is solved by just returning the Closure as is, which is safe due to Closures being immutable objects
2015-10-14 12:07:33 +02:00
Dmitry Stogov
23b372d358
Forbid "fake" closure rebinding
2015-10-12 20:34:08 +02:00
Xinchen Hui
6876112c89
Fixed the third one of (segfault in gc_remove_from_buffer())
...
This one maybe only used in debug mode, so no bug report and no test
script provided
2015-10-03 20:15:35 -07:00
Xinchen Hui
4744eec753
Fixed bug #70631 (Another Segfault in gc_remove_from_buffer())
2015-10-03 20:08:21 -07:00
Dmitry Stogov
715d5d2855
Get rid of implicit type casting in GC_*() macros in Zend/zend_types.h.
...
This prevented compilation warnings and disclosed few incorrect usages in Zend/zend_vm_def.h and ext/dom/xpath.c.
Now explicit type casting may be required on call site.
This may break some C extension code, but it shoulfn't be a problem to add explicit casting.
2015-08-13 13:56:29 +03:00
Aaron Piotrowski
ed1b64877d
Switch position of ce in exception ce variable names
2015-07-03 09:45:03 -05:00
Aaron Piotrowski
a812a74c2e
Change zend_exception_get_default() to zend_exception_ce
2015-07-03 09:44:48 -05:00
Dmitry Stogov
4a2e40bb86
Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).
2015-06-30 04:05:24 +03:00
Rasmus Lerdorf
28d7bb97a1
Fix more proto comments
2015-06-23 17:46:20 -04:00
Nikita Popov
44b7489fef
Drop now superflous check for VIA_TRAMPOLINE
...
This is not handled by USE_ARG_INFO.
2015-06-16 17:51:18 +02:00
Dmitry Stogov
3180b8e100
Fixed bug #69802 (Reflection on Closure::__invoke borks type hint class name) (onr more problem)
2015-06-16 13:29:17 +03:00
Dmitry Stogov
ed84bff445
Complete fix for problems related to bug #69802
2015-06-16 11:24:35 +03:00
Dmitry Stogov
33e71d5c20
Fixed bug #69802 (Reflection on Closure::__invoke borks type hint class name)
2015-06-15 15:44:44 +03:00
Dmitry Stogov
1c754f0b71
Get rid of more ZVAL_ZVAL() macros
2015-06-12 13:33:14 +03:00
Dmitry Stogov
8e10e8f921
Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few places).
...
Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
2015-06-12 12:33:23 +03:00
Matteo Beccati
ec281fef48
Reflection support for type hints and return types
2015-06-08 08:46:30 +02:00
Sara Golemon
cf8898fbd5
Merge remote-tracking branch 'pollita/reflection.typehint'
...
Conflicts:
ext/reflection/php_reflection.c
ext/reflection/tests/ReflectionExtension_getClasses_basic.phpt
2015-06-08 08:33:32 +02:00
Reeze Xia
104f6c5ec6
Avoid possible uninitialized value assignment
2015-05-18 12:49:42 +08:00
Stanislav Malyshev
2660fb96aa
Merge branch 'pull-request/1277'
...
* pull-request/1277:
fix typos
2015-05-16 14:20:41 -07:00
Bob Weinand
aa3c7aa438
Add ReflectionGenerator class
2015-05-14 20:10:35 +02:00
olshevskiy87
8bdec7a248
fix typos
...
Signed-off-by: olshevskiy87 <olshevskiy87@bk.ru>
2015-05-13 22:28:35 +04:00
Nikita Popov
c0c68a9406
Fix build
2015-05-05 21:40:28 +02:00
krakjoe
49608e0608
Rebase Joe's anon classes implementation
2015-04-26 15:04:22 +02:00
Levi Morrison
dad622bf42
Fix bug #69448
...
ReflectionClass::newInstanceWithoutConstructor should not call
object_init_ex when the class is internal and final. This is because
the class dtor may rely on the ctor being called and in some cases
this will cause a segfault.
2015-04-14 09:45:41 -06:00
Dmitry Stogov
5e8133f453
Squashed commit of the following:
...
commit 2399fc84c5
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 12:38:08 2015 +0300
Removed useless assignment
commit 796b633817
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 12:35:31 2015 +0300
Fixed execution with overriden zend_execute_ex()
commit 4a9fb125aa
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 02:02:58 2015 +0300
Fixed executor without global registers
commit d456c30e00
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 01:30:35 2015 +0300
Restored original behavior for tests/classes/__call_004.phpt
commit 479646d37f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 00:32:17 2015 +0300
Fixed test. We don't keep stack frame for fake function anymore.
commit 9ae61e33e2
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 00:30:09 2015 +0300
Use ZEND_ACC_CALL_VIA_TRAMPOLINE instead of ZEND_ACC_CALL_VIA_HANDLER. Keep ZEND_ACC_CALL_VIA_HANDLER for compatibility.
commit 0a8403a2a0
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 00:05:43 2015 +0300
Rename PROXY_CALL into CALL_TRAMPLINE.
Generalize API to allow reuse EG(trampline) for other purposes.
commit 4ea0525c10
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 23:22:25 2015 +0300
Reuse EG(proxy_call_op) for all proxy. Move proxy related functions from zend_objects_API to zend_object_handlers.
commit 529bf737ca
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 21:42:23 2015 +0300
Accurate use of proxy_call
commit 5d62837d5b
Merge: 83e749f
690843f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 19:40:00 2015 +0300
Merge branch 'master' into opcodefy-call
* master:
Fixed GOTO executor
Fixed typo
Changed ArrayIterator implementation using zend_hash_iterator_... API. Allowed modification of itterated ArrayObject using the same behavior as proposed in `Fix "foreach" behavior`. Removed "Array was modified outside object and internal position is no longer valid" hack.
commit 83e749ff3b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 19:39:10 2015 +0300
Improved ZEND_PROXY_CALL
commit 0c829afc53
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 15:14:49 2015 +0300
Reverted white-space changes
commit df65144488
Merge: 5fd2f97
97756d9
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 14:37:07 2015 +0300
Merge branch 'opcodefy-call' of github.com:laruence/php-src into opcodefy-call
* 'opcodefy-call' of github.com:laruence/php-src:
Ready for PR
Fixed static call
Improve performance by using prealloated op_arrray
Respect called_scope
Support internal magical __call/__callStatic
opcode-fy magical __callStatic
Opcode-fy magical __call
commit 97756d9190
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 19:07:59 2015 +0800
Ready for PR
commit 74f9930846
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 19:03:00 2015 +0800
Fixed static call
commit ec1d9eb592
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 18:23:17 2015 +0800
Improve performance by using prealloated op_arrray
commit df7fbbf949
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 15:10:02 2015 +0800
Respect called_scope
commit 769d1d59fb
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 12:19:23 2015 +0800
Support internal magical __call/__callStatic
commit a980fedd5b
Author: Xinchen Hui <laruence@gmail.com>
Date: Wed Apr 8 18:35:41 2015 +0800
opcode-fy magical __callStatic
commit 73855f7d53
Author: Xinchen Hui <laruence@gmail.com>
Date: Wed Apr 8 14:21:55 2015 +0800
Opcode-fy magical __call
2015-04-10 23:01:00 +03:00
Nikita Popov
122d759618
Always throw TypeException on throwing zpp failures
...
Introduces a ZEND_PARSE_PARAMS_THROW flag for zpp, which forces to
report FAILURE errors using a TypeException instead of a Warning,
like it would happen in strict mode.
Adds a zend_parse_parameters_throw() convenience function, which
invokes zpp with this flag.
Converts all cases I could identify, where we currently have
throwing zpp usage in constructors and replaces them with this API.
Error handling is still replaced to EH_THROW in some cases to handle
other, domain-specific errors in constructors.
2015-04-06 11:27:34 +02:00
Dmitry Stogov
ea09a9fa32
Convert fatal errors into EngineExceptions
...
Make zval_update_constant_ex(), zval_update_constant(), zend_update_class_constants() and zend_ast_evaluate() return SUCCESS or FAILURE.
2015-04-02 02:05:25 +03:00
Dmitry Stogov
1018f462d8
Patch improvement:
...
Removed the corresponding core code.
Fixed ext/com_dotnet and ext/date.
Refactored ext/intl changes.
Improved ext/fileinfo and ext/pdo changes.
Fixed tests.
2015-03-30 18:53:38 +03:00
Dmitry Stogov
9155a267ad
Merge branch 'InternalClassClean' of github.com:Danack/php-src into InternalClassClean
...
* 'InternalClassClean' of github.com:Danack/php-src:
Fixed indentation. Fixed comment style. Fixed commented out code.
Reverted change to function name and added note of why it is different from the class it is actually changing.
Made UConverter throw an exception if the constructor fails.
Fixed PDO constructor to not return null.
Fixed fileinfo behaviour.
Made Phar throw exception on bad constructor.
Converted intl extension to use IntlException in constructors.
Fixed SplFixedArray and tests.
Fixed ReflectionExtension and ReflectionProperty.
Fixed ReflectionFunction, ReflectionMethod and ReflectionParameter.
Fixed PDORow behaviour and message.
2015-03-30 12:14:43 +03:00
Anatol Belski
663074b6b1
cleanup mod version macros and mod defs, round x
2015-03-23 21:30:22 +01:00
Dmitry Stogov
d146d15003
Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate()
2015-03-20 02:02:42 +03:00