summaryrefslogtreecommitdiff
path: root/sapi/cli
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Sort extensions alphabeticallyNikita Popov2020-06-242-847/+851
| | | | | | | | | | | | This makes it easier to compare mime data from different sources.
* | | Generate tabs in generate_mime_type_map.phpNikita Popov2020-06-241-7/+15
| | | | | | | | | | | | | | | The PHP file is space indented, but we need the C file to be tab indented.
* | | Fix test wrt. commit 1a2732f9a8b3d62471b360f772b5458f78046f80Christoph M. Becker2020-06-221-1/+1
| | |
* | | Fix CLI test if linked against libeditNikita Popov2020-06-181-1/+1
| | | | | | | | | | | | The error message changed here.
* | | Control VCRT leak reporting via environment variable in debug buildsChristoph M. Becker2020-06-102-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | Formerly, this had to be enabled by passing the configuration flag `--enable-crt-debug`; now it can be enabled by setting the environment variable `PHP_WIN32_DEBUG_HEAP`. The advantage is that it is no longer necessary to do separate builds, at the cost of a very minor performance penalty during process startup.
* | | Add zend_call_known_function() API familyNikita Popov2020-06-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the following APIs: void zend_call_known_function( zend_function *fn, zend_object *object, zend_class_entry *called_scope, zval *retval_ptr, int param_count, zval *params); void zend_call_known_instance_method( zend_function *fn, zend_object *object, zval *retval_ptr, int param_count, zval *params); void zend_call_known_instance_method_with_0_params( zend_function *fn, zend_object *object, zval *retval_ptr); void zend_call_known_instance_method_with_1_params( zend_function *fn, zend_object *object, zval *retval_ptr, zval *param); void zend_call_known_instance_method_with_2_params( zend_function *fn, zend_object *object, zval *retval_ptr, zval *param1, zval *param2); These are used to perform a call if you already have the zend_function you want to call. zend_call_known_function() is the base API, the rest are just really thin wrappers around it for the common case of instance method calls. Closes GH-5692.
* | | Constify char * arguments of APIstwosee2020-06-082-4/+4
| | | | | | | | | | | | Closes GH-5676.
* | | Fix expression warnings and break warningstwosee2020-06-072-2/+2
| | | | | | | | | | | | Close GH-5675.
* | | Fix warning of strict-prototypestwosee2020-06-072-2/+2
| | | | | | | | | | | | Closes GH-5673.
* | | Pass zend_string message to zend_error_cbNikita Popov2020-06-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the zend_error_cb API simpler, and avoid formatting the same message in multiple places. It should be noted that the passed zend_string is always non-persistent, so if you want to store it persistently somewhere, you may still need to duplicate it. The last_error_message is cleared a bit more aggressive, to make sure it doesn't hang around across allocator life-cycles. Closes GH-5639.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-06-011-0/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79650: php-win.exe 100% cpu lockup
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-06-011-0/+3
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #79650: php-win.exe 100% cpu lockup
| | * Fix #79650: php-win.exe 100% cpu lockupChristoph M. Becker2020-06-011-0/+3
| | | | | | | | | | | | | | | | | | As of PHP 7.3.0, `sapi_cli_single_write()` is supposed to return `< 0` on failure, but `fwrite()` returns a `size_t`, and signals error by setting the stream's error indicator. We have to cater to that.
* | | Make Exception::$previous a typed propertyNikita Popov2020-05-281-2/+2
| | | | | | | | | | | | | | | | | | Exception::$previous is a private property, so we can add a type: private ?Throwable $previous = null;
* | | Make Exception::$trace typed array propertyNikita Popov2020-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a private property, so we are allowed to add a type. The new declaration of the property is: private array $trace = []; This ensures that Exception::getTrace() does indeed return an array. Userland code that was modifying the property through refleciton may have to be adjusted to assign an array (instead of null, for example). Closes GH-5636.
* | | Fix [-Wundef] warning in CLI SAPIGeorge Peter Banyard2020-05-122-4/+4
| | |
* | | Add quiet parameter to internal HTML entities APINikita Popov2020-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some places, we need to make sure that no warnings are thrown due to unknown encoding. The error reporting code tried to avoid this by determining a "safe charset", but this introduces subtle discrepancies in which charset is picked (normally internal_encoding takes precedence). Avoid this by suppressing the warning in the first place. While here, use the fallback logic to print error messages with substitution characters more consistently, to avoid skipping parts of the error message entirely.
* | | Code tweaks: Remove unneeded semicolonsAlex Dowad2020-04-291-1/+1
| | |
* | | Generate method entries from stubs for Zend classesMáté Kocsis2020-04-261-1/+7
| | | | | | | | | | | | Closes GH-5459
* | | Remove return value from llist apply functionsNikita Popov2020-04-151-2/+1
| | | | | | | | | | | | Unlike the hash apply functions, these do not return int.
* | | Store default parameter values of internal functions in arg infoMáté Kocsis2020-04-083-26/+26
| | | | | | | | | | | | | | | | | | | | | Closes GH-5353. From now on, PHP will have reflection information about default values of parameters of internal functions. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
* | | Merge branch 'PHP-7.4'Nikita Popov2020-04-0833-251/+83
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Add php_cli_server_connect() helper
| * | Add php_cli_server_connect() helperNikita Popov2020-04-0833-251/+83
| | | | | | | | | | | | | | | | | | | | | To encapsulate the repeated fsockopen() code. This gives us a chance to control the timeout in one place: Raise it to one second.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-04-081-2/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Relax overly strict test expectation
| * | Relax overly strict test expectationChristoph M. Becker2020-04-081-2/+1
| | | | | | | | | | | | | | | | | | | | | There is no reason to expect a `1` after the PID; neither the session ID nor the memory usage are required to contain one. Actually, we just want to verify here, that the process with the $child_pid is running, and is a php.exe process.
* | | Generate function entries for another batch of extensionsMáté Kocsis2020-04-051-11/+11
| | | | | | | | | | | | Closes GH-5352
* | | Remove <default> prefix from reflection dumpNikita Popov2020-04-021-8/+8
| | | | | | | | | | | | | | | This really doesn't add anything, and only makes for confusing terminology. Only marking properties as dynamic is sufficient.
* | | Use separate typedef for bucket comparison functionNikita Popov2020-03-041-4/+1
| | | | | | | | | | | | | | | Avoid performing the same casting dance inside each sort compare function.
* | | Define Stringable with __toString():string methodNicolas Grekas2020-03-021-2/+3
| | |
* | | Add preg_last_error_msg() functionNicolas Oelgart2020-02-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Provides the last PCRE error as a human-readable message, similar to functionality existing in other extensions, such as json_last_error_msg(). Closes GH-5185.
* | | Revert "Replace @param annotations with type declarations"Christoph M. Becker2020-02-171-9/+9
| | | | | | | | | | | | This reverts commit c31029f335ca1b453af799805c43c37e959ad555.
* | | Replace @param annotations with type declarationsChristoph M. Becker2020-02-161-9/+9
| | |
* | | Reindent phpt filesNikita Popov2020-02-0337-215/+215
| | |
* | | Merge branch 'PHP-7.4'Nikita Popov2020-02-031-23/+23
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Apply tidy formatting
| * | Apply tidy formattingNikita Popov2020-02-032-28/+28
| | | | | | | | | | | | Mostly reindent PHP scripts to spaces.
* | | Merge branch 'PHP-7.4'Nikita Popov2020-01-273-2/+84
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix bug #78323: Code 0 is returned on invalid options
| * | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-273-2/+84
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix bug #78323: Code 0 is returned on invalid options
| | * Fix bug #78323: Code 0 is returned on invalid optionsIvan Mikheykin2020-01-273-2/+84
| | | | | | | | | | | | | | | Set CLI exit code to 1 when invalid parameters are passed, and print error to stderr.
| * | Revert "Link executable files using non PIC object files. This reduces PIC ↵Dmitry Stogov2019-10-101-1/+1
| | | | | | | | | | | | | | | | | | overhead and improves performance." This reverts commit eef85229d0fe9f69d325aa0231e592f35c468afb.
* | | Make error messages more consistent by fixing capitalizationMáté Kocsis2020-01-172-5/+5
| | | | | | | | | | | | Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
* | | Fix #78880: Another bunch of spelling errorsMáté Kocsis2020-01-163-4/+4
| | |
* | | Use RETURN_THROWS() during ZPP in main, sapi, win32, and ZendMáté Kocsis2019-12-302-9/+9
| | |
* | | Add union return types for function stubsMáté Kocsis2019-11-111-0/+8
| | |
* | | Clean DONE tags from testsFabien Villepinte2019-11-074-8/+0
| | | | | | | | | | | | | | | | | | | | | Remove most of the `===DONE===` tags and its variations. Keep `===DONE===` if the test output otherwise becomes empty. Closes GH-4872.
* | | Add stubs for various standard functionsMáté Kocsis2019-10-301-2/+3
| | | | | | | | | | | | Closes GH-4851.
* | | Add Zend class/interface arginfo stubsChristoph M. Becker2019-10-151-4/+34
| | | | | | | | | | | | | | | | | | We also change `Generator::throw()` to expect a `Throwable` in the first place, and we now throw a TypeError instead of returning `false` from `Exception::getTraceAsString()`.
* | | Use clean shutdown on uncaught exceptionNikita Popov2019-10-111-2/+0
| | |
* | | Merge branch 'PHP-7.4'Nikita Popov2019-09-302-4/+10
|\ \ \ | |/ /
| * | Fix borked SKIPIFsFabien Villepinte2019-09-302-4/+10
| | |
| * | Link executable files using non PIC object files. This reduces PIC overhead ↵Dmitry Stogov2019-09-071-1/+1
| | | | | | | | | | | | and improves performance.