1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
Daniel Neto 2025-05-10 16:23:12 -03:00
parent 4d076b802f
commit b842960640
136 changed files with 1179 additions and 1416 deletions

View file

@ -13,7 +13,6 @@
"php": "^7.3|^8",
"ext-curl": "*",
"ext-json": "*",
"chrisjean/php-ico": "^1.0",
"ezyang/htmlpurifier": "^4.13",
"google/apiclient": "^2.18",
"google/apiclient-services": "*",

49
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "348408bc2c335c1ef2037d8523a92269",
"content-hash": "f8e151b06c33237219c4581cc5629b1b",
"packages": [
{
"name": "abraham/twitteroauth",
@ -779,53 +779,6 @@
],
"time": "2024-07-17T01:04:28+00:00"
},
{
"name": "chrisjean/php-ico",
"version": "1.0.4",
"source": {
"type": "git",
"url": "https://github.com/chrisbliss18/php-ico.git",
"reference": "ccd5c0d56554f3ddcd7a823e695be83e0d1e43b6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/chrisbliss18/php-ico/zipball/ccd5c0d56554f3ddcd7a823e695be83e0d1e43b6",
"reference": "ccd5c0d56554f3ddcd7a823e695be83e0d1e43b6",
"shasum": ""
},
"require": {
"ext-gd": "*",
"php": ">=5.2.4"
},
"type": "library",
"autoload": {
"classmap": [
"class-php-ico.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0+"
],
"authors": [
{
"name": "Chris Jean",
"homepage": "https://chrisjean.com",
"role": "Developer"
}
],
"description": "An easy-to-use library to generate valid ICO files.",
"homepage": "https://github.com/chrisbliss18/php-ico",
"keywords": [
"favicon",
"ico"
],
"support": {
"issues": "https://github.com/chrisbliss18/php-ico/issues",
"source": "https://github.com/chrisbliss18/php-ico"
},
"time": "2016-09-27T22:00:56+00:00"
},
{
"name": "christian-riesen/base32",
"version": "1.6.0",

View file

@ -95,16 +95,26 @@ if (!empty($_POST['faviconBase64'])) {
"url" => $global['systemRootPath'] . $photoURL,
];
$sizes = [
[16, 16],
[24, 24],
[32, 32],
[48, 48],
[144, 144],
];
$sizes = [16, 24, 32, 48, 144];
$input = $global['systemRootPath'] . $photoURL;
$output = $global['systemRootPath'] . $imagePath . 'favicon.ico';
$ico_lib = new PHP_ICO($global['systemRootPath'] . $photoURL, $sizes);
$ico_lib->save_ico($global['systemRootPath'] . $imagePath.'favicon.ico');
// Check if the `convert` command is available (ImageMagick)
$convertPath = trim(shell_exec('which convert'));
if (empty($convertPath)) {
error_log("[favicon] ImageMagick 'convert' command not found. Please install it using:\n sudo apt update && sudo apt install imagemagick");
echo "Error: ImageMagick is not installed. Please install it with:\n";
echo "sudo apt update && sudo apt install imagemagick\n";
return;
}
// Prepare auto-resize sizes for favicon
$sizesStr = implode(',', $sizes);
// Build and execute the `convert` command
$cmd = escapeshellcmd("convert {$input} -define icon:auto-resize={$sizesStr} {$output}");
exec($cmd, $outputLog, $returnCode);
} else {
$response2 = [
"status" => 'error',

View file

@ -228,9 +228,6 @@ class Subscribe extends ObjectYPT{
$row['channel_identification'] = User::getNameIdentificationById($row['users_id']);
if ($row['channel_identification'] === __("Unknown User")) {
$row['channel_identification'] = $row['email'];
}
$row['channel_backgroundURL'] = User::getBackground($row['users_id']);
$row['channel_photoURL'] = User::getPhoto($row['users_id']);

View file

@ -1,96 +0,0 @@
PHP ICO - The PHP ICO Generator
===============================
PHP ICO provides an easy-to-use PHP class that generates valid [ICO files](http://en.wikipedia.org/wiki/ICO_%28file_format%29). Note that these are not simply BMP, GIF, or PNG formatted images with an extension of ico, the images generated by this class are fully valid ICO-formatted image files.
The class uses the GD library for reading an image from the source file and uses pure PHP for generating the ICO file format. In theory, any image format that GD can read can be used as a source image to generate the ICO file. I tested this library with JPEG, GIF, and PNG images with great results. If an animated GIF is supplied, the first frame will be used to generate the ICO image.
The PHP ICO library is available on Composer via Packagist at `chrisjean/php-ico`.
ICO Format Details
------------------
The primary goal of creating this class was to have a simple-to-use and reliable method of generating ICO files for use as [favicons](http://en.wikipedia.org/wiki/Favicon) in websites. This goal drove much of the development and is the reason for some of the limitations in the resulting functionality.
ICO files support two different ways of encoding the actual image data: the [Windows BMP](http://en.wikipedia.org/wiki/BMP_file_format) format and the [PNG](http://en.wikipedia.org/wiki/Portable_Network_Graphics) format. Since support for the PNG format was introduced in Windows Vista and both older and newer versions of Windows support the BMP enocoding, the BMP encoding method was used.
Images are encoded using 32 bits per pixel. This allows for alpha channel information in the resulting images. Support for 32 bit images was added in Windows XP. This means that older versions of Windows are not likely to display the ICO images properly, if at all. The generated images have not been tested on versions of Windows predating XP.
Usage
-----
The following is a very basic example of using the PHP ICO library:
```php
require( dirname( __FILE__ ) . '/class-php-ico.php' );
$source = dirname( __FILE__ ) . '/example.gif';
$destination = dirname( __FILE__ ) . '/example.ico';
$ico_lib = new PHP_ICO( $source );
$ico_lib->save_ico( $destination );
````
It takes a source file named `example.gif` and produce an output ICO file named `example.ico`. `example.ico` will contain a single image that is the same size as the source image.
The ICO file format is capable of holding multiple images, each of a different size. The PHP ICO library opens up this feature of the ICO format as shown in the following example:
```php
require( dirname( __FILE__ ) . '/class-php-ico.php' );
$source = dirname( __FILE__ ) . '/example.gif';
$destination = dirname( __FILE__ ) . '/example.ico';
$ico_lib = new PHP_ICO( $source, array( array( 32, 32 ), array( 64, 64 ) ) );
$ico_lib->save_ico( $destination );
```
As with the previous example, this example produces `example.ico` from the `example.gif` source file. In this example, sizes were passed to the constructor that result in the `example.ico` file containing two images: one that is 32x32 and one that is 64x64. Since the same source image is used for each of the contained images, each contained image is simply the source image scaled to the new dimensions.
Using different source images for the different sizes contained inside an ICO file can create much better results. For instance, you can use a high-quality image for higher-resolution images and use smaller images that are tailored for their specific dimensions for the smaller sizes. The following example shows how the PHP ICO library can be used to create such ICO files:
```php
require( dirname( __FILE__ ) . '/class-php-ico.php' );
$destination = dirname( __FILE__ ) . '/example.ico';
$ico_lib = new PHP_ICO();
$ico_lib->add_image( dirname( __FILE__ ) . '/example-small.gif', array( array( 16, 16 ), array( 24, 24 ), array( 32, 32 ) ) );
$ico_lib->add_image( dirname( __FILE__ ) . '/example-medium.gif', array( array( 48, 48 ), array( 96, 96 ) ) );
$ico_lib->add_image( dirname( __FILE__ ) . '/example-large.gif', array( array( 128, 128 ) ) );
$ico_lib->save_ico( $destination );
```
This example creates a single ICO file named `example.ico` just as the previous examples. The difference is that this example used multiple source images to generate the final ICO images. The final ICO image contains a total of six images: 16x16, 24x24, and 32x32 images from `example-small.gif`; 48x48 and 96x96 images from `example-medium.gif`; and a 128x128 image from `example-large.gif`.
By using this feature of supplying multiple source images with specific sizes for each, you can generate ICO files that have very high-quality images at each supplied resolution.
Since the PHP ICO library was created to generate favicon files, the following example shows how to generate a favicon ICO file with all the needed dimensions from a single source image:
```php
require( dirname( __FILE__ ) . '/class-php-ico.php' );
$source = dirname( __FILE__ ) . '/example.gif';
$destination = dirname( __FILE__ ) . '/example.ico';
$sizes = array(
array( 16, 16 ),
array( 24, 24 ),
array( 32, 32 ),
array( 48, 48 ),
);
$ico_lib = new PHP_ICO( $source, $sizes );
$ico_lib->save_ico( $destination );
```
I've found that the 16x16, 24x24, 32x32, and 48x48 image sizes cover all the sizes that browsers and Windows will try to use a favicon image for. The different sizes come from using the favicon for various browser icons, bookmarks, and various other places.
Thanks
------
I'd like to thank [iThemes](http://ithemes.com) for making this project possible. This code was originally developed to add easy-to-use favicon support to the [Builder theme](http://ithemes.com/purchase/builder-theme/). I asked [Cory](http://corymiller.tv/), owner of iThemes and my boss, if I could share the final code. He gave me the green light. Win for everyone. :)
Thanks iThemes. Thanks Cory.

View file

@ -1,11 +0,0 @@
1.0.0 - 2011-08-04
Initial version.
1.0.1 - 2012-10-01
Added requirements checks.
1.0.2 - 2013-01-07
Added bug fix that caused source images with transparency to have artifacts when output at the same dimensions as the source.
1.0.3 - 2016-07-22
Updated class constructor to __construct() as PHP4-style constructors are now deprecated. Props @nuxodin.
Removed trailing whitespace from blank lines.
1.0.4 - 2016-09-27
Updated version to get composer to track properly.

View file

@ -1,264 +0,0 @@
<?php
/*
Copyright 2011-2016 Chris Jean & iThemes
Licensed under GPLv2 or above
Version 1.0.4
*/
class PHP_ICO {
/**
* Images in the BMP format.
*
* @var array
* @access private
*/
var $_images = array();
/**
* Flag to tell if the required functions exist.
*
* @var boolean
* @access private
*/
var $_has_requirements = false;
/**
* Constructor - Create a new ICO generator.
*
* If the constructor is not passed a file, a file will need to be supplied using the {@link PHP_ICO::add_image}
* function in order to generate an ICO file.
*
* @param string $file Optional. Path to the source image file.
* @param array $sizes Optional. An array of sizes (each size is an array with a width and height) that the source image should be rendered at in the generated ICO file. If sizes are not supplied, the size of the source image will be used.
*/
function __construct( $file = false, $sizes = array() ) {
$required_functions = array(
'getimagesize',
'imagecreatefromstring',
'imagecreatetruecolor',
'imagecolortransparent',
'imagecolorallocatealpha',
'imagealphablending',
'imagesavealpha',
'imagesx',
'imagesy',
'imagecopyresampled',
);
foreach ( $required_functions as $function ) {
if ( ! function_exists( $function ) ) {
trigger_error( "The PHP_ICO class was unable to find the $function function, which is part of the GD library. Ensure that the system has the GD library installed and that PHP has access to it through a PHP interface, such as PHP's GD module. Since this function was not found, the library will be unable to create ICO files." );
return;
}
}
$this->_has_requirements = true;
if ( false != $file )
$this->add_image( $file, $sizes );
}
/**
* Add an image to the generator.
*
* This function adds a source image to the generator. It serves two main purposes: add a source image if one was
* not supplied to the constructor and to add additional source images so that different images can be supplied for
* different sized images in the resulting ICO file. For instance, a small source image can be used for the small
* resolutions while a larger source image can be used for large resolutions.
*
* @param string $file Path to the source image file.
* @param array $sizes Optional. An array of sizes (each size is an array with a width and height) that the source image should be rendered at in the generated ICO file. If sizes are not supplied, the size of the source image will be used.
* @return boolean true on success and false on failure.
*/
function add_image( $file, $sizes = array() ) {
if ( ! $this->_has_requirements )
return false;
if ( false === ( $im = $this->_load_image_file( $file ) ) )
return false;
if ( empty( $sizes ) )
$sizes = array( imagesx( $im ), imagesy( $im ) );
// If just a single size was passed, put it in array.
if ( ! is_array( $sizes[0] ) )
$sizes = array( $sizes );
foreach ( (array) $sizes as $size ) {
list( $width, $height ) = $size;
$new_im = imagecreatetruecolor( $width, $height );
imagecolortransparent( $new_im, imagecolorallocatealpha( $new_im, 0, 0, 0, 127 ) );
imagealphablending( $new_im, false );
imagesavealpha( $new_im, true );
$source_width = imagesx( $im );
$source_height = imagesy( $im );
if ( false === imagecopyresampled( $new_im, $im, 0, 0, 0, 0, $width, $height, $source_width, $source_height ) )
continue;
$this->_add_image_data( $new_im );
}
return true;
}
/**
* Write the ICO file data to a file path.
*
* @param string $file Path to save the ICO file data into.
* @return boolean true on success and false on failure.
*/
function save_ico( $file ) {
if ( ! $this->_has_requirements )
return false;
if ( false === ( $data = $this->_get_ico_data() ) )
return false;
if ( false === ( $fh = fopen( $file, 'w' ) ) )
return false;
if ( false === ( fwrite( $fh, $data ) ) ) {
fclose( $fh );
return false;
}
fclose( $fh );
return true;
}
/**
* Generate the final ICO data by creating a file header and adding the image data.
*
* @access private
*/
function _get_ico_data() {
if ( ! is_array( $this->_images ) || empty( $this->_images ) )
return false;
$data = pack( 'vvv', 0, 1, count( $this->_images ) );
$pixel_data = '';
$icon_dir_entry_size = 16;
$offset = 6 + ( $icon_dir_entry_size * count( $this->_images ) );
foreach ( $this->_images as $image ) {
$data .= pack( 'CCCCvvVV', $image['width'], $image['height'], $image['color_palette_colors'], 0, 1, $image['bits_per_pixel'], $image['size'], $offset );
$pixel_data .= $image['data'];
$offset += $image['size'];
}
$data .= $pixel_data;
unset( $pixel_data );
return $data;
}
/**
* Take a GD image resource and change it into a raw BMP format.
*
* @access private
*/
function _add_image_data( $im ) {
$width = imagesx( $im );
$height = imagesy( $im );
$pixel_data = array();
$opacity_data = array();
$current_opacity_val = 0;
for ( $y = $height - 1; $y >= 0; $y-- ) {
for ( $x = 0; $x < $width; $x++ ) {
$color = imagecolorat( $im, $x, $y );
$alpha = ( $color & 0x7F000000 ) >> 24;
$alpha = ( 1 - ( $alpha / 127 ) ) * 255;
$color &= 0xFFFFFF;
$color |= 0xFF000000 & ( $alpha << 24 );
$pixel_data[] = $color;
$opacity = ( $alpha <= 127 ) ? 1 : 0;
$current_opacity_val = ( $current_opacity_val << 1 ) | $opacity;
if ( ( ( $x + 1 ) % 32 ) == 0 ) {
$opacity_data[] = $current_opacity_val;
$current_opacity_val = 0;
}
}
if ( ( $x % 32 ) > 0 ) {
while ( ( $x++ % 32 ) > 0 )
$current_opacity_val = $current_opacity_val << 1;
$opacity_data[] = $current_opacity_val;
$current_opacity_val = 0;
}
}
$image_header_size = 40;
$color_mask_size = $width * $height * 4;
$opacity_mask_size = ( ceil( $width / 32 ) * 4 ) * $height;
$data = pack( 'VVVvvVVVVVV', 40, $width, ( $height * 2 ), 1, 32, 0, 0, 0, 0, 0, 0 );
foreach ( $pixel_data as $color )
$data .= pack( 'V', $color );
foreach ( $opacity_data as $opacity )
$data .= pack( 'N', $opacity );
$image = array(
'width' => $width,
'height' => $height,
'color_palette_colors' => 0,
'bits_per_pixel' => 32,
'size' => $image_header_size + $color_mask_size + $opacity_mask_size,
'data' => $data,
);
$this->_images[] = $image;
}
/**
* Read in the source image file and convert it into a GD image resource.
*
* @access private
*/
function _load_image_file( $file ) {
// Run a cheap check to verify that it is an image file.
if ( false === ( $size = getimagesize( $file ) ) )
return false;
if ( false === ( $file_data = file_get_contents( $file ) ) )
return false;
if ( false === ( $im = imagecreatefromstring( $file_data ) ) )
return false;
unset( $file_data );
return $im;
}
}

View file

@ -1,28 +0,0 @@
{
"name": "chrisjean/php-ico",
"description": "An easy-to-use library to generate valid ICO files.",
"version": "1.0.4",
"keywords": ["ico", "favicon"],
"homepage": "https://github.com/chrisbliss18/php-ico",
"license": "GPL-2.0+",
"authors": [
{
"name": "Chris Jean",
"homepage": "https://chrisjean.com",
"role": "Developer"
}
],
"support": {
"issues": "https://github.com/chrisbliss18/php-ico/issues",
"source": "https://github.com/chrisbliss18/php-ico"
},
"require": {
"php": ">=5.2.4",
"ext-gd": "*"
},
"autoload": {
"classmap": [
"class-php-ico.php"
]
}
}

View file

@ -1,359 +0,0 @@
PHP ICO - The PHP ICO Generator
Copyright 2011-2016 Chris Jean
PHP ICO is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
PHP ICO is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with PHP ICO; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View file

@ -525,7 +525,6 @@ return array(
'PHPUnit\\Util\\Xml\\SuccessfulSchemaDetectionResult' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SuccessfulSchemaDetectionResult.php',
'PHPUnit\\Util\\Xml\\ValidationResult' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/ValidationResult.php',
'PHPUnit\\Util\\Xml\\Validator' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/Validator.php',
'PHP_ICO' => $vendorDir . '/chrisjean/php-ico/class-php-ico.php',
'PharIo\\Manifest\\Application' => $vendorDir . '/phar-io/manifest/src/values/Application.php',
'PharIo\\Manifest\\ApplicationName' => $vendorDir . '/phar-io/manifest/src/values/ApplicationName.php',
'PharIo\\Manifest\\Author' => $vendorDir . '/phar-io/manifest/src/values/Author.php',

View file

@ -1157,7 +1157,6 @@ class ComposerStaticInitc3a61dba26daada128f5891f1a57c504
'PHPUnit\\Util\\Xml\\SuccessfulSchemaDetectionResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SuccessfulSchemaDetectionResult.php',
'PHPUnit\\Util\\Xml\\ValidationResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/ValidationResult.php',
'PHPUnit\\Util\\Xml\\Validator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/Validator.php',
'PHP_ICO' => __DIR__ . '/..' . '/chrisjean/php-ico/class-php-ico.php',
'PharIo\\Manifest\\Application' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Application.php',
'PharIo\\Manifest\\ApplicationName' => __DIR__ . '/..' . '/phar-io/manifest/src/values/ApplicationName.php',
'PharIo\\Manifest\\Author' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Author.php',

View file

@ -806,56 +806,6 @@
],
"install-path": "../chillerlan/php-settings-container"
},
{
"name": "chrisjean/php-ico",
"version": "1.0.4",
"version_normalized": "1.0.4.0",
"source": {
"type": "git",
"url": "https://github.com/chrisbliss18/php-ico.git",
"reference": "ccd5c0d56554f3ddcd7a823e695be83e0d1e43b6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/chrisbliss18/php-ico/zipball/ccd5c0d56554f3ddcd7a823e695be83e0d1e43b6",
"reference": "ccd5c0d56554f3ddcd7a823e695be83e0d1e43b6",
"shasum": ""
},
"require": {
"ext-gd": "*",
"php": ">=5.2.4"
},
"time": "2016-09-27T22:00:56+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"classmap": [
"class-php-ico.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0+"
],
"authors": [
{
"name": "Chris Jean",
"homepage": "https://chrisjean.com",
"role": "Developer"
}
],
"description": "An easy-to-use library to generate valid ICO files.",
"homepage": "https://github.com/chrisbliss18/php-ico",
"keywords": [
"favicon",
"ico"
],
"support": {
"issues": "https://github.com/chrisbliss18/php-ico/issues",
"source": "https://github.com/chrisbliss18/php-ico"
},
"install-path": "../chrisjean/php-ico"
},
{
"name": "christian-riesen/base32",
"version": "1.6.0",
@ -1412,17 +1362,17 @@
},
{
"name": "firebase/php-jwt",
"version": "v6.11.0",
"version_normalized": "6.11.0.0",
"version": "v6.11.1",
"version_normalized": "6.11.1.0",
"source": {
"type": "git",
"url": "https://github.com/firebase/php-jwt.git",
"reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712"
"reference": "d1e91ecf8c598d073d0995afa8cd5c75c6e19e66"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/8f718f4dfc9c5d5f0c994cdfd103921b43592712",
"reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712",
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/d1e91ecf8c598d073d0995afa8cd5c75c6e19e66",
"reference": "d1e91ecf8c598d073d0995afa8cd5c75c6e19e66",
"shasum": ""
},
"require": {
@ -1440,7 +1390,7 @@
"ext-sodium": "Support EdDSA (Ed25519) signatures",
"paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present"
},
"time": "2025-01-23T05:11:06+00:00",
"time": "2025-04-09T20:32:01+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -1472,7 +1422,7 @@
],
"support": {
"issues": "https://github.com/firebase/php-jwt/issues",
"source": "https://github.com/firebase/php-jwt/tree/v6.11.0"
"source": "https://github.com/firebase/php-jwt/tree/v6.11.1"
},
"install-path": "../firebase/php-jwt"
},
@ -1541,17 +1491,17 @@
},
{
"name": "google/apiclient",
"version": "v2.18.2",
"version_normalized": "2.18.2.0",
"version": "v2.18.3",
"version_normalized": "2.18.3.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-api-php-client.git",
"reference": "d8d201ba8a189a3cd7fb34e4da569f2ed440eee7"
"reference": "4eee42d201eff054428a4836ec132944d271f051"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/d8d201ba8a189a3cd7fb34e4da569f2ed440eee7",
"reference": "d8d201ba8a189a3cd7fb34e4da569f2ed440eee7",
"url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/4eee42d201eff054428a4836ec132944d271f051",
"reference": "4eee42d201eff054428a4836ec132944d271f051",
"shasum": ""
},
"require": {
@ -1577,7 +1527,7 @@
"suggest": {
"cache/filesystem-adapter": "For caching certs and tokens (using Google\\Client::setCache)"
},
"time": "2024-12-16T22:52:40+00:00",
"time": "2025-04-08T21:59:36+00:00",
"type": "library",
"extra": {
"branch-alias": {
@ -1607,7 +1557,7 @@
],
"support": {
"issues": "https://github.com/googleapis/google-api-php-client/issues",
"source": "https://github.com/googleapis/google-api-php-client/tree/v2.18.2"
"source": "https://github.com/googleapis/google-api-php-client/tree/v2.18.3"
},
"install-path": "../google/apiclient"
},
@ -1660,17 +1610,17 @@
},
{
"name": "google/auth",
"version": "v1.46.0",
"version_normalized": "1.46.0.0",
"version": "v1.47.0",
"version_normalized": "1.47.0.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-auth-library-php.git",
"reference": "7fafae99a41984cbfb92508174263cf7bf3049b9"
"reference": "d6389aae7c009daceaa8da9b7942d8df6969f6d9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/7fafae99a41984cbfb92508174263cf7bf3049b9",
"reference": "7fafae99a41984cbfb92508174263cf7bf3049b9",
"url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/d6389aae7c009daceaa8da9b7942d8df6969f6d9",
"reference": "d6389aae7c009daceaa8da9b7942d8df6969f6d9",
"shasum": ""
},
"require": {
@ -1696,7 +1646,7 @@
"suggest": {
"phpseclib/phpseclib": "May be used in place of OpenSSL for signing strings or for token management. Please require version ^2."
},
"time": "2025-02-12T22:21:37+00:00",
"time": "2025-04-15T21:47:20+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -1718,7 +1668,7 @@
"support": {
"docs": "https://cloud.google.com/php/docs/reference/auth/latest",
"issues": "https://github.com/googleapis/google-auth-library-php/issues",
"source": "https://github.com/googleapis/google-auth-library-php/tree/v1.46.0"
"source": "https://github.com/googleapis/google-auth-library-php/tree/v1.47.0"
},
"install-path": "../google/auth"
},
@ -2112,17 +2062,17 @@
},
{
"name": "hybridauth/hybridauth",
"version": "v3.11.0",
"version_normalized": "3.11.0.0",
"version": "v3.12.1",
"version_normalized": "3.12.1.0",
"source": {
"type": "git",
"url": "https://github.com/hybridauth/hybridauth.git",
"reference": "b70b9cbe1c7fa99b5847c5868610a8f024cc7d38"
"reference": "9449686baf2593739129a24e515a60908738ea8d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/hybridauth/hybridauth/zipball/b70b9cbe1c7fa99b5847c5868610a8f024cc7d38",
"reference": "b70b9cbe1c7fa99b5847c5868610a8f024cc7d38",
"url": "https://api.github.com/repos/hybridauth/hybridauth/zipball/9449686baf2593739129a24e515a60908738ea8d",
"reference": "9449686baf2593739129a24e515a60908738ea8d",
"shasum": ""
},
"require": {
@ -2130,13 +2080,13 @@
},
"require-dev": {
"ext-curl": "*",
"phpunit/phpunit": "^4.8.35 || ^6.5 || ^8.0"
"phpunit/phpunit": "^4.8.35 || ^6.5 || ^8.0 || ^12.0"
},
"suggest": {
"firebase/php-jwt": "Needed to support Apple provider",
"phpseclib/phpseclib": "Needed to support Apple provider"
},
"time": "2024-01-02T23:09:56+00:00",
"time": "2025-04-22T05:22:57+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -2171,7 +2121,7 @@
"support": {
"gitter": "https://gitter.im/hybridauth/hybridauth",
"issues": "https://github.com/hybridauth/hybridauth/issues",
"source": "https://github.com/hybridauth/hybridauth/tree/v3.11.0"
"source": "https://github.com/hybridauth/hybridauth/tree/v3.12.1"
},
"install-path": "../hybridauth/hybridauth"
},
@ -3363,17 +3313,17 @@
},
{
"name": "phpmailer/phpmailer",
"version": "v6.9.3",
"version_normalized": "6.9.3.0",
"version": "v6.10.0",
"version_normalized": "6.10.0.0",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e"
"reference": "bf74d75a1fde6beaa34a0ddae2ec5fce0f72a144"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/2f5c94fe7493efc213f643c23b1b1c249d40f47e",
"reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/bf74d75a1fde6beaa34a0ddae2ec5fce0f72a144",
"reference": "bf74d75a1fde6beaa34a0ddae2ec5fce0f72a144",
"shasum": ""
},
"require": {
@ -3403,7 +3353,7 @@
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)",
"thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication"
},
"time": "2024-11-24T18:04:13+00:00",
"time": "2025-04-24T15:19:31+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -3435,7 +3385,7 @@
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"support": {
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.3"
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.10.0"
},
"funding": [
{
@ -6557,17 +6507,17 @@
},
{
"name": "stripe/stripe-php",
"version": "v17.1.1",
"version_normalized": "17.1.1.0",
"version": "v17.2.0",
"version_normalized": "17.2.0.0",
"source": {
"type": "git",
"url": "https://github.com/stripe/stripe-php.git",
"reference": "01ca9b5fdd899b8e4b69f83b85e09d96f6240220"
"reference": "ff2364c75533b71116ea11994d6bd08989b7f67b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/01ca9b5fdd899b8e4b69f83b85e09d96f6240220",
"reference": "01ca9b5fdd899b8e4b69f83b85e09d96f6240220",
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/ff2364c75533b71116ea11994d6bd08989b7f67b",
"reference": "ff2364c75533b71116ea11994d6bd08989b7f67b",
"shasum": ""
},
"require": {
@ -6581,7 +6531,7 @@
"phpstan/phpstan": "^1.2",
"phpunit/phpunit": "^5.7 || ^9.0"
},
"time": "2025-04-05T00:09:14+00:00",
"time": "2025-04-30T19:20:34+00:00",
"type": "library",
"extra": {
"branch-alias": {
@ -6613,7 +6563,7 @@
],
"support": {
"issues": "https://github.com/stripe/stripe-php/issues",
"source": "https://github.com/stripe/stripe-php/tree/v17.1.1"
"source": "https://github.com/stripe/stripe-php/tree/v17.2.0"
},
"install-path": "../stripe/stripe-php"
},
@ -7440,8 +7390,8 @@
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.31.0",
"version_normalized": "1.31.0.0",
"version": "v1.32.0",
"version_normalized": "1.32.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
@ -7502,7 +7452,7 @@
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0"
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0"
},
"funding": [
{
@ -7935,28 +7885,28 @@
},
{
"name": "symfony/polyfill-php80",
"version": "v1.31.0",
"version_normalized": "1.31.0.0",
"version": "v1.32.0",
"version_normalized": "1.32.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8"
"reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
"reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608",
"reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608",
"shasum": ""
},
"require": {
"php": ">=7.2"
},
"time": "2024-09-09T11:45:10+00:00",
"time": "2025-01-02T08:10:11+00:00",
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
"url": "https://github.com/symfony/polyfill",
"name": "symfony/polyfill"
}
},
"installation-source": "dist",
@ -7998,7 +7948,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0"
"source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0"
},
"funding": [
{
@ -8782,17 +8732,17 @@
},
{
"name": "zircote/swagger-php",
"version": "5.0.7",
"version_normalized": "5.0.7.0",
"version": "5.1.1",
"version_normalized": "5.1.1.0",
"source": {
"type": "git",
"url": "https://github.com/zircote/swagger-php.git",
"reference": "18457fa71f753cfd4a2b21916baf329864fdfaa6"
"reference": "7a6544c60441ddb5959b91266b3a290dc28537ba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zircote/swagger-php/zipball/18457fa71f753cfd4a2b21916baf329864fdfaa6",
"reference": "18457fa71f753cfd4a2b21916baf329864fdfaa6",
"url": "https://api.github.com/repos/zircote/swagger-php/zipball/7a6544c60441ddb5959b91266b3a290dc28537ba",
"reference": "7a6544c60441ddb5959b91266b3a290dc28537ba",
"shasum": ""
},
"require": {
@ -8819,7 +8769,7 @@
"suggest": {
"doctrine/annotations": "^2.0"
},
"time": "2025-03-19T03:31:11+00:00",
"time": "2025-04-27T10:02:08+00:00",
"bin": [
"bin/openapi"
],
@ -8855,8 +8805,8 @@
"homepage": "https://radebatz.net"
}
],
"description": "swagger-php - Generate interactive documentation for your RESTful API using phpdoc annotations",
"homepage": "https://github.com/zircote/swagger-php/",
"description": "Generate interactive documentation for your RESTful API using PHP attributes (preferred) or PHPDoc annotations",
"homepage": "https://github.com/zircote/swagger-php",
"keywords": [
"api",
"json",
@ -8865,7 +8815,7 @@
],
"support": {
"issues": "https://github.com/zircote/swagger-php/issues",
"source": "https://github.com/zircote/swagger-php/tree/5.0.7"
"source": "https://github.com/zircote/swagger-php/tree/5.1.1"
},
"install-path": "../zircote/swagger-php"
}

View file

@ -5,7 +5,7 @@
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => 'c9091acd31f2cda1b5ce3fdd3c634dbcac28cdbf',
'reference' => '4d076b802faf93f2d9f20a04459f56fed3c0859c',
'name' => 'wwbn/avideo',
'dev' => true,
),
@ -109,15 +109,6 @@
'reference' => '5553558bd381fce5108c6d0343c12e488cfec6bb',
'dev_requirement' => false,
),
'chrisjean/php-ico' => array(
'pretty_version' => '1.0.4',
'version' => '1.0.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../chrisjean/php-ico',
'aliases' => array(),
'reference' => 'ccd5c0d56554f3ddcd7a823e695be83e0d1e43b6',
'dev_requirement' => false,
),
'christian-riesen/base32' => array(
'pretty_version' => '1.6.0',
'version' => '1.6.0.0',
@ -212,12 +203,12 @@
'dev_requirement' => false,
),
'firebase/php-jwt' => array(
'pretty_version' => 'v6.11.0',
'version' => '6.11.0.0',
'pretty_version' => 'v6.11.1',
'version' => '6.11.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../firebase/php-jwt',
'aliases' => array(),
'reference' => '8f718f4dfc9c5d5f0c994cdfd103921b43592712',
'reference' => 'd1e91ecf8c598d073d0995afa8cd5c75c6e19e66',
'dev_requirement' => false,
),
'gliterd/backblaze-b2' => array(
@ -230,12 +221,12 @@
'dev_requirement' => false,
),
'google/apiclient' => array(
'pretty_version' => 'v2.18.2',
'version' => '2.18.2.0',
'pretty_version' => 'v2.18.3',
'version' => '2.18.3.0',
'type' => 'library',
'install_path' => __DIR__ . '/../google/apiclient',
'aliases' => array(),
'reference' => 'd8d201ba8a189a3cd7fb34e4da569f2ed440eee7',
'reference' => '4eee42d201eff054428a4836ec132944d271f051',
'dev_requirement' => false,
),
'google/apiclient-services' => array(
@ -248,12 +239,12 @@
'dev_requirement' => false,
),
'google/auth' => array(
'pretty_version' => 'v1.46.0',
'version' => '1.46.0.0',
'pretty_version' => 'v1.47.0',
'version' => '1.47.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../google/auth',
'aliases' => array(),
'reference' => '7fafae99a41984cbfb92508174263cf7bf3049b9',
'reference' => 'd6389aae7c009daceaa8da9b7942d8df6969f6d9',
'dev_requirement' => false,
),
'guzzlehttp/guzzle' => array(
@ -293,12 +284,12 @@
'dev_requirement' => true,
),
'hybridauth/hybridauth' => array(
'pretty_version' => 'v3.11.0',
'version' => '3.11.0.0',
'pretty_version' => 'v3.12.1',
'version' => '3.12.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../hybridauth/hybridauth',
'aliases' => array(),
'reference' => 'b70b9cbe1c7fa99b5847c5868610a8f024cc7d38',
'reference' => '9449686baf2593739129a24e515a60908738ea8d',
'dev_requirement' => false,
),
'iamcal/sql-parser' => array(
@ -482,12 +473,12 @@
),
),
'phpmailer/phpmailer' => array(
'pretty_version' => 'v6.9.3',
'version' => '6.9.3.0',
'pretty_version' => 'v6.10.0',
'version' => '6.10.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../phpmailer/phpmailer',
'aliases' => array(),
'reference' => '2f5c94fe7493efc213f643c23b1b1c249d40f47e',
'reference' => 'bf74d75a1fde6beaa34a0ddae2ec5fce0f72a144',
'dev_requirement' => false,
),
'phpseclib/phpseclib' => array(
@ -948,12 +939,12 @@
'dev_requirement' => false,
),
'stripe/stripe-php' => array(
'pretty_version' => 'v17.1.1',
'version' => '17.1.1.0',
'pretty_version' => 'v17.2.0',
'version' => '17.2.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../stripe/stripe-php',
'aliases' => array(),
'reference' => '01ca9b5fdd899b8e4b69f83b85e09d96f6240220',
'reference' => 'ff2364c75533b71116ea11994d6bd08989b7f67b',
'dev_requirement' => false,
),
'symfony/console' => array(
@ -1059,8 +1050,8 @@
'dev_requirement' => false,
),
'symfony/polyfill-ctype' => array(
'pretty_version' => 'v1.31.0',
'version' => '1.31.0.0',
'pretty_version' => 'v1.32.0',
'version' => '1.32.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
'aliases' => array(),
@ -1113,12 +1104,12 @@
'dev_requirement' => false,
),
'symfony/polyfill-php80' => array(
'pretty_version' => 'v1.31.0',
'version' => '1.31.0.0',
'pretty_version' => 'v1.32.0',
'version' => '1.32.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php80',
'aliases' => array(),
'reference' => '60328e362d4c2c802a54fcbf04f9d3fb892b4cf8',
'reference' => '0cc9dd0f17f61d8131e7df6b84bd344899fe2608',
'dev_requirement' => false,
),
'symfony/polyfill-php81' => array(
@ -1214,16 +1205,16 @@
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => 'c9091acd31f2cda1b5ce3fdd3c634dbcac28cdbf',
'reference' => '4d076b802faf93f2d9f20a04459f56fed3c0859c',
'dev_requirement' => false,
),
'zircote/swagger-php' => array(
'pretty_version' => '5.0.7',
'version' => '5.0.7.0',
'pretty_version' => '5.1.1',
'version' => '5.1.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../zircote/swagger-php',
'aliases' => array(),
'reference' => '18457fa71f753cfd4a2b21916baf329864fdfaa6',
'reference' => '7a6544c60441ddb5959b91266b3a290dc28537ba',
'dev_requirement' => false,
),
),

View file

@ -1,5 +1,12 @@
# Changelog
## [6.11.1](https://github.com/firebase/php-jwt/compare/v6.11.0...v6.11.1) (2025-04-09)
### Bug Fixes
* update error text for consistency ([#528](https://github.com/firebase/php-jwt/issues/528)) ([c11113a](https://github.com/firebase/php-jwt/commit/c11113afa13265e016a669e75494b9203b8a7775))
## [6.11.0](https://github.com/firebase/php-jwt/compare/v6.10.2...v6.11.0) (2025-01-23)

View file

@ -291,7 +291,7 @@ $jwks = ['keys' => []];
// JWK::parseKeySet($jwks) returns an associative array of **kid** to Firebase\JWT\Key
// objects. Pass this as the second parameter to JWT::decode.
JWT::decode($payload, JWK::parseKeySet($jwks));
JWT::decode($jwt, JWK::parseKeySet($jwks));
```
Using Cached Key Sets
@ -350,7 +350,7 @@ use InvalidArgumentException;
use UnexpectedValueException;
try {
$decoded = JWT::decode($payload, $keys);
$decoded = JWT::decode($jwt, $keys);
} catch (InvalidArgumentException $e) {
// provided key/key-array is empty or malformed.
} catch (DomainException $e) {
@ -380,7 +380,7 @@ like this:
use Firebase\JWT\JWT;
use UnexpectedValueException;
try {
$decoded = JWT::decode($payload, $keys);
$decoded = JWT::decode($jwt, $keys);
} catch (LogicException $e) {
// errors having to do with environmental setup or malformed JWT Keys
} catch (UnexpectedValueException $e) {
@ -395,7 +395,7 @@ instead, you can do the following:
```php
// return type is stdClass
$decoded = JWT::decode($payload, $keys);
$decoded = JWT::decode($jwt, $keys);
// cast to array
$decoded = json_decode(json_encode($decoded), true);

View file

@ -154,7 +154,7 @@ class JWT
// token can actually be used. If it's not yet that time, abort.
if (isset($payload->nbf) && floor($payload->nbf) > ($timestamp + static::$leeway)) {
$ex = new BeforeValidException(
'Cannot handle token with nbf prior to ' . \date(DateTime::ISO8601, (int) $payload->nbf)
'Cannot handle token with nbf prior to ' . \date(DateTime::ISO8601, (int) floor($payload->nbf))
);
$ex->setPayload($payload);
throw $ex;
@ -165,7 +165,7 @@ class JWT
// correctly used the nbf claim).
if (!isset($payload->nbf) && isset($payload->iat) && floor($payload->iat) > ($timestamp + static::$leeway)) {
$ex = new BeforeValidException(
'Cannot handle token with iat prior to ' . \date(DateTime::ISO8601, (int) $payload->iat)
'Cannot handle token with iat prior to ' . \date(DateTime::ISO8601, (int) floor($payload->iat))
);
$ex->setPayload($payload);
throw $ex;

View file

@ -1,5 +1,12 @@
# Changelog
## [2.18.3](https://github.com/googleapis/google-api-php-client/compare/v2.18.2...v2.18.3) (2025-04-08)
### Bug Fixes
* Convert Finder lazy iterator to array before deletion ([#2663](https://github.com/googleapis/google-api-php-client/issues/2663)) ([c699405](https://github.com/googleapis/google-api-php-client/commit/c6994051af1568359c97d267d9ef34ccbda31387))
## [2.18.2](https://github.com/googleapis/google-api-php-client/compare/v2.18.1...v2.18.2) (2024-12-16)

View file

@ -44,7 +44,7 @@ composer installed.
Once composer is installed, execute the following command in your project root to install this library:
```sh
composer require google/apiclient:^2.15.0
composer require google/apiclient
```
If you're facing a timeout error then either increase the timeout for composer by adding the env flag as `COMPOSER_PROCESS_TIMEOUT=600 composer install` or you can put this in the `config` section of the composer schema:

View file

@ -34,10 +34,10 @@ class Composer
) {
$composer = $event->getComposer();
$extra = $composer->getPackage()->getExtra();
$servicesToKeep = isset($extra['google/apiclient-services'])
? $extra['google/apiclient-services']
: [];
if ($servicesToKeep) {
$servicesToKeep = $extra['google/apiclient-services'] ?? [];
if (empty($servicesToKeep)) {
return;
}
$vendorDir = $composer->getConfig()->get('vendor-dir');
$serviceDir = sprintf(
'%s/google/apiclient-services/src/Google/Service',
@ -53,18 +53,20 @@ class Composer
self::verifyServicesToKeep($serviceDir, $servicesToKeep);
$finder = self::getServicesToRemove($serviceDir, $servicesToKeep);
$filesystem = $filesystem ?: new Filesystem();
if (0 !== $count = count($finder)) {
$servicesToRemoveCount = $finder->count();
if (0 === $servicesToRemoveCount) {
return;
}
$event->getIO()->write(
sprintf('Removing %s google services', $count)
sprintf('Removing %d google services', $servicesToRemoveCount)
);
foreach ($finder as $file) {
$realpath = $file->getRealPath();
$pathsToRemove = iterator_to_array($finder);
foreach ($pathsToRemove as $pathToRemove) {
$realpath = $pathToRemove->getRealPath();
$filesystem->remove($realpath);
$filesystem->remove($realpath . '.php');
}
}
}
}
/**
* @throws InvalidArgumentException when the service doesn't exist

View file

@ -1 +1 @@
1.46.0
1.47.0

View file

@ -76,7 +76,7 @@ abstract class CredentialsLoader implements
*/
public static function fromEnv()
{
$path = getenv(self::ENV_VAR);
$path = self::getEnv(self::ENV_VAR);
if (empty($path)) {
return null;
}
@ -104,7 +104,7 @@ abstract class CredentialsLoader implements
public static function fromWellKnownFile()
{
$rootEnv = self::isOnWindows() ? 'APPDATA' : 'HOME';
$path = [getenv($rootEnv)];
$path = [self::getEnv($rootEnv)];
if (!self::isOnWindows()) {
$path[] = self::NON_WINDOWS_WELL_KNOWN_PATH_BASE;
}
@ -215,7 +215,7 @@ abstract class CredentialsLoader implements
*/
public static function quotaProjectFromEnv()
{
return getenv(self::QUOTA_PROJECT_ENV_VAR) ?: null;
return self::getEnv(self::QUOTA_PROJECT_ENV_VAR) ?: null;
}
/**
@ -251,7 +251,7 @@ abstract class CredentialsLoader implements
*/
public static function shouldLoadClientCertSource()
{
return filter_var(getenv(self::MTLS_CERT_ENV_VAR), FILTER_VALIDATE_BOOLEAN);
return filter_var(self::getEnv(self::MTLS_CERT_ENV_VAR), FILTER_VALIDATE_BOOLEAN);
}
/**
@ -260,7 +260,7 @@ abstract class CredentialsLoader implements
private static function loadDefaultClientCertSourceFile()
{
$rootEnv = self::isOnWindows() ? 'APPDATA' : 'HOME';
$path = sprintf('%s/%s', getenv($rootEnv), self::MTLS_WELL_KNOWN_PATH);
$path = sprintf('%s/%s', self::getEnv($rootEnv), self::MTLS_WELL_KNOWN_PATH);
if (!file_exists($path)) {
return null;
}
@ -292,4 +292,9 @@ abstract class CredentialsLoader implements
{
return self::DEFAULT_UNIVERSE_DOMAIN;
}
private static function getEnv(string $env): mixed
{
return getenv($env) ?: $_ENV[$env] ?? null;
}
}

View file

@ -3,7 +3,7 @@
[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://supportukrainenow.org/)
## [Hybridauth](https://hybridauth.github.io/) 3.11
## [Hybridauth](https://hybridauth.github.io/) 3.12
[![Build Status](https://travis-ci.org/hybridauth/hybridauth.svg?branch=master)](https://travis-ci.org/hybridauth/hybridauth) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/hybridauth/hybridauth/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/hybridauth/hybridauth/?branch=master) [![Latest Stable Version](https://poser.pugx.org/hybridauth/hybridauth/v/stable.png)](https://packagist.org/packages/hybridauth/hybridauth) [![Join the chat at https://gitter.im/hybridauth/hybridauth](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hybridauth/hybridauth?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

View file

@ -82,6 +82,13 @@ abstract class AbstractAdapter implements AdapterInterface
*/
protected $validateApiResponseHttpCode = true;
/**
* Used for testing purpose to specify filter_input behaviours
*
* @var FilterService
*/
protected static $filterService;
/**
* Common adapters constructor.
*
@ -92,9 +99,9 @@ abstract class AbstractAdapter implements AdapterInterface
*/
public function __construct(
$config = [],
HttpClientInterface $httpClient = null,
StorageInterface $storage = null,
LoggerInterface $logger = null
?HttpClientInterface $httpClient = null,
?StorageInterface $storage = null,
?LoggerInterface $logger = null
) {
$this->providerId = (new \ReflectionClass($this))->getShortName();
@ -243,7 +250,7 @@ abstract class AbstractAdapter implements AdapterInterface
/**
* {@inheritdoc}
*/
public function setHttpClient(HttpClientInterface $httpClient = null)
public function setHttpClient(?HttpClientInterface $httpClient = null)
{
$this->httpClient = $httpClient ?: new HttpClient();
@ -263,7 +270,7 @@ abstract class AbstractAdapter implements AdapterInterface
/**
* {@inheritdoc}
*/
public function setStorage(StorageInterface $storage = null)
public function setStorage(?StorageInterface $storage = null)
{
$this->storage = $storage ?: new Session();
}
@ -279,7 +286,7 @@ abstract class AbstractAdapter implements AdapterInterface
/**
* {@inheritdoc}
*/
public function setLogger(LoggerInterface $logger = null)
public function setLogger(?LoggerInterface $logger = null)
{
$this->logger = $logger ?: new Logger(
$this->config->get('debug_mode'),
@ -369,4 +376,30 @@ abstract class AbstractAdapter implements AdapterInterface
);
}
}
/**
*
* @param int $type: One of INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, or INPUT_ENV
* @param string $var_name: Name of a variable to get
* @param int $filter: [optional] The ID of the filter to apply. The manual page lists the available filters.
* @param mixed $options: Associative array of options or bitwise disjunction of flags. If filter accepts options, flags can be provided in "flags" field of array.
*
* @return mixed: Value of the requested variable on success, FALSE if the filter fails, or NULL if the variable_name variable is not set. If the flag FILTER_NULL_ON_FAILURE is used, it returns FALSE if the variable is not set and NULL if the filter fails.
* https://php.net/manual/en/function.filter-input.php
*/
public function filterInput($type, $var_name, $filter = FILTER_DEFAULT, $options = 0) {
if (!isset(self::$filterService)) {
self::$filterService = new FilterService();
}
return self::$filterService->filterInput($type, $var_name, $filter, $options);
}
/**
* @param FilterService|null $filterService
*
* @return void
*/
public static function setFilterService($filterService) {
self::$filterService = $filterService;
}
}

View file

@ -122,7 +122,7 @@ interface AdapterInterface
*
* @param HttpClientInterface $httpClient
*/
public function setHttpClient(HttpClientInterface $httpClient = null);
public function setHttpClient(?HttpClientInterface $httpClient = null);
/**
* Return http client instance.
@ -134,7 +134,7 @@ interface AdapterInterface
*
* @param StorageInterface $storage
*/
public function setStorage(StorageInterface $storage = null);
public function setStorage(?StorageInterface $storage = null);
/**
* Return storage instance.
@ -146,7 +146,7 @@ interface AdapterInterface
*
* @param LoggerInterface $logger
*/
public function setLogger(LoggerInterface $logger = null);
public function setLogger(?LoggerInterface $logger = null);
/**
* Return logger instance.

View file

@ -0,0 +1,19 @@
<?php
namespace Hybridauth\Adapter;
class FilterService {
/**
*
* @param int $type: One of INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, or INPUT_ENV
* @param string $var_name: Name of a variable to get
* @param int $filter: [optional] The ID of the filter to apply. The manual page lists the available filters.
* @param mixed $options: Associative array of options or bitwise disjunction of flags. If filter accepts options, flags can be provided in "flags" field of array.
*
* @return mixed: Value of the requested variable on success, FALSE if the filter fails, or NULL if the variable_name variable is not set. If the flag FILTER_NULL_ON_FAILURE is used, it returns FALSE if the variable is not set and NULL if the filter fails.
* https://php.net/manual/en/function.filter-input.php
*/
public function filterInput($type, $var_name, $filter = FILTER_DEFAULT, $options = 0) {
return filter_input($type, $var_name, $filter, $options);
}
}

View file

@ -278,10 +278,10 @@ abstract class OAuth1 extends AbstractAdapter implements AdapterInterface
[HttpClient\Util::getCurrentUrl(true)]
);
$denied = filter_input(INPUT_GET, 'denied');
$oauth_problem = filter_input(INPUT_GET, 'oauth_problem');
$oauth_token = filter_input(INPUT_GET, 'oauth_token');
$oauth_verifier = filter_input(INPUT_GET, 'oauth_verifier');
$denied = $this->filterInput(INPUT_GET, 'denied');
$oauth_problem = $this->filterInput(INPUT_GET, 'oauth_problem');
$oauth_token = $this->filterInput(INPUT_GET, 'oauth_token');
$oauth_verifier = $this->filterInput(INPUT_GET, 'oauth_verifier');
if ($denied) {
throw new AuthorizationDeniedException(

View file

@ -315,7 +315,7 @@ abstract class OAuth2 extends AbstractAdapter implements AdapterInterface
try {
$this->authenticateCheckError();
$code = filter_input($_SERVER['REQUEST_METHOD'] === 'POST' ? INPUT_POST : INPUT_GET, 'code');
$code = $this->filterInput($_SERVER['REQUEST_METHOD'] === 'POST' ? INPUT_POST : INPUT_GET, 'code');
if (empty($code)) {
$this->authenticateBegin();
@ -366,11 +366,11 @@ abstract class OAuth2 extends AbstractAdapter implements AdapterInterface
*/
protected function authenticateCheckError()
{
$error = filter_input(INPUT_GET, 'error', FILTER_SANITIZE_SPECIAL_CHARS);
$error = $this->filterInput(INPUT_GET, 'error', FILTER_SANITIZE_SPECIAL_CHARS);
if (!empty($error)) {
$error_description = filter_input(INPUT_GET, 'error_description', FILTER_SANITIZE_SPECIAL_CHARS);
$error_uri = filter_input(INPUT_GET, 'error_uri', FILTER_SANITIZE_SPECIAL_CHARS);
$error_description = $this->filterInput(INPUT_GET, 'error_description', FILTER_SANITIZE_SPECIAL_CHARS);
$error_uri = $this->filterInput(INPUT_GET, 'error_uri', FILTER_SANITIZE_SPECIAL_CHARS);
$collated_error = sprintf('Provider returned an error: %s %s %s', $error, $error_description, $error_uri);
@ -412,8 +412,8 @@ abstract class OAuth2 extends AbstractAdapter implements AdapterInterface
[HttpClient\Util::getCurrentUrl(true)]
);
$state = filter_input($_SERVER['REQUEST_METHOD'] === 'POST' ? INPUT_POST : INPUT_GET, 'state');
$code = filter_input($_SERVER['REQUEST_METHOD'] === 'POST' ? INPUT_POST : INPUT_GET, 'code');
$state = $this->filterInput($_SERVER['REQUEST_METHOD'] === 'POST' ? INPUT_POST : INPUT_GET, 'state');
$code = $this->filterInput($_SERVER['REQUEST_METHOD'] === 'POST' ? INPUT_POST : INPUT_GET, 'code');
/**
* Authorization Request State

View file

@ -62,9 +62,9 @@ class Hybridauth
*/
public function __construct(
$config,
HttpClientInterface $httpClient = null,
StorageInterface $storage = null,
LoggerInterface $logger = null
?HttpClientInterface $httpClient = null,
?StorageInterface $storage = null,
?LoggerInterface $logger = null
) {
if (is_string($config) && file_exists($config)) {
$config = include $config;
@ -121,20 +121,21 @@ class Hybridauth
$adapter = isset($config['adapter']) ? $config['adapter'] : sprintf('Hybridauth\\Provider\\%s', $name);
if (!class_exists($adapter)) {
$unexistingConfiguredAdapter = $adapter;
$adapter = null;
$fs = new \FilesystemIterator(__DIR__ . '/Provider/');
/** @var \SplFileInfo $file */
foreach ($fs as $file) {
if (!$file->isDir()) {
$provider = strtok($file->getFilename(), '.');
if ($name === mb_strtolower($provider)) {
if (mb_strtolower($name) === mb_strtolower($provider)) {
$adapter = sprintf('Hybridauth\\Provider\\%s', $provider);
break;
}
}
}
if ($adapter === null) {
throw new InvalidArgumentException('Unknown Provider.');
throw new InvalidArgumentException("Unknown Provider (name: $name / configured: $unexistingConfiguredAdapter).");
}
}
@ -161,7 +162,8 @@ class Hybridauth
throw new InvalidArgumentException('Unknown Provider.');
}
if (!$providersConfig[$name]['enabled']) {
$enabled = $providersConfig[$name]['enabled'] ?? false;
if (!$enabled) {
throw new UnexpectedValueException('Disabled Provider.');
}

View file

@ -7,11 +7,17 @@
namespace Hybridauth\Provider;
use Hybridauth\Exception\InvalidArgumentException;
use Hybridauth\Exception\UnexpectedApiResponseException;
use Firebase\JWT\JWT;
use Firebase\JWT\Key;
use Hybridauth\Adapter\OAuth2;
use Hybridauth\Data;
use Hybridauth\Exception\HttpRequestFailedException;
use Hybridauth\Exception\InvalidArgumentException;
use Hybridauth\Exception\UnexpectedApiResponseException;
use Hybridauth\User;
use phpseclib3\Crypt\PublicKeyLoader;
use phpseclib3\Math\BigInteger;
use UnexpectedValueException;
/**
* Facebook OAuth2 provider adapter.
@ -142,6 +148,16 @@ class Facebook extends OAuth2
* {@inheritdoc}
*/
public function getUserProfile()
{
return $this->getUserProfileFromOIDCToken() ?? $this->getUserProfileFromAccessToken();
}
/**
* Retrieve the user data from access token.
*
* @return \Hybridauth\User\Profile
*/
public function getUserProfileFromAccessToken()
{
$fields = [
'id',
@ -211,6 +227,79 @@ class Facebook extends OAuth2
return $userProfile;
}
/**
* Get the user profile from OIDC token.
*
* @return \Hybridauth\User\Profile
*/
public function getUserProfileFromOIDCToken()
{
$accessToken = $this->getStoredData('access_token');
$kid = $this->getKidFromOLDCToken($accessToken);
if (!$kid) {
return null;
}
$clientId = $this->config->filter('keys')->get('id') ?: $this->config->filter('keys')->get('key');
if (!$clientId) {
throw new InvalidApplicationCredentialsException(
'Missing parameter id: your client id is required to generate the JWS token.'
);
}
$response = $this->apiRequest('https://www.facebook.com/.well-known/oauth/openid/jwks/');
$publicKeys = new Data\Collection($response);
if (!$publicKeys->exists('keys') || !$publicKeys->get('keys')) {
throw new UnexpectedApiResponseException('Provider API returned an unexpected response.');
}
$filteredKeys = array_filter($publicKeys->get('keys'), function ($k) use ($kid) {
return $k->kid === $kid;
});
if (empty($filteredKeys)) {
throw new UnexpectedValueException('Unable to find key with kid: ' . $kid);
}
$jwk = array_shift($filteredKeys);
$keyData = [
'e' => new BigInteger(base64_decode($jwk->e), 256),
'n' => new BigInteger(base64_decode(strtr($jwk->n, '-_', '+/'), true), 256),
];
$pem = (string) PublicKeyLoader::load($keyData)->withHash('sha1')->withMGFHash('sha1');
$payload = JWT::decode($accessToken, new Key($pem, $jwk->alg));
$data = new Data\Collection($payload);
if ($data->get('iss') !== 'https://www.facebook.com') {
throw new UnexpectedValueException('Invalid issuer');
} elseif ($data->get('aud') !== $clientId) {
throw new UnexpectedValueException('Invalid audience');
}
$userProfile = new User\Profile();
$userProfile->identifier = $data->get('sub');
$userProfile->email = $data->get('email');
$userProfile->firstName = $data->get('given_name');
$userProfile->lastName = $data->get('family_name');
$userProfile->displayName = $userProfile->firstName.' '.$userProfile->lastName;
$userProfile->photoURL = $data->get('picture');
// Fallback for profile URL in case Facebook does not provide "pretty" link with username (if user set it).
if (empty($userProfile->profileURL)) {
$userProfile->profileURL = $this->getProfileUrl($userProfile->identifier);
}
return $userProfile;
}
/**
* Retrieve the user region.
*
@ -434,6 +523,29 @@ class Facebook extends OAuth2
return $userActivity;
}
/**
* Get key ID from OIDC token.
*
* @param string $accessToken
* @return string|null
*/
private function getKidFromOLDCToken(string $accessToken): ?string
{
$segments = explode('.', $accessToken);
if (count($segments) !== 3) {
return null;
}
$payload = json_decode(base64_decode($segments[0] ?? ''));
if (!is_object($payload) || $payload?->kid === null) {
return null;
}
return $payload->kid;
}
/**
* Get profile URL.
*

View file

@ -42,6 +42,21 @@ class GitHub extends OAuth2
*/
protected $apiDocumentation = 'https://developer.github.com/v3/oauth/';
/**
* {@inheritdoc}
*/
protected function initialize()
{
parent::initialize();
if ($this->isRefreshTokenAvailable()) {
$this->tokenRefreshParameters += [
'client_id' => $this->clientId,
'client_secret' => $this->clientSecret
];
}
}
/**
* {@inheritdoc}
*/

View file

@ -80,13 +80,14 @@ class Google extends OAuth2
parent::initialize();
$this->AuthorizeUrlParameters += [
'access_type' => 'offline'
'access_type' => 'offline',
'prompt' => 'consent'
];
if ($this->isRefreshTokenAvailable()) {
$this->tokenRefreshParameters += [
'client_id' => $this->clientId,
'client_secret' => $this->clientSecret
'client_secret' => $this->clientSecret,
];
}
}

View file

@ -181,7 +181,7 @@ class Instagram extends OAuth2
* @throws \Hybridauth\Exception\InvalidAccessTokenException
* @throws \Hybridauth\Exception\UnexpectedApiResponseException
*/
public function getUserMedia($limit = 12, $pageId = null, array $fields = null)
public function getUserMedia($limit = 12, $pageId = null, ?array $fields = null)
{
if (empty($fields)) {
$fields = [
@ -227,7 +227,7 @@ class Instagram extends OAuth2
* @throws \Hybridauth\Exception\InvalidAccessTokenException
* @throws \Hybridauth\Exception\UnexpectedApiResponseException
*/
public function getMedia($mediaId, array $fields = null)
public function getMedia($mediaId, ?array $fields = null)
{
if (empty($fields)) {
$fields = [

View file

@ -66,7 +66,21 @@ class Keycloak extends OAuth2
$this->authorizeUrl = $this->apiBaseUrl . 'auth';
$this->accessTokenUrl = $this->apiBaseUrl . 'token';
}
/**
* {@inheritdoc}
*/
protected function initialize()
{
parent::initialize();
if ($this->isRefreshTokenAvailable()) {
$this->tokenRefreshParameters += [
'client_id' => $this->clientId,
'client_secret' => $this->clientSecret,
];
}
}
/**
@ -91,6 +105,12 @@ class Keycloak extends OAuth2
$userProfile->lastName = $data->get('family_name');
$userProfile->emailVerified = $data->get('email_verified');
// Collect organization claim if provided in the IDToken
if ($data->exists('organization')) {
$kc_orgs = array_keys((array) $data->get('organization'));
$userProfile->data['organization'] = array_shift($kc_orgs); //Get the first key
}
return $userProfile;
}
}

View file

@ -46,7 +46,7 @@ class MicrosoftGraph extends OAuth2
/**
* {@inheritdoc}
*/
protected $scope = 'openid user.read contacts.read';
protected $scope = 'openid user.read contacts.read offline_access';
/**
* {@inheritdoc}
@ -75,6 +75,10 @@ class MicrosoftGraph extends OAuth2
{
parent::initialize();
$this->AuthorizeUrlParameters += [
'prompt' => 'consent',
];
$tenant = $this->config->get('tenant');
if (!empty($tenant)) {
$adjustedEndpoints = [
@ -84,6 +88,13 @@ class MicrosoftGraph extends OAuth2
$this->setApiEndpoints($adjustedEndpoints);
}
if ($this->isRefreshTokenAvailable()) {
$this->tokenRefreshParameters += [
'client_id' => $this->clientId,
'client_secret' => $this->clientSecret,
];
}
}
/**

View file

@ -20,12 +20,12 @@ class Pinterest extends OAuth2
/**
* {@inheritdoc}
*/
protected $scope = 'read_public';
protected $scope = 'user_accounts:read';
/**
* {@inheritdoc}
*/
protected $apiBaseUrl = 'https://api.pinterest.com/v1/';
protected $apiBaseUrl = 'https://api.pinterest.com/v5/';
/**
* {@inheritdoc}
@ -35,19 +35,19 @@ class Pinterest extends OAuth2
/**
* {@inheritdoc}
*/
protected $accessTokenUrl = 'https://api.pinterest.com/v1/oauth/token';
protected $accessTokenUrl = 'https://api.pinterest.com/v5/oauth/token';
/**
* {@inheritdoc}
*/
protected $apiDocumentation = 'https://developers.pinterest.com/docs/api/overview/';
protected $apiDocumentation = 'https://developers.pinterest.com/docs/api/v5/';
/**
* {@inheritdoc}
*/
public function getUserProfile()
{
$response = $this->apiRequest('me');
$response = $this->apiRequest('user_account');
$data = new Data\Collection($response);

View file

@ -58,6 +58,11 @@ class QQ extends OAuth2
*/
protected $apiDocumentation = ''; // Not available
/**
* {@inheritdoc}
*/
protected $responseDataFormat = 'json';
/**
* {@inheritdoc}
*/
@ -73,7 +78,8 @@ class QQ extends OAuth2
}
$this->apiRequestParameters = [
'access_token' => $this->getStoredData('access_token')
'access_token' => $this->getStoredData('access_token'),
'fmt' => $this->responseDataFormat
];
$this->apiRequestHeaders = [];
@ -87,18 +93,12 @@ class QQ extends OAuth2
$collection = parent::validateAccessTokenExchange($response);
$resp = $this->apiRequest($this->accessTokenInfoUrl);
$resp = key($resp);
$len = strlen($resp);
$res = substr($resp, 10, $len - 14);
$response = (new Data\Parser())->parse($res);
if (!isset($response->openid)) {
if (!isset($resp->openid)) {
throw new UnexpectedApiResponseException('Provider API returned an unexpected response.');
}
$this->storeData('openid', $response->openid);
$this->storeData('openid', $resp->openid);
return $collection;
}
@ -113,7 +113,7 @@ class QQ extends OAuth2
$userRequestParameters = [
'oauth_consumer_key' => $this->clientId,
'openid' => $openid,
'format' => 'json'
'format' => $this>responseDataFormat
];
$response = $this->apiRequest($this->accessUserInfo, 'GET', $userRequestParameters);

View file

@ -88,7 +88,7 @@ class Telegram extends AbstractAdapter implements AdapterInterface
public function authenticate()
{
$this->logger->info(sprintf('%s::authenticate()', get_class($this)));
if (!filter_input(INPUT_GET, 'hash')) {
if (!$this->filterInput(INPUT_GET, 'hash')) {
$this->authenticateBegin();
} else {
$this->authenticateCheckError();
@ -209,13 +209,13 @@ HTML
protected function parseAuthData()
{
return [
'id' => filter_input(INPUT_GET, 'id'),
'first_name' => filter_input(INPUT_GET, 'first_name'),
'last_name' => filter_input(INPUT_GET, 'last_name'),
'username' => filter_input(INPUT_GET, 'username'),
'photo_url' => filter_input(INPUT_GET, 'photo_url'),
'auth_date' => filter_input(INPUT_GET, 'auth_date'),
'hash' => filter_input(INPUT_GET, 'hash'),
'id' => $this->filterInput(INPUT_GET, 'id'),
'first_name' => $this->filterInput(INPUT_GET, 'first_name'),
'last_name' => $this->filterInput(INPUT_GET, 'last_name'),
'username' => $this->filterInput(INPUT_GET, 'username'),
'photo_url' => $this->filterInput(INPUT_GET, 'photo_url'),
'auth_date' => $this->filterInput(INPUT_GET, 'auth_date'),
'hash' => $this->filterInput(INPUT_GET, 'hash'),
];
}
}

View file

@ -0,0 +1,38 @@
<?php
namespace Hybridauth\Storage;
class StorageImpl implements StorageInterface {
private $data;
public function __construct()
{
$this->data = [];
}
public function get($key) {
return $this->data[$key] ?? null;
}
public function set($key, $value) {
$this->data[$key] = $value;
}
public function delete($key) {
if (array_key_exists($key, $this->data)){
unset($this->data[$key]);
}
}
public function deleteMatch($key) {
foreach ($this->data as $k => $v) {
if (strstr($k, $key)) {
unset($this->data[$k]);
}
}
}
public function clear() {
$this->data = [];
}
}

View file

@ -3,44 +3,54 @@
namespace HybridauthTest\Hybridauth\Storage;
use Hybridauth\Storage\Session;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Covers;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;
session_start(); // they will hate me for this..
class SessionTest extends \PHPUnit\Framework\TestCase
#[CoversClass(Session::class)]
class SessionTest extends TestCase
{
public function some_random_session_data()
/**
* @return array<string, array<int, mixed>>
*/
public static function some_random_session_data(): array
{
return [
['foo', 'bar'],
[1234, 'bar'],
['foo', 1234],
'string values' => ['foo', 'bar'],
'numeric key' => [1234, 'bar'],
'numeric value' => ['foo', 1234],
['Bonjour', '안녕하세요'],
['ஹலோ', 'Γεια σας'],
'international strings' => ['Bonjour', '안녕하세요'],
'more international strings' => ['ஹலோ', 'Γεια σας'],
['array', [1, 2, 3]],
['string', json_encode($this)],
['object', $this],
'array value' => ['array', [1, 2, 3]],
'json string' => ['string', json_encode(new \stdClass())],
'object value' => ['object', new \stdClass()],
['provider.token.request_token', '9DYPEJ&qhvhP3eJ!'],
['provider.token.oauth_token', '80359084-clg1DEtxQF3wstTcyUdHF3wsdHM'],
['provider.token.oauth_token_secret', 'qiHTi1znz6qiH3tTcyUdHnz6qiH3tTcyUdH3xW3wsDvV08e'],
'request token' => ['provider.token.request_token', '9DYPEJ&qhvhP3eJ!'],
'oauth token' => ['provider.token.oauth_token', '80359084-clg1DEtxQF3wstTcyUdHF3wsdHM'],
'oauth token secret' => ['provider.token.oauth_token_secret', 'qiHTi1znz6qiH3tTcyUdHnz6qiH3tTcyUdH3xW3wsDvV08e']
];
}
public function test_instance_of()
#[Test]
public function test_instance_of(): void
{
$storage = new Session();
$this->assertInstanceOf('\\Hybridauth\\Storage\\StorageInterface', $storage);
}
/**
* @dataProvider some_random_session_data
* @covers Session::get
* @covers Session::set
*/
public function test_set_and_get_data($key, $value)
#[Test]
/** @dataProvider some_random_session_data */
#[DataProvider('some_random_session_data')]
#[Covers([Session::class, 'get'])]
#[Covers([Session::class, 'set'])]
public function testSetAndGetData($key, $value): void
{
$storage = new Session();
@ -51,11 +61,11 @@ class SessionTest extends \PHPUnit\Framework\TestCase
$this->assertEquals($value, $data);
}
/**
* @dataProvider some_random_session_data
* @covers Session::delete
*/
public function test_delete_data($key, $value)
#[Test]
/** @dataProvider some_random_session_data */
#[DataProvider('some_random_session_data')]
#[Covers([Session::class, 'delete'])]
public function testDeleteData($key, $value): void
{
$storage = new Session();
@ -68,57 +78,52 @@ class SessionTest extends \PHPUnit\Framework\TestCase
$this->assertNull($data);
}
/**
* @dataProvider some_random_session_data
* @covers Session::clear
*/
public function test_clear_data($key, $value)
#[Test]
/** @dataProvider some_random_session_data */
#[DataProvider('some_random_session_data')]
#[Covers([Session::class, 'clear'])]
public function testClearData($key, $value): void
{
$storage = new Session();
$storage->set($key, $value);
$storage->clear();
$data = $storage->get($key);
$this->assertNull($data);
}
/**
* @covers Session::clear
*/
public function test_clear_data_bulk()
#[Test]
#[Covers([Session::class, 'clear'])]
public function testClearDataBulk(): void
{
$storage = new Session();
$testData = self::some_random_session_data();
foreach ((array)$this->some_random_session_data() as $key => $value) {
// Set all test data
foreach ($testData as $testCase) {
list($key, $value) = $testCase;
$storage->set($key, $value);
}
$storage->clear();
foreach ((array)$this->some_random_session_data() as $key => $value) {
// Check each key is now null
foreach ($testData as $testCase) {
list($key, $value) = $testCase;
$data = $storage->get($key);
$this->assertNull($data);
$this->assertNull($data, "Data for key '$key' should be null after clear()");
}
}
/**
* @dataProvider some_random_session_data
* @covers Session::deleteMatch
*/
public function test_delete_match_data($key, $value)
#[Test]
#[DataProvider('some_random_session_data')]
/** @dataProvider some_random_session_data */
#[Covers([Session::class, 'deleteMatch'])]
public function testDeleteMatchData($key, $value): void
{
$storage = new Session();
$storage->set($key, $value);
$storage->deleteMatch('provider.token.');
$data = $storage->get('provider.token.request_token');
$this->assertNull($data);
}
}

View file

@ -3,6 +3,7 @@
namespace HybridauthTest\Hybridauth\User;
use Hybridauth\User\Activity;
use ReflectionClass;
class ActivityTest extends \PHPUnit\Framework\TestCase
{
@ -15,29 +16,33 @@ class ActivityTest extends \PHPUnit\Framework\TestCase
public function test_has_attributes()
{
$activity_class = '\\Hybridauth\\User\\Activity';
$reflection = new ReflectionClass('\\Hybridauth\\User\\Activity');
$this->assertClassHasAttribute('id', $activity_class);
$this->assertClassHasAttribute('date', $activity_class);
$this->assertClassHasAttribute('text', $activity_class);
$this->assertClassHasAttribute('user', $activity_class);
$this->assertTrue($reflection->hasProperty('id'));
$this->assertTrue($reflection->hasProperty('date'));
$this->assertTrue($reflection->hasProperty('text'));
$this->assertTrue($reflection->hasProperty('user'));
}
public function test_set_attributes()
{
$activity = new Activity();
$activity->id = true;
$activity->date = true;
$activity->text = true;
$activity->user = true;
$activity->id = 'activity-id';
$activity->date = '2023-01-01';
$activity->text = 'Example activity';
$activity->user = 'user-info';
$this->assertSame('activity-id', $activity->id);
$this->assertSame('2023-01-01', $activity->date);
$this->assertSame('Example activity', $activity->text);
$this->assertSame('user-info', $activity->user);
}
/**
* @expectedException \Hybridauth\Exception\UnexpectedValueException
*/
public function test_property_overloading()
{
$this->expectException(\Hybridauth\Exception\UnexpectedValueException::class);
$activity = new Activity();
$activity->slug = true;
}

View file

@ -3,6 +3,7 @@
namespace HybridauthTest\Hybridauth\User;
use Hybridauth\User\Contact;
use ReflectionClass;
class ContactTest extends \PHPUnit\Framework\TestCase
{
@ -15,35 +16,42 @@ class ContactTest extends \PHPUnit\Framework\TestCase
public function test_has_attributes()
{
$contact_class = '\\Hybridauth\\User\\Contact';
$reflection = new ReflectionClass('\\Hybridauth\\User\\Contact');
$this->assertClassHasAttribute('identifier', $contact_class);
$this->assertClassHasAttribute('webSiteURL', $contact_class);
$this->assertClassHasAttribute('profileURL', $contact_class);
$this->assertClassHasAttribute('photoURL', $contact_class);
$this->assertClassHasAttribute('displayName', $contact_class);
$this->assertClassHasAttribute('description', $contact_class);
$this->assertClassHasAttribute('email', $contact_class);
$this->assertTrue($reflection->hasProperty('identifier'));
$this->assertTrue($reflection->hasProperty('webSiteURL'));
$this->assertTrue($reflection->hasProperty('profileURL'));
$this->assertTrue($reflection->hasProperty('photoURL'));
$this->assertTrue($reflection->hasProperty('displayName'));
$this->assertTrue($reflection->hasProperty('description'));
$this->assertTrue($reflection->hasProperty('email'));
}
public function test_set_attributes()
{
$contact = new Contact();
$contact->identifier = true;
$contact->webSiteURL = true;
$contact->profileURL = true;
$contact->photoURL = true;
$contact->displayName = true;
$contact->description = true;
$contact->email = true;
$contact->identifier = 'contact-id';
$contact->webSiteURL = 'https://example.com';
$contact->profileURL = 'https://profile.example.com';
$contact->photoURL = 'https://photos.example.com/pic.jpg';
$contact->displayName = 'John Doe';
$contact->description = 'Contact description';
$contact->email = 'contact@example.com';
$this->assertSame('contact-id', $contact->identifier);
$this->assertSame('https://example.com', $contact->webSiteURL);
$this->assertSame('https://profile.example.com', $contact->profileURL);
$this->assertSame('https://photos.example.com/pic.jpg', $contact->photoURL);
$this->assertSame('John Doe', $contact->displayName);
$this->assertSame('Contact description', $contact->description);
$this->assertSame('contact@example.com', $contact->email);
}
/**
* @expectedException \Hybridauth\Exception\UnexpectedValueException
*/
public function test_property_overloading()
{
$this->expectException(\Hybridauth\Exception\UnexpectedValueException::class);
$contact = new Contact();
$contact->slug = true;
}

View file

@ -3,6 +3,7 @@
namespace HybridauthTest\Hybridauth\User;
use Hybridauth\User\Profile;
use ReflectionClass;
class ProfileTest extends \PHPUnit\Framework\TestCase
{
@ -15,65 +16,87 @@ class ProfileTest extends \PHPUnit\Framework\TestCase
public function test_has_attributes()
{
$profile_class = '\\Hybridauth\\User\\Profile';
$reflection = new ReflectionClass('\\Hybridauth\\User\\Profile');
$this->assertClassHasAttribute('identifier', $profile_class);
$this->assertClassHasAttribute('webSiteURL', $profile_class);
$this->assertClassHasAttribute('profileURL', $profile_class);
$this->assertClassHasAttribute('photoURL', $profile_class);
$this->assertClassHasAttribute('displayName', $profile_class);
$this->assertClassHasAttribute('firstName', $profile_class);
$this->assertClassHasAttribute('lastName', $profile_class);
$this->assertClassHasAttribute('description', $profile_class);
$this->assertClassHasAttribute('gender', $profile_class);
$this->assertClassHasAttribute('language', $profile_class);
$this->assertClassHasAttribute('age', $profile_class);
$this->assertClassHasAttribute('birthDay', $profile_class);
$this->assertClassHasAttribute('birthMonth', $profile_class);
$this->assertClassHasAttribute('birthYear', $profile_class);
$this->assertClassHasAttribute('email', $profile_class);
$this->assertClassHasAttribute('emailVerified', $profile_class);
$this->assertClassHasAttribute('phone', $profile_class);
$this->assertClassHasAttribute('address', $profile_class);
$this->assertClassHasAttribute('country', $profile_class);
$this->assertClassHasAttribute('region', $profile_class);
$this->assertClassHasAttribute('city', $profile_class);
$this->assertClassHasAttribute('zip', $profile_class);
$this->assertTrue($reflection->hasProperty('identifier'));
$this->assertTrue($reflection->hasProperty('webSiteURL'));
$this->assertTrue($reflection->hasProperty('profileURL'));
$this->assertTrue($reflection->hasProperty('photoURL'));
$this->assertTrue($reflection->hasProperty('displayName'));
$this->assertTrue($reflection->hasProperty('firstName'));
$this->assertTrue($reflection->hasProperty('lastName'));
$this->assertTrue($reflection->hasProperty('description'));
$this->assertTrue($reflection->hasProperty('gender'));
$this->assertTrue($reflection->hasProperty('language'));
$this->assertTrue($reflection->hasProperty('age'));
$this->assertTrue($reflection->hasProperty('birthDay'));
$this->assertTrue($reflection->hasProperty('birthMonth'));
$this->assertTrue($reflection->hasProperty('birthYear'));
$this->assertTrue($reflection->hasProperty('email'));
$this->assertTrue($reflection->hasProperty('emailVerified'));
$this->assertTrue($reflection->hasProperty('phone'));
$this->assertTrue($reflection->hasProperty('address'));
$this->assertTrue($reflection->hasProperty('country'));
$this->assertTrue($reflection->hasProperty('region'));
$this->assertTrue($reflection->hasProperty('city'));
$this->assertTrue($reflection->hasProperty('zip'));
}
public function test_set_attributes()
{
$profile = new Profile();
$profile->identifier = true;
$profile->webSiteURL = true;
$profile->profileURL = true;
$profile->photoURL = true;
$profile->displayName = true;
$profile->firstName = true;
$profile->lastName = true;
$profile->description = true;
$profile->gender = true;
$profile->language = true;
$profile->age = true;
$profile->birthDay = true;
$profile->birthMonth = true;
$profile->birthYear = true;
$profile->email = true;
$profile->identifier = 'profile-id';
$profile->webSiteURL = 'https://example.com';
$profile->profileURL = 'https://profile.example.com';
$profile->photoURL = 'https://photos.example.com/pic.jpg';
$profile->displayName = 'John Doe';
$profile->firstName = 'John';
$profile->lastName = 'Doe';
$profile->description = 'Profile description';
$profile->gender = 'male';
$profile->language = 'en_US';
$profile->age = 30;
$profile->birthDay = 1;
$profile->birthMonth = 1;
$profile->birthYear = 1990;
$profile->email = 'profile@example.com';
$profile->emailVerified = true;
$profile->phone = true;
$profile->address = true;
$profile->country = true;
$profile->region = true;
$profile->city = true;
$profile->zip = true;
$profile->phone = '+1234567890';
$profile->address = '123 Main St';
$profile->country = 'USA';
$profile->region = 'CA';
$profile->city = 'San Francisco';
$profile->zip = '94105';
$this->assertSame('profile-id', $profile->identifier);
$this->assertSame('https://example.com', $profile->webSiteURL);
$this->assertSame('https://profile.example.com', $profile->profileURL);
$this->assertSame('https://photos.example.com/pic.jpg', $profile->photoURL);
$this->assertSame('John Doe', $profile->displayName);
$this->assertSame('John', $profile->firstName);
$this->assertSame('Doe', $profile->lastName);
$this->assertSame('Profile description', $profile->description);
$this->assertSame('male', $profile->gender);
$this->assertSame('en_US', $profile->language);
$this->assertSame(30, $profile->age);
$this->assertSame(1, $profile->birthDay);
$this->assertSame(1, $profile->birthMonth);
$this->assertSame(1990, $profile->birthYear);
$this->assertSame('profile@example.com', $profile->email);
$this->assertTrue($profile->emailVerified);
$this->assertSame('+1234567890', $profile->phone);
$this->assertSame('123 Main St', $profile->address);
$this->assertSame('USA', $profile->country);
$this->assertSame('CA', $profile->region);
$this->assertSame('San Francisco', $profile->city);
$this->assertSame('94105', $profile->zip);
}
/**
* @expectedException \Hybridauth\Exception\UnexpectedValueException
*/
public function test_property_overloading()
{
$this->expectException(\Hybridauth\Exception\UnexpectedValueException::class);
$profile = new Profile();
$profile->slug = true;
}

View file

@ -173,7 +173,7 @@ class PayPalModel
foreach ($param as $k => $v) {
if ($v instanceof PayPalModel) {
$ret[$k] = $v->toArray();
} else if (sizeof($v) <= 0 && is_array($v)) {
} else if (is_array($v) && sizeof($v) <= 0) {
$ret[$k] = array();
} else if (is_array($v)) {
$ret[$k] = $this->_convertToArray($v);

View file

@ -1,15 +0,0 @@
root = true
[*]
charset = utf-8
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2

View file

@ -20,25 +20,26 @@
- Multipart/alternative emails for mail clients that do not read HTML email
- Add attachments, including inline
- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings
- SMTP authentication with LOGIN, PLAIN, CRAM-MD5, and XOAUTH2 mechanisms over SMTPS and SMTP+STARTTLS transports
- Full UTF-8 support when using servers that support `SMTPUTF8`.
- Support for iCal events in multiparts and attachments
- SMTP authentication with `LOGIN`, `PLAIN`, `CRAM-MD5`, and `XOAUTH2` mechanisms over SMTPS and SMTP+STARTTLS transports
- Validates email addresses automatically
- Protects against header injection attacks
- Error messages in over 50 languages!
- DKIM and S/MIME signing support
- Compatible with PHP 5.5 and later, including PHP 8.2
- Compatible with PHP 5.5 and later, including PHP 8.4
- Namespaced to prevent name clashes
- Much more!
## Why you might need it
Many PHP developers need to send email from their code. The only PHP function that supports this directly is [`mail()`](https://www.php.net/manual/en/function.mail.php). However, it does not provide any assistance for making use of popular features such as encryption, authentication, HTML messages, and attachments.
Many PHP developers need to send email from their code. The only PHP function that supports this directly is [`mail()`](https://www.php.net/manual/en/function.mail.php). However, it does not provide any assistance for making use of popular features such as authentication, HTML messages, and attachments.
Formatting email correctly is surprisingly difficult. There are myriad overlapping (and conflicting) standards, requiring tight adherence to horribly complicated formatting and encoding rules the vast majority of code that you'll find online that uses the `mail()` function directly is just plain wrong, if not unsafe!
The PHP `mail()` function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD, and macOS platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP client allows email sending on all platforms without needing a local mail server. Be aware though, that the `mail()` function should be avoided when possible; it's both faster and [safer](https://exploitbox.io/paper/Pwning-PHP-Mail-Function-For-Fun-And-RCE.html) to use SMTP to localhost.
*Please* don't be tempted to do it yourself if you don't use PHPMailer, there are many other excellent libraries that
you should look at before rolling your own. Try [SwiftMailer](https://swiftmailer.symfony.com/)
, [Laminas/Mail](https://docs.laminas.dev/laminas-mail/), [ZetaComponents](https://github.com/zetacomponents/Mail), etc.
you should look at before rolling your own. Try [Symfony Mailer](https://symfony.com/doc/current/mailer.html), [Laminas/Mail](https://docs.laminas.dev/laminas-mail/), [ZetaComponents](https://github.com/zetacomponents/Mail), etc.
## License
This software is distributed under the [LGPL 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read [LICENSE](https://github.com/PHPMailer/PHPMailer/blob/master/LICENSE) for information on the software availability and distribution.
@ -47,7 +48,7 @@ This software is distributed under the [LGPL 2.1](https://www.gnu.org/licenses/o
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
```json
"phpmailer/phpmailer": "^6.9.2"
"phpmailer/phpmailer": "^6.10.0"
```
or run
@ -74,7 +75,7 @@ require 'path/to/PHPMailer/src/PHPMailer.php';
require 'path/to/PHPMailer/src/SMTP.php';
```
If you're not using the `SMTP` class explicitly (you're probably not), you don't need a `use` line for the SMTP class. Even if you're not using exceptions, you do still need to load the `Exception` class as it is used internally.
If you're not using the `SMTP` class explicitly (you're probably not), you don't need a `use` line for it. Even if you're not using exceptions, you do still need to load the `Exception` class as it is used internally.
## Legacy versions
PHPMailer 5.2 (which is compatible with PHP 5.0 — 7.0) is no longer supported, even for security updates. You will find the latest version of 5.2 in the [5.2-stable branch](https://github.com/PHPMailer/PHPMailer/tree/5.2-stable). If you're using PHP 5.5 or later (which you should be), switch to the 6.x releases.
@ -95,7 +96,7 @@ use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
//Load Composer's autoloader
//Load Composer's autoloader (created by composer, not included with PHPMailer)
require 'vendor/autoload.php';
//Create an instance; passing `true` enables exceptions

48
vendor/phpmailer/phpmailer/SMTPUTF8.md vendored Normal file
View file

@ -0,0 +1,48 @@
# A short history of UTF-8 in email
## Background
For most of its existence, SMTP has been a 7-bit channel, only supporting US-ASCII characters. This has been a problem for many languages, especially those that use non-Latin scripts, and has led to the development of various workarounds.
The first major improvement, introduced in 1994 in [RFC 1652](https://www.rfc-editor.org/rfc/rfc1652) and extended in 2011 in [RFC 6152](https://www.rfc-editor.org/rfc/rfc6152), was the addition of the `8BITMIME` SMTP extension, which allowed raw 8-bit data to be included in message bodies sent over SMTP.
This allowed the message *contents* to contain 8-bit data, including things like UTF-8 text, even though the SMTP protocol itself was still firmly 7-bit. This worked by having the server switch to 8-bit after the headers, and then back to 7-bit after the completion of a `DATA` command.
From 1996, messages could support [RFC 2047 encoding](https://www.rfc-editor.org/rfc/rfc2047), which permitted inserting characters from any character set into header *values* (but not names), but only by encoding them in somewhat unreadable ways to allow them to survive passage through a 7-bit channel. An example with a subject of "Schrödinger's cat" would be:
```
Subject: =?utf-8?Q=Schr=C3=B6dinger=92s_Cat?=
```
Here the accented `ö` is encoded as `=C3=B6`, which is the UTF-8 encoding of the 2-byte character, and the whole thing is wrapped in `=?utf-8?Q?` to indicate that it uses the UTF-8 charset and `quoted-printable` encoding. This is a bit of a hack, and not very human-friendly, but it works.
Similarly, 8-bit message bodies could be encoded using the same `quoted-printable` and `base64` content transfer encoding (CTE) schemes, which preserved the 8-bit content while encoding it in a format that could survive transmission through a 7-bit channel.
Domain names were originally also stuck in a 7-bit world, actually even more constrained to only a subset of the US-ASCII character set. But of course, many people want to have domains in their own language/script. Internationalized domain name (IDN) permitted this, using yet another complex encoding scheme called punycode, defined for domain names in 2003 in [RFC 3492](https://www.rfc-editor.org/rfc/rfc3492). This finally allowed the domain part (after the `@`) of email addresses to contain UTF-8, though it was actually an illusion preserved by email client applications. For example, an address of
`user@café.example.com` translates to
`user@xn--caf-dma.example.com` in punycode, rendering it mostly unreadable, but 7-bit friendly, and remaining compatible with email clients that don't know about IDN.
The one remaining part of email that could not handle UTF-8 is the local part of email addresses (the part before the `@`).
I've only mentioned UTF-8 here, but most of these approaches also allowed other character sets that were popular, such as [the ISO-8859 family](https://en.wikipedia.org/wiki/ISO/IEC_8859). However, UTF-8 solves so many problems that these other character sets are gradually falling out of favour, as UTF-8 can support all languages.
This patchwork of overlapping approaches has served us well, but we have to admit that it's a mess.
## SMTPUTF8
`SMTPUTF8` is another SMTP extension, defined in [RFC 6531](https://www.rfc-editor.org/rfc/rfc6531) in 2012. This essentially solves the whole problem, allowing the entire SMTP conversation — commands, headers, and message bodies — to be sent in raw, unencoded UTF-8.
But there's a problem with this approach: adoption. If you send a UTF-8 message to a recipient whose mail server doesn't support this format, the sender has to somehow downgrade the message to make it survive a transition to 7-bit. This is a hard problem to solve, especially since there is no way to make a 7-bit system support UTF-8 in the local parts of addresses. This downgrade problem is what held up the adoption of `SMTPUTF8` in PHPMailer for many years, but in that time the *de facto* approach has become to simply fail in that situation, and tell the recipient it's time they upgraded their mail server 😅.
The vast majority of large email providers (gmail, Yahoo, Microsoft, etc), mail servers (postfix, exim, IIS, etc), and mail clients (Apple Mail, Outlook, Thunderbird, etc) now all support SMTPUTF8, so the need for backward compatibility is no longer what it was.
## SMTPUTF8 in PHPMailer
Several other PHP email libraries have implemented a halfway solution to `SMTPUTF8`, adding only the ability to support UTF-8 in email addresses, not elsewhere in the protocol. I wanted PHPMailer to do it "the right way", and this has taken much longer. PHPMailer now supports UTF-8 everywhere, and does not need to use transfer or header encodings for UTF-8 text when connecting to an `SMTPUTF8`-capable mail server.
This support is handled automatically: if you add an email address that requires UTF-8, PHPMailer will use UTF-8 for everything. If not, it will fall back to 7-bit and encode the message as necessary.
The one place you will need to be careful is in the selection of the address validator. By default, PHPMailer uses PHP's built-in `filter_var` validator, which does not allow UTF-8 email addresses. When PHPMailer spots that you have submitted a UTF-8 address, but have not altered the default validator, it will automatically switch to using a UTF-8-compatible validator. As soon as you do this, any SMTP connection you make will *require* that the server you connect to supports `SMTPUTF8`. You can select this validator explicitly by setting `PHPMailer::$validator = 'eai'` (an acronym for Email Address Internationalization).
### Postfix gotcha
Postfix has supported `SMTPUTF8` for a long time, but it has a peculiarity that it does not always advertise that it does so. However, rather surprisingly, if you use UTF-8 in the conversation, it will work anyway.

View file

@ -1 +1 @@
6.9.3
6.10.0

View file

@ -3,25 +3,32 @@
/**
* Portuguese (European) PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Jonadabe <jonadabe@hotmail.com>
* @author João Vieira <mail@joaovieira.eu>
*/
$PHPMAILER_LANG['authenticate'] = 'Erro do SMTP: Não foi possível realizar a autenticação.';
$PHPMAILER_LANG['connect_host'] = 'Erro do SMTP: Não foi possível realizar ligação com o servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Erro do SMTP: Os dados foram rejeitados.';
$PHPMAILER_LANG['empty_message'] = 'A mensagem no e-mail está vazia.';
$PHPMAILER_LANG['authenticate'] = 'Erro SMTP: Falha na autenticação.';
$PHPMAILER_LANG['buggy_php'] = 'A sua versão do PHP tem um bug que pode causar mensagens corrompidas. Para resolver, utilize o envio por SMTP, desative a opção mail.add_x_header no ficheiro php.ini, mude para MacOS ou Linux, ou atualize o PHP para a versão 7.0.17+ ou 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Erro SMTP: Não foi possível ligar ao servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Erro SMTP: Dados não aceites.';
$PHPMAILER_LANG['empty_message'] = 'A mensagem de e-mail está vazia.';
$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
$PHPMAILER_LANG['file_access'] = 'Não foi possível aceder o ficheiro: ';
$PHPMAILER_LANG['file_open'] = 'Abertura do ficheiro: Não foi possível abrir o ficheiro: ';
$PHPMAILER_LANG['from_failed'] = 'Ocorreram falhas nos endereços dos seguintes remententes: ';
$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.';
$PHPMAILER_LANG['invalid_address'] = 'Não foi enviado nenhum e-mail para o endereço de e-mail inválido: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
$PHPMAILER_LANG['provide_address'] = 'Tem de fornecer pelo menos um endereço como destinatário do e-mail.';
$PHPMAILER_LANG['recipients_failed'] = 'Erro do SMTP: O endereço do seguinte destinatário falhou: ';
$PHPMAILER_LANG['signing'] = 'Erro ao assinar: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';
$PHPMAILER_LANG['extension_missing'] = 'Extensão em falta: ';
$PHPMAILER_LANG['file_access'] = 'Não foi possível aceder ao ficheiro: ';
$PHPMAILER_LANG['file_open'] = 'Erro ao abrir o ficheiro: ';
$PHPMAILER_LANG['from_failed'] = 'O envio falhou para o seguinte endereço do remetente: ';
$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.';
$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: ';
$PHPMAILER_LANG['invalid_header'] = 'Nome ou valor do cabeçalho inválido.';
$PHPMAILER_LANG['invalid_hostentry'] = 'Entrada de host inválida: ';
$PHPMAILER_LANG['invalid_host'] = 'Host inválido: ';
$PHPMAILER_LANG['mailer_not_supported'] = 'O cliente de e-mail não é suportado.';
$PHPMAILER_LANG['provide_address'] = 'Deve fornecer pelo menos um endereço de destinatário.';
$PHPMAILER_LANG['recipients_failed'] = 'Erro SMTP: Falha no envio para os seguintes destinatários: ';
$PHPMAILER_LANG['signing'] = 'Erro ao assinar: ';
$PHPMAILER_LANG['smtp_code'] = 'Código SMTP: ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Informações adicionais SMTP: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Falha na função SMTP connect().';
$PHPMAILER_LANG['smtp_detail'] = 'Detalhes: ';
$PHPMAILER_LANG['smtp_error'] = 'Erro do servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';

View file

@ -580,6 +580,10 @@ class PHPMailer
* May be a callable to inject your own validator, but there are several built-in validators.
* The default validator uses PHP's FILTER_VALIDATE_EMAIL filter_var option.
*
* If CharSet is UTF8, the validator is left at the default value,
* and you send to addresses that use non-ASCII local parts, then
* PHPMailer automatically changes to the 'eai' validator.
*
* @see PHPMailer::validateAddress()
*
* @var string|callable
@ -659,6 +663,14 @@ class PHPMailer
*/
protected $ReplyToQueue = [];
/**
* Whether the need for SMTPUTF8 has been detected. Set by
* preSend() if necessary.
*
* @var bool
*/
public $UseSMTPUTF8 = false;
/**
* The array of attachments.
*
@ -756,7 +768,7 @@ class PHPMailer
*
* @var string
*/
const VERSION = '6.9.3';
const VERSION = '6.10.0';
/**
* Error severity: message only, continue processing.
@ -1110,7 +1122,8 @@ class PHPMailer
$params = [$kind, $address, $name];
//Enqueue addresses with IDN until we know the PHPMailer::$CharSet.
//Domain is assumed to be whatever is after the last @ symbol in the address
if (static::idnSupported() && $this->has8bitChars(substr($address, ++$pos))) {
if ($this->has8bitChars(substr($address, ++$pos))) {
if (static::idnSupported()) {
if ('Reply-To' !== $kind) {
if (!array_key_exists($address, $this->RecipientsQueue)) {
$this->RecipientsQueue[$address] = $params;
@ -1122,7 +1135,9 @@ class PHPMailer
return true;
}
}
//We have an 8-bit domain, but we are missing the necessary extensions to support it
//Or we are already sending to this address
return false;
}
@ -1160,6 +1175,15 @@ class PHPMailer
*/
protected function addAnAddress($kind, $address, $name = '')
{
if (
self::$validator === 'php' &&
((bool) preg_match('/[\x80-\xFF]/', $address))
) {
//The caller has not altered the validator and is sending to an address
//with UTF-8, so assume that they want UTF-8 support instead of failing
$this->CharSet = self::CHARSET_UTF8;
self::$validator = 'eai';
}
if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) {
$error_message = sprintf(
'%s: %s',
@ -1362,6 +1386,7 @@ class PHPMailer
* * `pcre` Use old PCRE implementation;
* * `php` Use PHP built-in FILTER_VALIDATE_EMAIL;
* * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements.
* * `eai` Use a pattern similar to the HTML5 spec for 'email' and to firefox, extended to support EAI (RFC6530).
* * `noregex` Don't use a regex: super fast, really dumb.
* Alternatively you may pass in a callable to inject your own validator, for example:
*
@ -1432,6 +1457,24 @@ class PHPMailer
'[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD',
$address
);
case 'eai':
/*
* This is the pattern used in the HTML5 spec for validation of 'email' type
* form input elements (as above), modified to accept Unicode email addresses.
* This is also more lenient than Firefox' html5 spec, in order to make the regex faster.
* 'eai' is an acronym for Email Address Internationalization.
* This validator is selected automatically if you attempt to use recipient addresses
* that contain Unicode characters in the local part.
*
* @see https://html.spec.whatwg.org/#e-mail-state-(type=email)
* @see https://en.wikipedia.org/wiki/International_email
*/
return (bool) preg_match(
'/^[-\p{L}\p{N}\p{M}.!#$%&\'*+\/=?^_`{|}~]+@[\p{L}\p{N}\p{M}](?:[\p{L}\p{N}\p{M}-]{0,61}' .
'[\p{L}\p{N}\p{M}])?(?:\.[\p{L}\p{N}\p{M}]' .
'(?:[-\p{L}\p{N}\p{M}]{0,61}[\p{L}\p{N}\p{M}])?)*$/usD',
$address
);
case 'php':
default:
return filter_var($address, FILTER_VALIDATE_EMAIL) !== false;
@ -1565,9 +1608,26 @@ class PHPMailer
$this->error_count = 0; //Reset errors
$this->mailHeader = '';
//The code below tries to support full use of Unicode,
//while remaining compatible with legacy SMTP servers to
//the greatest degree possible: If the message uses
//Unicode in the local parts of any addresses, it is sent
//using SMTPUTF8. If not, it it sent using
//punycode-encoded domains and plain SMTP.
if (
static::CHARSET_UTF8 === strtolower($this->CharSet) &&
($this->anyAddressHasUnicodeLocalPart($this->RecipientsQueue) ||
$this->anyAddressHasUnicodeLocalPart(array_keys($this->all_recipients)) ||
$this->anyAddressHasUnicodeLocalPart($this->ReplyToQueue) ||
$this->addressHasUnicodeLocalPart($this->From))
) {
$this->UseSMTPUTF8 = true;
}
//Dequeue recipient and Reply-To addresses with IDN
foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) {
if (!$this->UseSMTPUTF8) {
$params[1] = $this->punyencodeAddress($params[1]);
}
call_user_func_array([$this, 'addAnAddress'], $params);
}
if (count($this->to) + count($this->cc) + count($this->bcc) < 1) {
@ -2058,6 +2118,11 @@ class PHPMailer
if (!$this->smtpConnect($this->SMTPOptions)) {
throw new Exception($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
}
//If we have recipient addresses that need Unicode support,
//but the server doesn't support it, stop here
if ($this->UseSMTPUTF8 && !$this->smtp->getServerExt('SMTPUTF8')) {
throw new Exception($this->lang('no_smtputf8'), self::STOP_CRITICAL);
}
//Sender already validated in preSend()
if ('' === $this->Sender) {
$smtp_from = $this->From;
@ -2159,6 +2224,7 @@ class PHPMailer
$this->smtp->setDebugLevel($this->SMTPDebug);
$this->smtp->setDebugOutput($this->Debugoutput);
$this->smtp->setVerp($this->do_verp);
$this->smtp->setSMTPUTF8($this->UseSMTPUTF8);
if ($this->Host === null) {
$this->Host = 'localhost';
}
@ -2356,6 +2422,7 @@ class PHPMailer
'smtp_detail' => 'Detail: ',
'smtp_error' => 'SMTP server error: ',
'variable_set' => 'Cannot set or reset variable: ',
'no_smtputf8' => 'Server does not support SMTPUTF8 needed to send to Unicode addresses',
];
if (empty($lang_path)) {
//Calculate an absolute path so it can work if CWD is not here
@ -2870,7 +2937,9 @@ class PHPMailer
$bodyEncoding = $this->Encoding;
$bodyCharSet = $this->CharSet;
//Can we do a 7-bit downgrade?
if (static::ENCODING_8BIT === $bodyEncoding && !$this->has8bitChars($this->Body)) {
if ($this->UseSMTPUTF8) {
$bodyEncoding = static::ENCODING_8BIT;
} elseif (static::ENCODING_8BIT === $bodyEncoding && !$this->has8bitChars($this->Body)) {
$bodyEncoding = static::ENCODING_7BIT;
//All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit
$bodyCharSet = static::CHARSET_ASCII;
@ -3507,7 +3576,8 @@ class PHPMailer
/**
* Encode a header value (not including its label) optimally.
* Picks shortest of Q, B, or none. Result includes folding if needed.
* See RFC822 definitions for phrase, comment and text positions.
* See RFC822 definitions for phrase, comment and text positions,
* and RFC2047 for inline encodings.
*
* @param string $str The header value to encode
* @param string $position What context the string will be used in
@ -3516,6 +3586,11 @@ class PHPMailer
*/
public function encodeHeader($str, $position = 'text')
{
$position = strtolower($position);
if ($this->UseSMTPUTF8 && !("comment" === $position)) {
return trim(static::normalizeBreaks($str));
}
$matchcount = 0;
switch (strtolower($position)) {
case 'phrase':
@ -4180,7 +4255,7 @@ class PHPMailer
if ('smtp' === $this->Mailer && null !== $this->smtp) {
$lasterror = $this->smtp->getError();
if (!empty($lasterror['error'])) {
$msg .= $this->lang('smtp_error') . $lasterror['error'];
$msg .= ' ' . $this->lang('smtp_error') . $lasterror['error'];
if (!empty($lasterror['detail'])) {
$msg .= ' ' . $this->lang('smtp_detail') . $lasterror['detail'];
}
@ -4267,6 +4342,45 @@ class PHPMailer
return filter_var('https://' . $host, FILTER_VALIDATE_URL) !== false;
}
/**
* Check whether the supplied address uses Unicode in the local part.
*
* @return bool
*/
protected function addressHasUnicodeLocalPart($address)
{
return (bool) preg_match('/[\x80-\xFF].*@/', $address);
}
/**
* Check whether any of the supplied addresses use Unicode in the local part.
*
* @return bool
*/
protected function anyAddressHasUnicodeLocalPart($addresses)
{
foreach ($addresses as $address) {
if (is_array($address)) {
$address = $address[0];
}
if ($this->addressHasUnicodeLocalPart($address)) {
return true;
}
}
return false;
}
/**
* Check whether the message requires SMTPUTF8 based on what's known so far.
*
* @return bool
*/
public function needsSMTPUTF8()
{
return $this->UseSMTPUTF8;
}
/**
* Get an error message in the current language.
*

View file

@ -46,7 +46,7 @@ class POP3
*
* @var string
*/
const VERSION = '6.9.3';
const VERSION = '6.10.0';
/**
* Default POP3 port number.

View file

@ -35,7 +35,7 @@ class SMTP
*
* @var string
*/
const VERSION = '6.9.3';
const VERSION = '6.10.0';
/**
* SMTP line break constant.
@ -159,6 +159,15 @@ class SMTP
*/
public $do_verp = false;
/**
* Whether to use SMTPUTF8.
*
* @see https://www.rfc-editor.org/rfc/rfc6531
*
* @var bool
*/
public $do_smtputf8 = false;
/**
* The timeout value for connection, in seconds.
* Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2.
@ -913,7 +922,15 @@ class SMTP
* $from. Returns true if successful or false otherwise. If True
* the mail transaction is started and then one or more recipient
* commands may be called followed by a data command.
* Implements RFC 821: MAIL <SP> FROM:<reverse-path> <CRLF>.
* Implements RFC 821: MAIL <SP> FROM:<reverse-path> <CRLF> and
* two extensions, namely XVERP and SMTPUTF8.
*
* The server's EHLO response is not checked. If use of either
* extensions is enabled even though the server does not support
* that, mail submission will fail.
*
* XVERP is documented at https://www.postfix.org/VERP_README.html
* and SMTPUTF8 is specified in RFC 6531.
*
* @param string $from Source address of this message
*
@ -922,10 +939,11 @@ class SMTP
public function mail($from)
{
$useVerp = ($this->do_verp ? ' XVERP' : '');
$useSmtputf8 = ($this->do_smtputf8 ? ' SMTPUTF8' : '');
return $this->sendCommand(
'MAIL FROM',
'MAIL FROM:<' . $from . '>' . $useVerp,
'MAIL FROM:<' . $from . '>' . $useSmtputf8 . $useVerp,
250
);
}
@ -1364,6 +1382,26 @@ class SMTP
return $this->do_verp;
}
/**
* Enable or disable use of SMTPUTF8.
*
* @param bool $enabled
*/
public function setSMTPUTF8($enabled = false)
{
$this->do_smtputf8 = $enabled;
}
/**
* Get SMTPUTF8 use.
*
* @return bool
*/
public function getSMTPUTF8()
{
return $this->do_smtputf8;
}
/**
* Set error messages and codes.
*

View file

@ -1,5 +1,23 @@
# Changelog
## 17.2.0 - 2025-04-30
This release changes the pinned API version to `2025-04-30.basil`.
* [#1839](https://github.com/stripe/stripe-php/pull/1839) Update generated code
* Add support for new value `tax_id_prohibited` on enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code`
* Add support for `wallet_options` on `Checkout.Session`
* Add support for `context` on `Event`
* Add support for new values `aw_tin`, `az_tin`, `bd_bin`, `bf_ifu`, `bj_ifu`, `cm_niu`, `cv_nif`, `et_tin`, `kg_tin`, and `la_tin` on enums `Invoice.customer_tax_ids[].type` and `TaxId.type`
* Add support for new value `affirm` on enums `Invoice.payment_settings.payment_method_types` and `Subscription.payment_settings.payment_method_types`
* Add support for `pix` on `PaymentMethodConfiguration`
* Add support for `klarna` on `PaymentMethodDomain`
* Add support for `us_cfpb_data` on `Person`
* Add support for `pending_reason` on `Refund`
* Change type of `Tax.CalculationLineItem.reference` from `nullable(string)` to `string`
* [#1857](https://github.com/stripe/stripe-php/pull/1857) Include new PHP 8.3 and 8.4 in CI
* [#1856](https://github.com/stripe/stripe-php/pull/1856) Faster parallel runner for PHP formatter
## 17.1.1 - 2025-04-04
* [#1847](https://github.com/stripe/stripe-php/pull/1847) Remove stdClass from object shapes
* Remove intersection with `stdClass` in resource properties and fixed `instanceof` checks.

View file

@ -1 +1 @@
v1642
v1719

View file

@ -69,8 +69,6 @@ You can continue to use the legacy integration patterns used prior to version [7
See the [PHP API docs](https://stripe.com/docs/api/?lang=php#intro).
See [video demonstrations][youtube-playlist] covering how to use the library.
## Legacy Version Support
### PHP 5.4 & 5.5
@ -322,4 +320,3 @@ See the "SSL / TLS compatibility issues" paragraph above for full context. If yo
[php-cs-fixer]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
[psr3]: http://www.php-fig.org/psr/psr-3/
[stripe-mock]: https://github.com/stripe/stripe-mock
[youtube-playlist]: https://www.youtube.com/playlist?list=PLy1nL-pvL2M6cUbiHrfMkXxZ9j9SGBxFE

View file

@ -1 +1 @@
17.1.1
17.2.0

View file

@ -137,6 +137,7 @@ require __DIR__ . '/lib/EventData/V1BillingMeterErrorReportTriggeredEventData.ph
require __DIR__ . '/lib/EventData/V1BillingMeterNoMeterFoundEventData.php';
require __DIR__ . '/lib/Events/V1BillingMeterErrorReportTriggeredEvent.php';
require __DIR__ . '/lib/Events/V1BillingMeterNoMeterFoundEvent.php';
require __DIR__ . '/lib/Events/V2CoreEventDestinationPingEvent.php';
require __DIR__ . '/lib/Exception/TemporarySessionExpiredException.php';
require __DIR__ . '/lib/ExchangeRate.php';
require __DIR__ . '/lib/File.php';

File diff suppressed because one or more lines are too long

View file

@ -20,7 +20,7 @@ namespace Stripe;
* @property null|int $application_fee_amount The amount of the application fee (if any) requested for the charge. <a href="https://stripe.com/docs/connect/direct-charges#collect-fees">See the Connect documentation</a> for details.
* @property null|string $authorization_code Authorization code on the charge.
* @property null|BalanceTransaction|string $balance_transaction ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
* @property (object{address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string}&StripeObject) $billing_details
* @property (object{address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string, tax_id: null|string}&StripeObject) $billing_details
* @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments.
* @property bool $captured If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -16,7 +16,7 @@ namespace Stripe;
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $currency If <code>amount_off</code> has been set, the three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> of the amount to take off.
* @property null|StripeObject $currency_options Coupons defined in each available currency option. Each key must be a three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> and a <a href="https://stripe.com/docs/currencies">supported currency</a>.
* @property string $duration One of <code>forever</code>, <code>once</code>, and <code>repeating</code>. Describes how long a customer who applies this coupon will get the discount.
* @property string $duration One of <code>forever</code>, <code>once</code>, or <code>repeating</code>. Describes how long a customer who applies this coupon will get the discount.
* @property null|int $duration_in_months If <code>duration</code> is <code>repeating</code>, the number of months the coupon applies. Null if coupon <code>duration</code> is <code>forever</code> or <code>once</code>.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|int $max_redemptions Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.

View file

@ -244,6 +244,37 @@ class Customer extends ApiResource
return static::_requestPage($url, SearchResult::class, $params, $opts);
}
const PATH_CASH_BALANCE = '/cash_balance';
/**
* @param string $id the ID of the customer to which the cash balance belongs
* @param null|array $params
* @param null|array|string $opts
* @param mixed $cashBalanceId
*
* @return CashBalance
*
* @throws Exception\ApiErrorException if the request fails
*/
public static function retrieveCashBalance($id, $cashBalanceId, $params = null, $opts = null)
{
return self::_retrieveNestedResource($id, static::PATH_CASH_BALANCE, $params, $opts);
}
/**
* @param string $id the ID of the customer to which the cash balance belongs
* @param null|array $params
* @param null|array|string $opts
* @param mixed $cashBalanceId
*
* @return CashBalance
*
* @throws Exception\ApiErrorException if the request fails
*/
public static function updateCashBalance($id, $cashBalanceId, $params = null, $opts = null)
{
return self::_updateNestedResource($id, static::PATH_CASH_BALANCE, $params, $opts);
}
const PATH_BALANCE_TRANSACTIONS = '/balance_transactions';
/**
@ -407,37 +438,6 @@ class Customer extends ApiResource
{
return self::_updateNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts);
}
const PATH_CASH_BALANCE = '/cash_balance';
/**
* @param string $id the ID of the customer to which the cash balance belongs
* @param null|array $params
* @param null|array|string $opts
* @param mixed $cashBalanceId
*
* @return CashBalance
*
* @throws Exception\ApiErrorException if the request fails
*/
public static function retrieveCashBalance($id, $cashBalanceId, $params = null, $opts = null)
{
return self::_retrieveNestedResource($id, static::PATH_CASH_BALANCE, $params, $opts);
}
/**
* @param string $id the ID of the customer to which the cash balance belongs
* @param null|array $params
* @param null|array|string $opts
* @param mixed $cashBalanceId
*
* @return CashBalance
*
* @throws Exception\ApiErrorException if the request fails
*/
public static function updateCashBalance($id, $cashBalanceId, $params = null, $opts = null)
{
return self::_updateNestedResource($id, static::PATH_CASH_BALANCE, $params, $opts);
}
const PATH_TAX_IDS = '/tax_ids';
/**

View file

@ -201,6 +201,7 @@ class ErrorObject extends StripeObject
const CODE_STATUS_TRANSITION_INVALID = 'status_transition_invalid';
const CODE_STRIPE_TAX_INACTIVE = 'stripe_tax_inactive';
const CODE_TAX_ID_INVALID = 'tax_id_invalid';
const CODE_TAX_ID_PROHIBITED = 'tax_id_prohibited';
const CODE_TAXES_CALCULATION_FAILED = 'taxes_calculation_failed';
const CODE_TERMINAL_LOCATION_COUNTRY_UNSUPPORTED = 'terminal_location_country_unsupported';
const CODE_TERMINAL_READER_BUSY = 'terminal_reader_busy';

View file

@ -43,6 +43,7 @@ namespace Stripe;
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|string $account The connected account that originates the event.
* @property null|string $api_version The Stripe API version used to render <code>data</code>. This property is populated only for events on or after October 31, 2014.
* @property null|string $context
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property (object{object: StripeObject, previous_attributes?: StripeObject}&StripeObject) $data
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.

View file

@ -0,0 +1,35 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Events;
/**
* @property \Stripe\RelatedObject $related_object Object containing the reference to API resource relevant to the event
*/
class V2CoreEventDestinationPingEvent extends \Stripe\V2\Event
{
const LOOKUP_TYPE = 'v2.core.event_destination.ping';
/**
* Retrieves the related object from the API. Make an API request on every call.
*
* @return \Stripe\V2\EventDestination
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function fetchRelatedObject()
{
$apiMode = \Stripe\Util\Util::getApiMode($this->related_object->url);
list($object, $options) = $this->_request(
'get',
$this->related_object->url,
[],
['stripe_account' => $this->context],
[],
$apiMode
);
return \Stripe\Util\Util::convertToStripeObject($object, $options, $apiMode);
}
}

View file

@ -52,7 +52,7 @@ namespace Stripe;
* @property int $attempt_count Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
* @property bool $attempted Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the <code>invoice.created</code> webhook, for example, so you might not want to display that invoice as unpaid to your users.
* @property null|bool $auto_advance Controls whether Stripe performs <a href="https://stripe.com/docs/invoicing/integration/automatic-advancement-collection">automatic collection</a> of the invoice. If <code>false</code>, the invoice's state doesn't automatically advance without an explicit action.
* @property (object{disabled_reason: null|string, enabled: bool, liability: null|(object{account?: Account|string, type: string}&StripeObject), status: null|string}&StripeObject) $automatic_tax
* @property (object{disabled_reason: null|string, enabled: bool, liability: null|(object{account?: Account|string, type: string}&StripeObject), provider: null|string, status: null|string}&StripeObject) $automatic_tax
* @property null|int $automatically_finalizes_at The time when this invoice is currently scheduled to be automatically finalized. The field will be <code>null</code> if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be <code>null</code> - see <code>finalized_at</code> for the time when an already-finalized invoice was finalized.
* @property null|string $billing_reason <p>Indicates the reason why the invoice was created.</p><p>* <code>manual</code>: Unrelated to a subscription, for example, created via the invoice editor. * <code>subscription</code>: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. * <code>subscription_create</code>: A new subscription was created. * <code>subscription_cycle</code>: A subscription advanced into a new period. * <code>subscription_threshold</code>: A subscription reached a billing threshold. * <code>subscription_update</code>: A subscription was updated. * <code>upcoming</code>: Reserved for simulated invoices, per the upcoming invoice endpoint.</p>
* @property string $collection_method Either <code>charge_automatically</code>, or <code>send_invoice</code>. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.

View file

@ -20,7 +20,7 @@ namespace Stripe;
* @property null|string $invoice The ID of the invoice that contains this line item.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with <code>type=subscription</code>, <code>metadata</code> reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation.
* @property null|(object{invoice_item_details: null|(object{invoice_item: string, proration: bool, proration_details: null|(object{credited_items: null|(object{invoice: string, invoice_line_items: string[]}&StripeObject)}&StripeObject), subscription: null|string}&StripeObject), subscription_item_details: null|(object{invoice_item: null|string, proration: bool, proration_details: null|(object{credited_items: null|(object{invoice: string, invoice_line_items: string[]}&StripeObject)}&StripeObject), subscription: string, subscription_item: string}&StripeObject), type: string}&StripeObject) $parent The parent that generated this invoice
* @property null|(object{invoice_item_details: null|(object{invoice_item: string, proration: bool, proration_details: null|(object{credited_items: null|(object{invoice: string, invoice_line_items: string[]}&StripeObject)}&StripeObject), subscription: null|string}&StripeObject), subscription_item_details: null|(object{invoice_item: null|string, proration: bool, proration_details: null|(object{credited_items: null|(object{invoice: string, invoice_line_items: string[]}&StripeObject)}&StripeObject), subscription: null|string, subscription_item: string}&StripeObject), type: string}&StripeObject) $parent The parent that generated this invoice
* @property (object{end: int, start: int}&StripeObject) $period
* @property null|((object{amount: int, credit_balance_transaction?: null|Billing\CreditBalanceTransaction|string, discount?: Discount|string, type: string}&StripeObject))[] $pretax_credit_amounts Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item.
* @property null|(object{price_details?: (object{price: string, product: string}&StripeObject), type: string, unit_amount_decimal: null|string}&StripeObject) $pricing The pricing information of the line item.

View file

@ -5,7 +5,8 @@
namespace Stripe;
/**
* Login Links are single-use URLs for a connected account to access the Express Dashboard. The connected account's <a href="/api/accounts/object#account_object-controller-stripe_dashboard-type">account.controller.stripe_dashboard.type</a> must be <code>express</code> to have access to the Express Dashboard.
* Login Links are single-use URLs that takes an Express account to the login page for their Stripe dashboard.
* A Login Link differs from an <a href="https://stripe.com/docs/api/account_links">Account Link</a> in that it takes the user directly to their <a href="https://stripe.com/docs/connect/integrate-express-dashboard#create-login-link">Express dashboard for the specified account</a>.
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.

File diff suppressed because one or more lines are too long

View file

@ -24,7 +24,7 @@ namespace Stripe;
* @property null|(object{fingerprint: null|string, last4: null|string, sort_code: null|string}&StripeObject) $bacs_debit
* @property null|(object{}&StripeObject) $bancontact
* @property null|(object{}&StripeObject) $billie
* @property (object{address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string}&StripeObject) $billing_details
* @property (object{address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, phone: null|string, tax_id: null|string}&StripeObject) $billing_details
* @property null|(object{}&StripeObject) $blik
* @property null|(object{tax_id: string}&StripeObject) $boleto
* @property null|(object{brand: string, checks: null|(object{address_line1_check: null|string, address_postal_code_check: null|string, cvc_check: null|string}&StripeObject), country: null|string, description?: null|string, display_brand: null|string, exp_month: int, exp_year: int, fingerprint?: null|string, funding: string, generated_from: null|(object{charge: null|string, payment_method_details: null|(object{card_present?: (object{amount_authorized: null|int, brand: null|string, brand_product: null|string, capture_before?: int, cardholder_name: null|string, country: null|string, description?: null|string, emv_auth_data: null|string, exp_month: int, exp_year: int, fingerprint: null|string, funding: null|string, generated_card: null|string, iin?: null|string, incremental_authorization_supported: bool, issuer?: null|string, last4: null|string, network: null|string, network_transaction_id: null|string, offline: null|(object{stored_at: null|int, type: null|string}&StripeObject), overcapture_supported: bool, preferred_locales: null|string[], read_method: null|string, receipt: null|(object{account_type?: string, application_cryptogram: null|string, application_preferred_name: null|string, authorization_code: null|string, authorization_response_code: null|string, cardholder_verification_method: null|string, dedicated_file_name: null|string, terminal_verification_results: null|string, transaction_status_information: null|string}&StripeObject), wallet?: (object{type: string}&StripeObject)}&StripeObject), type: string}&StripeObject), setup_attempt: null|SetupAttempt|string}&StripeObject), iin?: null|string, issuer?: null|string, last4: string, networks: null|(object{available: string[], preferred: null|string}&StripeObject), regulated_status: null|string, three_d_secure_usage: null|(object{supported: bool}&StripeObject), wallet: null|(object{amex_express_checkout?: (object{}&StripeObject), apple_pay?: (object{}&StripeObject), dynamic_last4: null|string, google_pay?: (object{}&StripeObject), link?: (object{}&StripeObject), masterpass?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject), samsung_pay?: (object{}&StripeObject), type: string, visa_checkout?: (object{billing_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject), email: null|string, name: null|string, shipping_address: null|(object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&StripeObject)}&StripeObject)}&StripeObject)}&StripeObject) $card
@ -142,7 +142,7 @@ class PaymentMethod extends ApiResource
* href="/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
* method details ahead of a future payment.
*
* @param null|array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string}, blik?: array{}, boleto?: array{tax_id: string}, card?: array{cvc?: string, exp_month?: int, exp_year?: int, networks?: array{preferred?: string}, number?: string, token?: string}, cashapp?: array{}, customer?: string, customer_balance?: array{}, eps?: array{bank?: string}, expand?: string[], fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, payment_method?: string, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type?: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}} $params
* @param null|array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, card?: array{cvc?: string, exp_month?: int, exp_year?: int, networks?: array{preferred?: string}, number?: string, token?: string}, cashapp?: array{}, customer?: string, customer_balance?: array{}, eps?: array{bank?: string}, expand?: string[], fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, payment_method?: string, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type?: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}} $params
* @param null|array|string $options
*
* @return PaymentMethod the created resource
@ -208,7 +208,7 @@ class PaymentMethod extends ApiResource
* be updated.
*
* @param string $id the ID of the resource to update
* @param null|array{allow_redisplay?: string, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string}, card?: array{exp_month?: int, exp_year?: int, networks?: array{preferred?: null|string}}, expand?: string[], link?: array{}, metadata?: null|StripeObject, pay_by_bank?: array{}, us_bank_account?: array{account_holder_type?: string, account_type?: string}} $params
* @param null|array{allow_redisplay?: string, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, card?: array{exp_month?: int, exp_year?: int, networks?: array{preferred?: null|string}}, expand?: string[], link?: array{}, metadata?: null|StripeObject, pay_by_bank?: array{}, us_bank_account?: array{account_holder_type?: string, account_type?: string}} $params
* @param null|array|string $opts
*
* @return PaymentMethod the updated resource

View file

@ -63,6 +63,7 @@ namespace Stripe;
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $pay_by_bank
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $paynow
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $paypal
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $pix
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $promptpay
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $revolut_pay
* @property null|(object{available: bool, display_preference: (object{overridable: null|bool, preference: string, value: string}&StripeObject)}&StripeObject) $satispay
@ -83,7 +84,7 @@ class PaymentMethodConfiguration extends ApiResource
/**
* Creates a payment method configuration.
*
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, parent?: string, pay_by_bank?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, parent?: string, pay_by_bank?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
* @param null|array|string $options
*
* @return PaymentMethodConfiguration the created resource
@ -142,7 +143,7 @@ class PaymentMethodConfiguration extends ApiResource
* Update payment method configuration.
*
* @param string $id the ID of the resource to update
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, active?: bool, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, pay_by_bank?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, active?: bool, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, pay_by_bank?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
* @param null|array|string $opts
*
* @return PaymentMethodConfiguration the updated resource

View file

@ -18,6 +18,7 @@ namespace Stripe;
* @property string $domain_name The domain name that this payment method domain object represents.
* @property bool $enabled Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements.
* @property (object{status: string, status_details?: (object{error_message: string}&StripeObject)}&StripeObject) $google_pay Indicates the status of a specific payment method on a payment method domain.
* @property (object{status: string, status_details?: (object{error_message: string}&StripeObject)}&StripeObject) $klarna Indicates the status of a specific payment method on a payment method domain.
* @property (object{status: string, status_details?: (object{error_message: string}&StripeObject)}&StripeObject) $link Indicates the status of a specific payment method on a payment method domain.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property (object{status: string, status_details?: (object{error_message: string}&StripeObject)}&StripeObject) $paypal Indicates the status of a specific payment method on a payment method domain.

View file

@ -41,6 +41,7 @@ namespace Stripe;
* @property null|(object{authorizer: null|bool, director: null|bool, executive: null|bool, legal_guardian: null|bool, owner: null|bool, percent_ownership: null|float, representative: null|bool, title: null|string}&StripeObject) $relationship
* @property null|(object{alternatives: null|(object{alternative_fields_due: string[], original_fields_due: string[]}&StripeObject)[], currently_due: string[], errors: (object{code: string, reason: string, requirement: string}&StripeObject)[], eventually_due: string[], past_due: string[], pending_verification: string[]}&StripeObject) $requirements Information about the requirements for this person, including what information needs to be collected, and by when.
* @property null|bool $ssn_last_4_provided Whether the last four digits of the person's Social Security number have been provided (U.S. only).
* @property null|(object{ethnicity_details: null|(object{ethnicity: null|string[], ethnicity_other: null|string}&StripeObject), race_details: null|(object{race: null|string[], race_other: null|string}&StripeObject), self_identified_gender: null|string}&StripeObject) $us_cfpb_data Demographic data related to the person.
* @property null|(object{additional_document?: null|(object{back: null|File|string, details: null|string, details_code: null|string, front: null|File|string}&StripeObject), details?: null|string, details_code?: null|string, document?: (object{back: null|File|string, details: null|string, details_code: null|string, front: null|File|string}&StripeObject), status: string}&StripeObject) $verification
*/
class Person extends ApiResource

View file

@ -15,7 +15,7 @@ namespace Stripe;
* @property null|Application|string $application ID of the Connect Application that created the quote.
* @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.
* @property null|float $application_fee_percent A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.
* @property (object{enabled: bool, liability: null|(object{account?: Account|string, type: string}&StripeObject), status: null|string}&StripeObject) $automatic_tax
* @property (object{enabled: bool, liability: null|(object{account?: Account|string, type: string}&StripeObject), provider: null|string, status: null|string}&StripeObject) $automatic_tax
* @property string $collection_method Either <code>charge_automatically</code>, or <code>send_invoice</code>. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as <code>active</code>. Defaults to <code>charge_automatically</code>.
* @property (object{recurring: null|(object{amount_subtotal: int, amount_total: int, interval: string, interval_count: int, total_details: (object{amount_discount: int, amount_shipping: null|int, amount_tax: int, breakdown?: (object{discounts: (object{amount: int, discount: Discount}&StripeObject)[], taxes: ((object{amount: int, rate: TaxRate, taxability_reason: null|string, taxable_amount: null|int}&StripeObject))[]}&StripeObject)}&StripeObject)}&StripeObject), upfront: (object{amount_subtotal: int, amount_total: int, line_items?: Collection<LineItem>, total_details: (object{amount_discount: int, amount_shipping: null|int, amount_tax: int, breakdown?: (object{discounts: (object{amount: int, discount: Discount}&StripeObject)[], taxes: ((object{amount: int, rate: TaxRate, taxability_reason: null|string, taxable_amount: null|int}&StripeObject))[]}&StripeObject)}&StripeObject)}&StripeObject)}&StripeObject) $computed
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.

View file

@ -26,6 +26,7 @@ namespace Stripe;
* @property null|StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|(object{display_details?: (object{email_sent: (object{email_sent_at: int, email_sent_to: string}&StripeObject), expires_at: int}&StripeObject), type: string}&StripeObject) $next_action
* @property null|PaymentIntent|string $payment_intent ID of the PaymentIntent that's refunded.
* @property null|string $pending_reason Provides the reason for why the refund is pending. Possible values are: <code>processing</code>, <code>insufficient_funds</code>, or <code>charge_pending</code>.
* @property null|(object{presentment_amount: int, presentment_currency: string}&StripeObject) $presentment_details
* @property null|string $reason Reason for the refund, which is either user-provided (<code>duplicate</code>, <code>fraudulent</code>, or <code>requested_by_customer</code>) or generated by Stripe internally (<code>expired_uncaptured_charge</code>).
* @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this refund.
@ -43,6 +44,10 @@ class Refund extends ApiResource
const FAILURE_REASON_LOST_OR_STOLEN_CARD = 'lost_or_stolen_card';
const FAILURE_REASON_UNKNOWN = 'unknown';
const PENDING_REASON_CHARGE_PENDING = 'charge_pending';
const PENDING_REASON_INSUFFICIENT_FUNDS = 'insufficient_funds';
const PENDING_REASON_PROCESSING = 'processing';
const REASON_DUPLICATE = 'duplicate';
const REASON_EXPIRED_UNCAPTURED_CHARGE = 'expired_uncaptured_charge';
const REASON_FRAUDULENT = 'fraudulent';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -83,10 +83,10 @@ class InvoiceService extends AbstractService
}
/**
* At any time, you can preview the upcoming invoice for a customer. This will show
* you all the charges that are pending, including subscription renewal charges,
* invoice item charges, etc. It will also show you any discounts that are
* applicable to the invoice.
* At any time, you can preview the upcoming invoice for a subscription or
* subscription schedule. This will show you all the charges that are pending,
* including subscription renewal charges, invoice item charges, etc. It will also
* show you any discounts that are applicable to the invoice.
*
* Note that when you are viewing an upcoming invoice, you are simply viewing a
* preview the invoice has not yet been created. As such, the upcoming invoice

File diff suppressed because one or more lines are too long

View file

@ -29,7 +29,7 @@ class PaymentMethodConfigurationService extends AbstractService
/**
* Creates a payment method configuration.
*
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, parent?: string, pay_by_bank?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, parent?: string, pay_by_bank?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\PaymentMethodConfiguration
@ -61,7 +61,7 @@ class PaymentMethodConfigurationService extends AbstractService
* Update payment method configuration.
*
* @param string $id
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, active?: bool, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, pay_by_bank?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
* @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, active?: bool, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, pay_by_bank?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\PaymentMethodConfiguration

View file

@ -73,7 +73,7 @@ class PaymentMethodService extends AbstractService
* href="/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
* method details ahead of a future payment.
*
* @param null|array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string}, blik?: array{}, boleto?: array{tax_id: string}, card?: array{cvc?: string, exp_month?: int, exp_year?: int, networks?: array{preferred?: string}, number?: string, token?: string}, cashapp?: array{}, customer?: string, customer_balance?: array{}, eps?: array{bank?: string}, expand?: string[], fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: \Stripe\StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, payment_method?: string, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type?: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}} $params
* @param null|array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, card?: array{cvc?: string, exp_month?: int, exp_year?: int, networks?: array{preferred?: string}, number?: string, token?: string}, cashapp?: array{}, customer?: string, customer_balance?: array{}, eps?: array{bank?: string}, expand?: string[], fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: \Stripe\StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, payment_method?: string, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type?: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\PaymentMethod
@ -126,7 +126,7 @@ class PaymentMethodService extends AbstractService
* be updated.
*
* @param string $id
* @param null|array{allow_redisplay?: string, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string}, card?: array{exp_month?: int, exp_year?: int, networks?: array{preferred?: null|string}}, expand?: string[], link?: array{}, metadata?: null|\Stripe\StripeObject, pay_by_bank?: array{}, us_bank_account?: array{account_holder_type?: string, account_type?: string}} $params
* @param null|array{allow_redisplay?: string, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, card?: array{exp_month?: int, exp_year?: int, networks?: array{preferred?: null|string}}, expand?: string[], link?: array{}, metadata?: null|\Stripe\StripeObject, pay_by_bank?: array{}, us_bank_account?: array{account_holder_type?: string, account_type?: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\PaymentMethod

View file

@ -63,7 +63,7 @@ class SetupIntentService extends AbstractService
* or the <code>canceled</code> status if the confirmation limit is reached.
*
* @param string $id
* @param null|array{confirmation_token?: string, expand?: string[], mandate_data?: null|array{customer_acceptance?: array{accepted_at?: int, offline?: array{}, online?: array{ip_address?: string, user_agent?: string}, type: string}}, payment_method?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: \Stripe\StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, return_url?: string, use_stripe_sdk?: bool} $params
* @param null|array{confirmation_token?: string, expand?: string[], mandate_data?: null|array{customer_acceptance?: array{accepted_at?: int, offline?: array{}, online?: array{ip_address?: string, user_agent?: string}, type: string}}, payment_method?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: \Stripe\StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, return_url?: string, use_stripe_sdk?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\SetupIntent
@ -82,7 +82,7 @@ class SetupIntentService extends AbstractService
* href="/docs/api/setup_intents/confirm">confirm</a> it to collect any required
* permissions to charge the payment method later.
*
* @param null|array{attach_to_self?: bool, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, confirm?: bool, confirmation_token?: string, customer?: string, description?: string, expand?: string[], flow_directions?: string[], mandate_data?: null|array{customer_acceptance: array{accepted_at?: int, offline?: array{}, online?: array{ip_address: string, user_agent: string}, type: string}}, metadata?: \Stripe\StripeObject, on_behalf_of?: string, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: \Stripe\StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[], return_url?: string, single_use?: array{amount: int, currency: string}, usage?: string, use_stripe_sdk?: bool} $params
* @param null|array{attach_to_self?: bool, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, confirm?: bool, confirmation_token?: string, customer?: string, description?: string, expand?: string[], flow_directions?: string[], mandate_data?: null|array{customer_acceptance: array{accepted_at?: int, offline?: array{}, online?: array{ip_address: string, user_agent: string}, type: string}}, metadata?: \Stripe\StripeObject, on_behalf_of?: string, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: \Stripe\StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[], return_url?: string, single_use?: array{amount: int, currency: string}, usage?: string, use_stripe_sdk?: bool} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\SetupIntent
@ -121,7 +121,7 @@ class SetupIntentService extends AbstractService
* Updates a SetupIntent object.
*
* @param string $id
* @param null|array{attach_to_self?: bool, customer?: string, description?: string, expand?: string[], flow_directions?: string[], metadata?: null|\Stripe\StripeObject, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: \Stripe\StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[]} $params
* @param null|array{attach_to_self?: bool, customer?: string, description?: string, expand?: string[], flow_directions?: string[], metadata?: null|\Stripe\StripeObject, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: \Stripe\StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\SetupIntent

View file

@ -36,7 +36,8 @@ class SubscriptionService extends AbstractService
* the period, unless manually <a href="#delete_invoiceitem">deleted</a>. If youve
* set the subscription to cancel at the end of the period, any pending prorations
* are also left in place and collected at the end of the period. But if the
* subscription is set to cancel immediately, pending prorations are removed.
* subscription is set to cancel immediately, pending prorations are removed if
* <code>invoice_now</code> and <code>prorate</code> are both set to true.
*
* By default, upon subscription cancellation, Stripe stops automatic collection of
* all finalized invoices for the customer. This is intended to prevent unexpected

View file

@ -29,7 +29,7 @@ class RegistrationService extends \Stripe\Service\AbstractService
/**
* Creates a new Tax <code>Registration</code> object.
*
* @param null|array{active_from: array|int|string, country: string, country_options: array{ae?: array{type: string}, al?: array{type: string}, am?: array{type: string}, ao?: array{type: string}, at?: array{standard?: array{place_of_supply_scheme: string}, type: string}, au?: array{type: string}, ba?: array{type: string}, bb?: array{type: string}, be?: array{standard?: array{place_of_supply_scheme: string}, type: string}, bg?: array{standard?: array{place_of_supply_scheme: string}, type: string}, bh?: array{type: string}, bs?: array{type: string}, by?: array{type: string}, ca?: array{province_standard?: array{province: string}, type: string}, cd?: array{type: string}, ch?: array{type: string}, cl?: array{type: string}, co?: array{type: string}, cr?: array{type: string}, cy?: array{standard?: array{place_of_supply_scheme: string}, type: string}, cz?: array{standard?: array{place_of_supply_scheme: string}, type: string}, de?: array{standard?: array{place_of_supply_scheme: string}, type: string}, dk?: array{standard?: array{place_of_supply_scheme: string}, type: string}, ec?: array{type: string}, ee?: array{standard?: array{place_of_supply_scheme: string}, type: string}, eg?: array{type: string}, es?: array{standard?: array{place_of_supply_scheme: string}, type: string}, fi?: array{standard?: array{place_of_supply_scheme: string}, type: string}, fr?: array{standard?: array{place_of_supply_scheme: string}, type: string}, gb?: array{type: string}, ge?: array{type: string}, gn?: array{type: string}, gr?: array{standard?: array{place_of_supply_scheme: string}, type: string}, hr?: array{standard?: array{place_of_supply_scheme: string}, type: string}, hu?: array{standard?: array{place_of_supply_scheme: string}, type: string}, id?: array{type: string}, ie?: array{standard?: array{place_of_supply_scheme: string}, type: string}, is?: array{type: string}, it?: array{standard?: array{place_of_supply_scheme: string}, type: string}, jp?: array{type: string}, ke?: array{type: string}, kh?: array{type: string}, kr?: array{type: string}, kz?: array{type: string}, lt?: array{standard?: array{place_of_supply_scheme: string}, type: string}, lu?: array{standard?: array{place_of_supply_scheme: string}, type: string}, lv?: array{standard?: array{place_of_supply_scheme: string}, type: string}, ma?: array{type: string}, md?: array{type: string}, me?: array{type: string}, mk?: array{type: string}, mr?: array{type: string}, mt?: array{standard?: array{place_of_supply_scheme: string}, type: string}, mx?: array{type: string}, my?: array{type: string}, ng?: array{type: string}, nl?: array{standard?: array{place_of_supply_scheme: string}, type: string}, no?: array{type: string}, np?: array{type: string}, nz?: array{type: string}, om?: array{type: string}, pe?: array{type: string}, pl?: array{standard?: array{place_of_supply_scheme: string}, type: string}, pt?: array{standard?: array{place_of_supply_scheme: string}, type: string}, ro?: array{standard?: array{place_of_supply_scheme: string}, type: string}, rs?: array{type: string}, ru?: array{type: string}, sa?: array{type: string}, se?: array{standard?: array{place_of_supply_scheme: string}, type: string}, sg?: array{type: string}, si?: array{standard?: array{place_of_supply_scheme: string}, type: string}, sk?: array{standard?: array{place_of_supply_scheme: string}, type: string}, sn?: array{type: string}, sr?: array{type: string}, th?: array{type: string}, tj?: array{type: string}, tr?: array{type: string}, tz?: array{type: string}, ug?: array{type: string}, us?: array{local_amusement_tax?: array{jurisdiction: string}, local_lease_tax?: array{jurisdiction: string}, state: string, state_sales_tax?: array{elections: array{jurisdiction?: string, type: string}[]}, type: string}, uy?: array{type: string}, uz?: array{type: string}, vn?: array{type: string}, za?: array{type: string}, zm?: array{type: string}, zw?: array{type: string}}, expand?: string[], expires_at?: int} $params
* @param null|array{active_from: array|int|string, country: string, country_options: array{ae?: array{type: string}, al?: array{type: string}, am?: array{type: string}, ao?: array{type: string}, at?: array{standard?: array{place_of_supply_scheme: string}, type: string}, au?: array{type: string}, aw?: array{type: string}, az?: array{type: string}, ba?: array{type: string}, bb?: array{type: string}, bd?: array{type: string}, be?: array{standard?: array{place_of_supply_scheme: string}, type: string}, bf?: array{type: string}, bg?: array{standard?: array{place_of_supply_scheme: string}, type: string}, bh?: array{type: string}, bj?: array{type: string}, bs?: array{type: string}, by?: array{type: string}, ca?: array{province_standard?: array{province: string}, type: string}, cd?: array{type: string}, ch?: array{type: string}, cl?: array{type: string}, cm?: array{type: string}, co?: array{type: string}, cr?: array{type: string}, cv?: array{type: string}, cy?: array{standard?: array{place_of_supply_scheme: string}, type: string}, cz?: array{standard?: array{place_of_supply_scheme: string}, type: string}, de?: array{standard?: array{place_of_supply_scheme: string}, type: string}, dk?: array{standard?: array{place_of_supply_scheme: string}, type: string}, ec?: array{type: string}, ee?: array{standard?: array{place_of_supply_scheme: string}, type: string}, eg?: array{type: string}, es?: array{standard?: array{place_of_supply_scheme: string}, type: string}, et?: array{type: string}, fi?: array{standard?: array{place_of_supply_scheme: string}, type: string}, fr?: array{standard?: array{place_of_supply_scheme: string}, type: string}, gb?: array{type: string}, ge?: array{type: string}, gn?: array{type: string}, gr?: array{standard?: array{place_of_supply_scheme: string}, type: string}, hr?: array{standard?: array{place_of_supply_scheme: string}, type: string}, hu?: array{standard?: array{place_of_supply_scheme: string}, type: string}, id?: array{type: string}, ie?: array{standard?: array{place_of_supply_scheme: string}, type: string}, in?: array{type: string}, is?: array{type: string}, it?: array{standard?: array{place_of_supply_scheme: string}, type: string}, jp?: array{type: string}, ke?: array{type: string}, kg?: array{type: string}, kh?: array{type: string}, kr?: array{type: string}, kz?: array{type: string}, la?: array{type: string}, lt?: array{standard?: array{place_of_supply_scheme: string}, type: string}, lu?: array{standard?: array{place_of_supply_scheme: string}, type: string}, lv?: array{standard?: array{place_of_supply_scheme: string}, type: string}, ma?: array{type: string}, md?: array{type: string}, me?: array{type: string}, mk?: array{type: string}, mr?: array{type: string}, mt?: array{standard?: array{place_of_supply_scheme: string}, type: string}, mx?: array{type: string}, my?: array{type: string}, ng?: array{type: string}, nl?: array{standard?: array{place_of_supply_scheme: string}, type: string}, no?: array{type: string}, np?: array{type: string}, nz?: array{type: string}, om?: array{type: string}, pe?: array{type: string}, ph?: array{type: string}, pl?: array{standard?: array{place_of_supply_scheme: string}, type: string}, pt?: array{standard?: array{place_of_supply_scheme: string}, type: string}, ro?: array{standard?: array{place_of_supply_scheme: string}, type: string}, rs?: array{type: string}, ru?: array{type: string}, sa?: array{type: string}, se?: array{standard?: array{place_of_supply_scheme: string}, type: string}, sg?: array{type: string}, si?: array{standard?: array{place_of_supply_scheme: string}, type: string}, sk?: array{standard?: array{place_of_supply_scheme: string}, type: string}, sn?: array{type: string}, sr?: array{type: string}, th?: array{type: string}, tj?: array{type: string}, tr?: array{type: string}, tz?: array{type: string}, ug?: array{type: string}, us?: array{local_amusement_tax?: array{jurisdiction: string}, local_lease_tax?: array{jurisdiction: string}, state: string, state_sales_tax?: array{elections: array{jurisdiction?: string, type: string}[]}, type: string}, uy?: array{type: string}, uz?: array{type: string}, vn?: array{type: string}, za?: array{type: string}, zm?: array{type: string}, zw?: array{type: string}}, expand?: string[], expires_at?: int} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\Tax\Registration

View file

@ -14,7 +14,7 @@ class ConfirmationTokenService extends \Stripe\Service\AbstractService
/**
* Creates a test mode Confirmation Token server side for your integration tests.
*
* @param null|array{expand?: string[], payment_method?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: \Stripe\StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, return_url?: string, setup_future_usage?: string, shipping?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}} $params
* @param null|array{expand?: string[], payment_method?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: \Stripe\StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{card?: array{installments?: array{plan: array{count?: int, interval?: string, type: string}}}}, return_url?: string, setup_future_usage?: string, shipping?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\ConfirmationToken

View file

@ -19,7 +19,7 @@ class TokenService extends AbstractService
* href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
* is <code>application</code>, which includes Custom accounts.
*
* @param null|array{account?: array{business_type?: string, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_declaration_shown_and_signed?: bool, ownership_exemption_reason?: null|string, phone?: string, registration_number?: string, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|\Stripe\StripeObject, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, tos_shown_and_accepted?: bool}, bank_account?: array{account_holder_name?: string, account_holder_type?: string, account_number: string, account_type?: string, country: string, currency?: string, payment_method?: string, routing_number?: string}, card?: array|string, customer?: string, cvc_update?: array{cvc: string}, expand?: string[], person?: array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|\Stripe\StripeObject, nationality?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, pii?: array{id_number?: string}} $params
* @param null|array{account?: array{business_type?: string, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_declaration_shown_and_signed?: bool, ownership_exemption_reason?: null|string, phone?: string, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|\Stripe\StripeObject, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, tos_shown_and_accepted?: bool}, bank_account?: array{account_holder_name?: string, account_holder_type?: string, account_number: string, account_type?: string, country: string, currency?: string, payment_method?: string, routing_number?: string}, card?: array|string, customer?: string, cvc_update?: array{cvc: string}, expand?: string[], person?: array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|\Stripe\StripeObject, nationality?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, us_cfpb_data?: array{ethnicity_details?: array{ethnicity?: string[], ethnicity_other?: string}, race_details?: array{race?: string[], race_other?: string}, self_identified_gender?: string}, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, pii?: array{id_number?: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\Token

View file

@ -77,7 +77,7 @@ class SetupIntent extends ApiResource
* href="/docs/api/setup_intents/confirm">confirm</a> it to collect any required
* permissions to charge the payment method later.
*
* @param null|array{attach_to_self?: bool, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, confirm?: bool, confirmation_token?: string, customer?: string, description?: string, expand?: string[], flow_directions?: string[], mandate_data?: null|array{customer_acceptance: array{accepted_at?: int, offline?: array{}, online?: array{ip_address: string, user_agent: string}, type: string}}, metadata?: StripeObject, on_behalf_of?: string, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[], return_url?: string, single_use?: array{amount: int, currency: string}, usage?: string, use_stripe_sdk?: bool} $params
* @param null|array{attach_to_self?: bool, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, confirm?: bool, confirmation_token?: string, customer?: string, description?: string, expand?: string[], flow_directions?: string[], mandate_data?: null|array{customer_acceptance: array{accepted_at?: int, offline?: array{}, online?: array{ip_address: string, user_agent: string}, type: string}}, metadata?: StripeObject, on_behalf_of?: string, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[], return_url?: string, single_use?: array{amount: int, currency: string}, usage?: string, use_stripe_sdk?: bool} $params
* @param null|array|string $options
*
* @return SetupIntent the created resource
@ -143,7 +143,7 @@ class SetupIntent extends ApiResource
* Updates a SetupIntent object.
*
* @param string $id the ID of the resource to update
* @param null|array{attach_to_self?: bool, customer?: string, description?: string, expand?: string[], flow_directions?: string[], metadata?: null|StripeObject, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[]} $params
* @param null|array{attach_to_self?: bool, customer?: string, description?: string, expand?: string[], flow_directions?: string[], metadata?: null|StripeObject, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: array{currency?: string, mandate_options?: array{custom_mandate_url?: null|string, default_for?: string[], interval_description?: string, payment_schedule?: string, transaction_type?: string}, verification_method?: string}, amazon_pay?: array{}, bacs_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, card?: array{mandate_options?: array{amount: int, amount_type: string, currency: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_three_d_secure?: string, three_d_secure?: array{ares_trans_status?: string, cryptogram?: string, electronic_commerce_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id?: string, version?: string}}, card_present?: array{}, link?: array{persistent_token?: string}, paypal?: array{billing_agreement_id?: string}, sepa_debit?: array{mandate_options?: array{reference_prefix?: null|string}}, us_bank_account?: array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, verification_method?: string}}, payment_method_types?: string[]} $params
* @param null|array|string $opts
*
* @return SetupIntent the updated resource

View file

@ -64,7 +64,7 @@ class Stripe
/** @var float Initial delay between retries, in seconds */
private static $initialNetworkRetryDelay = 0.5;
const VERSION = '17.1.1';
const VERSION = '17.2.0';
/**
* @return string the API key used for requests

View file

@ -12,7 +12,7 @@ namespace Stripe\Tax;
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|string $product The ID of an existing <a href="https://stripe.com/docs/api/products/object">Product</a>.
* @property int $quantity The number of units of the item being purchased. For reversals, this is the quantity reversed.
* @property null|string $reference A custom identifier for this line item.
* @property string $reference A custom identifier for this line item.
* @property string $tax_behavior Specifies whether the <code>amount</code> includes taxes. If <code>tax_behavior=inclusive</code>, then the amount includes taxes.
* @property null|((object{amount: int, jurisdiction: (object{country: string, display_name: string, level: string, state: null|string}&\Stripe\StripeObject), sourcing: string, tax_rate_details: null|(object{display_name: string, percentage_decimal: string, tax_type: string}&\Stripe\StripeObject), taxability_reason: string, taxable_amount: int}&\Stripe\StripeObject))[] $tax_breakdown Detailed account of taxes relevant to this line item.
* @property string $tax_code The <a href="https://stripe.com/docs/tax/tax-categories">tax code</a> ID used for this resource.

File diff suppressed because one or more lines are too long

View file

@ -17,7 +17,7 @@ namespace Stripe;
* @property null|Customer|string $customer ID of the customer.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|(object{account?: Account|string, application?: Application|string, customer?: Customer|string, type: string}&StripeObject) $owner The account or customer the tax ID belongs to.
* @property string $type Type of the tax ID, one of <code>ad_nrt</code>, <code>ae_trn</code>, <code>al_tin</code>, <code>am_tin</code>, <code>ao_tin</code>, <code>ar_cuit</code>, <code>au_abn</code>, <code>au_arn</code>, <code>ba_tin</code>, <code>bb_tin</code>, <code>bg_uic</code>, <code>bh_vat</code>, <code>bo_tin</code>, <code>br_cnpj</code>, <code>br_cpf</code>, <code>bs_tin</code>, <code>by_tin</code>, <code>ca_bn</code>, <code>ca_gst_hst</code>, <code>ca_pst_bc</code>, <code>ca_pst_mb</code>, <code>ca_pst_sk</code>, <code>ca_qst</code>, <code>cd_nif</code>, <code>ch_uid</code>, <code>ch_vat</code>, <code>cl_tin</code>, <code>cn_tin</code>, <code>co_nit</code>, <code>cr_tin</code>, <code>de_stn</code>, <code>do_rcn</code>, <code>ec_ruc</code>, <code>eg_tin</code>, <code>es_cif</code>, <code>eu_oss_vat</code>, <code>eu_vat</code>, <code>gb_vat</code>, <code>ge_vat</code>, <code>gn_nif</code>, <code>hk_br</code>, <code>hr_oib</code>, <code>hu_tin</code>, <code>id_npwp</code>, <code>il_vat</code>, <code>in_gst</code>, <code>is_vat</code>, <code>jp_cn</code>, <code>jp_rn</code>, <code>jp_trn</code>, <code>ke_pin</code>, <code>kh_tin</code>, <code>kr_brn</code>, <code>kz_bin</code>, <code>li_uid</code>, <code>li_vat</code>, <code>ma_vat</code>, <code>md_vat</code>, <code>me_pib</code>, <code>mk_vat</code>, <code>mr_nif</code>, <code>mx_rfc</code>, <code>my_frp</code>, <code>my_itn</code>, <code>my_sst</code>, <code>ng_tin</code>, <code>no_vat</code>, <code>no_voec</code>, <code>np_pan</code>, <code>nz_gst</code>, <code>om_vat</code>, <code>pe_ruc</code>, <code>ph_tin</code>, <code>ro_tin</code>, <code>rs_pib</code>, <code>ru_inn</code>, <code>ru_kpp</code>, <code>sa_vat</code>, <code>sg_gst</code>, <code>sg_uen</code>, <code>si_tin</code>, <code>sn_ninea</code>, <code>sr_fin</code>, <code>sv_nit</code>, <code>th_vat</code>, <code>tj_tin</code>, <code>tr_tin</code>, <code>tw_vat</code>, <code>tz_vat</code>, <code>ua_vat</code>, <code>ug_tin</code>, <code>us_ein</code>, <code>uy_ruc</code>, <code>uz_tin</code>, <code>uz_vat</code>, <code>ve_rif</code>, <code>vn_tin</code>, <code>za_vat</code>, <code>zm_tin</code>, or <code>zw_tin</code>. Note that some legacy tax IDs have type <code>unknown</code>
* @property string $type Type of the tax ID, one of <code>ad_nrt</code>, <code>ae_trn</code>, <code>al_tin</code>, <code>am_tin</code>, <code>ao_tin</code>, <code>ar_cuit</code>, <code>au_abn</code>, <code>au_arn</code>, <code>aw_tin</code>, <code>az_tin</code>, <code>ba_tin</code>, <code>bb_tin</code>, <code>bd_bin</code>, <code>bf_ifu</code>, <code>bg_uic</code>, <code>bh_vat</code>, <code>bj_ifu</code>, <code>bo_tin</code>, <code>br_cnpj</code>, <code>br_cpf</code>, <code>bs_tin</code>, <code>by_tin</code>, <code>ca_bn</code>, <code>ca_gst_hst</code>, <code>ca_pst_bc</code>, <code>ca_pst_mb</code>, <code>ca_pst_sk</code>, <code>ca_qst</code>, <code>cd_nif</code>, <code>ch_uid</code>, <code>ch_vat</code>, <code>cl_tin</code>, <code>cm_niu</code>, <code>cn_tin</code>, <code>co_nit</code>, <code>cr_tin</code>, <code>cv_nif</code>, <code>de_stn</code>, <code>do_rcn</code>, <code>ec_ruc</code>, <code>eg_tin</code>, <code>es_cif</code>, <code>et_tin</code>, <code>eu_oss_vat</code>, <code>eu_vat</code>, <code>gb_vat</code>, <code>ge_vat</code>, <code>gn_nif</code>, <code>hk_br</code>, <code>hr_oib</code>, <code>hu_tin</code>, <code>id_npwp</code>, <code>il_vat</code>, <code>in_gst</code>, <code>is_vat</code>, <code>jp_cn</code>, <code>jp_rn</code>, <code>jp_trn</code>, <code>ke_pin</code>, <code>kg_tin</code>, <code>kh_tin</code>, <code>kr_brn</code>, <code>kz_bin</code>, <code>la_tin</code>, <code>li_uid</code>, <code>li_vat</code>, <code>ma_vat</code>, <code>md_vat</code>, <code>me_pib</code>, <code>mk_vat</code>, <code>mr_nif</code>, <code>mx_rfc</code>, <code>my_frp</code>, <code>my_itn</code>, <code>my_sst</code>, <code>ng_tin</code>, <code>no_vat</code>, <code>no_voec</code>, <code>np_pan</code>, <code>nz_gst</code>, <code>om_vat</code>, <code>pe_ruc</code>, <code>ph_tin</code>, <code>ro_tin</code>, <code>rs_pib</code>, <code>ru_inn</code>, <code>ru_kpp</code>, <code>sa_vat</code>, <code>sg_gst</code>, <code>sg_uen</code>, <code>si_tin</code>, <code>sn_ninea</code>, <code>sr_fin</code>, <code>sv_nit</code>, <code>th_vat</code>, <code>tj_tin</code>, <code>tr_tin</code>, <code>tw_vat</code>, <code>tz_vat</code>, <code>ua_vat</code>, <code>ug_tin</code>, <code>us_ein</code>, <code>uy_ruc</code>, <code>uz_tin</code>, <code>uz_vat</code>, <code>ve_rif</code>, <code>vn_tin</code>, <code>za_vat</code>, <code>zm_tin</code>, or <code>zw_tin</code>. Note that some legacy tax IDs have type <code>unknown</code>
* @property string $value Value of the tax ID.
* @property null|(object{status: string, verified_address: null|string, verified_name: null|string}&StripeObject) $verification Tax ID verification information.
*/
@ -33,10 +33,15 @@ class TaxId extends ApiResource
const TYPE_AR_CUIT = 'ar_cuit';
const TYPE_AU_ABN = 'au_abn';
const TYPE_AU_ARN = 'au_arn';
const TYPE_AW_TIN = 'aw_tin';
const TYPE_AZ_TIN = 'az_tin';
const TYPE_BA_TIN = 'ba_tin';
const TYPE_BB_TIN = 'bb_tin';
const TYPE_BD_BIN = 'bd_bin';
const TYPE_BF_IFU = 'bf_ifu';
const TYPE_BG_UIC = 'bg_uic';
const TYPE_BH_VAT = 'bh_vat';
const TYPE_BJ_IFU = 'bj_ifu';
const TYPE_BO_TIN = 'bo_tin';
const TYPE_BR_CNPJ = 'br_cnpj';
const TYPE_BR_CPF = 'br_cpf';
@ -52,14 +57,17 @@ class TaxId extends ApiResource
const TYPE_CH_UID = 'ch_uid';
const TYPE_CH_VAT = 'ch_vat';
const TYPE_CL_TIN = 'cl_tin';
const TYPE_CM_NIU = 'cm_niu';
const TYPE_CN_TIN = 'cn_tin';
const TYPE_CO_NIT = 'co_nit';
const TYPE_CR_TIN = 'cr_tin';
const TYPE_CV_NIF = 'cv_nif';
const TYPE_DE_STN = 'de_stn';
const TYPE_DO_RCN = 'do_rcn';
const TYPE_EC_RUC = 'ec_ruc';
const TYPE_EG_TIN = 'eg_tin';
const TYPE_ES_CIF = 'es_cif';
const TYPE_ET_TIN = 'et_tin';
const TYPE_EU_OSS_VAT = 'eu_oss_vat';
const TYPE_EU_VAT = 'eu_vat';
const TYPE_GB_VAT = 'gb_vat';
@ -76,9 +84,11 @@ class TaxId extends ApiResource
const TYPE_JP_RN = 'jp_rn';
const TYPE_JP_TRN = 'jp_trn';
const TYPE_KE_PIN = 'ke_pin';
const TYPE_KG_TIN = 'kg_tin';
const TYPE_KH_TIN = 'kh_tin';
const TYPE_KR_BRN = 'kr_brn';
const TYPE_KZ_BIN = 'kz_bin';
const TYPE_LA_TIN = 'la_tin';
const TYPE_LI_UID = 'li_uid';
const TYPE_LI_VAT = 'li_vat';
const TYPE_MA_VAT = 'ma_vat';

View file

@ -53,7 +53,7 @@ class Token extends ApiResource
* href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a>
* is <code>application</code>, which includes Custom accounts.
*
* @param null|array{account?: array{business_type?: string, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_declaration_shown_and_signed?: bool, ownership_exemption_reason?: null|string, phone?: string, registration_number?: string, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|StripeObject, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, tos_shown_and_accepted?: bool}, bank_account?: array{account_holder_name?: string, account_holder_type?: string, account_number: string, account_type?: string, country: string, currency?: string, payment_method?: string, routing_number?: string}, card?: array|string, customer?: string, cvc_update?: array{cvc: string}, expand?: string[], person?: array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|StripeObject, nationality?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, pii?: array{id_number?: string}} $params
* @param null|array{account?: array{business_type?: string, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_declaration_shown_and_signed?: bool, ownership_exemption_reason?: null|string, phone?: string, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|StripeObject, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, tos_shown_and_accepted?: bool}, bank_account?: array{account_holder_name?: string, account_holder_type?: string, account_number: string, account_type?: string, country: string, currency?: string, payment_method?: string, routing_number?: string}, card?: array|string, customer?: string, cvc_update?: array{cvc: string}, expand?: string[], person?: array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|StripeObject, nationality?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, us_cfpb_data?: array{ethnicity_details?: array{ethnicity?: string[], ethnicity_other?: string}, race_details?: array{race?: string[], race_other?: string}, self_identified_gender?: string}, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, pii?: array{id_number?: string}} $params
* @param null|array|string $options
*
* @return Token the created resource

View file

@ -6,5 +6,5 @@ namespace Stripe\Util;
class ApiVersion
{
const CURRENT = '2025-03-31.basil';
const CURRENT = '2025-04-30.basil';
}

View file

@ -8,6 +8,7 @@ class EventTypes
// The beginning of the section generated from our OpenAPI spec
\Stripe\Events\V1BillingMeterErrorReportTriggeredEvent::LOOKUP_TYPE => \Stripe\Events\V1BillingMeterErrorReportTriggeredEvent::class,
\Stripe\Events\V1BillingMeterNoMeterFoundEvent::LOOKUP_TYPE => \Stripe\Events\V1BillingMeterNoMeterFoundEvent::class,
\Stripe\Events\V2CoreEventDestinationPingEvent::LOOKUP_TYPE => \Stripe\Events\V2CoreEventDestinationPingEvent::class,
// The end of the section generated from our OpenAPI spec
];
}

View file

@ -29,7 +29,7 @@ class PhpToken implements \Stringable
public $text;
/**
* @var int
* @var -1|positive-int
*/
public $line;
@ -38,6 +38,9 @@ class PhpToken implements \Stringable
*/
public $pos;
/**
* @param -1|positive-int $line
*/
public function __construct(int $id, string $text, int $line = -1, int $position = -1)
{
$this->id = $id;
@ -80,7 +83,7 @@ class PhpToken implements \Stringable
}
/**
* @return static[]
* @return list<static>
*/
public static function tokenize(string $code, int $flags = 0): array
{

View file

@ -218,6 +218,7 @@ foreach ($options["processor"] as $processor) {
}
$analyser = new ReflectionAnalyser([new DocBlockAnnotationFactory(), new AttributeAnnotationFactory()]);
$analyser->setGenerator($generator);
$openapi = $generator
->setVersion($options['version'])

View file

@ -5,14 +5,14 @@
"bin": [
"bin/openapi"
],
"description": "swagger-php - Generate interactive documentation for your RESTful API using phpdoc annotations",
"description": "Generate interactive documentation for your RESTful API using PHP attributes (preferred) or PHPDoc annotations",
"keywords": [
"json",
"rest",
"api",
"service discovery"
],
"homepage": "https://github.com/zircote/swagger-php/",
"homepage": "https://github.com/zircote/swagger-php",
"authors": [
{
"name": "Robert Allen",

View file

@ -8,11 +8,9 @@ namespace OpenApi\Analysers;
use OpenApi\Analysis;
use OpenApi\Context;
use OpenApi\Generator;
use OpenApi\GeneratorAwareInterface;
interface AnalyserInterface
interface AnalyserInterface extends GeneratorAwareInterface
{
public function setGenerator(Generator $generator): void;
public function fromFile(string $filename, Context $context): Analysis;
}

View file

@ -8,17 +8,15 @@ namespace OpenApi\Analysers;
use OpenApi\Annotations as OA;
use OpenApi\Context;
use OpenApi\Generator;
use OpenApi\GeneratorAwareInterface;
interface AnnotationFactoryInterface
interface AnnotationFactoryInterface extends GeneratorAwareInterface
{
/**
* Checks if this factory is supported by the current runtime.
*/
public function isSupported(): bool;
public function setGenerator(Generator $generator): void;
/**
* @return array<OA\AbstractAnnotation> top level annotations
*/

View file

@ -9,11 +9,19 @@ namespace OpenApi\Analysers;
use OpenApi\Annotations as OA;
use OpenApi\Context;
use OpenApi\Generator;
use OpenApi\GeneratorAwareTrait;
class AttributeAnnotationFactory implements AnnotationFactoryInterface
{
use GeneratorAwareTrait;
protected bool $ignoreOtherAttributes = false;
public function __construct(bool $ignoreOtherAttributes = false)
{
$this->ignoreOtherAttributes = $ignoreOtherAttributes;
}
public function isSupported(): bool
{
return \PHP_VERSION_ID >= 80100;
@ -36,7 +44,11 @@ class AttributeAnnotationFactory implements AnnotationFactoryInterface
/** @var OA\AbstractAnnotation[] $annotations */
$annotations = [];
try {
foreach ($reflector->getAttributes() as $attribute) {
$attributeName = $this->ignoreOtherAttributes
? [OA\AbstractAnnotation::class, \ReflectionAttribute::IS_INSTANCEOF]
: [];
foreach ($reflector->getAttributes(...$attributeName) as $attribute) {
if (class_exists($attribute->getName())) {
$instance = $attribute->newInstance();
if ($instance instanceof OA\AbstractAnnotation) {
@ -59,6 +71,7 @@ class AttributeAnnotationFactory implements AnnotationFactoryInterface
foreach ($rp->getAttributes($attributeName, \ReflectionAttribute::IS_INSTANCEOF) as $attribute) {
/** @var OA\Property|OA\Parameter|OA\RequestBody $instance */
$instance = $attribute->newInstance();
$instance->_context = new Context(['nested' => false], $context);
$type = (($rnt = $rp->getType()) && $rnt instanceof \ReflectionNamedType) ? $rnt->getName() : Generator::UNDEFINED;
$nullable = $rnt ? $rnt->allowsNull() : true;

Some files were not shown because too many files have changed in this diff Show more