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

@@ -42,7 +42,8 @@
}, },
"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,5 +1,27 @@
# ChangeLog - Aliyun OSS SDK for PHP # ChangeLog - Aliyun OSS SDK for PHP
## v2.7.2 / 2024-10-28
* Added: presign supports response-* parameters
* Added: forcePathStyle option.
## v2.7.1 / 2024-02-28
* Fixed: fix deprecated
## v2.7.0 / 2024-02-02
* Added: support signature version 4.
* Added: support checkObjectEndcoding option.
* Added: support strictObjectName option.
* Added: support filePathCompatible option.
* Added: support path style.
* Added: support environment variables credentials provider.
* Update: add filed for some api.
* Fixed: fix some bugs.
## v2.6.0 / 2022-08-03
* Added: support credentials provider.
* Fixed: compatible with swoole curl handler.
* Added: support more bucket stat info.
## v2.5.0 / 2022-05-13 ## v2.5.0 / 2022-05-13
* Added: support bucket transfer acceleration. * Added: support bucket transfer acceleration.
* Added: support bucket cname token. * Added: support bucket cname token.

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

@@ -227,30 +227,47 @@ function listObjects($ossClient, $bucket)
); );
try { try {
$listObjectInfo = $ossClient->listObjects($bucket, $options); $listObjectInfo = $ossClient->listObjects($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("Marker: %s". "\n",$listObjectInfo->getMarker());
return; printf("Next Marker: %s". "\n",$listObjectInfo->getNextMarker());
} printf("Max Keys: %s". "\n",$listObjectInfo->getMaxKeys());
print(__FUNCTION__ . ": OK" . "\n"); printf("Delimiter: %s". "\n",$listObjectInfo->getDelimiter());
printf("Is Truncated: %s". "\n",$listObjectInfo->getIsTruncated());
$objectList = $listObjectInfo->getObjectList(); // object list $objectList = $listObjectInfo->getObjectList(); // object list
$prefixList = $listObjectInfo->getPrefixList(); // directory list $prefixList = $listObjectInfo->getPrefixList(); // directory list
if (!empty($objectList)) { if (!empty($objectList)) {
print("objectList:\n"); print("objectList:\n");
foreach ($objectList as $objectInfo) { foreach ($objectList as $objectInfo) {
print($objectInfo->getKey() . "\n"); printf("Object Name: %s". "\n",$objectInfo->getKey());
if($objectInfo->getOwner() != null){ printf("Object Size: %s". "\n",$objectInfo->getSize());
printf("owner id:".$objectInfo->getOwner()->getId() . "\n"); printf("Object Type: %s". "\n",$objectInfo->getType());
printf("owner name:".$objectInfo->getOwner()->getDisplayName() . "\n"); 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)) { if (!empty($prefixList)) {
print("prefixList: \n"); print("prefixList: \n");
foreach ($prefixList as $prefixInfo) { foreach ($prefixList as $prefixInfo) {
print($prefixInfo->getPrefix() . "\n"); printf("Common Prefix:%s\n",$prefixInfo->getPrefix());
} }
} }
} catch (OssException $e) {
printf(__FUNCTION__ . ": FAILED\n");
printf($e->getMessage() . "\n");
return;
}
print(__FUNCTION__ . ": OK" . "\n");
} }
/** /**
@@ -276,30 +293,49 @@ function listObjectsV2($ossClient, $bucket)
); );
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());
printf("Delimiter: %s". "\n",$listObjectInfo->getDelimiter());
printf("Is Truncated: %s". "\n",$listObjectInfo->getIsTruncated());
printf("Start After: %s". "\n",$listObjectInfo->getStartAfter());
$objectList = $listObjectInfo->getObjectList(); // object list $objectList = $listObjectInfo->getObjectList(); // object list
$prefixList = $listObjectInfo->getPrefixList(); // directory list $prefixList = $listObjectInfo->getPrefixList(); // directory list
if (!empty($objectList)) { if (!empty($objectList)) {
print("objectList:\n"); print("objectList:\n");
foreach ($objectList as $objectInfo) { foreach ($objectList as $objectInfo) {
print($objectInfo->getKey() . "\n"); printf("Object Name: %s". "\n",$objectInfo->getKey());
if($objectInfo->getOwner() != null){ printf("Object Size: %s". "\n",$objectInfo->getSize());
printf("owner id:".$objectInfo->getOwner()->getId() . "\n"); printf("Object Type: %s". "\n",$objectInfo->getType());
printf("owner name:".$objectInfo->getOwner()->getDisplayName() . "\n"); 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)) { if (!empty($prefixList)) {
print("prefixList: \n"); print("prefixList: \n");
foreach ($prefixList as $prefixInfo) { foreach ($prefixList as $prefixInfo) {
print($prefixInfo->getPrefix() . "\n"); printf("Common Prefix:%s\n",$prefixInfo->getPrefix());
} }
} }
} catch (OssException $e) {
printf(__FUNCTION__ . ": FAILED\n");
printf($e->getMessage() . "\n");
return;
}
print(__FUNCTION__ . ": OK" . "\n");
} }
/** /**

View File

@@ -193,7 +193,6 @@ class OssUtil
* *
* @param array $options * @param array $options
* @throws OssException * @throws OssException
* @return boolean
*/ */
public static function validateOptions($options) public static function validateOptions($options)
{ {
@@ -372,7 +371,8 @@ BBB;
* Get the host:port from endpoint. * Get the host:port from endpoint.
* *
* @param string $endpoint the endpoint. * @param string $endpoint the endpoint.
* @return boolean * @return string
* @throws OssException
*/ */
public static function getHostPortFromEndpoint($endpoint) public static function getHostPortFromEndpoint($endpoint)
{ {
@@ -531,4 +531,13 @@ BBB;
throw new OssException("Unrecognized encoding type: " . $encoding); throw new OssException("Unrecognized encoding type: " . $encoding);
} }
} }
public static function unparseUrl($parsed_url) {
$scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : '';
$host = isset($parsed_url['host']) ? $parsed_url['host'] : '';
$port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : '';
$path = isset($parsed_url['path']) ? $parsed_url['path'] : '';
$query = isset($parsed_url['query']) ? '?' . $parsed_url['query'] : '';
return "$scheme$host$port$path$query";
}
} }

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,7 +18,8 @@ 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()
{ {

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()
{ {
@@ -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 '';
} }
$flag = false;
try {
$xml = simplexml_load_string($body); $xml = simplexml_load_string($body);
if (isset($xml->Message)) { if (isset($xml->Message)) {
return strval($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 '';
} }
$flag = false;
try {
$xml = simplexml_load_string($body); $xml = simplexml_load_string($body);
if (isset($xml->Code)) { if (isset($xml->Code)) {
return strval($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()
{ {
try {
$this->client->addBucketCname($this->bucketName, 'www.baidu.com'); $this->client->addBucketCname($this->bucketName, 'www.baidu.com');
$this->client->addBucketCname($this->bucketName, 'www.qq.com'); } catch (OssException $e) {
print_r($e->getMessage());
$ret = $this->client->getBucketCname($this->bucketName); $this->assertTrue(true);
$this->assertEquals(2, count($ret->getCnames())); }
// add another 2 cnames try {
$this->client->addBucketCname($this->bucketName, 'www.sina.com.cn'); $ret = $this->client->getBucketCname($this->bucketName);
$this->client->addBucketCname($this->bucketName, 'www.iqiyi.com'); $this->assertEquals(0, count($ret->getCnames()));
} catch (OssException $e) {
$ret = $this->client->getBucketCname($this->bucketName); $this->assertTrue(false);
$cnames = $ret->getCnames();
$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);
}
try {
$ret = $this->client->getBucketCname($this->bucketName); $ret = $this->client->getBucketCname($this->bucketName);
$this->assertEquals(2, count($ret->getCnames())); $this->assertEquals(0, count($ret->getCnames()));
} catch (OssException $e) {
// delete one cname $this->assertTrue(false);
$this->client->deleteBucketCname($this->bucketName, 'www.baidu.com'); }
$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
{ {
try {
$this->client = Common::getOssClient(); $this->client = Common::getOssClient();
$this->bucketName = 'php-sdk-test-rtmp-bucket-name-' . strval(rand(0, 10000)); $this->bucketName = 'php-sdk-test-rtmp-bucket-name-' . strval(rand(0, 10000));
$this->client->createBucket($this->bucketName); $this->client->createBucket($this->bucketName);
Common::waitMetaSync(); Common::waitMetaSync();
}catch(\Exception $e) {
}
} }
protected function tearDown(): void protected function tearDown(): void

View File

@@ -64,7 +64,6 @@ class CallbackTest extends TestOssClientBase
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);
} }
@@ -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,11 +10,24 @@ 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>
<LiveChannelCount>4</LiveChannelCount>
<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> </BucketStat>
BBBB; BBBB;
@@ -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

@@ -42,35 +42,8 @@ BBBB;
</ListAllMyBucketsResult> </ListAllMyBucketsResult>
BBBB; BBBB;
public function testParseValidXml()
{
$response = new ResponseCore(array(), $this->validXml, 200);
$result = new ListBucketsResult($response);
$this->assertTrue($result->isOK());
$this->assertNotNull($result->getData());
$this->assertNotNull($result->getRawResponse());
$bucketListInfo = $result->getData();
$this->assertEquals(2, count($bucketListInfo->getBucketList()));
}
public function testParseNullXml() private $errorBody = <<< BBBB
{
$response = new ResponseCore(array(), $this->nullXml, 200);
$result = new ListBucketsResult($response);
$this->assertTrue($result->isOK());
$this->assertNotNull($result->getData());
$this->assertNotNull($result->getRawResponse());
$bucketListInfo = $result->getData();
$this->assertEquals(0, count($bucketListInfo->getBucketList()));
}
public function test403()
{
$errorHeader = array(
'x-oss-request-id' => '1a2b-3c4d'
);
$errorBody = <<< BBBB
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Error> <Error>
<Code>NoSuchBucket</Code> <Code>NoSuchBucket</Code>
@@ -80,24 +53,8 @@ BBBB;
<BucketName>hello</BucketName> <BucketName>hello</BucketName>
</Error> </Error>
BBBB; BBBB;
$response = new ResponseCore($errorHeader, $errorBody, 403);
try {
new ListBucketsResult($response);
} catch (OssException $e) {
$this->assertEquals(
$e->getMessage(),
'NoSuchBucket: The specified bucket does not exist. RequestId: 1a2b-3c4d');
$this->assertEquals($e->getHTTPStatus(), '403');
$this->assertEquals($e->getRequestId(), '1a2b-3c4d');
$this->assertEquals($e->getErrorCode(), 'NoSuchBucket');
$this->assertEquals($e->getErrorMessage(), 'The specified bucket does not exist.');
$this->assertEquals($e->getDetails(), $errorBody);
}
}
public function testParseXml2() private $xml = <<<BBBB
{
$xml = <<<BBBB
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult> <ListAllMyBucketsResult>
<Owner> <Owner>
@@ -132,7 +89,51 @@ BBBB;
</ListAllMyBucketsResult> </ListAllMyBucketsResult>
BBBB; BBBB;
$response = new ResponseCore(array(), $xml, 200); public function testParseValidXml()
{
$response = new ResponseCore(array(), $this->validXml, 200);
$result = new ListBucketsResult($response);
$this->assertTrue($result->isOK());
$this->assertNotNull($result->getData());
$this->assertNotNull($result->getRawResponse());
$bucketListInfo = $result->getData();
$this->assertEquals(2, count($bucketListInfo->getBucketList()));
}
public function testParseNullXml()
{
$response = new ResponseCore(array(), $this->nullXml, 200);
$result = new ListBucketsResult($response);
$this->assertTrue($result->isOK());
$this->assertNotNull($result->getData());
$this->assertNotNull($result->getRawResponse());
$bucketListInfo = $result->getData();
$this->assertEquals(0, count($bucketListInfo->getBucketList()));
}
public function test403()
{
$errorHeader = array(
'x-oss-request-id' => '1a2b-3c4d'
);
$response = new ResponseCore($errorHeader, $this->errorBody, 403);
try {
new ListBucketsResult($response);
} catch (OssException $e) {
$this->assertEquals(
$e->getMessage(),
'NoSuchBucket: The specified bucket does not exist. RequestId: 1a2b-3c4d');
$this->assertEquals($e->getHTTPStatus(), '403');
$this->assertEquals($e->getRequestId(), '1a2b-3c4d');
$this->assertEquals($e->getErrorCode(), 'NoSuchBucket');
$this->assertEquals($e->getErrorMessage(), 'The specified bucket does not exist.');
$this->assertEquals($e->getDetails(), $this->errorBody);
}
}
public function testParseXml2()
{
$response = new ResponseCore(array(), $this->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

@@ -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;
@@ -19,8 +20,12 @@ class OssClientBucketPolicyTest extends TestOssClientBase
"oss:GetObject" "oss:GetObject"
], ],
"Effect": "Deny", "Effect": "Deny",
"Principal":["1234567890"], "Principal": [
"Resource":["acs:oss:*:1234567890:*/*"] "1234567890"
],
"Resource": [
"acs:oss:*:1234567890:*/*"
]
} }
] ]
} }
@@ -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;

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);
@@ -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);
} }
} }
@@ -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

