Commit Graph

480 Commits

Author SHA1 Message Date
Máté Kocsis
2d32b633b2
Cleanup snmp after resource to object migration 2020-08-04 09:14:12 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Fabien Villepinte
0c6d06ecfa Replace EXPECTF when possible
Closes GH-5779
2020-06-29 21:31:44 +02:00
Nikita Popov
c9b9f525a9 Include stub hash in generated arginfo files
The hash is used to check whether the arginfo file needs to be
regenerated. PHP-Parser will only be downloaded if this is actually
necessary.

This ensures that release artifacts will never try to regenerate
stubs and thus fetch PHP-Parser, as long as you do not modify any
files.

Closes GH-5739.
2020-06-24 09:55:19 +02:00
Christoph M. Becker
5a04796f76 Fix MSVC level 1 (severe) warnings
We fix (hopefully) all instances of:

* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4024>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4028>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4047>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4087>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4090>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4273>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4312>

`zend_llist_add_element()` and `zend_llist_prepend_element()` now
explicitly expect a *const* pointer.

We use the macro `ZEND_VOIDP()` instead of a `(void*)` cast to suppress
C4090; this should prevent accidential removal of the cast by
clarifying the intention, and makes it easier to remove the casts if
the issue[1] will be resolved sometime.

[1] <https://developercommunity.visualstudio.com/content/problem/390711/c-compiler-incorrect-propagation-of-const-qualifie.html>
2020-06-05 11:17:05 +02:00
Nikita Popov
c4ad8beaa8 Do not inherit LC_CTYPE locale from environment
Treatment of locales in PHP is currently inconsistent: The LC_ALL
locale is set to "C", as is standard behavior on program startup.
The LC_CTYPE locale is set to "", which will inherit it from the
environment. However, the inherited LC_CTYPE locale will only be
used in some cases, while in other cases it is necessary to perform
an explicit setlocale() call in PHP first. This is the case for
the locale-sensitive handling in the PCRE extension.

Make things consistent by *never* inheriting any locales from the
environment. LC_ALL, including LC_CTYPE will be "C" on startup.
A locale can be set or inherited through an explicit setlocale()
call, at which point the behavior will be fully consistent and
predictable.

Closes GH-5488.
2020-04-30 10:22:51 +02:00
Máté Kocsis
4815be44db
Generate function entries from stubs
Converts ext/pcntl, ext/simplexml, ext/snmp, ext/soap, ext/sqlite3.
Closes GH-5421
2020-04-20 10:38:41 +02:00
Máté Kocsis
ca006e54e3
Add missing visibility modifiers in stubs 2020-04-11 10:23:51 +02:00
Christoph M. Becker
175e5ed4bf Fix typo (UNKOWN -> UNKNOWN) 2020-04-09 14:06:11 +02:00
Máté Kocsis
3709e74b5e
Store default parameter values of internal functions in arg info
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>
2020-04-08 18:37:51 +02:00
Máté Kocsis
a43bc33fb2
Annotate function aliases in stubs 2020-04-04 13:03:16 +02:00
Máté Kocsis
01b266aac4
Improve error messages of various extensions
Closes GH-5278
2020-03-23 18:59:04 +01:00
Máté Kocsis
960318ed95
Change argument error message format
Closes GH-5211
2020-02-26 15:00:08 +01:00
Máté Kocsis
ac0853eb26
Make type error messages more consistent
Closes GH-5092
2020-02-17 14:22:17 +01:00
Christoph M. Becker
7d0102dfa7 Revert "Replace @param annotations with type declarations"
This reverts commit c31029f335.
2020-02-17 08:55:18 +01:00
Christoph M. Becker
c31029f335 Replace @param annotations with type declarations 2020-02-16 23:43:38 +01:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Nikita Popov
169805777c Merge branch 'PHP-7.4'
* PHP-7.4:
  Apply tidy formatting
2020-02-03 13:42:08 +01:00
Nikita Popov
5947437d47 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #79112: IMAP can't find OpenSSL during configure
2020-01-20 09:59:40 +01:00
Nikita Popov
74380465ec Fix bug #79112: IMAP can't find OpenSSL during configure
Remove the check of PHP_OPENSSL inside SETUP_OPENSSL. It's the
responsibility of the caller to determine whether they want to
enable openssl or not. This makes SSL detection in IMAP work,
which uses a different option.

