Commit Graph

437 Commits

Author SHA1 Message Date
Ilija Tovilo
1c30c5e707
Print location on class redeclaration
Fixes GH-13950
Closes GH-13999
2024-04-30 14:34:43 +02:00
Peter Kokot
7d6bb3e86d
Fix extension_dir variable quoting in php-config (#13963)
When configuring the build with:

    ./configure EXTENSION_DIR="\${prefix}/lib/php/20230901"

The $prefix variable wasn't replaced when running the installed script:

    php-config --extension-dir

It shows ${prefix}/lib/php/20230901 instead of
/usr/local/lib/php/20230901 because of single quotes.
2024-04-16 19:07:49 +02:00
Arnaud Le Blanc
46b6ad6dae
Inline GDB scripts in the PHP binary (#13600)
This inlines .gdbinit and php_gdb.py in the .debug_gdb_scripts section of the PHP binary so that GDB can auto-load them regardless of the current directory or the availability of the PHP source code (albeit some functionalities of php_gdb.py currently rely on the source being available).
2024-04-16 15:10:01 +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
Adam Saponara
0c07b0d94f
Make --enable-embed libs respect --libdir
And make locatable by via `php-config`. Prior to this, `libphp.*`
would always install to `$prefix/lib`. After this, they will install
to `$libdir`.

In practice, this will make it so that programs embedding libphp can
use `php-config` to determine appropriate compile flags without
guessing.

In `configure.ac`, it seems `$libdir` is mutated in some instances.
Ideally the mutated version would be stored in `$phplibdir` or
something. Instead of tracking down all uses of that variable, I
introduced another variable `$orig_libdir` that holds the original
value passed to the configure script.

This is a no-op for users unless they are compiling with `--libdir`
set to something other than `$prefix/lib`, the default.

Closes GH-12389
2024-03-23 07:46:31 +01:00
Peter Kokot
530e0d68eb
Create modules directory in a centralized location (#13411)
Shared objects of extensions during the *nix build are copied to the
`modules` directory. It is a practice established since the early days
of the PHP build system. Other build systems may have similar concept of
"library destination directory". On Windows, they are put into the root
build directory. Such directory simplifies collection of the shared
extensions during testing, or when running the cli executable at the end
of the build process.

This change ensures that the directory is consistently created in a
single location, for both the primary PHP build process and when
utilizing `phpize` within community extensions.

The AC_CONFIG_COMMANDS_PRE is executed at the end of the configuration
phase, before creating the config.status script, where also build
directories and global Makefile are created.

The pwd is executed using the recommended $(...) instead of the obsolete
backticks. Autoconf automatically locates the proper shell and
re-executes the configure script if such case is found that $(...) is
not supported (the initial /bin/sh on Solaris 10, for example).
2024-03-21 17:43:49 +01: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
1139851a8a
Add missing --ini-path and --ini-dir php-config options to man page (#13261) 2024-02-11 11:55:43 +01:00
Peter Kokot
b632528eb3 Merge branch 'PHP-8.3'
* PHP-8.3:
  Update year to 2024
2024-01-04 19:30:19 +01:00
Peter Kokot
2575e6b88c Update year to 2024 2024-01-04 19:26:32 +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
Peter Kokot
5140889c92
Remove unused build variables (#12746)
- LFLAGS
- PHP_LIBS
- SHARED_LIBTOOL
- EXT_LIBS

These were part of the build system in the past and are no longer used
in current code.
2023-11-22 19:15:30 +01:00
Remi Collet
c3c4b5356a
also display PHP version in phpize 2023-09-07 16:34:09 +02:00
Tim Düsterhus
343191a644
Merge branch 'PHP-8.2'
* PHP-8.2:
  makedist: Use fixed sort in generated tarball (#10615)
2023-02-22 20:15:05 +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
fa1a7f027c
Merge branch 'PHP-8.2'
* PHP-8.2:
  makedist: Use fixed owner/group in generated tarball (#10613)
2023-02-18 11:35:29 +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
735b94ac20
Merge branch 'PHP-8.2' 2023-02-14 14:13:45 -06: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
f2e21de3cf
Merge branch 'PHP-8.2' 2023-02-14 13:50:07 -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
Peter Kokot
3030d956d9
[skip ci] Update year to 2023 (#10374) 2023-01-19 12:01:29 +01:00
Derick Rethans
2c166647f1 Fix phpize to include _GNU_SOURCE by default
This is to address the issue at
067df26344 (commitcomment-61578732)
2022-06-16 20:49:03 +01: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
istiak101
bf2867bc72
Fix FSF address & update year to 2022
FSF mailing address was changed long time ago. This patch updates that address. Also updated year from 2021 to 2022.

Closes GH-8009.
2022-03-19 18:25:29 +01: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
Joe Watkins
c29226581e
Set BUILD_CC for phpize 2021-06-13 16:25:41 +02: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
f1cf553437 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Update year to 2021
2021-02-02 16:46:52 +01:00
Peter Kokot
8c04944b66 Update year to 2021
Closes GH-6636.
2021-02-02 16:46:16 +01: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