Commit Graph

76 Commits

Author SHA1 Message Date
Máté Kocsis
65b96397b3
Declare tentative return types for ext/intl (#6986) 2021-07-06 10:55:43 +02:00
Patrick Allaert
aff365871a Fixed some spaces used instead of tabs 2021-06-29 11:30:26 +02:00
KsaR
01b3fc03c3
Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Máté Kocsis
bf0f6aaf18
Improve class entry generation
Related to GH-6701
2021-02-16 13:09:56 +01:00
Máté Kocsis
c6723728df
Generate ext/intl class entries from stubs
Closes GH-6670
2021-02-09 13:37:24 +01:00
Máté Kocsis
186612e4d7
Improve parameter names in ext/intl
Closes GH-6309
2020-10-12 18:06:45 +02:00
George Peter Banyard
a91cb2f48c Promote warning to ValueError for Spoofchecker::setRestrictionLevel()
Closes GH-6197
2020-09-25 17:55:31 +01:00
Máté Kocsis
046cc5e4c2
Add another round of missing parameter types to stubs
Closes GH-5950
2020-08-07 16:48:45 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +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
Máté Kocsis
f00bcfbb7d
Generate method entries for ext/intl
Closes GH-5370
2020-04-14 13:39:00 +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
019e8d438c
Throw exception for unconstructed intl objects
Closes GH-5052
2020-01-05 23:55:14 +01:00
Máté Kocsis
e08ce4c13d
Add stubs for various intl functions
Closes GH-4819
- Add stubs for idn functions
- Add stubs for grapheme functions
- Add stubs for Spoofchecker
- Add stubs for Normalizer
- Add stubs for ResourceBundle
- Fix arginfos
- Add support for union return types
- Fix arginfo for resourcebundle_create()
2020-01-03 18:54:57 +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
969e7a3c8b Cleanup return values for Intl when parameter parsing is unsuccessful
Closes GH-4871.
2019-10-30 13:21:40 +01:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Dmitry Stogov
91ef4124e5 Refactor zend_object_handlers API to pass zend_object* and zend_string* insted of zval(s). 2019-02-04 13:20:25 +03:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Dmitry Stogov
0f7f1498be Use ZEND_THIS macro to hide implementation details in extensions code. 2018-11-15 19:54:19 +03:00
Dmitry Stogov
8bda22592e Eliminate useless $this related check 2018-11-14 11:33:14 +03:00
Dmitry Stogov
8939c4d96b Get rid of ZEND_ACC_CTOR, ZEND_ACC_DTOR and ZEND_ACC_IMPLEMENTED_ABSTRACT 2018-09-05 13:16:10 +03:00
Dmitry Stogov
f2b4ec4bdc Export standard object handlers, to avoid indirect access 2018-05-31 11:57:22 +03:00
Gabriel Caruso
701437a948
Remove return types from some magic method in protos
__construct, __destruct, __wakeup does not have return types defined.
2018-03-09 12:04:46 +01:00
Gabriel Caruso
079598a85d
Use zend_parse_parameters_none_throw 2018-02-18 09:36:35 +01:00
Anatol Belski
1c68f54684 Merge branch 'PHP-7.2'
* PHP-7.2:
  Wrap var depending on conditional compilation
2018-02-16 13:42:04 +01:00
Anatol Belski
4800a95e72 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Wrap var depending on conditional compilation
2018-02-16 13:41:13 +01:00
Anatol Belski
da0ed5cdb1 Wrap var depending on conditional compilation 2018-02-16 13:40:44 +01:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Nikita Popov
b72b1a4e4d Add zend_object_alloc() API
Using ecalloc() to create objects is expensive, because the
dynamic-size memset() is unreasonably slow. Make sure we only
zero the main object structure with known size, as the properties
are intialized separately anyway.

Technically we do not need to zero the embedded zend_object
structure either, but as long as the memset argument is constant,
a couple more bytes don't really matter.
2017-11-25 17:12:37 +01:00
Anatol Belski
0fe6724fce Rethink the version checks
As the actual behavior change happens with ICU >= 58, the new
functionality should stay same in the lower versions. This comply also
with lower PHP versions so far.
2017-10-30 19:52:27 +01:00
Anatol Belski
2b43c623b9 Fix typo 2017-10-30 18:28:39 +01:00
Anatol Belski
3ce3e96af3 Proper ICU version check for restriction levels availability 2017-10-30 18:21:14 +01:00
Anatol Belski
c35f69327c Merge branch 'PHP-7.2'
* PHP-7.2:
  Add missing ICU version check
2017-10-30 18:17:20 +01:00
Anatol Belski
e3b2859c8a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add missing ICU version check
2017-10-30 18:16:47 +01:00
Anatol Belski
6eb4daabeb Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add missing ICU version check
2017-10-30 18:16:03 +01:00
Anatol Belski
68c500421c Add missing ICU version check 2017-10-30 18:15:26 +01:00
Anatol Belski
793ca716fb Fix datatypes and compiler warnings
Switch to size_t

Not critical as an unsigned is already used, but fixes a couple of
warnings in other areas.

Normalize signature

It's a function with the usual compare semantics, returning a platform
specific at least produces unnecessary warnings elsewhere and is otherwise
inappropriate.

Fix return value

Drop unused var

Fix compiler warnings

Fix compiler warning

Fix var name in arginfo

Fix cast
2017-10-23 08:56:57 +02:00
Anatol Belski
e952cc24db Fix build on ICU < 53 2017-10-21 17:37:51 +02:00
Anatol Belski
050d42d5d2 Merge branch 'PHP-7.2'
* PHP-7.2:
  With ICU 58+, set the default restriction level to high
2017-10-21 17:25:03 +02:00
Anatol Belski
bb0a15f499 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  With ICU 58+, set the default restriction level to high
2017-10-21 17:24:42 +02:00
Anatol Belski
e986f71527 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  With ICU 58+, set the default restriction level to high
2017-10-21 17:24:15 +02:00
Anatol Belski
1d781fbdb1 With ICU 58+, set the default restriction level to high
Further experiments show, that CJK scripts should be ok. If there are
any issues, the moderate level can still be set later.
2017-10-21 17:21:41 +02:00
Anatol Belski
f56ceb7f5b Add Spoofchecker::setRestrictionLevel() and corresponding constans 2017-10-21 17:12:21 +02:00
Anatol Belski
4621b042d6 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #73655 Spoofchecker::isSuspicious behavior change due to upstream changes
  Add test for newer ICU version
2017-10-20 20:15:23 +02:00
Anatol Belski
416c993c8e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #73655 Spoofchecker::isSuspicious behavior change due to upstream changes
  Add test for newer ICU version
2017-10-20 20:14:48 +02:00
Anatol Belski
6f395736e2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73655 Spoofchecker::isSuspicious behavior change due to upstream changes
  Add test for newer ICU version
2017-10-20 20:14:08 +02:00
Anatol Belski
f95063647c Fixed bug #73655 Spoofchecker::isSuspicious behavior change due to upstream changes
There are significant changes in the spoof checking reflecting
http://www.unicode.org/reports/tr39/tr39-15.html and relying on the
restriction levels. ICU 58+ removes WSC and MSC handling and otherwise
undergoes big changes in both code and data areas. Keep up with the
basic points for now, as we need to move forward and provide an
acceptable experience to PHP users linking to a newer ICU. The most
distros ATM don't provide ICU > 57.1, though. We'll need for sure to
keep up with the BC breach in ICU 58+ in possible further aspects.
2017-10-20 19:23:32 +02:00
Nikita Popov
fc7cfe1c0e Remove superfluous checks of register_internal_class retval 2017-08-25 22:08:59 +02:00
Dmitry Stogov
40ecad3402 Fixed wrong usage of old ZPP API. 2017-06-19 18:08:50 +03:00