Commit Graph

157 Commits

Author SHA1 Message Date
Christoph M. Becker
257387b9e5
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fail early in *nix configuration build script
2024-11-09 14:06:35 +01:00
Hans Krentel (hakre)
c075546320
Fail early in *nix configuration build script
Adding two exit early safeguards in the *nix configuration build script:

1) Given the initial cd into the build tree fails (the project root),
   the `buildconf` script exits with non-zero status (failure).
2) Given the grep command does not exist or `configure.ac` AC_INIT [1]
   expectations are unmet, the buildconf script exits non-zero.

Additionally quoting the pathname to cd into and the empty CD_PATH
parameter for portability, also for systems that are using a
non-portable pathname [2] for the build tree.

The initial CD safeguard has been applied to the `buildconf` and
four more scripts:

- build/genif.sh
- scripts/dev/credits
- scripts/dev/genfiles
- scripts/dev/makedist

Rationale:

Cd-ing into the project root should always prematurely exit w/ FAILURE
as a required precondition for its invocation has not been met. This
should never go unnoticed as it always requires user intervention.

Similar and more specifically to the PHP build on *nix systems, the
grep command is required early to obtain the `php_extra_version` from
configure.ac.  Previously, if the grep command is missing (or failing
due to not matching the line with the AC_INIT macro [1]), the internal
dev parameter would always be zero (0) which can easily result in the
situation that the configure script is not being rebuilt. This is
cumbersome as the rebuild of a configure script is more likely required
with checked-out dev versions under change rather than an already
properly set-up build environment on a dedicated build or release
system. Missing the fact that either the grep utility is missing or
the expectation of having the AC_INIT macro in configure.ac is unmet
should never go unnoticed as it always requires user intervention.

[1]: https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Initializing-configure.html
[2]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_271

Closes GH-16717.
2024-11-09 14:03:04 +01:00
Peter Kokot
9fcc1bca8a
Remove redundant middle newlines in "Autotools" related files
This syncs few minor left-overs in "Autotools" related files:
- redundant middle newlines removed (in man pages the duplicate newlines
  are also ignored and are not visible in the man page anyway)
- Minor mixed indentation synced

