1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 23:18:13 +02:00
Commit Graph

44 Commits

Author SHA1 Message Date
Michael Voříšek 411cd04541 Re-add some CTE functions that were removed from being CTE by a mistake
These functions were accidentally removed from being CTE in GH-7780.
This patch brings them back.

Closes GH-10768.
2023-03-07 20:30:11 +01:00
Máté Kocsis 056e968c54 Declare ext/gd constants in stubs (#9180) 2022-07-30 15:18:06 +02:00
George Peter Banyard 8649cb8a96 Improve and fix stub return types (#8368) 2022-04-14 18:38:00 +01:00
Máté Kocsis 220f0f55cf Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix the return type of imagecolorexactalpha()
  String default values are enclosed in quotes rather than apostrophes
2021-10-12 09:53:30 +02:00
Máté Kocsis 17fa9b77bd Fix the return type of imagecolorexactalpha() 2021-10-12 09:51:13 +02:00
Máté Kocsis 68946bdd90 Generate optimizer func info from stubs for ext/gd and ext/pgsql (#7408) 2021-08-26 17:38:08 +02:00
Nikita Popov 6e1bedea5b Merge branch 'PHP-8.0'
* PHP-8.0:
  imagecolorsforindex() cannot return false
2021-08-26 16:37:05 +02:00
Nikita Popov cba166469d imagecolorsforindex() cannot return false 2021-08-26 16:36:27 +02:00
Joe Watkins 570d9b63e9 Not serializable flag permeation 2021-07-20 12:28:35 +02:00
Ben Morss 81f6d36c90 Add avif support to ext/gd
This backports avif support from upstream libgd into bundled libgd
and exposes the functionality through new imagecreatefromavif()
and imageavif() functions.

Closes GH-7026.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-06-10 12:32:30 +02:00
Christoph M. Becker e4e965039b Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix some imagecolor*() return types
2021-05-24 14:21:29 +02:00
Christoph M. Becker 8bcaaa3579 Fix some imagecolor*() return types
These functions either return always a valid color, or `-1` on failure,
but never `false`.

Closes GH-7041.
2021-05-24 14:19:29 +02:00
Máté Kocsis bf42cf5ae0 Merge branch 'PHP-8.0'
* Fix imagesetclip() parameter names
2021-05-23 19:41:25 +02:00
Máté Kocsis 25e24715d7 Fix imagesetclip() parameter names
Closes GH-7035
2021-05-23 19:40:12 +02:00
Nikita Popov 92a969421c Merge branch 'PHP-8.0'
* PHP-8.0:
  imagecolortransparent() cannot return null
2021-03-17 15:09:26 +01:00
Nikita Popov d80118dc16 imagecolortransparent() cannot return null 2021-03-17 15:09:06 +01:00
Nikita Popov db538775e1 Merge branch 'PHP-8.0'
* PHP-8.0:
  Return bool from imageinterlace()
2021-03-17 15:06:46 +01:00
Nikita Popov c17434429d Return bool from imageinterlace()
The function accepts a bool since PHP 8.0, so it should also return
a bool to keep things consistent.

Furthermore a null return from this functions is not possible.
2021-03-17 15:05:09 +01:00
Nikita Popov 550aee0be3 Merge branch 'PHP-8.0'
* PHP-8.0:
  Properly check imagegd() signature
  Make imagegd $file parameter nullable
2021-02-09 15:19:56 +01:00
Nikita Popov 838ae016d7 Make imagegd $file parameter nullable
It is explicitly documented to be nullable, and this matches other
functions like imagepng. It is also documented to accept a stream,
which it currently does not...
2021-02-09 15:15:20 +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 98fb565c74 Generate class entries from stubs for another batch of extensions
Closes GH-6669
2021-02-08 19:53:55 +01:00
Sara Golemon bc40bce868 Convert gdFont from resource to object 2020-10-21 23:41:41 +00:00
Nikita Popov 14a26db3e2 Update ext/gd parameter names
Closes GH-6308.
2020-10-09 17:10:11 +02:00
Máté Kocsis 628db3f3b5 Fix UNKNOWN default values in various extensions
Closes GH-6075
2020-09-07 19:02:02 +02:00
Máté Kocsis 2803c8fb8d Add all the missing parameter types to stubs
Closes GH-5955
2020-08-13 14:47:18 +02:00
Máté Kocsis 0d330e1a02 Add a few missing parameter types in stubs
Related to GH-5627
2020-07-30 14:26:45 +02:00
Máté Kocsis ac0da090ae Fix UNKNOWN default values in ext/mbstring and ext/gd
Closes GH-5598
2020-07-28 17:06:25 +02:00
Máté Kocsis 19bf66a9e4 Explode _php_image_output_ctx() into multiple functions
Closes GH-5844
2020-07-20 23:25:02 +02:00
Máté Kocsis 7b2a8a6dda Lowercase NULL to null in stubs 2020-04-11 14:13:11 +02:00
Nikita Popov 3ea94ed78e Fix typo in GD stub 2020-04-08 12:03:14 +02:00
Máté Kocsis 5322de1ba8 Generate functions entries from stubs for another set of extensions
Closes GH-5351
2020-04-05 00:59:44 +02:00
Nikita Popov 2bcc4ab8f4 Verify that all stubs have a return type 2020-04-03 17:59:30 +02:00
Christoph M. Becker 03bd4333f6 Add imagegetinterpolation()
While `imagesetinterpolation()` is available as of PHP 5.5.0,
there is no according getter function, so users would have to track the
current interpolation method manually.

To remedy this, we introduce `imagegetinterpolation()` as thin wrapper
for `gdImageGetInterpolationMethod()` (which has been introduced with
libgd 2.1.1), and use `im->interpolation_id` as fallback for older
libgd.  Since our bundled libgd does not yet have this function, we add
it.

We also simplify the recently introduced bug79068.phpt, where it is
sufficient to check that the interpolation method has not been changed.
2020-01-14 18:25:27 +01:00
Máté Kocsis d59bc80782 Fix smaller issues with stubs
GH-5025
2019-12-20 14:31:07 +01:00
Máté Kocsis c58b12334d Add union return types with one class 2019-11-18 12:44:38 +01:00
Christoph M. Becker 2de79f0855 Make the $num_points parameter of php_imagepolygon optional
That parameter is mostly useless in practise, and likely has been
directly ported from the underlying `gdImagePolygon()` and friends,
which require that parameter since the number of elements of the point
array would otherwise be unknown.  Typical usages of `imagepolygon()`,
`imageopenpolygon()` and `imagefilledpolygon()` pass `count($points)/2`
or hard-code this value as literal.  Since explicitly specifying this
parameter is annoying and error-prone, we offer the possibility to omit
it, in which case the `$points` array must have an even number of
elements, and the number of points is calculated as `count($points)/2`.
2019-11-15 09:41:10 +01:00
Máté Kocsis 27e83d0fb8 Add union return types for function stubs 2019-11-11 14:54:55 +01:00
Mark 8aad466c42 Convert GD Resources to objects 2019-09-30 15:14:02 +02:00
Christoph M. Becker 0c5b75b063 Fix arginfo
The second parameter of `imagexbm()` is nullable.
2019-08-11 16:41:31 +02:00
Christoph M. Becker f30501b172 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix parameter order
2019-08-11 16:18:44 +02:00
Christoph M. Becker f273204011 Merge branch 'PHP-7.4'
* PHP-7.4:
  Extend color component range checks
2019-08-11 15:23:23 +02:00
Christoph M. Becker 4067519541 Fix arginfo 2019-08-11 13:54:52 +02:00
Christoph M. Becker c90a27387e Add GD function stubs 2019-08-11 13:17:24 +02:00