Commit Graph

194 Commits

Author SHA1 Message Date
Máté Kocsis
aadd3aaed9
Use RETURN_THROWS() in various places 2020-01-03 21:10:24 +01:00
Máté Kocsis
d9ac1ca8de
Use ZEND_THROWS() during ZPP in the GD, gettext, GMP, and hash extensions 2019-12-31 00:21:38 +01:00
Máté Kocsis
382a038e05
Use ZEND_THROWS() during ZPP in enchant, exif, fileinfo, filter, and FTP extensions 2019-12-31 00:21:37 +01:00
Máté Kocsis
27e83d0fb8
Add union return types for function stubs 2019-11-11 14:54:55 +01:00
Fabien Villepinte
08b7279036 Merge branch 'PHP-7.4' 2019-10-19 22:12:18 +02:00
Fabien Villepinte
4b3e041f5b Fix proto of enchant_broker_list_dicts() 2019-10-19 22:11:34 +02:00
Fabien Villepinte
6daa54d3be Fix grammar in skipif messages 2019-10-12 23:18:56 +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
Christoph M. Becker
1f49b1df50 Don't explicitly set return value on ZPP failure
Failing ZPP throws as of PHP 8.0.0, so explicitly setting a return
value is useless, and also slightly confusing.
2019-08-16 17:52:42 +02:00
Victor Gazotti
75a3213d19 creating stubs for echant ext 2019-08-15 15:16:56 +02:00
Christoph M. Becker
218c18530a Show actual enchant version if possible
As of libenchant 1.6.0 there is enchant_get_version()[1], so we use it,
if available, to show the actual enchant version in the PHP info.  We
also drop the fake ENCHANT_VERSION_STRING altogether, but stick with
showing version 1.5.x if at least HAVE_ENCHANT_BROKER_SET_PARAM is
defined.

Future scope: we may consider requiring enchant 1.6.0 (or later), since
this has been released in April 2010, and likely is available
everywhere.

[1] <https://www.abisource.com/projects/enchant/>
2019-06-27 13:04:49 +02:00
Hugh McMaster
d39638a4ac ext/enchant: Pass $ENCHANT_LIBS to PHP_CHECK_LIBRARY to fix shared builds
Closes GH-4216.
2019-06-03 09:18:51 +02:00
Remi Collet
1f8b9b8de6 enchant: fix shared build 2019-05-21 16:14:52 +02:00
Hugh McMaster
0655191a9c Use PKG_CHECK_MODULES to detect the Enchant library 2019-05-17 19:31:30 +02:00
Peter Kokot
75fb74860d Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Dmitry Stogov
5aa1176238 Cleanup unused module globals 2019-03-12 13:44:05 +03:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01: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
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Nikita Popov
e219ec144e Implement typed properties
RFC: https://wiki.php.net/rfc/typed_properties_v2

This is a squash of PR #3734, which is a squash of PR #3313.

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2019-01-11 15:49:06 +01:00
Peter Kokot
d679f02295 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:33:09 +02:00
Peter Kokot
d7a3edd45d Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +02:00
Gabriel Caruso
9c144e0d82
Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Peter Kokot
1ad08256f3 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:56:38 +02:00
Peter Kokot
981e5e17fa Remove unused ext/enchant/tests files
- ext/enchant/tests/hindi_correct.txt
- ext/enchant/tests/hindi_incorrect.txt

Added via 5956f9a398 but never used.
2018-09-25 22:30:22 +02:00
Peter Kokot
409b5133cc Change some permissions from 755 to 644
This patch syncs file permissions accross the PHP source code files
since these don't need to be executable.
2018-08-28 23:26:49 +02:00
Gabriel Caruso
dae65a89aa
Remove unecessaries percent signs 2018-08-05 20:18:02 -03:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Peter Kokot
279498564f Remove enchant version from the phpinfo output
This patch syncs the phpinfo output with other bundled extensions.
2018-06-04 18:40:38 +02:00
Thomas Punt
26b0385df8 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix potential memory leak in the enchant extension
  Fix potential memory leak in curl extension
2018-04-29 20:05:20 +01:00
Thomas Punt
7ba70a5fed Fix potential memory leak in the enchant extension 2018-04-29 19:23:07 +01:00
Gabriel Caruso
affc20f891 Use bool instead of boolean in proto 2018-02-04 17:00:24 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Dmitry Stogov
49ea143bbd Encapsulate reference-counting primitives.
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
2017-10-27 01:28:58 +03:00
Christoph M. Becker
c189b4788d Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #53070 (enchant_broker_get_path crashes if no path is set)
2017-10-15 14:08:03 +02:00
Christoph M. Becker
5e2751e7ff Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #53070 (enchant_broker_get_path crashes if no path is set)
2017-10-15 14:02:31 +02:00
Jelle van der Waa
5acb8381b2 Fixed bug #53070 (enchant_broker_get_path crashes if no path is set)
enchant_broker_get_dict_path segfaults when the dict path is not setup,
instead of segfaulting return false instead.
2017-10-15 13:57:44 +02:00
Christoph M. Becker
b4c6637c0b Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #75365 (Enchant still reports version 1.1.0)
2017-10-15 13:36:25 +02:00
Christoph M. Becker
fd993b1045 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75365 (Enchant still reports version 1.1.0)
2017-10-15 13:30:06 +02:00
Christoph M. Becker
fb09021432 Fixed bug #75365 (Enchant still reports version 1.1.0)
Since Enchant is bundled, we make `PHP_ENCHANT_VERSION` an alias of
`PHP_VERSION` and also drop the rather meaningless revision hash from
the PHP info.
2017-10-15 13:19:17 +02:00
Peter Kokot
d5cb358765 Remove enchant PHP example 2017-10-05 12:34:43 +02:00
Kalle Sommer Nielsen
c34ba92782 Get rid of all these old package[2].xml files, most of these had no had a release since PHP4, or any release at all in close to 10 years, some even did not have a package registered at pecl
OCI, PDO_OCI and zip are left as they are actively developed and released there
2017-08-17 22:09:29 +02:00
Kalle Sommer Nielsen
069477f2c1 Skip these enchant tests if no dicts or providers are installed 2017-07-25 22:10:34 +02:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Nikita Popov
93dc91b386 Remove version checks
PHP_VERSION_ID
PHP_API_VERSION
ZEND_MODULE_API_NO
PHP_MAJOR_VERSION, PHP_MINOR_VERSION
ZEND_ENGINE_2

I've left litespeed alone, as it seems to genuinely maintain support
for many PHP versions.
2016-01-30 15:35:28 +01:00
Lior Kaplan
59a7ef914f Update header to PHP Version 7 2016-01-01 20:03:16 +02:00