[skip ci]
2024-08-12 13:18:32 +02:00
Calvin Buckley
3618382d07
Handle BSD checksum and file utilities (#14690)
* Handle BSD checksum utilities

The BSDs have different checksum utilities than GNU systems do. If we
don't see the GNU checksum utilities installed, use the BSD ones, as
their output is compatible enough.

Addresses part of GH-14688.

* Prefer GNU touch

BSD touch at least in macOS does not handle local timezone in the
timestamp (like 2024-06-27T10:26:23-03:00). As such, try GNU touch (as
ports systems almost always prefix with g if coreutils is installed) and
prefer that if available. It's not the end of the world though if GNU
touch isn't available, as BSD touch on some systems may support it, and
if it doesn't, then it's just timestamps, nothing too serious.
2024-07-08 13:27:47 -03:00
Peter Kokot
2ebef11e83
Update http links to https and sync www.php.net URLs (#14854) 2024-07-07 04:23:08 +02:00
Peter Kokot
212b2834e9
Autotools: Sync indentation style in build system files (#14725) 2024-06-29 23:25:17 +02:00
Peter Kokot
604e0a7bbe
Fix negation in shell tests (#14662)
According to documentation the `if test ! ...` is preferred to
`if ! test ...`. The later is not portable:
https://www.gnu.org/software/autoconf/manual/autoconf-2.72/autoconf.html
2024-06-25 23:31:08 +02:00
Peter Kokot
f3feef8b93
Define default RE2C_FLAGS (#14615)
The --no-generation-date flag is a common re2c flag used in all re2c
invocations. This adds the 2nd optional argument to PHP_PROG_RE2C M4
macro in BC manner to set the default re2c command-line options and sets
the default RE2C_FLAGS similarly on Windows.
2024-06-24 22:09:04 +02:00
Matteo Beccati
715b9aaa09
Implemented PDO Driver specific SQL parsers
RFC: http://wiki.php.net/rfc/pdo_driver_specific_parsers
2024-06-17 23:31:24 +02:00
Ilija Tovilo
1c30c5e707
Print location on class redeclaration
Fixes GH-13950
Closes GH-13999
2024-04-30 14:34:43 +02:00
Tim Düsterhus
08b2ab22f4
Include the source location in Closure names (#13550)
* Include the source location in Closure names

This change makes stack traces involving Closures, especially multiple
different Closures, much more useful, because it's more easily visible *which*
closure was called for a given stack frame.

The implementation is similar to that of anonymous classes which already
include the file name and line number within their generated classname.

* Update scripts/dev/bless_tests.php for closure naming

* Adjust existing tests for closure naming

* Adjust tests for closure naming that were not caught locally

* Drop the namespace from closure names

This is redundant with the included filename.

* Include filename and line number as separate keys in Closure debug info

* Fix test

* Fix test

* Include the surrounding class and function name in closure names

* Fix test

* Relax test expecations

* Fix tests after merge

* NEWS / UPGRADING
2024-04-12 18:21:13 +02:00
Tim Düsterhus
98b43d07f9
Merge branch 'PHP-8.3'
* PHP-8.3:
  makedist: Reset tar timestamps to the commit date (#13879)
2024-04-04 13:26:47 +02:00
Tim Düsterhus
c89d797a41
makedist: Reset tar timestamps to the commit date (#13879)
This change should make the underlying `.tar` archive fully reproducible (given
identical tool versions).
2024-04-04 13:26:27 +02:00
Peter Kokot
187f6857df
[skip ci] Update tidy.php excludes (#13425)
- ext/bcmath/libbcmath removed, because it is forked and maintained in
  php-srx. There doesn't seem to be any maintained upstream libbcmath.
- Added bundled ext/dom/lexbor.
- Updated JIT bundled files for ext/opcache/jit/ir.
2024-02-18 18:44:49 +01:00
Peter Kokot
76b7c5cc78 [skip ci] Make tidy.php executable 2024-02-17 18:30:04 +01:00
Peter Kokot
d7d3a1c66e
Sync YFLAGS in scripts/dev/genfiles with PHP_PROG_BISON macro defaults (#12709)
- Adds -Wall YFLAGS when using the scripts/dev/genfiles to have similar
  output there in case things need to be fixed.
- Syncs @ suppression operators across the bison calls.
2023-11-22 22:54:09 +01:00
Tim Düsterhus
9660a7fa59
makedist: Use fixed sort in generated tarball (#10615)
Instead of some undefined order, the files will now be includes in alphabetical
order to make the tarball more reproducible.
2023-02-22 20:14:54 +01:00
Tim Düsterhus
7d229787b0
makedist: Use fixed owner/group in generated tarball (#10613)
This reduces the amount of system-dependent data within the tarball and makes
it more reproducible. Instead of the information of the release manager that
generates the tarball, the tarball will include the fixed 0:0 value as
owner:group.
2023-02-18 11:17:08 +01:00
Ben Ramsey
c9ce25c800
Merge branch 'PHP-8.1' into PHP-8.2 2023-02-14 14:13:30 -06:00
Ben Ramsey
d9ac59b0a9
Ensure tar is not bsdtar 2023-02-14 14:13:01 -06:00
Ben Ramsey
1d2e6cb016
Merge branch 'PHP-8.1' into PHP-8.2 2023-02-14 13:49:49 -06:00
Ben Ramsey
843ba82b53
Use gtar if it's in the PATH 2023-02-14 13:49:02 -06:00
Michal Prívozník
a87f4dd930
check_parameters.php: Make the script's retval reflect errors
When the check_parameters.php script meets an error it prints it
out but the exit value is not affected, it's still 0. This does
not fly with projects that want to run this script as a part of
their test suite.

Therefore, make the script return 0 on success and 2 if any error
was reported.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>

Closes GH-8790.
2022-06-16 15:34:37 +02:00
Patrick Allaert
ceb6fa6dc0 Convert some recently introduced zend_bool to bool
As well as `scripts/dev/check_parameters.php` utility.

Cfr. 3e01f5afb1
2021-06-18 15:21:39 +01:00
Nikita Popov
ea256a218b Add %0 format to run-tests.php
This format matches against null bytes, and prevents the test
expectation from being interpreted as binary data.

bless_tests.php will automatically replace \0 with %0 as well.
2021-05-29 11:33:13 +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
Bartosz Gorski
49a20cf3db Removed mentions of git.php.net from the documentation 2021-03-29 14:05:20 +02:00
Nikita Popov
367f8452c4 Fix phpt reindentation in tidy script
This was missing adjacent SKIPIF/FILE/CLEAN sections.
2020-11-25 16:07:56 +01:00
Nikita Popov
373fd61a51 Allow running tidy.php on specific directory 2020-11-25 15:54:26 +01:00
Nikita Popov
bfceb710be Apply tidy to SKIPIF and CLEAN section as well 2020-09-18 14:28:14 +02:00
Nikita Popov
16189974dd Merge branch 'PHP-7.4'
* PHP-7.4:
  Support more placeholders in bless_tests.php
2020-09-08 14:22:32 +02:00
Nikita Popov
ababa22136 Support more placeholders in bless_tests.php
And don't replace trailing --CLEAN-- sections.
2020-09-08 14:22:20 +02:00
Nikita Popov
a2604e628f Backport bless_tests.php changes from PHP 8 2020-08-05 14:59:56 +02:00
Remi Collet
5c37715dfd ensure all files have same date in official archives 2020-06-25 14:59:10 +02:00
Christoph M. Becker
38bca539a1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Also support absolute Windows filenames
2020-06-10 12:12:47 +02:00
Christoph M. Becker
c5bafc3a19 Also support absolute Windows filenames
The output normalization of bless_tests.php only detected absolute Unix
filenames; we extend this for absolute Windows filenames, regardless of
the platform we're running on (tests may have been run on Windows, but
bless_tests.php may be run from WSL or a Linux VM, for instance).
2020-06-10 12:11:13 +02:00
Christoph M. Becker
4fa3687e56 Unbundle ext/xmlrpc
According to <https://wiki.php.net/rfc/unbundle_xmlprc> we unbundle
ext/xmlrpc.
2020-05-29 16:47:44 +02:00
Nikita Popov
5bc1e224db Make numeric operations on resources, arrays and objects type errors
RFC: https://wiki.php.net/rfc/arithmetic_operator_type_checks

Closes GH-5331.
2020-05-05 16:11:13 +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
Remi Collet
e11d3b1690 Move gen_stub.php to build directory and install it so phpize can take care of it, and thus extension can use it as it is already in Makefile 2020-04-03 10:48:20 +02:00
Nikita Popov
50d07ff28c mb_detect_encoding(): Use proper array|string parameter
Needed to add support for nullabiltiy in some places.
2020-03-30 16:15:12 +02:00
Nikita Popov
d2cb200e10 Enable formatting of phpt files in tidy.php 2020-02-03 22:52:04 +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
58b17906f5 Apply tidy formatting
Mostly reindent PHP scripts to spaces.
2020-02-03 13:41:31 +01:00
Nikita Popov
6b38251820 Add bundled jit libraries to exclude list 2020-02-03 13:41:09 +01:00
Nikita Popov
fc2663abef Merge branch 'PHP-7.4'
* PHP-7.4:
  Add tidy.php to enforce formatting
2020-02-03 13:35:49 +01:00
Nikita Popov
4fd6318580 Add tidy.php to enforce formatting
Many parts are disabled for the PHP-7.4 branch. We only strip
trailing whitespace in C files and reindent .php files to spaces.
2020-02-03 13:34:42 +01:00
Nikita Popov
292a1aeb59 Support union types for args in gen stubs
Using this requires care! The zpp implementation for this union
must be consistent with the arginfo implementation!

Apart from array|object, this is probably only the case for
int|float right now.
2019-11-15 17:33:37 +01:00
Nikita Popov
0cec268d15 Support single class unions in gen stubs 2019-11-15 17:19:26 +01:00
Máté Kocsis
27e83d0fb8
Add union return types for function stubs 2019-11-11 14:54:55 +01:00