1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

2786 Commits

Author SHA1 Message Date
Weilin Du
2918caee20 ext/*: Remove break after return (#21485) 2026-03-23 20:30:13 +01:00
Petr Sumbera
ce1cadba29 Fix Solaris tests and add nightly CI job
Closes GH-20709
2026-03-04 10:12:03 +01:00
Derick Rethans
832a5ea9c8 Updated to version 2026.1 (2026a) 2026-03-02 18:17:18 +00:00
ndossche
46e8cb9ff4 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix timezone offset with seconds losing precision
2026-02-05 18:39:22 +01:00
ndossche
e76044aa0b Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix timezone offset with seconds losing precision
2026-02-05 18:39:18 +01:00
Niels Dossche
ee26417b58 Fix timezone offset with seconds losing precision
There are two issues:
1. The 'e' formatter doesn't output the seconds of the timezone even if
   it has seconds.
2. var_dump(), (array) cast, serialization, ... don't include the
   timezone second offset in the output. This means that, for example,
   serializing and then unserializing a date object loses the seconds of
   the timezone. This can be observed by comparing the output of
   getTimezone() for `$dt` vs the unserialized object in the provided test.

Closes GH-20764.
2026-02-05 18:38:54 +01:00
ndossche
b860837b78 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-20936: DatePeriod::__set_state() cannot handle null start
2026-02-04 18:36:17 +01:00
ndossche
34a341e59f Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20936: DatePeriod::__set_state() cannot handle null start
2026-02-04 18:35:29 +01:00
Niels Dossche
7445b0f6d9 Fix GH-20936: DatePeriod::__set_state() cannot handle null start
The "current" and "end" field also rely on start_ce, which is set by
"start". Therefore, if "current" or "end" are provided, so must "start"
be provided.

Closes GH-20939.
2026-02-04 18:34:38 +01:00
Arshid
5ce36453d6 [skip ci] Use STANDARD_MODULE_HEADER for ext-date (GH-21080) 2026-01-29 17:19:14 +01:00
Arnaud Le Blanc
65b4073922 Include the actual stub name in generated arginfo headers (#20993) 2026-01-21 20:57:00 +01:00
Derick Rethans
16ca3531cf Merge branch 'PHP-8.5'
* PHP-8.5:
  Update generated parser file
2026-01-14 14:22:19 +00:00
Derick Rethans
695df88fbf Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Update generated parser file
2026-01-14 14:22:06 +00:00
Derick Rethans
c929f2aa87 Update generated parser file 2026-01-14 14:21:29 +00:00
Derick Rethans
0bdfaf308b Merge branch 'PHP-8.5'
* PHP-8.5:
  Upgrade timelib to 2022.16
  Updated to version 2025.3 (2025c)
2026-01-14 14:13:33 +00:00
Derick Rethans
cdeb0694f4 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Upgrade timelib to 2022.16
2026-01-14 14:12:15 +00:00
Derick Rethans
9d4a1f0c7e Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Upgrade timelib to 2022.16
2026-01-14 14:11:29 +00:00
Derick Rethans
e208cd86b4 Upgrade timelib to 2022.16 2026-01-14 14:10:44 +00:00
Derick Rethans
45978c183e Updated to version 2025.3 (2025c) 2026-01-14 13:55:18 +00:00
Derick Rethans
771dbda6fb Updated to version 2025.3 (2025c) 2026-01-14 13:55:17 +00:00
Derick Rethans
65e316e89c Updated to version 2025.3 (2025c) 2026-01-14 13:55:15 +00:00
Derick Rethans
2670c8646d Updated to version 2025.3 (2025c) 2026-01-14 13:55:08 +00:00
Niels Dossche
d86182f7ef date: Avoid passing objects using double pointers
Using single pointers is cleaner and also generates better machine code.
2026-01-13 18:53:43 +01:00
Niels Dossche
3c654a8574 date: Remove unused argument for internal functions 2026-01-13 18:53:43 +01:00
Niels Dossche
31ac5e481c Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix crashes when trying to instantiate uninstantiable classes via date static constructors
2025-11-06 21:30:04 +01:00
Niels Dossche
ad5e182e0a Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix crashes when trying to instantiate uninstantiable classes via date static constructors
2025-11-06 21:29:54 +01:00
Niels Dossche
ca084ac88a Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix crashes when trying to instantiate uninstantiable classes via date static constructors
2025-11-06 21:29:43 +01:00
Niels Dossche
d3a4b4b09c Fix crashes when trying to instantiate uninstantiable classes via date static constructors
Closes GH-20361.
2025-11-06 21:21:24 +01:00
Jakub Zelenka
c07b9cc49d Merge branch 'PHP-8.5' 2025-10-06 10:32:28 +02:00
Nicolas Grekas
fc353966f3 Revert deprecation of __sleep and __wakeup (#19966) 2025-10-06 10:30:27 +02:00
Niels Dossche
57ce245e1e Reduce code bloat in arginfo by using specialised string releases (#20016)
* Reduce code bloat in arginfo by using specialised string releases

Comparing this patch to master (c7da728574),
with a plain configure command without any options:

```
   text	   data	    bss	    dec	    hex	filename
20683738	1592400	 137712	22413850	156021a	sapi/cli/php
20688522	1592400	 137712	22418634	15614ca	sapi/cli/php_old
```

We see a minor reduction of 0.023% in code size.

* Also use true for the other initialization line

* Also use specialized code for consts
2025-10-02 22:00:20 +02:00
Tim Düsterhus
34c71f8176 date: Use true / false instead of 1 / 0 for bool parameters
Changes done with Coccinelle:

    @r1@
    identifier F;
    identifier p;
    typedef bool;
    parameter list [n1] PL1;
    parameter list [n2] PL2;
    @@

    F(PL1, bool p, PL2) {
    ...
    }

    @r2@
    identifier r1.F;
    expression list [r1.n1] EL1;
    expression list [r1.n2] EL2;
    @@

    F(EL1,
    (
    - 1
    + true
    |
    - 0
    + false
    )
    , EL2)
2025-09-24 18:51:40 +02:00
Tim Düsterhus
117060c1d8 date: Use return true / return false for functions returning bool
Changes done with Coccinelle:

    @r1@
    identifier fn;
    typedef bool;
    symbol false;
    symbol true;
    @@

    bool fn ( ... )
    {
    <...
    return
    (
    - 0
    + false
    |
    - 1
    + true
    )
    ;
    ...>
    }

Coccinelle patch sourced from
torvalds/linux@46b5c9b856.
2025-09-24 18:51:40 +02:00
Tim Düsterhus
88d153f45e date: Use true / false instead of 1 / 0 when assigning to bool
Changes done with Coccinelle:

    @@
    bool b;
    @@

    - b = 0
    + b = false

    @@
    bool b;
    @@

    - b = 1
    + b = true
2025-09-24 18:51:40 +02:00
Gina Peter Banyard
4fbd2480bf ext/date: Deprecate __wakeup() methods in favour of __unserialize() (#19827)
The __wakeup() method is obsolete as a __unserialize() magic method is implemented.
Therefore, any class extending from those classes that overload deserialization should call the __unserialize() method instead of __wakeup() to properly handle the deserialization.

This deprecation follows the wording of the deprecation of the SplFixedArray::__wakeup() magic method.
2025-09-22 00:06:30 +01:00
Gina Peter Banyard
b4ed215299 core: Warn when non-representable floats are coerced to int (#19760)
RFC: https://wiki.php.net/rfc/warnings-php-8-5#casting_out_of_range_floats_to_int
2025-09-21 23:53:16 +01:00
Derick Rethans
42dc6aaee0 Merge branch 'PHP-8.4' 2025-09-15 10:40:45 +01:00
Derick Rethans
2e85c5f245 Merge branch 'PHP-8.3' into PHP-8.4 2025-09-15 10:39:56 +01:00
Derick Rethans
94dbdd03b7 Merge branch 'PHP-8.2' into PHP-8.3 2025-09-15 10:39:49 +01:00
Derick Rethans
a0329dbab0 Update timelib to 2022.14 2025-09-15 10:38:53 +01:00
Derick Rethans
62eaa71c4b Regenerate timelib parser files with --output <filename> 2025-09-11 13:16:58 +01:00
Gina Peter Banyard
a5f2eee785 Zend: Deprecate __wakeup() (#19435)
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_sleep_and_wakeup_magic_methods
2025-09-11 06:57:21 +01:00
Daniel Scherzer
3f3a266a2b gen_stub: Infer constants' types from values (#19568)
Don't require `@var` with a type when the type can be inferred from a literal
value in the stub file.
2025-09-03 18:26:43 -07:00
Ilija Tovilo
e84393104a Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix date_sunrise() and date_sunset() with partial-hour UTC offset
2025-09-03 13:35:37 +02:00
Ilija Tovilo
73fc2db234 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix date_sunrise() and date_sunset() with partial-hour UTC offset
2025-09-03 13:35:04 +02:00
Ilija Tovilo
0ae9a58ade Fix date_sunrise() and date_sunset() with partial-hour UTC offset
See GH-19633
Closes GH-19672
2025-09-03 13:34:03 +02:00
Jorg Adam Sowa
25cbc15719 RFC: Deprecate date constant RFC7231 (#12989)
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_date_rfc7231_and_datetimeinterfacerfc7231
2025-08-12 11:33:38 +01:00
Peter Kokot
f64c6248b5 Autotools: Update ax_check_compile_flag.m4 to serial 11 (#19127)
```sh
wget -O build/ax_check_compile_flag.m4 \
  https://cgit.git.savannah.gnu.org/cgit/autoconf-archive.git/plain/m4/ax_check_compile_flag.m4
```

New version of AX_CHECK_COMPILE_FLAG macro now adds the -Werror flag
automatically, if GNU-compatible compiler is detected.
2025-08-09 02:03:37 +02:00
Niels Dossche
99e6b0ecc8 Use stack allocation in timezone_initialize() (#19394)
This lives temporarily, avoid overhead and handling of heap allocation.
2025-08-08 20:29:39 +02:00
Gina Peter Banyard
aa9694bdd0 ext/date: null bytes in timezones can only happen via HT initialization (#19357)
Thus check this error condition early in the HT initialization code.
2025-08-06 21:02:25 +01:00