Additionally also clarify that --with-openssl-dir cannot actually
be used to specify an OpenSSL directory -- these options just
serve as a way to enable OpenSSL in extensions without also
enabling the OpenSSL extension. They need to be renamed to
something clearer in master.

Closes GH-5091.
2020-01-20 09:59:27 +01:00
Máté Kocsis
99db00b1f2
Fix #78880 Another round 2020-01-19 18:28:43 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis
c3cf01b553
Fix #78880: Yet another batch of spelling errors 2020-01-16 12:04:00 +01:00
Máté Kocsis
01a50778d1
Use RETURN_THROWS() after zend_throw_exception() in most of the extensions 2020-01-02 10:56:18 +01:00
Máté Kocsis
345703724c
Use RETURN_THROWS() during ZPP in most of the extensions
Except for some bigger ones: reflection, sodium, spl
2019-12-31 11:46:11 +01:00
Máté Kocsis
27e83d0fb8
Add union return types for function stubs 2019-11-11 14:54:55 +01:00
Fabien Villepinte
a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Christoph M. Becker
4008704f62 zend_parse_parameters_throw() is obsolete
Since `zend_parse_parameters()` throws now, there is no reason to
explicitly call `zend_parse_parameters_throw()` anymore, and since both
have actually the same implementation, we redefine the latter as macro.
2019-11-01 16:47:15 +01:00
Christoph M. Becker
0436bc875e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix miscellaneous typos in docs
2019-10-19 19:20:25 +02:00
Tyson Andre
38f388fba4 Fix miscellaneous typos in docs 2019-10-19 19:19:28 +02:00
Dmitry Stogov
e7e8e45166 Fixed tests 2019-10-02 02:31:01 +03:00
Christoph M. Becker
76179cdf3d Merge branch 'PHP-7.4'
* PHP-7.4:
  Add missing skip keyword in tests
  Update NEWS for 7.4.0RC4
  Update NEWS for PHP 7.4.0RC3
2019-10-01 11:19:43 +02:00
Christoph M. Becker
73f29a5c5e Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add missing skip keyword in tests
2019-10-01 11:17:53 +02:00
Christoph M. Becker
2fc5d00afa Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Add missing skip keyword in tests
2019-10-01 11:15:12 +02:00
Fabien Villepinte
209e37db7d Add missing skip keyword in tests 2019-10-01 11:13:36 +02:00
Christoph M. Becker
03e92d4d48 Add ext/snmp arginfo stubs 2019-09-28 15:47:00 +02:00
Christoph M. Becker
bf13d25f1c Don't return explicit value on failing ZPP 2019-09-28 13:39:40 +02:00
Christoph M. Becker
8574268ccb Add missing zend_parse_parameters_none() 2019-09-28 13:33:46 +02:00
Christoph M. Becker
5a4b9bcc94 More ZPP warning to error related test fixes 2019-09-27 19:16:35 +02:00
Christoph M. Becker
752012a491 Fix tests wrt. ZPP warnings to errors
Since these test parts are solely about checking ZPP, we drop them
altogether.
2019-09-27 19:07:29 +02:00
Christoph M. Becker
f8ae8e9e80 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test regarding Reflection::export() deprecation
2019-09-27 16:35:40 +02:00
Christoph M. Becker
3204d7e0d1 Fix test regarding Reflection::export() deprecation 2019-09-27 16:33:53 +02:00
Christoph M. Becker
f11801712e Initialize variables
These variables may not be initialized otherwise, but are passed to
another function; although it seems they are not used there, if not
having been initialized, MSVC complains.
2019-09-27 16:15:37 +02:00
Christoph M. Becker
36eecc1076 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix skipif.inc
2019-09-27 12:52:52 +02:00
Christoph M. Becker
63eed0b6c5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix skipif.inc
2019-09-27 12:52:14 +02:00
Christoph M. Becker
878704ff6f Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix skipif.inc
2019-09-27 12:51:21 +02:00
Christoph M. Becker
115f6effec Fix skipif.inc 2019-09-27 12:50:04 +02:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Nikita Popov
2879ab46c0 Merge branch 'PHP-7.4' 2019-08-30 10:33:12 +02:00
Fabien Villepinte
e1afd9b213 Modernize some connectors in tests to remove env key duplication 2019-08-30 10:33:01 +02:00