chore(vendor): 依赖 Vendor 升级测试

This commit is contained in:
2025-12-04 08:39:14 +08:00
parent ff666975da
commit 09ed1bd427
3230 changed files with 390984 additions and 25429 deletions

View File

@@ -40,9 +40,10 @@
"yunwuxin/think-cron": "^3.0", "yunwuxin/think-cron": "^3.0",
"ezyang/htmlpurifier": "^4.16" "ezyang/htmlpurifier": "^4.16"
}, },
"require-dev": { "require-dev": {
"symfony/var-dumper": "4.4.41", "symfony/var-dumper": "4.4.41",
"topthink/think-trace":"1.4" "topthink/think-trace":"1.4",
"phpunit/phpunit": "^7.5"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

1716
src/composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,137 +1,159 @@
# ChangeLog - Aliyun OSS SDK for PHP # ChangeLog - Aliyun OSS SDK for PHP
## v2.5.0 / 2022-05-13 ## v2.7.2 / 2024-10-28
* Added: support bucket transfer acceleration. * Added: presign supports response-* parameters
* Added: support bucket cname token. * Added: forcePathStyle option.
* Added: support listobjectsV2.
## v2.7.1 / 2024-02-28
## v2.4.3 / 2021-08-25 * Fixed: fix deprecated
* Fixed: integer overflow in PHP5.x.
## v2.7.0 / 2024-02-02
## v2.4.2 / 2021-06-04 * Added: support signature version 4.
* Compatible with PHP8. * Added: support checkObjectEndcoding option.
* Fixed: compatible with PHP5.4. * Added: support strictObjectName option.
* Fixed: the signature is incorrect in some scenarios * Added: support filePathCompatible option.
* Update: change $requestUrl from a member variable to a local variable. * Added: support path style.
* Added: support environment variables credentials provider.
## v2.4.1 / 2020-09-29 * Update: add filed for some api.
* Fixed: the getBucketPolicy bug. * Fixed: fix some bugs.
## v2.6.0 / 2022-08-03
## v2.4.0 / 2020-08-31 * Added: support credentials provider.
* Fixed: compatible with swoole curl handler.
* Added: disable Expect: 100-continue * Added: support more bucket stat info.
* Added: support getBucketInfo
* Added: support getBucketStat ## v2.5.0 / 2022-05-13
* Added: support bucket policy * Added: support bucket transfer acceleration.
* Added: support bucket encryption * Added: support bucket cname token.
* Added: support bucket tagging * Added: support listobjectsV2.
* Added: support bucket worm
* Added: support versioning ## v2.4.3 / 2021-08-25
* Added: support request payment * Fixed: integer overflow in PHP5.x.
* Added: support object tagging
* Added: support code archive ## v2.4.2 / 2021-06-04
* Added: support process object * Compatible with PHP8.
* Added: support traffic limit paramter * Fixed: compatible with PHP5.4.
* Added: support upload object from file handle * Fixed: the signature is incorrect in some scenarios
* Added: support getSimplifiedObjectMeta * Update: change $requestUrl from a member variable to a local variable.
* Fixed: the object name can not be '0' stirng.
* Update: endpoint validity check ## v2.4.1 / 2020-09-29
* Update: add new pre-signed url api * Fixed: the getBucketPolicy bug.
## v2.3.1 / 2019-01-15 ## v2.4.0 / 2020-08-31
* translate chinese comments into english * Added: disable Expect: 100-continue
* Added: endpoint validity check * Added: support getBucketInfo
* Added: support getBucketStat
## v2.3.0 / 2018-01-05 * Added: support bucket policy
* Added: support bucket encryption
* Fixed: putObject support creating empty files * Added: support bucket tagging
* Fixed: createBucket support IA/Archive * Added: support bucket worm
* Added: support restoreObject * Added: support versioning
* Added: support the Symlink feature * Added: support request payment
* Added: support getBucketLocation * Added: support object tagging
* Added: support getBucketMeta * Added: support code archive
* Added: support proxy server Proxy * Added: support process object
* Added: support traffic limit paramter
## v2.2.4 / 2017-04-25 * Added: support upload object from file handle
* Added: support getSimplifiedObjectMeta
* Fixed getObject to local file bug * Fixed: the object name can not be '0' stirng.
* Update: endpoint validity check
## v2.2.3 / 2017-04-14 * Update: add new pre-signed url api
* Fixed md5 check
## v2.3.1 / 2019-01-15
## v2.2.2 / 2017-01-18
* translate chinese comments into english
* Resolve to run the connection number and memory bug on php7 * Added: endpoint validity check
## v2.2.1 / 2016-12-01 ## v2.3.0 / 2018-01-05
* No HTTP curl is allowed to automatically populate accept-encoding * Fixed: putObject support creating empty files
* Fixed: createBucket support IA/Archive
## v2.2.0 / 2016-11-22 * Added: support restoreObject
* Added: support the Symlink feature
* Fixed PutObject/CompleteMultipartUpload return values(#26) * Added: support getBucketLocation
* Added: support getBucketMeta
## v2.1.0 / 2016-11-12 * Added: support proxy server Proxy
* Added[RTMP](https://help.aliyun.com/document_detail/44297.html)interface ## v2.2.4 / 2017-04-25
* Add support[image service](https://help.aliyun.com/document_detail/44686.html)
* Fixed getObject to local file bug
## v2.0.7 / 2016-06-17
## v2.2.3 / 2017-04-14
* Support append object
* Fixed md5 check
## v2.0.6
## v2.2.2 / 2017-01-18
* Trim access key id/secret and endpoint
* Refine tests and setup travis CI * Resolve to run the connection number and memory bug on php7
## v2.0.5 ## v2.2.1 / 2016-12-01
* Added Add/Delete/Get BucketCname interface * No HTTP curl is allowed to automatically populate accept-encoding
## v2.0.4 ## v2.2.0 / 2016-11-22
* Added Put/Get Object Acl interface * Fixed PutObject/CompleteMultipartUpload return values(#26)
## v2.0.3 ## v2.1.0 / 2016-11-12
* Fixing the constants in Util is defined in a PHP version that is less than 5.6. * Added[RTMP](https://help.aliyun.com/document_detail/44297.html)interface
* Add support[image service](https://help.aliyun.com/document_detail/44686.html)
## v2.0.2
## v2.0.7 / 2016-06-17
* The problem of content-type cannot be specified when restoring multipart uploads
* Support append object
## v2.0.1
## v2.0.6
* Increase the ListObjects/ListMultipartUploads special characters
* Provides the interface to get the details of the OssException * Trim access key id/secret and endpoint
* Refine tests and setup travis CI
## 2015.11.25 ## v2.0.5
* **Large version upgrade, no longer compatible with previous interface, new version has made great improvements to ease of use, suggesting that users migrate to a new version.** * Added Add/Delete/Get BucketCname interface
## Modify the content ## v2.0.4
* PHP 5.2 is no longer supported * Added Put/Get Object Acl interface
### Add the cotent ## v2.0.3
* Introduce namespace * Fixing the constants in Util is defined in a PHP version that is less than 5.6.
* Interface naming and modification, using hump naming
* The interface is modified, and the common parameters are extracted from the Options parameter. ## v2.0.2
* The interface returns the result modification, processing the return result, and the user can directly get the data structure easily processed 
* OssClient's constructor changes * The problem of content-type cannot be specified when restoring multipart uploads
* The Endpoint address that support CNAME and IP formats
* Rearrange the sample file organization structure and use function to organize the function points ## v2.0.1
* Add an interface that sets the connection timeout and requests timeout
* Remove the outdated interface associated with the Object Group * Increase the ListObjects/ListMultipartUploads special characters
* The message in the OssException is changed to English * Provides the interface to get the details of the OssException
### Repair problem
## 2015.11.25
* The object name is not complete
* **Large version upgrade, no longer compatible with previous interface, new version has made great improvements to ease of use, suggesting that users migrate to a new version.**
## Modify the content
* PHP 5.2 is no longer supported
### Add the cotent
* Introduce namespace
* Interface naming and modification, using hump naming
* The interface is modified, and the common parameters are extracted from the Options parameter.
* The interface returns the result modification, processing the return result, and the user can directly get the data structure easily processed 
* OssClient's constructor changes
* The Endpoint address that support CNAME and IP formats
* Rearrange the sample file organization structure and use function to organize the function points
* Add an interface that sets the connection timeout and requests timeout
* Remove the outdated interface associated with the Object Group
* The message in the OssException is changed to English
### Repair problem
* The object name is not complete

View File

@@ -1,150 +1,150 @@
# Alibaba Cloud OSS SDK for PHP # Alibaba Cloud OSS SDK for PHP
[![Latest Stable Version](https://poser.pugx.org/aliyuncs/oss-sdk-php/v/stable)](https://packagist.org/packages/aliyuncs/oss-sdk-php) [![Latest Stable Version](https://poser.pugx.org/aliyuncs/oss-sdk-php/v/stable)](https://packagist.org/packages/aliyuncs/oss-sdk-php)
[![Build Status](https://travis-ci.org/aliyun/aliyun-oss-php-sdk.svg?branch=master)](https://travis-ci.org/aliyun/aliyun-oss-php-sdk) [![Build Status](https://travis-ci.org/aliyun/aliyun-oss-php-sdk.svg?branch=master)](https://travis-ci.org/aliyun/aliyun-oss-php-sdk)
[![Coverage Status](https://coveralls.io/repos/github/aliyun/aliyun-oss-php-sdk/badge.svg?branch=master)](https://coveralls.io/github/aliyun/aliyun-oss-php-sdk?branch=master) [![Coverage Status](https://coveralls.io/repos/github/aliyun/aliyun-oss-php-sdk/badge.svg?branch=master)](https://coveralls.io/github/aliyun/aliyun-oss-php-sdk?branch=master)
## [README of Chinese](https://github.com/aliyun/aliyun-oss-php-sdk/blob/master/README-CN.md) ## [README of Chinese](https://github.com/aliyun/aliyun-oss-php-sdk/blob/master/README-CN.md)
## Overview ## Overview
Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring a massive capacity, security, a low cost, and high reliability. You can upload and download data on any application anytime and anywhere by calling APIs, and perform simple management of data through the web console. The OSS can store any type of files and therefore applies to various websites, development enterprises and developers. Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring a massive capacity, security, a low cost, and high reliability. You can upload and download data on any application anytime and anywhere by calling APIs, and perform simple management of data through the web console. The OSS can store any type of files and therefore applies to various websites, development enterprises and developers.
## Run environment ## Run environment
- PHP 5.3+. - PHP 5.3+.
- cURL extension. - cURL extension.
Tips: Tips:
- In Ubuntu, you can use the ***apt-get*** package manager to install the *PHP cURL extension*: `sudo apt-get install php5-curl`. - In Ubuntu, you can use the ***apt-get*** package manager to install the *PHP cURL extension*: `sudo apt-get install php5-curl`.
## Install OSS PHP SDK ## Install OSS PHP SDK
- If you use the ***composer*** to manage project dependencies, run the following command in your project's root directory: - If you use the ***composer*** to manage project dependencies, run the following command in your project's root directory:
composer require aliyuncs/oss-sdk-php composer require aliyuncs/oss-sdk-php
You can also declare the dependency on Alibaba Cloud OSS SDK for PHP in the `composer.json` file. You can also declare the dependency on Alibaba Cloud OSS SDK for PHP in the `composer.json` file.
"require": { "require": {
"aliyuncs/oss-sdk-php": "~2.0" "aliyuncs/oss-sdk-php": "~2.0"
} }
Then run `composer install` to install the dependency. After the Composer Dependency Manager is installed, import the dependency in your PHP code: Then run `composer install` to install the dependency. After the Composer Dependency Manager is installed, import the dependency in your PHP code:
require_once __DIR__ . '/vendor/autoload.php'; require_once __DIR__ . '/vendor/autoload.php';
- You can also directly download the packaged [PHAR File][releases-page], and - You can also directly download the packaged [PHAR File][releases-page], and
introduce the file to your code: introduce the file to your code:
require_once '/path/to/oss-sdk-php.phar'; require_once '/path/to/oss-sdk-php.phar';
- Download the SDK source code, and introduce the `autoload.php` file under the SDK directory to your code: - Download the SDK source code, and introduce the `autoload.php` file under the SDK directory to your code:
require_once '/path/to/oss-sdk/autoload.php'; require_once '/path/to/oss-sdk/autoload.php';
## Quick use ## Quick use
### Common classes ### Common classes
| Class | Explanation | | Class | Explanation |
|:------------------|:------------------------------------| |:------------------|:------------------------------------|
|OSS\OssClient | OSS client class. An OssClient instance can be used to call the interface. | |OSS\OssClient | OSS client class. An OssClient instance can be used to call the interface. |
|OSS\Core\OssException |OSS Exception class . You only need to pay attention to this exception when you use the OssClient. | |OSS\Core\OssException |OSS Exception class . You only need to pay attention to this exception when you use the OssClient. |
### Initialize an OssClient ### Initialize an OssClient
The SDK's operations for the OSS are performed through the OssClient class. The code below creates an OssClient object: The SDK's operations for the OSS are performed through the OssClient class. The code below creates an OssClient object:
```php ```php
<?php <?php
$accessKeyId = "<AccessKeyID that you obtain from OSS>"; $accessKeyId = "<AccessKeyID that you obtain from OSS>";
$accessKeySecret = "<AccessKeySecret that you obtain from OSS>"; $accessKeySecret = "<AccessKeySecret that you obtain from OSS>";
$endpoint = "<Domain that you select to access an OSS data center, such as "oss-cn-hangzhou.aliyuncs.com>"; $endpoint = "<Domain that you select to access an OSS data center, such as "oss-cn-hangzhou.aliyuncs.com>";
try { try {
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint); $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint);
} catch (OssException $e) { } catch (OssException $e) {
print $e->getMessage(); print $e->getMessage();
} }
``` ```
### Operations on objects ### Operations on objects
Objects are the most basic data units on the OSS. You can simply consider objects as files. The following code uploads an object: Objects are the most basic data units on the OSS. You can simply consider objects as files. The following code uploads an object:
```php ```php
<?php <?php
$bucket= "<Name of the bucket in use. Pay attention to naming conventions>"; $bucket= "<Name of the bucket in use. Pay attention to naming conventions>";
$object = "<Name of the object in use. Pay attention to naming conventions>"; $object = "<Name of the object in use. Pay attention to naming conventions>";
$content = "Hello, OSS!"; // Content of the uploaded file $content = "Hello, OSS!"; // Content of the uploaded file
try { try {
$ossClient->putObject($bucket, $object, $content); $ossClient->putObject($bucket, $object, $content);
} catch (OssException $e) { } catch (OssException $e) {
print $e->getMessage(); print $e->getMessage();
} }
``` ```
### Operations on buckets ### Operations on buckets
Buckets are the space that you use to manage the stored objects. It is an object management unit for users. Each object must belong to a bucket. You can create a bucket with the following code: Buckets are the space that you use to manage the stored objects. It is an object management unit for users. Each object must belong to a bucket. You can create a bucket with the following code:
```php ```php
<?php <?php
$bucket= "<Name of the bucket in use. Pay attention to naming conventions>"; $bucket= "<Name of the bucket in use. Pay attention to naming conventions>";
try { try {
$ossClient->createBucket($bucket); $ossClient->createBucket($bucket);
} catch (OssException $e) { } catch (OssException $e) {
print $e->getMessage(); print $e->getMessage();
} }
``` ```
### Handle returned results ### Handle returned results
The OssClient provides the following two types of returned data from interfaces: The OssClient provides the following two types of returned data from interfaces:
- Put and Delete interfaces: The *PUT* and *DELETE* operations are deemed successful if *null* is returned by the interfaces without *OSSException*. - Put and Delete interfaces: The *PUT* and *DELETE* operations are deemed successful if *null* is returned by the interfaces without *OSSException*.
- Get and List interfaces: The *GET* and *LIST* operations are deemed successful if the desired data is returned by the interfaces without *OSSException*. For example, - Get and List interfaces: The *GET* and *LIST* operations are deemed successful if the desired data is returned by the interfaces without *OSSException*. For example,
```php ```php
<?php <?php
$bucketListInfo = $ossClient->listBuckets(); $bucketListInfo = $ossClient->listBuckets();
$bucketList = $bucketListInfo->getBucketList(); $bucketList = $bucketListInfo->getBucketList();
foreach($bucketList as $bucket) { foreach($bucketList as $bucket) {
print($bucket->getLocation() . "\t" . $bucket->getName() . "\t" . $bucket->getCreateDate() . "\n"); print($bucket->getLocation() . "\t" . $bucket->getName() . "\t" . $bucket->getCreateDate() . "\n");
} }
``` ```
In the above code, $bucketListInfo falls into the 'OSS\Model\BucketListInfo' data type. In the above code, $bucketListInfo falls into the 'OSS\Model\BucketListInfo' data type.
### Run a sample project ### Run a sample project
- Modify `samples/Config.php` to complete the configuration information. - Modify `samples/Config.php` to complete the configuration information.
- Run `cd samples/ && php RunAll.php`. - Run `cd samples/ && php RunAll.php`.
### Run a unit test ### Run a unit test
- Run `composer install` to download the dependent libraries. - Run `composer install` to download the dependent libraries.
- Set the environment variable. - Set the environment variable.
export OSS_ACCESS_KEY_ID=access-key-id export OSS_ACCESS_KEY_ID=access-key-id
export OSS_ACCESS_KEY_SECRET=access-key-secret export OSS_ACCESS_KEY_SECRET=access-key-secret
export OSS_ENDPOINT=endpoint export OSS_ENDPOINT=endpoint
export OSS_BUCKET=bucket-name export OSS_BUCKET=bucket-name
- Run `php vendor/bin/phpunit` - Run `php vendor/bin/phpunit`
## License ## License
- MIT - MIT
## Contact us ## Contact us
- [Alibaba Cloud OSS official website](http://oss.aliyun.com). - [Alibaba Cloud OSS official website](http://oss.aliyun.com).
- [Alibaba Cloud OSS official forum](http://bbs.aliyun.com). - [Alibaba Cloud OSS official forum](http://bbs.aliyun.com).
- [Alibaba Cloud OSS official documentation center](http://www.aliyun.com/product/oss#Docs). - [Alibaba Cloud OSS official documentation center](http://www.aliyun.com/product/oss#Docs).
- Alibaba Cloud official technical support: [Submit a ticket](https://workorder.console.aliyun.com/#/ticket/createIndex). - Alibaba Cloud official technical support: [Submit a ticket](https://workorder.console.aliyun.com/#/ticket/createIndex).
[releases-page]: https://github.com/aliyun/aliyun-oss-php-sdk/releases [releases-page]: https://github.com/aliyun/aliyun-oss-php-sdk/releases
[phar-composer]: https://github.com/clue/phar-composer [phar-composer]: https://github.com/clue/phar-composer

View File

@@ -15,7 +15,7 @@
}, },
"require-dev" : { "require-dev" : {
"phpunit/phpunit": "*", "phpunit/phpunit": "*",
"satooshi/php-coveralls": "*" "php-coveralls/php-coveralls": "*"
}, },
"minimum-stability": "stable", "minimum-stability": "stable",
"autoload": { "autoload": {

View File

@@ -26,7 +26,39 @@ Common::println("bucket $bucket corsConfig created:" . $corsConfig->serializeToX
// Get cors configuration // Get cors configuration
$corsConfig = $ossClient->getBucketCors($bucket); $corsConfig = $ossClient->getBucketCors($bucket);
Common::println("bucket $bucket corsConfig fetched:" . $corsConfig->serializeToXml());
if ($corsConfig->getResponseVary()){
printf("Response Vary : true" .PHP_EOL);
}else{
printf("Response Vary : false" .PHP_EOL);
}
foreach ($corsConfig->getRules() as $key => $rule){
if($rule->getAllowedHeaders()){
foreach($rule->getAllowedHeaders() as $header){
printf("Allowed Headers :" .$header .PHP_EOL);
}
}
if ($rule->getAllowedMethods()){
foreach($rule->getAllowedMethods() as $method){
printf("Allowed Methods :" .$method . PHP_EOL);
}
}
if($rule->getAllowedOrigins()){
foreach($rule->getAllowedOrigins() as $origin){
printf("Allowed Origins :" .$origin , PHP_EOL);
}
}
if($rule->getExposeHeaders()){
foreach($rule->getExposeHeaders() as $exposeHeader){
printf("Expose Headers :" .$exposeHeader . PHP_EOL);
}
}
printf("Max Age Seconds :" .$rule->getMaxAgeSeconds() .PHP_EOL);
}
// Delete cors configuration // Delete cors configuration
$ossClient->deleteBucketCors($bucket); $ossClient->deleteBucketCors($bucket);
@@ -78,13 +110,44 @@ function getBucketCors($ossClient, $bucket)
$corsConfig = null; $corsConfig = null;
try { try {
$corsConfig = $ossClient->getBucketCors($bucket); $corsConfig = $ossClient->getBucketCors($bucket);
if ($corsConfig->getResponseVary()){
printf("Response Vary : true" .PHP_EOL);
}else{
printf("Response Vary : false" .PHP_EOL);
}
foreach ($corsConfig->getRules() as $key => $rule){
if($rule->getAllowedHeaders()){
foreach($rule->getAllowedHeaders() as $header){
printf("Allowed Headers :" .$header .PHP_EOL);
}
}
if ($rule->getAllowedMethods()){
foreach($rule->getAllowedMethods() as $method){
printf("Allowed Methods :" .$method . PHP_EOL);
}
}
if($rule->getAllowedOrigins()){
foreach($rule->getAllowedOrigins() as $origin){
printf("Allowed Origins :" .$origin , PHP_EOL);
}
}
if($rule->getExposeHeaders()){
foreach($rule->getExposeHeaders() as $exposeHeader){
printf("Expose Headers :" .$exposeHeader . PHP_EOL);
}
}
printf("Max Age Seconds :" .$rule->getMaxAgeSeconds() .PHP_EOL);
}
} catch (OssException $e) { } catch (OssException $e) {
printf(__FUNCTION__ . ": FAILED\n"); printf(__FUNCTION__ . ": FAILED\n");
printf($e->getMessage() . "\n"); printf($e->getMessage() . "\n");
return; return;
} }
print(__FUNCTION__ . ": OK" . "\n"); print(__FUNCTION__ . ": OK" . "\n");
print($corsConfig->serializeToXml() . "\n");
} }
/** /**

View File

@@ -0,0 +1,65 @@
<?php
require_once __DIR__ . '/Common.php';
use OSS\OssClient;
use OSS\Core\OssException;
$ossClient = Common::getOssClient();
if (is_null($ossClient)) exit(1);
$bucket = Common::getBucketName();
//******************************* Simple Usage****************************************************************
// Get Bucket Stat
$stat = $ossClient->getBucketStat($bucket);
Common::println("Bucket ".$bucket." current storage is:".$stat->getStorage().PHP_EOL);
Common::println("Bucket ".$bucket." object count is:".$stat->getObjectCount().PHP_EOL);
Common::println("Bucket ".$bucket." multipart upload count is:".$stat->getMultipartUploadCount().PHP_EOL);
Common::println("Bucket ".$bucket." live channel count is:".$stat->getLiveChannelCount().PHP_EOL);
Common::println("Bucket ".$bucket." last modified time is:".$stat->getLastModifiedTime().PHP_EOL);
Common::println("Bucket ".$bucket." standard storage is:".$stat->getStandardStorage().PHP_EOL);
Common::println("Bucket ".$bucket." standard object count is:".$stat->getStandardObjectCount().PHP_EOL);
Common::println("Bucket ".$bucket." infrequent access storage is:".$stat->getInfrequentAccessStorage().PHP_EOL);
Common::println("Bucket ".$bucket." infrequent access real storage is:".$stat->getInfrequentAccessRealStorage().PHP_EOL);
Common::println("Bucket ".$bucket." infrequent access object count is:".$stat->getInfrequentAccessObjectCount().PHP_EOL);
Common::println("Bucket ".$bucket." archive storage is:".$stat->getArchiveStorage().PHP_EOL);
Common::println("Bucket ".$bucket." archive real storage is:".$stat->getArchiveRealStorage().PHP_EOL);
Common::println("Bucket ".$bucket." archive object count is:".$stat->getArchiveObjectCount().PHP_EOL);
Common::println("Bucket ".$bucket." cold archive storage is:".$stat->getColdArchiveStorage().PHP_EOL);
Common::println("Bucket ".$bucket." cold archive real storage is:".$stat->getColdArchiveRealStorage().PHP_EOL);
Common::println("Bucket ".$bucket." cold archive object count is:".$stat->getColdArchiveObjectCount().PHP_EOL);
//******************************* For complete usage, see the following functions ****************************************************
getBucketStat($ossClient,$bucket);
/**
* get bucket stat
* @param OssClient $ossClient OssClient instance
* @param string $bucket Name of the bucket to create
* @return null
*/
function getBucketStat($ossClient, $bucket)
{
try {
$stat = $ossClient->getBucketStat($bucket);
} catch (OssException $e) {
printf(__FUNCTION__ . ": FAILED\n");
printf($e->getMessage() . "\n");
return;
}
printf("Bucket ".$bucket." current storage is:".$stat->getStorage().PHP_EOL);
printf("Bucket ".$bucket." object count is:".$stat->getObjectCount().PHP_EOL);
printf("Bucket ".$bucket." multipart upload count is:".$stat->getMultipartUploadCount().PHP_EOL);
printf("Bucket ".$bucket." live channel count is:".$stat->getLiveChannelCount().PHP_EOL);
printf("Bucket ".$bucket." last modified time is:".$stat->getLastModifiedTime().PHP_EOL);
printf("Bucket ".$bucket." standard storage is:".$stat->getStandardStorage().PHP_EOL);
printf("Bucket ".$bucket." standard object count is:".$stat->getStandardObjectCount().PHP_EOL);
printf("Bucket ".$bucket." infrequent access storage is:".$stat->getInfrequentAccessStorage().PHP_EOL);
printf("Bucket ".$bucket." infrequent access real storage is:".$stat->getInfrequentAccessRealStorage().PHP_EOL);
printf("Bucket ".$bucket." infrequent access object count is:".$stat->getInfrequentAccessObjectCount().PHP_EOL);
printf("Bucket ".$bucket." archive storage is:".$stat->getArchiveStorage().PHP_EOL);
printf("Bucket ".$bucket." archive real storage is:".$stat->getArchiveRealStorage().PHP_EOL);
printf("Bucket ".$bucket." archive object count is:".$stat->getArchiveObjectCount().PHP_EOL);
printf("Bucket ".$bucket." cold archive storage is:".$stat->getColdArchiveStorage().PHP_EOL);
printf("Bucket ".$bucket." cold archive real storage is:".$stat->getColdArchiveRealStorage().PHP_EOL);
printf("Bucket ".$bucket." cold archive object count is:".$stat->getColdArchiveObjectCount().PHP_EOL);
print(__FUNCTION__ . ": OK" . "\n");
}

View File

@@ -0,0 +1,76 @@
<?php
//=============================================================================
//How to use credentials-php to access oss
// step 1:Install credentials-php composer require alibabacloud/credentials
require_once __DIR__ . '/Common.php';
use OSS\OssClient;
use OSS\Core\OssException;
use OSS\Credentials\CredentialsProvider;
use AlibabaCloud\Credentials\Credential;
use OSS\Credentials\StaticCredentialsProvider;
// public provider conversion class
class AlibabaCloudCredentialsWrapper implements CredentialsProvider{
/**
* @var Credential
*/
private $warpper;
public function __construct($credential){
$this->warpper = $credential;
}
public function getCredentials(){
$ak = $this->warpper->getAccessKeyId();
$sk = $this->warpper->getAccessKeySecret();
$token = $this->warpper->getSecurityToken();
return new StaticCredentialsProvider($ak, $sk, $token);
}
}
$bucket = Common::getBucketName();
//AccessKey Credentials demo
$credential = new Credential(array(
'type' => 'access_key',
'access_key_id' => '<access_key_id>',
'access_key_secret' => '<accessKey_secret>',
));
$providerWarpper = new AlibabaCloudCredentialsWrapper($credential);
$config = array(
'provider' => $providerWarpper,
'endpoint'=> '<endpoint>'
);
try {
$ossClient = new OssClient($config);
$ossClient->putObject($bucket,'c.file','hi oss,this is credentials test of access key');
$result = $ossClient->getObject($bucket,'c.file');
var_dump($result);
} catch (OssException $e) {
printf($e->getMessage() . "\n");
return;
}
// EcsRamRole Credentials demo
$ecsRamRole = new Credential(array(
'type' => 'ecs_ram_role',
'role_name' => 'EcsRamRoleOssTest',
));
$providerWarpper = new AlibabaCloudCredentialsWrapper($ecsRamRole);
$bucket = 'oss-bucket-cd-yp-test';
$config = array(
'provider' => $providerWarpper,
'endpoint'=> '<endpoint>'
);
try {
$ossClient = new OssClient($config);
$ossClient->putObject($bucket,'c.file','hi oss,this is credentials test of EcsRamRole');
$result = $ossClient->getObject($bucket,'c.file');
var_dump($result);
} catch (OssException $e) {
printf($e->getMessage() . "\n");
return;
}

View File

@@ -0,0 +1,63 @@
<?php
require_once __DIR__ . '/Common.php';
use OSS\OssClient;
use OSS\Core\OssException;
use OSS\Credentials\StaticCredentialsProvider;
use OSS\Credentials\EnvironmentVariableCredentialsProvider;
$bucket = Common::getBucketName();
// Access Key Provider demo
$id = '<access_key_id>';
$secret = '<accessKey_secret>';
$provider = new StaticCredentialsProvider($id,$secret);
$config = array(
'provider' => $provider,
'endpoint'=>'<endpoint>'
);
try {
$ossClient = new OssClient($config);
$ossClient->putObject($bucket,'c.file','hi oss,this is credentials test of access key provider');
$result = $ossClient->getObject($bucket,'c.file');
var_dump($result);
} catch (OssException $e) {
printf($e->getMessage() . "\n");
return;
}
// Sts provider demo
$id = '<access_key_id>';
$secret = '<accessKey_secret>';
$token = '<security_token>';
$provider = new StaticCredentialsProvider($id,$secret,$token);
$config = array(
'provider' => $provider,
'endpoint'=> "<endpoint>"
);
try {
$ossClient = new OssClient($config);
$ossClient->putObject($bucket,'c.file','hi oss,this is credentials test of sts provider');
$result = $ossClient->getObject($bucket,'c.file');
var_dump($result);
} catch (OssException $e) {
printf($e->getMessage() . "\n");
return;
}
// read from env
$envProvider = new EnvironmentVariableCredentialsProvider();
$config = array(
'provider' => $envProvider,
'endpoint'=> "<endpoint>"
);
try {
$ossClient = new OssClient($config);
$ossClient->putObject($bucket,'c.file','hi oss,this is credentials test of sts provider');
$result = $ossClient->getObject($bucket,'c.file');
var_dump($result);
} catch (OssException $e) {
printf($e->getMessage() . "\n");
return;
}

View File

@@ -55,7 +55,7 @@ $day = 3;
$tier = 'Expedited'; $tier = 'Expedited';
$config = new RestoreConfig($day,$tier); $config = new RestoreConfig($day,$tier);
$options = array( $options = array(
OssClient::OSS_RESTORE_CONFIG => $config OssClient::OSS_RESTORE_CONFIG => $config
); );
$ossClient->restoreObject($bucket, 'b.file',$options); $ossClient->restoreObject($bucket, 'b.file',$options);
@@ -93,9 +93,9 @@ $content = "hello world";
// The speed limit is 100 KB/s, which is 819200 bit/s. // The speed limit is 100 KB/s, which is 819200 bit/s.
$options = array( $options = array(
OssClient::OSS_HEADERS => array( OssClient::OSS_HEADERS => array(
OssClient::OSS_TRAFFIC_LIMIT => 819200, OssClient::OSS_TRAFFIC_LIMIT => 819200,
)); ));
// Speed limit upload. // Speed limit upload.
$ossClient->putObject($bucket, $object, $content, $options); $ossClient->putObject($bucket, $object, $content, $options);
@@ -205,7 +205,7 @@ function uploadFile($ossClient, $bucket)
} }
/** /**
* Lists all files and folders in the bucket. * Lists all files and folders in the bucket.
* Note if there's more items than the max-keys specified, the caller needs to use the nextMarker returned as the value for the next call's maker paramter. * Note if there's more items than the max-keys specified, the caller needs to use the nextMarker returned as the value for the next call's maker paramter.
* Loop through all the items returned from ListObjects. * Loop through all the items returned from ListObjects.
* *
@@ -227,30 +227,47 @@ function listObjects($ossClient, $bucket)
); );
try { try {
$listObjectInfo = $ossClient->listObjects($bucket, $options); $listObjectInfo = $ossClient->listObjects($bucket, $options);
printf("Bucket Name: %s". "\n",$listObjectInfo->getBucketName());
printf("Prefix: %s". "\n",$listObjectInfo->getPrefix());
printf("Marker: %s". "\n",$listObjectInfo->getMarker());
printf("Next Marker: %s". "\n",$listObjectInfo->getNextMarker());
printf("Max Keys: %s". "\n",$listObjectInfo->getMaxKeys());
printf("Delimiter: %s". "\n",$listObjectInfo->getDelimiter());
printf("Is Truncated: %s". "\n",$listObjectInfo->getIsTruncated());
$objectList = $listObjectInfo->getObjectList(); // object list
$prefixList = $listObjectInfo->getPrefixList(); // directory list
if (!empty($objectList)) {
print("objectList:\n");
foreach ($objectList as $objectInfo) {
printf("Object Name: %s". "\n",$objectInfo->getKey());
printf("Object Size: %s". "\n",$objectInfo->getSize());
printf("Object Type: %s". "\n",$objectInfo->getType());
printf("Object ETag: %s". "\n",$objectInfo->getETag());
printf("Object Last Modified: %s". "\n",$objectInfo->getLastModified());
printf("Object Storage Class: %s". "\n",$objectInfo->getStorageClass());
if ($objectInfo->getRestoreInfo()){
printf("Restore Info: %s". "\n",$objectInfo->getRestoreInfo() );
}
if($objectInfo->getOwner()){
printf("Owner Id:".$objectInfo->getOwner()->getId() . "\n");
printf("Owner Name:".$objectInfo->getOwner()->getDisplayName() . "\n");
}
}
}
if (!empty($prefixList)) {
print("prefixList: \n");
foreach ($prefixList as $prefixInfo) {
printf("Common Prefix:%s\n",$prefixInfo->getPrefix());
}
}
} catch (OssException $e) { } catch (OssException $e) {
printf(__FUNCTION__ . ": FAILED\n"); printf(__FUNCTION__ . ": FAILED\n");
printf($e->getMessage() . "\n"); printf($e->getMessage() . "\n");
return; return;
} }
print(__FUNCTION__ . ": OK" . "\n"); print(__FUNCTION__ . ": OK" . "\n");
$objectList = $listObjectInfo->getObjectList(); // object list
$prefixList = $listObjectInfo->getPrefixList(); // directory list
if (!empty($objectList)) {
print("objectList:\n");
foreach ($objectList as $objectInfo) {
print($objectInfo->getKey() . "\n");
if($objectInfo->getOwner() != null){
printf("owner id:".$objectInfo->getOwner()->getId() . "\n");
printf("owner name:".$objectInfo->getOwner()->getDisplayName() . "\n");
}
}
}
if (!empty($prefixList)) {
print("prefixList: \n");
foreach ($prefixList as $prefixInfo) {
print($prefixInfo->getPrefix() . "\n");
}
}
} }
/** /**
@@ -264,42 +281,61 @@ function listObjects($ossClient, $bucket)
*/ */
function listObjectsV2($ossClient, $bucket) function listObjectsV2($ossClient, $bucket)
{ {
$prefix = 'oss-php-sdk-test/'; $prefix = 'oss-php-sdk-test/';
$delimiter = '/'; $delimiter = '/';
$maxkeys = 1000; $maxkeys = 1000;
$options = array( $options = array(
'delimiter' => $delimiter, 'delimiter' => $delimiter,
'prefix' => $prefix, 'prefix' => $prefix,
'max-keys' => $maxkeys, 'max-keys' => $maxkeys,
'start-after' =>'test-object', 'start-after' =>'test-object',
'fetch-owner' =>'true', 'fetch-owner' =>'true',
); );
try { try {
$listObjectInfo = $ossClient->listObjectsV2($bucket, $options); $listObjectInfo = $ossClient->listObjectsV2($bucket, $options);
} catch (OssException $e) { printf("Bucket Name: %s". "\n",$listObjectInfo->getBucketName());
printf(__FUNCTION__ . ": FAILED\n"); printf("Prefix: %s". "\n",$listObjectInfo->getPrefix());
printf($e->getMessage() . "\n"); printf("Next Continuation Token: %s". "\n",$listObjectInfo->getNextContinuationToken());
return; printf("Continuation Token: %s". "\n",$listObjectInfo->getContinuationToken());
} printf("Max Keys: %s". "\n",$listObjectInfo->getMaxKeys());
print(__FUNCTION__ . ": OK" . "\n"); printf("Key Count: %s". "\n",$listObjectInfo->getKeyCount());
$objectList = $listObjectInfo->getObjectList(); // object list printf("Delimiter: %s". "\n",$listObjectInfo->getDelimiter());
$prefixList = $listObjectInfo->getPrefixList(); // directory list printf("Is Truncated: %s". "\n",$listObjectInfo->getIsTruncated());
if (!empty($objectList)) { printf("Start After: %s". "\n",$listObjectInfo->getStartAfter());
print("objectList:\n"); $objectList = $listObjectInfo->getObjectList(); // object list
foreach ($objectList as $objectInfo) { $prefixList = $listObjectInfo->getPrefixList(); // directory list
print($objectInfo->getKey() . "\n"); if (!empty($objectList)) {
if($objectInfo->getOwner() != null){ print("objectList:\n");
printf("owner id:".$objectInfo->getOwner()->getId() . "\n"); foreach ($objectList as $objectInfo) {
printf("owner name:".$objectInfo->getOwner()->getDisplayName() . "\n"); printf("Object Name: %s". "\n",$objectInfo->getKey());
} printf("Object Size: %s". "\n",$objectInfo->getSize());
} printf("Object Type: %s". "\n",$objectInfo->getType());
} printf("Object ETag: %s". "\n",$objectInfo->getETag());
if (!empty($prefixList)) { printf("Object Last Modified: %s". "\n",$objectInfo->getLastModified());
print("prefixList: \n"); printf("Object Storage Class: %s". "\n",$objectInfo->getStorageClass());
foreach ($prefixList as $prefixInfo) {
print($prefixInfo->getPrefix() . "\n"); if ($objectInfo->getRestoreInfo()){
} printf("Restore Info: %s". "\n",$objectInfo->getRestoreInfo() );
} }
if($objectInfo->getOwner()){
printf("Owner Id:".$objectInfo->getOwner()->getId() . "\n");
printf("Owner Name:".$objectInfo->getOwner()->getDisplayName() . "\n");
}
}
}
if (!empty($prefixList)) {
print("prefixList: \n");
foreach ($prefixList as $prefixInfo) {
printf("Common Prefix:%s\n",$prefixInfo->getPrefix());
}
}
} catch (OssException $e) {
printf(__FUNCTION__ . ": FAILED\n");
printf($e->getMessage() . "\n");
return;
}
print(__FUNCTION__ . ": OK" . "\n");
} }
/** /**
@@ -623,20 +659,20 @@ function doesObjectExist($ossClient, $bucket)
*/ */
function putObjectSpeed($ossClient, $bucket) function putObjectSpeed($ossClient, $bucket)
{ {
$object = "upload-test-object-name.txt"; $object = "upload-test-object-name.txt";
$content = file_get_contents(__FILE__); $content = file_get_contents(__FILE__);
$options = array( $options = array(
OssClient::OSS_HEADERS => array( OssClient::OSS_HEADERS => array(
OssClient::OSS_TRAFFIC_LIMIT => 819200, OssClient::OSS_TRAFFIC_LIMIT => 819200,
)); ));
try { try {
$ossClient->putObject($bucket, $object, $content, $options); $ossClient->putObject($bucket, $object, $content, $options);
} catch (OssException $e) { } catch (OssException $e) {
printf(__FUNCTION__ . ": FAILED\n"); printf(__FUNCTION__ . ": FAILED\n");
printf($e->getMessage() . "\n"); printf($e->getMessage() . "\n");
return; return;
} }
print(__FUNCTION__ . ": OK" . "\n"); print(__FUNCTION__ . ": OK" . "\n");
} }
/** /**
@@ -648,19 +684,19 @@ function putObjectSpeed($ossClient, $bucket)
*/ */
function getObjectSpeed($ossClient, $bucket) function getObjectSpeed($ossClient, $bucket)
{ {
$object = "upload-test-object-name.txt"; $object = "upload-test-object-name.txt";
$options = array( $options = array(
OssClient::OSS_HEADERS => array( OssClient::OSS_HEADERS => array(
OssClient::OSS_TRAFFIC_LIMIT => 819200, OssClient::OSS_TRAFFIC_LIMIT => 819200,
)); ));
try { try {
$ossClient->getObject($bucket, $object, $options); $ossClient->getObject($bucket, $object, $options);
} catch (OssException $e) { } catch (OssException $e) {
printf(__FUNCTION__ . ": FAILED\n"); printf(__FUNCTION__ . ": FAILED\n");
printf($e->getMessage() . "\n"); printf($e->getMessage() . "\n");
return; return;
} }
print(__FUNCTION__ . ": OK" . "\n"); print(__FUNCTION__ . ": OK" . "\n");
} }
/** /**
@@ -672,14 +708,14 @@ function getObjectSpeed($ossClient, $bucket)
*/ */
function signUrlSpeedUpload($ossClient, $bucket) function signUrlSpeedUpload($ossClient, $bucket)
{ {
$object = "upload-test-object-name.txt"; $object = "upload-test-object-name.txt";
$timeout = 120; $timeout = 120;
$options = array( $options = array(
OssClient::OSS_TRAFFIC_LIMIT => 819200, OssClient::OSS_TRAFFIC_LIMIT => 819200,
); );
$timeout = 60; $timeout = 60;
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "PUT", $options); $signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "PUT", $options);
print($signedUrl); print($signedUrl);
} }
@@ -692,14 +728,14 @@ function signUrlSpeedUpload($ossClient, $bucket)
*/ */
function signUrlSpeedDownload($ossClient, $bucket) function signUrlSpeedDownload($ossClient, $bucket)
{ {
$object = "upload-test-object-name.txt"; $object = "upload-test-object-name.txt";
$timeout = 120; $timeout = 120;
$options = array( $options = array(
OssClient::OSS_TRAFFIC_LIMIT => 819200, OssClient::OSS_TRAFFIC_LIMIT => 819200,
); );
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "GET", $options); $signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "GET", $options);
print($signedUrl); print($signedUrl);
print(__FUNCTION__ . ": OK" . "\n"); print(__FUNCTION__ . ": OK" . "\n");
} }
/** /**
@@ -711,19 +747,19 @@ function signUrlSpeedDownload($ossClient, $bucket)
*/ */
function restoreObject($ossClient, $bucket) function restoreObject($ossClient, $bucket)
{ {
$object = "oss-php-sdk-test/upload-test-object-name.txt"; $object = "oss-php-sdk-test/upload-test-object-name.txt";
$day = 3; $day = 3;
$tier = 'Expedited'; $tier = 'Expedited';
$config = new RestoreConfig($day,$tier); $config = new RestoreConfig($day,$tier);
$options = array( $options = array(
OssClient::OSS_RESTORE_CONFIG => $config OssClient::OSS_RESTORE_CONFIG => $config
); );
try { try {
$ossClient->restoreObject($bucket, $object,$options); $ossClient->restoreObject($bucket, $object,$options);
} catch (OssException $e) { } catch (OssException $e) {
printf(__FUNCTION__ . ": FAILED\n"); printf(__FUNCTION__ . ": FAILED\n");
printf($e->getMessage() . "\n"); printf($e->getMessage() . "\n");
return; return;
} }
print(__FUNCTION__ . ": OK" . "\n"); print(__FUNCTION__ . ": OK" . "\n");
} }

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,63 @@
<?php
namespace OSS\Credentials;
use OSS\Core\OssException;
/**
* Basic implementation of the OSS Credentials that allows callers to
* pass in the OSS Access Key and OSS Secret Access Key in the constructor.
*/
class Credentials
{
private $key;
private $secret;
private $token;
/**
* Constructor a new BasicOSSCredentials object, with the specified OSS
* access key and OSS secret key
*
* @param string $key OSS access key ID
* @param string $secret OSS secret access key
* @param string $token Security token to use
*/
public function __construct($key, $secret, $token = null)
{
if (empty($key)) {
throw new OssException("access key id is empty");
}
if (empty($secret)) {
throw new OssException("access key secret is empty");
}
$this->key = trim($key);
$this->secret = trim($secret);
$this->token = $token;
}
/**
* @return string
*/
public function getAccessKeyId()
{
return $this->key;
}
/**
* @return string
*/
public function getAccessKeySecret()
{
return $this->secret;
}
/**
* @return string|null
*/
public function getSecurityToken()
{
return $this->token;
}
}

View File

@@ -0,0 +1,11 @@
<?php
namespace OSS\Credentials;
interface CredentialsProvider
{
/**
* @return Credentials
*/
public function getCredentials();
}

View File

@@ -0,0 +1,20 @@
<?php
namespace OSS\Credentials;
use OSS\Core\OssException;
class EnvironmentVariableCredentialsProvider implements CredentialsProvider
{
/**
* @return Credentials
* @throws OssException
*/
public function getCredentials()
{
$ak= getenv('OSS_ACCESS_KEY_ID');
$sk = getenv('OSS_ACCESS_KEY_SECRET');
$token = getenv('OSS_SESSION_TOKEN');
return new Credentials($ak, $sk, $token);
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace OSS\Credentials;
/**
* Basic implementation of the OSS Credentials interface that allows callers to
* pass in the OSS Access Key Id and OSS Secret Access Key in the constructor.
*/
class StaticCredentialsProvider implements CredentialsProvider
{
/**
* @var Credentials
*/
private $credentials;
/**
* Constructs a new StaticCredentialsProvider object, with the specified OSS
* access key and OSS secret key
*
* @param string $key OSS access key ID
* @param string $secret OSS access key secret
* @param string $token Security token to use
*/
public function __construct($key, $secret, $token = null)
{
$this->credentials = new Credentials($key, $secret, $token);
}
/**
* @return Credentials
*/
public function getCredentials()
{
return $this->credentials;
}
}

View File

@@ -170,7 +170,7 @@ class RequestCore
public $registered_streaming_write_callback = null; public $registered_streaming_write_callback = null;
/** /**
* The request timeout time, which is 5,184,000 seconds,that is, 6 days by default * The request timeout time, which is 5,184,000 seconds,that is, 60 days by default
* *
* @var int * @var int
*/ */
@@ -789,7 +789,7 @@ class RequestCore
} }
// As long as this came back as a valid resource or CurlHandle instance... // As long as this came back as a valid resource or CurlHandle instance...
if (is_resource($curl_handle) || (is_object($curl_handle) && get_class($curl_handle) === 'CurlHandle')) { if (is_resource($curl_handle) || (is_object($curl_handle) && in_array(get_class($curl_handle),array('CurlHandle','Swoole\Curl\Handler', 'Swoole\Coroutine\Curl\Handle'),true))) {
// Determine what's what. // Determine what's what.
$header_size = curl_getinfo($curl_handle, CURLINFO_HEADER_SIZE); $header_size = curl_getinfo($curl_handle, CURLINFO_HEADER_SIZE);
$this->response_headers = substr($this->response, 0, $header_size); $this->response_headers = substr($this->response, 0, $header_size);

View File

@@ -41,6 +41,135 @@ class BucketStat
return $this->multipartUploadCount; return $this->multipartUploadCount;
} }
/**
* Get live channel count
*
* @return int
*/
public function getLiveChannelCount()
{
return $this->liveChannelCount;
}
/**
* Get last modified time
*
* @return int
*/
public function getLastModifiedTime()
{
return $this->lastModifiedTime;
}
/**
* Get standard storage
*
* @return int
*/
public function getStandardStorage()
{
return $this->standardStorage;
}
/**
* Get standard object count
*
* @return int
*/
public function getStandardObjectCount()
{
return $this->standardObjectCount;
}
/**
* Get infrequent access storage
*
* @return int
*/
public function getInfrequentAccessStorage()
{
return $this->infrequentAccessStorage;
}
/**
* Get infrequent access real storage
*
* @return int
*/
public function getInfrequentAccessRealStorage()
{
return $this->infrequentAccessRealStorage;
}
/**
* Get infrequent access object count
*
* @return int
*/
public function getInfrequentAccessObjectCount()
{
return $this->infrequentAccessObjectCount;
}
/**
* Get archive storage
*
* @return int
*/
public function getArchiveStorage()
{
return $this->archiveStorage;
}
/**
* Get archive real storage
*
* @return int
*/
public function getArchiveRealStorage()
{
return $this->archiveRealStorage;
}
/**
* Get archive object count
*
* @return int
*/
public function getArchiveObjectCount()
{
return $this->archiveObjectCount;
}
/**
* Get cold archive storage
*
* @return int
*/
public function getColdArchiveStorage()
{
return $this->coldArchiveStorage;
}
/**
* Get cold archive real storage
*
* @return int
*/
public function getColdArchiveRealStorage()
{
return $this->coldArchiveRealStorage;
}
/**
* Get cold archive object count
*
* @return int
*/
public function getColdArchiveObjectCount()
{
return $this->coldArchiveObjectCount;
}
/** /**
* Parse stat from the xml. * Parse stat from the xml.
* *
@@ -60,6 +189,45 @@ class BucketStat
if (isset($xml->MultipartUploadCount) ) { if (isset($xml->MultipartUploadCount) ) {
$this->multipartUploadCount = intval($xml->MultipartUploadCount); $this->multipartUploadCount = intval($xml->MultipartUploadCount);
} }
if (isset($xml->LiveChannelCount) ) {
$this->liveChannelCount = intval($xml->LiveChannelCount);
}
if (isset($xml->LastModifiedTime) ) {
$this->lastModifiedTime = intval($xml->LastModifiedTime);
}
if (isset($xml->StandardStorage) ) {
$this->standardStorage = intval($xml->StandardStorage);
}
if (isset($xml->StandardObjectCount) ) {
$this->standardObjectCount = intval($xml->StandardObjectCount);
}
if (isset($xml->InfrequentAccessStorage) ) {
$this->infrequentAccessStorage = intval($xml->InfrequentAccessStorage);
}
if (isset($xml->InfrequentAccessRealStorage) ) {
$this->infrequentAccessRealStorage = intval($xml->InfrequentAccessRealStorage);
}
if (isset($xml->InfrequentAccessObjectCount) ) {
$this->infrequentAccessObjectCount = intval($xml->InfrequentAccessObjectCount);
}
if (isset($xml->ArchiveStorage) ) {
$this->archiveStorage = intval($xml->ArchiveStorage);
}
if (isset($xml->ArchiveRealStorage) ) {
$this->archiveRealStorage = intval($xml->ArchiveRealStorage);
}
if (isset($xml->ArchiveObjectCount) ) {
$this->archiveObjectCount = intval($xml->ArchiveObjectCount);
}
if (isset($xml->ColdArchiveStorage) ) {
$this->coldArchiveStorage = intval($xml->ColdArchiveStorage);
}
if (isset($xml->ColdArchiveRealStorage) ) {
$this->coldArchiveRealStorage = intval($xml->ColdArchiveRealStorage);
}
if (isset($xml->ColdArchiveObjectCount) ) {
$this->coldArchiveObjectCount = intval($xml->ColdArchiveObjectCount);
}
} }
/** /**
@@ -82,4 +250,82 @@ class BucketStat
*/ */
private $multipartUploadCount; private $multipartUploadCount;
/**
* live channel count
* @var int
*/
private $liveChannelCount;
/**
* last modified time
* @var int
*/
private $lastModifiedTime;
/**
* standard storage
* @var int
*/
private $standardStorage;
/**
* standard object count
* @var int
*/
private $standardObjectCount;
/**
* infrequent access storage
* @var int
*/
private $infrequentAccessStorage;
/**
* infrequent access real storage
* @var int
*/
private $infrequentAccessRealStorage;
/**
* infrequent access object Count
* @var int
*/
private $infrequentAccessObjectCount;
/**
* archive storage
* @var int
*/
private $archiveStorage;
/**
* archive real storage
* @var int
*/
private $archiveRealStorage;
/**
* archive object count
* @var int
*/
private $archiveObjectCount;
/**
* cold archive storage
* @var int
*/
private $coldArchiveStorage;
/**
* cold archive real storage
* @var int
*/
private $coldArchiveRealStorage;
/**
* cold archive object count
* @var int
*/
private $coldArchiveObjectCount;
} }

View File

@@ -45,10 +45,26 @@ class CorsConfig implements XmlConfig
} }
$this->rules[] = $rule; $this->rules[] = $rule;
} }
/**
* @param boolean $value
*/
public function setResponseVary($value)
{
$this->responseVary = $value;
}
/**
* @return boolean
*/
public function getResponseVary(){
if (isset($this->responseVary)) {
return $this->responseVary;
}
return false;
}
/** /**
* Parse CorsConfig from the xml. * Parse CorsConfig from the xml.
*
* @param string $strXml * @param string $strXml
* @throws OssException * @throws OssException
* @return null * @return null
@@ -56,6 +72,10 @@ class CorsConfig implements XmlConfig
public function parseFromXml($strXml) public function parseFromXml($strXml)
{ {
$xml = simplexml_load_string($strXml); $xml = simplexml_load_string($strXml);
if(isset($xml->ResponseVary)){
$this->responseVary =
(strval($xml->ResponseVary) === 'TRUE' || strval($xml->ResponseVary) === 'true') ? true : false;
}
if (!isset($xml->CORSRule)) return; if (!isset($xml->CORSRule)) return;
foreach ($xml->CORSRule as $rule) { foreach ($xml->CORSRule as $rule) {
$corsRule = new CorsRule(); $corsRule = new CorsRule();
@@ -74,7 +94,6 @@ class CorsConfig implements XmlConfig
} }
$this->addRule($corsRule); $this->addRule($corsRule);
} }
return;
} }
/** /**
@@ -89,6 +108,13 @@ class CorsConfig implements XmlConfig
$xmlRule = $xml->addChild('CORSRule'); $xmlRule = $xml->addChild('CORSRule');
$rule->appendToXml($xmlRule); $rule->appendToXml($xmlRule);
} }
if(isset($this->responseVary)){
if ($this->responseVary) {
$xml->addChild('ResponseVary', 'true');
} else {
$xml->addChild('ResponseVary', 'false');
}
}
return $xml->asXML(); return $xml->asXML();
} }
@@ -110,4 +136,5 @@ class CorsConfig implements XmlConfig
* @var CorsRule[] * @var CorsRule[]
*/ */
private $rules = array(); private $rules = array();
private $responseVary;
} }

View File

@@ -24,8 +24,10 @@ class ObjectInfo
* @param string $type * @param string $type
* @param string $size * @param string $size
* @param string $storageClass * @param string $storageClass
* @param Owner|null $owner
* @param null $restoreInfo
*/ */
public function __construct($key, $lastModified, $eTag, $type, $size, $storageClass) public function __construct($key, $lastModified, $eTag, $type, $size, $storageClass,$owner=null,$restoreInfo=null)
{ {
$this->key = $key; $this->key = $key;
$this->lastModified = $lastModified; $this->lastModified = $lastModified;
@@ -33,6 +35,8 @@ class ObjectInfo
$this->type = $type; $this->type = $type;
$this->size = $size; $this->size = $size;
$this->storageClass = $storageClass; $this->storageClass = $storageClass;
$this->owner = $owner;
$this->restoreInfo = $restoreInfo;
} }
/** /**
@@ -94,10 +98,32 @@ class ObjectInfo
return $this->storageClass; return $this->storageClass;
} }
/**
* @return string
*/
public function getRestoreInfo()
{
return $this->restoreInfo;
}
/**
* @return Owner|null
*/
public function getOwner()
{
return $this->owner;
}
private $key = ""; private $key = "";
private $lastModified = ""; private $lastModified = "";
private $eTag = ""; private $eTag = "";
private $type = ""; private $type = "";
private $size = "0"; private $size = "0";
private $storageClass = ""; private $storageClass = "";
/**
* @var Owner
*/
private $owner;
private $restoreInfo;
} }

View File

@@ -22,7 +22,7 @@ class ObjectVersionListInfo
* @param string $nextVersionIdMarker * @param string $nextVersionIdMarker
* @param string $maxKeys * @param string $maxKeys
* @param string $delimiter * @param string $delimiter
* @param null $isTruncated * @param null|string $isTruncated
* @param array $objectversionList * @param array $objectversionList
* @param array $deleteMarkerList * @param array $deleteMarkerList
* @param array $prefixList * @param array $prefixList
@@ -151,7 +151,7 @@ class ObjectVersionListInfo
private $prefix = ""; private $prefix = "";
private $keyMarker = ""; private $keyMarker = "";
private $nextKeyMarker = ""; private $nextKeyMarker = "";
private $versionIdmarker = ""; private $versionIdMarker = "";
private $nextVersionIdMarker = ""; private $nextVersionIdMarker = "";
private $maxKeys = 0; private $maxKeys = 0;
private $delimiter = ""; private $delimiter = "";

View File

@@ -0,0 +1,46 @@
<?php
namespace OSS\Model;
/**
* Class Owner
*
* ListObjects return owner list of classes
* The returned data contains two arrays
* One is to get the list of objects【Can be understood as the corresponding file system file list】
* One is to get owner list
*
*/
class Owner
{
/**
* OwnerInfo constructor.
* @param $id string
* @param $displayName string
*/
public function __construct($id, $displayName)
{
$this->id = $id;
$this->displayName = $displayName;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
private $id;
private $displayName;
}

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,7 @@ use OSS\Model\CnameTokenInfo;
class CreateBucketCnameTokenResult extends Result class CreateBucketCnameTokenResult extends Result
{ {
/** /**
* @return CnameConfig * @return CnameTokenInfo
*/ */
protected function parseDataFromResponse() protected function parseDataFromResponse()
{ {

View File

@@ -16,7 +16,7 @@ class GetBucketInfoResult extends Result
/** /**
* Parse data from response * Parse data from response
* *
* @return string * @return BucketInfo
* @throws OssException * @throws OssException
*/ */
protected function parseDataFromResponse() protected function parseDataFromResponse()

View File

@@ -7,7 +7,7 @@ use OSS\Model\GetLiveChannelHistory;
class GetLiveChannelHistoryResult extends Result class GetLiveChannelHistoryResult extends Result
{ {
/** /**
* @return * @return GetLiveChannelHistory
*/ */
protected function parseDataFromResponse() protected function parseDataFromResponse()
{ {

View File

@@ -7,7 +7,7 @@ use OSS\Model\GetLiveChannelInfo;
class GetLiveChannelInfoResult extends Result class GetLiveChannelInfoResult extends Result
{ {
/** /**
* @return * @return GetLiveChannelInfo
*/ */
protected function parseDataFromResponse() protected function parseDataFromResponse()
{ {

View File

@@ -2,6 +2,7 @@
namespace OSS\Result; namespace OSS\Result;
use OSS\Core\OssException;
use OSS\Core\OssUtil; use OSS\Core\OssUtil;
use OSS\Model\ObjectVersionInfo; use OSS\Model\ObjectVersionInfo;
use OSS\Model\ObjectVersionListInfo; use OSS\Model\ObjectVersionListInfo;
@@ -17,11 +18,12 @@ class ListObjectVersionsResult extends Result
/** /**
* Parse the xml data returned by the ListObjectVersions interface * Parse the xml data returned by the ListObjectVersions interface
* *
* return ObjectVersionListInfo * @return ObjectVersionListInfo
* @throws OssException
*/ */
protected function parseDataFromResponse() protected function parseDataFromResponse()
{ {
$xml = simplexml_load_string($this->rawResponse->body); $xml = simplexml_load_string($this->rawResponse->body);
$encodingType = isset($xml->EncodingType) ? strval($xml->EncodingType) : ""; $encodingType = isset($xml->EncodingType) ? strval($xml->EncodingType) : "";
$objectVersionList = $this->parseObjecVersionList($xml, $encodingType); $objectVersionList = $this->parseObjecVersionList($xml, $encodingType);
$deleteMarkerList = $this->parseDeleteMarkerList($xml, $encodingType); $deleteMarkerList = $this->parseDeleteMarkerList($xml, $encodingType);
@@ -40,8 +42,8 @@ class ListObjectVersionsResult extends Result
$delimiter = OssUtil::decodeKey($delimiter, $encodingType); $delimiter = OssUtil::decodeKey($delimiter, $encodingType);
$isTruncated = isset($xml->IsTruncated) ? strval($xml->IsTruncated) : ""; $isTruncated = isset($xml->IsTruncated) ? strval($xml->IsTruncated) : "";
return new ObjectVersionListInfo($bucketName, $prefix, $keyMarker, $nextKeyMarker, return new ObjectVersionListInfo($bucketName, $prefix, $keyMarker, $nextKeyMarker,
$versionIdMarker, $nextVersionIdMarker,$maxKeys, $delimiter, $isTruncated, $versionIdMarker, $nextVersionIdMarker, $maxKeys, $delimiter, $isTruncated,
$objectVersionList, $deleteMarkerList, $prefixList); $objectVersionList, $deleteMarkerList, $prefixList);
} }

View File

@@ -2,9 +2,11 @@
namespace OSS\Result; namespace OSS\Result;
use OSS\Core\OssException;
use OSS\Core\OssUtil; use OSS\Core\OssUtil;
use OSS\Model\ObjectInfo; use OSS\Model\ObjectInfo;
use OSS\Model\ObjectListInfo; use OSS\Model\ObjectListInfo;
use OSS\Model\Owner;
use OSS\Model\PrefixInfo; use OSS\Model\PrefixInfo;
/** /**
@@ -16,7 +18,8 @@ class ListObjectsResult extends Result
/** /**
* Parse the xml data returned by the ListObjects interface * Parse the xml data returned by the ListObjects interface
* *
* return ObjectListInfo * @return ObjectListInfo
* @throws OssException
*/ */
protected function parseDataFromResponse() protected function parseDataFromResponse()
{ {
@@ -50,7 +53,13 @@ class ListObjectsResult extends Result
$type = isset($content->Type) ? strval($content->Type) : ""; $type = isset($content->Type) ? strval($content->Type) : "";
$size = isset($content->Size) ? strval($content->Size) : "0"; $size = isset($content->Size) ? strval($content->Size) : "0";
$storageClass = isset($content->StorageClass) ? strval($content->StorageClass) : ""; $storageClass = isset($content->StorageClass) ? strval($content->StorageClass) : "";
$retList[] = new ObjectInfo($key, $lastModified, $eTag, $type, $size, $storageClass); if(isset($content->Owner)){
$owner = new Owner(strval($content->Owner->ID),strval($content->Owner->DisplayName));
}else{
$owner = null;
}
$restoreInfo= isset($content->RestoreInfo) ? strval($content->RestoreInfo) : null;
$retList[] = new ObjectInfo($key, $lastModified, $eTag, $type, $size, $storageClass,$owner,$restoreInfo);
} }
} }
return $retList; return $retList;

View File

@@ -2,9 +2,11 @@
namespace OSS\Result; namespace OSS\Result;
use OSS\Core\OssException;
use OSS\Core\OssUtil; use OSS\Core\OssUtil;
use OSS\Model\ObjectInfo; use OSS\Model\ObjectInfo;
use OSS\Model\ObjectListInfoV2; use OSS\Model\ObjectListInfoV2;
use OSS\Model\Owner;
use OSS\Model\PrefixInfo; use OSS\Model\PrefixInfo;
/** /**
@@ -16,7 +18,8 @@ class ListObjectsV2Result extends Result
/** /**
* Parse the xml data returned by the ListObjectsV2 interface * Parse the xml data returned by the ListObjectsV2 interface
* *
* return ObjectListInfoV2 * @return ObjectListInfoV2
* @throws OssException
*/ */
protected function parseDataFromResponse() protected function parseDataFromResponse()
{ {
@@ -34,7 +37,7 @@ class ListObjectsV2Result extends Result
$continuationToken = isset($xml->ContinuationToken) ? strval($xml->ContinuationToken) : ""; $continuationToken = isset($xml->ContinuationToken) ? strval($xml->ContinuationToken) : "";
$nextContinuationToken = isset($xml->NextContinuationToken) ? strval($xml->NextContinuationToken) : ""; $nextContinuationToken = isset($xml->NextContinuationToken) ? strval($xml->NextContinuationToken) : "";
$startAfter = isset($xml->StartAfter) ? strval($xml->StartAfter) : ""; $startAfter = isset($xml->StartAfter) ? strval($xml->StartAfter) : "";
$startAfter = OssUtil::decodeKey($startAfter, $encodingType); $startAfter = OssUtil::decodeKey($startAfter, $encodingType);
$keyCount = isset($xml->KeyCount) ? intval($xml->KeyCount) : 0; $keyCount = isset($xml->KeyCount) ? intval($xml->KeyCount) : 0;
return new ObjectListInfoV2($bucketName, $prefix, $maxKeys, $delimiter, $isTruncated, $objectList, $prefixList, $continuationToken, $nextContinuationToken, $startAfter, $keyCount); return new ObjectListInfoV2($bucketName, $prefix, $maxKeys, $delimiter, $isTruncated, $objectList, $prefixList, $continuationToken, $nextContinuationToken, $startAfter, $keyCount);
} }
@@ -51,7 +54,13 @@ class ListObjectsV2Result extends Result
$type = isset($content->Type) ? strval($content->Type) : ""; $type = isset($content->Type) ? strval($content->Type) : "";
$size = isset($content->Size) ? strval($content->Size) : "0"; $size = isset($content->Size) ? strval($content->Size) : "0";
$storageClass = isset($content->StorageClass) ? strval($content->StorageClass) : ""; $storageClass = isset($content->StorageClass) ? strval($content->StorageClass) : "";
$retList[] = new ObjectInfo($key, $lastModified, $eTag, $type, $size, $storageClass); if(isset($content->Owner)){
$owner = new Owner(strval($content->Owner->ID),strval($content->Owner->DisplayName));
}else{
$owner = null;
}
$restoreInfo= isset($content->RestoreInfo) ? strval($content->RestoreInfo) : null;
$retList[] = new ObjectInfo($key, $lastModified, $eTag, $type, $size, $storageClass,$owner,$restoreInfo);
} }
} }
return $retList; return $retList;

View File

@@ -109,10 +109,29 @@ abstract class Result
if (empty($body) || false === strpos($body, '<?xml')) { if (empty($body) || false === strpos($body, '<?xml')) {
return ''; return '';
} }
$xml = simplexml_load_string($body); $flag = false;
if (isset($xml->Message)) { try {
return strval($xml->Message); $xml = simplexml_load_string($body);
if (isset($xml->Message)) {
return strval($xml->Message);
}
$flag = true;
} catch (\Exception $e) {
$flag = true;
} }
if ($flag === true) {
$start = strpos($body, '<Message>');
if ($start === false) {
return '';
}
$start += 9;
$end = strpos($body, '</Message>', $start);
if ($end === false) {
return '';
}
return substr($body, $start, $end - $start);
}
return ''; return '';
} }
@@ -127,10 +146,29 @@ abstract class Result
if (empty($body) || false === strpos($body, '<?xml')) { if (empty($body) || false === strpos($body, '<?xml')) {
return ''; return '';
} }
$xml = simplexml_load_string($body); $flag = false;
if (isset($xml->Code)) { try {
return strval($xml->Code); $xml = simplexml_load_string($body);
if (isset($xml->Code)) {
return strval($xml->Code);
}
$flag = true;
} catch (\Exception $e) {
$flag = true;
} }
if ($flag === true) {
$start = strpos($body, '<Code>');
if ($start === false) {
return '';
}
$start += 6;
$end = strpos($body, '</Code>', $start);
if ($end === false) {
return '';
}
return substr($body, $start, $end - $start);
}
return ''; return '';
} }

View File

@@ -0,0 +1,12 @@
<?php
namespace OSS\Signer;
use OSS\Http\RequestCore;
use OSS\Credentials\Credentials;
interface SignerInterface
{
public function sign(RequestCore $request, Credentials $credentials, array &$options);
public function presign(RequestCore $request, Credentials $credentials, array &$options);
}

View File

@@ -0,0 +1,161 @@
<?php
namespace OSS\Signer;
use OSS\Core\OssUtil;
use OSS\Http\RequestCore;
use OSS\Credentials\Credentials;
class SignerV1 implements SignerInterface
{
public function sign(RequestCore $request, Credentials $credentials, array &$options)
{
// Date
if (!isset($request->request_headers['Date'])) {
$request->add_header('Date', gmdate('D, d M Y H:i:s \G\M\T'));
}
// Credentials information
if (!empty($credentials->getSecurityToken())) {
$request->add_header("x-oss-security-token", $credentials->getSecurityToken());
}
$headers = $request->request_headers;
$method = strtoupper($request->method);
$date = $headers['Date'];
$resourcePath = $this->getResourcePath($options);
$queryString = parse_url($request->request_url, PHP_URL_QUERY);
$query = array();
if ($queryString !== null) {
parse_str($queryString, $query);
}
$stringToSign = $this->calcStringToSign($method, $date, $headers, $resourcePath, $query);
// printf("sign str:%s" . PHP_EOL, $stringToSign);
$options['string_to_sign'] = $stringToSign;
$signature = base64_encode(hash_hmac('sha1', $stringToSign, $credentials->getAccessKeySecret(), true));
$request->add_header('Authorization', 'OSS ' . $credentials->getAccessKeyId() . ':' . $signature);
}
public function presign(RequestCore $request, Credentials $credentials, array &$options)
{
$headers = $request->request_headers;
// Date
$expiration = $options['expiration'];
if (!isset($request->request_headers['Date'])) {
$request->add_header('Date', gmdate('D, d M Y H:i:s \G\M\T'));
}
$parsed_url = parse_url($request->request_url);
$queryString = isset($parsed_url['query']) ? $parsed_url['query'] : '';
$query = array();
if ($queryString !== null) {
parse_str($queryString, $query);
}
// Credentials information
if (!empty($credentials->getSecurityToken())) {
$query["security-token"] = $credentials->getSecurityToken();
}
$method = strtoupper($request->method);
$date = $expiration . "";
$resourcePath = $this->getResourcePath($options);
$stringToSign = $this->calcStringToSign($method, $date, $headers, $resourcePath, $query);
$options['string_to_sign'] = $stringToSign;
$signature = base64_encode(hash_hmac('sha1', $stringToSign, $credentials->getAccessKeySecret(), true));
$query['OSSAccessKeyId'] = $credentials->getAccessKeyId();
$query['Expires'] = $date;
$query['Signature'] = $signature;
$queryString = OssUtil::toQueryString($query);
$parsed_url['query'] = $queryString;
$request->request_url = OssUtil::unparseUrl($parsed_url);
}
private function getResourcePath(array $options)
{
$resourcePath = '/';
if (strlen($options['bucket']) > 0) {
$resourcePath .= $options['bucket'] . '/';
}
if (strlen($options['key']) > 0) {
$resourcePath .= $options['key'];
}
return $resourcePath;
}
private function calcStringToSign($method, $date, array $headers, $resourcePath, array $query)
{
/*
SignToString =
VERB + "\n"
+ Content-MD5 + "\n"
+ Content-Type + "\n"
+ Date + "\n"
+ CanonicalizedOSSHeaders
+ CanonicalizedResource
Signature = base64(hmac-sha1(AccessKeySecret, SignToString))
*/
$contentMd5 = '';
$contentType = '';
// CanonicalizedOSSHeaders
$signheaders = array();
foreach ($headers as $key => $value) {
$lowk = strtolower($key);
if (strncmp($lowk, "x-oss-", 6) == 0) {
$signheaders[$lowk] = $value;
} else if ($lowk === 'content-md5') {
$contentMd5 = $value;
} else if ($lowk === 'content-type') {
$contentType = $value;
}
}
ksort($signheaders);
$canonicalizedOSSHeaders = '';
foreach ($signheaders as $key => $value) {
$canonicalizedOSSHeaders .= $key . ':' . $value . "\n";
}
// CanonicalizedResource
$signquery = array();
foreach ($query as $key => $value) {
if (in_array($key, $this->signKeyList)) {
$signquery[$key] = $value;
}
}
ksort($signquery);
$sortedQueryList = array();
foreach ($signquery as $key => $value) {
if (strlen($value) > 0) {
$sortedQueryList[] = $key . '=' . $value;
} else {
$sortedQueryList[] = $key;
}
}
$queryStringSorted = implode('&', $sortedQueryList);
$canonicalizedResource = $resourcePath;
if (!empty($queryStringSorted)) {
$canonicalizedResource .= '?' . $queryStringSorted;
}
return $method . "\n" . $contentMd5 . "\n" . $contentType . "\n" . $date . "\n" . $canonicalizedOSSHeaders . $canonicalizedResource;
}
private $signKeyList = array(
"acl", "uploads", "location", "cors",
"logging", "website", "referer", "lifecycle",
"delete", "append", "tagging", "objectMeta",
"uploadId", "partNumber", "security-token", "x-oss-security-token",
"position", "img", "style", "styleName",
"replication", "replicationProgress",
"replicationLocation", "cname", "bucketInfo",
"comp", "qos", "live", "status", "vod",
"startTime", "endTime", "symlink",
"x-oss-process", "response-content-type", "x-oss-traffic-limit",
"response-content-language", "response-expires",
"response-cache-control", "response-content-disposition",
"response-content-encoding", "udf", "udfName", "udfImage",
"udfId", "udfImageDesc", "udfApplication",
"udfApplicationLog", "restore", "callback", "callback-var", "qosInfo",
"policy", "stat", "encryption", "versions", "versioning", "versionId", "requestPayment",
"x-oss-request-payer", "sequential",
"inventory", "inventoryId", "continuation-token", "asyncFetch",
"worm", "wormId", "wormExtend", "withHashContext",
"x-oss-enable-md5", "x-oss-enable-sha1", "x-oss-enable-sha256",
"x-oss-hash-ctx", "x-oss-md5-ctx", "transferAcceleration",
"regionList", "cloudboxes", "x-oss-ac-source-ip", "x-oss-ac-subnet-mask", "x-oss-ac-vpc-id", "x-oss-ac-forward-allow",
"metaQuery", "resourceGroup", "rtc", "x-oss-async-process", "responseHeader"
);
}

View File

@@ -0,0 +1,244 @@
<?php
namespace OSS\Signer;
use DateTime;
use OSS\Core\OssUtil;
use OSS\Http\RequestCore;
use OSS\Credentials\Credentials;
use OSS\OssClient;
class SignerV4 implements SignerInterface
{
public function sign(RequestCore $request, Credentials $credentials, array &$options)
{
// Date
if (!isset($request->request_headers['Date'])) {
$request->add_header('Date', gmdate('D, d M Y H:i:s \G\M\T'));
}
$timestamp = strtotime($request->request_headers['Date']);
if ($timestamp === false) {
$timestamp = time();
}
$datetime = gmdate('Ymd\THis\Z', $timestamp);
$date = substr($datetime, 0, 8);
$request->add_header("x-oss-date", $datetime);
if (!isset($request->request_headers['x-oss-content-sha256'])) {
$request->add_header("x-oss-content-sha256", 'UNSIGNED-PAYLOAD');
}
// Credentials information
if (!empty($credentials->getSecurityToken())) {
$request->add_header("x-oss-security-token", $credentials->getSecurityToken());
}
$headers = $request->request_headers;
$method = strtoupper($request->method);
$region = $options['region'];
$product = $options['product'];
$scope = $this->buildScope($date, $region, $product);
$resourcePath = $this->getResourcePath($options);
$additionalHeaders = $this->getCommonAdditionalHeaders($request, $options);
$queryString = parse_url($request->request_url, PHP_URL_QUERY);
$query = array();
if ($queryString !== null) {
parse_str($queryString, $query);
}
$canonicalRequest = $this->calcCanonicalRequest($method, $resourcePath, $query, $headers, $additionalHeaders);
$stringToSign = $this->calcStringToSign($datetime, $scope, $canonicalRequest);
// printf('canonical request:%s' . PHP_EOL, $canonicalRequest);
// printf('sign str:%s' . PHP_EOL, $stringToSign);
$options['string_to_sign'] = $stringToSign;
$signature = $this->calcSignature($credentials->getAccessKeySecret(), $date, $region, $product, $stringToSign);
$authorization = 'OSS4-HMAC-SHA256 Credential=' . $credentials->getAccessKeyId() . '/' . $scope;
$additionalHeadersString = implode(';', $additionalHeaders);
if ($additionalHeadersString !== '') {
$authorization .= ',AdditionalHeaders=' . $additionalHeadersString;
}
$authorization .= ',Signature=' . $signature;
$request->add_header('Authorization', $authorization);
}
public function presign(RequestCore $request, Credentials $credentials, array &$options)
{
if (!isset($request->request_headers['Date'])) {
$request->add_header('Date', gmdate('D, d M Y H:i:s \G\M\T'));
}
$timestamp = strtotime($request->request_headers['Date']);
if ($timestamp === false) {
$timestamp = time();
}
$datetime = gmdate('Ymd\THis\Z', $timestamp);
$expiration = $options['expiration'];
$date = substr($datetime, 0, 8);
$expires = $expiration - $timestamp;
$headers = $request->request_headers;
$method = strtoupper($request->method);
$region = $options['region'];
$product = $options['product'];
$scope = $this->buildScope($date, $region, $product);
$resourcePath = $this->getResourcePath($options);
$additionalHeaders = $this->getCommonAdditionalHeaders($request, $options);
$queryString = parse_url($request->request_url, PHP_URL_QUERY);
$query = array();
if ($queryString !== null) {
parse_str($queryString, $query);
}
if (!empty($credentials->getSecurityToken())) {
$query["x-oss-security-token"] = $credentials->getSecurityToken();
}
$query["x-oss-signature-version"] = 'OSS4-HMAC-SHA256';
$query["x-oss-date"] = $datetime;
$query["x-oss-expires"] = $expires;
$query["x-oss-credential"] = $credentials->getAccessKeyId() . '/' . $scope;
if (count($additionalHeaders) > 0) {
$query["x-oss-additional-headers"] = implode(";", $additionalHeaders);
}
$canonicalRequest = $this->calcCanonicalRequest($method, $resourcePath, $query, $headers, $additionalHeaders);
$stringToSign = $this->calcStringToSign($datetime, $scope, $canonicalRequest);
// printf('canonical request:%s' . PHP_EOL, $canonicalRequest);
// printf('sign str:%s' . PHP_EOL, $stringToSign);
$options['string_to_sign'] = $stringToSign;
$signature = $this->calcSignature($credentials->getAccessKeySecret(), $date, $region, $product, $stringToSign);
$query["x-oss-signature"] = $signature;
$queryStr = OssUtil::toQueryString($query);
$explodeUrl = explode('?', $request->request_url);
$index = count($explodeUrl);
if ($index === 1) {
$request->request_url .= '?' . $queryStr;
} else {
$baseUrl = $explodeUrl[0];
$request->request_url = $baseUrl . '?' . $queryStr;
}
}
private function getResourcePath(array $options)
{
$resourcePath = '/';
if (strlen($options['bucket']) > 0) {
$resourcePath .= $options['bucket'] . '/';
}
if (strlen($options['key']) > 0) {
$resourcePath .= $options['key'];
}
return $resourcePath;
}
private function getCommonAdditionalHeaders(RequestCore $request, array $options)
{
if (isset($options[OssClient::OSS_ADDITIONAL_HEADERS])) {
$addHeaders = array();
foreach ($options[OssClient::OSS_ADDITIONAL_HEADERS] as $key) {
$lowk = strtolower($key);
if ($this->isDefaultSignedHeader($lowk)) {
continue;
}
$addHeaders[$lowk] = '';
}
$headers = array();
foreach ($request->request_headers as $key => $value) {
$lowk = strtolower($key);
if (isset($addHeaders[$lowk])) {
$headers[$lowk] = '';
}
}
ksort($headers);
return array_keys($headers);
}
return array();
}
private function isDefaultSignedHeader($low)
{
if (strncmp($low, "x-oss-", 6) == 0 ||
$low === "content-type" ||
$low === "content-md5") {
return true;
}
return false;
}
private function calcStringToSign($datetime, $scope, $canonicalRequest)
{
/*
StringToSign
"OSS4-HMAC-SHA256" + "\n" +
TimeStamp + "\n" +
Scope + "\n" +
Hex(SHA256Hash(Canonical Request))
*/
$hashedRequest = hash('sha256', $canonicalRequest);
return "OSS4-HMAC-SHA256" . "\n" . $datetime . "\n" . $scope . "\n" . $hashedRequest;
}
private function calcCanonicalRequest($method, $resourcePath, array $query, array $headers, array $additionalHeaders)
{
/*
Canonical Request
HTTP Verb + "\n" +
Canonical URI + "\n" +
Canonical Query String + "\n" +
Canonical Headers + "\n" +
Additional Headers + "\n" +
Hashed PayLoad
*/
//Canonical Uri
$canonicalUri = str_replace(array('%2F'), array('/'), rawurlencode($resourcePath));
//Canonical Query
$querySigned = array();
foreach ($query as $key => $value) {
$querySigned[rawurlencode($key)] = rawurlencode($value);
}
ksort($querySigned);
$sortedQueryList = array();
foreach ($querySigned as $key => $value) {
if (strlen($value) > 0) {
$sortedQueryList[] = $key . '=' . $value;
} else {
$sortedQueryList[] = $key;
}
}
$canonicalQuery = implode('&', $sortedQueryList);
//Canonical Headers
$headersSigned = array();
foreach ($headers as $key => $value) {
$lowk = strtolower($key);
if (SignerV4::isDefaultSignedHeader($lowk) ||
in_array($lowk, $additionalHeaders)) {
$headersSigned[$lowk] = trim($value);
}
}
ksort($headersSigned);
$canonicalizedHeaders = '';
foreach ($headersSigned as $key => $value) {
$canonicalizedHeaders .= $key . ':' . $value . "\n";
}
//Additional Headers
$canonicalAdditionalHeaders = implode(';', $additionalHeaders);
$hashPayload = "UNSIGNED-PAYLOAD";
if (isset($headersSigned['x-oss-content-sha256'])) {
$hashPayload = $headersSigned['x-oss-content-sha256'];
}
$stringToSign = $method . "\n"
. $canonicalUri . "\n"
. $canonicalQuery . "\n"
. $canonicalizedHeaders . "\n"
. $canonicalAdditionalHeaders . "\n"
. $hashPayload;
return $stringToSign;
}
private function buildScope($date, $region, $product)
{
return $date . "/" . $region . "/" . $product . "/aliyun_v4_request";
}
private function calcSignature($secret, $date, $region, $product, $stringToSign)
{
$h1Key = hash_hmac("sha256", $date, "aliyun_v4" . $secret, true);
$h2Key = hash_hmac("sha256", $region, $h1Key, true);
$h3Key = hash_hmac("sha256", $product, $h2Key, true);
$h4Key = hash_hmac("sha256", "aliyun_v4_request", $h3Key, true);
return bin2hex(hash_hmac("sha256", $stringToSign, $h4Key, true));
}
}

View File

@@ -0,0 +1,32 @@
<?php
namespace OSS\Tests;
class AssumeRole extends StsBase
{
private $Action = "AssumeRole";
private $RoleArn;
private $RoleSessionName;
private $Policy;
private $DurationSeconds = "3600";
public function getAttributes()
{
return get_object_vars($this);
}
public function __set($name, $value)
{
$this->$name = $value;
}
public function __construct()
{
parent::__construct();
$this->RoleSessionName = "sts";
}
}

View File

@@ -4,6 +4,7 @@ namespace OSS\Tests;
require_once __DIR__ . '/Common.php'; require_once __DIR__ . '/Common.php';
use OSS\Core\OssException;
use OSS\Model\CnameConfig; use OSS\Model\CnameConfig;
class BucketCnameTest extends \PHPUnit\Framework\TestCase class BucketCnameTest extends \PHPUnit\Framework\TestCase
@@ -31,47 +32,34 @@ class BucketCnameTest extends \PHPUnit\Framework\TestCase
public function testAddCname() public function testAddCname()
{ {
$this->client->addBucketCname($this->bucketName, 'www.baidu.com'); try {
$this->client->addBucketCname($this->bucketName, 'www.qq.com'); $this->client->addBucketCname($this->bucketName, 'www.baidu.com');
} catch (OssException $e) {
$ret = $this->client->getBucketCname($this->bucketName); print_r($e->getMessage());
$this->assertEquals(2, count($ret->getCnames())); $this->assertTrue(true);
}
// add another 2 cnames
$this->client->addBucketCname($this->bucketName, 'www.sina.com.cn'); try {
$this->client->addBucketCname($this->bucketName, 'www.iqiyi.com'); $ret = $this->client->getBucketCname($this->bucketName);
$this->assertEquals(0, count($ret->getCnames()));
$ret = $this->client->getBucketCname($this->bucketName); } catch (OssException $e) {
$cnames = $ret->getCnames(); $this->assertTrue(false);
$cnameList = array();
foreach ($cnames as $c) {
$cnameList[] = $c['Domain'];
} }
$should = array(
'www.baidu.com',
'www.qq.com',
'www.sina.com.cn',
'www.iqiyi.com'
);
$this->assertEquals(4, count($cnames));
$this->assertEquals(sort($should), sort($cnameList));
} }
public function testDeleteCname() public function testDeleteCname()
{ {
$this->client->addBucketCname($this->bucketName, 'www.baidu.com'); try {
$this->client->addBucketCname($this->bucketName, 'www.qq.com'); $this->client->deleteBucketCname($this->bucketName, 'www.not-exist.com');
} catch (OssException $e) {
$this->assertTrue(false);
}
$ret = $this->client->getBucketCname($this->bucketName); try {
$this->assertEquals(2, count($ret->getCnames())); $ret = $this->client->getBucketCname($this->bucketName);
$this->assertEquals(0, count($ret->getCnames()));
// delete one cname } catch (OssException $e) {
$this->client->deleteBucketCname($this->bucketName, 'www.baidu.com'); $this->assertTrue(false);
}
$ret = $this->client->getBucketCname($this->bucketName);
$this->assertEquals(1, count($ret->getCnames()));
$cnames = $ret->getCnames();
$this->assertEquals('www.qq.com', $cnames[0]['Domain']);
} }
} }

View File

@@ -14,10 +14,14 @@ class BucketLiveChannelTest extends \PHPUnit\Framework\TestCase
protected function setUp(): void protected function setUp(): void
{ {
$this->client = Common::getOssClient(); try {
$this->bucketName = 'php-sdk-test-rtmp-bucket-name-' . strval(rand(0, 10000)); $this->client = Common::getOssClient();
$this->client->createBucket($this->bucketName); $this->bucketName = 'php-sdk-test-rtmp-bucket-name-' . strval(rand(0, 10000));
Common::waitMetaSync(); $this->client->createBucket($this->bucketName);
Common::waitMetaSync();
}catch(\Exception $e) {
}
} }
protected function tearDown(): void protected function tearDown(): void

View File

@@ -44,27 +44,26 @@ class CallbackTest extends TestOssClientBase
/** /**
* step 3. * step 3.
*/ */
$json = $json =
'{ '{
"callbackUrl":"'.Common::getCallbackUrl().'",'. "callbackUrl":"' . Common::getCallbackUrl() . '",' .
' "callbackHost":"oss-cn-hangzhou.aliyuncs.com", ' "callbackHost":"oss-cn-hangzhou.aliyuncs.com",
"callbackBody":"{\"mimeType\":${mimeType},\"size\":${size},\"x:var1\":${x:var1},\"x:var2\":${x:var2}}", "callbackBody":"{\"mimeType\":${mimeType},\"size\":${size},\"x:var1\":${x:var1},\"x:var2\":${x:var2}}",
"callbackBodyType":"application/json" "callbackBodyType":"application/json"
}'; }';
$var = $var =
'{ '{
"x:var1":"value1", "x:var1":"value1",
"x:var2":"值2" "x:var2":"值2"
}'; }';
$options = array(OssClient::OSS_CALLBACK => $json, $options = array(OssClient::OSS_CALLBACK => $json,
OssClient::OSS_CALLBACK_VAR => $var OssClient::OSS_CALLBACK_VAR => $var
); );
try { try {
$result = $this->ossClient->completeMultipartUpload($this->bucket, $object, $upload_id, $upload_parts, $options); $result = $this->ossClient->completeMultipartUpload($this->bucket, $object, $upload_id, $upload_parts, $options);
$this->assertEquals("200", $result['info']['http_code']); $this->assertEquals("200", $result['info']['http_code']);
$this->assertEquals("{\"Status\":\"OK\"}", $result['body']);
} catch (OssException $e) { } catch (OssException $e) {
$this->assertTrue(false); $this->assertTrue(false);
} }
@@ -104,24 +103,24 @@ class CallbackTest extends TestOssClientBase
/** /**
* step 3. * step 3.
*/ */
$json = $json =
'{ '{
"callbackUrl":"www.baidu.com", "callbackUrl":"www.baidu.com",
"callbackHost":"oss-cn-hangzhou.aliyuncs.com", "callbackHost":"oss-cn-hangzhou.aliyuncs.com",
"callbackBody":"{\"mimeType\":${mimeType},\"size\":${size},\"x:var1\":${x:var1},\"x:var2\":${x:var2}}", "callbackBody":"{\"mimeType\":${mimeType},\"size\":${size},\"x:var1\":${x:var1},\"x:var2\":${x:var2}}",
"callbackBodyType":"application/json" "callbackBodyType":"application/json"
}'; }';
$var = $var =
'{ '{
"x:var1":"value1", "x:var1":"value1",
"x:var2":"值2" "x:var2":"值2"
}'; }';
$options = array(OssClient::OSS_CALLBACK => $json, $options = array(OssClient::OSS_CALLBACK => $json,
OssClient::OSS_CALLBACK_VAR => $var OssClient::OSS_CALLBACK_VAR => $var
); );
try { try {
$result = $this->ossClient->completeMultipartUpload($this->bucket, $object, $upload_id, $upload_parts, $options); $result = $this->ossClient->completeMultipartUpload($this->bucket, $object, $upload_id, $upload_parts, $options);
$this->assertTrue(false); $this->assertTrue(false);
@@ -131,39 +130,39 @@ class CallbackTest extends TestOssClientBase
} }
} }
public function testPutObjectCallbackNormal() public function testPutObjectCallbackNormal()
{ {
//json //json
{ {
$json = $json =
'{ '{
"callbackUrl":"'.Common::getCallbackUrl().'",'. "callbackUrl":"' . Common::getCallbackUrl() . '",' .
' "callbackHost":"oss-cn-hangzhou.aliyuncs.com", ' "callbackHost":"oss-cn-hangzhou.aliyuncs.com",
"callbackBody":"{\"mimeType\":${mimeType},\"size\":${size}}", "callbackBody":"{\"mimeType\":${mimeType},\"size\":${size}}",
"callbackBodyType":"application/json" "callbackBodyType":"application/json"
}'; }';
$options = array(OssClient::OSS_CALLBACK => $json); $options = array(OssClient::OSS_CALLBACK => $json);
$this->putObjectCallbackOk($options, "200"); $this->putObjectCallbackOk($options, "200");
} }
//url //url
{ {
$url = $url =
'{ '{
"callbackUrl":"'.Common::getCallbackUrl().'",'. "callbackUrl":"' . Common::getCallbackUrl() . '",' .
' "callbackHost":"oss-cn-hangzhou.aliyuncs.com", ' "callbackHost":"oss-cn-hangzhou.aliyuncs.com",
"callbackBody":"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&imageInfo.height=${imageInfo.height}&imageInfo.width=${imageInfo.width}&imageInfo.format=${imageInfo.format}", "callbackBody":"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&imageInfo.height=${imageInfo.height}&imageInfo.width=${imageInfo.width}&imageInfo.format=${imageInfo.format}",
"callbackBodyType":"application/x-www-form-urlencoded" "callbackBodyType":"application/x-www-form-urlencoded"
}'; }';
$options = array(OssClient::OSS_CALLBACK => $url); $options = array(OssClient::OSS_CALLBACK => $url);
$this->putObjectCallbackOk($options, "200"); $this->putObjectCallbackOk($options, "200");
} }
// Unspecified typre // Unspecified typre
{ {
$url = $url =
'{ '{
"callbackUrl":"'.Common::getCallbackUrl().'",'. "callbackUrl":"' . Common::getCallbackUrl() . '",' .
' "callbackHost":"oss-cn-hangzhou.aliyuncs.com", ' "callbackHost":"oss-cn-hangzhou.aliyuncs.com",
"callbackBody":"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&imageInfo.height=${imageInfo.height}&imageInfo.width=${imageInfo.width}&imageInfo.format=${imageInfo.format}" "callbackBody":"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&imageInfo.height=${imageInfo.height}&imageInfo.width=${imageInfo.width}&imageInfo.format=${imageInfo.format}"
}'; }';
$options = array(OssClient::OSS_CALLBACK => $url); $options = array(OssClient::OSS_CALLBACK => $url);
@@ -171,10 +170,10 @@ class CallbackTest extends TestOssClientBase
} }
//json and body is chinese //json and body is chinese
{ {
$json = $json =
'{ '{
"callbackUrl":"'.Common::getCallbackUrl().'",'. "callbackUrl":"' . Common::getCallbackUrl() . '",' .
' "callbackHost":"oss-cn-hangzhou.aliyuncs.com", ' "callbackHost":"oss-cn-hangzhou.aliyuncs.com",
"callbackBody":"{\" 春水碧于天,画船听雨眠。\":\"垆边人似月,皓腕凝霜雪。\"}", "callbackBody":"{\" 春水碧于天,画船听雨眠。\":\"垆边人似月,皓腕凝霜雪。\"}",
"callbackBodyType":"application/json" "callbackBodyType":"application/json"
}'; }';
@@ -183,10 +182,10 @@ class CallbackTest extends TestOssClientBase
} }
//url and body is chinese //url and body is chinese
{ {
$url = $url =
'{ '{
"callbackUrl":"'.Common::getCallbackUrl().'",'. "callbackUrl":"' . Common::getCallbackUrl() . '",' .
' "callbackHost":"oss-cn-hangzhou.aliyuncs.com", ' "callbackHost":"oss-cn-hangzhou.aliyuncs.com",
"callbackBody":"春水碧于天,画船听雨眠。垆边人似月,皓腕凝霜雪", "callbackBody":"春水碧于天,画船听雨眠。垆边人似月,皓腕凝霜雪",
"callbackBodyType":"application/x-www-form-urlencoded" "callbackBodyType":"application/x-www-form-urlencoded"
}'; }';
@@ -195,51 +194,51 @@ class CallbackTest extends TestOssClientBase
} }
//json and add callback_var //json and add callback_var
{ {
$json = $json =
'{ '{
"callbackUrl":"'.Common::getCallbackUrl().'",'. "callbackUrl":"' . Common::getCallbackUrl() . '",' .
' "callbackHost":"oss-cn-hangzhou.aliyuncs.com", ' "callbackHost":"oss-cn-hangzhou.aliyuncs.com",
"callbackBody":"{\"mimeType\":${mimeType},\"size\":${size},\"x:var1\":${x:var1},\"x:var2\":${x:var2}}", "callbackBody":"{\"mimeType\":${mimeType},\"size\":${size},\"x:var1\":${x:var1},\"x:var2\":${x:var2}}",
"callbackBodyType":"application/json" "callbackBodyType":"application/json"
}'; }';
$var = $var =
'{ '{
"x:var1":"value1", "x:var1":"value1",
"x:var2":"aliyun.com" "x:var2":"aliyun.com"
}'; }';
$options = array(OssClient::OSS_CALLBACK => $json, $options = array(OssClient::OSS_CALLBACK => $json,
OssClient::OSS_CALLBACK_VAR => $var OssClient::OSS_CALLBACK_VAR => $var
); );
$this->putObjectCallbackOk($options, "200"); $this->putObjectCallbackOk($options, "200");
} }
//url and add callback_var //url and add callback_var
{ {
$url = $url =
'{ '{
"callbackUrl":"'.Common::getCallbackUrl().'",'. "callbackUrl":"' . Common::getCallbackUrl() . '",' .
' "callbackHost":"oss-cn-hangzhou.aliyuncs.com", ' "callbackHost":"oss-cn-hangzhou.aliyuncs.com",
"callbackBody":"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&imageInfo.height=${imageInfo.height}&imageInfo.width=${imageInfo.width}&imageInfo.format=${imageInfo.format}&my_var1=${x:var1}&my_var2=${x:var2}", "callbackBody":"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&imageInfo.height=${imageInfo.height}&imageInfo.width=${imageInfo.width}&imageInfo.format=${imageInfo.format}&my_var1=${x:var1}&my_var2=${x:var2}",
"callbackBodyType":"application/x-www-form-urlencoded" "callbackBodyType":"application/x-www-form-urlencoded"
}'; }';
$var = $var =
'{ '{
"x:var1":"value1凌波不过横塘路但目送芳", "x:var1":"value1凌波不过横塘路但目送芳",
"x:var2":"值2" "x:var2":"值2"
}'; }';
$options = array(OssClient::OSS_CALLBACK => $url, $options = array(OssClient::OSS_CALLBACK => $url,
OssClient::OSS_CALLBACK_VAR => $var OssClient::OSS_CALLBACK_VAR => $var
); );
$this->putObjectCallbackOk($options, "200"); $this->putObjectCallbackOk($options, "200");
} }
} }
public function testPutCallbackWithCallbackFailed() public function testPutCallbackWithCallbackFailed()
{ {
{ {
$json = $json =
'{ '{
"callbackUrl":"http://www.baidu.com", "callbackUrl":"http://www.baidu.com",
"callbackHost":"oss-cn-hangzhou.aliyuncs.com", "callbackHost":"oss-cn-hangzhou.aliyuncs.com",
"callbackBody":"{\"mimeType\":${mimeType},\"size\":${size}}", "callbackBody":"{\"mimeType\":${mimeType},\"size\":${size}}",
@@ -250,13 +249,13 @@ class CallbackTest extends TestOssClientBase
} }
{ {
$url = $url =
'{ '{
"callbackUrl":"http://www.baidu.com", "callbackUrl":"http://www.baidu.com",
"callbackHost":"oss-cn-hangzhou.aliyuncs.com", "callbackHost":"oss-cn-hangzhou.aliyuncs.com",
"callbackBody":"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&imageInfo.height=${imageInfo.height}&imageInfo.width=${imageInfo.width}&imageInfo.format=${imageInfo.format}&my_var1=${x:var1}&my_var2=${x:var2}", "callbackBody":"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&imageInfo.height=${imageInfo.height}&imageInfo.width=${imageInfo.width}&imageInfo.format=${imageInfo.format}&my_var1=${x:var1}&my_var2=${x:var2}",
"callbackBodyType":"application/x-www-form-urlencoded" "callbackBodyType":"application/x-www-form-urlencoded"
}'; }';
$options = array(OssClient::OSS_CALLBACK => $url); $options = array(OssClient::OSS_CALLBACK => $url);
$this->putObjectCallbackFailed($options, "203"); $this->putObjectCallbackFailed($options, "203");
} }
@@ -270,7 +269,6 @@ class CallbackTest extends TestOssClientBase
try { try {
$result = $this->ossClient->putObject($this->bucket, $object, $content, $options); $result = $this->ossClient->putObject($this->bucket, $object, $content, $options);
$this->assertEquals($status, $result['info']['http_code']); $this->assertEquals($status, $result['info']['http_code']);
$this->assertEquals("{\"Status\":\"OK\"}", $result['body']);
} catch (OssException $e) { } catch (OssException $e) {
$this->assertFalse(true); $this->assertFalse(true);
} }
@@ -292,5 +290,8 @@ class CallbackTest extends TestOssClientBase
protected function setUp(): void protected function setUp(): void
{ {
parent::setUp(); parent::setUp();
if (strlen(Common::getCallbackUrl()) == 0) {
throw new OssException("callback url can not be empty!");
}
} }
} }

View File

@@ -3,9 +3,11 @@
namespace OSS\Tests; namespace OSS\Tests;
require_once __DIR__ . '/../../../autoload.php'; require_once __DIR__ . '/../../../autoload.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'StsClient.php';
use OSS\OssClient; use OSS\OssClient;
use OSS\Core\OssException; use OSS\Core\OssException;
use OSS\Credentials\StaticCredentialsProvider;
/** /**
* Class Common * Class Common
@@ -19,34 +21,121 @@ class Common
* *
* @return OssClient An OssClient instance * @return OssClient An OssClient instance
*/ */
public static function getOssClient() public static function getOssClient($conf = NULL)
{ {
try { try {
$ossClient = new OssClient( $provider = new StaticCredentialsProvider(
getenv('OSS_ACCESS_KEY_ID'), getenv('OSS_ACCESS_KEY_ID'),
getenv('OSS_ACCESS_KEY_SECRET'), getenv('OSS_ACCESS_KEY_SECRET')
getenv('OSS_ENDPOINT'), false); );
$config = array(
'region' => self::getRegion(),
'endpoint' => self::getEndpoint(),
'provider' => $provider,
'signatureVersion' => self::getSignVersion()
);
if ($conf != null) {
foreach ($conf as $key => $value) {
$config[$key] = $value;
}
}
$ossClient = new OssClient($config);
} catch (OssException $e) {
printf(__FUNCTION__ . "creating OssClient instance: FAILED\n");
printf($e->getMessage() . "\n");
}
return $ossClient;
}
public static function getStsOssClient($conf = NULL)
{
$stsClient = new StsClient();
$assumeRole = new AssumeRole();
$stsClient->AccessSecret = getenv('OSS_ACCESS_KEY_SECRET');
$assumeRole->AccessKeyId = getenv('OSS_ACCESS_KEY_ID');
$assumeRole->RoleArn = getenv('OSS_TEST_RAM_ROLE_ARN');
$params = $assumeRole->getAttributes();
$response = $stsClient->doAction($params);
try {
$provider = new StaticCredentialsProvider(
$response->Credentials->AccessKeyId,
$response->Credentials->AccessKeySecret,
$response->Credentials->SecurityToken
);
$config = array(
'region' => self::getRegion(),
'endpoint' => self::getEndpoint(),
'provider' => $provider,
'signatureVersion' => self::getSignVersion()
);
if ($conf != null) {
foreach ($conf as $key => $value) {
$config[$key] = $value;
}
}
$ossStsClient = new OssClient($config);
} catch (OssException $e) { } catch (OssException $e) {
printf(__FUNCTION__ . "creating OssClient instance: FAILED\n"); printf(__FUNCTION__ . "creating OssClient instance: FAILED\n");
printf($e->getMessage() . "\n"); printf($e->getMessage() . "\n");
return null; return null;
} }
return $ossClient; return $ossStsClient;
} }
public static function getBucketName() public static function getBucketName()
{ {
return getenv('OSS_BUCKET'); $name = getenv('OSS_BUCKET');
if (empty($name)) {
return "skyranch-php-test";
}
return $name;
} }
public static function getRegion() public static function getRegion()
{ {
return getenv('OSS_REGION'); return getenv('OSS_TEST_REGION');
}
public static function getEndpoint()
{
return getenv('OSS_TEST_ENDPOINT');
} }
public static function getCallbackUrl() public static function getCallbackUrl()
{ {
return getenv('OSS_CALLBACK_URL'); return getenv('OSS_TEST_CALLBACK_URL');
}
public static function getPayerUid()
{
return getenv('OSS_TEST_PAYER_UID');
}
public static function getPayerAccessKeyId()
{
return getenv('OSS_TEST_PAYER_ACCESS_KEY_ID');
}
public static function getPayerAccessKeySecret()
{
return getenv('OSS_TEST_PAYER_ACCESS_KEY_SECRET');
}
public static function getSignVersion()
{
return OssClient::OSS_SIGNATURE_VERSION_V1;
}
public static function getPathStyleBucket()
{
return getenv('OSS_TEST_PATHSTYLE_BUCKET');
} }
/** /**

View File

@@ -2,19 +2,14 @@
namespace OSS\Tests; namespace OSS\Tests;
use OSS\Core\OssUtil;
use OSS\OssClient;
require_once __DIR__ . '/Common.php'; require_once __DIR__ . '/Common.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
class ContentTypeTest extends TestOssClientBase class ContentTypeTest extends TestOssClientBase
{ {
private function runCmd($cmd)
{
$output = array();
$status = 0;
exec($cmd . ' 2>/dev/null', $output, $status);
$this->assertEquals(0, $status);
}
private function getContentType($bucket, $object) private function getContentType($bucket, $object)
{ {
$client = $this->ossClient; $client = $this->ossClient;
@@ -27,22 +22,22 @@ class ContentTypeTest extends TestOssClientBase
$client = $this->ossClient; $client = $this->ossClient;
$bucket = $this->bucket; $bucket = $this->bucket;
$file = '/tmp/x.html'; $file = __DIR__ . DIRECTORY_SEPARATOR . 'x.html';
$object = 'test/x'; $object = 'test/x';
$this->runCmd('touch ' . $file); OssUtil::generateFile($file, 5);
$client->uploadFile($bucket, $object, $file); $client->uploadFile($bucket, $object, $file);
$type = $this->getContentType($bucket, $object); $type = $this->getContentType($bucket, $object);
$this->assertEquals('text/html', $type); $this->assertEquals('text/html', $type);
unlink($file);
$file = '/tmp/x.json'; $file = __DIR__ . DIRECTORY_SEPARATOR . 'x.json';
$object = 'test/y'; $object = 'test/y';
$this->runCmd('dd if=/dev/urandom of=' . $file . ' bs=1024 count=100'); OssUtil::generateFile($file, 100 * 1024);
$client->multiuploadFile($bucket, $object, $file, array('partSize' => 100)); $client->multiuploadFile($bucket, $object, $file, array('partSize' => 100));
$type = $this->getContentType($bucket, $object); $type = $this->getContentType($bucket, $object);
unlink($file);
$this->assertEquals('application/json', $type); $this->assertEquals('application/json', $type);
} }
@@ -54,43 +49,37 @@ class ContentTypeTest extends TestOssClientBase
$object = "test/x.txt"; $object = "test/x.txt";
$client->putObject($bucket, $object, "hello world"); $client->putObject($bucket, $object, "hello world");
$type = $this->getContentType($bucket, $object); $type = $this->getContentType($bucket, $object);
$this->assertEquals('text/plain', $type); $this->assertEquals('text/plain', $type);
$file = '/tmp/x.html'; $file = __DIR__ . DIRECTORY_SEPARATOR . 'x.html';
$object = 'test/x.txt'; $object = 'test/x.txt';
$this->runCmd('touch ' . $file); OssUtil::generateFile($file, 5);
$client->uploadFile($bucket, $object, $file); $client->uploadFile($bucket, $object, $file);
unlink($file);
$type = $this->getContentType($bucket, $object); $type = $this->getContentType($bucket, $object);
$this->assertEquals('text/html', $type); $this->assertEquals('text/html', $type);
$file = '/tmp/x.none'; $file = __DIR__ . DIRECTORY_SEPARATOR . 'x.none';
$object = 'test/x.txt'; $object = 'test/x.txt';
$this->runCmd('touch ' . $file); OssUtil::generateFile($file, 5);
$client->uploadFile($bucket, $object, $file); $client->uploadFile($bucket, $object, $file);
unlink($file);
$type = $this->getContentType($bucket, $object); $type = $this->getContentType($bucket, $object);
$this->assertEquals('text/plain', $type); $this->assertEquals('text/plain', $type);
$file = '/tmp/x.mp3'; $file = __DIR__ . DIRECTORY_SEPARATOR . 'x.mp3';
OssUtil::generateFile($file, 1024 * 100);
$object = 'test/y.json'; $object = 'test/y.json';
$this->runCmd('dd if=/dev/urandom of=' . $file . ' bs=1024 count=100');
$client->multiuploadFile($bucket, $object, $file, array('partSize' => 100)); $client->multiuploadFile($bucket, $object, $file, array('partSize' => 100));
unlink($file);
$type = $this->getContentType($bucket, $object); $type = $this->getContentType($bucket, $object);
$this->assertEquals('audio/mpeg', $type); $this->assertEquals('audio/mpeg', $type);
$file = __DIR__ . DIRECTORY_SEPARATOR . 'x.none';
$file = '/tmp/x.none'; OssUtil::generateFile($file, 1024 * 100);
$object = 'test/y.json'; $object = 'test/y.json';
$this->runCmd('dd if=/dev/urandom of=' . $file . ' bs=1024 count=100');
$client->multiuploadFile($bucket, $object, $file, array('partSize' => 100)); $client->multiuploadFile($bucket, $object, $file, array('partSize' => 100));
unlink($file);
$type = $this->getContentType($bucket, $object); $type = $this->getContentType($bucket, $object);
$this->assertEquals('application/json', $type); $this->assertEquals('application/json', $type);
} }
@@ -107,27 +96,28 @@ class ContentTypeTest extends TestOssClientBase
$this->assertEquals('text/html', $type); $this->assertEquals('text/html', $type);
$file = '/tmp/x.html'; $file = __DIR__ . DIRECTORY_SEPARATOR . 'x.html';
$object = 'test/x'; $object = 'test/x';
$this->runCmd('touch ' . $file); OssUtil::generateFile($file, 100);
$client->uploadFile($bucket, $object, $file, array( $client->uploadFile($bucket, $object, $file, array(OssClient::OSS_HEADERS => array(
'Content-Type' => 'application/json' 'Content-Type' => 'application/json'
)); )));
unlink($file);
$type = $this->getContentType($bucket, $object); $type = $this->getContentType($bucket, $object);
$this->assertEquals('application/json', $type); $this->assertEquals('application/json', $type);
$file = '/tmp/x.json'; $file = __DIR__ . DIRECTORY_SEPARATOR . 'x.json';
$object = 'test/y'; $object = 'test/y';
$this->runCmd('dd if=/dev/urandom of=' . $file . ' bs=1024 count=100'); OssUtil::generateFile($file, 100 * 1024);
$client->multiuploadFile($bucket, $object, $file, array( $client->multiuploadFile($bucket, $object, $file, array(
'partSize' => 100, 'partSize' => 100,
'Content-Type' => 'audio/mpeg' 'Content-Type' => 'audio/mpeg'
)); ));
unlink($file);
$type = $this->getContentType($bucket, $object); $type = $this->getContentType($bucket, $object);
$this->assertEquals('audio/mpeg', $type); $this->assertEquals('audio/mpeg', $type);
} }
} }

View File

@@ -3,9 +3,12 @@
namespace OSS\Tests; namespace OSS\Tests;
use OSS\Http\ResponseCore;
use OSS\Model\CorsConfig; use OSS\Model\CorsConfig;
use OSS\Model\CorsRule; use OSS\Model\CorsRule;
use OSS\Core\OssException; use OSS\Core\OssException;
use OSS\Result\GetCorsResult;
use OSS\Result\Result;
class CorsConfigTest extends \PHPUnit\Framework\TestCase class CorsConfigTest extends \PHPUnit\Framework\TestCase
{ {
@@ -35,6 +38,7 @@ class CorsConfigTest extends \PHPUnit\Framework\TestCase
<ExposeHeader>x-oss-test1</ExposeHeader> <ExposeHeader>x-oss-test1</ExposeHeader>
<MaxAgeSeconds>110</MaxAgeSeconds> <MaxAgeSeconds>110</MaxAgeSeconds>
</CORSRule> </CORSRule>
<ResponseVary>false</ResponseVary>
</CORSConfiguration> </CORSConfiguration>
BBBB; BBBB;
@@ -58,6 +62,23 @@ BBBB;
<MaxAgeSeconds>10</MaxAgeSeconds> <MaxAgeSeconds>10</MaxAgeSeconds>
</CORSRule> </CORSRule>
</CORSConfiguration> </CORSConfiguration>
BBBB;
private $validXml3 = <<<BBBB
<?xml version="1.0" encoding="utf-8"?>
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>http://www.b.com</AllowedOrigin>
<AllowedOrigin>http://www.a.com</AllowedOrigin>
<AllowedOrigin>http://www.a.com</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedHeader>x-oss-test</AllowedHeader>
<MaxAgeSeconds>10</MaxAgeSeconds>
</CORSRule>
<ResponseVary>true</ResponseVary>
</CORSConfiguration>
BBBB; BBBB;
public function testParseValidXml() public function testParseValidXml()
@@ -81,6 +102,56 @@ BBBB;
$this->assertEquals($this->cleanXml($this->validXml2), $this->cleanXml($corsConfig->serializeToXml())); $this->assertEquals($this->cleanXml($this->validXml2), $this->cleanXml($corsConfig->serializeToXml()));
} }
public function testParseValidXml3()
{
$corsConfig = new CorsConfig();
$corsConfig->parseFromXml($this->validXml3);
$this->assertEquals($this->cleanXml($this->validXml3), $this->cleanXml($corsConfig->serializeToXml()));
$this->assertTrue($corsConfig->getResponseVary());
}
public function testResponseValidXml3()
{
$response = new ResponseCore(array(), $this->validXml, 200);
$result = new GetCorsResult($response);
$this->assertTrue($result->isOK());
$this->assertNotNull($result->getData());
$this->assertNotNull($result->getRawResponse());
$this->assertNotNull($result->getRawResponse()->body);
$corsConfig = $result->getData();
$this->assertEquals($this->cleanXml($this->validXml), $this->cleanXml($corsConfig->serializeToXml()));
$this->assertNotNull($corsConfig->getRules());
$rules = $corsConfig->getRules();
$this->assertNotNull($rules[0]->getAllowedHeaders());
$this->assertNotNull($rules[0]->getAllowedMethods());
$this->assertNotNull($rules[0]->getAllowedOrigins());
$this->assertNotNull($rules[0]->getExposeHeaders());
$this->assertNotNull($rules[0]->getMaxAgeSeconds());
$this->assertFalse($corsConfig->getResponseVary());
}
public function testResponseValidXml4()
{
$response = new ResponseCore(array(), $this->validXml3, 200);
$result = new GetCorsResult($response);
$this->assertTrue($result->isOK());
$this->assertNotNull($result->getData());
$this->assertNotNull($result->getRawResponse());
$this->assertNotNull($result->getRawResponse()->body);
$corsConfig = $result->getData();
$this->assertEquals($this->cleanXml($this->validXml3), $this->cleanXml($corsConfig->serializeToXml()));
$this->assertNotNull($corsConfig->getRules());
$rules = $corsConfig->getRules();
$this->assertNotNull($rules[0]->getAllowedHeaders());
$this->assertNotNull($rules[0]->getAllowedMethods());
$this->assertNotNull($rules[0]->getAllowedOrigins());
$this->assertNotNull($rules[0]->getExposeHeaders());
$this->assertNotNull($rules[0]->getMaxAgeSeconds());
$this->assertTrue($corsConfig->getResponseVary());
}
public function testCreateCorsConfigFromMoreThan10Rules() public function testCreateCorsConfigFromMoreThan10Rules()
{ {
$corsConfig = new CorsConfig(); $corsConfig = new CorsConfig();

View File

@@ -10,79 +10,79 @@ class DeleteObjectVersionsResultTest extends \PHPUnit\Framework\TestCase
{ {
private $validXml = <<<BBBB private $validXml = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<DeleteResult> <DeleteResult>
<Deleted> <Deleted>
<Key>demo.jpg</Key> <Key>demo.jpg</Key>
<VersionId>CAEQNRiBgICEoPiC0BYiIGMxZWJmYmMzYjE0OTQ0ZmZhYjgzNzkzYjc2NjZk****</VersionId> <VersionId>CAEQNRiBgICEoPiC0BYiIGMxZWJmYmMzYjE0OTQ0ZmZhYjgzNzkzYjc2NjZk****</VersionId>
<DeleteMarker>true</DeleteMarker> <DeleteMarker>true</DeleteMarker>
<DeleteMarkerVersionId>111111</DeleteMarkerVersionId> <DeleteMarkerVersionId>111111</DeleteMarkerVersionId>
</Deleted> </Deleted>
</DeleteResult> </DeleteResult>
BBBB; BBBB;
private $validXml1 = <<<BBBB private $validXml1 = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<DeleteResult> <DeleteResult>
<Deleted> <Deleted>
<Key>multipart.data</Key> <Key>multipart.data</Key>
<VersionId>CAEQNRiBgIDyz.6C0BYiIGQ2NWEwNmVhNTA3ZTQ3MzM5ODliYjM1ZTdjYjA4****</VersionId> <VersionId>CAEQNRiBgIDyz.6C0BYiIGQ2NWEwNmVhNTA3ZTQ3MzM5ODliYjM1ZTdjYjA4****</VersionId>
</Deleted> </Deleted>
</DeleteResult> </DeleteResult>
BBBB; BBBB;
private $validXml2 = <<<BBBB private $validXml2 = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<DeleteResult> <DeleteResult>
<Deleted> <Deleted>
<Key>multipart.data</Key> <Key>multipart.data</Key>
<DeleteMarker>true</DeleteMarker> <DeleteMarker>true</DeleteMarker>
<DeleteMarkerVersionId>CAEQMhiBgIDXiaaB0BYiIGQzYmRkZGUxMTM1ZDRjOTZhNjk4YjRjMTAyZjhl****</DeleteMarkerVersionId> <DeleteMarkerVersionId>CAEQMhiBgIDXiaaB0BYiIGQzYmRkZGUxMTM1ZDRjOTZhNjk4YjRjMTAyZjhl****</DeleteMarkerVersionId>
</Deleted> </Deleted>
<Deleted> <Deleted>
<Key>test.jpg</Key> <Key>test.jpg</Key>
<DeleteMarker>true</DeleteMarker> <DeleteMarker>true</DeleteMarker>
<DeleteMarkerVersionId>CAEQMhiBgIDB3aWB0BYiIGUzYTA3YzliMzVmNzRkZGM5NjllYTVlMjYyYWEy****</DeleteMarkerVersionId> <DeleteMarkerVersionId>CAEQMhiBgIDB3aWB0BYiIGUzYTA3YzliMzVmNzRkZGM5NjllYTVlMjYyYWEy****</DeleteMarkerVersionId>
</Deleted> </Deleted>
</DeleteResult> </DeleteResult>
BBBB; BBBB;
private $validXml3 = <<<BBBB private $validXml3 = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<DeleteResult> <DeleteResult>
<Deleted> <Deleted>
<Key>multipart.data</Key> <Key>multipart.data</Key>
</Deleted> </Deleted>
<Deleted> <Deleted>
<Key>test.jpg</Key> <Key>test.jpg</Key>
</Deleted> </Deleted>
<Deleted> <Deleted>
<Key>demo.jpg</Key> <Key>demo.jpg</Key>
</Deleted> </Deleted>
</DeleteResult> </DeleteResult>
BBBB; BBBB;
private $validXml4 = <<<BBBB private $validXml4 = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<DeleteResult> <DeleteResult>
<EncodingType>url</EncodingType> <EncodingType>url</EncodingType>
<Deleted> <Deleted>
<Key>multipart%2F.data</Key> <Key>multipart%2F.data</Key>
</Deleted> </Deleted>
<Deleted> <Deleted>
<Key>test%2F.jpg</Key> <Key>test%2F.jpg</Key>
</Deleted> </Deleted>
<Deleted> <Deleted>
<Key>demo%2F.jpg</Key> <Key>demo%2F.jpg</Key>
</Deleted> </Deleted>
</DeleteResult> </DeleteResult>
BBBB; BBBB;
private $invalidXml = <<<BBBB private $invalidXml = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<DeleteResult> <DeleteResult>
</DeleteResult> </DeleteResult>
BBBB; BBBB;
public function testParseValidXml() public function testParseValidXml()
{ {

View File

@@ -10,39 +10,39 @@ class GetBucketEncryptionResultTest extends \PHPUnit\Framework\TestCase
{ {
private $validXml = <<<BBBB private $validXml = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<ServerSideEncryptionRule> <ServerSideEncryptionRule>
<ApplyServerSideEncryptionByDefault> <ApplyServerSideEncryptionByDefault>
<SSEAlgorithm>AES256</SSEAlgorithm> <SSEAlgorithm>AES256</SSEAlgorithm>
<KMSMasterKeyID></KMSMasterKeyID> <KMSMasterKeyID></KMSMasterKeyID>
</ApplyServerSideEncryptionByDefault> </ApplyServerSideEncryptionByDefault>
</ServerSideEncryptionRule> </ServerSideEncryptionRule>
BBBB; BBBB;
private $validXml1 = <<<BBBB private $validXml1 = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<ServerSideEncryptionRule> <ServerSideEncryptionRule>
<ApplyServerSideEncryptionByDefault> <ApplyServerSideEncryptionByDefault>
<SSEAlgorithm>KMS</SSEAlgorithm> <SSEAlgorithm>KMS</SSEAlgorithm>
<KMSMasterKeyID>kms-id</KMSMasterKeyID> <KMSMasterKeyID>kms-id</KMSMasterKeyID>
</ApplyServerSideEncryptionByDefault> </ApplyServerSideEncryptionByDefault>
</ServerSideEncryptionRule> </ServerSideEncryptionRule>
BBBB; BBBB;
private $validXml2 = <<<BBBB private $validXml2 = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<ServerSideEncryptionRule> <ServerSideEncryptionRule>
<ApplyServerSideEncryptionByDefault> <ApplyServerSideEncryptionByDefault>
<SSEAlgorithm>KMS</SSEAlgorithm> <SSEAlgorithm>KMS</SSEAlgorithm>
</ApplyServerSideEncryptionByDefault> </ApplyServerSideEncryptionByDefault>
</ServerSideEncryptionRule> </ServerSideEncryptionRule>
BBBB; BBBB;
private $invalidXml = <<<BBBB private $invalidXml = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<ServerSideEncryptionRule> <ServerSideEncryptionRule>
</ServerSideEncryptionRule> </ServerSideEncryptionRule>
BBBB; BBBB;
public function testParseValidXml() public function testParseValidXml()
{ {

View File

@@ -10,24 +10,24 @@ class GetBucketRequestPaymentResultTest extends \PHPUnit\Framework\TestCase
{ {
private $validXml = <<<BBBB private $validXml = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<RequestPaymentConfiguration> <RequestPaymentConfiguration>
<Payer>Requester</Payer> <Payer>Requester</Payer>
</RequestPaymentConfiguration> </RequestPaymentConfiguration>
BBBB; BBBB;
private $validXml2 = <<<BBBB private $validXml2 = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<RequestPaymentConfiguration> <RequestPaymentConfiguration>
<Payer>BucketOwner</Payer> <Payer>BucketOwner</Payer>
</RequestPaymentConfiguration> </RequestPaymentConfiguration>
BBBB; BBBB;
private $invalidXml = <<<BBBB private $invalidXml = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<RequestPaymentConfiguration> <RequestPaymentConfiguration>
</RequestPaymentConfiguration> </RequestPaymentConfiguration>
BBBB; BBBB;
public function testParseValidXml() public function testParseValidXml()
{ {

View File

@@ -9,20 +9,33 @@ use OSS\Http\ResponseCore;
class GetBucketStatResultTest extends \PHPUnit\Framework\TestCase class GetBucketStatResultTest extends \PHPUnit\Framework\TestCase
{ {
private $validXml = <<<BBBB private $validXml = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" encoding="UTF-8"?>
<BucketStat> <BucketStat>
<Storage>100</Storage> <Storage>1600</Storage>
<ObjectCount>200</ObjectCount> <ObjectCount>230</ObjectCount>
<MultipartUploadCount>10</MultipartUploadCount> <MultipartUploadCount>40</MultipartUploadCount>
</BucketStat> <LiveChannelCount>4</LiveChannelCount>
BBBB; <LastModifiedTime>1643341269</LastModifiedTime>
<StandardStorage>430</StandardStorage>
<StandardObjectCount>66</StandardObjectCount>
<InfrequentAccessStorage>2359296</InfrequentAccessStorage>
<InfrequentAccessRealStorage>360</InfrequentAccessRealStorage>
<InfrequentAccessObjectCount>54</InfrequentAccessObjectCount>
<ArchiveStorage>2949120</ArchiveStorage>
<ArchiveRealStorage>450</ArchiveRealStorage>
<ArchiveObjectCount>74</ArchiveObjectCount>
<ColdArchiveStorage>2359296</ColdArchiveStorage>
<ColdArchiveRealStorage>360</ColdArchiveRealStorage>
<ColdArchiveObjectCount>36</ColdArchiveObjectCount>
</BucketStat>
BBBB;
private $invalidXml = <<<BBBB private $invalidXml = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<BucketStat> <BucketStat>
</BucketStat> </BucketStat>
BBBB; BBBB;
public function testParseValidXml() public function testParseValidXml()
{ {
@@ -32,9 +45,22 @@ class GetBucketStatResultTest extends \PHPUnit\Framework\TestCase
$this->assertNotNull($result->getData()); $this->assertNotNull($result->getData());
$this->assertNotNull($result->getRawResponse()); $this->assertNotNull($result->getRawResponse());
$stat = $result->getData(); $stat = $result->getData();
$this->assertEquals(100, $stat->getStorage()); $this->assertEquals(1600, $stat->getStorage());
$this->assertEquals(200, $stat->getObjectCount()); $this->assertEquals(230, $stat->getObjectCount());
$this->assertEquals(10, $stat->getMultipartUploadCount()); $this->assertEquals(40, $stat->getMultipartUploadCount());
$this->assertEquals(4, $stat->getLiveChannelCount());
$this->assertEquals(1643341269, $stat->getLastModifiedTime());
$this->assertEquals(430, $stat->getStandardStorage());
$this->assertEquals(66, $stat->getStandardObjectCount());
$this->assertEquals(2359296, $stat->getInfrequentAccessStorage());
$this->assertEquals(360, $stat->getInfrequentAccessRealStorage());
$this->assertEquals(54, $stat->getInfrequentAccessObjectCount());
$this->assertEquals(2949120, $stat->getArchiveStorage());
$this->assertEquals(450, $stat->getArchiveRealStorage());
$this->assertEquals(74, $stat->getArchiveObjectCount());
$this->assertEquals(2359296, $stat->getColdArchiveStorage());
$this->assertEquals(360, $stat->getColdArchiveRealStorage());
$this->assertEquals(36, $stat->getColdArchiveObjectCount());
} }
public function testParseNullXml() public function testParseNullXml()

View File

@@ -9,34 +9,34 @@ use OSS\Http\ResponseCore;
class GetBucketTagsResultTest extends \PHPUnit\Framework\TestCase class GetBucketTagsResultTest extends \PHPUnit\Framework\TestCase
{ {
private $validXml = <<<BBBB private $validXml = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<Tagging> <Tagging>
<TagSet> <TagSet>
<Tag> <Tag>
<Key>testa</Key> <Key>testa</Key>
<Value>value1-test</Value> <Value>value1-test</Value>
</Tag> </Tag>
<Tag> <Tag>
<Key>testb</Key> <Key>testb</Key>
<Value>value2-test</Value> <Value>value2-test</Value>
</Tag> </Tag>
</TagSet> </TagSet>
</Tagging> </Tagging>
BBBB; BBBB;
private $invalidXml = <<<BBBB private $invalidXml = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<Tagging> <Tagging>
</Tagging> </Tagging>
BBBB; BBBB;
private $invalidXml2 = <<<BBBB private $invalidXml2 = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<Tagging> <Tagging>
<TagSet> <TagSet>
</TagSet> </TagSet>
</Tagging> </Tagging>
BBBB; BBBB;
public function testParseValidXml() public function testParseValidXml()
{ {

View File

@@ -10,30 +10,30 @@ class GetBucketWormResultTest extends \PHPUnit\Framework\TestCase
{ {
private $validXml = <<<BBBB private $validXml = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<WormConfiguration> <WormConfiguration>
<WormId>ID1</WormId> <WormId>ID1</WormId>
<State>Locked</State> <State>Locked</State>
<RetentionPeriodInDays>1</RetentionPeriodInDays> <RetentionPeriodInDays>1</RetentionPeriodInDays>
<CreationDate>2018-08-14T15:50:32</CreationDate> <CreationDate>2018-08-14T15:50:32</CreationDate>
</WormConfiguration> </WormConfiguration>
BBBB; BBBB;
private $validXml2 = <<<BBBB private $validXml2 = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<WormConfiguration> <WormConfiguration>
<WormId>ID2</WormId> <WormId>ID2</WormId>
<State>InProgress</State> <State>InProgress</State>
<RetentionPeriodInDays>10</RetentionPeriodInDays> <RetentionPeriodInDays>10</RetentionPeriodInDays>
<CreationDate>2018-09-14T15:50:32</CreationDate> <CreationDate>2018-09-14T15:50:32</CreationDate>
</WormConfiguration> </WormConfiguration>
BBBB; BBBB;
private $invalidXml = <<<BBBB private $invalidXml = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<WormConfiguration> <WormConfiguration>
</WormConfiguration> </WormConfiguration>
BBBB; BBBB;
public function testParseValidXml() public function testParseValidXml()
{ {

View File

@@ -42,6 +42,53 @@ BBBB;
</ListAllMyBucketsResult> </ListAllMyBucketsResult>
BBBB; BBBB;
private $errorBody = <<< BBBB
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>NoSuchBucket</Code>
<Message>The specified bucket does not exist.</Message>
<RequestId>566B870D207FB3044302EB0A</RequestId>
<HostId>hello.oss-test.aliyun-inc.com</HostId>
<BucketName>hello</BucketName>
</Error>
BBBB;
private $xml = <<<BBBB
<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult>
<Owner>
<ID>ut_test_put_bucket</ID>
<DisplayName>ut_test_put_bucket</DisplayName>
</Owner>
<Buckets>
<Bucket>
<CreationDate>2015-12-17T18:12:43.000Z</CreationDate>
<ExtranetEndpoint>oss-cn-shanghai.aliyuncs.com</ExtranetEndpoint>
<IntranetEndpoint>oss-cn-shanghai-internal.aliyuncs.com</IntranetEndpoint>
<Location>oss-cn-shanghai</Location>
<Name>app-base-oss</Name>
<Region>cn-shanghai</Region>
<StorageClass>Standard</StorageClass>
</Bucket>
<Bucket>
<CreationDate>2014-12-25T11:21:04.000Z</CreationDate>
<ExtranetEndpoint>oss-cn-hangzhou.aliyuncs.com</ExtranetEndpoint>
<IntranetEndpoint>oss-cn-hangzhou-internal.aliyuncs.com</IntranetEndpoint>
<Location>oss-cn-hangzhou</Location>
<Name>atestleo23</Name>
<Region>cn-hangzhou</Region>
<StorageClass>IA</StorageClass>
</Bucket>
<Bucket>
<CreationDate>2014-12-25T11:21:04.000Z</CreationDate>
<Location>oss-cn-hangzhou</Location>
<Name>atestleo23</Name>
</Bucket>
</Buckets>
</ListAllMyBucketsResult>
BBBB;
public function testParseValidXml() public function testParseValidXml()
{ {
$response = new ResponseCore(array(), $this->validXml, 200); $response = new ResponseCore(array(), $this->validXml, 200);
@@ -69,18 +116,7 @@ BBBB;
$errorHeader = array( $errorHeader = array(
'x-oss-request-id' => '1a2b-3c4d' 'x-oss-request-id' => '1a2b-3c4d'
); );
$response = new ResponseCore($errorHeader, $this->errorBody, 403);
$errorBody = <<< BBBB
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>NoSuchBucket</Code>
<Message>The specified bucket does not exist.</Message>
<RequestId>566B870D207FB3044302EB0A</RequestId>
<HostId>hello.oss-test.aliyun-inc.com</HostId>
<BucketName>hello</BucketName>
</Error>
BBBB;
$response = new ResponseCore($errorHeader, $errorBody, 403);
try { try {
new ListBucketsResult($response); new ListBucketsResult($response);
} catch (OssException $e) { } catch (OssException $e) {
@@ -91,48 +127,13 @@ BBBB;
$this->assertEquals($e->getRequestId(), '1a2b-3c4d'); $this->assertEquals($e->getRequestId(), '1a2b-3c4d');
$this->assertEquals($e->getErrorCode(), 'NoSuchBucket'); $this->assertEquals($e->getErrorCode(), 'NoSuchBucket');
$this->assertEquals($e->getErrorMessage(), 'The specified bucket does not exist.'); $this->assertEquals($e->getErrorMessage(), 'The specified bucket does not exist.');
$this->assertEquals($e->getDetails(), $errorBody); $this->assertEquals($e->getDetails(), $this->errorBody);
} }
} }
public function testParseXml2() public function testParseXml2()
{ {
$xml = <<<BBBB $response = new ResponseCore(array(), $this->xml, 200);
<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult>
<Owner>
<ID>ut_test_put_bucket</ID>
<DisplayName>ut_test_put_bucket</DisplayName>
</Owner>
<Buckets>
<Bucket>
<CreationDate>2015-12-17T18:12:43.000Z</CreationDate>
<ExtranetEndpoint>oss-cn-shanghai.aliyuncs.com</ExtranetEndpoint>
<IntranetEndpoint>oss-cn-shanghai-internal.aliyuncs.com</IntranetEndpoint>
<Location>oss-cn-shanghai</Location>
<Name>app-base-oss</Name>
<Region>cn-shanghai</Region>
<StorageClass>Standard</StorageClass>
</Bucket>
<Bucket>
<CreationDate>2014-12-25T11:21:04.000Z</CreationDate>
<ExtranetEndpoint>oss-cn-hangzhou.aliyuncs.com</ExtranetEndpoint>
<IntranetEndpoint>oss-cn-hangzhou-internal.aliyuncs.com</IntranetEndpoint>
<Location>oss-cn-hangzhou</Location>
<Name>atestleo23</Name>
<Region>cn-hangzhou</Region>
<StorageClass>IA</StorageClass>
</Bucket>
<Bucket>
<CreationDate>2014-12-25T11:21:04.000Z</CreationDate>
<Location>oss-cn-hangzhou</Location>
<Name>atestleo23</Name>
</Bucket>
</Buckets>
</ListAllMyBucketsResult>
BBBB;
$response = new ResponseCore(array(), $xml, 200);
$result = new ListBucketsResult($response); $result = new ListBucketsResult($response);
$this->assertTrue($result->isOK()); $this->assertTrue($result->isOK());
$this->assertNotNull($result->getData()); $this->assertNotNull($result->getData());

View File

@@ -10,106 +10,106 @@ class ListObjectVersionsResultTest extends \PHPUnit\Framework\TestCase
{ {
private $validXml = <<<BBBB private $validXml = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<ListVersionsResult> <ListVersionsResult>
<Name>oss-example</Name> <Name>oss-example</Name>
<Prefix></Prefix> <Prefix></Prefix>
<KeyMarker>example</KeyMarker> <KeyMarker>example</KeyMarker>
<VersionIdMarker>CAEQMxiBgICbof2D0BYiIGRhZjgwMzJiMjA3MjQ0ODE5MWYxZDYwMzJlZjU1****</VersionIdMarker> <VersionIdMarker>CAEQMxiBgICbof2D0BYiIGRhZjgwMzJiMjA3MjQ0ODE5MWYxZDYwMzJlZjU1****</VersionIdMarker>
<MaxKeys>100</MaxKeys> <MaxKeys>100</MaxKeys>
<Delimiter></Delimiter> <Delimiter></Delimiter>
<IsTruncated>false</IsTruncated> <IsTruncated>false</IsTruncated>
<DeleteMarker> <DeleteMarker>
<Key>example</Key> <Key>example</Key>
<VersionId>CAEQMxiBgICAof2D0BYiIDJhMGE3N2M1YTI1NDQzOGY5NTkyNTI3MGYyMzJm****</VersionId> <VersionId>CAEQMxiBgICAof2D0BYiIDJhMGE3N2M1YTI1NDQzOGY5NTkyNTI3MGYyMzJm****</VersionId>
<IsLatest>false</IsLatest> <IsLatest>false</IsLatest>
<LastModified>2019-04-09T07:27:28.000Z</LastModified> <LastModified>2019-04-09T07:27:28.000Z</LastModified>
<Owner> <Owner>
<ID>1234512528586****</ID> <ID>1234512528586****</ID>
<DisplayName>12345125285864390</DisplayName> <DisplayName>12345125285864390</DisplayName>
</Owner> </Owner>
</DeleteMarker> </DeleteMarker>
<Version> <Version>
<Key>example</Key> <Key>example</Key>
<VersionId>CAEQMxiBgMDNoP2D0BYiIDE3MWUxNzgxZDQxNTRiODI5OGYwZGMwNGY3MzZjN****</VersionId> <VersionId>CAEQMxiBgMDNoP2D0BYiIDE3MWUxNzgxZDQxNTRiODI5OGYwZGMwNGY3MzZjN****</VersionId>
<IsLatest>false</IsLatest> <IsLatest>false</IsLatest>
<LastModified>2019-04-09T07:27:28.000Z</LastModified> <LastModified>2019-04-09T07:27:28.000Z</LastModified>
<ETag>"250F8A0AE989679A22926A875F0A2****"</ETag> <ETag>"250F8A0AE989679A22926A875F0A2****"</ETag>
<Type>Normal</Type> <Type>Normal</Type>
<Size>93731</Size> <Size>93731</Size>
<StorageClass>Standard</StorageClass> <StorageClass>Standard</StorageClass>
<Owner> <Owner>
<ID>1234512528586****</ID> <ID>1234512528586****</ID>
<DisplayName>12345125285864390</DisplayName> <DisplayName>12345125285864390</DisplayName>
</Owner> </Owner>
</Version> </Version>
<Version> <Version>
<Key>pic.jpg</Key> <Key>pic.jpg</Key>
<VersionId>CAEQMxiBgMCZov2D0BYiIDY4MDllOTc2YmY5MjQxMzdiOGI3OTlhNTU0ODIx****</VersionId> <VersionId>CAEQMxiBgMCZov2D0BYiIDY4MDllOTc2YmY5MjQxMzdiOGI3OTlhNTU0ODIx****</VersionId>
<IsLatest>true</IsLatest> <IsLatest>true</IsLatest>
<LastModified>2019-04-09T07:27:28.000Z</LastModified> <LastModified>2019-04-09T07:27:28.000Z</LastModified>
<ETag>"3663F7B0B9D3153F884C821E7CF4****"</ETag> <ETag>"3663F7B0B9D3153F884C821E7CF4****"</ETag>
<Type>Normal</Type> <Type>Normal</Type>
<Size>574768</Size> <Size>574768</Size>
<StorageClass>IA</StorageClass> <StorageClass>IA</StorageClass>
<Owner> <Owner>
<ID>1234512528586****</ID> <ID>1234512528586****</ID>
<DisplayName>12345125285864390</DisplayName> <DisplayName>12345125285864390</DisplayName>
</Owner> </Owner>
</Version> </Version>
</ListVersionsResult> </ListVersionsResult>
BBBB; BBBB;
private $validXml1 = <<<BBBB private $validXml1 = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<ListVersionsResult> <ListVersionsResult>
<Name>oss-example</Name> <Name>oss-example</Name>
<Prefix></Prefix> <Prefix></Prefix>
<KeyMarker>example</KeyMarker> <KeyMarker>example</KeyMarker>
<VersionIdMarker>CAEQMxiBgICbof2D0BYiIGRhZjgwMzJiMjA3MjQ0ODE5MWYxZDYwMzJlZjU1****</VersionIdMarker> <VersionIdMarker>CAEQMxiBgICbof2D0BYiIGRhZjgwMzJiMjA3MjQ0ODE5MWYxZDYwMzJlZjU1****</VersionIdMarker>
<MaxKeys>100</MaxKeys> <MaxKeys>100</MaxKeys>
<Delimiter></Delimiter> <Delimiter></Delimiter>
<IsTruncated>false</IsTruncated> <IsTruncated>false</IsTruncated>
<DeleteMarker> <DeleteMarker>
<Key>example</Key> <Key>example</Key>
<VersionId>CAEQMxiBgICAof2D0BYiIDJhMGE3N2M1YTI1NDQzOGY5NTkyNTI3MGYyMzJm****</VersionId> <VersionId>CAEQMxiBgICAof2D0BYiIDJhMGE3N2M1YTI1NDQzOGY5NTkyNTI3MGYyMzJm****</VersionId>
<IsLatest>true</IsLatest> <IsLatest>true</IsLatest>
<LastModified>2019-04-09T07:27:28.000Z</LastModified> <LastModified>2019-04-09T07:27:28.000Z</LastModified>
<Owner> <Owner>
<ID>1234512528586****</ID> <ID>1234512528586****</ID>
<DisplayName>12345125285864390</DisplayName> <DisplayName>12345125285864390</DisplayName>
</Owner> </Owner>
</DeleteMarker> </DeleteMarker>
<DeleteMarker> <DeleteMarker>
<Key>example-1</Key> <Key>example-1</Key>
<VersionId>CAEQMxiBgICAof2D0BYiIDJhMGE3N2M1YTI1NDQzOGY5NTkyNTI3MGYyMzJm****</VersionId> <VersionId>CAEQMxiBgICAof2D0BYiIDJhMGE3N2M1YTI1NDQzOGY5NTkyNTI3MGYyMzJm****</VersionId>
<LastModified>2019-04-09T07:27:28.000Z</LastModified> <LastModified>2019-04-09T07:27:28.000Z</LastModified>
<Owner> <Owner>
<ID>1234512528586****</ID> <ID>1234512528586****</ID>
<DisplayName>12345125285864390</DisplayName> <DisplayName>12345125285864390</DisplayName>
</Owner> </Owner>
</DeleteMarker> </DeleteMarker>
<Version> <Version>
<Key>example-2</Key> <Key>example-2</Key>
<VersionId>CAEQMxiBgMDNoP2D0BYiIDE3MWUxNzgxZDQxNTRiODI5OGYwZGMwNGY3MzZjN****</VersionId> <VersionId>CAEQMxiBgMDNoP2D0BYiIDE3MWUxNzgxZDQxNTRiODI5OGYwZGMwNGY3MzZjN****</VersionId>
<LastModified>2019-04-09T07:27:28.000Z</LastModified> <LastModified>2019-04-09T07:27:28.000Z</LastModified>
<ETag>"250F8A0AE989679A22926A875F0A2****"</ETag> <ETag>"250F8A0AE989679A22926A875F0A2****"</ETag>
<Type>Normal</Type> <Type>Normal</Type>
<Size>93731</Size> <Size>93731</Size>
<StorageClass>Standard</StorageClass> <StorageClass>Standard</StorageClass>
<Owner> <Owner>
<ID>1234512528586****</ID> <ID>1234512528586****</ID>
<DisplayName>12345125285864390</DisplayName> <DisplayName>12345125285864390</DisplayName>
</Owner> </Owner>
</Version> </Version>
</ListVersionsResult> </ListVersionsResult>
BBBB; BBBB;
private $invalidXml = <<<BBBB private $invalidXml = <<<BBBB
<?xml version="1.0" ?> <?xml version="1.0" ?>
<ListVersionsResult> <ListVersionsResult>
</ListVersionsResult> </ListVersionsResult>
BBBB; BBBB;
public function testParseValidXml() public function testParseValidXml()
{ {
@@ -136,7 +136,7 @@ class ListObjectVersionsResultTest extends \PHPUnit\Framework\TestCase
$this->assertEquals('CAEQMxiBgICAof2D0BYiIDJhMGE3N2M1YTI1NDQzOGY5NTkyNTI3MGYyMzJm****', $deleteMarkerList[0]->getVersionId()); $this->assertEquals('CAEQMxiBgICAof2D0BYiIDJhMGE3N2M1YTI1NDQzOGY5NTkyNTI3MGYyMzJm****', $deleteMarkerList[0]->getVersionId());
$this->assertEquals('false', $deleteMarkerList[0]->getIsLatest()); $this->assertEquals('false', $deleteMarkerList[0]->getIsLatest());
$this->assertEquals('2019-04-09T07:27:28.000Z', $deleteMarkerList[0]->getLastModified()); $this->assertEquals('2019-04-09T07:27:28.000Z', $deleteMarkerList[0]->getLastModified());
$objectVersionList = $list->getObjectVersionList(); $objectVersionList = $list->getObjectVersionList();
$this->assertEquals('example', $objectVersionList[0]->getKey()); $this->assertEquals('example', $objectVersionList[0]->getKey());
$this->assertEquals('CAEQMxiBgMDNoP2D0BYiIDE3MWUxNzgxZDQxNTRiODI5OGYwZGMwNGY3MzZjN****', $objectVersionList[0]->getVersionId()); $this->assertEquals('CAEQMxiBgMDNoP2D0BYiIDE3MWUxNzgxZDQxNTRiODI5OGYwZGMwNGY3MzZjN****', $objectVersionList[0]->getVersionId());
@@ -180,7 +180,7 @@ class ListObjectVersionsResultTest extends \PHPUnit\Framework\TestCase
$this->assertEquals('CAEQMxiBgICAof2D0BYiIDJhMGE3N2M1YTI1NDQzOGY5NTkyNTI3MGYyMzJm****', $deleteMarkerList[0]->getVersionId()); $this->assertEquals('CAEQMxiBgICAof2D0BYiIDJhMGE3N2M1YTI1NDQzOGY5NTkyNTI3MGYyMzJm****', $deleteMarkerList[0]->getVersionId());
$this->assertEquals('true', $deleteMarkerList[0]->getIsLatest()); $this->assertEquals('true', $deleteMarkerList[0]->getIsLatest());
$this->assertEquals('2019-04-09T07:27:28.000Z', $deleteMarkerList[0]->getLastModified()); $this->assertEquals('2019-04-09T07:27:28.000Z', $deleteMarkerList[0]->getLastModified());
$this->assertEquals('example-1', $deleteMarkerList[1]->getKey()); $this->assertEquals('example-1', $deleteMarkerList[1]->getKey());
$this->assertEquals('CAEQMxiBgICAof2D0BYiIDJhMGE3N2M1YTI1NDQzOGY5NTkyNTI3MGYyMzJm****', $deleteMarkerList[1]->getVersionId()); $this->assertEquals('CAEQMxiBgICAof2D0BYiIDJhMGE3N2M1YTI1NDQzOGY5NTkyNTI3MGYyMzJm****', $deleteMarkerList[1]->getVersionId());
$this->assertEquals('', $deleteMarkerList[1]->getIsLatest()); $this->assertEquals('', $deleteMarkerList[1]->getIsLatest());

View File

@@ -75,6 +75,33 @@ BBBB;
</Owner> </Owner>
</Contents> </Contents>
</ListBucketResult> </ListBucketResult>
BBBB;
private $validXmlWithResoreInfo = <<<BBBB
<?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult>
<Name>testbucket-hf</Name>
<EncodingType>url</EncodingType>
<Prefix>php%2Fprefix</Prefix>
<Marker>php%2Fmarker</Marker>
<NextMarker>php%2Fnext-marker</NextMarker>
<MaxKeys>1000</MaxKeys>
<Delimiter>%2F</Delimiter>
<IsTruncated>true</IsTruncated>
<Contents>
<Key>php/a%2Bb</Key>
<LastModified>2015-11-18T03:36:00.000Z</LastModified>
<ETag>"89B9E567E7EB8815F2F7D41851F9A2CD"</ETag>
<Type>Normal</Type>
<Size>13115</Size>
<StorageClass>Standard</StorageClass>
<Owner>
<ID>cname_user</ID>
<DisplayName>cname_user</DisplayName>
</Owner>
<RestoreInfo>ongoing-request="false", expiry-date="Tue, 25 Apr 2023 07:30:00 GMT"</RestoreInfo>
</Contents>
</ListBucketResult>
BBBB; BBBB;
public function testParseValidXml1() public function testParseValidXml1()
@@ -148,4 +175,34 @@ BBBB;
$this->assertEquals(13115, $objects[0]->getSize()); $this->assertEquals(13115, $objects[0]->getSize());
$this->assertEquals('Standard', $objects[0]->getStorageClass()); $this->assertEquals('Standard', $objects[0]->getStorageClass());
} }
public function testParseValidXmlWithRestoreInfo()
{
$response = new ResponseCore(array(), $this->validXmlWithResoreInfo, 200);
$result = new ListObjectsResult($response);
$this->assertTrue($result->isOK());
$this->assertNotNull($result->getData());
$this->assertNotNull($result->getRawResponse());
$objectListInfo = $result->getData();
$this->assertEquals(0, count($objectListInfo->getPrefixList()));
$this->assertEquals(1, count($objectListInfo->getObjectList()));
$this->assertEquals('testbucket-hf', $objectListInfo->getBucketName());
$this->assertEquals('php/prefix', $objectListInfo->getPrefix());
$this->assertEquals('php/marker', $objectListInfo->getMarker());
$this->assertEquals('php/next-marker', $objectListInfo->getNextMarker());
$this->assertEquals(1000, $objectListInfo->getMaxKeys());
$this->assertEquals('/', $objectListInfo->getDelimiter());
$this->assertEquals('true', $objectListInfo->getIsTruncated());
$objects = $objectListInfo->getObjectList();
$this->assertEquals('php/a+b', $objects[0]->getKey());
$this->assertEquals('2015-11-18T03:36:00.000Z', $objects[0]->getLastModified());
$this->assertEquals('"89B9E567E7EB8815F2F7D41851F9A2CD"', $objects[0]->getETag());
$this->assertEquals('Normal', $objects[0]->getType());
$this->assertEquals(13115, $objects[0]->getSize());
$this->assertEquals('Standard', $objects[0]->getStorageClass());
$this->assertEquals('ongoing-request="false", expiry-date="Tue, 25 Apr 2023 07:30:00 GMT"', $objects[0]->getRestoreInfo());
$this->assertEquals('cname_user', $objects[0]->getOwner()->getId());
$this->assertEquals('cname_user', $objects[0]->getOwner()->getDisplayName());
}
} }

View File

@@ -74,6 +74,35 @@ BBBB;
</Contents> </Contents>
<KeyCount>1</KeyCount> <KeyCount>1</KeyCount>
</ListBucketResult> </ListBucketResult>
BBBB;
private $validXmlWithRestoreInfo = <<<BBBB
<?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult>
<Name>testbucket-hf</Name>
<EncodingType>url</EncodingType>
<Prefix>php%2Fprefix</Prefix>
<StartAfter>php%2Fmarker</StartAfter>
<ContinuationToken>1gJiYw--</ContinuationToken>
<NextContinuationToken>CgJiYw--</NextContinuationToken>
<MaxKeys>1000</MaxKeys>
<Delimiter>%2F</Delimiter>
<IsTruncated>true</IsTruncated>
<Contents>
<Key>php/a%2Bb</Key>
<LastModified>2015-11-18T03:36:00.000Z</LastModified>
<ETag>"89B9E567E7EB8815F2F7D41851F9A2CD"</ETag>
<Type>Normal</Type>
<Size>13115</Size>
<StorageClass>Standard</StorageClass>
<Owner>
<ID>cname_user</ID>
<DisplayName>cname_user</DisplayName>
</Owner>
<RestoreInfo>ongoing-request="false", expiry-date="Tue, 25 Apr 2023 07:30:00 GMT"</RestoreInfo>
</Contents>
<KeyCount>1</KeyCount>
</ListBucketResult>
BBBB; BBBB;
public function testParseValidXml1() public function testParseValidXml1()
@@ -151,4 +180,36 @@ BBBB;
$this->assertEquals(13115, $objects[0]->getSize()); $this->assertEquals(13115, $objects[0]->getSize());
$this->assertEquals('Standard', $objects[0]->getStorageClass()); $this->assertEquals('Standard', $objects[0]->getStorageClass());
} }
public function testParseValidXmlWithRestoreInfo()
{
$response = new ResponseCore(array(), $this->validXmlWithRestoreInfo, 200);
$result = new ListObjectsV2Result($response);
$this->assertTrue($result->isOK());
$this->assertNotNull($result->getData());
$this->assertNotNull($result->getRawResponse());
$objectListInfo = $result->getData();
$this->assertEquals(0, count($objectListInfo->getPrefixList()));
$this->assertEquals(1, count($objectListInfo->getObjectList()));
$this->assertEquals('testbucket-hf', $objectListInfo->getBucketName());
$this->assertEquals('php/prefix', $objectListInfo->getPrefix());
$this->assertEquals('php/marker', $objectListInfo->getStartAfter());
$this->assertEquals('CgJiYw--', $objectListInfo->getNextContinuationToken());
$this->assertEquals('1gJiYw--', $objectListInfo->getContinuationToken());
$this->assertEquals(1000, $objectListInfo->getMaxKeys());
$this->assertEquals('/', $objectListInfo->getDelimiter());
$this->assertEquals('true', $objectListInfo->getIsTruncated());
$this->assertEquals(1, $objectListInfo->getKeyCount());
$objects = $objectListInfo->getObjectList();
$this->assertEquals('php/a+b', $objects[0]->getKey());
$this->assertEquals('2015-11-18T03:36:00.000Z', $objects[0]->getLastModified());
$this->assertEquals('"89B9E567E7EB8815F2F7D41851F9A2CD"', $objects[0]->getETag());
$this->assertEquals('Normal', $objects[0]->getType());
$this->assertEquals(13115, $objects[0]->getSize());
$this->assertEquals('Standard', $objects[0]->getStorageClass());
$this->assertEquals('ongoing-request="false", expiry-date="Tue, 25 Apr 2023 07:30:00 GMT"', $objects[0]->getRestoreInfo());
$this->assertEquals('cname_user', $objects[0]->getOwner()->getId());
$this->assertEquals('cname_user', $objects[0]->getOwner()->getDisplayName());
}
} }

View File

@@ -3,6 +3,7 @@
namespace OSS\Tests; namespace OSS\Tests;
require_once __DIR__ . '/Common.php'; require_once __DIR__ . '/Common.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
class ObjectAclTest extends TestOssClientBase class ObjectAclTest extends TestOssClientBase
{ {

View File

@@ -0,0 +1,68 @@
<?php
namespace OSS\Tests;
require_once __DIR__ . '/Common.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
use OSS\Core\OssException;
class OssClientAsyncProcessObjectTest extends TestOssClientBase
{
private $bucketName;
private $client;
private $local_file;
private $object;
private $download_file;
protected function setUp(): void
{
parent::setUp();
$this->client = $this->ossClient;
$this->bucketName = $this->bucket;
$url = 'https://oss-console-img-demo-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/video.mp4?spm=a2c4g.64555.0.0.515675979u4B8w&file=video.mp4';
$file_name = "video.mp4";
$fp = fopen($file_name, 'w');
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_exec($ch);
curl_close($ch);
fclose($fp);
$this->local_file = $file_name;
$this->object = "oss-example.mp4";
Common::waitMetaSync();
$this->client->uploadFile($this->bucketName, $this->object, $this->local_file);
}
protected function tearDown(): void
{
parent::tearDown();
unlink($this->local_file);
}
public function testAsyncProcessObject()
{
try {
$object = 'php-async-copy';
$process = 'video/convert,f_avi,vcodec_h265,s_1920x1080,vb_2000000,fps_30,acodec_aac,ab_100000,sn_1'.
'|sys/saveas'.
',o_'.$this->base64url_encode($object).
',b_'.$this->base64url_encode($this->bucketName);
$result = $this->client->asyncProcessObject($this->bucketName, $this->object, $process);
}catch (OssException $e){
$this->assertEquals($e->getErrorCode(),"Imm Client");
$this->assertTrue(strpos($e->getErrorMessage(), "ResourceNotFound, The specified resource Attachment is not found") !== false);
}
}
private function base64url_encode($data)
{
return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
}
}

View File

@@ -7,6 +7,7 @@ use OSS\Model\CorsConfig;
use OSS\Model\CorsRule; use OSS\Model\CorsRule;
use OSS\OssClient; use OSS\OssClient;
require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php'; require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
@@ -38,6 +39,7 @@ class OssClientBucketCorsTest extends TestOssClientBase
$rule->addExposeHeader("x-oss-test1"); $rule->addExposeHeader("x-oss-test1");
$rule->setMaxAgeSeconds(110); $rule->setMaxAgeSeconds(110);
$corsConfig->addRule($rule); $corsConfig->addRule($rule);
$corsConfig->setResponseVary(true);
try { try {
$this->ossClient->putBucketCors($this->bucket, $corsConfig); $this->ossClient->putBucketCors($this->bucket, $corsConfig);
@@ -80,5 +82,44 @@ class OssClientBucketCorsTest extends TestOssClientBase
$this->assertFalse(True); $this->assertFalse(True);
} }
try {
Common::waitMetaSync();
$this->ossClient->deleteBucketCors($this->bucket);
} catch (OssException $e) {
$this->assertFalse(True);
}
$corsConfig = new CorsConfig();
$rule = new CorsRule();
$rule->addAllowedHeader("x-oss-test");
$rule->addAllowedOrigin("http://www.b.com");
$rule->addAllowedMethod("GET");
$rule->addExposeHeader("x-oss-test1");
$rule->setMaxAgeSeconds(10);
$corsConfig->addRule($rule);
$rule = new CorsRule();
$rule->addAllowedHeader("x-oss-test");
$rule->addAllowedMethod("GET");
$rule->addAllowedOrigin("http://www.b.com");
$rule->addExposeHeader("x-oss-test1");
$rule->setMaxAgeSeconds(110);
$corsConfig->addRule($rule);
$corsConfig->setResponseVary(false);
try {
$this->ossClient->putBucketCors($this->bucket, $corsConfig);
} catch (OssException $e) {
$this->assertFalse(True);
}
try {
Common::waitMetaSync();
$corsConfig4 = $this->ossClient->getBucketCors($this->bucket);
$this->assertNotNull($corsConfig4);
$this->assertEquals($corsConfig->serializeToXml(), $corsConfig4->serializeToXml());
} catch (OssException $e) {
$this->assertFalse(True);
}
} }
} }

View File

@@ -1,4 +1,5 @@
<?php <?php
namespace OSS\Tests; namespace OSS\Tests;
use OSS\Core\OssException; use OSS\Core\OssException;
@@ -10,21 +11,25 @@ class OssClientBucketPolicyTest extends TestOssClientBase
public function testBucket() public function testBucket()
{ {
$policy_str = <<< BBBB $policy_str = <<< BBBB
{ {
"Version":"1", "Version": "1",
"Statement":[ "Statement": [
{ {
"Action":[ "Action": [
"oss:PutObject", "oss:PutObject",
"oss:GetObject" "oss:GetObject"
], ],
"Effect":"Deny", "Effect": "Deny",
"Principal":["1234567890"], "Principal": [
"Resource":["acs:oss:*:1234567890:*/*"] "1234567890"
} ],
] "Resource": [
} "acs:oss:*:1234567890:*/*"
BBBB; ]
}
]
}
BBBB;
try { try {
$this->ossClient->deleteBucketPolicy($this->bucket); $this->ossClient->deleteBucketPolicy($this->bucket);
@@ -38,7 +43,9 @@ class OssClientBucketPolicyTest extends TestOssClientBase
try { try {
$this->ossClient->putBucketPolicy($this->bucket, $policy_str); $this->ossClient->putBucketPolicy($this->bucket, $policy_str);
$policy = $this->ossClient->getBucketPolicy($this->bucket); $policy = $this->ossClient->getBucketPolicy($this->bucket);
$this->assertEquals($policy_str, $policy); $data1 = json_decode($policy_str, true);
$data2 = json_decode($policy, true);
$this->assertEquals($data1, $data2);
$this->ossClient->deleteBucketPolicy($this->bucket); $this->ossClient->deleteBucketPolicy($this->bucket);
} catch (OssException $e) { } catch (OssException $e) {
$this->assertTrue(false); $this->assertTrue(false);

View File

@@ -52,11 +52,11 @@ class OssClientBucketTest extends TestOssClientBase
$this->assertTrue($this->ossClient->doesBucketExist($this->bucket)); $this->assertTrue($this->ossClient->doesBucketExist($this->bucket));
$this->assertFalse($this->ossClient->doesBucketExist($this->bucket . '-notexist')); $this->assertFalse($this->ossClient->doesBucketExist($this->bucket . '-notexist'));
$this->assertEquals($this->ossClient->getBucketLocation($this->bucket), Common::getRegion()); //$this->assertContains(Common::getRegion(), $this->ossClient->getBucketLocation($this->bucket));
$res = $this->ossClient->getBucketMeta($this->bucket); $res = $this->ossClient->getBucketMeta($this->bucket);
$this->assertEquals('200', $res['info']['http_code']); $this->assertEquals('200', $res['info']['http_code']);
$this->assertEquals(Common::getRegion(), $res['x-oss-bucket-region']); //$this->assertContains(Common::getRegion(), $res['x-oss-bucket-region']);
} }
public function testCreateBucketWithStorageType() public function testCreateBucketWithStorageType()

View File

@@ -0,0 +1,124 @@
<?php
namespace OSS\Tests;
use OSS\Core\OssException;
use OSS\Http\RequestCore;
use OSS\OssClient;
require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
class OssClientForcePathStyleTest extends TestOssClientBase
{
public function testForcePathStyle()
{
$config = array(
'signatureVersion' => OssClient::OSS_SIGNATURE_VERSION_V4,
'forcePathStyle' => true,
);
$pathStyleClient = Common::getOssClient($config);
try {
$pathStyleClient->getBucketInfo($this->bucket);
$this->assertTrue(false, "should not here");
} catch (OssException $e) {
$this->assertEquals($e->getErrorCode(), "SecondLevelDomainForbidden");
$this->assertTrue(true);
}
try {
$object = "oss-php-sdk-test/upload-test-object-name.txt";
$pathStyleClient->putObject($this->bucket, $object, 'hi oss');
$this->assertTrue(false, "should not here");
} catch (OssException $e) {
$this->assertEquals($e->getErrorCode(), "SecondLevelDomainForbidden");
$this->assertTrue(true);
}
try {
$endpoint = Common::getEndpoint();
$endpoint = str_replace(array('http://', 'https://'), '', $endpoint);
$strUrl = $endpoint . "/" . $this->bucket . '/' . $object;
$signUrl = $pathStyleClient->signUrl($this->bucket, $object, 3600);
$this->assertTrue(strpos($signUrl, $strUrl) !== false);
} catch (OssException $e) {
$this->assertFalse(true);
}
}
public function testForcePathStyleOKV1()
{
$bucket = Common::getPathStyleBucket();
$this->assertFalse(empty($bucket), "path style bucket is not set.");
$config = array(
'signatureVersion' => OssClient::OSS_SIGNATURE_VERSION_V1,
'forcePathStyle' => true,
);
$pathStyleClient = Common::getOssClient($config);
// bucket
$info = $pathStyleClient->getBucketInfo($bucket);
$this->assertEquals($bucket, $info->getName());
// object
$object = "upload-test-object-name.txt";
$pathStyleClient->putObject($bucket, $object, 'hi oss');
$res = $pathStyleClient->getObject($bucket, $object);
$this->assertEquals($res, 'hi oss');
//presign
$signUrl = $pathStyleClient->signUrl($bucket, $object, 3600);
$httpCore = new RequestCore($signUrl);
$httpCore->set_body("");
$httpCore->set_method("GET");
$httpCore->connect_timeout = 10;
$httpCore->timeout = 10;
$httpCore->add_header("Content-Type", "");
$httpCore->send_request();
$this->assertEquals(200, $httpCore->response_code);
}
public function testForcePathStyleOKV4()
{
$bucket = Common::getPathStyleBucket();
$this->assertFalse(empty($bucket), "path style bucket is not set.");
$config = array(
'signatureVersion' => OssClient::OSS_SIGNATURE_VERSION_V4,
'forcePathStyle' => true,
);
$pathStyleClient = Common::getOssClient($config);
// bucket
$info = $pathStyleClient->getBucketInfo($bucket);
$this->assertEquals($bucket, $info->getName());
// object
$object = "upload-test-object-name.txt";
$pathStyleClient->putObject($bucket, $object, 'hi oss');
$res = $pathStyleClient->getObject($bucket, $object);
$this->assertEquals($res, 'hi oss');
//presign
$signUrl = $pathStyleClient->signUrl($bucket, $object, 3600);
#print("signUrl" . $signUrl . "\n");
$httpCore = new RequestCore($signUrl);
$httpCore->set_body("");
$httpCore->set_method("GET");
$httpCore->connect_timeout = 10;
$httpCore->timeout = 10;
$httpCore->add_header("Content-Type", "");
$httpCore->send_request();
$this->assertEquals(200, $httpCore->response_code);
}
}

View File

@@ -4,9 +4,11 @@ namespace OSS\Tests;
require_once __DIR__ . '/Common.php'; require_once __DIR__ . '/Common.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
use OSS\OssClient; use OSS\OssClient;
class OssClinetImageTest extends TestOssClientBase class OssClientImageTest extends TestOssClientBase
{ {
private $bucketName; private $bucketName;
private $client; private $client;
@@ -33,20 +35,20 @@ class OssClinetImageTest extends TestOssClientBase
parent::tearDown(); parent::tearDown();
unlink($this->download_file); unlink($this->download_file);
} }
public function testImageResize() public function testImageResize()
{ {
$options = array( $options = array(
OssClient::OSS_FILE_DOWNLOAD => $this->download_file, OssClient::OSS_FILE_DOWNLOAD => $this->download_file,
OssClient::OSS_PROCESS => "image/resize,m_fixed,h_100,w_100", ); OssClient::OSS_PROCESS => "image/resize,m_fixed,h_100,w_100",);
$this->check($options, 100, 100, 3267, 'jpg'); $this->check($options, 100, 100, 3267, 'jpg');
} }
public function testImageCrop() public function testImageCrop()
{ {
$options = array( $options = array(
OssClient::OSS_FILE_DOWNLOAD => $this->download_file, OssClient::OSS_FILE_DOWNLOAD => $this->download_file,
OssClient::OSS_PROCESS => "image/crop,w_100,h_100,x_100,y_100,r_1", ); OssClient::OSS_PROCESS => "image/crop,w_100,h_100,x_100,y_100,r_1",);
$this->check($options, 100, 100, 1969, 'jpg'); $this->check($options, 100, 100, 1969, 'jpg');
} }
@@ -54,7 +56,7 @@ class OssClinetImageTest extends TestOssClientBase
{ {
$options = array( $options = array(
OssClient::OSS_FILE_DOWNLOAD => $this->download_file, OssClient::OSS_FILE_DOWNLOAD => $this->download_file,
OssClient::OSS_PROCESS => "image/rotate,90", ); OssClient::OSS_PROCESS => "image/rotate,90",);
$this->check($options, 267, 400, 20998, 'jpg'); $this->check($options, 267, 400, 20998, 'jpg');
} }
@@ -62,7 +64,7 @@ class OssClinetImageTest extends TestOssClientBase
{ {
$options = array( $options = array(
OssClient::OSS_FILE_DOWNLOAD => $this->download_file, OssClient::OSS_FILE_DOWNLOAD => $this->download_file,
OssClient::OSS_PROCESS => "image/sharpen,100", ); OssClient::OSS_PROCESS => "image/sharpen,100",);
$this->check($options, 400, 267, 23015, 'jpg'); $this->check($options, 400, 267, 23015, 'jpg');
} }
@@ -70,7 +72,7 @@ class OssClinetImageTest extends TestOssClientBase
{ {
$options = array( $options = array(
OssClient::OSS_FILE_DOWNLOAD => $this->download_file, OssClient::OSS_FILE_DOWNLOAD => $this->download_file,
OssClient::OSS_PROCESS => "image/watermark,text_SGVsbG8g5Zu-54mH5pyN5YqhIQ", ); OssClient::OSS_PROCESS => "image/watermark,text_SGVsbG8g5Zu-54mH5pyN5YqhIQ",);
$this->check($options, 400, 267, 26369, 'jpg'); $this->check($options, 400, 267, 26369, 'jpg');
} }
@@ -78,7 +80,7 @@ class OssClinetImageTest extends TestOssClientBase
{ {
$options = array( $options = array(
OssClient::OSS_FILE_DOWNLOAD => $this->download_file, OssClient::OSS_FILE_DOWNLOAD => $this->download_file,
OssClient::OSS_PROCESS => "image/format,png", ); OssClient::OSS_PROCESS => "image/format,png",);
$this->check($options, 400, 267, 160733, 'png'); $this->check($options, 400, 267, 160733, 'png');
} }
@@ -86,22 +88,22 @@ class OssClinetImageTest extends TestOssClientBase
{ {
$options = array( $options = array(
OssClient::OSS_FILE_DOWNLOAD => $this->download_file, OssClient::OSS_FILE_DOWNLOAD => $this->download_file,
OssClient::OSS_PROCESS => "image/resize,m_fixed,w_100,h_100", ); OssClient::OSS_PROCESS => "image/resize,m_fixed,w_100,h_100",);
$this->check($options, 100, 100, 3267, 'jpg'); $this->check($options, 100, 100, 3267, 'jpg');
} }
public function testProcesObject() public function testProcesObject()
{ {
$object = 'process-object.jpg'; $object = 'process-object.jpg';
$process = 'image/resize,m_fixed,w_100,h_100'. $process = 'image/resize,m_fixed,w_100,h_100' .
'|sys/saveas'. '|sys/saveas' .
',o_'.$this->base64url_encode($object). ',o_' . $this->base64url_encode($object) .
',b_'.$this->base64url_encode($this->bucketName); ',b_' . $this->base64url_encode($this->bucketName);
$result = $this->client->processObject($this->bucketName, $this->object, $process); $result = $this->client->processObject($this->bucketName, $this->object, $process);
$this->assertTrue(stripos($result, '"object": "process-object.jpg",') > 0); $this->assertTrue(stripos($result, '"object": "process-object.jpg",') > 0);
$this->assertTrue(stripos($result, '"status": "OK"') > 0); $this->assertTrue(stripos($result, '"status": "OK"') > 0);
$options = array( $options = array(
OssClient::OSS_FILE_DOWNLOAD => $this->download_file, OssClient::OSS_FILE_DOWNLOAD => $this->download_file,
); );
@@ -113,14 +115,14 @@ class OssClinetImageTest extends TestOssClientBase
//without bucket //without bucket
$object = 'process-object-1.jpg'; $object = 'process-object-1.jpg';
$process = 'image/watermark,text_SGVsbG8g5Zu-54mH5pyN5YqhIQ'. $process = 'image/watermark,text_SGVsbG8g5Zu-54mH5pyN5YqhIQ' .
'|sys/saveas'. '|sys/saveas' .
',o_'.$this->base64url_encode($object); ',o_' . $this->base64url_encode($object);
$result = $this->client->processObject($this->bucketName, $this->object, $process); $result = $this->client->processObject($this->bucketName, $this->object, $process);
$this->assertTrue(stripos($result, '"object": "process-object-1.jpg",') > 0); $this->assertTrue(stripos($result, '"object": "process-object-1.jpg",') > 0);
$this->assertTrue(stripos($result, '"status": "OK"') > 0); $this->assertTrue(stripos($result, '"status": "OK"') > 0);
$options = array( $options = array(
OssClient::OSS_FILE_DOWNLOAD => $this->download_file, OssClient::OSS_FILE_DOWNLOAD => $this->download_file,
); );
@@ -142,6 +144,6 @@ class OssClinetImageTest extends TestOssClientBase
private function base64url_encode($data) private function base64url_encode($data)
{ {
return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
} }
} }

View File

@@ -399,7 +399,6 @@ class OssClientMultipartUploadTest extends TestOssClientBase
try { try {
$uploadId = $this->ossClient->initiateMultipartUpload($this->bucket, $object); $uploadId = $this->ossClient->initiateMultipartUpload($this->bucket, $object);
$listMultipartUploadInfo = $this->ossClient->completeMultipartUpload($this->bucket, $object, $uploadId, array()); $listMultipartUploadInfo = $this->ossClient->completeMultipartUpload($this->bucket, $object, $uploadId, array());
var_dump($listMultipartUploadInfo);
$this->assertNotNull($listMultipartUploadInfo); $this->assertNotNull($listMultipartUploadInfo);
} catch (OssException $e) { } catch (OssException $e) {
$this->assertFalse(true); $this->assertFalse(true);
@@ -465,7 +464,6 @@ class OssClientMultipartUploadTest extends TestOssClientBase
try { try {
$result = $this->ossClient->completeMultipartUpload($this->bucket, $object, $upload_id, null,$options); $result = $this->ossClient->completeMultipartUpload($this->bucket, $object, $upload_id, null,$options);
var_dump($result);
$this->assertNotNull($result); $this->assertNotNull($result);
} catch (OssException $e) { } catch (OssException $e) {
$this->assertTrue(false); $this->assertTrue(false);

View File

@@ -451,12 +451,12 @@ class OssClientObjectRequestPaymentTest extends TestOssClientBase
{ {
parent::setUp(); parent::setUp();
$this->payerClient = new OssClient( $this->payerClient = new OssClient(
getenv('OSS_PAYER_ACCESS_KEY_ID'), Common::getPayerAccessKeyId(),
getenv('OSS_PAYER_ACCESS_KEY_SECRET'), Common::getPayerAccessKeySecret(),
getenv('OSS_ENDPOINT'), false); Common::getEndpoint(), false);
$policy = '{"Version":"1","Statement":[{"Action":["oss:*"],"Effect": "Allow",'. $policy = '{"Version":"1","Statement":[{"Action":["oss:*"],"Effect": "Allow",'.
'"Principal":["' . getenv('OSS_PAYER_UID') . '"],'. '"Principal":["' . Common::getPayerUid() . '"],'.
'"Resource": ["acs:oss:*:*:' . $this->bucket . '","acs:oss:*:*:' . $this->bucket . '/*"]}]}'; '"Resource": ["acs:oss:*:*:' . $this->bucket . '","acs:oss:*:*:' . $this->bucket . '/*"]}]}';
$this->ossClient->putBucketPolicy($this->bucket, $policy); $this->ossClient->putBucketPolicy($this->bucket, $policy);

View File

@@ -3,6 +3,7 @@
namespace OSS\Tests; namespace OSS\Tests;
use OSS\Core\OssException; use OSS\Core\OssException;
use OSS\Core\OssUtil;
use OSS\OssClient; use OSS\OssClient;
require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php'; require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
@@ -20,8 +21,7 @@ class OssClientObjectTest extends TestOssClientBase
$this->assertEquals('200', $res['info']['http_code']); $this->assertEquals('200', $res['info']['http_code']);
$this->assertEquals('text/plain', $res['content-type']); $this->assertEquals('text/plain', $res['content-type']);
$this->assertEquals('Accept-Encoding', $res['vary']); $this->assertEquals('Accept-Encoding', $res['vary']);
$this->assertTrue(isset($res['content-length'])); $this->assertTrue(isset($res['content-encoding']));
$this->assertFalse(isset($res['content-encoding']));
} catch (OssException $e) { } catch (OssException $e) {
$this->assertTrue(false); $this->assertTrue(false);
} }
@@ -33,7 +33,6 @@ class OssClientObjectTest extends TestOssClientBase
$this->assertEquals('200', $res['info']['http_code']); $this->assertEquals('200', $res['info']['http_code']);
$this->assertEquals('text/plain', $res['content-type']); $this->assertEquals('text/plain', $res['content-type']);
$this->assertEquals('Accept-Encoding', $res['vary']); $this->assertEquals('Accept-Encoding', $res['vary']);
$this->assertFalse(isset($res['content-length']));
$this->assertEquals('gzip', $res['content-encoding']); $this->assertEquals('gzip', $res['content-encoding']);
} catch (OssException $e) { } catch (OssException $e) {
$this->assertTrue(false); $this->assertTrue(false);
@@ -99,13 +98,13 @@ class OssClientObjectTest extends TestOssClientBase
} catch (OssException $e) { } catch (OssException $e) {
$this->assertFalse(true); $this->assertFalse(true);
} }
try { try {
$this->ossClient->putObject($this->bucket, $object, $content, $options); $this->ossClient->putObject($this->bucket, $object, $content, $options);
} catch (OssException $e) { } catch (OssException $e) {
$this->assertFalse(true); $this->assertFalse(true);
} }
try { try {
$result = $this->ossClient->deleteObjects($this->bucket, "stringtype", $options); $result = $this->ossClient->deleteObjects($this->bucket, "stringtype", $options);
$this->assertEquals('stringtype', $result[0]); $this->assertEquals('stringtype', $result[0]);
@@ -200,8 +199,7 @@ class OssClientObjectTest extends TestOssClientBase
} catch (OssException $e) { } catch (OssException $e) {
$this->assertTrue(true); $this->assertTrue(true);
$this->assertFalse(file_exists($localfile)); $this->assertFalse(file_exists($localfile));
if (strpos($e, "The specified key does not exist") == false) if (strpos($e, "The specified key does not exist") == false) {
{
$this->assertTrue(true); $this->assertTrue(true);
} }
} }
@@ -214,8 +212,7 @@ class OssClientObjectTest extends TestOssClientBase
$this->assertTrue(false); $this->assertTrue(false);
} catch (OssException $e) { } catch (OssException $e) {
$this->assertTrue(true); $this->assertTrue(true);
if (strpos($e, "The specified key does not exist") == false) if (strpos($e, "The specified key does not exist") == false) {
{
$this->assertTrue(true); $this->assertTrue(true);
} }
} }
@@ -235,7 +232,7 @@ class OssClientObjectTest extends TestOssClientBase
$this->assertFalse(true); $this->assertFalse(true);
var_dump($e->getMessage()); var_dump($e->getMessage());
} }
/** /**
* Check if the replication is the same * Check if the replication is the same
@@ -325,11 +322,11 @@ class OssClientObjectTest extends TestOssClientBase
$list = array($object1, $object2); $list = array($object1, $object2);
try { try {
$this->assertTrue($this->ossClient->doesObjectExist($this->bucket, $object2)); $this->assertTrue($this->ossClient->doesObjectExist($this->bucket, $object2));
$result = $this->ossClient->deleteObjects($this->bucket, $list); $result = $this->ossClient->deleteObjects($this->bucket, $list);
$this->assertEquals($list[0], $result[0]); $this->assertEquals($list[0], $result[0]);
$this->assertEquals($list[1], $result[1]); $this->assertEquals($list[1], $result[1]);
$result = $this->ossClient->deleteObjects($this->bucket, $list, array('quiet' => 'true')); $result = $this->ossClient->deleteObjects($this->bucket, $list, array('quiet' => 'true'));
$this->assertEquals(array(), $result); $this->assertEquals(array(), $result);
$this->assertFalse($this->ossClient->doesObjectExist($this->bucket, $object2)); $this->assertFalse($this->ossClient->doesObjectExist($this->bucket, $object2));
@@ -348,7 +345,7 @@ class OssClientObjectTest extends TestOssClientBase
{ {
$object = "oss-php-sdk-test/append-test-object-name.txt"; $object = "oss-php-sdk-test/append-test-object-name.txt";
$content_array = array('Hello OSS', 'Hi OSS', 'OSS OK'); $content_array = array('Hello OSS', 'Hi OSS', 'OSS OK');
/** /**
* Append the upload string * Append the upload string
*/ */
@@ -373,7 +370,7 @@ class OssClientObjectTest extends TestOssClientBase
$this->assertFalse(true); $this->assertFalse(true);
} }
/** /**
* Delete test object * Delete test object
*/ */
@@ -382,7 +379,7 @@ class OssClientObjectTest extends TestOssClientBase
} catch (OssException $e) { } catch (OssException $e) {
$this->assertFalse(true); $this->assertFalse(true);
} }
/** /**
* Append the upload of invalid local files * Append the upload of invalid local files
*/ */
@@ -398,9 +395,9 @@ class OssClientObjectTest extends TestOssClientBase
*/ */
try { try {
$position = $this->ossClient->appendFile($this->bucket, $object, __FILE__, 0); $position = $this->ossClient->appendFile($this->bucket, $object, __FILE__, 0);
$this->assertEquals($position, sprintf('%u',filesize(__FILE__))); $this->assertEquals($position, sprintf('%u', filesize(__FILE__)));
$position = $this->ossClient->appendFile($this->bucket, $object, __FILE__, $position); $position = $this->ossClient->appendFile($this->bucket, $object, __FILE__, $position);
$this->assertEquals($position, sprintf('%u',filesize(__FILE__)) * 2); $this->assertEquals($position, sprintf('%u', filesize(__FILE__)) * 2);
} catch (OssException $e) { } catch (OssException $e) {
$this->assertFalse(true); $this->assertFalse(true);
} }
@@ -414,7 +411,7 @@ class OssClientObjectTest extends TestOssClientBase
} catch (OssException $e) { } catch (OssException $e) {
$this->assertFalse(true); $this->assertFalse(true);
} }
/** /**
* Delete test object * Delete test object
*/ */
@@ -461,138 +458,138 @@ class OssClientObjectTest extends TestOssClientBase
$this->assertFalse(true); $this->assertFalse(true);
} }
} }
public function testPutIllelObject() public function testPutIllelObject()
{ {
$object = "/ilegal.txt"; $object = "/ilegal.txt";
try { try {
$this->ossClient->putObject($this->bucket, $object, "hi", null); $this->ossClient->putObject($this->bucket, $object, "hi", null);
$this->assertFalse(true); $this->assertFalse(true);
} catch (OssException $e) { } catch (OssException $e) {
$this->assertEquals('"/ilegal.txt" object name is invalid', $e->getMessage()); $this->assertEquals('"/ilegal.txt" object name is invalid', $e->getMessage());
} }
} }
public function testCheckMD5() public function testCheckMD5()
{ {
$object = "oss-php-sdk-test/upload-test-object-name.txt"; $object = "oss-php-sdk-test/upload-test-object-name.txt";
$content = file_get_contents(__FILE__); $content = file_get_contents(__FILE__);
$options = array(OssClient::OSS_CHECK_MD5 => true); $options = array(OssClient::OSS_CHECK_MD5 => true);
/**
* Upload data to start MD5
*/
try {
$this->ossClient->putObject($this->bucket, $object, $content, $options);
} catch (OssException $e) {
$this->assertFalse(true);
}
/**
* Check if the replication is the same
*/
try {
$content = $this->ossClient->getObject($this->bucket, $object);
$this->assertEquals($content, file_get_contents(__FILE__));
} catch (OssException $e) {
$this->assertFalse(true);
}
/** /**
* Upload file to start MD5 * Upload data to start MD5
*/ */
try { try {
$this->ossClient->uploadFile($this->bucket, $object, __FILE__, $options); $this->ossClient->putObject($this->bucket, $object, $content, $options);
} catch (OssException $e) { } catch (OssException $e) {
$this->assertFalse(true); $this->assertFalse(true);
} }
/**
* Check if the replication is the same
*/
try {
$content = $this->ossClient->getObject($this->bucket, $object);
$this->assertEquals($content, file_get_contents(__FILE__));
} catch (OssException $e) {
$this->assertFalse(true);
}
/**
* Delete test object
*/
try {
$this->ossClient->deleteObject($this->bucket, $object);
} catch (OssException $e) {
$this->assertFalse(true);
}
$object = "oss-php-sdk-test/append-test-object-name.txt"; /**
$content_array = array('Hello OSS', 'Hi OSS', 'OSS OK'); * Check if the replication is the same
$options = array(OssClient::OSS_CHECK_MD5 => true); */
try {
/** $content = $this->ossClient->getObject($this->bucket, $object);
* Append the upload string $this->assertEquals($content, file_get_contents(__FILE__));
*/ } catch (OssException $e) {
try { $this->assertFalse(true);
$position = $this->ossClient->appendObject($this->bucket, $object, $content_array[0], 0, $options); }
$this->assertEquals($position, strlen($content_array[0]));
$position = $this->ossClient->appendObject($this->bucket, $object, $content_array[1], $position, $options); /**
$this->assertEquals($position, strlen($content_array[0]) + strlen($content_array[1])); * Upload file to start MD5
$position = $this->ossClient->appendObject($this->bucket, $object, $content_array[2], $position, $options); */
$this->assertEquals($position, strlen($content_array[0]) + strlen($content_array[1]) + strlen($content_array[1])); try {
} catch (OssException $e) { $this->ossClient->uploadFile($this->bucket, $object, __FILE__, $options);
$this->assertFalse(true); } catch (OssException $e) {
} $this->assertFalse(true);
}
/**
* Check if the content is the same /**
*/ * Check if the replication is the same
try { */
$content = $this->ossClient->getObject($this->bucket, $object); try {
$this->assertEquals($content, implode($content_array)); $content = $this->ossClient->getObject($this->bucket, $object);
} catch (OssException $e) { $this->assertEquals($content, file_get_contents(__FILE__));
$this->assertFalse(true); } catch (OssException $e) {
} $this->assertFalse(true);
}
/**
* Delete test object /**
*/ * Delete test object
try { */
$this->ossClient->deleteObject($this->bucket, $object); try {
} catch (OssException $e) { $this->ossClient->deleteObject($this->bucket, $object);
$this->assertFalse(true); } catch (OssException $e) {
} $this->assertFalse(true);
}
/**
* Append upload of local files $object = "oss-php-sdk-test/append-test-object-name.txt";
*/ $content_array = array('Hello OSS', 'Hi OSS', 'OSS OK');
try { $options = array(OssClient::OSS_CHECK_MD5 => true);
$position = $this->ossClient->appendFile($this->bucket, $object, __FILE__, 0, $options);
$this->assertEquals($position, sprintf('%u',filesize(__FILE__))); /**
$position = $this->ossClient->appendFile($this->bucket, $object, __FILE__, $position, $options); * Append the upload string
$this->assertEquals($position, sprintf('%u',filesize(__FILE__)) * 2); */
} catch (OssException $e) { try {
$this->assertFalse(true); $position = $this->ossClient->appendObject($this->bucket, $object, $content_array[0], 0, $options);
} $this->assertEquals($position, strlen($content_array[0]));
$position = $this->ossClient->appendObject($this->bucket, $object, $content_array[1], $position, $options);
/** $this->assertEquals($position, strlen($content_array[0]) + strlen($content_array[1]));
* Check if the replication is the same $position = $this->ossClient->appendObject($this->bucket, $object, $content_array[2], $position, $options);
*/ $this->assertEquals($position, strlen($content_array[0]) + strlen($content_array[1]) + strlen($content_array[1]));
try { } catch (OssException $e) {
$content = $this->ossClient->getObject($this->bucket, $object); $this->assertFalse(true);
$this->assertEquals($content, file_get_contents(__FILE__) . file_get_contents(__FILE__)); }
} catch (OssException $e) {
$this->assertFalse(true); /**
} * Check if the content is the same
*/
/** try {
* delete test object $content = $this->ossClient->getObject($this->bucket, $object);
*/ $this->assertEquals($content, implode($content_array));
try { } catch (OssException $e) {
$this->ossClient->deleteObject($this->bucket, $object); $this->assertFalse(true);
} catch (OssException $e) { }
$this->assertFalse(true);
} /**
* Delete test object
*/
try {
$this->ossClient->deleteObject($this->bucket, $object);
} catch (OssException $e) {
$this->assertFalse(true);
}
/**
* Append upload of local files
*/
try {
$position = $this->ossClient->appendFile($this->bucket, $object, __FILE__, 0, $options);
$this->assertEquals($position, sprintf('%u', filesize(__FILE__)));
$position = $this->ossClient->appendFile($this->bucket, $object, __FILE__, $position, $options);
$this->assertEquals($position, sprintf('%u', filesize(__FILE__)) * 2);
} catch (OssException $e) {
$this->assertFalse(true);
}
/**
* Check if the replication is the same
*/
try {
$content = $this->ossClient->getObject($this->bucket, $object);
$this->assertEquals($content, file_get_contents(__FILE__) . file_get_contents(__FILE__));
} catch (OssException $e) {
$this->assertFalse(true);
}
/**
* delete test object
*/
try {
$this->ossClient->deleteObject($this->bucket, $object);
} catch (OssException $e) {
$this->assertFalse(true);
}
} }
public function testWithInvalidBucketName() public function testWithInvalidBucketName()
@@ -626,8 +623,8 @@ class OssClientObjectTest extends TestOssClientBase
$options = array(OssClient::OSS_CHECK_MD5 => true); $options = array(OssClient::OSS_CHECK_MD5 => true);
$handle = fopen(__FILE__, 'rb'); $handle = fopen(__FILE__, 'rb');
/** /**
* Upload data to start MD5 * Upload data to start MD5
*/ */
try { try {
$this->ossClient->uploadStream($this->bucket, $object, $handle, $options); $this->ossClient->uploadStream($this->bucket, $object, $handle, $options);
} catch (OssException $e) { } catch (OssException $e) {
@@ -635,8 +632,8 @@ class OssClientObjectTest extends TestOssClientBase
} }
/** /**
* Check if the replication is the same * Check if the replication is the same
*/ */
try { try {
$content = $this->ossClient->getObject($this->bucket, $object); $content = $this->ossClient->getObject($this->bucket, $object);
$this->assertEquals($content, file_get_contents(__FILE__)); $this->assertEquals($content, file_get_contents(__FILE__));
@@ -653,8 +650,8 @@ class OssClientObjectTest extends TestOssClientBase
} }
/** /**
* Check if the replication is the same * Check if the replication is the same
*/ */
try { try {
$content = $this->ossClient->getObject($this->bucket, $object); $content = $this->ossClient->getObject($this->bucket, $object);
$this->assertEquals($content, file_get_contents(__FILE__)); $this->assertEquals($content, file_get_contents(__FILE__));
@@ -751,7 +748,7 @@ class OssClientObjectTest extends TestOssClientBase
$this->assertFalse(true); $this->assertFalse(true);
var_dump($e->getMessage()); var_dump($e->getMessage());
} }
/** /**
* Check if the replication is the same * Check if the replication is the same
@@ -773,6 +770,166 @@ class OssClientObjectTest extends TestOssClientBase
} }
} }
public function testObjectKeyWithNonUTF8Name()
{
$object = "中文测试.txt";
$hexObject = bin2hex($object);
$gbkObject = iconv('UTF-8', 'GBK', $object);
$hexGbkObject = bin2hex($gbkObject);
$content = "hello world";
$this->assertEquals("e4b8ade69687e6b58be8af952e747874", $hexObject);
$this->assertEquals("d6d0cec4b2e2cad42e747874", $hexGbkObject);
try {
$this->ossClient->putObject($this->bucket, $gbkObject, $content);
$this->assertTrue(false);
} catch (OssException $e) {
$this->assertEquals('InvalidArgument', $e->getErrorCode());
$this->assertEquals('The characters encoding must be utf-8.', $e->getErrorMessage());
} catch (\Exception $e) {
$this->assertTrue(false);
}
//enable object encoding check
$config = array(
'checkObjectEncoding' => true,
);
$ossClient = Common::getOssClient($config);
try {
$ossClient->putObject($this->bucket, $gbkObject, $content);
$content1 = $this->ossClient->getObject($this->bucket, $object);
$content2 = $ossClient->getObject($this->bucket, $gbkObject);
$this->assertEquals($content, $content1);
$this->assertEquals($content, $content2);
} catch (\Exception $e) {
$this->assertTrue(false);
}
// ascii
try {
$ossClient->putObject($this->bucket, '1234', 'ascii');
$content1 = $this->ossClient->getObject($this->bucket, '1234');
$content2 = $ossClient->getObject($this->bucket, '1234');
$this->assertEquals('ascii', $content1);
$this->assertEquals('ascii', $content2);
} catch (\Exception $e) {
$this->assertTrue(false);
}
}
public function testEncodeFilePath()
{
if (!OssUtil::isWin()) {
$this->assertTrue(true);
return;
}
$fileFolder = __DIR__ . DIRECTORY_SEPARATOR . "中文目录";
$filePath1 = $fileFolder . DIRECTORY_SEPARATOR . "中文文件名1.txt";
$filePath2 = $fileFolder . DIRECTORY_SEPARATOR . "中文文件名2.txt";
$gbkfileFolder = iconv('UTF-8', 'GBK', $fileFolder);
$gbkfilePath1 = iconv('UTF-8', 'GBK', $filePath1);
$gbkfilePath2 = iconv('UTF-8', 'GBK', $filePath2);
$hexfilePath1 = bin2hex($filePath1);
$hexGbkfilePath2 = bin2hex($gbkfilePath2);
$content1 = '';
$content2 = '';
if (version_compare(phpversion(), '7.0.0', '<')) {
try {
mkdir($gbkfileFolder);
} catch (\Exception $e) {
}
OssUtil::generateFile($gbkfilePath1, 200 * 1024);
OssUtil::generateFile($gbkfilePath2, 202 * 1024);
$content1 = file_get_contents($gbkfilePath1);
$content2 = file_get_contents($gbkfilePath2);
} else {
try {
mkdir($fileFolder);
} catch (\Exception $e) {
}
OssUtil::generateFile($filePath1, 200 * 1024);
OssUtil::generateFile($filePath2, 202 * 1024);
$content1 = file_get_contents($filePath1);
$content2 = file_get_contents($filePath2);
}
try {
// upload file
$this->ossClient->uploadFile($this->bucket, '123', $filePath1);
$this->ossClient->uploadFile($this->bucket, '234', $gbkfilePath2);
$res = $this->ossClient->getObject($this->bucket, '123');
$this->assertEquals($content1, $res);
$res = $this->ossClient->getObject($this->bucket, '234');
$this->assertEquals($content2, $res);
// append file
$position = $this->ossClient->appendFile($this->bucket, 'append-file', $filePath1, 0);
$position = $this->ossClient->appendFile($this->bucket, 'append-file', $gbkfilePath2, $position);
$res = $this->ossClient->getObject($this->bucket, 'append-file');
$this->assertEquals($content1.$content2, $res);
// multi paet
$this->ossClient->multiuploadFile($this->bucket, 'multi-file-123', $filePath1, array(OssClient::OSS_PART_SIZE => 1));
$this->ossClient->multiuploadFile($this->bucket, 'multi-file-234', $gbkfilePath2, array(OssClient::OSS_PART_SIZE => 1));
$res = $this->ossClient->getObject($this->bucket, 'multi-file-123');
$this->assertEquals($content1, $res);
$res = $this->ossClient->getObject($this->bucket, 'multi-file-234');
$this->assertEquals($content2, $res);
// uploadDir
$this->ossClient->uploadDir($this->bucket, "dir", $fileFolder);
$options = array(
'delimiter' => '',
'prefix' => "dir",
);
$listObjectInfo = $this->ossClient->listObjects($this->bucket, $options);
$objectList = $listObjectInfo->getObjectList();
$this->assertEquals(2, count($objectList));
$this->assertEquals('dir/中文文件名1.txt', $objectList[0]->getKey());
$this->assertEquals('dir/中文文件名2.txt', $objectList[1]->getKey());
// uploadDir
if (version_compare(phpversion(), '7.0.0', '<')) {
$this->ossClient->uploadDir($this->bucket, "gbkdir", $gbkfileFolder);
$options = array(
'delimiter' => '',
'prefix' => "gbkdir",
);
$listObjectInfo = $this->ossClient->listObjects($this->bucket, $options);
$objectList = $listObjectInfo->getObjectList();
$this->assertEquals(2, count($objectList));
$this->assertEquals('gbkdir/中文文件名1.txt', $objectList[0]->getKey());
$this->assertEquals('gbkdir/中文文件名2.txt', $objectList[1]->getKey());
}
} catch (OssException $e) {
$this->assertFalse(true);
}
try {
if (phpversion() < "7.0.0") {
unlink($gbkfilePath1);
unlink($gbkfilePath2);
rmdir($gbkfileFolder);
} else {
unlink($filePath1);
unlink($filePath2);
rmdir($fileFolder);
}
} catch (\Exception $e) {
}
}
protected function setUp(): void protected function setUp(): void
{ {
parent::setUp(); parent::setUp();

View File

@@ -0,0 +1,70 @@
<?php
namespace OSS\Tests;
use OSS\Core\OssException;
use OSS\Credentials\StaticCredentialsProvider;
use OSS\Http\RequestCore;
use OSS\Http\ResponseCore;
use OSS\OssClient;
require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
class OssClientPresignTest extends TestOssClientBase
{
protected $stsOssClient;
public function testObjectWithSignV1()
{
$config = array(
'signatureVersion' => OssClient::OSS_SIGNATURE_VERSION_V1
);
$this->bucket = Common::getBucketName() . '-' . time();
$this->ossClient = Common::getOssClient($config);
$this->ossClient->createBucket($this->bucket);
Common::waitMetaSync();
$object = "a.file";
$this->ossClient->putObject($this->bucket, $object, "hi oss");
$timeout = 3600;
$options = array(
"response-content-disposition" => "inline"
);
try {
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, OssClient::OSS_HTTP_GET, $options);
} catch (OssException $e) {
$this->assertFalse(true);
}
$this->assertStringContainsString("response-content-disposition=inline", $signedUrl);
$options = array(
"response-content-disposition" => "attachment",
);
try {
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, OssClient::OSS_HTTP_GET, $options);
} catch (OssException $e) {
$this->assertFalse(true);
}
$this->assertStringContainsString("response-content-disposition=attachment", $signedUrl);
$httpCore = new RequestCore($signedUrl);
$httpCore->set_body("");
$httpCore->set_method("GET");
$httpCore->connect_timeout = 10;
$httpCore->timeout = 10;
$httpCore->add_header("Content-Type", "");
$httpCore->send_request();
$this->assertEquals(200, $httpCore->response_code);
}
protected function tearDown(): void
{
$this->ossClient->deleteObject($this->bucket, "a.file");
parent::tearDown();
}
protected function setUp(): void
{
}
}

View File

@@ -0,0 +1,369 @@
<?php
namespace OSS\Tests;
use OSS\Core\OssException;
use OSS\Credentials\StaticCredentialsProvider;
use OSS\Http\RequestCore;
use OSS\Http\ResponseCore;
use OSS\OssClient;
require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
class OssClientPresignV4Test extends TestOssClientBase
{
protected $stsOssClient;
public function testObjectWithSignV4()
{
$object = "a.file";
$this->ossClient->putObject($this->bucket, $object, file_get_contents(__FILE__));
$timeout = 3600;
try {
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout);
} catch (OssException $e) {
$this->assertFalse(true);
}
$request = new RequestCore($signedUrl);
$request->set_method('GET');
$request->add_header('Content-Type', '');
$request->send_request();
$res = new ResponseCore($request->get_response_header(), $request->get_response_body(), $request->get_response_code());
$this->assertEquals(file_get_contents(__FILE__), $res->body);
sleep(1);
//testGetSignedUrlForPuttingObject
$object = "a.file";
$timeout = 3600;
try {
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, "PUT");
$content = file_get_contents(__FILE__);
$request = new RequestCore($signedUrl);
$request->set_method('PUT');
$request->add_header('Content-Type', '');
$request->add_header('Content-Length', strlen($content));
$request->set_body($content);
$request->send_request();
$res = new ResponseCore($request->get_response_header(),
$request->get_response_body(), $request->get_response_code());
$this->assertTrue($res->isOK());
} catch (OssException $e) {
$this->assertFalse(true);
}
sleep(1);
// test Get SignedUrl For Putting Object From File
$file = __FILE__;
$object = "a.file";
$timeout = 3600;
$options = array('Content-Type' => 'txt');
try {
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, "PUT", $options);
$request = new RequestCore($signedUrl);
$request->set_method('PUT');
$request->add_header('Content-Type', 'txt');
$request->set_read_file($file);
$request->set_read_stream_size(sprintf('%u', filesize($file)));
$request->send_request();
$res = new ResponseCore($request->get_response_header(), $request->get_response_body(), $request->get_response_code());
$this->assertTrue($res->isOK());
} catch (OssException $e) {
$this->assertFalse(true);
}
sleep(1);
// test SignedUrl With Exception
$object = "a.file";
$timeout = 3600;
$options = array('Content-Type' => 'txt');
try {
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, "POST", $options);
$this->assertTrue(false);
} catch (OssException $e) {
$this->assertTrue(true);
if (strpos($e, "method is invalid") == false) {
$this->assertTrue(false);
}
}
// test GetgenPreSignedUrl For GettingObject
$object = "a.file";
$this->ossClient->putObject($this->bucket, $object, file_get_contents(__FILE__));
$expires = time() + 3600;
try {
$signedUrl = $this->ossClient->generatePresignedUrl($this->bucket, $object, $expires);
} catch (OssException $e) {
$this->assertFalse(true);
}
$request = new RequestCore($signedUrl);
$request->set_method('GET');
$request->add_header('Content-Type', '');
$request->send_request();
$res = new ResponseCore($request->get_response_header(), $request->get_response_body(), $request->get_response_code());
$this->assertEquals(file_get_contents(__FILE__), $res->body);
sleep(1);
// test Get genPreSignedUrl Vs SignedUrl
$object = "object-vs.file";
$signedUrl1 = '245';
$signedUrl2 = '123';
$expiration = 0;
do {
usleep(500000);
$begin = time();
$expiration = time() + 3600;
$signedUrl1 = $this->ossClient->generatePresignedUrl($this->bucket, $object, $expiration);
$signedUrl2 = $this->ossClient->signUrl($this->bucket, $object, 3600);
$end = time();
} while ($begin != $end);
$this->assertEquals($signedUrl1, $signedUrl2);
$this->assertTrue(strpos($signedUrl1, 'x-oss-expires=') !== false);
$object = "a.file";
$options = array(
OssClient::OSS_HEADERS => array(
'name' => 'aliyun',
'email' => 'aliyun@aliyun.com',
'book' => 'english',
),
OssClient::OSS_ADDITIONAL_HEADERS => array("name", "email")
);
$this->ossClient->putObject($this->bucket, $object, file_get_contents(__FILE__), $options);
$expires = time() + 3600;
try {
$signedUrl = $this->ossClient->generatePresignedUrl($this->bucket, $object, $expires, "GET", $options);
$request = new RequestCore($signedUrl);
$request->set_method('GET');
$request->add_header('Content-Type', '');
$request->add_header('name', 'aliyun');
$request->add_header('email', 'aliyun@aliyun.com');
$request->send_request();
$res = new ResponseCore($request->get_response_header(), $request->get_response_body(), $request->get_response_code());
$this->assertEquals(file_get_contents(__FILE__), $res->body);
sleep(1);
} catch (OssException $e) {
print_r($e->getMessage());
$this->assertFalse(true);
}
try {
$signedUrl = $this->ossClient->generatePresignedUrl($this->bucket, $object, $expires);
} catch (OssException $e) {
$this->assertFalse(true);
}
$request = new RequestCore($signedUrl);
$request->set_method('GET');
$request->add_header('Content-Type', '');
$request->send_request();
$res = new ResponseCore($request->get_response_header(), $request->get_response_body(), $request->get_response_code());
$this->assertEquals(file_get_contents(__FILE__), $res->body);
sleep(1);
}
public function testObjectWithStsClientSignV4()
{
$object = "a.file";
$this->stsOssClient->putObject($this->bucket, $object, file_get_contents(__FILE__));
$timeout = 3600;
try {
$signedUrl = $this->stsOssClient->signUrl($this->bucket, $object, $timeout);
} catch (OssException $e) {
$this->assertFalse(true);
}
$request = new RequestCore($signedUrl);
$request->set_method('GET');
$request->add_header('Content-Type', '');
$request->send_request();
$res = new ResponseCore($request->get_response_header(), $request->get_response_body(), $request->get_response_code());
$this->assertEquals(file_get_contents(__FILE__), $res->body);
sleep(1);
//testGetSignedUrlForPuttingObject
$object = "a.file";
$timeout = 3600;
try {
$signedUrl = $this->stsOssClient->signUrl($this->bucket, $object, $timeout, "PUT");
$content = file_get_contents(__FILE__);
$request = new RequestCore($signedUrl);
$request->set_method('PUT');
$request->add_header('Content-Type', '');
$request->add_header('Content-Length', strlen($content));
$request->set_body($content);
$request->send_request();
$res = new ResponseCore($request->get_response_header(),
$request->get_response_body(), $request->get_response_code());
$this->assertTrue($res->isOK());
} catch (OssException $e) {
$this->assertFalse(true);
}
sleep(1);
// test Get SignedUrl For Putting Object From File
$file = __FILE__;
$object = "a.file";
$timeout = 3600;
$options = array('Content-Type' => 'txt');
try {
$signedUrl = $this->stsOssClient->signUrl($this->bucket, $object, $timeout, "PUT", $options);
$request = new RequestCore($signedUrl);
$request->set_method('PUT');
$request->add_header('Content-Type', 'txt');
$request->set_read_file($file);
$request->set_read_stream_size(sprintf('%u', filesize($file)));
$request->send_request();
$res = new ResponseCore($request->get_response_header(), $request->get_response_body(), $request->get_response_code());
$this->assertTrue($res->isOK());
} catch (OssException $e) {
$this->assertFalse(true);
}
sleep(1);
// test SignedUrl With Exception
$file = __FILE__;
$object = "a.file";
$timeout = 3600;
$options = array('Content-Type' => 'txt');
try {
$signedUrl = $this->stsOssClient->signUrl($this->bucket, $object, $timeout, "POST", $options);
$this->assertTrue(false);
} catch (OssException $e) {
$this->assertTrue(true);
if (strpos($e, "method is invalid") == false) {
$this->assertTrue(false);
}
}
// test GetgenPreSignedUrl For GettingObject
$object = "a.file";
$this->stsOssClient->putObject($this->bucket, $object, file_get_contents(__FILE__));
$expires = time() + 3600;
try {
$signedUrl = $this->stsOssClient->generatePresignedUrl($this->bucket, $object, $expires);
} catch (OssException $e) {
$this->assertFalse(true);
}
try {
$request = new RequestCore($signedUrl);
$request->set_method('GET');
$request->add_header('Content-Type', '');
$request->send_request();
$res = new ResponseCore($request->get_response_header(), $request->get_response_body(), $request->get_response_code());
$this->assertEquals(file_get_contents(__FILE__), $res->body);
sleep(1);
} catch (OssException $e) {
$this->assertFalse(true);
}
// test Get genPreSignedUrl Vs SignedUrl
$object = "object-vs.file";
do {
usleep(500000);
$begin = time();
$expiration = time() + 3600;
$signedUrl1 = $this->stsOssClient->generatePresignedUrl($this->bucket, $object, $expiration);
$signedUrl2 = $this->stsOssClient->signUrl($this->bucket, $object, 3600);
$end = time();
} while ($begin != $end);
$this->assertEquals($signedUrl1, $signedUrl2);
$this->assertTrue(strpos($signedUrl1, 'x-oss-expires=') !== false);
$object = "a.file";
$options = array(
OssClient::OSS_HEADERS => array(
'name' => 'aliyun',
'email' => 'aliyun@aliyun.com',
'book' => 'english',
),
OssClient::OSS_ADDITIONAL_HEADERS => array("name", "email")
);
$this->stsOssClient->putObject($this->bucket, $object, file_get_contents(__FILE__), $options);
$expires = time() + 3600;
try {
$signedUrl = $this->stsOssClient->generatePresignedUrl($this->bucket, $object, $expires, "GET", $options);
$request = new RequestCore($signedUrl);
$request->set_method('GET');
$request->add_header('Content-Type', '');
$request->add_header('name', 'aliyun');
$request->add_header('email', 'aliyun@aliyun.com');
$request->send_request();
$res = new ResponseCore($request->get_response_header(), $request->get_response_body(), $request->get_response_code());
$this->assertEquals(file_get_contents(__FILE__), $res->body);
sleep(1);
} catch (OssException $e) {
print_r($e->getMessage());
$this->assertFalse(true);
}
}
public function testObjectWithSignV4AndResponseQuery()
{
$config = array(
'signatureVersion' => OssClient::OSS_SIGNATURE_VERSION_V4
);
$this->bucket = Common::getBucketName() . '-' . time();
$this->ossClient = Common::getOssClient($config);
$this->ossClient->createBucket($this->bucket);
Common::waitMetaSync();
$object = "a.file";
$this->ossClient->putObject($this->bucket, $object, "hi oss");
$timeout = 3600;
$options = array(
"response-content-disposition" => "inline"
);
try {
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, OssClient::OSS_HTTP_GET, $options);
} catch (OssException $e) {
$this->assertFalse(true);
}
$this->assertStringContainsString("response-content-disposition=inline", $signedUrl);
$options = array(
"response-content-disposition" => "attachment"
);
try {
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, OssClient::OSS_HTTP_GET, $options);
} catch (OssException $e) {
$this->assertFalse(true);
}
$this->assertStringContainsString("response-content-disposition=attachment", $signedUrl);
$httpCore = new RequestCore($signedUrl);
$httpCore->set_body("");
$httpCore->set_method("GET");
$httpCore->connect_timeout = 10;
$httpCore->timeout = 10;
$httpCore->add_header("Content-Type", "");
$httpCore->send_request();
$this->assertEquals(200, $httpCore->response_code);
}
protected function tearDown(): void
{
$this->ossClient->deleteObject($this->bucket, "a.file");
parent::tearDown();
}
protected function setUp(): void
{
$config = array(
'signatureVersion' => OssClient::OSS_SIGNATURE_VERSION_V4
);
$this->bucket = Common::getBucketName() . '-' . time();
$this->ossClient = Common::getOssClient($config);
$this->ossClient->createBucket($this->bucket);
Common::waitMetaSync();
$this->stsOssClient = Common::getStsOssClient($config);
Common::waitMetaSync();
}
}

View File

@@ -1,167 +1,267 @@
<?php <?php
namespace OSS\Tests; namespace OSS\Tests;
use OSS\Core\OssException; use http\Client;
use OSS\Http\RequestCore; use OSS\Core\OssException;
use OSS\Http\ResponseCore; use OSS\Http\RequestCore;
use OSS\OssClient; use OSS\Http\ResponseCore;
use OSS\OssClient;
require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
class OssClientSignatureTest extends TestOssClientBase
{ class OssClientSignatureTest extends TestOssClientBase
function testGetSignedUrlForGettingObject() {
{ public function testGetSignedUrlForGettingObject()
$object = "a.file"; {
$this->ossClient->putObject($this->bucket, $object, file_get_contents(__FILE__)); $object = "a.file";
$timeout = 3600; $this->ossClient->putObject($this->bucket, $object, file_get_contents(__FILE__));
try { $timeout = 3600;
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout); try {
} catch (OssException $e) { $signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout);
$this->assertFalse(true); } catch (OssException $e) {
} $this->assertFalse(true);
}
$request = new RequestCore($signedUrl);
$request->set_method('GET'); $request = new RequestCore($signedUrl);
$request->add_header('Content-Type', ''); $request->set_method('GET');
$request->send_request(); $request->add_header('Content-Type', '');
$res = new ResponseCore($request->get_response_header(), $request->get_response_body(), $request->get_response_code()); $request->send_request();
$this->assertEquals(file_get_contents(__FILE__), $res->body); $res = new ResponseCore($request->get_response_header(), $request->get_response_body(), $request->get_response_code());
} $this->assertEquals(file_get_contents(__FILE__), $res->body);
}
public function testGetSignedUrlForPuttingObject()
{ public function testGetSignedUrlForPuttingObject()
$object = "a.file"; {
$timeout = 3600; $object = "a.file";
try { $timeout = 3600;
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, "PUT"); try {
$content = file_get_contents(__FILE__); $signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, "PUT");
$request = new RequestCore($signedUrl); $content = file_get_contents(__FILE__);
$request->set_method('PUT'); $request = new RequestCore($signedUrl);
$request->add_header('Content-Type', ''); $request->set_method('PUT');
$request->add_header('Content-Length', strlen($content)); $request->add_header('Content-Type', '');
$request->set_body($content); $request->add_header('Content-Length', strlen($content));
$request->send_request(); $request->set_body($content);
$res = new ResponseCore($request->get_response_header(), $request->send_request();
$request->get_response_body(), $request->get_response_code()); $res = new ResponseCore($request->get_response_header(),
$this->assertTrue($res->isOK()); $request->get_response_body(), $request->get_response_code());
} catch (OssException $e) { $this->assertTrue($res->isOK());
$this->assertFalse(true); } catch (OssException $e) {
} $this->assertFalse(true);
} }
}
public function testGetSignedUrlForPuttingObjectFromFile()
{ public function testGetSignedUrlForPuttingObjectFromFile()
$file = __FILE__; {
$object = "a.file"; $file = __FILE__;
$timeout = 3600; $object = "a.file";
$options = array('Content-Type' => 'txt'); $timeout = 3600;
try { $options = array('Content-Type' => 'txt');
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, "PUT", $options); try {
$request = new RequestCore($signedUrl); $signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, "PUT", $options);
$request->set_method('PUT'); $request = new RequestCore($signedUrl);
$request->add_header('Content-Type', 'txt'); $request->set_method('PUT');
$request->set_read_file($file); $request->add_header('Content-Type', 'txt');
$request->set_read_stream_size(sprintf('%u',filesize($file))); $request->set_read_file($file);
$request->send_request(); $request->set_read_stream_size(sprintf('%u',filesize($file)));
$res = new ResponseCore($request->get_response_header(), $request->send_request();
$request->get_response_body(), $request->get_response_code()); $res = new ResponseCore($request->get_response_header(),
$this->assertTrue($res->isOK()); $request->get_response_body(), $request->get_response_code());
} catch (OssException $e) { $this->assertTrue($res->isOK());
$this->assertFalse(true); } catch (OssException $e) {
} $this->assertFalse(true);
}
}
}
public function testSignedUrlWithException()
{ public function testSignedUrlWithException()
$file = __FILE__; {
$object = "a.file"; $file = __FILE__;
$timeout = 3600; $object = "a.file";
$options = array('Content-Type' => 'txt'); $timeout = 3600;
try { $options = array('Content-Type' => 'txt');
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, "POST", $options); try {
$this->assertTrue(false); $signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, "POST", $options);
} catch (OssException $e) { $this->assertTrue(false);
$this->assertTrue(true); } catch (OssException $e) {
if (strpos($e, "method is invalid") == false) $this->assertTrue(true);
{ if (strpos($e, "method is invalid") == false)
$this->assertTrue(false); {
} $this->assertTrue(false);
} }
} }
function testGetgenPreSignedUrlForGettingObject() $object = "?a.file";
{ $timeout = 3600;
$object = "a.file"; $options = array('Content-Type' => 'txt');
$this->ossClient->putObject($this->bucket, $object, file_get_contents(__FILE__)); try {
$expires = time() + 3600; $signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, "PUT", $options);
try { $this->assertTrue(false);
$signedUrl = $this->ossClient->generatePresignedUrl($this->bucket, $object, $expires); } catch (OssException $e) {
} catch (OssException $e) { $this->assertTrue(true);
$this->assertFalse(true); if (strpos($e, "object name cannot start with `?`") == false)
} {
$this->assertTrue(false);
$request = new RequestCore($signedUrl); }
$request->set_method('GET'); }
$request->add_header('Content-Type', '');
$request->send_request(); // Set StrictObjectName false
$res = new ResponseCore($request->get_response_header(), $request->get_response_body(), $request->get_response_code()); $object = "?a.file";
$this->assertEquals(file_get_contents(__FILE__), $res->body); $timeout = 3600;
} $options = array('Content-Type' => 'txt');
$config = array(
function testGetgenPreSignedUrlVsSignedUrl() 'strictObjectName' => false
{ );
$object = "object-vs.file"; $ossClient = Common::getOssClient($config);
$signedUrl1 = '245'; try {
$signedUrl2 = '123'; $signedUrl = $ossClient->signUrl($this->bucket, $object, $timeout, "PUT", $options);
$expiration = 0; $this->assertTrue(true);
} catch (OssException $e) {
do { print_r($e->getMessage());
usleep(500000); $this->assertFalse(true);
$begin = time(); }
$expiration = time() + 3600;
$signedUrl1 = $this->ossClient->generatePresignedUrl($this->bucket, $object, $expiration); // V4
$signedUrl2 = $this->ossClient->signUrl($this->bucket, $object, 3600); $object = "?a.file";
$end = time(); $timeout = 3600;
} while ($begin != $end); $options = array('Content-Type' => 'txt');
$this->assertEquals($signedUrl1, $signedUrl2); $config = array(
$this->assertTrue(strpos($signedUrl1, 'Expires='.$expiration) !== false); 'signatureVersion' => OssClient::OSS_SIGNATURE_VERSION_V4
} );
$ossClient = Common::getOssClient($config);
protected function tearDown(): void try {
{ $signedUrl = $ossClient->signUrl($this->bucket, $object, $timeout, "PUT", $options);
$this->ossClient->deleteObject($this->bucket, "a.file"); $this->assertTrue(true);
parent::tearDown(); } catch (OssException $e) {
} print_r($e->getMessage());
$this->assertFalse(true);
protected function setUp(): void }
{ }
parent::setUp();
/** function testGetgenPreSignedUrlForGettingObject()
* 上传本地变量到bucket {
*/ $object = "a.file";
$object = "a.file"; $this->ossClient->putObject($this->bucket, $object, file_get_contents(__FILE__));
$content = file_get_contents(__FILE__); $expires = time() + 3600;
$options = array( try {
OssClient::OSS_LENGTH => strlen($content), $signedUrl = $this->ossClient->generatePresignedUrl($this->bucket, $object, $expires);
OssClient::OSS_HEADERS => array( } catch (OssException $e) {
'Expires' => 'Fri, 28 Feb 2020 05:38:42 GMT', $this->assertFalse(true);
'Cache-Control' => 'no-cache', }
'Content-Disposition' => 'attachment;filename=oss_download.log',
'Content-Encoding' => 'utf-8', $request = new RequestCore($signedUrl);
'Content-Language' => 'zh-CN', $request->set_method('GET');
'x-oss-server-side-encryption' => 'AES256', $request->add_header('Content-Type', '');
'x-oss-meta-self-define-title' => 'user define meta info', $request->send_request();
), $res = new ResponseCore($request->get_response_header(), $request->get_response_body(), $request->get_response_code());
); $this->assertEquals(file_get_contents(__FILE__), $res->body);
}
try {
$this->ossClient->putObject($this->bucket, $object, $content, $options); function testGetgenPreSignedUrlVsSignedUrl()
} catch (OssException $e) { {
$this->assertFalse(true); $object = "object-vs.file";
} $signedUrl1 = '245';
} $signedUrl2 = '123';
} $expiration = 0;
do {
usleep(500000);
$begin = time();
$expiration = time() + 3600;
$signedUrl1 = $this->ossClient->generatePresignedUrl($this->bucket, $object, $expiration);
$signedUrl2 = $this->ossClient->signUrl($this->bucket, $object, 3600);
$end = time();
} while ($begin != $end);
$this->assertEquals($signedUrl1, $signedUrl2);
$this->assertTrue(strpos($signedUrl1, 'Expires='.$expiration) !== false);
}
public function testPutObjectWithQueryCallback()
{
$object = "a.file";
$timeout = 3600;
$url = '{"callbackUrl":"http://aliyun.com", "callbackBody":"bucket=${bucket}&object=${object}"}';
$var =
'{
"x:var1":"value1",
"x:var2":"value2"
}';
try {
$options[OssClient::OSS_QUERY_STRING] = array(
'callback'=>base64_encode($url),
'callback-var'=>base64_encode($var)
);
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, "PUT", $options);
$content = file_get_contents(__FILE__);
$request = new RequestCore($signedUrl);
$request->set_method('PUT');
$request->add_header('Content-Type', '');
$request->add_header('Content-Length', strlen($content));
$request->set_body($content);
$request->send_request();
$res = new ResponseCore($request->get_response_header(),
$request->get_response_body(), $request->get_response_code());
$this->assertEquals($res->status, 203);
} catch (OssException $e) {
$this->assertFalse(true);
}
try {
$options = array(OssClient::OSS_CALLBACK => $url,
OssClient::OSS_CALLBACK_VAR => $var
);
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, "PUT", $options);
$content = file_get_contents(__FILE__);
$request = new RequestCore($signedUrl);
$request->set_method('PUT');
$request->add_header('Content-Type', '');
$request->add_header(OssClient::OSS_CALLBACK, base64_encode($url));
$request->add_header(OssClient::OSS_CALLBACK_VAR , base64_encode($var));
$request->add_header('Content-Length', strlen($content));
$request->set_body($content);
$request->send_request();
$res = new ResponseCore($request->get_response_header(),
$request->get_response_body(), $request->get_response_code());
$this->assertEquals($res->status, 203);
} catch (OssException $e) {
$this->assertFalse(true);
}
}
protected function tearDown(): void
{
$this->ossClient->deleteObject($this->bucket, "a.file");
parent::tearDown();
}
protected function setUp(): void
{
parent::setUp();
/**
* 上传本地变量到bucket
*/
$object = "a.file";
$content = file_get_contents(__FILE__);
$options = array(
OssClient::OSS_LENGTH => strlen($content),
OssClient::OSS_HEADERS => array(
'Expires' => 'Fri, 28 Feb 2020 05:38:42 GMT',
'Cache-Control' => 'no-cache',
'Content-Disposition' => 'attachment;filename=oss_download.log',
'Content-Encoding' => 'utf-8',
'Content-Language' => 'zh-CN',
'x-oss-server-side-encryption' => 'AES256',
'x-oss-meta-self-define-title' => 'user define meta info',
),
);
try {
$this->ossClient->putObject($this->bucket, $object, $content, $options);
} catch (OssException $e) {
$this->assertFalse(true);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,346 +1,521 @@
<?php <?php
namespace OSS\Tests; namespace OSS\Tests;
use OSS\Core\OssException; use OSS\Core\OssException;
use OSS\OssClient; use OSS\Credentials\EnvironmentVariableCredentialsProvider;
use OSS\OssClient;
use OSS\Credentials\Credentials;
class OssClientTest extends TestOssClientBase use OSS\Credentials\CredentialsProvider;
{ use OSS\Credentials\StaticCredentialsProvider;
public function testConstrunct()
{ require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
try {
$ossClient = new OssClient('id', 'key', 'http://oss-cn-hangzhou.aliyuncs.com'); class TestEmptyIdCredentials extends Credentials
$this->assertFalse($ossClient->isUseSSL()); {
$ossClient->setUseSSL(true); public function __construct()
$this->assertTrue($ossClient->isUseSSL()); {
$this->assertTrue(true); }
$this->assertEquals(3, $ossClient->getMaxRetries());
$ossClient->setMaxTries(4); public function getAccessKeyId()
$this->assertEquals(4, $ossClient->getMaxRetries()); {
$ossClient->setTimeout(10); return '';
$ossClient->setConnectTimeout(20); }
} catch (OssException $e) {
assertFalse(true); public function getAccessKeySecret()
} {
} return 'secret';
}
public function testConstrunct2()
{ public function getSecurityToken()
try { {
$ossClient = new OssClient('id', "", 'http://oss-cn-hangzhou.aliyuncs.com'); return null;
$this->assertFalse(true); }
} catch (OssException $e) { }
$this->assertEquals("access key secret is empty", $e->getMessage());
} class TestEmptySecretCredentials extends Credentials
} {
public function __construct()
public function testConstrunct3() {
{ }
try {
$ossClient = new OssClient("", 'key', 'http://oss-cn-hangzhou.aliyuncs.com'); public function getAccessKeyId()
$this->assertFalse(true); {
} catch (OssException $e) { return 'id';
$this->assertEquals("access key id is empty", $e->getMessage()); }
}
} public function getAccessKeySecret()
{
public function testConstrunct4() return '';
{ }
try {
$ossClient = new OssClient('id', 'key', ""); public function getSecurityToken()
$this->assertFalse(true); {
} catch (OssException $e) { return null;
$this->assertEquals('endpoint is empty', $e->getMessage()); }
} }
}
public function testConstrunct5() class TestCredentialsProvider implements CredentialsProvider
{ {
try { private $credentials;
$ossClient = new OssClient('id', 'key', "123.123.123.1");
$this->assertTrue(true); public function __construct($flag)
} catch (OssException $e) { {
$this->assertTrue(false); if ($flag == 2) {
} $this->credentials = new TestEmptyIdCredentials();
} } else if ($flag == 1) {
$this->credentials = new TestEmptySecretCredentials();
public function testConstrunct6() } else {
{ $this->credentials = null;
try { }
$ossClient = new OssClient('id', 'key', "https://123.123.123.1"); }
$this->assertTrue($ossClient->isUseSSL());
$this->assertTrue(true); /**
} catch (OssException $e) { * @return Credentials
$this->assertTrue(false); */
} public function getCredentials()
{
try { return $this->credentials;
$ossClient = new OssClient('id', 'key', "https://123.123.123.1:3128"); }
$this->assertTrue($ossClient->isUseSSL()); }
$this->assertTrue(true);
} catch (OssException $e) { class OssClientTest extends TestOssClientBase
$this->assertTrue(false); {
} public function testConstrunct()
} {
try {
public function testConstrunct7() $ossClient = new OssClient('id', 'key', 'http://oss-cn-hangzhou.aliyuncs.com');
{ $this->assertFalse($ossClient->isUseSSL());
try { $ossClient->setUseSSL(true);
$ossClient = new OssClient('id', 'key', "http://123.123.123.1"); $this->assertTrue($ossClient->isUseSSL());
$this->assertFalse($ossClient->isUseSSL()); $this->assertTrue(true);
$this->assertTrue(true); $this->assertEquals(3, $ossClient->getMaxRetries());
} catch (OssException $e) { $ossClient->setMaxTries(4);
$this->assertTrue(false); $this->assertEquals(4, $ossClient->getMaxRetries());
} $ossClient->setTimeout(10);
$ossClient->setConnectTimeout(20);
try { } catch (OssException $e) {
$ossClient = new OssClient('id', 'key', "http://123.123.123.1:3128"); assertFalse(true);
$this->assertFalse($ossClient->isUseSSL()); }
$this->assertTrue(true); }
} catch (OssException $e) {
$this->assertTrue(false); public function testConstrunct2()
} {
} try {
$ossClient = new OssClient('id', "", 'http://oss-cn-hangzhou.aliyuncs.com');
public function testConstrunct8() $this->assertFalse(true);
{ } catch (OssException $e) {
try { $this->assertEquals("access key secret is empty", $e->getMessage());
$ossClient = new OssClient('id', 'key', "http://123.123.123.1", true); }
$ossClient->listBuckets(); }
$this->assertFalse(true);
} catch (OssException $e) { public function testConstrunct3()
$this->assertFalse(false); {
} try {
} $ossClient = new OssClient("", 'key', 'http://oss-cn-hangzhou.aliyuncs.com');
$this->assertFalse(true);
public function testConstrunct9() } catch (OssException $e) {
{ $this->assertEquals("access key id is empty", $e->getMessage());
try { }
$accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' '; }
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; public function testConstrunct4()
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false); {
$ossClient->listBuckets(); try {
$this->assertTrue(true); $ossClient = new OssClient('id', 'key', "");
} catch (OssException $e) { $this->assertFalse(true);
$this->assertFalse(true); } catch (OssException $e) {
} $this->assertEquals('endpoint is empty', $e->getMessage());
} }
}
public function testConstrunct10()
{ public function testConstrunct5()
try { {
$ossClient = new OssClient('id', 'key', "http://ABC-COM.TEST.123.cn", true); try {
$this->assertTrue(true); $ossClient = new OssClient('id', 'key', "123.123.123.1");
} catch (OssException $e) { $this->assertTrue(true);
$this->assertTrue(false); } catch (OssException $e) {
} $this->assertTrue(false);
} }
}
public function testConstrunct11()
{ public function testConstrunct6()
try { {
$ossClient = new OssClient('id', 'key', "oss-test.com\\aliyuncs.com"); try {
$this->assertFalse(true); $ossClient = new OssClient('id', 'key', "https://123.123.123.1");
} catch (OssException $e) { $this->assertTrue($ossClient->isUseSSL());
$this->assertEquals('endpoint is invalid:'."oss-test.com\\aliyuncs.com", $e->getMessage()); $this->assertTrue(true);
} } catch (OssException $e) {
} $this->assertTrue(false);
}
public function testConstrunct12()
{ try {
try { $ossClient = new OssClient('id', 'key', "https://123.123.123.1:3128");
$ossClient = new OssClient('id', 'key', "192.168.1.0:abc123"); $this->assertTrue($ossClient->isUseSSL());
$this->assertFalse(true); $this->assertTrue(true);
} catch (OssException $e) { } catch (OssException $e) {
$this->assertEquals('endpoint is invalid:'."192.168.1.0:abc123", $e->getMessage()); $this->assertTrue(false);
} }
} }
public function testSupportPutEmptyObject() public function testConstrunct7()
{ {
try { try {
$accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' '; $ossClient = new OssClient('id', 'key', "http://123.123.123.1");
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; $this->assertFalse($ossClient->isUseSSL());
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; $this->assertTrue(true);
$bucket = $this->bucket; } catch (OssException $e) {
$ossClient = new OssClient($accessKeyId, $accessKeySecret , $endpoint, false); $this->assertTrue(false);
$ossClient->putObject($bucket,'test_emptybody',''); }
} catch (OssException $e) {
$this->assertFalse(true); try {
} $ossClient = new OssClient('id', 'key', "http://123.123.123.1:3128");
$this->assertFalse($ossClient->isUseSSL());
//use invalid sts-token, should fail. $this->assertTrue(true);
try { } catch (OssException $e) {
$accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' '; $this->assertTrue(false);
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; }
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; }
$bucket = $this->bucket;
$ossClient = new OssClient($accessKeyId, $accessKeySecret , $endpoint, false, "invalid-sts-token"); public function testConstrunct8()
$ossClient->putObject($bucket,'test_emptybody',''); {
$this->assertTrue(false); try {
} catch (OssException $e) { $ossClient = new OssClient('id', 'key', "http://123.123.123.1", true);
$this->assertEquals('InvalidAccessKeyId', $e->getErrorCode()); $ossClient->listBuckets();
} $this->assertFalse(true);
} } catch (OssException $e) {
$this->assertFalse(false);
public function testCreateObjectDir() }
{ }
$accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; public function testConstrunct9()
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; {
$bucket = $this->bucket; try {
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false); $accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
try { $endpoint = ' ' . Common::getEndpoint() . '/ ';
$object='test-dir'; $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false);
$ossClient->createObjectDir($bucket,$object); $ossClient->listBuckets();
$this->assertTrue(true); $this->assertTrue(true);
} catch (OssException $e) { } catch (OssException $e) {
$this->assertFalse(true); $this->assertFalse(true);
} }
}
try {
$object='0'; public function testConstrunct10()
$ossClient->createObjectDir($bucket,$object); {
$ossClient->putObject($bucket,$object, ''); try {
$this->assertTrue(true); $ossClient = new OssClient('id', 'key', "http://ABC-COM.TEST.123.cn", true);
} catch (OssException $e) { $this->assertTrue(true);
var_dump($e); } catch (OssException $e) {
$this->assertFalse(true); $this->assertTrue(false);
} }
} }
public function testGetBucketCors() public function testConstrunct11()
{ {
try { try {
$accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' '; $ossClient = new OssClient('id', 'key', "oss-test.com\\aliyuncs.com");
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; $this->assertFalse(true);
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; } catch (OssException $e) {
$bucket = getenv('OSS_BUCKET'); $this->assertEquals('endpoint is invalid:' . "oss-test.com\\aliyuncs.com", $e->getMessage());
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false); }
$ossClient->getBucketCors($bucket); }
$this->assertTrue(true);
} catch (OssException $e) { public function testConstrunct12()
$this->assertFalse(true); {
} try {
} $ossClient = new OssClient('id', 'key', "192.168.1.0:abc123");
$this->assertFalse(true);
public function testGetBucketCname() } catch (OssException $e) {
{ $this->assertEquals('endpoint is invalid:' . "192.168.1.0:abc123", $e->getMessage());
try { }
$accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' '; }
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; public function testSupportPutEmptyObject()
$bucket = $this->bucket; {
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false); try {
$ossClient->getBucketCname($bucket); $accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$this->assertTrue(true); $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
} catch (OssException $e) { $endpoint = ' ' . Common::getEndpoint() . '/ ';
$this->assertFalse(true); $bucket = $this->bucket;
} $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false);
} $ossClient->putObject($bucket, 'test_emptybody', '');
} catch (OssException $e) {
public function testProxySupport() $this->assertFalse(true);
{ }
$accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; //use invalid sts-token, should fail.
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; try {
$bucket = getenv('OSS_BUCKET') . '-proxy'; $accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$requestProxy = getenv('OSS_PROXY'); $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$key = 'test-proxy-srv-object'; $endpoint = ' ' . Common::getEndpoint() . '/ ';
$content = 'test-content'; $bucket = $this->bucket;
$proxys = parse_url($requestProxy); $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false, "invalid-sts-token");
$ossClient->putObject($bucket, 'test_emptybody', '');
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false, null, $requestProxy); $this->assertTrue(false);
} catch (OssException $e) {
$result = $ossClient->createBucket($bucket); $this->assertEquals('InvalidAccessKeyId', $e->getErrorCode());
$this->checkProxy($result, $proxys); }
}
$result = $ossClient->putObject($bucket, $key, $content);
$this->checkProxy($result, $proxys); public function testCreateObjectDir()
$result = $ossClient->getObject($bucket, $key); {
$this->assertEquals($content, $result); $accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
// list object $endpoint = ' ' . Common::getEndpoint() . '/ ';
$objectListInfo = $ossClient->listObjects($bucket); $bucket = $this->bucket;
$objectList = $objectListInfo->getObjectList(); $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false);
$this->assertNotNull($objectList);
$this->assertTrue(is_array($objectList)); try {
$objects = array(); $object = 'test-dir';
foreach ($objectList as $value) { $ossClient->createObjectDir($bucket, $object);
$objects[] = $value->getKey(); $this->assertTrue(true);
} } catch (OssException $e) {
$this->assertEquals(1, count($objects)); $this->assertFalse(true);
$this->assertTrue(in_array($key, $objects)); }
$result = $ossClient->deleteObject($bucket, $key); try {
$this->checkProxy($result,$proxys); $object = '0';
$ossClient->createObjectDir($bucket, $object);
$result = $ossClient->deleteBucket($bucket); $ossClient->putObject($bucket, $object, '');
$this->checkProxy($result, $proxys); $this->assertTrue(true);
} } catch (OssException $e) {
var_dump($e);
private function checkProxy($result, $proxys) $this->assertFalse(true);
{ }
$this->assertEquals($result['info']['primary_ip'], $proxys['host']); }
$this->assertEquals($result['info']['primary_port'], $proxys['port']);
$this->assertTrue(array_key_exists('via', $result)); public function testGetBucketCors()
} {
try {
public function testIpEndpoint() $accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
{ $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
try { $endpoint = ' ' . Common::getEndpoint(). '/ ';
$accessKeyId = 'sk' . getenv('OSS_ACCESS_KEY_ID') . ' '; $bucket = Common::getBucketName();
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false);
$endpoint = '192.168.1.1'; $ossClient->getBucketCors($bucket);
$bucket = getenv('OSS_BUCKET'); $this->assertTrue(true);
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false); } catch (OssException $e) {
$object = "a.file"; $this->assertFalse(true);
$timeout = 3600; }
$options = array('Content-Type' => 'txt'); }
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "PUT", $options);
$this->assertTrue(strpos($signedUrl, '192.168.1.1/skyranch-php-test/a.file?') != false); public function testGetBucketCname()
} catch (OssException $e) { {
$this->assertFalse(true); try {
} $accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
} $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = ' ' . Common::getEndpoint() . '/ ';
public function testCnameEndpoint() $bucket = $this->bucket;
{ $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false);
try { $ossClient->getBucketCname($bucket);
$accessKeyId = 'sk' . getenv('OSS_ACCESS_KEY_ID') . ' '; $this->assertTrue(true);
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; } catch (OssException $e) {
$endpoint = 'cname.endpoint'; $this->assertFalse(true);
$bucket = getenv('OSS_BUCKET'); }
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, true); }
$object = "a.file";
$timeout = 3600; public function testProxySupport()
$options = array('Content-Type' => 'txt'); {
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "PUT", $options); $accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$this->assertTrue(strpos($signedUrl, 'cname.endpoint/a.file?') != false); $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
} catch (OssException $e) { $endpoint = ' ' . Common::getEndpoint() . '/ ';
$this->assertFalse(true); $bucket = Common::getBucketName() . '-proxy';
} $requestProxy = getenv('OSS_PROXY');
} $key = 'test-proxy-srv-object';
$content = 'test-content';
public function testStsToken() $proxys = parse_url($requestProxy);
{
try { $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false, null, $requestProxy);
$accessKeyId = 'sk' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; $result = $ossClient->createBucket($bucket);
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; $this->checkProxy($result, $proxys);
$bucket = getenv('OSS_BUCKET');
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false, "test-token"); $result = $ossClient->putObject($bucket, $key, $content);
$object = "a.file"; $this->checkProxy($result, $proxys);
$timeout = 3600; $result = $ossClient->getObject($bucket, $key);
$options = array('Content-Type' => 'txt'); $this->assertEquals($content, $result);
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "PUT", $options);
$this->assertTrue(strpos($signedUrl, 'security-token=test-token') != false); // list object
} catch (OssException $e) { $objectListInfo = $ossClient->listObjects($bucket);
$this->assertFalse(true); $objectList = $objectListInfo->getObjectList();
} $this->assertNotNull($objectList);
} $this->assertTrue(is_array($objectList));
} $objects = array();
foreach ($objectList as $value) {
$objects[] = $value->getKey();
}
$this->assertEquals(1, count($objects));
$this->assertTrue(in_array($key, $objects));
$result = $ossClient->deleteObject($bucket, $key);
$this->checkProxy($result, $proxys);
$result = $ossClient->deleteBucket($bucket);
$this->checkProxy($result, $proxys);
}
private function checkProxy($result, $proxys)
{
$this->assertEquals($result['info']['primary_ip'], $proxys['host']);
$this->assertEquals($result['info']['primary_port'], $proxys['port']);
$this->assertTrue(array_key_exists('via', $result));
}
public function testIpEndpoint()
{
try {
$accessKeyId = 'sk' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = '192.168.1.1';
$bucket = Common::getBucketName();
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false);
$object = "a.file";
$timeout = 3600;
$options = array('Content-Type' => 'txt');
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "PUT", $options);
$this->assertTrue(strpos($signedUrl, '192.168.1.1/' . $bucket . '/a.file?') != false);
} catch (OssException $e) {
$this->assertFalse(true);
}
}
public function testCnameEndpoint()
{
try {
$accessKeyId = 'sk' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = 'cname.endpoint';
$bucket = Common::getBucketName();
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, true);
$object = "a.file";
$timeout = 3600;
$options = array('Content-Type' => 'txt');
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "PUT", $options);
$this->assertTrue(strpos($signedUrl, 'cname.endpoint/a.file?') != false);
} catch (OssException $e) {
$this->assertFalse(true);
}
}
public function testStsToken()
{
try {
$accessKeyId = 'sk' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = ' ' . Common::getEndpoint() . '/ ';
$bucket = Common::getBucketName();
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false, "test-token");
$object = "a.file";
$timeout = 3600;
$options = array('Content-Type' => 'txt');
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "PUT", $options);
$this->assertTrue(strpos($signedUrl, 'security-token=test-token') != false);
} catch (OssException $e) {
$this->assertFalse(true);
}
}
public function testEmptyCredentials()
{
// empty case, should throw exception
try {
$id = '';
$secret = 'accessKey_secret';
$provider = new StaticCredentialsProvider($id, $secret);
$config = array(
'provider' => $provider,
'endpoint' => 'http://oss-cn-hangzhou.aliyuncs.com'
);
$ossClient = new OssClient($config);
$this->assertFalse(true);
} catch (OssException $e) {
$this->assertEquals('access key id is empty', $e->getMessage());
}
// empty case, should throw exception
try {
$id = 'id';
$secret = '';
$provider = new StaticCredentialsProvider($id, $secret);
$config = array(
'provider' => $provider,
'endpoint' => 'http://oss-cn-hangzhou.aliyuncs.com'
);
$ossClient = new OssClient($config);
$this->assertFalse(true);
} catch (OssException $e) {
$this->assertEquals('access key secret is empty', $e->getMessage());
}
// empty case, should throw exception
try {
$provider = new TestCredentialsProvider(0);
$config = array(
'provider' => $provider,
'endpoint' => 'http://oss-cn-hangzhou.aliyuncs.com'
);
$ossClient = new OssClient($config);
$ossClient->getBucketAcl("bucket");
$this->assertFalse(true);
} catch (OssException $e) {
$this->assertEquals('credentials is empty.', $e->getMessage());
}
// empty case, should throw exception
try {
$provider = new TestCredentialsProvider(1);
$config = array(
'provider' => $provider,
'endpoint' => 'http://oss-cn-hangzhou.aliyuncs.com'
);
$ossClient = new OssClient($config);
$ossClient->getBucketAcl("bucket");
$this->assertFalse(true);
} catch (OssException $e) {
$this->assertEquals('access key secret is empty', $e->getMessage());
}
// empty case, should throw exception
try {
$provider = new TestCredentialsProvider(2);
$config = array(
'provider' => $provider,
'endpoint' => 'http://oss-cn-hangzhou.aliyuncs.com'
);
$ossClient = new OssClient($config);
$ossClient->getBucketAcl("bucket");
$this->assertFalse(true);
} catch (OssException $e) {
$this->assertEquals('access key id is empty', $e->getMessage());
}
}
public function testEnvironmentVariableCredentialsProvider()
{
try {
$provider = new EnvironmentVariableCredentialsProvider();
$config = array(
'provider' => $provider,
'endpoint' => Common::getEndpoint(),
);
$ossClient = new OssClient($config);
$ossClient->putObject($this->bucket, 'test_emptybody', '');
$this->assertTrue(true);
} catch (OssException $e) {
printf($e->getMessage());
$this->assertFalse(true);
}
try {
$ossClient->getObject($this->bucket, 'test_emptybody');
$this->assertTrue(true);
} catch (OssException $e) {
printf($e->getMessage());
$this->assertFalse(true);
}
}
}

View File

@@ -143,7 +143,7 @@ BBBB;
public function testReadDir() public function testReadDir()
{ {
$list = OssUtil::readDir("./src", ".|..|.svn|.git", true); $list = OssUtil::readDir(__DIR__, ".|..|.svn|.git", true);
$this->assertNotNull($list); $this->assertNotNull($list);
} }

View File

@@ -6,7 +6,7 @@ use OSS\Core\OssException;
use OSS\Http\ResponseCore; use OSS\Http\ResponseCore;
use OSS\Result\PutSetDeleteResult; use OSS\Result\PutSetDeleteResult;
class ResultTest extends \PHPUnit\Framework\TestCase class PutSetDeleteResultTest extends \PHPUnit\Framework\TestCase
{ {
public function testNullResponse() public function testNullResponse()

View File

@@ -0,0 +1,558 @@
<?php
namespace OSS\Tests;
use OSS\Http\RequestCore;
use OSS\Credentials\Credentials;
use OSS\Signer\SignerV1;
use OSS\Signer\SignerV4;
use OSS\Core\OssUtil;
class SignerTest extends \PHPUnit\Framework\TestCase
{
public function testSignerV1Header()
{
// case 1
$credentials = new Credentials("ak", "sk");
$request = new RequestCore("http://examplebucket.oss-cn-hangzhou.aliyuncs.com");
$request->set_method("PUT");
$bucket = "examplebucket";
$object = "nelson";
$request->add_header("Content-MD5", "eB5eJF1ptWaXm4bijSPyxw==");
$request->add_header("Content-Type", "text/html");
$request->add_header("x-oss-meta-author", "alice");
$request->add_header("x-oss-meta-magic", "abracadabra");
$request->add_header("x-oss-date", "Wed, 28 Dec 2022 10:27:41 GMT");
$request->add_header("Date", "Wed, 28 Dec 2022 10:27:41 GMT");
$signer = new SignerV1();
$signingOpt = array(
'bucket' => $bucket,
'key' => $object,
);
$signer->sign($request, $credentials, $signingOpt);
$signToString = "PUT\neB5eJF1ptWaXm4bijSPyxw==\ntext/html\nWed, 28 Dec 2022 10:27:41 GMT\nx-oss-date:Wed, 28 Dec 2022 10:27:41 GMT\nx-oss-meta-author:alice\nx-oss-meta-magic:abracadabra\n/examplebucket/nelson";
$this->assertEquals($signToString, $signingOpt['string_to_sign']);
$this->assertEquals('OSS ak:kSHKmLxlyEAKtZPkJhG9bZb5k7M=', $request->request_headers['Authorization']);
// case 2
$request2 = new RequestCore("http://examplebucket.oss-cn-hangzhou.aliyuncs.com?acl");
$request2->set_method("PUT");
$request2->add_header("Content-MD5", "eB5eJF1ptWaXm4bijSPyxw==");
$request2->add_header("Content-Type", "text/html");
$request2->add_header("x-oss-meta-author", "alice");
$request2->add_header("x-oss-meta-magic", "abracadabra");
$request2->add_header("x-oss-date", "Wed, 28 Dec 2022 10:27:41 GMT");
$request2->add_header("Date", "Wed, 28 Dec 2022 10:27:41 GMT");
$signer = new SignerV1();
$signingOpt2 = array(
'bucket' => $bucket,
'key' => $object,
);
$signer->sign($request2, $credentials, $signingOpt2);
$signToString = "PUT\neB5eJF1ptWaXm4bijSPyxw==\ntext/html\nWed, 28 Dec 2022 10:27:41 GMT\nx-oss-date:Wed, 28 Dec 2022 10:27:41 GMT\nx-oss-meta-author:alice\nx-oss-meta-magic:abracadabra\n/examplebucket/nelson?acl";
$this->assertEquals($signToString, $signingOpt2['string_to_sign']);
$this->assertEquals('OSS ak:/afkugFbmWDQ967j1vr6zygBLQk=', $request2->request_headers['Authorization']);
// case 3 with non-signed query
$request3 = new RequestCore("http://examplebucket.oss-cn-hangzhou.aliyuncs.com?acl&non-signed-key=value");
$request3->set_method("PUT");
$request3->add_header("Content-MD5", "eB5eJF1ptWaXm4bijSPyxw==");
$request3->add_header("Content-Type", "text/html");
$request3->add_header("x-oss-meta-author", "alice");
$request3->add_header("x-oss-meta-magic", "abracadabra");
$request3->add_header("x-oss-date", "Wed, 28 Dec 2022 10:27:41 GMT");
$request3->add_header("Date", "Wed, 28 Dec 2022 10:27:41 GMT");
$signingOpt3 = array(
'bucket' => $bucket,
'key' => $object,
);
$signer->sign($request3, $credentials, $signingOpt3);
$signToString = "PUT\neB5eJF1ptWaXm4bijSPyxw==\ntext/html\nWed, 28 Dec 2022 10:27:41 GMT\nx-oss-date:Wed, 28 Dec 2022 10:27:41 GMT\nx-oss-meta-author:alice\nx-oss-meta-magic:abracadabra\n/examplebucket/nelson?acl";
$this->assertEquals($signToString, $signingOpt3['string_to_sign']);
$this->assertEquals('OSS ak:/afkugFbmWDQ967j1vr6zygBLQk=', $request3->request_headers['Authorization']);
}
public function testSignerV1HeaderWithToken()
{
// case 1
$credentials = new Credentials("ak", "sk", "token");
$request = new RequestCore("http://examplebucket.oss-cn-hangzhou.aliyuncs.com");
$request->set_method("PUT");
$bucket = "examplebucket";
$object = "nelson";
$request->add_header("Content-MD5", "eB5eJF1ptWaXm4bijSPyxw==");
$request->add_header("Content-Type", "text/html");
$request->add_header("x-oss-meta-author", "alice");
$request->add_header("x-oss-meta-magic", "abracadabra");
$request->add_header("x-oss-date", "Wed, 28 Dec 2022 10:27:41 GMT");
$request->add_header("Date", "Wed, 28 Dec 2022 10:27:41 GMT");
$signer = new SignerV1();
$signingOpt = array(
'bucket' => $bucket,
'key' => $object,
);
$signer->sign($request, $credentials, $signingOpt);
$signToString = "PUT\neB5eJF1ptWaXm4bijSPyxw==\ntext/html\nWed, 28 Dec 2022 10:27:41 GMT\nx-oss-date:Wed, 28 Dec 2022 10:27:41 GMT\nx-oss-meta-author:alice\nx-oss-meta-magic:abracadabra\nx-oss-security-token:token\n/examplebucket/nelson";
$this->assertEquals($signToString, $signingOpt['string_to_sign']);
$this->assertEquals('OSS ak:H3PAlN3Vucn74tPVEqaQC4AnLwQ=', $request->request_headers['Authorization']);
$this->assertEquals('token', $request->request_headers['x-oss-security-token']);
// case 2
$request2 = new RequestCore("http://examplebucket.oss-cn-hangzhou.aliyuncs.com?acl");
$request2->set_method("PUT");
$request2->add_header("Content-MD5", "eB5eJF1ptWaXm4bijSPyxw==");
$request2->add_header("Content-Type", "text/html");
$request2->add_header("x-oss-meta-author", "alice");
$request2->add_header("x-oss-meta-magic", "abracadabra");
$request2->add_header("x-oss-date", "Wed, 28 Dec 2022 10:27:41 GMT");
$request2->add_header("Date", "Wed, 28 Dec 2022 10:27:41 GMT");
$signer = new SignerV1();
$signingOpt2 = array(
'bucket' => $bucket,
'key' => $object,
);
$signer->sign($request2, $credentials, $signingOpt2);
$signToString = "PUT\neB5eJF1ptWaXm4bijSPyxw==\ntext/html\nWed, 28 Dec 2022 10:27:41 GMT\nx-oss-date:Wed, 28 Dec 2022 10:27:41 GMT\nx-oss-meta-author:alice\nx-oss-meta-magic:abracadabra\nx-oss-security-token:token\n/examplebucket/nelson?acl";
$this->assertEquals($signToString, $signingOpt2['string_to_sign']);
$this->assertEquals("OSS ak:yeceHMAsgusDPCR979RJcLtd7RI=", $request2->request_headers['Authorization']);
// case 3 with non-signed query
$request3 = new RequestCore("http://examplebucket.oss-cn-hangzhou.aliyuncs.com?acl&non-signed-key=value");
$request3->set_method("PUT");
$request3->add_header("Content-MD5", "eB5eJF1ptWaXm4bijSPyxw==");
$request3->add_header("Content-Type", "text/html");
$request3->add_header("x-oss-meta-author", "alice");
$request3->add_header("x-oss-meta-magic", "abracadabra");
$request3->add_header("x-oss-date", "Wed, 28 Dec 2022 10:27:41 GMT");
$request3->add_header("Date", "Wed, 28 Dec 2022 10:27:41 GMT");
$signingOpt3 = array(
'bucket' => $bucket,
'key' => $object,
);
$signer->sign($request3, $credentials, $signingOpt3);
$signToString = "PUT\neB5eJF1ptWaXm4bijSPyxw==\ntext/html\nWed, 28 Dec 2022 10:27:41 GMT\nx-oss-date:Wed, 28 Dec 2022 10:27:41 GMT\nx-oss-meta-author:alice\nx-oss-meta-magic:abracadabra\nx-oss-security-token:token\n/examplebucket/nelson?acl";
$this->assertEquals($signToString, $signingOpt3['string_to_sign']);
$this->assertEquals('OSS ak:yeceHMAsgusDPCR979RJcLtd7RI=', $request2->request_headers['Authorization']);
}
public function testSignerV1Presign()
{
$credentials = new Credentials("ak", "sk");
$request = new RequestCore("http://bucket.oss-cn-hangzhou.aliyuncs.com/key?versionId=versionId");
$request->set_method("GET");
$bucket = "bucket";
$object = "key";
$signer = new SignerV1();
$signingOpt = array(
'bucket' => $bucket,
'key' => $object,
'expiration' => 1699807420,
);
$signer->presign($request, $credentials, $signingOpt);
$parsed_url = parse_url($request->request_url);
$queryString = isset($parsed_url['query']) ? $parsed_url['query'] : '';
$query = array();
parse_str($queryString, $query);
$this->assertEquals('1699807420', $query['Expires']);
$this->assertEquals('ak', $query['OSSAccessKeyId']);
$this->assertEquals('dcLTea+Yh9ApirQ8o8dOPqtvJXQ=', $query['Signature']);
$this->assertEquals('versionId', $query['versionId']);
$this->assertEquals('/key', $parsed_url['path']);
}
public function testSignerV1PresignWithToken()
{
$credentials = new Credentials("ak", "sk", "token");
$request = new RequestCore("http://bucket.oss-cn-hangzhou.aliyuncs.com/key%2B123?versionId=versionId");
$request->set_method("GET");
$bucket = "bucket";
$object = "key+123";
$signer = new SignerV1();
$signingOpt = array(
'bucket' => $bucket,
'key' => $object,
'expiration' => 1699808204,
);
$signer->presign($request, $credentials, $signingOpt);
$parsed_url = parse_url($request->request_url);
$queryString = isset($parsed_url['query']) ? $parsed_url['query'] : '';
$query = array();
parse_str($queryString, $query);
$this->assertEquals('1699808204', $query['Expires']);
$this->assertEquals('ak', $query['OSSAccessKeyId']);
$this->assertEquals('jzKYRrM5y6Br0dRFPaTGOsbrDhY=', $query['Signature']);
$this->assertEquals('versionId', $query['versionId']);
$this->assertEquals('token', $query['security-token']);
$this->assertEquals('/key%2B123', $parsed_url['path']);
}
public function testSignerV4Header()
{
// case 1
$credentials = new Credentials("ak", "sk");
$request = new RequestCore("http://bucket.oss-cn-hangzhou.aliyuncs.com/1234%2B-/123/1.txt");
$request->set_method("PUT");
$bucket = "bucket";
$object = "1234+-/123/1.txt";
$request->add_header("x-oss-head1", "value");
$request->add_header("abc", "value");
$request->add_header("ZAbc", "value");
$request->add_header("XYZ", "value");
$request->add_header("content-type", "text/plain");
$request->add_header("x-oss-content-sha256", "UNSIGNED-PAYLOAD");
$request->add_header("Date", gmdate('D, d M Y H:i:s \G\M\T', 1702743657));
$signer = new SignerV4();
$query = array();
$query["param1"] = "value1";
$query["+param1"] = "value3";
$query["|param1"] = "value4";
$query["+param2"] = "";
$query["|param2"] = "";
$query["param2"] = "";
$parsed_url = parse_url($request->request_url);
$parsed_url['query'] = OssUtil::toQueryString($query);;
$request->request_url = OssUtil::unparseUrl($parsed_url);
$signingOpt = array(
'bucket' => $bucket,
'key' => $object,
'region' => 'cn-hangzhou',
'product' => 'oss',
);
$signer->sign($request, $credentials, $signingOpt);
$authPat = "OSS4-HMAC-SHA256 Credential=ak/20231216/cn-hangzhou/oss/aliyun_v4_request,Signature=e21d18daa82167720f9b1047ae7e7f1ce7cb77a31e8203a7d5f4624fa0284afe";
$this->assertEquals($authPat, $request->request_headers['Authorization']);
}
public function testSignerV4HeaderWithToken()
{
// case 1
$credentials = new Credentials("ak", "sk", "token");
$request = new RequestCore("http://bucket.oss-cn-hangzhou.aliyuncs.com/1234%2B-/123/1.txt");
$request->set_method("PUT");
$bucket = "bucket";
$object = "1234+-/123/1.txt";
$request->add_header("x-oss-head1", "value");
$request->add_header("abc", "value");
$request->add_header("ZAbc", "value");
$request->add_header("XYZ", "value");
$request->add_header("content-type", "text/plain");
$request->add_header("x-oss-content-sha256", "UNSIGNED-PAYLOAD");
$request->add_header("Date", gmdate('D, d M Y H:i:s \G\M\T', 1702784856));
$signer = new SignerV4();
$query = array();
$query["param1"] = "value1";
$query["+param1"] = "value3";
$query["|param1"] = "value4";
$query["+param2"] = "";
$query["|param2"] = "";
$query["param2"] = "";
$parsed_url = parse_url($request->request_url);
$parsed_url['query'] = OssUtil::toQueryString($query);;
$request->request_url = OssUtil::unparseUrl($parsed_url);
$signingOpt = array(
'bucket' => $bucket,
'key' => $object,
'region' => 'cn-hangzhou',
'product' => 'oss',
);
$signer->sign($request, $credentials, $signingOpt);
$authPat = "OSS4-HMAC-SHA256 Credential=ak/20231217/cn-hangzhou/oss/aliyun_v4_request,Signature=b94a3f999cf85bcdc00d332fbd3734ba03e48382c36fa4d5af5df817395bd9ea";
$this->assertEquals($authPat, $request->request_headers['Authorization']);
}
public function testSignerV4AdditionalHeaders()
{
// case 1
$credentials = new Credentials("ak", "sk");
$request = new RequestCore("http://bucket.oss-cn-hangzhou.aliyuncs.com/1234%2B-/123/1.txt");
$request->set_method("PUT");
$bucket = "bucket";
$object = "1234+-/123/1.txt";
$request->add_header("x-oss-head1", "value");
$request->add_header("abc", "value");
$request->add_header("ZAbc", "value");
$request->add_header("XYZ", "value");
$request->add_header("content-type", "text/plain");
$request->add_header("x-oss-content-sha256", "UNSIGNED-PAYLOAD");
$request->add_header("Date", gmdate('D, d M Y H:i:s \G\M\T', 1702747512));
$signer = new SignerV4();
$query = array();
$query["param1"] = "value1";
$query["+param1"] = "value3";
$query["|param1"] = "value4";
$query["+param2"] = "";
$query["|param2"] = "";
$query["param2"] = "";
$parsed_url = parse_url($request->request_url);
$parsed_url['query'] = OssUtil::toQueryString($query);;
$request->request_url = OssUtil::unparseUrl($parsed_url);
$signingOpt = array(
'bucket' => $bucket,
'key' => $object,
'region' => 'cn-hangzhou',
'product' => 'oss',
'additionalHeaders' => array("ZAbc", "abc")
);
$signer->sign($request, $credentials, $signingOpt);
$authPat = "OSS4-HMAC-SHA256 Credential=ak/20231216/cn-hangzhou/oss/aliyun_v4_request,AdditionalHeaders=abc;zabc,Signature=4a4183c187c07c8947db7620deb0a6b38d9fbdd34187b6dbaccb316fa251212f";
$this->assertEquals($authPat, $request->request_headers['Authorization']);
// case 1
$credentials = new Credentials("ak", "sk");
$request = new RequestCore("http://bucket.oss-cn-hangzhou.aliyuncs.com/1234%2B-/123/1.txt");
$request->set_method("PUT");
$bucket = "bucket";
$object = "1234+-/123/1.txt";
$request->add_header("x-oss-head1", "value");
$request->add_header("abc", "value");
$request->add_header("ZAbc", "value");
$request->add_header("XYZ", "value");
$request->add_header("content-type", "text/plain");
$request->add_header("x-oss-content-sha256", "UNSIGNED-PAYLOAD");
$request->add_header("Date", gmdate('D, d M Y H:i:s \G\M\T', 1702747512));
$signer = new SignerV4();
$query = array();
$query["param1"] = "value1";
$query["+param1"] = "value3";
$query["|param1"] = "value4";
$query["+param2"] = "";
$query["|param2"] = "";
$query["param2"] = "";
$parsed_url = parse_url($request->request_url);
$parsed_url['query'] = OssUtil::toQueryString($query);;
$request->request_url = OssUtil::unparseUrl($parsed_url);
$signingOpt = array(
'bucket' => $bucket,
'key' => $object,
'region' => 'cn-hangzhou',
'product' => 'oss',
'additionalHeaders' => array("x-oss-no-exist", "ZAbc", "x-oss-head1", "abc")
);
$signer->sign($request, $credentials, $signingOpt);
$authPat = "OSS4-HMAC-SHA256 Credential=ak/20231216/cn-hangzhou/oss/aliyun_v4_request,AdditionalHeaders=abc;zabc,Signature=4a4183c187c07c8947db7620deb0a6b38d9fbdd34187b6dbaccb316fa251212f";
$this->assertEquals($authPat, $request->request_headers['Authorization']);
}
public function testSignerV4Presign()
{
// case 1
$credentials = new Credentials("ak", "sk");
$request = new RequestCore("http://bucket.oss-cn-hangzhou.aliyuncs.com/1234%2B-/123/1.txt");
$request->set_method("PUT");
$bucket = "bucket";
$object = "1234+-/123/1.txt";
$request->add_header("x-oss-head1", "value");
$request->add_header("abc", "value");
$request->add_header("ZAbc", "value");
$request->add_header("XYZ", "value");
$request->add_header("content-type", "application/octet-stream");
$request->add_header("Date", gmdate('D, d M Y H:i:s \G\M\T', 1702781677));
$signer = new SignerV4();
$query = array();
$query["param1"] = "value1";
$query["+param1"] = "value3";
$query["|param1"] = "value4";
$query["+param2"] = "";
$query["|param2"] = "";
$query["param2"] = "";
$parsed_url = parse_url($request->request_url);
$parsed_url['query'] = OssUtil::toQueryString($query);;
$request->request_url = OssUtil::unparseUrl($parsed_url);
$signingOpt = array(
'bucket' => $bucket,
'key' => $object,
'region' => 'cn-hangzhou',
'product' => 'oss',
'expiration' => 1702782276,
);
$signer->presign($request, $credentials, $signingOpt);
$parsed_url = parse_url($request->request_url);
$queryString = isset($parsed_url['query']) ? $parsed_url['query'] : '';
$query = array();
parse_str($queryString, $query);
$this->assertEquals('OSS4-HMAC-SHA256', $query['x-oss-signature-version']);
$this->assertEquals('OSS4-HMAC-SHA256', $query['x-oss-signature-version']);
$this->assertEquals('599', $query['x-oss-expires']);
$this->assertEquals('ak/20231217/cn-hangzhou/oss/aliyun_v4_request', $query['x-oss-credential']);
$this->assertEquals('a39966c61718be0d5b14e668088b3fa07601033f6518ac7b523100014269c0fe', $query['x-oss-signature']);
$this->assertFalse(isset($query['x-oss-additional-headers']));
}
public function testSignerV4PresignWithToken()
{
// case 1
$credentials = new Credentials("ak", "sk", "token");
$request = new RequestCore("http://bucket.oss-cn-hangzhou.aliyuncs.com/1234%2B-/123/1.txt");
$request->set_method("PUT");
$bucket = "bucket";
$object = "1234+-/123/1.txt";
$request->add_header("x-oss-head1", "value");
$request->add_header("abc", "value");
$request->add_header("ZAbc", "value");
$request->add_header("XYZ", "value");
$request->add_header("content-type", "application/octet-stream");
$request->add_header("Date", gmdate('D, d M Y H:i:s \G\M\T', 1702785388));
$signer = new SignerV4();
$query = array();
$query["param1"] = "value1";
$query["+param1"] = "value3";
$query["|param1"] = "value4";
$query["+param2"] = "";
$query["|param2"] = "";
$query["param2"] = "";
$parsed_url = parse_url($request->request_url);
$parsed_url['query'] = OssUtil::toQueryString($query);;
$request->request_url = OssUtil::unparseUrl($parsed_url);
$signingOpt = array(
'bucket' => $bucket,
'key' => $object,
'region' => 'cn-hangzhou',
'product' => 'oss',
'expiration' => 1702785987,
);
$signer->presign($request, $credentials, $signingOpt);
$parsed_url = parse_url($request->request_url);
$queryString = isset($parsed_url['query']) ? $parsed_url['query'] : '';
$query = array();
parse_str($queryString, $query);
$this->assertEquals('OSS4-HMAC-SHA256', $query['x-oss-signature-version']);
$this->assertEquals('599', $query['x-oss-expires']);
$this->assertEquals('ak/20231217/cn-hangzhou/oss/aliyun_v4_request', $query['x-oss-credential']);
$this->assertEquals('3817ac9d206cd6dfc90f1c09c00be45005602e55898f26f5ddb06d7892e1f8b5', $query['x-oss-signature']);
$this->assertFalse(isset($query['x-oss-additional-headers']));
//print($request->request_url);
}
public function testSignerV4PresignWithAdditionalHeaders()
{
// case 1
$credentials = new Credentials("ak", "sk");
$request = new RequestCore("http://bucket.oss-cn-hangzhou.aliyuncs.com/1234%2B-/123/1.txt");
$request->set_method("PUT");
$bucket = "bucket";
$object = "1234+-/123/1.txt";
$request->add_header("x-oss-head1", "value");
$request->add_header("abc", "value");
$request->add_header("ZAbc", "value");
$request->add_header("XYZ", "value");
$request->add_header("content-type", "application/octet-stream");
$request->add_header("Date", gmdate('D, d M Y H:i:s \G\M\T', 1702783809));
$signer = new SignerV4();
$query = array();
$query["param1"] = "value1";
$query["+param1"] = "value3";
$query["|param1"] = "value4";
$query["+param2"] = "";
$query["|param2"] = "";
$query["param2"] = "";
$parsed_url = parse_url($request->request_url);
$parsed_url['query'] = OssUtil::toQueryString($query);;
$request->request_url = OssUtil::unparseUrl($parsed_url);
$signingOpt = array(
'bucket' => $bucket,
'key' => $object,
'region' => 'cn-hangzhou',
'product' => 'oss',
'expiration' => 1702784408,
'additionalHeaders' => array("ZAbc", "abc")
);
$signer->presign($request, $credentials, $signingOpt);
$parsed_url = parse_url($request->request_url);
$queryString = isset($parsed_url['query']) ? $parsed_url['query'] : '';
$query = array();
parse_str($queryString, $query);
$this->assertEquals('OSS4-HMAC-SHA256', $query['x-oss-signature-version']);
$this->assertEquals('20231217T033009Z', $query['x-oss-date']);
$this->assertEquals('599', $query['x-oss-expires']);
$this->assertEquals('ak/20231217/cn-hangzhou/oss/aliyun_v4_request', $query['x-oss-credential']);
$this->assertEquals('6bd984bfe531afb6db1f7550983a741b103a8c58e5e14f83ea474c2322dfa2b7', $query['x-oss-signature']);
$this->assertEquals('abc;zabc', $query['x-oss-additional-headers']);
}
}

View File

@@ -0,0 +1,33 @@
<?php
namespace OSS\Tests;
class StsBase
{
protected $SignatureVersion = "1.0";
protected $Version = "2015-04-01";
protected $Timestamp;
protected $SignatureMethod = "HMAC-SHA1";
protected $Format = "JSON";
protected $AccessKeyId;
protected $SignatureNonce;
private $Signature;
public function __set($name, $value)
{
$this->$name = $value;
}
public function __construct()
{
$this->Timestamp = gmdate('Y-m-d\TH:i:s\Z');
$this->SignatureNonce = time().rand(10000,99999);
}
}

View File

@@ -0,0 +1,108 @@
<?php
namespace OSS\Tests;
use OSS\Core\OssException;
require_once __DIR__ . DIRECTORY_SEPARATOR . 'StsBase.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'AssumeRole.php';
class StsClient
{
public $AccessSecret;
public function doAction($params, $format="JSON")
{
$request_url = $this->generateSignedURL($params);
$response = $this->sendRequest($request_url, $format);
$result= $this->parseResponse($response, $format);
return $result;
}
private function sendRequest($url, $format)
{
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, $url);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_handle, CURLOPT_SSL_VERIFYHOST,false);
curl_setopt($curl_handle, CURLOPT_HEADER, true);
$response = curl_exec($curl_handle);
$headerSize = curl_getinfo($curl_handle, CURLINFO_HEADER_SIZE);
$response = substr($response, $headerSize);
if (curl_getinfo($curl_handle, CURLINFO_HTTP_CODE) != '200') {
$errors = $this->parseResponse($response, $format);
throw new OssException($errors->Code);
}
curl_close($curl_handle);
return $response;
}
private function parseResponse($body, $format)
{
if ("JSON" == $format) {
$respObject = json_decode($body);
} elseif ("XML" == $format) {
$respObject = @simplexml_load_string($body);
} elseif ("RAW" == $format) {
$respObject = $body;
}
return $respObject;
}
private function generateSignedURL($arr)
{
$request_url = 'https://sts.aliyuncs.com/?';
foreach ($arr as $key=>$item) {
if (is_null($item)) unset($arr[$key]);
}
$Signature = $this->computeSignature($arr, $this->AccessSecret);
ksort($arr);
foreach ($arr as $key => $value) {
$request_url .= $key."=".urlencode($value)."&";
}
$request_url .="Signature=".urlencode($Signature);
return $request_url;
}
private function computeSignature($parameters, $accessKeySecret)
{
ksort($parameters);
$canonicalizedQueryString = '';
foreach ($parameters as $key => $value) {
$canonicalizedQueryString .= '&' . $this->percentEncode($key). '=' . $this->percentEncode($value);
}
$stringToSign = 'GET&%2F&' . $this->percentencode(substr($canonicalizedQueryString, 1));
$signature = $this->signString($stringToSign, $accessKeySecret."&");
return $signature;
}
private function signString($source, $accessSecret)
{
return base64_encode(hash_hmac('sha1', $source, $accessSecret, true));
}
private function percentEncode($str)
{
$res = urlencode($str);
$res = preg_replace('/\+/', '%20', $res);
$res = preg_replace('/\*/', '%2A', $res);
$res = preg_replace('/%7E/', '~', $res);
return $res;
}
}

View File

@@ -108,10 +108,12 @@ if (PHP_VERSION_ID < 80000) {
} }
} }
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) { if (
include("phpvfscomposer://" . __DIR__ . '/..'.'/wechatpay/wechatpay/bin/CertificateDownloader.php'); (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
exit(0); || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
return include("phpvfscomposer://" . __DIR__ . '/..'.'/wechatpay/wechatpay/bin/CertificateDownloader.php');
} }
} }
include __DIR__ . '/..'.'/wechatpay/wechatpay/bin/CertificateDownloader.php'; return include __DIR__ . '/..'.'/wechatpay/wechatpay/bin/CertificateDownloader.php';

View File

@@ -1,5 +1,5 @@
@ECHO OFF @ECHO OFF
setlocal DISABLEDELAYEDEXPANSION setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/CertificateDownloader.php SET BIN_TARGET=%~dp0/CertificateDownloader.php
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
php "%BIN_TARGET%" %* php "%BIN_TARGET%" %*

10
src/vendor/bin/carbon vendored
View File

@@ -108,10 +108,12 @@ if (PHP_VERSION_ID < 80000) {
} }
} }
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) { if (
include("phpvfscomposer://" . __DIR__ . '/..'.'/nesbot/carbon/bin/carbon'); (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
exit(0); || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
return include("phpvfscomposer://" . __DIR__ . '/..'.'/nesbot/carbon/bin/carbon');
} }
} }
include __DIR__ . '/..'.'/nesbot/carbon/bin/carbon'; return include __DIR__ . '/..'.'/nesbot/carbon/bin/carbon';

View File

@@ -1,5 +1,5 @@
@ECHO OFF @ECHO OFF
setlocal DISABLEDELAYEDEXPANSION setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/carbon SET BIN_TARGET=%~dp0/carbon
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
php "%BIN_TARGET%" %* php "%BIN_TARGET%" %*

122
src/vendor/bin/phpunit vendored Normal file
View File

@@ -0,0 +1,122 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../phpunit/phpunit/phpunit)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
$GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST'] = $GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST'] = array(realpath(__DIR__ . '/..'.'/phpunit/phpunit/phpunit'));
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = 'phpvfscomposer://'.$this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$data = str_replace('__DIR__', var_export(dirname($this->realpath), true), $data);
$data = str_replace('__FILE__', var_export($this->realpath, true), $data);
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
return include("phpvfscomposer://" . __DIR__ . '/..'.'/phpunit/phpunit/phpunit');
}
}
return include __DIR__ . '/..'.'/phpunit/phpunit/phpunit';

5
src/vendor/bin/phpunit.bat vendored Normal file
View File

@@ -0,0 +1,5 @@
@ECHO OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/phpunit
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
php "%BIN_TARGET%" %*

View File

@@ -108,10 +108,12 @@ if (PHP_VERSION_ID < 80000) {
} }
} }
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) { if (
include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server'); (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
exit(0); || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server');
} }
} }
include __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server'; return include __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server';

View File

@@ -1,5 +1,5 @@
@ECHO OFF @ECHO OFF
setlocal DISABLEDELAYEDEXPANSION setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/var-dump-server SET BIN_TARGET=%~dp0/var-dump-server
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
php "%BIN_TARGET%" %* php "%BIN_TARGET%" %*

View File

@@ -37,57 +37,126 @@ namespace Composer\Autoload;
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be> * @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/ * @see https://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/ * @see https://www.php-fig.org/psr/psr-4/
*/ */
class ClassLoader class ClassLoader
{ {
/** @var \Closure(string):void */
private static $includeFile;
/** @var string|null */
private $vendorDir;
// PSR-4 // PSR-4
/**
* @var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array(); private $prefixLengthsPsr4 = array();
/**
* @var array<string, list<string>>
*/
private $prefixDirsPsr4 = array(); private $prefixDirsPsr4 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr4 = array(); private $fallbackDirsPsr4 = array();
// PSR-0 // PSR-0
/**
* List of PSR-0 prefixes
*
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/
private $prefixesPsr0 = array(); private $prefixesPsr0 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr0 = array(); private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false; private $useIncludePath = false;
/**
* @var array<string, string>
*/
private $classMap = array(); private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false; private $classMapAuthoritative = false;
/**
* @var array<string, bool>
*/
private $missingClasses = array(); private $missingClasses = array();
/** @var string|null */
private $apcuPrefix; private $apcuPrefix;
/**
* @var array<string, self>
*/
private static $registeredLoaders = array();
/**
* @param string|null $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixes() public function getPrefixes()
{ {
if (!empty($this->prefixesPsr0)) { if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0); return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
} }
return array(); return array();
} }
/**
* @return array<string, list<string>>
*/
public function getPrefixesPsr4() public function getPrefixesPsr4()
{ {
return $this->prefixDirsPsr4; return $this->prefixDirsPsr4;
} }
/**
* @return list<string>
*/
public function getFallbackDirs() public function getFallbackDirs()
{ {
return $this->fallbackDirsPsr0; return $this->fallbackDirsPsr0;
} }
/**
* @return list<string>
*/
public function getFallbackDirsPsr4() public function getFallbackDirsPsr4()
{ {
return $this->fallbackDirsPsr4; return $this->fallbackDirsPsr4;
} }
/**
* @return array<string, string> Array of classname => path
*/
public function getClassMap() public function getClassMap()
{ {
return $this->classMap; return $this->classMap;
} }
/** /**
* @param array $classMap Class to filename map * @param array<string, string> $classMap Class to filename map
*
* @return void
*/ */
public function addClassMap(array $classMap) public function addClassMap(array $classMap)
{ {
@@ -102,22 +171,25 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, either * Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix. * appending or prepending to the ones previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories * @param list<string>|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
*
* @return void
*/ */
public function add($prefix, $paths, $prepend = false) public function add($prefix, $paths, $prepend = false)
{ {
$paths = (array) $paths;
if (!$prefix) { if (!$prefix) {
if ($prepend) { if ($prepend) {
$this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0 = array_merge(
(array) $paths, $paths,
$this->fallbackDirsPsr0 $this->fallbackDirsPsr0
); );
} else { } else {
$this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0, $this->fallbackDirsPsr0,
(array) $paths $paths
); );
} }
@@ -126,19 +198,19 @@ class ClassLoader
$first = $prefix[0]; $first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) { if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths; $this->prefixesPsr0[$first][$prefix] = $paths;
return; return;
} }
if ($prepend) { if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths, $paths,
$this->prefixesPsr0[$first][$prefix] $this->prefixesPsr0[$first][$prefix]
); );
} else { } else {
$this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix], $this->prefixesPsr0[$first][$prefix],
(array) $paths $paths
); );
} }
} }
@@ -147,25 +219,28 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, either * Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace. * appending or prepending to the ones previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories * @param list<string>|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*
* @return void
*/ */
public function addPsr4($prefix, $paths, $prepend = false) public function addPsr4($prefix, $paths, $prepend = false)
{ {
$paths = (array) $paths;
if (!$prefix) { if (!$prefix) {
// Register directories for the root namespace. // Register directories for the root namespace.
if ($prepend) { if ($prepend) {
$this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4 = array_merge(
(array) $paths, $paths,
$this->fallbackDirsPsr4 $this->fallbackDirsPsr4
); );
} else { } else {
$this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4, $this->fallbackDirsPsr4,
(array) $paths $paths
); );
} }
} elseif (!isset($this->prefixDirsPsr4[$prefix])) { } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@@ -175,18 +250,18 @@ class ClassLoader
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
} }
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths; $this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) { } elseif ($prepend) {
// Prepend directories for an already registered namespace. // Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths, $paths,
$this->prefixDirsPsr4[$prefix] $this->prefixDirsPsr4[$prefix]
); );
} else { } else {
// Append directories for an already registered namespace. // Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix], $this->prefixDirsPsr4[$prefix],
(array) $paths $paths
); );
} }
} }
@@ -195,8 +270,10 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, * Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix. * replacing any others previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories * @param list<string>|string $paths The PSR-0 base directories
*
* @return void
*/ */
public function set($prefix, $paths) public function set($prefix, $paths)
{ {
@@ -211,10 +288,12 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, * Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace. * replacing any others previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories * @param list<string>|string $paths The PSR-4 base directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*
* @return void
*/ */
public function setPsr4($prefix, $paths) public function setPsr4($prefix, $paths)
{ {
@@ -234,6 +313,8 @@ class ClassLoader
* Turns on searching the include path for class files. * Turns on searching the include path for class files.
* *
* @param bool $useIncludePath * @param bool $useIncludePath
*
* @return void
*/ */
public function setUseIncludePath($useIncludePath) public function setUseIncludePath($useIncludePath)
{ {
@@ -256,6 +337,8 @@ class ClassLoader
* that have not been registered with the class map. * that have not been registered with the class map.
* *
* @param bool $classMapAuthoritative * @param bool $classMapAuthoritative
*
* @return void
*/ */
public function setClassMapAuthoritative($classMapAuthoritative) public function setClassMapAuthoritative($classMapAuthoritative)
{ {
@@ -276,6 +359,8 @@ class ClassLoader
* APCu prefix to use to cache found/not-found classes, if the extension is enabled. * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
* *
* @param string|null $apcuPrefix * @param string|null $apcuPrefix
*
* @return void
*/ */
public function setApcuPrefix($apcuPrefix) public function setApcuPrefix($apcuPrefix)
{ {
@@ -296,33 +381,55 @@ class ClassLoader
* Registers this instance as an autoloader. * Registers this instance as an autoloader.
* *
* @param bool $prepend Whether to prepend the autoloader or not * @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/ */
public function register($prepend = false) public function register($prepend = false)
{ {
spl_autoload_register(array($this, 'loadClass'), true, $prepend); spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
} }
/** /**
* Unregisters this instance as an autoloader. * Unregisters this instance as an autoloader.
*
* @return void
*/ */
public function unregister() public function unregister()
{ {
spl_autoload_unregister(array($this, 'loadClass')); spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
} }
/** /**
* Loads the given class or interface. * Loads the given class or interface.
* *
* @param string $class The name of the class * @param string $class The name of the class
* @return bool|null True if loaded, null otherwise * @return true|null True if loaded, null otherwise
*/ */
public function loadClass($class) public function loadClass($class)
{ {
if ($file = $this->findFile($class)) { if ($file = $this->findFile($class)) {
includeFile($file); $includeFile = self::$includeFile;
$includeFile($file);
return true; return true;
} }
return null;
} }
/** /**
@@ -367,6 +474,21 @@ class ClassLoader
return $file; return $file;
} }
/**
* Returns the currently registered loaders keyed by their corresponding vendor directories.
*
* @return array<string, self>
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext) private function findFileWithExtension($class, $ext)
{ {
// PSR-4 lookup // PSR-4 lookup
@@ -432,14 +554,26 @@ class ClassLoader
return false; return false;
} }
}
/** /**
* Scope isolated include. * @return void
* */
* Prevents access to $this/self from included files. private static function initializeIncludeClosure()
*/ {
function includeFile($file) if (self::$includeFile !== null) {
{ return;
include $file; }
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
} }

View File

@@ -98,7 +98,7 @@ class InstalledVersions
{ {
foreach (self::getInstalled() as $installed) { foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) { if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
} }
} }
@@ -119,7 +119,7 @@ class InstalledVersions
*/ */
public static function satisfies(VersionParser $parser, $packageName, $constraint) public static function satisfies(VersionParser $parser, $packageName, $constraint)
{ {
$constraint = $parser->parseConstraints($constraint); $constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName)); $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint); return $provided->matches($constraint);
@@ -328,7 +328,9 @@ class InstalledVersions
if (isset(self::$installedByVendor[$vendorDir])) { if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir]; $installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) { } elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1]; self::$installed = $installed[count($installed) - 1];
} }
@@ -340,12 +342,17 @@ class InstalledVersions
// only require the installed.php file if this file is loaded from its dumped location, // only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') { if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php'; /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else { } else {
self::$installed = array(); self::$installed = array();
} }
} }
$installed[] = self::$installed;
if (self::$installed !== array()) {
$installed[] = self::$installed;
}
return $installed; return $installed;
} }

View File

@@ -2,14 +2,563 @@
// autoload_classmap.php @generated by Composer // autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', 'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php', 'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
'PHPUnit\\Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php',
'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php',
'PHPUnit\\Framework\\AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/AssertionFailedError.php',
'PHPUnit\\Framework\\CodeCoverageException' => $vendorDir . '/phpunit/phpunit/src/Framework/CodeCoverageException.php',
'PHPUnit\\Framework\\Constraint\\ArrayHasKey' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php',
'PHPUnit\\Framework\\Constraint\\ArraySubset' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php',
'PHPUnit\\Framework\\Constraint\\Attribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php',
'PHPUnit\\Framework\\Constraint\\Callback' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Callback.php',
'PHPUnit\\Framework\\Constraint\\ClassHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php',
'PHPUnit\\Framework\\Constraint\\ClassHasStaticAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php',
'PHPUnit\\Framework\\Constraint\\Composite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Composite.php',
'PHPUnit\\Framework\\Constraint\\Constraint' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Constraint.php',
'PHPUnit\\Framework\\Constraint\\Count' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Count.php',
'PHPUnit\\Framework\\Constraint\\DirectoryExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/DirectoryExists.php',
'PHPUnit\\Framework\\Constraint\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception.php',
'PHPUnit\\Framework\\Constraint\\ExceptionCode' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php',
'PHPUnit\\Framework\\Constraint\\ExceptionMessage' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php',
'PHPUnit\\Framework\\Constraint\\ExceptionMessageRegularExpression' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegularExpression.php',
'PHPUnit\\Framework\\Constraint\\FileExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php',
'PHPUnit\\Framework\\Constraint\\GreaterThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php',
'PHPUnit\\Framework\\Constraint\\IsAnything' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php',
'PHPUnit\\Framework\\Constraint\\IsEmpty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php',
'PHPUnit\\Framework\\Constraint\\IsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php',
'PHPUnit\\Framework\\Constraint\\IsFalse' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php',
'PHPUnit\\Framework\\Constraint\\IsFinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFinite.php',
'PHPUnit\\Framework\\Constraint\\IsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php',
'PHPUnit\\Framework\\Constraint\\IsInfinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php',
'PHPUnit\\Framework\\Constraint\\IsInstanceOf' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php',
'PHPUnit\\Framework\\Constraint\\IsJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php',
'PHPUnit\\Framework\\Constraint\\IsNan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNan.php',
'PHPUnit\\Framework\\Constraint\\IsNull' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php',
'PHPUnit\\Framework\\Constraint\\IsReadable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsReadable.php',
'PHPUnit\\Framework\\Constraint\\IsTrue' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php',
'PHPUnit\\Framework\\Constraint\\IsType' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsType.php',
'PHPUnit\\Framework\\Constraint\\IsWritable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsWritable.php',
'PHPUnit\\Framework\\Constraint\\JsonMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php',
'PHPUnit\\Framework\\Constraint\\JsonMatchesErrorMessageProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php',
'PHPUnit\\Framework\\Constraint\\LessThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php',
'PHPUnit\\Framework\\Constraint\\LogicalAnd' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LogicalAnd.php',
'PHPUnit\\Framework\\Constraint\\LogicalNot' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LogicalNot.php',
'PHPUnit\\Framework\\Constraint\\LogicalOr' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LogicalOr.php',
'PHPUnit\\Framework\\Constraint\\LogicalXor' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LogicalXor.php',
'PHPUnit\\Framework\\Constraint\\ObjectHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php',
'PHPUnit\\Framework\\Constraint\\RegularExpression' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/RegularExpression.php',
'PHPUnit\\Framework\\Constraint\\SameSize' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php',
'PHPUnit\\Framework\\Constraint\\StringContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php',
'PHPUnit\\Framework\\Constraint\\StringEndsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php',
'PHPUnit\\Framework\\Constraint\\StringMatchesFormatDescription' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringMatchesFormatDescription.php',
'PHPUnit\\Framework\\Constraint\\StringStartsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php',
'PHPUnit\\Framework\\Constraint\\TraversableContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php',
'PHPUnit\\Framework\\Constraint\\TraversableContainsOnly' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php',
'PHPUnit\\Framework\\CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/phpunit/src/Framework/CoveredCodeNotExecutedException.php',
'PHPUnit\\Framework\\DataProviderTestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/DataProviderTestSuite.php',
'PHPUnit\\Framework\\Error\\Deprecated' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Deprecated.php',
'PHPUnit\\Framework\\Error\\Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Error.php',
'PHPUnit\\Framework\\Error\\Notice' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Notice.php',
'PHPUnit\\Framework\\Error\\Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Warning.php',
'PHPUnit\\Framework\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception.php',
'PHPUnit\\Framework\\ExceptionWrapper' => $vendorDir . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php',
'PHPUnit\\Framework\\ExpectationFailedException' => $vendorDir . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php',
'PHPUnit\\Framework\\IncompleteTest' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTest.php',
'PHPUnit\\Framework\\IncompleteTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php',
'PHPUnit\\Framework\\IncompleteTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestError.php',
'PHPUnit\\Framework\\InvalidCoversTargetException' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php',
'PHPUnit\\Framework\\InvalidParameterGroupException' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php',
'PHPUnit\\Framework\\MissingCoversAnnotationException' => $vendorDir . '/phpunit/phpunit/src/Framework/MissingCoversAnnotationException.php',
'PHPUnit\\Framework\\MockObject\\BadMethodCallException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php',
'PHPUnit\\Framework\\MockObject\\Builder\\Identity' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php',
'PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php',
'PHPUnit\\Framework\\MockObject\\Builder\\Match' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/Match.php',
'PHPUnit\\Framework\\MockObject\\Builder\\MethodNameMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php',
'PHPUnit\\Framework\\MockObject\\Builder\\NamespaceMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/NamespaceMatch.php',
'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php',
'PHPUnit\\Framework\\MockObject\\Builder\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php',
'PHPUnit\\Framework\\MockObject\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php',
'PHPUnit\\Framework\\MockObject\\Generator' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator.php',
'PHPUnit\\Framework\\MockObject\\Invocation' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Invocation/Invocation.php',
'PHPUnit\\Framework\\MockObject\\InvocationMocker' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/InvocationMocker.php',
'PHPUnit\\Framework\\MockObject\\Invocation\\ObjectInvocation' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Invocation/ObjectInvocation.php',
'PHPUnit\\Framework\\MockObject\\Invocation\\StaticInvocation' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Invocation/StaticInvocation.php',
'PHPUnit\\Framework\\MockObject\\Invokable' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Invokable.php',
'PHPUnit\\Framework\\MockObject\\Matcher' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\AnyInvokedCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher/AnyInvokedCount.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\AnyParameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher/AnyParameters.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\ConsecutiveParameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher/ConsecutiveParameters.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\DeferredError' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher/DeferredError.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\Invocation' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher/Invocation.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtIndex' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher/InvokedAtIndex.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtLeastCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtMostCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher/InvokedAtMostCount.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher/InvokedCount.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedRecorder' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher/InvokedRecorder.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\MethodName' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher/MethodName.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\Parameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher/Parameters.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\StatelessInvocation' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher/StatelessInvocation.php',
'PHPUnit\\Framework\\MockObject\\MockBuilder' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php',
'PHPUnit\\Framework\\MockObject\\MockMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockMethod.php',
'PHPUnit\\Framework\\MockObject\\MockMethodSet' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php',
'PHPUnit\\Framework\\MockObject\\MockObject' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/ForwardCompatibility/MockObject.php',
'PHPUnit\\Framework\\MockObject\\RuntimeException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php',
'PHPUnit\\Framework\\MockObject\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ConsecutiveCalls' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php',
'PHPUnit\\Framework\\MockObject\\Stub\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php',
'PHPUnit\\Framework\\MockObject\\Stub\\MatcherCollection' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/MatcherCollection.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnArgument' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnCallback' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnReference' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnValueMap' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.php',
'PHPUnit\\Framework\\MockObject\\Verifiable' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Verifiable.php',
'PHPUnit\\Framework\\OutputError' => $vendorDir . '/phpunit/phpunit/src/Framework/OutputError.php',
'PHPUnit\\Framework\\RiskyTest' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTest.php',
'PHPUnit\\Framework\\RiskyTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTestError.php',
'PHPUnit\\Framework\\SelfDescribing' => $vendorDir . '/phpunit/phpunit/src/Framework/SelfDescribing.php',
'PHPUnit\\Framework\\SkippedTest' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTest.php',
'PHPUnit\\Framework\\SkippedTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestCase.php',
'PHPUnit\\Framework\\SkippedTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestError.php',
'PHPUnit\\Framework\\SkippedTestSuiteError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php',
'PHPUnit\\Framework\\SyntheticError' => $vendorDir . '/phpunit/phpunit/src/Framework/SyntheticError.php',
'PHPUnit\\Framework\\Test' => $vendorDir . '/phpunit/phpunit/src/Framework/Test.php',
'PHPUnit\\Framework\\TestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/TestCase.php',
'PHPUnit\\Framework\\TestFailure' => $vendorDir . '/phpunit/phpunit/src/Framework/TestFailure.php',
'PHPUnit\\Framework\\TestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListener.php',
'PHPUnit\\Framework\\TestListenerDefaultImplementation' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php',
'PHPUnit\\Framework\\TestResult' => $vendorDir . '/phpunit/phpunit/src/Framework/TestResult.php',
'PHPUnit\\Framework\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite.php',
'PHPUnit\\Framework\\TestSuiteIterator' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php',
'PHPUnit\\Framework\\UnexpectedValueException' => $vendorDir . '/phpunit/phpunit/src/Framework/UnexpectedValueException.php',
'PHPUnit\\Framework\\UnintentionallyCoveredCodeError' => $vendorDir . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php',
'PHPUnit\\Framework\\Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Warning.php',
'PHPUnit\\Framework\\WarningTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/WarningTestCase.php',
'PHPUnit\\Runner\\AfterIncompleteTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php',
'PHPUnit\\Runner\\AfterLastTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php',
'PHPUnit\\Runner\\AfterRiskyTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php',
'PHPUnit\\Runner\\AfterSkippedTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php',
'PHPUnit\\Runner\\AfterSuccessfulTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php',
'PHPUnit\\Runner\\AfterTestErrorHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php',
'PHPUnit\\Runner\\AfterTestFailureHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php',
'PHPUnit\\Runner\\AfterTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php',
'PHPUnit\\Runner\\AfterTestWarningHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php',
'PHPUnit\\Runner\\BaseTestRunner' => $vendorDir . '/phpunit/phpunit/src/Runner/BaseTestRunner.php',
'PHPUnit\\Runner\\BeforeFirstTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php',
'PHPUnit\\Runner\\BeforeTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php',
'PHPUnit\\Runner\\Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception.php',
'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php',
'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\NameFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php',
'PHPUnit\\Runner\\Hook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/Hook.php',
'PHPUnit\\Runner\\NullTestResultCache' => $vendorDir . '/phpunit/phpunit/src/Util/NullTestResultCache.php',
'PHPUnit\\Runner\\PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Runner/PhptTestCase.php',
'PHPUnit\\Runner\\ResultCacheExtension' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCacheExtension.php',
'PHPUnit\\Runner\\StandardTestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php',
'PHPUnit\\Runner\\TestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/TestHook.php',
'PHPUnit\\Runner\\TestListenerAdapter' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php',
'PHPUnit\\Runner\\TestResultCache' => $vendorDir . '/phpunit/phpunit/src/Util/TestResultCache.php',
'PHPUnit\\Runner\\TestResultCacheInterface' => $vendorDir . '/phpunit/phpunit/src/Util/TestResultCacheInterface.php',
'PHPUnit\\Runner\\TestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php',
'PHPUnit\\Runner\\TestSuiteSorter' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteSorter.php',
'PHPUnit\\Runner\\Version' => $vendorDir . '/phpunit/phpunit/src/Runner/Version.php',
'PHPUnit\\TextUI\\Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command.php',
'PHPUnit\\TextUI\\ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/ResultPrinter.php',
'PHPUnit\\TextUI\\TestRunner' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestRunner.php',
'PHPUnit\\Util\\Blacklist' => $vendorDir . '/phpunit/phpunit/src/Util/Blacklist.php',
'PHPUnit\\Util\\Configuration' => $vendorDir . '/phpunit/phpunit/src/Util/Configuration.php',
'PHPUnit\\Util\\ConfigurationGenerator' => $vendorDir . '/phpunit/phpunit/src/Util/ConfigurationGenerator.php',
'PHPUnit\\Util\\ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Util/ErrorHandler.php',
'PHPUnit\\Util\\FileLoader' => $vendorDir . '/phpunit/phpunit/src/Util/FileLoader.php',
'PHPUnit\\Util\\Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php',
'PHPUnit\\Util\\Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php',
'PHPUnit\\Util\\Getopt' => $vendorDir . '/phpunit/phpunit/src/Util/Getopt.php',
'PHPUnit\\Util\\GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php',
'PHPUnit\\Util\\InvalidArgumentHelper' => $vendorDir . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php',
'PHPUnit\\Util\\Json' => $vendorDir . '/phpunit/phpunit/src/Util/Json.php',
'PHPUnit\\Util\\Log\\JUnit' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JUnit.php',
'PHPUnit\\Util\\Log\\TeamCity' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TeamCity.php',
'PHPUnit\\Util\\PHP\\AbstractPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php',
'PHPUnit\\Util\\PHP\\DefaultPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php',
'PHPUnit\\Util\\PHP\\WindowsPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php',
'PHPUnit\\Util\\Printer' => $vendorDir . '/phpunit/phpunit/src/Util/Printer.php',
'PHPUnit\\Util\\RegularExpression' => $vendorDir . '/phpunit/phpunit/src/Util/RegularExpression.php',
'PHPUnit\\Util\\Test' => $vendorDir . '/phpunit/phpunit/src/Util/Test.php',
'PHPUnit\\Util\\TestDox\\CliTestDoxPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php',
'PHPUnit\\Util\\TestDox\\HtmlResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php',
'PHPUnit\\Util\\TestDox\\NamePrettifier' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php',
'PHPUnit\\Util\\TestDox\\ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php',
'PHPUnit\\Util\\TestDox\\TestResult' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/TestResult.php',
'PHPUnit\\Util\\TestDox\\TextResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/TextResultPrinter.php',
'PHPUnit\\Util\\TestDox\\XmlResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php',
'PHPUnit\\Util\\TextTestListRenderer' => $vendorDir . '/phpunit/phpunit/src/Util/TextTestListRenderer.php',
'PHPUnit\\Util\\Type' => $vendorDir . '/phpunit/phpunit/src/Util/Type.php',
'PHPUnit\\Util\\XdebugFilterScriptGenerator' => $vendorDir . '/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php',
'PHPUnit\\Util\\Xml' => $vendorDir . '/phpunit/phpunit/src/Util/Xml.php',
'PHPUnit\\Util\\XmlTestListRenderer' => $vendorDir . '/phpunit/phpunit/src/Util/XmlTestListRenderer.php',
'PHPUnit_Framework_MockObject_MockObject' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockObject.php',
'PHP_Token' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_TokenWithScope' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_TokenWithScopeAndVisibility' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ABSTRACT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_AMPERSAND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_AND_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ARRAY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ARRAY_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_AS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_AT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_BACKTICK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_BAD_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_BOOLEAN_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_BOOLEAN_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_BOOL_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_BREAK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CALLABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CARET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CASE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CATCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLASS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLASS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLASS_NAME_CONSTANT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLONE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLOSE_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLOSE_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLOSE_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLOSE_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_COALESCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_COALESCE_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_COMMA' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CONCAT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CONST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CONSTANT_ENCAPSED_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CONTINUE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CURLY_OPEN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DEC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DEFAULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DIR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DIV' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DIV_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOC_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOLLAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOUBLE_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOUBLE_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOUBLE_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOUBLE_QUOTES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ELLIPSIS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ELSE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ELSEIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_EMPTY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ENCAPSED_AND_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ENDDECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ENDFOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ENDFOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ENDIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ENDSWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ENDWHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_END_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_EVAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_EXCLAMATION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_EXIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_EXTENDS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FINAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FINALLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FUNC_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_GLOBAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_GOTO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_HALT_COMPILER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IMPLEMENTS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INCLUDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INCLUDE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INLINE_HTML' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INSTANCEOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INSTEADOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INTERFACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ISSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IS_GREATER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IS_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IS_NOT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IS_NOT_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IS_SMALLER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_Includes' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_LINE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_LIST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_LNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_LOGICAL_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_LOGICAL_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_LOGICAL_XOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_METHOD_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_MINUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_MINUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_MOD_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_MULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_MUL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_NAMESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_NEW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_NS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_NS_SEPARATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_NUM_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OBJECT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OBJECT_OPERATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OPEN_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OPEN_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OPEN_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OPEN_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OPEN_TAG_WITH_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PERCENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PIPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PLUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PLUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_POW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_POW_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PRINT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PRIVATE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PROTECTED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PUBLIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_QUESTION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_REQUIRE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_REQUIRE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_RETURN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_SEMICOLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_SL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_SL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_SPACESHIP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_SR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_SR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_START_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_STATIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_STRING_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_STRING_VARNAME' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_SWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_Stream' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream.php',
'PHP_Token_Stream_CachingFactory' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php',
'PHP_Token_THROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_TILDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_TRAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_TRAIT_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_TRY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_UNSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_UNSET_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_USE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_USE_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_Util' => $vendorDir . '/phpunit/php-token-stream/src/Token/Util.php',
'PHP_Token_VAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_VARIABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_WHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_XOR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_YIELD' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_YIELD_FROM' => $vendorDir . '/phpunit/php-token-stream/src/Token.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',
'PharIo\\Manifest\\AuthorCollection' => $vendorDir . '/phar-io/manifest/src/values/AuthorCollection.php',
'PharIo\\Manifest\\AuthorCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/AuthorCollectionIterator.php',
'PharIo\\Manifest\\AuthorElement' => $vendorDir . '/phar-io/manifest/src/xml/AuthorElement.php',
'PharIo\\Manifest\\AuthorElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/AuthorElementCollection.php',
'PharIo\\Manifest\\BundledComponent' => $vendorDir . '/phar-io/manifest/src/values/BundledComponent.php',
'PharIo\\Manifest\\BundledComponentCollection' => $vendorDir . '/phar-io/manifest/src/values/BundledComponentCollection.php',
'PharIo\\Manifest\\BundledComponentCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/BundledComponentCollectionIterator.php',
'PharIo\\Manifest\\BundlesElement' => $vendorDir . '/phar-io/manifest/src/xml/BundlesElement.php',
'PharIo\\Manifest\\ComponentElement' => $vendorDir . '/phar-io/manifest/src/xml/ComponentElement.php',
'PharIo\\Manifest\\ComponentElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ComponentElementCollection.php',
'PharIo\\Manifest\\ContainsElement' => $vendorDir . '/phar-io/manifest/src/xml/ContainsElement.php',
'PharIo\\Manifest\\CopyrightElement' => $vendorDir . '/phar-io/manifest/src/xml/CopyrightElement.php',
'PharIo\\Manifest\\CopyrightInformation' => $vendorDir . '/phar-io/manifest/src/values/CopyrightInformation.php',
'PharIo\\Manifest\\ElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ElementCollection.php',
'PharIo\\Manifest\\Email' => $vendorDir . '/phar-io/manifest/src/values/Email.php',
'PharIo\\Manifest\\Exception' => $vendorDir . '/phar-io/manifest/src/exceptions/Exception.php',
'PharIo\\Manifest\\ExtElement' => $vendorDir . '/phar-io/manifest/src/xml/ExtElement.php',
'PharIo\\Manifest\\ExtElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ExtElementCollection.php',
'PharIo\\Manifest\\Extension' => $vendorDir . '/phar-io/manifest/src/values/Extension.php',
'PharIo\\Manifest\\ExtensionElement' => $vendorDir . '/phar-io/manifest/src/xml/ExtensionElement.php',
'PharIo\\Manifest\\InvalidApplicationNameException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php',
'PharIo\\Manifest\\InvalidEmailException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidEmailException.php',
'PharIo\\Manifest\\InvalidUrlException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidUrlException.php',
'PharIo\\Manifest\\Library' => $vendorDir . '/phar-io/manifest/src/values/Library.php',
'PharIo\\Manifest\\License' => $vendorDir . '/phar-io/manifest/src/values/License.php',
'PharIo\\Manifest\\LicenseElement' => $vendorDir . '/phar-io/manifest/src/xml/LicenseElement.php',
'PharIo\\Manifest\\Manifest' => $vendorDir . '/phar-io/manifest/src/values/Manifest.php',
'PharIo\\Manifest\\ManifestDocument' => $vendorDir . '/phar-io/manifest/src/xml/ManifestDocument.php',
'PharIo\\Manifest\\ManifestDocumentException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentException.php',
'PharIo\\Manifest\\ManifestDocumentLoadingException' => $vendorDir . '/phar-io/manifest/src/xml/ManifestDocumentLoadingException.php',
'PharIo\\Manifest\\ManifestDocumentMapper' => $vendorDir . '/phar-io/manifest/src/ManifestDocumentMapper.php',
'PharIo\\Manifest\\ManifestDocumentMapperException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php',
'PharIo\\Manifest\\ManifestElement' => $vendorDir . '/phar-io/manifest/src/xml/ManifestElement.php',
'PharIo\\Manifest\\ManifestElementException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestElementException.php',
'PharIo\\Manifest\\ManifestLoader' => $vendorDir . '/phar-io/manifest/src/ManifestLoader.php',
'PharIo\\Manifest\\ManifestLoaderException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php',
'PharIo\\Manifest\\ManifestSerializer' => $vendorDir . '/phar-io/manifest/src/ManifestSerializer.php',
'PharIo\\Manifest\\PhpElement' => $vendorDir . '/phar-io/manifest/src/xml/PhpElement.php',
'PharIo\\Manifest\\PhpExtensionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpExtensionRequirement.php',
'PharIo\\Manifest\\PhpVersionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpVersionRequirement.php',
'PharIo\\Manifest\\Requirement' => $vendorDir . '/phar-io/manifest/src/values/Requirement.php',
'PharIo\\Manifest\\RequirementCollection' => $vendorDir . '/phar-io/manifest/src/values/RequirementCollection.php',
'PharIo\\Manifest\\RequirementCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/RequirementCollectionIterator.php',
'PharIo\\Manifest\\RequiresElement' => $vendorDir . '/phar-io/manifest/src/xml/RequiresElement.php',
'PharIo\\Manifest\\Type' => $vendorDir . '/phar-io/manifest/src/values/Type.php',
'PharIo\\Manifest\\Url' => $vendorDir . '/phar-io/manifest/src/values/Url.php',
'PharIo\\Version\\AbstractVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AbstractVersionConstraint.php',
'PharIo\\Version\\AndVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php',
'PharIo\\Version\\AnyVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AnyVersionConstraint.php',
'PharIo\\Version\\ExactVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/ExactVersionConstraint.php',
'PharIo\\Version\\Exception' => $vendorDir . '/phar-io/version/src/exceptions/Exception.php',
'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php',
'PharIo\\Version\\InvalidPreReleaseSuffixException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php',
'PharIo\\Version\\InvalidVersionException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidVersionException.php',
'PharIo\\Version\\OrVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php',
'PharIo\\Version\\PreReleaseSuffix' => $vendorDir . '/phar-io/version/src/PreReleaseSuffix.php',
'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php',
'PharIo\\Version\\SpecificMajorVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php',
'PharIo\\Version\\UnsupportedVersionConstraintException' => $vendorDir . '/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php',
'PharIo\\Version\\Version' => $vendorDir . '/phar-io/version/src/Version.php',
'PharIo\\Version\\VersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/VersionConstraint.php',
'PharIo\\Version\\VersionConstraintParser' => $vendorDir . '/phar-io/version/src/VersionConstraintParser.php',
'PharIo\\Version\\VersionConstraintValue' => $vendorDir . '/phar-io/version/src/VersionConstraintValue.php',
'PharIo\\Version\\VersionNumber' => $vendorDir . '/phar-io/version/src/VersionNumber.php',
'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php',
'SebastianBergmann\\CodeCoverage\\CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Driver.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PHPDBG' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PHPDBG.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Xdebug.php',
'SebastianBergmann\\CodeCoverage\\Exception' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Exception.php',
'SebastianBergmann\\CodeCoverage\\Filter' => $vendorDir . '/phpunit/php-code-coverage/src/Filter.php',
'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php',
'SebastianBergmann\\CodeCoverage\\MissingCoversAnnotationException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/MissingCoversAnnotationException.php',
'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => $vendorDir . '/phpunit/php-code-coverage/src/Node/AbstractNode.php',
'SebastianBergmann\\CodeCoverage\\Node\\Builder' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Builder.php',
'SebastianBergmann\\CodeCoverage\\Node\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Directory.php',
'SebastianBergmann\\CodeCoverage\\Node\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Node/File.php',
'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Iterator.php',
'SebastianBergmann\\CodeCoverage\\Report\\Clover' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Clover.php',
'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Crap4j.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Facade.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php',
'SebastianBergmann\\CodeCoverage\\Report\\PHP' => $vendorDir . '/phpunit/php-code-coverage/src/Report/PHP.php',
'SebastianBergmann\\CodeCoverage\\Report\\Text' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Text.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\BuildInformation' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/File.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Method.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Node.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Project.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Report.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Source' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Source.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php',
'SebastianBergmann\\CodeCoverage\\RuntimeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/RuntimeException.php',
'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php',
'SebastianBergmann\\CodeCoverage\\Util' => $vendorDir . '/phpunit/php-code-coverage/src/Util.php',
'SebastianBergmann\\CodeCoverage\\Version' => $vendorDir . '/phpunit/php-code-coverage/src/Version.php',
'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => $vendorDir . '/sebastian/code-unit-reverse-lookup/src/Wizard.php',
'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php',
'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php',
'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php',
'SebastianBergmann\\Comparator\\DOMNodeComparator' => $vendorDir . '/sebastian/comparator/src/DOMNodeComparator.php',
'SebastianBergmann\\Comparator\\DateTimeComparator' => $vendorDir . '/sebastian/comparator/src/DateTimeComparator.php',
'SebastianBergmann\\Comparator\\DoubleComparator' => $vendorDir . '/sebastian/comparator/src/DoubleComparator.php',
'SebastianBergmann\\Comparator\\ExceptionComparator' => $vendorDir . '/sebastian/comparator/src/ExceptionComparator.php',
'SebastianBergmann\\Comparator\\Factory' => $vendorDir . '/sebastian/comparator/src/Factory.php',
'SebastianBergmann\\Comparator\\MockObjectComparator' => $vendorDir . '/sebastian/comparator/src/MockObjectComparator.php',
'SebastianBergmann\\Comparator\\NumericComparator' => $vendorDir . '/sebastian/comparator/src/NumericComparator.php',
'SebastianBergmann\\Comparator\\ObjectComparator' => $vendorDir . '/sebastian/comparator/src/ObjectComparator.php',
'SebastianBergmann\\Comparator\\ResourceComparator' => $vendorDir . '/sebastian/comparator/src/ResourceComparator.php',
'SebastianBergmann\\Comparator\\ScalarComparator' => $vendorDir . '/sebastian/comparator/src/ScalarComparator.php',
'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => $vendorDir . '/sebastian/comparator/src/SplObjectStorageComparator.php',
'SebastianBergmann\\Comparator\\TypeComparator' => $vendorDir . '/sebastian/comparator/src/TypeComparator.php',
'SebastianBergmann\\Diff\\Chunk' => $vendorDir . '/sebastian/diff/src/Chunk.php',
'SebastianBergmann\\Diff\\ConfigurationException' => $vendorDir . '/sebastian/diff/src/Exception/ConfigurationException.php',
'SebastianBergmann\\Diff\\Diff' => $vendorDir . '/sebastian/diff/src/Diff.php',
'SebastianBergmann\\Diff\\Differ' => $vendorDir . '/sebastian/diff/src/Differ.php',
'SebastianBergmann\\Diff\\Exception' => $vendorDir . '/sebastian/diff/src/Exception/Exception.php',
'SebastianBergmann\\Diff\\InvalidArgumentException' => $vendorDir . '/sebastian/diff/src/Exception/InvalidArgumentException.php',
'SebastianBergmann\\Diff\\Line' => $vendorDir . '/sebastian/diff/src/Line.php',
'SebastianBergmann\\Diff\\LongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/LongestCommonSubsequenceCalculator.php',
'SebastianBergmann\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php',
'SebastianBergmann\\Diff\\Output\\AbstractChunkOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php',
'SebastianBergmann\\Diff\\Output\\DiffOnlyOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php',
'SebastianBergmann\\Diff\\Output\\DiffOutputBuilderInterface' => $vendorDir . '/sebastian/diff/src/Output/DiffOutputBuilderInterface.php',
'SebastianBergmann\\Diff\\Output\\StrictUnifiedDiffOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php',
'SebastianBergmann\\Diff\\Output\\UnifiedDiffOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php',
'SebastianBergmann\\Diff\\Parser' => $vendorDir . '/sebastian/diff/src/Parser.php',
'SebastianBergmann\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php',
'SebastianBergmann\\Environment\\Console' => $vendorDir . '/sebastian/environment/src/Console.php',
'SebastianBergmann\\Environment\\OperatingSystem' => $vendorDir . '/sebastian/environment/src/OperatingSystem.php',
'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php',
'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php',
'SebastianBergmann\\FileIterator\\Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php',
'SebastianBergmann\\FileIterator\\Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php',
'SebastianBergmann\\FileIterator\\Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php',
'SebastianBergmann\\GlobalState\\Blacklist' => $vendorDir . '/sebastian/global-state/src/Blacklist.php',
'SebastianBergmann\\GlobalState\\CodeExporter' => $vendorDir . '/sebastian/global-state/src/CodeExporter.php',
'SebastianBergmann\\GlobalState\\Exception' => $vendorDir . '/sebastian/global-state/src/exceptions/Exception.php',
'SebastianBergmann\\GlobalState\\Restorer' => $vendorDir . '/sebastian/global-state/src/Restorer.php',
'SebastianBergmann\\GlobalState\\RuntimeException' => $vendorDir . '/sebastian/global-state/src/exceptions/RuntimeException.php',
'SebastianBergmann\\GlobalState\\Snapshot' => $vendorDir . '/sebastian/global-state/src/Snapshot.php',
'SebastianBergmann\\ObjectEnumerator\\Enumerator' => $vendorDir . '/sebastian/object-enumerator/src/Enumerator.php',
'SebastianBergmann\\ObjectEnumerator\\Exception' => $vendorDir . '/sebastian/object-enumerator/src/Exception.php',
'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => $vendorDir . '/sebastian/object-enumerator/src/InvalidArgumentException.php',
'SebastianBergmann\\ObjectReflector\\Exception' => $vendorDir . '/sebastian/object-reflector/src/Exception.php',
'SebastianBergmann\\ObjectReflector\\InvalidArgumentException' => $vendorDir . '/sebastian/object-reflector/src/InvalidArgumentException.php',
'SebastianBergmann\\ObjectReflector\\ObjectReflector' => $vendorDir . '/sebastian/object-reflector/src/ObjectReflector.php',
'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php',
'SebastianBergmann\\RecursionContext\\Exception' => $vendorDir . '/sebastian/recursion-context/src/Exception.php',
'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php',
'SebastianBergmann\\ResourceOperations\\ResourceOperations' => $vendorDir . '/sebastian/resource-operations/src/ResourceOperations.php',
'SebastianBergmann\\Timer\\Exception' => $vendorDir . '/phpunit/php-timer/src/Exception.php',
'SebastianBergmann\\Timer\\RuntimeException' => $vendorDir . '/phpunit/php-timer/src/RuntimeException.php',
'SebastianBergmann\\Timer\\Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php',
'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php',
'Stringable' => $vendorDir . '/myclabs/php-enum/stubs/Stringable.php',
'Text_Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php',
'TheSeer\\Tokenizer\\Exception' => $vendorDir . '/theseer/tokenizer/src/Exception.php',
'TheSeer\\Tokenizer\\NamespaceUri' => $vendorDir . '/theseer/tokenizer/src/NamespaceUri.php',
'TheSeer\\Tokenizer\\NamespaceUriException' => $vendorDir . '/theseer/tokenizer/src/NamespaceUriException.php',
'TheSeer\\Tokenizer\\Token' => $vendorDir . '/theseer/tokenizer/src/Token.php',
'TheSeer\\Tokenizer\\TokenCollection' => $vendorDir . '/theseer/tokenizer/src/TokenCollection.php',
'TheSeer\\Tokenizer\\TokenCollectionException' => $vendorDir . '/theseer/tokenizer/src/TokenCollectionException.php',
'TheSeer\\Tokenizer\\Tokenizer' => $vendorDir . '/theseer/tokenizer/src/Tokenizer.php',
'TheSeer\\Tokenizer\\XMLSerializer' => $vendorDir . '/theseer/tokenizer/src/XMLSerializer.php',
'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
); );

View File

@@ -2,28 +2,28 @@
// autoload_files.php @generated by Composer // autoload_files.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php', '9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'35fab96057f1bf5e7aba31a8a6d5fdde' => $vendorDir . '/topthink/think-orm/stubs/load_stubs.php', '35fab96057f1bf5e7aba31a8a6d5fdde' => $vendorDir . '/topthink/think-orm/stubs/load_stubs.php',
'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php', 'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php',
'cd5441689b14144e5573bf989ee47b34' => $vendorDir . '/qcloud/cos-sdk-v5/src/Common.php', 'cd5441689b14144e5573bf989ee47b34' => $vendorDir . '/qcloud/cos-sdk-v5/src/Common.php',
'841780ea2e1d6545ea3a253239d59c05' => $vendorDir . '/qiniu/php-sdk/src/Qiniu/functions.php', '841780ea2e1d6545ea3a253239d59c05' => $vendorDir . '/qiniu/php-sdk/src/Qiniu/functions.php',
'5dd19d8a547b7318af0c3a93c8bd6565' => $vendorDir . '/qiniu/php-sdk/src/Qiniu/Http/Middleware/Middleware.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', '2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'f0e7e63bbb278a92db02393536748c5f' => $vendorDir . '/overtrue/wechat/src/Kernel/Support/Helpers.php', 'f0e7e63bbb278a92db02393536748c5f' => $vendorDir . '/overtrue/wechat/src/Kernel/Support/Helpers.php',
'6747f579ad6817f318cc3a7e7a0abb93' => $vendorDir . '/overtrue/wechat/src/Kernel/Helpers.php', '6747f579ad6817f318cc3a7e7a0abb93' => $vendorDir . '/overtrue/wechat/src/Kernel/Helpers.php',
'667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php', '1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php',
'cc56288302d9df745d97c934d6a6e5f0' => $vendorDir . '/topthink/think-queue/src/common.php', 'cc56288302d9df745d97c934d6a6e5f0' => $vendorDir . '/topthink/think-queue/src/common.php',
); );

View File

@@ -2,7 +2,7 @@
// autoload_namespaces.php @generated by Composer // autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(

View File

@@ -2,7 +2,7 @@
// autoload_psr4.php @generated by Composer // autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
@@ -13,6 +13,7 @@ return array(
'think\\app\\' => array($vendorDir . '/topthink/think-multi-app/src'), 'think\\app\\' => array($vendorDir . '/topthink/think-multi-app/src'),
'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-queue/src', $vendorDir . '/topthink/think-template/src'), 'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-queue/src', $vendorDir . '/topthink/think-template/src'),
'thans\\filesystem\\' => array($vendorDir . '/thans/thinkphp-filesystem-cloud/src'), 'thans\\filesystem\\' => array($vendorDir . '/thans/thinkphp-filesystem-cloud/src'),
'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/reflection-docblock/src', $vendorDir . '/phpdocumentor/type-resolver/src'),
'liliuwei\\think\\' => array($vendorDir . '/liliuwei/thinkphp-jump/src'), 'liliuwei\\think\\' => array($vendorDir . '/liliuwei/thinkphp-jump/src'),
'extend\\' => array($baseDir . '/extend'), 'extend\\' => array($baseDir . '/extend'),
'app\\' => array($baseDir . '/app'), 'app\\' => array($baseDir . '/app'),
@@ -23,7 +24,6 @@ return array(
'WeChatPay\\' => array($vendorDir . '/wechatpay/wechatpay/src'), 'WeChatPay\\' => array($vendorDir . '/wechatpay/wechatpay/src'),
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'), 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'), 'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'),
'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'), 'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'),
'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'), 'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'),
@@ -46,7 +46,9 @@ return array(
'Psr\\EventDispatcher\\' => array($vendorDir . '/psr/event-dispatcher/src'), 'Psr\\EventDispatcher\\' => array($vendorDir . '/psr/event-dispatcher/src'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'),
'PhpOffice\\PhpSpreadsheet\\' => array($vendorDir . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet'), 'PhpOffice\\PhpSpreadsheet\\' => array($vendorDir . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet'),
'PHPStan\\PhpDocParser\\' => array($vendorDir . '/phpstan/phpdoc-parser/src'),
'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'), 'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'),
'Overtrue\\Socialite\\' => array($vendorDir . '/overtrue/socialite/src'), 'Overtrue\\Socialite\\' => array($vendorDir . '/overtrue/socialite/src'),
'Overtrue\\Flysystem\\Cos\\' => array($vendorDir . '/overtrue/flysystem-cos/src'), 'Overtrue\\Flysystem\\Cos\\' => array($vendorDir . '/overtrue/flysystem-cos/src'),
@@ -70,6 +72,9 @@ return array(
'GatewayClient\\' => array($vendorDir . '/workerman/gatewayclient'), 'GatewayClient\\' => array($vendorDir . '/workerman/gatewayclient'),
'EasyWeChat\\' => array($vendorDir . '/overtrue/wechat/src'), 'EasyWeChat\\' => array($vendorDir . '/overtrue/wechat/src'),
'EasyWeChatComposer\\' => array($vendorDir . '/easywechat-composer/easywechat-composer/src'), 'EasyWeChatComposer\\' => array($vendorDir . '/easywechat-composer/easywechat-composer/src'),
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
'Doctrine\\Deprecations\\' => array($vendorDir . '/doctrine/deprecations/src'),
'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
'Curl\\' => array($vendorDir . '/php-curl-class/php-curl-class/src/Curl'), 'Curl\\' => array($vendorDir . '/php-curl-class/php-curl-class/src/Curl'),
'Cron\\' => array($vendorDir . '/dragonmantank/cron-expression/src/Cron'), 'Cron\\' => array($vendorDir . '/dragonmantank/cron-expression/src/Cron'),
'Complex\\' => array($vendorDir . '/markbaker/complex/classes/src'), 'Complex\\' => array($vendorDir . '/markbaker/complex/classes/src'),

View File

@@ -13,58 +13,38 @@ class ComposerAutoloaderInit516d2ac39a060b91610bddcc729d2cf4
} }
} }
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader() public static function getLoader()
{ {
if (null !== self::$loader) { if (null !== self::$loader) {
return self::$loader; return self::$loader;
} }
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit516d2ac39a060b91610bddcc729d2cf4', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInit516d2ac39a060b91610bddcc729d2cf4', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit516d2ac39a060b91610bddcc729d2cf4', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInit516d2ac39a060b91610bddcc729d2cf4', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); require __DIR__ . '/autoload_static.php';
if ($useStaticLoader) { call_user_func(\Composer\Autoload\ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4::getInitializer($loader));
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->register(true); $loader->register(true);
if ($useStaticLoader) { $filesToLoad = \Composer\Autoload\ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
} else { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$includeFiles = require __DIR__ . '/autoload_files.php'; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
}
foreach ($includeFiles as $fileIdentifier => $file) { require $file;
composerRequire516d2ac39a060b91610bddcc729d2cf4($fileIdentifier, $file); }
}, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file);
} }
return $loader; return $loader;
} }
} }
function composerRequire516d2ac39a060b91610bddcc729d2cf4($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
}
}

View File

@@ -7,24 +7,24 @@ namespace Composer\Autoload;
class ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4 class ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4
{ {
public static $files = array ( public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php', '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'35fab96057f1bf5e7aba31a8a6d5fdde' => __DIR__ . '/..' . '/topthink/think-orm/stubs/load_stubs.php', '35fab96057f1bf5e7aba31a8a6d5fdde' => __DIR__ . '/..' . '/topthink/think-orm/stubs/load_stubs.php',
'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php', 'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php',
'cd5441689b14144e5573bf989ee47b34' => __DIR__ . '/..' . '/qcloud/cos-sdk-v5/src/Common.php', 'cd5441689b14144e5573bf989ee47b34' => __DIR__ . '/..' . '/qcloud/cos-sdk-v5/src/Common.php',
'841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php', '841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php',
'5dd19d8a547b7318af0c3a93c8bd6565' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/Http/Middleware/Middleware.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
'2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', '2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'f0e7e63bbb278a92db02393536748c5f' => __DIR__ . '/..' . '/overtrue/wechat/src/Kernel/Support/Helpers.php', 'f0e7e63bbb278a92db02393536748c5f' => __DIR__ . '/..' . '/overtrue/wechat/src/Kernel/Support/Helpers.php',
'6747f579ad6817f318cc3a7e7a0abb93' => __DIR__ . '/..' . '/overtrue/wechat/src/Kernel/Helpers.php', '6747f579ad6817f318cc3a7e7a0abb93' => __DIR__ . '/..' . '/overtrue/wechat/src/Kernel/Helpers.php',
'667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php', '1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
'cc56288302d9df745d97c934d6a6e5f0' => __DIR__ . '/..' . '/topthink/think-queue/src/common.php', 'cc56288302d9df745d97c934d6a6e5f0' => __DIR__ . '/..' . '/topthink/think-queue/src/common.php',
); );
@@ -43,6 +43,10 @@ class ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4
'think\\' => 6, 'think\\' => 6,
'thans\\filesystem\\' => 17, 'thans\\filesystem\\' => 17,
), ),
'p' =>
array (
'phpDocumentor\\Reflection\\' => 25,
),
'l' => 'l' =>
array ( array (
'liliuwei\\think\\' => 15, 'liliuwei\\think\\' => 15,
@@ -73,7 +77,6 @@ class ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4
array ( array (
'Symfony\\Polyfill\\Php80\\' => 23, 'Symfony\\Polyfill\\Php80\\' => 23,
'Symfony\\Polyfill\\Php73\\' => 23, 'Symfony\\Polyfill\\Php73\\' => 23,
'Symfony\\Polyfill\\Php72\\' => 23,
'Symfony\\Polyfill\\Mbstring\\' => 26, 'Symfony\\Polyfill\\Mbstring\\' => 26,
'Symfony\\Contracts\\Translation\\' => 30, 'Symfony\\Contracts\\Translation\\' => 30,
'Symfony\\Contracts\\Service\\' => 26, 'Symfony\\Contracts\\Service\\' => 26,
@@ -102,7 +105,9 @@ class ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4
'Psr\\EventDispatcher\\' => 20, 'Psr\\EventDispatcher\\' => 20,
'Psr\\Container\\' => 14, 'Psr\\Container\\' => 14,
'Psr\\Cache\\' => 10, 'Psr\\Cache\\' => 10,
'Prophecy\\' => 9,
'PhpOffice\\PhpSpreadsheet\\' => 25, 'PhpOffice\\PhpSpreadsheet\\' => 25,
'PHPStan\\PhpDocParser\\' => 21,
'PHPMailer\\PHPMailer\\' => 20, 'PHPMailer\\PHPMailer\\' => 20,
), ),
'O' => 'O' =>
@@ -145,6 +150,12 @@ class ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4
'EasyWeChat\\' => 11, 'EasyWeChat\\' => 11,
'EasyWeChatComposer\\' => 19, 'EasyWeChatComposer\\' => 19,
), ),
'D' =>
array (
'Doctrine\\Instantiator\\' => 22,
'Doctrine\\Deprecations\\' => 22,
'DeepCopy\\' => 9,
),
'C' => 'C' =>
array ( array (
'Curl\\' => 5, 'Curl\\' => 5,
@@ -187,6 +198,12 @@ class ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4
array ( array (
0 => __DIR__ . '/..' . '/thans/thinkphp-filesystem-cloud/src', 0 => __DIR__ . '/..' . '/thans/thinkphp-filesystem-cloud/src',
), ),
'phpDocumentor\\Reflection\\' =>
array (
0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src',
1 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src',
2 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src',
),
'liliuwei\\think\\' => 'liliuwei\\think\\' =>
array ( array (
0 => __DIR__ . '/..' . '/liliuwei/thinkphp-jump/src', 0 => __DIR__ . '/..' . '/liliuwei/thinkphp-jump/src',
@@ -227,10 +244,6 @@ class ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4
array ( array (
0 => __DIR__ . '/..' . '/symfony/polyfill-php73', 0 => __DIR__ . '/..' . '/symfony/polyfill-php73',
), ),
'Symfony\\Polyfill\\Php72\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
),
'Symfony\\Polyfill\\Mbstring\\' => 'Symfony\\Polyfill\\Mbstring\\' =>
array ( array (
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
@@ -320,10 +333,18 @@ class ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4
array ( array (
0 => __DIR__ . '/..' . '/psr/cache/src', 0 => __DIR__ . '/..' . '/psr/cache/src',
), ),
'Prophecy\\' =>
array (
0 => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy',
),
'PhpOffice\\PhpSpreadsheet\\' => 'PhpOffice\\PhpSpreadsheet\\' =>
array ( array (
0 => __DIR__ . '/..' . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet', 0 => __DIR__ . '/..' . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet',
), ),
'PHPStan\\PhpDocParser\\' =>
array (
0 => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src',
),
'PHPMailer\\PHPMailer\\' => 'PHPMailer\\PHPMailer\\' =>
array ( array (
0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src',
@@ -416,6 +437,18 @@ class ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4
array ( array (
0 => __DIR__ . '/..' . '/easywechat-composer/easywechat-composer/src', 0 => __DIR__ . '/..' . '/easywechat-composer/easywechat-composer/src',
), ),
'Doctrine\\Instantiator\\' =>
array (
0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator',
),
'Doctrine\\Deprecations\\' =>
array (
0 => __DIR__ . '/..' . '/doctrine/deprecations/src',
),
'DeepCopy\\' =>
array (
0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy',
),
'Curl\\' => 'Curl\\' =>
array ( array (
0 => __DIR__ . '/..' . '/php-curl-class/php-curl-class/src/Curl', 0 => __DIR__ . '/..' . '/php-curl-class/php-curl-class/src/Curl',
@@ -461,9 +494,558 @@ class ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4
public static $classMap = array ( public static $classMap = array (
'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php', 'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
'PHPUnit\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php',
'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php',
'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/AssertionFailedError.php',
'PHPUnit\\Framework\\CodeCoverageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/CodeCoverageException.php',
'PHPUnit\\Framework\\Constraint\\ArrayHasKey' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php',
'PHPUnit\\Framework\\Constraint\\ArraySubset' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php',
'PHPUnit\\Framework\\Constraint\\Attribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php',
'PHPUnit\\Framework\\Constraint\\Callback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Callback.php',
'PHPUnit\\Framework\\Constraint\\ClassHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php',
'PHPUnit\\Framework\\Constraint\\ClassHasStaticAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php',
'PHPUnit\\Framework\\Constraint\\Composite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Composite.php',
'PHPUnit\\Framework\\Constraint\\Constraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Constraint.php',
'PHPUnit\\Framework\\Constraint\\Count' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Count.php',
'PHPUnit\\Framework\\Constraint\\DirectoryExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/DirectoryExists.php',
'PHPUnit\\Framework\\Constraint\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception.php',
'PHPUnit\\Framework\\Constraint\\ExceptionCode' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php',
'PHPUnit\\Framework\\Constraint\\ExceptionMessage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php',
'PHPUnit\\Framework\\Constraint\\ExceptionMessageRegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegularExpression.php',
'PHPUnit\\Framework\\Constraint\\FileExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php',
'PHPUnit\\Framework\\Constraint\\GreaterThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php',
'PHPUnit\\Framework\\Constraint\\IsAnything' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php',
'PHPUnit\\Framework\\Constraint\\IsEmpty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php',
'PHPUnit\\Framework\\Constraint\\IsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php',
'PHPUnit\\Framework\\Constraint\\IsFalse' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php',
'PHPUnit\\Framework\\Constraint\\IsFinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFinite.php',
'PHPUnit\\Framework\\Constraint\\IsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php',
'PHPUnit\\Framework\\Constraint\\IsInfinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php',
'PHPUnit\\Framework\\Constraint\\IsInstanceOf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php',
'PHPUnit\\Framework\\Constraint\\IsJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php',
'PHPUnit\\Framework\\Constraint\\IsNan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNan.php',
'PHPUnit\\Framework\\Constraint\\IsNull' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php',
'PHPUnit\\Framework\\Constraint\\IsReadable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsReadable.php',
'PHPUnit\\Framework\\Constraint\\IsTrue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php',
'PHPUnit\\Framework\\Constraint\\IsType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsType.php',
'PHPUnit\\Framework\\Constraint\\IsWritable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsWritable.php',
'PHPUnit\\Framework\\Constraint\\JsonMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php',
'PHPUnit\\Framework\\Constraint\\JsonMatchesErrorMessageProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php',
'PHPUnit\\Framework\\Constraint\\LessThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php',
'PHPUnit\\Framework\\Constraint\\LogicalAnd' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LogicalAnd.php',
'PHPUnit\\Framework\\Constraint\\LogicalNot' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LogicalNot.php',
'PHPUnit\\Framework\\Constraint\\LogicalOr' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LogicalOr.php',
'PHPUnit\\Framework\\Constraint\\LogicalXor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LogicalXor.php',
'PHPUnit\\Framework\\Constraint\\ObjectHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php',
'PHPUnit\\Framework\\Constraint\\RegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/RegularExpression.php',
'PHPUnit\\Framework\\Constraint\\SameSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php',
'PHPUnit\\Framework\\Constraint\\StringContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php',
'PHPUnit\\Framework\\Constraint\\StringEndsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php',
'PHPUnit\\Framework\\Constraint\\StringMatchesFormatDescription' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringMatchesFormatDescription.php',
'PHPUnit\\Framework\\Constraint\\StringStartsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php',
'PHPUnit\\Framework\\Constraint\\TraversableContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php',
'PHPUnit\\Framework\\Constraint\\TraversableContainsOnly' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php',
'PHPUnit\\Framework\\CoveredCodeNotExecutedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/CoveredCodeNotExecutedException.php',
'PHPUnit\\Framework\\DataProviderTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/DataProviderTestSuite.php',
'PHPUnit\\Framework\\Error\\Deprecated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Deprecated.php',
'PHPUnit\\Framework\\Error\\Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Error.php',
'PHPUnit\\Framework\\Error\\Notice' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Notice.php',
'PHPUnit\\Framework\\Error\\Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Warning.php',
'PHPUnit\\Framework\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception.php',
'PHPUnit\\Framework\\ExceptionWrapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php',
'PHPUnit\\Framework\\ExpectationFailedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php',
'PHPUnit\\Framework\\IncompleteTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTest.php',
'PHPUnit\\Framework\\IncompleteTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php',
'PHPUnit\\Framework\\IncompleteTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestError.php',
'PHPUnit\\Framework\\InvalidCoversTargetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php',
'PHPUnit\\Framework\\InvalidParameterGroupException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php',
'PHPUnit\\Framework\\MissingCoversAnnotationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MissingCoversAnnotationException.php',
'PHPUnit\\Framework\\MockObject\\BadMethodCallException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php',
'PHPUnit\\Framework\\MockObject\\Builder\\Identity' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php',
'PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php',
'PHPUnit\\Framework\\MockObject\\Builder\\Match' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/Match.php',
'PHPUnit\\Framework\\MockObject\\Builder\\MethodNameMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php',
'PHPUnit\\Framework\\MockObject\\Builder\\NamespaceMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/NamespaceMatch.php',
'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php',
'PHPUnit\\Framework\\MockObject\\Builder\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php',
'PHPUnit\\Framework\\MockObject\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php',
'PHPUnit\\Framework\\MockObject\\Generator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator.php',
'PHPUnit\\Framework\\MockObject\\Invocation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Invocation/Invocation.php',
'PHPUnit\\Framework\\MockObject\\InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/InvocationMocker.php',
'PHPUnit\\Framework\\MockObject\\Invocation\\ObjectInvocation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Invocation/ObjectInvocation.php',
'PHPUnit\\Framework\\MockObject\\Invocation\\StaticInvocation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Invocation/StaticInvocation.php',
'PHPUnit\\Framework\\MockObject\\Invokable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Invokable.php',
'PHPUnit\\Framework\\MockObject\\Matcher' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\AnyInvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher/AnyInvokedCount.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\AnyParameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher/AnyParameters.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\ConsecutiveParameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher/ConsecutiveParameters.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\DeferredError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher/DeferredError.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\Invocation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher/Invocation.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtIndex' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher/InvokedAtIndex.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtLeastCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtLeastOnce' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtMostCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher/InvokedAtMostCount.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher/InvokedCount.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedRecorder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher/InvokedRecorder.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\MethodName' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher/MethodName.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\Parameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher/Parameters.php',
'PHPUnit\\Framework\\MockObject\\Matcher\\StatelessInvocation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher/StatelessInvocation.php',
'PHPUnit\\Framework\\MockObject\\MockBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php',
'PHPUnit\\Framework\\MockObject\\MockMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockMethod.php',
'PHPUnit\\Framework\\MockObject\\MockMethodSet' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php',
'PHPUnit\\Framework\\MockObject\\MockObject' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/ForwardCompatibility/MockObject.php',
'PHPUnit\\Framework\\MockObject\\RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php',
'PHPUnit\\Framework\\MockObject\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ConsecutiveCalls' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php',
'PHPUnit\\Framework\\MockObject\\Stub\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php',
'PHPUnit\\Framework\\MockObject\\Stub\\MatcherCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/MatcherCollection.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnArgument' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnCallback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnReference' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnValueMap' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.php',
'PHPUnit\\Framework\\MockObject\\Verifiable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Verifiable.php',
'PHPUnit\\Framework\\OutputError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/OutputError.php',
'PHPUnit\\Framework\\RiskyTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTest.php',
'PHPUnit\\Framework\\RiskyTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTestError.php',
'PHPUnit\\Framework\\SelfDescribing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SelfDescribing.php',
'PHPUnit\\Framework\\SkippedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTest.php',
'PHPUnit\\Framework\\SkippedTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestCase.php',
'PHPUnit\\Framework\\SkippedTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestError.php',
'PHPUnit\\Framework\\SkippedTestSuiteError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php',
'PHPUnit\\Framework\\SyntheticError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SyntheticError.php',
'PHPUnit\\Framework\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Test.php',
'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestCase.php',
'PHPUnit\\Framework\\TestFailure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestFailure.php',
'PHPUnit\\Framework\\TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListener.php',
'PHPUnit\\Framework\\TestListenerDefaultImplementation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php',
'PHPUnit\\Framework\\TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestResult.php',
'PHPUnit\\Framework\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php',
'PHPUnit\\Framework\\TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php',
'PHPUnit\\Framework\\UnexpectedValueException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/UnexpectedValueException.php',
'PHPUnit\\Framework\\UnintentionallyCoveredCodeError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php',
'PHPUnit\\Framework\\Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Warning.php',
'PHPUnit\\Framework\\WarningTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/WarningTestCase.php',
'PHPUnit\\Runner\\AfterIncompleteTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php',
'PHPUnit\\Runner\\AfterLastTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php',
'PHPUnit\\Runner\\AfterRiskyTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php',
'PHPUnit\\Runner\\AfterSkippedTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php',
'PHPUnit\\Runner\\AfterSuccessfulTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php',
'PHPUnit\\Runner\\AfterTestErrorHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php',
'PHPUnit\\Runner\\AfterTestFailureHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php',
'PHPUnit\\Runner\\AfterTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php',
'PHPUnit\\Runner\\AfterTestWarningHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php',
'PHPUnit\\Runner\\BaseTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/BaseTestRunner.php',
'PHPUnit\\Runner\\BeforeFirstTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php',
'PHPUnit\\Runner\\BeforeTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php',
'PHPUnit\\Runner\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception.php',
'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php',
'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\NameFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php',
'PHPUnit\\Runner\\Hook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/Hook.php',
'PHPUnit\\Runner\\NullTestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/NullTestResultCache.php',
'PHPUnit\\Runner\\PhptTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/PhptTestCase.php',
'PHPUnit\\Runner\\ResultCacheExtension' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCacheExtension.php',
'PHPUnit\\Runner\\StandardTestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php',
'PHPUnit\\Runner\\TestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/TestHook.php',
'PHPUnit\\Runner\\TestListenerAdapter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php',
'PHPUnit\\Runner\\TestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestResultCache.php',
'PHPUnit\\Runner\\TestResultCacheInterface' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestResultCacheInterface.php',
'PHPUnit\\Runner\\TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php',
'PHPUnit\\Runner\\TestSuiteSorter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteSorter.php',
'PHPUnit\\Runner\\Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php',
'PHPUnit\\TextUI\\Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command.php',
'PHPUnit\\TextUI\\ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/ResultPrinter.php',
'PHPUnit\\TextUI\\TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestRunner.php',
'PHPUnit\\Util\\Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php',
'PHPUnit\\Util\\Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Configuration.php',
'PHPUnit\\Util\\ConfigurationGenerator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ConfigurationGenerator.php',
'PHPUnit\\Util\\ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php',
'PHPUnit\\Util\\FileLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/FileLoader.php',
'PHPUnit\\Util\\Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php',
'PHPUnit\\Util\\Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php',
'PHPUnit\\Util\\Getopt' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Getopt.php',
'PHPUnit\\Util\\GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php',
'PHPUnit\\Util\\InvalidArgumentHelper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php',
'PHPUnit\\Util\\Json' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Json.php',
'PHPUnit\\Util\\Log\\JUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JUnit.php',
'PHPUnit\\Util\\Log\\TeamCity' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TeamCity.php',
'PHPUnit\\Util\\PHP\\AbstractPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php',
'PHPUnit\\Util\\PHP\\DefaultPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php',
'PHPUnit\\Util\\PHP\\WindowsPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php',
'PHPUnit\\Util\\Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Printer.php',
'PHPUnit\\Util\\RegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/RegularExpression.php',
'PHPUnit\\Util\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php',
'PHPUnit\\Util\\TestDox\\CliTestDoxPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php',
'PHPUnit\\Util\\TestDox\\HtmlResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php',
'PHPUnit\\Util\\TestDox\\NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php',
'PHPUnit\\Util\\TestDox\\ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php',
'PHPUnit\\Util\\TestDox\\TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/TestResult.php',
'PHPUnit\\Util\\TestDox\\TextResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/TextResultPrinter.php',
'PHPUnit\\Util\\TestDox\\XmlResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php',
'PHPUnit\\Util\\TextTestListRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TextTestListRenderer.php',
'PHPUnit\\Util\\Type' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Type.php',
'PHPUnit\\Util\\XdebugFilterScriptGenerator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php',
'PHPUnit\\Util\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml.php',
'PHPUnit\\Util\\XmlTestListRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XmlTestListRenderer.php',
'PHPUnit_Framework_MockObject_MockObject' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockObject.php',
'PHP_Token' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_TokenWithScope' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_TokenWithScopeAndVisibility' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ABSTRACT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_AMPERSAND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_AND_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ARRAY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ARRAY_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_AS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_AT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_BACKTICK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_BAD_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_BOOLEAN_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_BOOLEAN_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_BOOL_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_BREAK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CALLABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CARET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CASE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CATCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLASS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLASS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLASS_NAME_CONSTANT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLONE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLOSE_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLOSE_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLOSE_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CLOSE_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_COALESCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_COALESCE_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_COMMA' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CONCAT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CONST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CONSTANT_ENCAPSED_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CONTINUE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_CURLY_OPEN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DEC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DEFAULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DIR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DIV' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DIV_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOC_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOLLAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOUBLE_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOUBLE_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOUBLE_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_DOUBLE_QUOTES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ELLIPSIS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ELSE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ELSEIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_EMPTY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ENCAPSED_AND_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ENDDECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ENDFOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ENDFOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ENDIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ENDSWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ENDWHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_END_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_EVAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_EXCLAMATION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_EXIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_EXTENDS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FINAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FINALLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_FUNC_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_GLOBAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_GOTO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_HALT_COMPILER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IMPLEMENTS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INCLUDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INCLUDE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INLINE_HTML' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INSTANCEOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INSTEADOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INTERFACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_INT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_ISSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IS_GREATER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IS_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IS_NOT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IS_NOT_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_IS_SMALLER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_Includes' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_LINE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_LIST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_LNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_LOGICAL_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_LOGICAL_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_LOGICAL_XOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_METHOD_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_MINUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_MINUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_MOD_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_MULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_MUL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_NAMESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_NEW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_NS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_NS_SEPARATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_NUM_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OBJECT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OPEN_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OPEN_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OPEN_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OPEN_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OPEN_TAG_WITH_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PERCENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PIPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PLUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PLUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_POW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_POW_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PRINT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PRIVATE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PROTECTED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_PUBLIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_QUESTION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_REQUIRE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_REQUIRE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_RETURN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_SEMICOLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_SL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_SL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_SPACESHIP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_SR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_SR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_START_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_STATIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_STRING_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_STRING_VARNAME' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_SWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_Stream' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream.php',
'PHP_Token_Stream_CachingFactory' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php',
'PHP_Token_THROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_TILDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_TRAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_TRAIT_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_TRY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_UNSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_UNSET_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_USE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_USE_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_Util' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Util.php',
'PHP_Token_VAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_VARIABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_WHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_XOR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_YIELD' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
'PHP_Token_YIELD_FROM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.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',
'PharIo\\Manifest\\AuthorCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/AuthorCollection.php',
'PharIo\\Manifest\\AuthorCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/AuthorCollectionIterator.php',
'PharIo\\Manifest\\AuthorElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/AuthorElement.php',
'PharIo\\Manifest\\AuthorElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/AuthorElementCollection.php',
'PharIo\\Manifest\\BundledComponent' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponent.php',
'PharIo\\Manifest\\BundledComponentCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponentCollection.php',
'PharIo\\Manifest\\BundledComponentCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponentCollectionIterator.php',
'PharIo\\Manifest\\BundlesElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/BundlesElement.php',
'PharIo\\Manifest\\ComponentElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ComponentElement.php',
'PharIo\\Manifest\\ComponentElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ComponentElementCollection.php',
'PharIo\\Manifest\\ContainsElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ContainsElement.php',
'PharIo\\Manifest\\CopyrightElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/CopyrightElement.php',
'PharIo\\Manifest\\CopyrightInformation' => __DIR__ . '/..' . '/phar-io/manifest/src/values/CopyrightInformation.php',
'PharIo\\Manifest\\ElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ElementCollection.php',
'PharIo\\Manifest\\Email' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Email.php',
'PharIo\\Manifest\\Exception' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/Exception.php',
'PharIo\\Manifest\\ExtElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtElement.php',
'PharIo\\Manifest\\ExtElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtElementCollection.php',
'PharIo\\Manifest\\Extension' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Extension.php',
'PharIo\\Manifest\\ExtensionElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtensionElement.php',
'PharIo\\Manifest\\InvalidApplicationNameException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php',
'PharIo\\Manifest\\InvalidEmailException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidEmailException.php',
'PharIo\\Manifest\\InvalidUrlException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidUrlException.php',
'PharIo\\Manifest\\Library' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Library.php',
'PharIo\\Manifest\\License' => __DIR__ . '/..' . '/phar-io/manifest/src/values/License.php',
'PharIo\\Manifest\\LicenseElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/LicenseElement.php',
'PharIo\\Manifest\\Manifest' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Manifest.php',
'PharIo\\Manifest\\ManifestDocument' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestDocument.php',
'PharIo\\Manifest\\ManifestDocumentException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentException.php',
'PharIo\\Manifest\\ManifestDocumentLoadingException' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestDocumentLoadingException.php',
'PharIo\\Manifest\\ManifestDocumentMapper' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestDocumentMapper.php',
'PharIo\\Manifest\\ManifestDocumentMapperException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php',
'PharIo\\Manifest\\ManifestElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestElement.php',
'PharIo\\Manifest\\ManifestElementException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestElementException.php',
'PharIo\\Manifest\\ManifestLoader' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestLoader.php',
'PharIo\\Manifest\\ManifestLoaderException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php',
'PharIo\\Manifest\\ManifestSerializer' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestSerializer.php',
'PharIo\\Manifest\\PhpElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/PhpElement.php',
'PharIo\\Manifest\\PhpExtensionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpExtensionRequirement.php',
'PharIo\\Manifest\\PhpVersionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpVersionRequirement.php',
'PharIo\\Manifest\\Requirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Requirement.php',
'PharIo\\Manifest\\RequirementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/RequirementCollection.php',
'PharIo\\Manifest\\RequirementCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/RequirementCollectionIterator.php',
'PharIo\\Manifest\\RequiresElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/RequiresElement.php',
'PharIo\\Manifest\\Type' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Type.php',
'PharIo\\Manifest\\Url' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Url.php',
'PharIo\\Version\\AbstractVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AbstractVersionConstraint.php',
'PharIo\\Version\\AndVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php',
'PharIo\\Version\\AnyVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AnyVersionConstraint.php',
'PharIo\\Version\\ExactVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/ExactVersionConstraint.php',
'PharIo\\Version\\Exception' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/Exception.php',
'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php',
'PharIo\\Version\\InvalidPreReleaseSuffixException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php',
'PharIo\\Version\\InvalidVersionException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidVersionException.php',
'PharIo\\Version\\OrVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php',
'PharIo\\Version\\PreReleaseSuffix' => __DIR__ . '/..' . '/phar-io/version/src/PreReleaseSuffix.php',
'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php',
'PharIo\\Version\\SpecificMajorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php',
'PharIo\\Version\\UnsupportedVersionConstraintException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php',
'PharIo\\Version\\Version' => __DIR__ . '/..' . '/phar-io/version/src/Version.php',
'PharIo\\Version\\VersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/VersionConstraint.php',
'PharIo\\Version\\VersionConstraintParser' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintParser.php',
'PharIo\\Version\\VersionConstraintValue' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintValue.php',
'PharIo\\Version\\VersionNumber' => __DIR__ . '/..' . '/phar-io/version/src/VersionNumber.php',
'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php',
'SebastianBergmann\\CodeCoverage\\CoveredCodeNotExecutedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Driver.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PHPDBG' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PHPDBG.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Xdebug.php',
'SebastianBergmann\\CodeCoverage\\Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Exception.php',
'SebastianBergmann\\CodeCoverage\\Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Filter.php',
'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php',
'SebastianBergmann\\CodeCoverage\\MissingCoversAnnotationException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/MissingCoversAnnotationException.php',
'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/AbstractNode.php',
'SebastianBergmann\\CodeCoverage\\Node\\Builder' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Builder.php',
'SebastianBergmann\\CodeCoverage\\Node\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Directory.php',
'SebastianBergmann\\CodeCoverage\\Node\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/File.php',
'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Iterator.php',
'SebastianBergmann\\CodeCoverage\\Report\\Clover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Clover.php',
'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Crap4j.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Facade.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php',
'SebastianBergmann\\CodeCoverage\\Report\\PHP' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/PHP.php',
'SebastianBergmann\\CodeCoverage\\Report\\Text' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Text.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\BuildInformation' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/File.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Method.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Node.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Project.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Report.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Source' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Source.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php',
'SebastianBergmann\\CodeCoverage\\RuntimeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/RuntimeException.php',
'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php',
'SebastianBergmann\\CodeCoverage\\Util' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util.php',
'SebastianBergmann\\CodeCoverage\\Version' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Version.php',
'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => __DIR__ . '/..' . '/sebastian/code-unit-reverse-lookup/src/Wizard.php',
'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php',
'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php',
'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php',
'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DOMNodeComparator.php',
'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DateTimeComparator.php',
'SebastianBergmann\\Comparator\\DoubleComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DoubleComparator.php',
'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ExceptionComparator.php',
'SebastianBergmann\\Comparator\\Factory' => __DIR__ . '/..' . '/sebastian/comparator/src/Factory.php',
'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/MockObjectComparator.php',
'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumericComparator.php',
'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ObjectComparator.php',
'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ResourceComparator.php',
'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ScalarComparator.php',
'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/SplObjectStorageComparator.php',
'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/TypeComparator.php',
'SebastianBergmann\\Diff\\Chunk' => __DIR__ . '/..' . '/sebastian/diff/src/Chunk.php',
'SebastianBergmann\\Diff\\ConfigurationException' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/ConfigurationException.php',
'SebastianBergmann\\Diff\\Diff' => __DIR__ . '/..' . '/sebastian/diff/src/Diff.php',
'SebastianBergmann\\Diff\\Differ' => __DIR__ . '/..' . '/sebastian/diff/src/Differ.php',
'SebastianBergmann\\Diff\\Exception' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/Exception.php',
'SebastianBergmann\\Diff\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/InvalidArgumentException.php',
'SebastianBergmann\\Diff\\Line' => __DIR__ . '/..' . '/sebastian/diff/src/Line.php',
'SebastianBergmann\\Diff\\LongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/LongestCommonSubsequenceCalculator.php',
'SebastianBergmann\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php',
'SebastianBergmann\\Diff\\Output\\AbstractChunkOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php',
'SebastianBergmann\\Diff\\Output\\DiffOnlyOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php',
'SebastianBergmann\\Diff\\Output\\DiffOutputBuilderInterface' => __DIR__ . '/..' . '/sebastian/diff/src/Output/DiffOutputBuilderInterface.php',
'SebastianBergmann\\Diff\\Output\\StrictUnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php',
'SebastianBergmann\\Diff\\Output\\UnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php',
'SebastianBergmann\\Diff\\Parser' => __DIR__ . '/..' . '/sebastian/diff/src/Parser.php',
'SebastianBergmann\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php',
'SebastianBergmann\\Environment\\Console' => __DIR__ . '/..' . '/sebastian/environment/src/Console.php',
'SebastianBergmann\\Environment\\OperatingSystem' => __DIR__ . '/..' . '/sebastian/environment/src/OperatingSystem.php',
'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php',
'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php',
'SebastianBergmann\\FileIterator\\Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php',
'SebastianBergmann\\FileIterator\\Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php',
'SebastianBergmann\\FileIterator\\Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php',
'SebastianBergmann\\GlobalState\\Blacklist' => __DIR__ . '/..' . '/sebastian/global-state/src/Blacklist.php',
'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__ . '/..' . '/sebastian/global-state/src/CodeExporter.php',
'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/Exception.php',
'SebastianBergmann\\GlobalState\\Restorer' => __DIR__ . '/..' . '/sebastian/global-state/src/Restorer.php',
'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/RuntimeException.php',
'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__ . '/..' . '/sebastian/global-state/src/Snapshot.php',
'SebastianBergmann\\ObjectEnumerator\\Enumerator' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Enumerator.php',
'SebastianBergmann\\ObjectEnumerator\\Exception' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Exception.php',
'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/InvalidArgumentException.php',
'SebastianBergmann\\ObjectReflector\\Exception' => __DIR__ . '/..' . '/sebastian/object-reflector/src/Exception.php',
'SebastianBergmann\\ObjectReflector\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-reflector/src/InvalidArgumentException.php',
'SebastianBergmann\\ObjectReflector\\ObjectReflector' => __DIR__ . '/..' . '/sebastian/object-reflector/src/ObjectReflector.php',
'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php',
'SebastianBergmann\\RecursionContext\\Exception' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Exception.php',
'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php',
'SebastianBergmann\\ResourceOperations\\ResourceOperations' => __DIR__ . '/..' . '/sebastian/resource-operations/src/ResourceOperations.php',
'SebastianBergmann\\Timer\\Exception' => __DIR__ . '/..' . '/phpunit/php-timer/src/Exception.php',
'SebastianBergmann\\Timer\\RuntimeException' => __DIR__ . '/..' . '/phpunit/php-timer/src/RuntimeException.php',
'SebastianBergmann\\Timer\\Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php',
'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php',
'Stringable' => __DIR__ . '/..' . '/myclabs/php-enum/stubs/Stringable.php',
'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php',
'TheSeer\\Tokenizer\\Exception' => __DIR__ . '/..' . '/theseer/tokenizer/src/Exception.php',
'TheSeer\\Tokenizer\\NamespaceUri' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUri.php',
'TheSeer\\Tokenizer\\NamespaceUriException' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUriException.php',
'TheSeer\\Tokenizer\\Token' => __DIR__ . '/..' . '/theseer/tokenizer/src/Token.php',
'TheSeer\\Tokenizer\\TokenCollection' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollection.php',
'TheSeer\\Tokenizer\\TokenCollectionException' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollectionException.php',
'TheSeer\\Tokenizer\\Tokenizer' => __DIR__ . '/..' . '/theseer/tokenizer/src/Tokenizer.php',
'TheSeer\\Tokenizer\\XMLSerializer' => __DIR__ . '/..' . '/theseer/tokenizer/src/XMLSerializer.php',
'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
); );

File diff suppressed because it is too large Load Diff

View File

@@ -11,14 +11,41 @@
), ),
'versions' => array( 'versions' => array(
'aliyuncs/oss-sdk-php' => array( 'aliyuncs/oss-sdk-php' => array(
'pretty_version' => 'v2.5.0', 'pretty_version' => 'v2.7.2',
'version' => '2.5.0.0', 'version' => '2.7.2.0',
'reference' => 'f0413667d765855eb0aaa728b596801464ffdb06', 'reference' => '483dd0b8bff5d47f0e4ffc99f6077a295c5ccbb5',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../aliyuncs/oss-sdk-php', 'install_path' => __DIR__ . '/../aliyuncs/oss-sdk-php',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'doctrine/deprecations' => array(
'pretty_version' => '1.1.5',
'version' => '1.1.5.0',
'reference' => '459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/deprecations',
'aliases' => array(),
'dev_requirement' => true,
),
'doctrine/instantiator' => array(
'pretty_version' => '1.5.0',
'version' => '1.5.0.0',
'reference' => '0a0fa9780f5d4e507415a065172d26a98d02047b',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/instantiator',
'aliases' => array(),
'dev_requirement' => true,
),
'dragonmantank/cron-expression' => array(
'pretty_version' => 'v3.4.0',
'version' => '3.4.0.0',
'reference' => '8c784d071debd117328803d86b2097615b457500',
'type' => 'library',
'install_path' => __DIR__ . '/../dragonmantank/cron-expression',
'aliases' => array(),
'dev_requirement' => false,
),
'easywechat-composer/easywechat-composer' => array( 'easywechat-composer/easywechat-composer' => array(
'pretty_version' => '1.4.1', 'pretty_version' => '1.4.1',
'version' => '1.4.1.0', 'version' => '1.4.1.0',
@@ -29,63 +56,63 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'ezyang/htmlpurifier' => array( 'ezyang/htmlpurifier' => array(
'pretty_version' => 'v4.14.0', 'pretty_version' => 'v4.19.0',
'version' => '4.14.0.0', 'version' => '4.19.0.0',
'reference' => '12ab42bd6e742c70c0a52f7b82477fcd44e64b75', 'reference' => 'b287d2a16aceffbf6e0295559b39662612b77fcf',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../ezyang/htmlpurifier', 'install_path' => __DIR__ . '/../ezyang/htmlpurifier',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/command' => array( 'guzzlehttp/command' => array(
'pretty_version' => '1.2.2', 'pretty_version' => '1.3.1',
'version' => '1.2.2.0', 'version' => '1.3.1.0',
'reference' => '7883359e0ecab8a8f7c43aad2fc36360a35d21e8', 'reference' => '0eebc653784f4902b3272e826fe8e88743d14e77',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/command', 'install_path' => __DIR__ . '/../guzzlehttp/command',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/guzzle' => array( 'guzzlehttp/guzzle' => array(
'pretty_version' => '7.4.2', 'pretty_version' => '7.8.2',
'version' => '7.4.2.0', 'version' => '7.8.2.0',
'reference' => 'ac1ec1cd9b5624694c3a40be801d94137afb12b4', 'reference' => 'f4152d9eb85c445fe1f992001d1748e8bec070d2',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/guzzle-services' => array( 'guzzlehttp/guzzle-services' => array(
'pretty_version' => '1.3.2', 'pretty_version' => '1.4.1',
'version' => '1.3.2.0', 'version' => '1.4.1.0',
'reference' => '4989d902dd4e0411b320e851c46f3c94d652d891', 'reference' => 'bcab7c0d61672b606510a6fe5af3039d04968c0f',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle-services', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle-services',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/promises' => array( 'guzzlehttp/promises' => array(
'pretty_version' => '1.5.1', 'pretty_version' => '2.3.0',
'version' => '1.5.1.0', 'version' => '2.3.0.0',
'reference' => 'fe752aedc9fd8fcca3fe7ad05d419d32998a06da', 'reference' => '481557b130ef3790cf82b713667b43030dc9c957',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/promises', 'install_path' => __DIR__ . '/../guzzlehttp/promises',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/psr7' => array( 'guzzlehttp/psr7' => array(
'pretty_version' => '1.8.5', 'pretty_version' => '1.9.1',
'version' => '1.8.5.0', 'version' => '1.9.1.0',
'reference' => '337e3ad8e5716c15f9657bd214d16cc5e69df268', 'reference' => 'e4490cabc77465aaee90b20cfc9a770f8c04be6b',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'install_path' => __DIR__ . '/../guzzlehttp/psr7',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'guzzlehttp/uri-template' => array( 'guzzlehttp/uri-template' => array(
'pretty_version' => 'v1.0.1', 'pretty_version' => 'v1.0.5',
'version' => '1.0.1.0', 'version' => '1.0.5.0',
'reference' => 'b945d74a55a25a949158444f09ec0d3c120d69e2', 'reference' => '4f4bbd4e7172148801e76e3decc1e559bdee34e1',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/uri-template', 'install_path' => __DIR__ . '/../guzzlehttp/uri-template',
'aliases' => array(), 'aliases' => array(),
@@ -101,9 +128,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'league/flysystem' => array( 'league/flysystem' => array(
'pretty_version' => '1.1.9', 'pretty_version' => '1.1.10',
'version' => '1.1.9.0', 'version' => '1.1.10.0',
'reference' => '094defdb4a7001845300334e7c1ee2335925ef99', 'reference' => '3239285c825c152bcc315fe0e87d6b55f5972ed1',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../league/flysystem', 'install_path' => __DIR__ . '/../league/flysystem',
'aliases' => array(), 'aliases' => array(),
@@ -119,9 +146,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'league/mime-type-detection' => array( 'league/mime-type-detection' => array(
'pretty_version' => '1.11.0', 'pretty_version' => '1.16.0',
'version' => '1.11.0.0', 'version' => '1.16.0.0',
'reference' => 'ff6248ea87a9f116e78edd6002e39e5128a0d4dd', 'reference' => '2d6702ff215bf922936ccc1ad31007edc76451b9',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../league/mime-type-detection', 'install_path' => __DIR__ . '/../league/mime-type-detection',
'aliases' => array(), 'aliases' => array(),
@@ -155,45 +182,60 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'maennchen/zipstream-php' => array( 'maennchen/zipstream-php' => array(
'pretty_version' => '2.2.1', 'pretty_version' => '2.2.6',
'version' => '2.2.1.0', 'version' => '2.2.6.0',
'reference' => '211e9ba1530ea5260b45d90c9ea252f56ec52729', 'reference' => '30ad6f93cf3efe4192bc7a4c9cad11ff8f4f237f',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../maennchen/zipstream-php', 'install_path' => __DIR__ . '/../maennchen/zipstream-php',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'markbaker/complex' => array( 'markbaker/complex' => array(
'pretty_version' => '3.0.1', 'pretty_version' => '3.0.2',
'version' => '3.0.1.0', 'version' => '3.0.2.0',
'reference' => 'ab8bc271e404909db09ff2d5ffa1e538085c0f22', 'reference' => '95c56caa1cf5c766ad6d65b6344b807c1e8405b9',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../markbaker/complex', 'install_path' => __DIR__ . '/../markbaker/complex',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'markbaker/matrix' => array( 'markbaker/matrix' => array(
'pretty_version' => '3.0.0', 'pretty_version' => '3.0.1',
'version' => '3.0.0.0', 'version' => '3.0.1.0',
'reference' => 'c66aefcafb4f6c269510e9ac46b82619a904c576', 'reference' => '728434227fe21be27ff6d86621a1b13107a2562c',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../markbaker/matrix', 'install_path' => __DIR__ . '/../markbaker/matrix',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'monolog/monolog' => array( 'monolog/monolog' => array(
'pretty_version' => '2.6.0', 'pretty_version' => '2.10.0',
'version' => '2.6.0.0', 'version' => '2.10.0.0',
'reference' => '247918972acd74356b0a91dfaa5adcaec069b6c0', 'reference' => '5cf826f2991858b54d5c3809bee745560a1042a7',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../monolog/monolog', 'install_path' => __DIR__ . '/../monolog/monolog',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'mtdowling/cron-expression' => array(
'dev_requirement' => false,
'replaced' => array(
0 => '^1.0',
),
),
'myclabs/deep-copy' => array(
'pretty_version' => '1.13.4',
'version' => '1.13.4.0',
'reference' => '07d290f0c47959fd5eed98c95ee5602db07e0b6a',
'type' => 'library',
'install_path' => __DIR__ . '/../myclabs/deep-copy',
'aliases' => array(),
'dev_requirement' => true,
),
'myclabs/php-enum' => array( 'myclabs/php-enum' => array(
'pretty_version' => '1.6.6', 'pretty_version' => '1.8.5',
'version' => '1.6.6.0', 'version' => '1.8.5.0',
'reference' => '32c4202886c51fbe5cc3a7c34ec5c9a4a790345e', 'reference' => 'e7be26966b7398204a234f8673fdad5ac6277802',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../myclabs/php-enum', 'install_path' => __DIR__ . '/../myclabs/php-enum',
'aliases' => array(), 'aliases' => array(),
@@ -244,6 +286,24 @@
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'phar-io/manifest' => array(
'pretty_version' => '1.0.3',
'version' => '1.0.3.0',
'reference' => '7761fcacf03b4d4f16e7ccb606d4879ca431fcf4',
'type' => 'library',
'install_path' => __DIR__ . '/../phar-io/manifest',
'aliases' => array(),
'dev_requirement' => true,
),
'phar-io/version' => array(
'pretty_version' => '2.0.1',
'version' => '2.0.1.0',
'reference' => '45a2ec53a73c70ce41d55cedef9063630abaf1b6',
'type' => 'library',
'install_path' => __DIR__ . '/../phar-io/version',
'aliases' => array(),
'dev_requirement' => true,
),
'php-curl-class/php-curl-class' => array( 'php-curl-class/php-curl-class' => array(
'pretty_version' => '8.9.3', 'pretty_version' => '8.9.3',
'version' => '8.9.3.0', 'version' => '8.9.3.0',
@@ -253,6 +313,33 @@
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'phpdocumentor/reflection-common' => array(
'pretty_version' => '2.2.0',
'version' => '2.2.0.0',
'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b',
'type' => 'library',
'install_path' => __DIR__ . '/../phpdocumentor/reflection-common',
'aliases' => array(),
'dev_requirement' => true,
),
'phpdocumentor/reflection-docblock' => array(
'pretty_version' => '5.6.5',
'version' => '5.6.5.0',
'reference' => '90614c73d3800e187615e2dd236ad0e2a01bf761',
'type' => 'library',
'install_path' => __DIR__ . '/../phpdocumentor/reflection-docblock',
'aliases' => array(),
'dev_requirement' => true,
),
'phpdocumentor/type-resolver' => array(
'pretty_version' => '1.12.0',
'version' => '1.12.0.0',
'reference' => '92a98ada2b93d9b201a613cb5a33584dde25f195',
'type' => 'library',
'install_path' => __DIR__ . '/../phpdocumentor/type-resolver',
'aliases' => array(),
'dev_requirement' => true,
),
'phpmailer/phpmailer' => array( 'phpmailer/phpmailer' => array(
'pretty_version' => 'v6.4.1', 'pretty_version' => 'v6.4.1',
'version' => '6.4.1.0', 'version' => '6.4.1.0',
@@ -280,6 +367,78 @@
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'phpspec/prophecy' => array(
'pretty_version' => 'v1.22.0',
'version' => '1.22.0.0',
'reference' => '35f1adb388946d92e6edab2aa2cb2b60e132ebd5',
'type' => 'library',
'install_path' => __DIR__ . '/../phpspec/prophecy',
'aliases' => array(),
'dev_requirement' => true,
),
'phpstan/phpdoc-parser' => array(
'pretty_version' => '2.3.0',
'version' => '2.3.0.0',
'reference' => '1e0cd5370df5dd2e556a36b9c62f62e555870495',
'type' => 'library',
'install_path' => __DIR__ . '/../phpstan/phpdoc-parser',
'aliases' => array(),
'dev_requirement' => true,
),
'phpunit/php-code-coverage' => array(
'pretty_version' => '6.1.4',
'version' => '6.1.4.0',
'reference' => '807e6013b00af69b6c5d9ceb4282d0393dbb9d8d',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-code-coverage',
'aliases' => array(),
'dev_requirement' => true,
),
'phpunit/php-file-iterator' => array(
'pretty_version' => '2.0.6',
'version' => '2.0.6.0',
'reference' => '69deeb8664f611f156a924154985fbd4911eb36b',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-file-iterator',
'aliases' => array(),
'dev_requirement' => true,
),
'phpunit/php-text-template' => array(
'pretty_version' => '1.2.1',
'version' => '1.2.1.0',
'reference' => '31f8b717e51d9a2afca6c9f046f5d69fc27c8686',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-text-template',
'aliases' => array(),
'dev_requirement' => true,
),
'phpunit/php-timer' => array(
'pretty_version' => '2.1.4',
'version' => '2.1.4.0',
'reference' => 'a691211e94ff39a34811abd521c31bd5b305b0bb',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-timer',
'aliases' => array(),
'dev_requirement' => true,
),
'phpunit/php-token-stream' => array(
'pretty_version' => '3.1.3',
'version' => '3.1.3.0',
'reference' => '9c1da83261628cb24b6a6df371b6e312b3954768',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-token-stream',
'aliases' => array(),
'dev_requirement' => true,
),
'phpunit/phpunit' => array(
'pretty_version' => '7.5.20',
'version' => '7.5.20.0',
'reference' => '9467db479d1b0487c99733bb1e7944d32deded2c',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/phpunit',
'aliases' => array(),
'dev_requirement' => true,
),
'pimple/pimple' => array( 'pimple/pimple' => array(
'pretty_version' => 'v3.5.0', 'pretty_version' => 'v3.5.0',
'version' => '3.5.0.0', 'version' => '3.5.0.0',
@@ -329,9 +488,9 @@
), ),
), ),
'psr/http-client' => array( 'psr/http-client' => array(
'pretty_version' => '1.0.1', 'pretty_version' => '1.0.3',
'version' => '1.0.1.0', 'version' => '1.0.3.0',
'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621', 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-client', 'install_path' => __DIR__ . '/../psr/http-client',
'aliases' => array(), 'aliases' => array(),
@@ -344,18 +503,18 @@
), ),
), ),
'psr/http-factory' => array( 'psr/http-factory' => array(
'pretty_version' => '1.0.1', 'pretty_version' => '1.1.0',
'version' => '1.0.1.0', 'version' => '1.1.0.0',
'reference' => '12ac7fcd07e5b077433f5f2bee95b3a771bf61be', 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-factory', 'install_path' => __DIR__ . '/../psr/http-factory',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'psr/http-message' => array( 'psr/http-message' => array(
'pretty_version' => '1.0.1', 'pretty_version' => '1.1',
'version' => '1.0.1.0', 'version' => '1.1.0.0',
'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', 'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-message', 'install_path' => __DIR__ . '/../psr/http-message',
'aliases' => array(), 'aliases' => array(),
@@ -398,18 +557,18 @@
), ),
), ),
'qcloud/cos-sdk-v5' => array( 'qcloud/cos-sdk-v5' => array(
'pretty_version' => 'v2.5.5', 'pretty_version' => 'v2.6.16',
'version' => '2.5.5.0', 'version' => '2.6.16.0',
'reference' => '40e51efc05d5addeb9029db7840846809bd666c4', 'reference' => '22366f4b4f7f277e67aa72eea8d1e02a5f9943e2',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../qcloud/cos-sdk-v5', 'install_path' => __DIR__ . '/../qcloud/cos-sdk-v5',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'qiniu/php-sdk' => array( 'qiniu/php-sdk' => array(
'pretty_version' => 'v7.5.0', 'pretty_version' => 'v7.14.0',
'version' => '7.5.0.0', 'version' => '7.14.0.0',
'reference' => '0cc46e4206002d1a736dbb4abb1424b0b7fc3f22', 'reference' => 'ee752ffa7263ce99fca0bd7340cf13c486a3516c',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../qiniu/php-sdk', 'install_path' => __DIR__ . '/../qiniu/php-sdk',
'aliases' => array(), 'aliases' => array(),
@@ -424,19 +583,118 @@
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'sebastian/code-unit-reverse-lookup' => array(
'pretty_version' => '1.0.3',
'version' => '1.0.3.0',
'reference' => '92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/code-unit-reverse-lookup',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/comparator' => array(
'pretty_version' => '3.0.6',
'version' => '3.0.6.0',
'reference' => '4b3c947888c81708b20fb081bb653a2ba68f989a',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/comparator',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/diff' => array(
'pretty_version' => '3.0.6',
'version' => '3.0.6.0',
'reference' => '98ff311ca519c3aa73ccd3de053bdb377171d7b6',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/diff',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/environment' => array(
'pretty_version' => '4.2.5',
'version' => '4.2.5.0',
'reference' => '56932f6049a0482853056ffd617c91ffcc754205',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/environment',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/exporter' => array(
'pretty_version' => '3.1.8',
'version' => '3.1.8.0',
'reference' => '64cfeaa341951ceb2019d7b98232399d57bb2296',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/exporter',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/global-state' => array(
'pretty_version' => '2.0.0',
'version' => '2.0.0.0',
'reference' => 'e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/global-state',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/object-enumerator' => array(
'pretty_version' => '3.0.5',
'version' => '3.0.5.0',
'reference' => 'ac5b293dba925751b808e02923399fb44ff0d541',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/object-enumerator',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/object-reflector' => array(
'pretty_version' => '1.1.3',
'version' => '1.1.3.0',
'reference' => '1d439c229e61f244ff1f211e5c99737f90c67def',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/object-reflector',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/recursion-context' => array(
'pretty_version' => '3.0.3',
'version' => '3.0.3.0',
'reference' => '8fe7e75986a9d24b4cceae847314035df7703a5a',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/recursion-context',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/resource-operations' => array(
'pretty_version' => '2.0.3',
'version' => '2.0.3.0',
'reference' => '72a7f7674d053d548003b16ff5a106e7e0e06eee',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/resource-operations',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/version' => array(
'pretty_version' => '2.0.1',
'version' => '2.0.1.0',
'reference' => '99732be0ddb3361e16ad77b68ba41efc8e979019',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/version',
'aliases' => array(),
'dev_requirement' => true,
),
'symfony/cache' => array( 'symfony/cache' => array(
'pretty_version' => 'v5.4.8', 'pretty_version' => 'v5.4.46',
'version' => '5.4.8.0', 'version' => '5.4.46.0',
'reference' => '4c6747cf7e56c6b8e3094dd24852bd3e364375b1', 'reference' => '0fe08ee32cec2748fbfea10c52d3ee02049e0f6b',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/cache', 'install_path' => __DIR__ . '/../symfony/cache',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/cache-contracts' => array( 'symfony/cache-contracts' => array(
'pretty_version' => 'v2.5.1', 'pretty_version' => 'v2.5.4',
'version' => '2.5.1.0', 'version' => '2.5.4.0',
'reference' => '64be4a7acb83b6f2bf6de9a02cee6dad41277ebc', 'reference' => '517c3a3619dadfa6952c4651767fcadffb4df65e',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/cache-contracts', 'install_path' => __DIR__ . '/../symfony/cache-contracts',
'aliases' => array(), 'aliases' => array(),
@@ -449,27 +707,27 @@
), ),
), ),
'symfony/deprecation-contracts' => array( 'symfony/deprecation-contracts' => array(
'pretty_version' => 'v2.5.1', 'pretty_version' => 'v2.5.4',
'version' => '2.5.1.0', 'version' => '2.5.4.0',
'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', 'reference' => '605389f2a7e5625f273b53960dc46aeaf9c62918',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/event-dispatcher' => array( 'symfony/event-dispatcher' => array(
'pretty_version' => 'v5.4.3', 'pretty_version' => 'v5.4.45',
'version' => '5.4.3.0', 'version' => '5.4.45.0',
'reference' => 'dec8a9f58d20df252b9cd89f1c6c1530f747685d', 'reference' => '72982eb416f61003e9bb6e91f8b3213600dcf9e9',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/event-dispatcher', 'install_path' => __DIR__ . '/../symfony/event-dispatcher',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/event-dispatcher-contracts' => array( 'symfony/event-dispatcher-contracts' => array(
'pretty_version' => 'v2.5.1', 'pretty_version' => 'v2.5.4',
'version' => '2.5.1.0', 'version' => '2.5.4.0',
'reference' => 'f98b54df6ad059855739db6fcbc2d36995283fe1', 'reference' => 'e0fe3d79b516eb75126ac6fa4cbf19b79b08c99f',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/event-dispatcher-contracts', 'install_path' => __DIR__ . '/../symfony/event-dispatcher-contracts',
'aliases' => array(), 'aliases' => array(),
@@ -482,90 +740,90 @@
), ),
), ),
'symfony/http-foundation' => array( 'symfony/http-foundation' => array(
'pretty_version' => 'v5.4.8', 'pretty_version' => 'v5.4.48',
'version' => '5.4.8.0', 'version' => '5.4.48.0',
'reference' => 'ff2818d1c3d49860bcae1f2cbb5eb00fcd3bf9e2', 'reference' => '3f38b8af283b830e1363acd79e5bc3412d055341',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-foundation', 'install_path' => __DIR__ . '/../symfony/http-foundation',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/polyfill-mbstring' => array( 'symfony/polyfill-mbstring' => array(
'pretty_version' => 'v1.25.0', 'pretty_version' => 'v1.33.0',
'version' => '1.25.0.0', 'version' => '1.33.0.0',
'reference' => '0abb51d2f102e00a4eefcf46ba7fec406d245825', 'reference' => '6d857f4d76bd4b343eac26d6b539585d2bc56493',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/polyfill-php72' => array( 'symfony/polyfill-php72' => array(
'pretty_version' => 'v1.25.0', 'pretty_version' => 'v1.31.0',
'version' => '1.25.0.0', 'version' => '1.31.0.0',
'reference' => '9a142215a36a3888e30d0a9eeea9766764e96976', 'reference' => 'fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce',
'type' => 'library', 'type' => 'metapackage',
'install_path' => __DIR__ . '/../symfony/polyfill-php72', 'install_path' => NULL,
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'symfony/polyfill-php73' => array( 'symfony/polyfill-php73' => array(
'pretty_version' => 'v1.25.0', 'pretty_version' => 'v1.33.0',
'version' => '1.25.0.0', 'version' => '1.33.0.0',
'reference' => 'cc5db0e22b3cb4111010e48785a97f670b350ca5', 'reference' => '0f68c03565dcaaf25a890667542e8bd75fe7e5bb',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php73', 'install_path' => __DIR__ . '/../symfony/polyfill-php73',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/polyfill-php80' => array( 'symfony/polyfill-php80' => array(
'pretty_version' => 'v1.25.0', 'pretty_version' => 'v1.33.0',
'version' => '1.25.0.0', 'version' => '1.33.0.0',
'reference' => '4407588e0d3f1f52efb65fbe92babe41f37fe50c', 'reference' => '0cc9dd0f17f61d8131e7df6b84bd344899fe2608',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'install_path' => __DIR__ . '/../symfony/polyfill-php80',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/process' => array( 'symfony/process' => array(
'pretty_version' => 'v4.4.41', 'pretty_version' => 'v5.4.47',
'version' => '4.4.41.0', 'version' => '5.4.47.0',
'reference' => '9eedd60225506d56e42210a70c21bb80ca8456ce', 'reference' => '5d1662fb32ebc94f17ddb8d635454a776066733d',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/process', 'install_path' => __DIR__ . '/../symfony/process',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/psr-http-message-bridge' => array( 'symfony/psr-http-message-bridge' => array(
'pretty_version' => 'v2.1.2', 'pretty_version' => 'v2.3.1',
'version' => '2.1.2.0', 'version' => '2.3.1.0',
'reference' => '22b37c8a3f6b5d94e9cdbd88e1270d96e2f97b34', 'reference' => '581ca6067eb62640de5ff08ee1ba6850a0ee472e',
'type' => 'symfony-bridge', 'type' => 'symfony-bridge',
'install_path' => __DIR__ . '/../symfony/psr-http-message-bridge', 'install_path' => __DIR__ . '/../symfony/psr-http-message-bridge',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/service-contracts' => array( 'symfony/service-contracts' => array(
'pretty_version' => 'v2.5.1', 'pretty_version' => 'v2.5.4',
'version' => '2.5.1.0', 'version' => '2.5.4.0',
'reference' => '24d9dc654b83e91aa59f9d167b131bc3b5bea24c', 'reference' => 'f37b419f7aea2e9abf10abd261832cace12e3300',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/service-contracts', 'install_path' => __DIR__ . '/../symfony/service-contracts',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/translation' => array( 'symfony/translation' => array(
'pretty_version' => 'v5.4.8', 'pretty_version' => 'v5.4.45',
'version' => '5.4.8.0', 'version' => '5.4.45.0',
'reference' => 'f5c0f6d1f20993b2606f3a5f36b1dc8c1899170b', 'reference' => '98f26acc99341ca4bab345fb14d7b1d7cb825bed',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/translation', 'install_path' => __DIR__ . '/../symfony/translation',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/translation-contracts' => array( 'symfony/translation-contracts' => array(
'pretty_version' => 'v2.5.1', 'pretty_version' => 'v2.5.4',
'version' => '2.5.1.0', 'version' => '2.5.4.0',
'reference' => '1211df0afa701e45a04253110e959d4af4ef0f07', 'reference' => '450d4172653f38818657022252f9d81be89ee9a8',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/translation-contracts', 'install_path' => __DIR__ . '/../symfony/translation-contracts',
'aliases' => array(), 'aliases' => array(),
@@ -587,9 +845,9 @@
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'symfony/var-exporter' => array( 'symfony/var-exporter' => array(
'pretty_version' => 'v5.4.8', 'pretty_version' => 'v5.4.45',
'version' => '5.4.8.0', 'version' => '5.4.45.0',
'reference' => '7e132a3fcd4b57add721b4207236877b6017ec93', 'reference' => '862700068db0ddfd8c5b850671e029a90246ec75',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/var-exporter', 'install_path' => __DIR__ . '/../symfony/var-exporter',
'aliases' => array(), 'aliases' => array(),
@@ -604,10 +862,19 @@
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'theseer/tokenizer' => array(
'pretty_version' => '1.3.1',
'version' => '1.3.1.0',
'reference' => 'b7489ce515e168639d17feec34b8847c326b0b3c',
'type' => 'library',
'install_path' => __DIR__ . '/../theseer/tokenizer',
'aliases' => array(),
'dev_requirement' => true,
),
'topthink/framework' => array( 'topthink/framework' => array(
'pretty_version' => 'v6.0.13', 'pretty_version' => 'v6.0.14',
'version' => '6.0.13.0', 'version' => '6.0.14.0',
'reference' => '126d5b2cbacb73d6e2a85cbc7a2c6ee59d0b3fa6', 'reference' => 'e621c239492d4f7e276e166b16aba3fb933d501e',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../topthink/framework', 'install_path' => __DIR__ . '/../topthink/framework',
'aliases' => array(), 'aliases' => array(),
@@ -632,9 +899,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'topthink/think-helper' => array( 'topthink/think-helper' => array(
'pretty_version' => 'v3.1.6', 'pretty_version' => 'v3.1.11',
'version' => '3.1.6.0', 'version' => '3.1.11.0',
'reference' => '769acbe50a4274327162f9c68ec2e89a38eb2aff', 'reference' => '1d6ada9b9f3130046bf6922fe1bd159c8d88a33c',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../topthink/think-helper', 'install_path' => __DIR__ . '/../topthink/think-helper',
'aliases' => array(), 'aliases' => array(),
@@ -650,27 +917,27 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'topthink/think-orm' => array( 'topthink/think-orm' => array(
'pretty_version' => 'v2.0.54', 'pretty_version' => 'v2.0.62',
'version' => '2.0.54.0', 'version' => '2.0.62.0',
'reference' => '97b061b47616301ff29fbd4c35ed9184e1162e4e', 'reference' => 'e53bfea572a133039ad687077120de5521af617f',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../topthink/think-orm', 'install_path' => __DIR__ . '/../topthink/think-orm',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'topthink/think-queue' => array( 'topthink/think-queue' => array(
'pretty_version' => 'v3.0.7', 'pretty_version' => 'v3.0.12',
'version' => '3.0.7.0', 'version' => '3.0.12.0',
'reference' => 'cded7616e313f9daa55c0ad0de5791f0d1fb3066', 'reference' => '48adee0298a363f497b8ba07628d5b63cf020868',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../topthink/think-queue', 'install_path' => __DIR__ . '/../topthink/think-queue',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'topthink/think-template' => array( 'topthink/think-template' => array(
'pretty_version' => 'v2.0.8', 'pretty_version' => 'v2.0.10',
'version' => '2.0.8.0', 'version' => '2.0.10.0',
'reference' => 'abfc293f74f9ef5127b5c416310a01fe42e59368', 'reference' => '2b28c9f787c94f6c22312c9fe97dd3d926c03e1c',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../topthink/think-template', 'install_path' => __DIR__ . '/../topthink/think-template',
'aliases' => array(), 'aliases' => array(),
@@ -694,6 +961,15 @@
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'webmozart/assert' => array(
'pretty_version' => '1.12.0',
'version' => '1.12.0.0',
'reference' => '541057574806f942c94662b817a50f63f7345360',
'type' => 'library',
'install_path' => __DIR__ . '/../webmozart/assert',
'aliases' => array(),
'dev_requirement' => false,
),
'wechatpay/wechatpay' => array( 'wechatpay/wechatpay' => array(
'pretty_version' => '1.4.5', 'pretty_version' => '1.4.5',
'version' => '1.4.5.0', 'version' => '1.4.5.0',
@@ -721,5 +997,14 @@
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'yunwuxin/think-cron' => array(
'pretty_version' => 'v3.0.8',
'version' => '3.0.8.0',
'reference' => 'e2a06c3ae05b618105448fe84a81685a4f0b1b86',
'type' => 'library',
'install_path' => __DIR__ . '/../yunwuxin/think-cron',
'aliases' => array(),
'dev_requirement' => false,
),
), ),
); );

View File

@@ -0,0 +1,19 @@
Copyright (c) 2020-2021 Doctrine Project
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,218 @@
# Doctrine Deprecations
A small (side-effect free by default) layer on top of
`trigger_error(E_USER_DEPRECATED)` or PSR-3 logging.
- no side-effects by default, making it a perfect fit for libraries that don't know how the error handler works they operate under
- options to avoid having to rely on error handlers global state by using PSR-3 logging
- deduplicate deprecation messages to avoid excessive triggering and reduce overhead
We recommend to collect Deprecations using a PSR logger instead of relying on
the global error handler.
## Usage from consumer perspective:
Enable Doctrine deprecations to be sent to a PSR3 logger:
```php
\Doctrine\Deprecations\Deprecation::enableWithPsrLogger($logger);
```
Enable Doctrine deprecations to be sent as `@trigger_error($message, E_USER_DEPRECATED)`
messages by setting the `DOCTRINE_DEPRECATIONS` environment variable to `trigger`.
Alternatively, call:
```php
\Doctrine\Deprecations\Deprecation::enableWithTriggerError();
```
If you only want to enable deprecation tracking, without logging or calling `trigger_error`
then set the `DOCTRINE_DEPRECATIONS` environment variable to `track`.
Alternatively, call:
```php
\Doctrine\Deprecations\Deprecation::enableTrackingDeprecations();
```
Tracking is enabled with all three modes and provides access to all triggered
deprecations and their individual count:
```php
$deprecations = \Doctrine\Deprecations\Deprecation::getTriggeredDeprecations();
foreach ($deprecations as $identifier => $count) {
echo $identifier . " was triggered " . $count . " times\n";
}
```
### Suppressing Specific Deprecations
Disable triggering about specific deprecations:
```php
\Doctrine\Deprecations\Deprecation::ignoreDeprecations("https://link/to/deprecations-description-identifier");
```
Disable all deprecations from a package
```php
\Doctrine\Deprecations\Deprecation::ignorePackage("doctrine/orm");
```
### Other Operations
When used within PHPUnit or other tools that could collect multiple instances of the same deprecations
the deduplication can be disabled:
```php
\Doctrine\Deprecations\Deprecation::withoutDeduplication();
```
Disable deprecation tracking again:
```php
\Doctrine\Deprecations\Deprecation::disable();
```
## Usage from a library/producer perspective:
When you want to unconditionally trigger a deprecation even when called
from the library itself then the `trigger` method is the way to go:
```php
\Doctrine\Deprecations\Deprecation::trigger(
"doctrine/orm",
"https://link/to/deprecations-description",
"message"
);
```
If variable arguments are provided at the end, they are used with `sprintf` on
the message.
```php
\Doctrine\Deprecations\Deprecation::trigger(
"doctrine/orm",
"https://github.com/doctrine/orm/issue/1234",
"message %s %d",
"foo",
1234
);
```
When you want to trigger a deprecation only when it is called by a function
outside of the current package, but not trigger when the package itself is the cause,
then use:
```php
\Doctrine\Deprecations\Deprecation::triggerIfCalledFromOutside(
"doctrine/orm",
"https://link/to/deprecations-description",
"message"
);
```
Based on the issue link each deprecation message is only triggered once per
request.
A limited stacktrace is included in the deprecation message to find the
offending location.
Note: A producer/library should never call `Deprecation::enableWith` methods
and leave the decision how to handle deprecations to application and
frameworks.
## Usage in PHPUnit tests
There is a `VerifyDeprecations` trait that you can use to make assertions on
the occurrence of deprecations within a test.
```php
use Doctrine\Deprecations\PHPUnit\VerifyDeprecations;
class MyTest extends TestCase
{
use VerifyDeprecations;
public function testSomethingDeprecation()
{
$this->expectDeprecationWithIdentifier('https://github.com/doctrine/orm/issue/1234');
triggerTheCodeWithDeprecation();
}
public function testSomethingDeprecationFixed()
{
$this->expectNoDeprecationWithIdentifier('https://github.com/doctrine/orm/issue/1234');
triggerTheCodeWithoutDeprecation();
}
}
```
## Displaying deprecations after running a PHPUnit test suite
It is possible to integrate this library with PHPUnit to display all
deprecations triggered during the test suite execution.
```xml
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
bootstrap="vendor/autoload.php"
displayDetailsOnTestsThatTriggerDeprecations="true"
failOnDeprecation="true"
>
<!-- one attribute to display the deprecations, the other to fail the test suite -->
<php>
<!-- ensures native PHP deprecations are used -->
<server name="DOCTRINE_DEPRECATIONS" value="trigger"/>
</php>
<!-- ensures the @ operator in @trigger_error is ignored -->
<source ignoreSuppressionOfDeprecations="true">
<include>
<directory>src</directory>
</include>
</source>
</phpunit>
```
Note that you can still trigger Deprecations in your code, provided you use the
`#[WithoutErrorHandler]` attribute to disable PHPUnit's error handler for tests
that call it. Be wary that this will disable all error handling, meaning it
will mask any warnings or errors that would otherwise be caught by PHPUnit.
At the moment, it is not possible to disable deduplication with an environment
variable, but you can use a bootstrap file to achieve that:
```php
// tests/bootstrap.php
<?php
declare(strict_types=1);
require dirname(__DIR__) . '/vendor/autoload.php';
use Doctrine\Deprecations\Deprecation;
Deprecation::withoutDeduplication();
```
Then, reference that file in your PHPUnit configuration:
```xml
<phpunit
bootstrap="tests/bootstrap.php"
>
</phpunit>
```
## What is a deprecation identifier?
An identifier for deprecations is just a link to any resource, most often a
Github Issue or Pull Request explaining the deprecation and potentially its
alternative.

View File

@@ -0,0 +1,39 @@
{
"name": "doctrine/deprecations",
"description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.",
"license": "MIT",
"type": "library",
"homepage": "https://www.doctrine-project.org/",
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^9 || ^12 || ^13",
"phpstan/phpstan": "1.4.10 || 2.1.11",
"phpstan/phpstan-phpunit": "^1.0 || ^2",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12",
"psr/log": "^1 || ^2 || ^3"
},
"conflict": {
"phpunit/phpunit": "<=7.5 || >=13"
},
"suggest": {
"psr/log": "Allows logging deprecations via PSR-3 logger implementation"
},
"autoload": {
"psr-4": {
"Doctrine\\Deprecations\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"DeprecationTests\\": "test_fixtures/src",
"Doctrine\\Foo\\": "test_fixtures/vendor/doctrine/foo"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}

View File

@@ -0,0 +1,309 @@
<?php
declare(strict_types=1);
namespace Doctrine\Deprecations;
use Psr\Log\LoggerInterface;
use function array_key_exists;
use function array_reduce;
use function assert;
use function debug_backtrace;
use function sprintf;
use function str_replace;
use function strpos;
use function strrpos;
use function substr;
use function trigger_error;
use const DEBUG_BACKTRACE_IGNORE_ARGS;
use const DIRECTORY_SEPARATOR;
use const E_USER_DEPRECATED;
/**
* Manages Deprecation logging in different ways.
*
* By default triggered exceptions are not logged.
*
* To enable different deprecation logging mechanisms you can call the
* following methods:
*
* - Minimal collection of deprecations via getTriggeredDeprecations()
* \Doctrine\Deprecations\Deprecation::enableTrackingDeprecations();
*
* - Uses @trigger_error with E_USER_DEPRECATED
* \Doctrine\Deprecations\Deprecation::enableWithTriggerError();
*
* - Sends deprecation messages via a PSR-3 logger
* \Doctrine\Deprecations\Deprecation::enableWithPsrLogger($logger);
*
* Packages that trigger deprecations should use the `trigger()` or
* `triggerIfCalledFromOutside()` methods.
*/
class Deprecation
{
private const TYPE_NONE = 0;
private const TYPE_TRACK_DEPRECATIONS = 1;
private const TYPE_TRIGGER_ERROR = 2;
private const TYPE_PSR_LOGGER = 4;
/** @var int-mask-of<self::TYPE_*>|null */
private static $type;
/** @var LoggerInterface|null */
private static $logger;
/** @var array<string,bool> */
private static $ignoredPackages = [];
/** @var array<string,int> */
private static $triggeredDeprecations = [];
/** @var array<string,bool> */
private static $ignoredLinks = [];
/** @var bool */
private static $deduplication = true;
/**
* Trigger a deprecation for the given package and identfier.
*
* The link should point to a Github issue or Wiki entry detailing the
* deprecation. It is additionally used to de-duplicate the trigger of the
* same deprecation during a request.
*
* @param float|int|string $args
*/
public static function trigger(string $package, string $link, string $message, ...$args): void
{
$type = self::$type ?? self::getTypeFromEnv();
if ($type === self::TYPE_NONE) {
return;
}
if (isset(self::$ignoredLinks[$link])) {
return;
}
if (array_key_exists($link, self::$triggeredDeprecations)) {
self::$triggeredDeprecations[$link]++;
} else {
self::$triggeredDeprecations[$link] = 1;
}
if (self::$deduplication === true && self::$triggeredDeprecations[$link] > 1) {
return;
}
if (isset(self::$ignoredPackages[$package])) {
return;
}
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
$message = sprintf($message, ...$args);
self::delegateTriggerToBackend($message, $backtrace, $link, $package);
}
/**
* Trigger a deprecation for the given package and identifier when called from outside.
*
* "Outside" means we assume that $package is currently installed as a
* dependency and the caller is not a file in that package. When $package
* is installed as a root package then deprecations triggered from the
* tests folder are also considered "outside".
*
* This deprecation method assumes that you are using Composer to install
* the dependency and are using the default /vendor/ folder and not a
* Composer plugin to change the install location. The assumption is also
* that $package is the exact composer packge name.
*
* Compared to {@link trigger()} this method causes some overhead when
* deprecation tracking is enabled even during deduplication, because it
* needs to call {@link debug_backtrace()}
*
* @param float|int|string $args
*/
public static function triggerIfCalledFromOutside(string $package, string $link, string $message, ...$args): void
{
$type = self::$type ?? self::getTypeFromEnv();
if ($type === self::TYPE_NONE) {
return;
}
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
// first check that the caller is not from a tests folder, in which case we always let deprecations pass
if (isset($backtrace[1]['file'], $backtrace[0]['file']) && strpos($backtrace[1]['file'], DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR) === false) {
$path = DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, $package) . DIRECTORY_SEPARATOR;
if (strpos($backtrace[0]['file'], $path) === false) {
return;
}
if (strpos($backtrace[1]['file'], $path) !== false) {
return;
}
}
if (isset(self::$ignoredLinks[$link])) {
return;
}
if (array_key_exists($link, self::$triggeredDeprecations)) {
self::$triggeredDeprecations[$link]++;
} else {
self::$triggeredDeprecations[$link] = 1;
}
if (self::$deduplication === true && self::$triggeredDeprecations[$link] > 1) {
return;
}
if (isset(self::$ignoredPackages[$package])) {
return;
}
$message = sprintf($message, ...$args);
self::delegateTriggerToBackend($message, $backtrace, $link, $package);
}
/** @param list<array{function: string, line?: int, file?: string, class?: class-string, type?: string, args?: mixed[], object?: object}> $backtrace */
private static function delegateTriggerToBackend(string $message, array $backtrace, string $link, string $package): void
{
$type = self::$type ?? self::getTypeFromEnv();
if (($type & self::TYPE_PSR_LOGGER) > 0) {
$context = [
'file' => $backtrace[0]['file'] ?? null,
'line' => $backtrace[0]['line'] ?? null,
'package' => $package,
'link' => $link,
];
assert(self::$logger !== null);
self::$logger->notice($message, $context);
}
if (! (($type & self::TYPE_TRIGGER_ERROR) > 0)) {
return;
}
$message .= sprintf(
' (%s:%d called by %s:%d, %s, package %s)',
self::basename($backtrace[0]['file'] ?? 'native code'),
$backtrace[0]['line'] ?? 0,
self::basename($backtrace[1]['file'] ?? 'native code'),
$backtrace[1]['line'] ?? 0,
$link,
$package
);
@trigger_error($message, E_USER_DEPRECATED);
}
/**
* A non-local-aware version of PHPs basename function.
*/
private static function basename(string $filename): string
{
$pos = strrpos($filename, DIRECTORY_SEPARATOR);
if ($pos === false) {
return $filename;
}
return substr($filename, $pos + 1);
}
public static function enableTrackingDeprecations(): void
{
self::$type = self::$type ?? self::getTypeFromEnv();
self::$type |= self::TYPE_TRACK_DEPRECATIONS;
}
public static function enableWithTriggerError(): void
{
self::$type = self::$type ?? self::getTypeFromEnv();
self::$type |= self::TYPE_TRIGGER_ERROR;
}
public static function enableWithPsrLogger(LoggerInterface $logger): void
{
self::$type = self::$type ?? self::getTypeFromEnv();
self::$type |= self::TYPE_PSR_LOGGER;
self::$logger = $logger;
}
public static function withoutDeduplication(): void
{
self::$deduplication = false;
}
public static function disable(): void
{
self::$type = self::TYPE_NONE;
self::$logger = null;
self::$deduplication = true;
self::$ignoredLinks = [];
foreach (self::$triggeredDeprecations as $link => $count) {
self::$triggeredDeprecations[$link] = 0;
}
}
public static function ignorePackage(string $packageName): void
{
self::$ignoredPackages[$packageName] = true;
}
public static function ignoreDeprecations(string ...$links): void
{
foreach ($links as $link) {
self::$ignoredLinks[$link] = true;
}
}
public static function getUniqueTriggeredDeprecationsCount(): int
{
return array_reduce(self::$triggeredDeprecations, static function (int $carry, int $count) {
return $carry + $count;
}, 0);
}
/**
* Returns each triggered deprecation link identifier and the amount of occurrences.
*
* @return array<string,int>
*/
public static function getTriggeredDeprecations(): array
{
return self::$triggeredDeprecations;
}
/** @return int-mask-of<self::TYPE_*> */
private static function getTypeFromEnv(): int
{
switch ($_SERVER['DOCTRINE_DEPRECATIONS'] ?? $_ENV['DOCTRINE_DEPRECATIONS'] ?? null) {
case 'trigger':
self::$type = self::TYPE_TRIGGER_ERROR;
break;
case 'track':
self::$type = self::TYPE_TRACK_DEPRECATIONS;
break;
default:
self::$type = self::TYPE_NONE;
break;
}
return self::$type;
}
}

View File

@@ -0,0 +1,66 @@
<?php
declare(strict_types=1);
namespace Doctrine\Deprecations\PHPUnit;
use Doctrine\Deprecations\Deprecation;
use PHPUnit\Framework\Attributes\After;
use PHPUnit\Framework\Attributes\Before;
use function sprintf;
trait VerifyDeprecations
{
/** @var array<string,int> */
private $doctrineDeprecationsExpectations = [];
/** @var array<string,int> */
private $doctrineNoDeprecationsExpectations = [];
public function expectDeprecationWithIdentifier(string $identifier): void
{
$this->doctrineDeprecationsExpectations[$identifier] = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0;
}
public function expectNoDeprecationWithIdentifier(string $identifier): void
{
$this->doctrineNoDeprecationsExpectations[$identifier] = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0;
}
/** @before */
#[Before]
public function enableDeprecationTracking(): void
{
Deprecation::enableTrackingDeprecations();
}
/** @after */
#[After]
public function verifyDeprecationsAreTriggered(): void
{
foreach ($this->doctrineDeprecationsExpectations as $identifier => $expectation) {
$actualCount = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0;
$this->assertTrue(
$actualCount > $expectation,
sprintf(
"Expected deprecation with identifier '%s' was not triggered by code executed in test.",
$identifier
)
);
}
foreach ($this->doctrineNoDeprecationsExpectations as $identifier => $expectation) {
$actualCount = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0;
$this->assertTrue(
$actualCount === $expectation,
sprintf(
"Expected deprecation with identifier '%s' was triggered by code executed in test, but expected not to.",
$identifier
)
);
}
}
}

View File

@@ -0,0 +1,47 @@
{
"active": true,
"name": "Instantiator",
"slug": "instantiator",
"docsSlug": "doctrine-instantiator",
"codePath": "/src",
"versions": [
{
"name": "1.5",
"branchName": "1.5.x",
"slug": "latest",
"upcoming": true
},
{
"name": "1.4",
"branchName": "1.4.x",
"slug": "1.4",
"aliases": [
"current",
"stable"
],
"maintained": true,
"current": true
},
{
"name": "1.3",
"branchName": "1.3.x",
"slug": "1.3",
"maintained": false
},
{
"name": "1.2",
"branchName": "1.2.x",
"slug": "1.2"
},
{
"name": "1.1",
"branchName": "1.1.x",
"slug": "1.1"
},
{
"name": "1.0",
"branchName": "1.0.x",
"slug": "1.0"
}
]
}

View File

@@ -0,0 +1,35 @@
# Contributing
* Follow the [Doctrine Coding Standard](https://github.com/doctrine/coding-standard)
* The project will follow strict [object calisthenics](http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php)
* Any contribution must provide tests for additional introduced conditions
* Any un-confirmed issue needs a failing test case before being accepted
* Pull requests must be sent from a new hotfix/feature branch, not from `master`.
## Installation
To install the project and run the tests, you need to clone it first:
```sh
$ git clone git://github.com/doctrine/instantiator.git
```
You will then need to run a composer installation:
```sh
$ cd Instantiator
$ curl -s https://getcomposer.org/installer | php
$ php composer.phar update
```
## Testing
The PHPUnit version to be used is the one installed as a dev- dependency via composer:
```sh
$ ./vendor/bin/phpunit
```
Accepted coverage for new contributions is 80%. Any contribution not satisfying this requirement
won't be merged.

View File

@@ -0,0 +1,19 @@
Copyright (c) 2014 Doctrine Project
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,38 @@
# Instantiator
This library provides a way of avoiding usage of constructors when instantiating PHP classes.
[![Build Status](https://travis-ci.org/doctrine/instantiator.svg?branch=master)](https://travis-ci.org/doctrine/instantiator)
[![Code Coverage](https://codecov.io/gh/doctrine/instantiator/branch/master/graph/badge.svg)](https://codecov.io/gh/doctrine/instantiator/branch/master)
[![Dependency Status](https://www.versioneye.com/package/php--doctrine--instantiator/badge.svg)](https://www.versioneye.com/package/php--doctrine--instantiator)
[![Latest Stable Version](https://poser.pugx.org/doctrine/instantiator/v/stable.png)](https://packagist.org/packages/doctrine/instantiator)
[![Latest Unstable Version](https://poser.pugx.org/doctrine/instantiator/v/unstable.png)](https://packagist.org/packages/doctrine/instantiator)
## Installation
The suggested installation method is via [composer](https://getcomposer.org/):
```sh
composer require doctrine/instantiator
```
## Usage
The instantiator is able to create new instances of any class without using the constructor or any API of the class
itself:
```php
$instantiator = new \Doctrine\Instantiator\Instantiator();
$instance = $instantiator->instantiate(\My\ClassName\Here::class);
```
## Contributing
Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out!
## Credits
This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which
has been donated to the doctrine organization, and which is now deprecated in favour of this package.

View File

@@ -0,0 +1,48 @@
{
"name": "doctrine/instantiator",
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
"type": "library",
"license": "MIT",
"homepage": "https://www.doctrine-project.org/projects/instantiator.html",
"keywords": [
"instantiate",
"constructor"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com",
"homepage": "https://ocramius.github.io/"
}
],
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"ext-phar": "*",
"ext-pdo": "*",
"doctrine/coding-standard": "^9 || ^11",
"phpbench/phpbench": "^0.16 || ^1",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-phpunit": "^1",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"vimeo/psalm": "^4.30 || ^5.4"
},
"autoload": {
"psr-4": {
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
}
},
"autoload-dev": {
"psr-0": {
"DoctrineTest\\InstantiatorPerformance\\": "tests",
"DoctrineTest\\InstantiatorTest\\": "tests",
"DoctrineTest\\InstantiatorTestAsset\\": "tests"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}

View File

@@ -0,0 +1,68 @@
Introduction
============
This library provides a way of avoiding usage of constructors when instantiating PHP classes.
Installation
============
The suggested installation method is via `composer`_:
.. code-block:: console
$ composer require doctrine/instantiator
Usage
=====
The instantiator is able to create new instances of any class without
using the constructor or any API of the class itself:
.. code-block:: php
<?php
use Doctrine\Instantiator\Instantiator;
use App\Entities\User;
$instantiator = new Instantiator();
$user = $instantiator->instantiate(User::class);
Contributing
============
- Follow the `Doctrine Coding Standard`_
- The project will follow strict `object calisthenics`_
- Any contribution must provide tests for additional introduced
conditions
- Any un-confirmed issue needs a failing test case before being
accepted
- Pull requests must be sent from a new hotfix/feature branch, not from
``master``.
Testing
=======
The PHPUnit version to be used is the one installed as a dev- dependency
via composer:
.. code-block:: console
$ ./vendor/bin/phpunit
Accepted coverage for new contributions is 80%. Any contribution not
satisfying this requirement wont be merged.
Credits
=======
This library was migrated from `ocramius/instantiator`_, which has been
donated to the doctrine organization, and which is now deprecated in
favour of this package.
.. _composer: https://getcomposer.org/
.. _CONTRIBUTING.md: CONTRIBUTING.md
.. _ocramius/instantiator: https://github.com/Ocramius/Instantiator
.. _Doctrine Coding Standard: https://github.com/doctrine/coding-standard
.. _object calisthenics: http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php

View File

@@ -0,0 +1,4 @@
.. toctree::
:depth: 3
index

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