@@ -2,6 +2,7 @@
namespace OSS\Tests; namespace OSS\Tests;
use http\Client;
use OSS\Core\OssException; use OSS\Core\OssException;
use OSS\Http\RequestCore; use OSS\Http\RequestCore;
use OSS\Http\ResponseCore; use OSS\Http\ResponseCore;
@@ -12,7 +13,7 @@ require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
class OssClientSignatureTest extends TestOssClientBase class OssClientSignatureTest extends TestOssClientBase
{ {
function testGetSignedUrlForGettingObject() public function testGetSignedUrlForGettingObject()
{ {
$object = "a.file"; $object = "a.file";
$this->ossClient->putObject($this->bucket, $object, file_get_contents(__FILE__)); $this->ossClient->putObject($this->bucket, $object, file_get_contents(__FILE__));
@@ -91,6 +92,52 @@ class OssClientSignatureTest extends TestOssClientBase
$this->assertTrue(false); $this->assertTrue(false);
} }
} }
$object = "?a.file";
$timeout = 3600;
$options = array('Content-Type' => 'txt');
try {
$signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, "PUT", $options);
$this->assertTrue(false);
} catch (OssException $e) {
$this->assertTrue(true);
if (strpos($e, "object name cannot start with `?`") == false)
{
$this->assertTrue(false);
}
}
// Set StrictObjectName false
$object = "?a.file";
$timeout = 3600;
$options = array('Content-Type' => 'txt');
$config = array(
'strictObjectName' => false
);
$ossClient = Common::getOssClient($config);
try {
$signedUrl = $ossClient->signUrl($this->bucket, $object, $timeout, "PUT", $options);
$this->assertTrue(true);
} catch (OssException $e) {
print_r($e->getMessage());
$this->assertFalse(true);
}
// V4
$object = "?a.file";
$timeout = 3600;
$options = array('Content-Type' => 'txt');
$config = array(
'signatureVersion' => OssClient::OSS_SIGNATURE_VERSION_V4
);
$ossClient = Common::getOssClient($config);
try {
$signedUrl = $ossClient->signUrl($this->bucket, $object, $timeout, "PUT", $options);
$this->assertTrue(true);
} catch (OssException $e) {
print_r($e->getMessage());
$this->assertFalse(true);
}
} }
function testGetgenPreSignedUrlForGettingObject() function testGetgenPreSignedUrlForGettingObject()
@@ -131,6 +178,59 @@ class OssClientSignatureTest extends TestOssClientBase
$this->assertTrue(strpos($signedUrl1, 'Expires='.$expiration) !== false); $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 protected function tearDown(): void
{ {
$this->ossClient->deleteObject($this->bucket, "a.file"); $this->ossClient->deleteObject($this->bucket, "a.file");

File diff suppressed because it is too large Load Diff

View File

@@ -3,8 +3,82 @@
namespace OSS\Tests; namespace OSS\Tests;
use OSS\Core\OssException; use OSS\Core\OssException;
use OSS\Credentials\EnvironmentVariableCredentialsProvider;
use OSS\OssClient; use OSS\OssClient;
use OSS\Credentials\Credentials;
use OSS\Credentials\CredentialsProvider;
use OSS\Credentials\StaticCredentialsProvider;
require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
class TestEmptyIdCredentials extends Credentials
{
public function __construct()
{
}
public function getAccessKeyId()
{
return '';
}
public function getAccessKeySecret()
{
return 'secret';
}
public function getSecurityToken()
{
return null;
}
}
class TestEmptySecretCredentials extends Credentials
{
public function __construct()
{
}
public function getAccessKeyId()
{
return 'id';
}
public function getAccessKeySecret()
{
return '';
}
public function getSecurityToken()
{
return null;
}
}
class TestCredentialsProvider implements CredentialsProvider
{
private $credentials;
public function __construct($flag)
{
if ($flag == 2) {
$this->credentials = new TestEmptyIdCredentials();
} else if ($flag == 1) {
$this->credentials = new TestEmptySecretCredentials();
} else {
$this->credentials = null;
}
}
/**
* @return Credentials
*/
public function getCredentials()
{
return $this->credentials;
}
}
class OssClientTest extends TestOssClientBase class OssClientTest extends TestOssClientBase
{ {
@@ -120,7 +194,7 @@ class OssClientTest extends TestOssClientBase
try { try {
$accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' '; $accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; $endpoint = ' ' . Common::getEndpoint() . '/ ';
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false); $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false);
$ossClient->listBuckets(); $ossClient->listBuckets();
$this->assertTrue(true); $this->assertTrue(true);
@@ -164,7 +238,7 @@ class OssClientTest extends TestOssClientBase
try { try {
$accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' '; $accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; $endpoint = ' ' . Common::getEndpoint() . '/ ';
$bucket = $this->bucket; $bucket = $this->bucket;
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false); $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false);
$ossClient->putObject($bucket, 'test_emptybody', ''); $ossClient->putObject($bucket, 'test_emptybody', '');
@@ -176,7 +250,7 @@ class OssClientTest extends TestOssClientBase
try { try {
$accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' '; $accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; $endpoint = ' ' . Common::getEndpoint() . '/ ';
$bucket = $this->bucket; $bucket = $this->bucket;
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false, "invalid-sts-token"); $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false, "invalid-sts-token");
$ossClient->putObject($bucket, 'test_emptybody', ''); $ossClient->putObject($bucket, 'test_emptybody', '');
@@ -190,7 +264,7 @@ class OssClientTest extends TestOssClientBase
{ {
$accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' '; $accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; $endpoint = ' ' . Common::getEndpoint() . '/ ';
$bucket = $this->bucket; $bucket = $this->bucket;
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false); $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false);
@@ -218,8 +292,8 @@ class OssClientTest extends TestOssClientBase
try { try {
$accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' '; $accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; $endpoint = ' ' . Common::getEndpoint(). '/ ';
$bucket = getenv('OSS_BUCKET'); $bucket = Common::getBucketName();
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false); $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false);
$ossClient->getBucketCors($bucket); $ossClient->getBucketCors($bucket);
$this->assertTrue(true); $this->assertTrue(true);
@@ -233,7 +307,7 @@ class OssClientTest extends TestOssClientBase
try { try {
$accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' '; $accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; $endpoint = ' ' . Common::getEndpoint() . '/ ';
$bucket = $this->bucket; $bucket = $this->bucket;
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false); $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false);
$ossClient->getBucketCname($bucket); $ossClient->getBucketCname($bucket);
@@ -247,8 +321,8 @@ class OssClientTest extends TestOssClientBase
{ {
$accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' '; $accessKeyId = ' ' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; $endpoint = ' ' . Common::getEndpoint() . '/ ';
$bucket = getenv('OSS_BUCKET') . '-proxy'; $bucket = Common::getBucketName() . '-proxy';
$requestProxy = getenv('OSS_PROXY'); $requestProxy = getenv('OSS_PROXY');
$key = 'test-proxy-srv-object'; $key = 'test-proxy-srv-object';
$content = 'test-content'; $content = 'test-content';
@@ -296,13 +370,13 @@ class OssClientTest extends TestOssClientBase
$accessKeyId = 'sk' . getenv('OSS_ACCESS_KEY_ID') . ' '; $accessKeyId = 'sk' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = '192.168.1.1'; $endpoint = '192.168.1.1';
$bucket = getenv('OSS_BUCKET'); $bucket = Common::getBucketName();
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false); $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false);
$object = "a.file"; $object = "a.file";
$timeout = 3600; $timeout = 3600;
$options = array('Content-Type' => 'txt'); $options = array('Content-Type' => 'txt');
$signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "PUT", $options); $signedUrl = $ossClient->signUrl($bucket, $object, $timeout, "PUT", $options);
$this->assertTrue(strpos($signedUrl, '192.168.1.1/skyranch-php-test/a.file?') != false); $this->assertTrue(strpos($signedUrl, '192.168.1.1/' . $bucket . '/a.file?') != false);
} catch (OssException $e) { } catch (OssException $e) {
$this->assertFalse(true); $this->assertFalse(true);
} }
@@ -314,7 +388,7 @@ class OssClientTest extends TestOssClientBase
$accessKeyId = 'sk' . getenv('OSS_ACCESS_KEY_ID') . ' '; $accessKeyId = 'sk' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = 'cname.endpoint'; $endpoint = 'cname.endpoint';
$bucket = getenv('OSS_BUCKET'); $bucket = Common::getBucketName();
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, true); $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, true);
$object = "a.file"; $object = "a.file";
$timeout = 3600; $timeout = 3600;
@@ -331,8 +405,8 @@ class OssClientTest extends TestOssClientBase
try { try {
$accessKeyId = 'sk' . getenv('OSS_ACCESS_KEY_ID') . ' '; $accessKeyId = 'sk' . getenv('OSS_ACCESS_KEY_ID') . ' ';
$accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' '; $accessKeySecret = ' ' . getenv('OSS_ACCESS_KEY_SECRET') . ' ';
$endpoint = ' ' . getenv('OSS_ENDPOINT') . '/ '; $endpoint = ' ' . Common::getEndpoint() . '/ ';
$bucket = getenv('OSS_BUCKET'); $bucket = Common::getBucketName();
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false, "test-token"); $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint, false, "test-token");
$object = "a.file"; $object = "a.file";
$timeout = 3600; $timeout = 3600;
@@ -343,4 +417,105 @@ class OssClientTest extends TestOssClientBase
$this->assertFalse(true); $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';

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';

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

