Commit Graph

270 Commits

Author SHA1 Message Date
Dmitry Stogov
f1b306fe11 Switch to use ZTS cache 2019-03-12 14:15:47 +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
Nikita Popov
10b4113638 Remove more zpp error tests 2019-03-05 17:09:09 +01:00
Rodrigo Prado
54ef8d13d8 Test for function posix_getpwnam() basic functionality
The coverage for the function posix_getpwnam() that was not covered yet.
http://gcov.php.net/PHP_HEAD/lcov_html/ext/posix/posix.c.gcov.php#1182
Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
User Group: PHPSP #PHPTestFestBrasil
2019-03-01 02:01:52 +01:00
Rodrigo Prado de Jesus
c2eb68aafe Add test to function posix_getlogin()
Increased the coverage lines 587-595 in file ext/posix/posix.c

User Groups: PHPVale   PHPSP   PHPDF    PHPWomenBR

Hangout presented by #PHPTestFestBrasil on 2017-11-14
https://www.youtube.com/watch?v=bBWkzZEadNo
2019-02-14 20:49:25 +01:00
Rodrigo Prado
2c90beacf0 Create posix_getpwnam_basic_01.phpt
User Group: PHPSP #phptestfestbrasil
2019-02-14 20:36:53 +01:00
Riccardo Magliocchetti
4411cb6656 Add basic test for posix getgrnam 2019-02-14 20:28:11 +01:00
Nikita Popov
b5f852a8cb Some more test removals
Noticed these while implementing error handler changes.
2019-02-05 12:42:18 +01:00
Nikita Popov
8bc663f43b Remove zpp variation tests 2019-02-05 09:38:55 +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
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
Nikita Popov
ac03b15e3c Remove __USE_GNU defines
This is an internal glibc macro, it should not be necessary to use
it if we already define _GNU_SOURCE (we do through
AC_USE_SYSTEM_EXTENSIONS). Needing to use __USE_GNU generally
indicates an inclusion order problem (libc header included before
config.h).
2018-09-17 17:51:00 +02:00
Christoph M. Becker
0a51e75e28 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #75696: posix_getgrnam fails to print details of group
2018-09-01 14:30:08 +02:00
Christoph M. Becker
7bcda659f8 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #75696: posix_getgrnam fails to print details of group
2018-09-01 14:28:13 +02:00
Christoph M. Becker
2677d43850 Fix #75696: posix_getgrnam fails to print details of group
According to the POSIX specification of `getgrnam_r()` the result of
`sysconf(_SC_GETGR_R_SIZE_MAX)` is an initial value suggested for the
size of the buffer, and `ERANGE` signals that insufficient storage was
supplied.  So if we get `ERANGE`, we try again with a buffer twice as
big, and so on, instead of failing.
2018-09-01 14:25:59 +02:00
Peter Kokot
4371945b8b Replace obsolete AC_TRY_FOO with AC_FOO_IFELSE
Autoconf 2.50 released in 2001 made several macros obsolete including
the AC_TRY_RUN, AC_TRY_COMPILE and AC_TRY_LINK:
http://git.savannah.gnu.org/cgit/autoconf.git/tree/ChangeLog.2

These macros should be replaced with the current AC_FOO_IFELSE instead:
- AC_TRY_RUN with AC_RUN_IFELSE and AC_LANG_SOURCE
- AC_TRY_LINK with AC_LINK_IFELSE and AC_LANG_PROGRAM
- AC_TRY_COMPILE with AC_COMPILE_IFELSE and AC_LANG_PROGRAM

PHP 5.4 to 7.1 require Autoconf 2.59+ version, PHP 7.2 and above require
2.64+ version, and the PHP 7.2 phpize script requires 2.59+ version which
are all greater than above mentioned 2.50 version therefore systems
should be well supported by now.

This patch was created with the help of autoupdate script:
autoupdate <file>

Reference docs:
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html
- https://www.gnu.org/software/autoconf/manual/autoconf-2.59/autoconf.pdf
2018-07-30 02:36:38 +02: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
Dmitry Stogov
4a475a4976 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Stanislav Malyshev
f61e1d28fe Merge branch 'pull-request/3288'
* pull-request/3288:
  Fix bug #75481: makedev warning
2018-06-19 16:43:52 -07:00
Peter Kokot
97f2ce4031 Fix bug #75481: makedev warning
To use makedev the sys/sysmacros.h needs to be included on newer
systems.
2018-06-13 04:36:55 +02:00
Peter Kokot
c03ee19230 Normalize the POSIX phpinfo output
Instead of the Git attributes ident blob object name display only
extension status (enabled).
2018-06-02 13:35:22 +02:00
Gabriel Caruso
1314f0fb3a Use int instead of long in protos 2018-02-23 11:06:20 +01:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Gabriel Caruso
ce1d69a1f6 Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
2018-02-04 19:08:23 +01:00
Gabriel Caruso
53dbc69a8d Use %d when expecting line number in tests 2018-02-02 22:35:13 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +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
6a9d2b2190 Cleanup type conversion 2017-12-07 19:24:55 +03: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
Tom Van Looy
04fb3f28ff Remove superfluous semicolons 2017-06-26 00:23:25 +02:00
Dmitry Stogov
9c2a1f52a5 Avoid useless dereferences and separations during paramter passing. 2017-06-19 12:55:59 +03:00
Shaikhul Chowdhury
6ee932ccce Add basic test for posix_setegid function 2017-06-02 23:43:56 +02:00
Nikita Popov
fb008bf60e Remove obsolete version checks from tests 2017-02-02 00:58:04 +01:00
Joe Watkins
2118dcb6a6
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #71219 configure script incorrectly checks for ttyname_r
2017-01-11 08:11:59 +00:00
Joe Watkins
d5553b97d2
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #71219 configure script incorrectly checks for ttyname_r
2017-01-11 08:10:47 +00:00
Joe Watkins
51d487786c
Fixed bug #71219 configure script incorrectly checks for ttyname_r 2017-01-11 08:09:10 +00: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
Sara Golemon
e2a159fe01 Use new param API in posix 2016-12-28 11:48:36 -08:00
Christoph M. Becker
727b422ad9 Fix #72948: Uncatchable "Catchable" fatal error for class to string conversions
E_RECOVERABLE errors are reported as "Catchable fatal error". This is
misleading, because they actually can't be caught via try-catch statements.
Therefore we change the wording to "Recoverable fatal error" as suggested by
Nikita.
2016-09-03 13:05:37 +02:00
Nikita Popov
c4d35c3214 Merge branch 'PHP-5.6' into PHP-7.0 2016-07-30 18:36:00 +02:00
Nikita Popov
c9d3ff0c6e Revert "Fixed bug #71219"
This reverts commit 14d674442e.

I misread the discussion on the bug -- this is not the correct
fix. However the other proposed fix does not work either, so just
reverting for now.
2016-07-30 18:34:34 +02:00
Nikita Popov
9fe0398dad Merge branch 'PHP-5.6' into PHP-7.0 2016-07-30 18:24:14 +02:00
Nikita Popov
14d674442e Fixed bug #71219 2016-07-30 18:21:19 +02:00