Commit Graph

283 Commits

Author SHA1 Message Date
Peter Kokot
c44834d8ad
Trim trailing whitespace (#14721) 2024-06-29 18:41:45 +02:00
Arnaud Le Blanc
11accb5cdf
Preferably include from build dir (#13516)
* Include from build dir first

This fixes out of tree builds by ensuring that configure artifacts are included
from the build dir.

Before, out of tree builds would preferably include files from the src dir, as
the include path was defined as follows (ignoring includes from ext/ and sapi/) :

    -I$(top_builddir)/main
    -I$(top_srcdir)
    -I$(top_builddir)/TSRM
    -I$(top_builddir)/Zend
    -I$(top_srcdir)/main
    -I$(top_srcdir)/Zend
    -I$(top_srcdir)/TSRM
    -I$(top_builddir)/

As a result, an out of tree build would include configure artifacts such as
`main/php_config.h` from the src dir.

After this change, the include path is defined as follows:

    -I$(top_builddir)/main
    -I$(top_builddir)
    -I$(top_srcdir)/main
    -I$(top_srcdir)
    -I$(top_builddir)/TSRM
    -I$(top_builddir)/Zend
    -I$(top_srcdir)/Zend
    -I$(top_srcdir)/TSRM

* Fix extension include path for out of tree builds

* Include config.h with the brackets form

`#include "config.h"` searches in the directory containing the including-file
before any other include path. This can include the wrong config.h when building
out of tree and a config.h exists in the source tree.

Using `#include <config.h>` uses exclusively the include path, and gives
priority to the build dir.
2024-06-26 00:26:43 +02:00
SATŌ Kentarō
f00e05ee9c
Remove setlocale pragma that no longer is significant. (#13814) 2024-03-27 09:06:07 +01:00
Máté Kocsis
10957e498c
Do not generate frameless info items when func info generation is disabled
While here, I fixed newlines around arginfo and function entry generation. Previously, newlines were repeated.
2024-02-18 11:39:00 +01:00
Arne_
8ef0e4cfa0
Allow easter_date to process years after 2037 on 64bit systems (#11862)
Added a check to easter_date to allow it to run with years past
2037 when on a 64bit platform.
2023-08-04 16:47:04 +01:00
Javier Eguiluz
732d92c0e5
[skip ci] Fix various typos and grammar issues (#11143) 2023-04-28 11:05:32 +02:00
Máté Kocsis
b4ec3e9bc0
Do not generate CONST_CS when registering constants (#9439) 2022-08-28 08:27:19 +02:00
Máté Kocsis
e328c68305
Rename @cname to @cvalue in stubs (#9043)
@cname currently refers to the constant name in C. However, it is not always a (constant) name, but sometimes a function invocation, so naming it as @cvalue would be more appropriate.
2022-07-19 15:11:42 +02:00
Pierrick Charron
6fd2b39397
Indent with TAB in .h files generated by gen_stub 2022-06-13 08:55:54 -04:00
Máté Kocsis
debd38f851 Add support for sensitive parameters in stubs 2022-06-04 18:15:05 +02:00
Máté Kocsis
facddfdccb
Declare ext/calendar constants in stubs (#8630) 2022-05-25 12:11:15 +02:00
Máté Kocsis
fdf63bfef3
Merge branch 'PHP-8.1'
* PHP-8.1:
  Add more specific array return type hints for various extensions - part 1
2021-11-07 08:48:49 +01:00
Máté Kocsis
d02b9b953d
Add more specific array return type hints for various extensions - part 1
ext/bz2, ext/calendar, ext/dba, ext/enchant

Closes GH-7432
2021-11-07 08:46:25 +01:00
George Peter Banyard
4a4c35cfaf
Use bool instead of zend_long in Calendar ext internal function handler 2021-09-29 13:55:04 +01:00
Patrick Allaert
ac18dd0dc7 Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
Patrick Allaert
aff365871a Fixed some spaces used instead of tabs 2021-06-29 11:30:26 +02:00
George Peter Banyard
b6958bb847
Implement "Deprecate implicit non-integer-compatible float to int conversions" RFC. (#6661)
RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2021-05-31 15:48:45 +01: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
Max Semenik
56f90492d6 Migrate skip checks to --EXTENSIONS--, p1
For rationale, see https://github.com/php/php-src/pull/6787

Extensions migrated in this part:
* bcmath
* bz2
* calendar
* com_dotnet
* ctype

Closes GH-6797.
2021-03-22 17:51:02 +01:00
Máté Kocsis
bf0f6aaf18
Improve class entry generation
Related to GH-6701
2021-02-16 13:09:56 +01:00
Máté Kocsis
99b08ac281
Implicitly enable function entry generation when class entry generation is enabled
Closes GH-6675
2021-02-09 13:37:24 +01:00
Máté Kocsis
5f21062054
Generate class entries for a few extensions
Relates to GH-6644
2021-02-03 09:24:09 +01:00
Nikita Popov
3e01f5afb1 Replace zend_bool uses with bool
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.
2021-01-15 12:33:06 +01:00
Christoph M. Becker
a74c25bca1 Fix test
The upper limit is different for 32bit and 64bit, but we are testing
the lower limit only, so can use a placeholder.
2020-10-07 14:58:43 +02:00
Christoph M. Becker
92d0a10150 Merge branch 'PHP-7.4' into master
* PHP-7.4:
  Fix #80185: jdtounix() fails after 2037
2020-10-07 14:09:32 +02:00
Christoph M. Becker
9dddfbe755 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80185: jdtounix() fails after 2037
2020-10-07 13:25:11 +02:00
Christoph M. Becker
e857dfa7cc Fix #80185: jdtounix() fails after 2037
There is no such thing as the "end of the unix epoch", and if it was,
it would certainly not be 2037-10-11T02:00:00.  There is, however,
potential integer overflow which we need to avoid.

Closes GH-6288.
2020-10-07 13:23:50 +02:00
Nikita Popov
f21b160984 Update ext/calendar parameter names
Closes GH-6277.
2020-10-06 11:26:05 +02:00
Dmitry Stogov
4a2ae84188 Add "const". Move constant strings to read-only memory. 2020-09-07 21:35:48 +03:00
Christoph M. Becker
969a432fd8 Merge branch 'PHP-7.4' into master
* PHP-7.4:
  Fix #80007: Potential type confusion in unixtojd() parameter parsing
2020-08-22 12:34:24 +02:00
Christoph M. Becker
81fffa86b2 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80007: Potential type confusion in unixtojd() parameter parsing
2020-08-22 12:31:07 +02:00
Andy Postnikov
b2a33ab06b Fix #80007: Potential type confusion in unixtojd() parameter parsing
Also it fixes test on 32-bit armv7 and x86
- Test unixtojd() function : error conditions [ext/calendar/tests/unixtojd_error1.phpt]

Closes GH-6033
2020-08-22 12:30:04 +02:00
Máté Kocsis
7aacc705d0
Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Fabien Villepinte
0c6d06ecfa Replace EXPECTF when possible
Closes GH-5779
2020-06-29 21:31:44 +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
089d8cb03c
Convert UNKNOWN default values to null in ext/calendar 2020-05-02 11:05:27 +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
50765075db
Improve some ValueError messages
Closes GH-5340
2020-04-06 10:41:01 +02:00
Máté Kocsis
7c3078737f
Generate function entries from stubs for a couple of extensions
Closes GH-5347
2020-04-04 20:41:48 +02:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Christoph M. Becker
f91dbac9ae Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test for Windows ZTS builds
2020-01-11 06:17:37 +14:00
Christoph M. Becker
e8a86b1a00 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix test for Windows ZTS builds
2020-01-11 06:16:03 +14:00
Christoph M. Becker
bc529b92ee Fix test for Windows ZTS builds
Cf. <https://bugs.php.net/bug.php?id=61685#1578672905>.
2020-01-11 06:15:32 +14:00
Máté Kocsis
12ce73a5bb
Use RETURN_THROWS() after zend_value_error() 2019-12-31 16:58:15 +01:00
Máté Kocsis
76c45f35f5
Use RETURN_THROWS() during ZPP in bz2, calendar, com_dotnet 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
a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Christoph M. Becker
7816df2c57 Elevate warnings to ValueErrors in ext/calendar
All of these warnings/ValueErrors are due to programming errors, i.e.
calling a function with unsupported arguments.
2019-10-31 08:49:15 +01:00