@@ -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)
{ {
@@ -103,21 +172,24 @@ class ClassLoader
* 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
); );
} }
} }
@@ -148,24 +220,27 @@ class ClassLoader
* 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
); );
} }
} }
@@ -196,7 +271,9 @@ class ClassLoader
* 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)
{ {
@@ -212,9 +289,11 @@ class ClassLoader
* 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;
} }
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
} }
/** /**
* Scope isolated include. * Scope isolated include.
* *
* Prevents access to $this/self from included files. * Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/ */
function includeFile($file) self::$includeFile = \Closure::bind(static function($file) {
{
include $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();
} }
} }
if (self::$installed !== array()) {
$installed[] = self::$installed; $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) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit516d2ac39a060b91610bddcc729d2cf4::getInitializer($loader)); 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;
require $file;
} }
foreach ($includeFiles as $fileIdentifier => $file) { }, null, null);
composerRequire516d2ac39a060b91610bddcc729d2cf4($fileIdentifier, $file); 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

View File

@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<psalm
errorLevel="7"
phpVersion="8.2"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>

View File

@@ -0,0 +1,12 @@
<?php
namespace Doctrine\Instantiator\Exception;
use Throwable;
/**
* Base exception marker interface for the instantiator component
*/
interface ExceptionInterface extends Throwable
{
}

View File

@@ -0,0 +1,50 @@
<?php
namespace Doctrine\Instantiator\Exception;
use InvalidArgumentException as BaseInvalidArgumentException;
use ReflectionClass;
use function interface_exists;
use function sprintf;
use function trait_exists;
/**
* Exception for invalid arguments provided to the instantiator
*/
class InvalidArgumentException extends BaseInvalidArgumentException implements ExceptionInterface
{
public static function fromNonExistingClass(string $className): self
{
if (interface_exists($className)) {
return new self(sprintf('The provided type "%s" is an interface, and cannot be instantiated', $className));
}
if (trait_exists($className)) {
return new self(sprintf('The provided type "%s" is a trait, and cannot be instantiated', $className));
}
return new self(sprintf('The provided class "%s" does not exist', $className));
}
/**
* @phpstan-param ReflectionClass<T> $reflectionClass
*
* @template T of object
*/
public static function fromAbstractClass(ReflectionClass $reflectionClass): self
{
return new self(sprintf(
'The provided class "%s" is abstract, and cannot be instantiated',
$reflectionClass->getName()
));
}
public static function fromEnum(string $className): self
{
return new self(sprintf(
'The provided class "%s" is an enum, and cannot be instantiated',
$className
));
}
}

View File

@@ -0,0 +1,59 @@
<?php
namespace Doctrine\Instantiator\Exception;
use Exception;
use ReflectionClass;
use UnexpectedValueException as BaseUnexpectedValueException;
use function sprintf;
/**
* Exception for given parameters causing invalid/unexpected state on instantiation
*/
class UnexpectedValueException extends BaseUnexpectedValueException implements ExceptionInterface
{
/**
* @phpstan-param ReflectionClass<T> $reflectionClass
*
* @template T of object
*/
public static function fromSerializationTriggeredException(
ReflectionClass $reflectionClass,
Exception $exception
): self {
return new self(
sprintf(
'An exception was raised while trying to instantiate an instance of "%s" via un-serialization',
$reflectionClass->getName()
),
0,
$exception
);
}
/**
* @phpstan-param ReflectionClass<T> $reflectionClass
*
* @template T of object
*/
public static function fromUncleanUnSerialization(
ReflectionClass $reflectionClass,
string $errorString,
int $errorCode,
string $errorFile,
int $errorLine
): self {
return new self(
sprintf(
'Could not produce an instance of "%s" via un-serialization, since an error was triggered '
. 'in file "%s" at line "%d"',
$reflectionClass->getName(),
$errorFile,
$errorLine
),
0,
new Exception($errorString, $errorCode)
);
}
}

View File

@@ -0,0 +1,262 @@
<?php
namespace Doctrine\Instantiator;
use ArrayIterator;
use Doctrine\Instantiator\Exception\ExceptionInterface;
use Doctrine\Instantiator\Exception\InvalidArgumentException;
use Doctrine\Instantiator\Exception\UnexpectedValueException;
use Exception;
use ReflectionClass;
use ReflectionException;
use Serializable;
use function class_exists;
use function enum_exists;
use function is_subclass_of;
use function restore_error_handler;
use function set_error_handler;
use function sprintf;
use function strlen;
use function unserialize;
use const PHP_VERSION_ID;
final class Instantiator implements InstantiatorInterface
{
/**
* Markers used internally by PHP to define whether {@see \unserialize} should invoke
* the method {@see \Serializable::unserialize()} when dealing with classes implementing
* the {@see \Serializable} interface.
*
* @deprecated This constant will be private in 2.0
*/
public const SERIALIZATION_FORMAT_USE_UNSERIALIZER = 'C';
/** @deprecated This constant will be private in 2.0 */
public const SERIALIZATION_FORMAT_AVOID_UNSERIALIZER = 'O';
/**
* Used to instantiate specific classes, indexed by class name.
*
* @var callable[]
*/
private static $cachedInstantiators = [];
/**
* Array of objects that can directly be cloned, indexed by class name.
*
* @var object[]
*/
private static $cachedCloneables = [];
/**
* @param string $className
* @phpstan-param class-string<T> $className
*
* @return object
* @phpstan-return T
*
* @throws ExceptionInterface
*
* @template T of object
*/
public function instantiate($className)
{
if (isset(self::$cachedCloneables[$className])) {
/** @phpstan-var T */
$cachedCloneable = self::$cachedCloneables[$className];
return clone $cachedCloneable;
}
if (isset(self::$cachedInstantiators[$className])) {
$factory = self::$cachedInstantiators[$className];
return $factory();
}
return $this->buildAndCacheFromFactory($className);
}
/**
* Builds the requested object and caches it in static properties for performance
*
* @phpstan-param class-string<T> $className
*
* @return object
* @phpstan-return T
*
* @template T of object
*/
private function buildAndCacheFromFactory(string $className)
{
$factory = self::$cachedInstantiators[$className] = $this->buildFactory($className);
$instance = $factory();
if ($this->isSafeToClone(new ReflectionClass($instance))) {
self::$cachedCloneables[$className] = clone $instance;
}
return $instance;
}
/**
* Builds a callable capable of instantiating the given $className without
* invoking its constructor.
*
* @phpstan-param class-string<T> $className
*
* @phpstan-return callable(): T
*
* @throws InvalidArgumentException
* @throws UnexpectedValueException
* @throws ReflectionException
*
* @template T of object
*/
private function buildFactory(string $className): callable
{
$reflectionClass = $this->getReflectionClass($className);
if ($this->isInstantiableViaReflection($reflectionClass)) {
return [$reflectionClass, 'newInstanceWithoutConstructor'];
}
$serializedString = sprintf(
'%s:%d:"%s":0:{}',
is_subclass_of($className, Serializable::class) ? self::SERIALIZATION_FORMAT_USE_UNSERIALIZER : self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER,
strlen($className),
$className
);
$this->checkIfUnSerializationIsSupported($reflectionClass, $serializedString);
return static function () use ($serializedString) {
return unserialize($serializedString);
};
}
/**
* @phpstan-param class-string<T> $className
*
* @phpstan-return ReflectionClass<T>
*
* @throws InvalidArgumentException
* @throws ReflectionException
*
* @template T of object
*/
private function getReflectionClass(string $className): ReflectionClass
{
if (! class_exists($className)) {
throw InvalidArgumentException::fromNonExistingClass($className);
}
if (PHP_VERSION_ID >= 80100 && enum_exists($className, false)) {
throw InvalidArgumentException::fromEnum($className);
}
$reflection = new ReflectionClass($className);
if ($reflection->isAbstract()) {
throw InvalidArgumentException::fromAbstractClass($reflection);
}
return $reflection;
}
/**
* @phpstan-param ReflectionClass<T> $reflectionClass
*
* @throws UnexpectedValueException
*
* @template T of object
*/
private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, string $serializedString): void
{
set_error_handler(static function (int $code, string $message, string $file, int $line) use ($reflectionClass, &$error): bool {
$error = UnexpectedValueException::fromUncleanUnSerialization(
$reflectionClass,
$message,
$code,
$file,
$line
);
return true;
});
try {
$this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString);
} finally {
restore_error_handler();
}
if ($error) {
throw $error;
}
}
/**
* @phpstan-param ReflectionClass<T> $reflectionClass
*
* @throws UnexpectedValueException
*
* @template T of object
*/
private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, string $serializedString): void
{
try {
unserialize($serializedString);
} catch (Exception $exception) {
throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception);
}
}
/**
* @phpstan-param ReflectionClass<T> $reflectionClass
*
* @template T of object
*/
private function isInstantiableViaReflection(ReflectionClass $reflectionClass): bool
{
return ! ($this->hasInternalAncestors($reflectionClass) && $reflectionClass->isFinal());
}
/**
* Verifies whether the given class is to be considered internal
*
* @phpstan-param ReflectionClass<T> $reflectionClass
*
* @template T of object
*/
private function hasInternalAncestors(ReflectionClass $reflectionClass): bool
{
do {
if ($reflectionClass->isInternal()) {
return true;
}
$reflectionClass = $reflectionClass->getParentClass();
} while ($reflectionClass);
return false;
}
/**
* Checks if a class is cloneable
*
* Classes implementing `__clone` cannot be safely cloned, as that may cause side-effects.
*
* @phpstan-param ReflectionClass<T> $reflectionClass
*
* @template T of object
*/
private function isSafeToClone(ReflectionClass $reflectionClass): bool
{
return $reflectionClass->isCloneable()
&& ! $reflectionClass->hasMethod('__clone')
&& ! $reflectionClass->isSubclassOf(ArrayIterator::class);
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace Doctrine\Instantiator;
use Doctrine\Instantiator\Exception\ExceptionInterface;
/**
* Instantiator provides utility methods to build objects without invoking their constructors
*/
interface InstantiatorInterface
{
/**
* @param string $className
* @phpstan-param class-string<T> $className
*
* @return object
* @phpstan-return T
*
* @throws ExceptionInterface
*
* @template T of object
*/
public function instantiate($className);
}

View File

@@ -1,7 +1,7 @@
PHP Cron Expression Parser PHP Cron Expression Parser
========================== ==========================
[![Latest Stable Version](https://poser.pugx.org/dragonmantank/cron-expression/v/stable.png)](https://packagist.org/packages/dragonmantank/cron-expression) [![Total Downloads](https://poser.pugx.org/dragonmantank/cron-expression/downloads.png)](https://packagist.org/packages/dragonmantank/cron-expression) [![Build Status](https://secure.travis-ci.org/dragonmantank/cron-expression.png)](http://travis-ci.org/dragonmantank/cron-expression) [![StyleCI](https://github.styleci.io/repos/103715337/shield?branch=master)](https://github.styleci.io/repos/103715337) [![Latest Stable Version](https://poser.pugx.org/dragonmantank/cron-expression/v/stable.png)](https://packagist.org/packages/dragonmantank/cron-expression) [![Total Downloads](https://poser.pugx.org/dragonmantank/cron-expression/downloads.png)](https://packagist.org/packages/dragonmantank/cron-expression) [![Tests](https://github.com/dragonmantank/cron-expression/actions/workflows/tests.yml/badge.svg)](https://github.com/dragonmantank/cron-expression/actions/workflows/tests.yml) [![StyleCI](https://github.styleci.io/repos/103715337/shield?branch=master)](https://github.styleci.io/repos/103715337)
The PHP cron expression parser can parse a CRON expression, determine if it is The PHP cron expression parser can parse a CRON expression, determine if it is
due to run, calculate the next run date of the expression, and calculate the previous due to run, calculate the next run date of the expression, and calculate the previous
@@ -55,23 +55,65 @@ CRON Expressions
A CRON expression is a string representing the schedule for a particular command to execute. The parts of a CRON schedule are as follows: A CRON expression is a string representing the schedule for a particular command to execute. The parts of a CRON schedule are as follows:
```
* * * * * * * * * *
- - - - - - - - - -
| | | | | | | | | |
| | | | | | | | | |
| | | | +----- day of week (0 - 7) (Sunday=0 or 7) | | | | +----- day of week (0-7) (Sunday = 0 or 7) (or SUN-SAT)
| | | +---------- month (1 - 12) | | | +--------- month (1-12) (or JAN-DEC)
| | +--------------- day of month (1 - 31) | | +------------- day of month (1-31)
| +-------------------- hour (0 - 23) | +----------------- hour (0-23)
+------------------------- min (0 - 59) +--------------------- minute (0-59)
```
This library also supports a few macros: Each part of expression can also use wildcard, lists, ranges and steps:
* `@yearly`, `@annually` - Run once a year, midnight, Jan. 1 - `0 0 1 1 *` - wildcard - match always
* `@monthly` - Run once a month, midnight, first of month - `0 0 1 * *` - `* * * * *` - At every minute.
* `@weekly` - Run once a week, midnight on Sun - `0 0 * * 0` - day of week and day of month also support `?`, an alias to `*`
* `@daily`, `@midnight` - Run once a day, midnight - `0 0 * * *` - lists - match list of values, ranges and steps
* `@hourly` - Run once an hour, first minute - `0 * * * *` - e.g. `15,30 * * * *` - At minute 15 and 30.
- ranges - match values in range
- e.g. `1-9 * * * *` - At every minute from 1 through 9.
- steps - match every nth value in range
- e.g. `*/5 * * * *` - At every 5th minute.
- e.g. `0-30/5 * * * *` - At every 5th minute from 0 through 30.
- combinations
- e.g. `0-14,30-44 * * * *` - At every minute from 0 through 14 and every minute from 30 through 44.
You can also use macro instead of an expression:
- `@yearly`, `@annually` - At 00:00 on 1st of January. (same as `0 0 1 1 *`)
- `@monthly` - At 00:00 on day-of-month 1. (same as `0 0 1 * *`)
- `@weekly` - At 00:00 on Sunday. (same as `0 0 * * 0`)
- `@daily`, `@midnight` - At 00:00. (same as `0 0 * * *`)
- `@hourly` - At minute 0. (same as `0 * * * *`)
Day of month extra features:
- nearest weekday - weekday (Monday-Friday) nearest to the given day
- e.g. `* * 15W * *` - At every minute on a weekday nearest to the 15th.
- If you were to specify `15W` as the value, the meaning is: "the nearest weekday to the 15th of the month"
So if the 15th is a Saturday, the trigger will fire on Friday the 14th.
If the 15th is a Sunday, the trigger will fire on Monday the 16th.
If the 15th is a Tuesday, then it will fire on Tuesday the 15th.
- However, if you specify `1W` as the value for day-of-month,
and the 1st is a Saturday, the trigger will fire on Monday the 3rd,
as it will not 'jump' over the boundary of a month's days.
- last day of the month
- e.g. `* * L * *` - At every minute on a last day-of-month.
- last weekday of the month
- e.g. `* * LW * *` - At every minute on a last weekday.
Day of week extra features:
- nth day
- e.g. `* * * * 7#4` - At every minute on 4th Sunday.
- 1-5
- Every day of week repeats 4-5 times a month. To target the last one, use "last day" feature instead.
- last day
- e.g. `* * * * 7L` - At every minute on the last Sunday.
Requirements Requirements
============ ============
@@ -85,3 +127,5 @@ Projects that Use cron-expression
* Part of the [Laravel Framework](https://github.com/laravel/framework/) * Part of the [Laravel Framework](https://github.com/laravel/framework/)
* Available as a [Symfony Bundle - setono/cron-expression-bundle](https://github.com/Setono/CronExpressionBundle) * Available as a [Symfony Bundle - setono/cron-expression-bundle](https://github.com/Setono/CronExpressionBundle)
* Framework agnostic, PHP-based job scheduler - [Crunz](https://github.com/crunzphp/crunz) * Framework agnostic, PHP-based job scheduler - [Crunz](https://github.com/crunzphp/crunz)
* Framework agnostic job scheduler - with locks, parallelism, per-second scheduling and more - [orisai/scheduler](https://github.com/orisai/scheduler)
* Explain expression in English (and other languages) with [orisai/cron-expression-explainer](https://github.com/orisai/cron-expression-explainer)

View File

@@ -18,7 +18,6 @@
"require-dev": { "require-dev": {
"phpstan/phpstan": "^1.0", "phpstan/phpstan": "^1.0",
"phpunit/phpunit": "^7.0|^8.0|^9.0", "phpunit/phpunit": "^7.0|^8.0|^9.0",
"phpstan/phpstan-webmozart-assert": "^1.0",
"phpstan/extension-installer": "^1.0" "phpstan/extension-installer": "^1.0"
}, },
"autoload": { "autoload": {
@@ -38,6 +37,11 @@
"phpstan": "./vendor/bin/phpstan analyze", "phpstan": "./vendor/bin/phpstan analyze",
"test": "phpunit" "test": "phpunit"
}, },
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"config": { "config": {
"allow-plugins": { "allow-plugins": {
"ocramius/package-versions": true, "ocramius/package-versions": true,

View File

@@ -12,7 +12,6 @@ use Exception;
use InvalidArgumentException; use InvalidArgumentException;
use LogicException; use LogicException;
use RuntimeException; use RuntimeException;
use Webmozart\Assert\Assert;
/** /**
* CRON expression parser that can determine whether or not a CRON expression is * CRON expression parser that can determine whether or not a CRON expression is
@@ -148,7 +147,7 @@ class CronExpression
/** /**
* @deprecated since version 3.0.2, use __construct instead. * @deprecated since version 3.0.2, use __construct instead.
*/ */
public static function factory(string $expression, FieldFactoryInterface $fieldFactory = null): CronExpression public static function factory(string $expression, ?FieldFactoryInterface $fieldFactory = null): CronExpression
{ {
/** @phpstan-ignore-next-line */ /** @phpstan-ignore-next-line */
return new static($expression, $fieldFactory); return new static($expression, $fieldFactory);
@@ -179,7 +178,7 @@ class CronExpression
* @param null|FieldFactoryInterface $fieldFactory Factory to create cron fields * @param null|FieldFactoryInterface $fieldFactory Factory to create cron fields
* @throws InvalidArgumentException * @throws InvalidArgumentException
*/ */
public function __construct(string $expression, FieldFactoryInterface $fieldFactory = null) public function __construct(string $expression, ?FieldFactoryInterface $fieldFactory = null)
{ {
$shortcut = strtolower($expression); $shortcut = strtolower($expression);
$expression = self::$registeredAliases[$shortcut] ?? $expression; $expression = self::$registeredAliases[$shortcut] ?? $expression;
@@ -200,7 +199,12 @@ class CronExpression
public function setExpression(string $value): CronExpression public function setExpression(string $value): CronExpression
{ {
$split = preg_split('/\s/', $value, -1, PREG_SPLIT_NO_EMPTY); $split = preg_split('/\s/', $value, -1, PREG_SPLIT_NO_EMPTY);
Assert::isArray($split);
if (!\is_array($split)) {
throw new InvalidArgumentException(
$value . ' is not a valid CRON expression'
);
}
$notEnoughParts = \count($split) < 5; $notEnoughParts = \count($split) < 5;
@@ -334,7 +338,10 @@ class CronExpression
$currentTime = new DateTime($currentTime); $currentTime = new DateTime($currentTime);
} }
Assert::isInstanceOf($currentTime, DateTime::class); if (!$currentTime instanceof DateTime) {
throw new InvalidArgumentException('invalid current time');
}
$currentTime->setTimezone(new DateTimeZone($timeZone)); $currentTime->setTimezone(new DateTimeZone($timeZone));
$matches = []; $matches = [];
@@ -420,7 +427,10 @@ class CronExpression
$currentTime = new DateTime($currentTime); $currentTime = new DateTime($currentTime);
} }
Assert::isInstanceOf($currentTime, DateTime::class); if (!$currentTime instanceof DateTime) {
throw new InvalidArgumentException('invalid current time');
}
$currentTime->setTimezone(new DateTimeZone($timeZone)); $currentTime->setTimezone(new DateTimeZone($timeZone));
// drop the seconds to 0 // drop the seconds to 0
@@ -462,7 +472,10 @@ class CronExpression
$currentDate = new DateTime('now'); $currentDate = new DateTime('now');
} }
Assert::isInstanceOf($currentDate, DateTime::class); if (!$currentDate instanceof DateTime) {
throw new InvalidArgumentException('invalid current date');
}
$currentDate->setTimezone(new DateTimeZone($timeZone)); $currentDate->setTimezone(new DateTimeZone($timeZone));
// Workaround for setTime causing an offset change: https://bugs.php.net/bug.php?id=81074 // Workaround for setTime causing an offset change: https://bugs.php.net/bug.php?id=81074
$currentDate = DateTime::createFromFormat("!Y-m-d H:iO", $currentDate->format("Y-m-d H:iP"), $currentDate->getTimezone()); $currentDate = DateTime::createFromFormat("!Y-m-d H:iO", $currentDate->format("Y-m-d H:iP"), $currentDate->getTimezone());

View File

@@ -1,6 +0,0 @@
# [4.16.0](https://github.com/ezyang/htmlpurifier/compare/v4.15.0...v4.16.0) (2022-09-18)
### Features
* add semantic release ([#307](https://github.com/ezyang/htmlpurifier/issues/307)) ([db31243](https://github.com/ezyang/htmlpurifier/commit/db312435cb9d8d73395f75f9642a43ba6de5e903)), closes [#322](https://github.com/ezyang/htmlpurifier/issues/322) [#323](https://github.com/ezyang/htmlpurifier/issues/323) [#326](https://github.com/ezyang/htmlpurifier/issues/326) [#327](https://github.com/ezyang/htmlpurifier/issues/327) [#328](https://github.com/ezyang/htmlpurifier/issues/328) [#329](https://github.com/ezyang/htmlpurifier/issues/329) [#330](https://github.com/ezyang/htmlpurifier/issues/330) [#331](https://github.com/ezyang/htmlpurifier/issues/331) [#332](https://github.com/ezyang/htmlpurifier/issues/332) [#333](https://github.com/ezyang/htmlpurifier/issues/333) [#337](https://github.com/ezyang/htmlpurifier/issues/337) [#335](https://github.com/ezyang/htmlpurifier/issues/335) [ezyang/htmlpurifier#334](https://github.com/ezyang/htmlpurifier/issues/334) [#336](https://github.com/ezyang/htmlpurifier/issues/336) [#338](https://github.com/ezyang/htmlpurifier/issues/338)

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