transform
This commit is contained in:
parent
d4a4be62ec
commit
9efe1d4233
@ -33,9 +33,4 @@ abstract class Model extends Eloquent
|
||||
|
||||
return $attributes;
|
||||
}
|
||||
|
||||
public function getDateFormat()
|
||||
{
|
||||
return 'Y-m-d H:i:s.u';
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class OrderController extends Controller
|
||||
$transactionStatuses = $dicts->get('transaction_status');
|
||||
|
||||
|
||||
$list = $res->map(function ($item) use ($carrierOperators, $orderStatues, $transactionStatuses) {
|
||||
$res->transform(function ($item) use ($carrierOperators, $orderStatues, $transactionStatuses) {
|
||||
return [
|
||||
'id' => $item->id,
|
||||
'sn' => $item->sn,
|
||||
@ -56,11 +56,11 @@ class OrderController extends Controller
|
||||
];
|
||||
});
|
||||
|
||||
if (empty($list)) {
|
||||
if (empty($res)) {
|
||||
return err('没有更多数据');
|
||||
}
|
||||
|
||||
$order_at = Carbon::parse($list->last()->order_at);
|
||||
$order_at = Carbon::parse($res->last()->order_at);
|
||||
$conditions['starttime'] = $order_at->copy()->startOfMonth()->startOfDay()->format('Y-m-d H:i:s');
|
||||
$conditions['endtime'] = $order_at->copy()->endOfMonth()->endOfDay()->format('Y-m-d H:i:s');
|
||||
|
||||
@ -69,7 +69,7 @@ class OrderController extends Controller
|
||||
$count['starttime'] = $conditions['starttime'];
|
||||
$count['endtime'] = $conditions['endtime'];
|
||||
|
||||
return res(['count' => $count, 'orders' => $list], '订单列表', 201);
|
||||
return res(['count' => $count, 'orders' => $res], '订单列表', 201);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -44,7 +44,7 @@ class OrderRepository extends Repository
|
||||
*/
|
||||
public function transform($model)
|
||||
{
|
||||
return $model->toArray();
|
||||
return $model;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -82,7 +82,7 @@ class OrderRepository extends Repository
|
||||
}
|
||||
|
||||
if (isset($conditions['pay_channel'])) {
|
||||
$this->model = $this->model->whereIn('pay_channel', $conditions['pay_channel']);
|
||||
$this->model = $this->model->where('pay_channel', $conditions['pay_channel']);
|
||||
}
|
||||
|
||||
if (isset($conditions['package_name'])) {
|
||||
|
@ -18,7 +18,7 @@ class CommonService
|
||||
|
||||
foreach ($payChannels as $key => $value) {
|
||||
if (in_array($payChannel, $value)) {
|
||||
return $payChannel;
|
||||
return $key;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,8 @@ class OrderService extends Service
|
||||
{
|
||||
$limit = $conditions['limit'] ?? 35;
|
||||
|
||||
$res = $this->orderRepository->with(['company:id,name','package:id,name,carrier_operator'])->withConditions($conditions)->paginate($limit);
|
||||
$res = $this->orderRepository->with(['company:id,name','package:id,name,carrier_operator'])
|
||||
->withConditions($conditions)->orderBy('order_at', 'desc')->paginate($limit);
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
32
composer.lock
generated
32
composer.lock
generated
@ -626,17 +626,17 @@
|
||||
},
|
||||
{
|
||||
"name": "dipper/foundation",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "ssh://gogs@git.fxft.net:2222/composer/foundation.git",
|
||||
"reference": "b94828fd9da0eca4326b9bd1c4bfaeb2b0853882"
|
||||
"reference": "127679c3ba8bba204b6228685ab955ad80966543"
|
||||
},
|
||||
"dist": {
|
||||
"type": "tar",
|
||||
"url": "https://composer.fxft.online/dist/dipper/foundation/dipper-foundation-1.1.3-86fee3.tar",
|
||||
"reference": "b94828fd9da0eca4326b9bd1c4bfaeb2b0853882",
|
||||
"shasum": "dbcc58621a58b205d22cfcbf860411ae138fa1b3"
|
||||
"url": "https://composer.fxft.online/dist/dipper/foundation/dipper-foundation-1.1.4-d7faaa.tar",
|
||||
"reference": "127679c3ba8bba204b6228685ab955ad80966543",
|
||||
"shasum": "97d9d4e8c9e3e5b5671ce88e45a3fceed37db6f9"
|
||||
},
|
||||
"require": {
|
||||
"barryvdh/laravel-cors": "~0.11",
|
||||
@ -670,7 +670,7 @@
|
||||
}
|
||||
],
|
||||
"description": "The Foundation of the Dipper Architecture project for Lumen",
|
||||
"time": "2018-12-10T02:27:47+00:00"
|
||||
"time": "2018-12-13T06:41:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dipper/jwt-auth",
|
||||
@ -2668,16 +2668,16 @@
|
||||
},
|
||||
{
|
||||
"name": "jaybizzle/crawler-detect",
|
||||
"version": "v1.2.74",
|
||||
"version": "v1.2.75",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/JayBizzle/Crawler-Detect.git",
|
||||
"reference": "e5fbc685383a4b8f49183b3a646b193491cc14c5"
|
||||
"reference": "50e06c81bea8a9c443708be496868ccb55bdd396"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/e5fbc685383a4b8f49183b3a646b193491cc14c5",
|
||||
"reference": "e5fbc685383a4b8f49183b3a646b193491cc14c5",
|
||||
"url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/50e06c81bea8a9c443708be496868ccb55bdd396",
|
||||
"reference": "50e06c81bea8a9c443708be496868ccb55bdd396",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2713,7 +2713,7 @@
|
||||
"crawlerdetect",
|
||||
"php crawler detect"
|
||||
],
|
||||
"time": "2018-11-21T20:56:45+00:00"
|
||||
"time": "2018-12-10T19:38:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jenssegers/agent",
|
||||
@ -6611,16 +6611,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "7.5.0",
|
||||
"version": "7.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "520723129e2b3fc1dc4c0953e43c9d40e1ecb352"
|
||||
"reference": "c23d78776ad415d5506e0679723cb461d71f488f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/520723129e2b3fc1dc4c0953e43c9d40e1ecb352",
|
||||
"reference": "520723129e2b3fc1dc4c0953e43c9d40e1ecb352",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c23d78776ad415d5506e0679723cb461d71f488f",
|
||||
"reference": "c23d78776ad415d5506e0679723cb461d71f488f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -6691,7 +6691,7 @@
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2018-12-07T07:08:12+00:00"
|
||||
"time": "2018-12-12T07:20:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/code-unit-reverse-lookup",
|
||||
|
2
vendor/composer/autoload_classmap.php
vendored
2
vendor/composer/autoload_classmap.php
vendored
@ -7,8 +7,6 @@ $baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'AccountSeeder' => $baseDir . '/database/seeds/AccountSeeder.php',
|
||||
'AddCustomPriceOrderStatusTransactionStatusToVirtualOrders' => $baseDir . '/database/migrations/2018_12_12_110035_add_custom_price_order_status_transaction_status_to_virtual_orders.php',
|
||||
'AddPackageIdProductIdToVirtualProducts' => $baseDir . '/database/migrations/2018_12_11_173842_add_package_id_product_id_to_virtual_products.php',
|
||||
'ArithmeticError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
|
||||
'AssertionError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
|
||||
'CompanyAccountSeeder' => $baseDir . '/database/seeds/CompanyAccountSeeder.php',
|
||||
|
2
vendor/composer/autoload_static.php
vendored
2
vendor/composer/autoload_static.php
vendored
@ -696,8 +696,6 @@ class ComposerStaticInite79258a3e34ad3e251999111d9f334d9
|
||||
|
||||
public static $classMap = array (
|
||||
'AccountSeeder' => __DIR__ . '/../..' . '/database/seeds/AccountSeeder.php',
|
||||
'AddCustomPriceOrderStatusTransactionStatusToVirtualOrders' => __DIR__ . '/../..' . '/database/migrations/2018_12_12_110035_add_custom_price_order_status_transaction_status_to_virtual_orders.php',
|
||||
'AddPackageIdProductIdToVirtualProducts' => __DIR__ . '/../..' . '/database/migrations/2018_12_11_173842_add_package_id_product_id_to_virtual_products.php',
|
||||
'ArithmeticError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
|
||||
'AssertionError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
|
||||
'CompanyAccountSeeder' => __DIR__ . '/../..' . '/database/seeds/CompanyAccountSeeder.php',
|
||||
|
38
vendor/composer/installed.json
vendored
38
vendor/composer/installed.json
vendored
@ -641,18 +641,18 @@
|
||||
},
|
||||
{
|
||||
"name": "dipper/foundation",
|
||||
"version": "1.1.3",
|
||||
"version_normalized": "1.1.3.0",
|
||||
"version": "1.1.4",
|
||||
"version_normalized": "1.1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "ssh://gogs@git.fxft.net:2222/composer/foundation.git",
|
||||
"reference": "b94828fd9da0eca4326b9bd1c4bfaeb2b0853882"
|
||||
"reference": "127679c3ba8bba204b6228685ab955ad80966543"
|
||||
},
|
||||
"dist": {
|
||||
"type": "tar",
|
||||
"url": "https://composer.fxft.online/dist/dipper/foundation/dipper-foundation-1.1.3-86fee3.tar",
|
||||
"reference": "b94828fd9da0eca4326b9bd1c4bfaeb2b0853882",
|
||||
"shasum": "dbcc58621a58b205d22cfcbf860411ae138fa1b3"
|
||||
"url": "https://composer.fxft.online/dist/dipper/foundation/dipper-foundation-1.1.4-d7faaa.tar",
|
||||
"reference": "127679c3ba8bba204b6228685ab955ad80966543",
|
||||
"shasum": "97d9d4e8c9e3e5b5671ce88e45a3fceed37db6f9"
|
||||
},
|
||||
"require": {
|
||||
"barryvdh/laravel-cors": "~0.11",
|
||||
@ -667,7 +667,7 @@
|
||||
"league/flysystem": "~1.0",
|
||||
"nesbot/carbon": "~1.21"
|
||||
},
|
||||
"time": "2018-12-10T02:27:47+00:00",
|
||||
"time": "2018-12-13T06:41:18+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -2918,17 +2918,17 @@
|
||||
},
|
||||
{
|
||||
"name": "jaybizzle/crawler-detect",
|
||||
"version": "v1.2.74",
|
||||
"version_normalized": "1.2.74.0",
|
||||
"version": "v1.2.75",
|
||||
"version_normalized": "1.2.75.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/JayBizzle/Crawler-Detect.git",
|
||||
"reference": "e5fbc685383a4b8f49183b3a646b193491cc14c5"
|
||||
"reference": "50e06c81bea8a9c443708be496868ccb55bdd396"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/e5fbc685383a4b8f49183b3a646b193491cc14c5",
|
||||
"reference": "e5fbc685383a4b8f49183b3a646b193491cc14c5",
|
||||
"url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/50e06c81bea8a9c443708be496868ccb55bdd396",
|
||||
"reference": "50e06c81bea8a9c443708be496868ccb55bdd396",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2938,7 +2938,7 @@
|
||||
"phpunit/phpunit": "^4.8|^5.5|^6.5",
|
||||
"satooshi/php-coveralls": "1.*"
|
||||
},
|
||||
"time": "2018-11-21T20:56:45+00:00",
|
||||
"time": "2018-12-10T19:38:45+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -5122,17 +5122,17 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "7.5.0",
|
||||
"version_normalized": "7.5.0.0",
|
||||
"version": "7.5.1",
|
||||
"version_normalized": "7.5.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "520723129e2b3fc1dc4c0953e43c9d40e1ecb352"
|
||||
"reference": "c23d78776ad415d5506e0679723cb461d71f488f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/520723129e2b3fc1dc4c0953e43c9d40e1ecb352",
|
||||
"reference": "520723129e2b3fc1dc4c0953e43c9d40e1ecb352",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c23d78776ad415d5506e0679723cb461d71f488f",
|
||||
"reference": "c23d78776ad415d5506e0679723cb461d71f488f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -5171,7 +5171,7 @@
|
||||
"ext-xdebug": "*",
|
||||
"phpunit/php-invoker": "^2.0"
|
||||
},
|
||||
"time": "2018-12-07T07:08:12+00:00",
|
||||
"time": "2018-12-12T07:20:32+00:00",
|
||||
"bin": [
|
||||
"phpunit"
|
||||
],
|
||||
|
@ -177,10 +177,14 @@ abstract class Repository implements RepositoryInterface, CacheableInterface, Cr
|
||||
$results = $this->get($columns);
|
||||
}
|
||||
|
||||
return $this->paginator($results, $total, $limit, $page, [
|
||||
$results = $this->paginator($results, $total, $limit, $page, [
|
||||
'path' => Paginator::resolveCurrentPath(),
|
||||
'pageName' => $pageName,
|
||||
]);
|
||||
|
||||
$this->resetModel();
|
||||
|
||||
return $this->parserResult($results);
|
||||
}
|
||||
|
||||
|
||||
@ -203,10 +207,14 @@ abstract class Repository implements RepositoryInterface, CacheableInterface, Cr
|
||||
|
||||
$this->skip(($page - 1) * $limit)->take($limit + 1);
|
||||
|
||||
return $this->simplePaginator($this->get($columns), $limit, $page, [
|
||||
$results = $this->simplePaginator($this->get($columns), $limit, $page, [
|
||||
'path' => Paginator::resolveCurrentPath(),
|
||||
'pageName' => $pageName,
|
||||
]);
|
||||
|
||||
$this->resetModel();
|
||||
|
||||
return $this->parserResult($results);
|
||||
}
|
||||
|
||||
/**
|
||||
|
File diff suppressed because one or more lines are too long
@ -866,6 +866,7 @@ RssReader\/
|
||||
safe-agent-scanner
|
||||
SalesIntelligent
|
||||
Saleslift
|
||||
Sendsay\.Ru
|
||||
SauceNAO
|
||||
SBIder
|
||||
scalaj-http
|
||||
|
@ -162,15 +162,17 @@ class CrawlerDetect
|
||||
*/
|
||||
public function isCrawler($userAgent = null)
|
||||
{
|
||||
$agent = $userAgent ?: $this->userAgent;
|
||||
$agent = trim(preg_replace(
|
||||
"/{$this->compiledExclusions}/i",
|
||||
'',
|
||||
$userAgent ?: $this->userAgent
|
||||
));
|
||||
|
||||
$agent = preg_replace('/'.$this->compiledExclusions.'/i', '', $agent);
|
||||
|
||||
if (strlen(trim($agent)) == 0) {
|
||||
if ($agent == '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = preg_match('/'.$this->compiledRegex.'/i', trim($agent), $matches);
|
||||
$result = preg_match("/{$this->compiledRegex}/i", $agent, $matches);
|
||||
|
||||
if ($matches) {
|
||||
$this->matches = $matches;
|
||||
|
@ -887,6 +887,7 @@ class Crawlers extends AbstractProvider
|
||||
'safe-agent-scanner',
|
||||
'SalesIntelligent',
|
||||
'Saleslift',
|
||||
'Sendsay\.Ru',
|
||||
'SauceNAO',
|
||||
'SBIder',
|
||||
'scalaj-http',
|
||||
|
56
vendor/phpunit/phpunit/ChangeLog-7.0.md
vendored
56
vendor/phpunit/phpunit/ChangeLog-7.0.md
vendored
@ -1,56 +0,0 @@
|
||||
# Changes in PHPUnit 7.0
|
||||
|
||||
All notable changes of the PHPUnit 7.0 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
||||
|
||||
## [7.0.3] - 2018-03-26
|
||||
|
||||
* Fixed [#3028](https://github.com/sebastianbergmann/phpunit/pull/3028): TestDox name prettifier does not handle test case classes correctly that are in a `Tests\*` namespace
|
||||
|
||||
## [7.0.2] - 2018-02-26
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2974](https://github.com/sebastianbergmann/phpunit/issues/2974): JUnit XML logfile contains invalid characters when test output contains binary data
|
||||
* Fixed [#3014](https://github.com/sebastianbergmann/phpunit/issues/3014): `TypeError` in `PHPUnit\Framework\TestCase::getActualOutput()` when callback registered using `setOutputCallback()` does not return a string
|
||||
* Removed more superfluous `@throws \Exception` annotations
|
||||
|
||||
## [7.0.1] - 2018-02-13
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3000](https://github.com/sebastianbergmann/phpunit/issues/3000): Directories are not created recursively
|
||||
* Removed superfluous `@throws \Exception` annotations from assertion methods
|
||||
|
||||
## [7.0.0] - 2018-02-02
|
||||
|
||||
### Added
|
||||
|
||||
* Implemented [#2967](https://github.com/sebastianbergmann/phpunit/pull/2967): Added support for PHP configuration settings to `@requires` annotation
|
||||
|
||||
### Changed
|
||||
|
||||
* Implemented [#2566](https://github.com/sebastianbergmann/phpunit/issues/2566): Use `Throwable` instead of `Exception` in `PHPUnit\Framework\TestListener` method signatures
|
||||
* Implemented [#2920](https://github.com/sebastianbergmann/phpunit/pull/2920): Replace CLI TestDox printer with `rpkamp/fancy-testdox-printer`
|
||||
* Scalar Type Declarations and Return Type Declarations are now used where possible (as a result, the API of `PHPUnit\Framework\TestListener`, for instance, has changed)
|
||||
* Some classes are now `final`
|
||||
* The visibility of some methods has been changed from `protected` to `private`
|
||||
|
||||
### Removed
|
||||
|
||||
* Implemented [#2473](https://github.com/sebastianbergmann/phpunit/issues/2473): Drop support for PHP 7.0
|
||||
* `@scenario` is no longer an alias for `@test`
|
||||
* The `PHPUnit\Framework\BaseTestListener` class has been removed (deprecated in PHPUnit 6.4)
|
||||
* The `PHPUnit\Framework\TestCase::prepareTemplate` template method has been removed
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2169](https://github.com/sebastianbergmann/phpunit/issues/2169): `assertSame()` does not show differences when used on two arrays that are not identical
|
||||
* Fixed [#2902](https://github.com/sebastianbergmann/phpunit/issues/2902): `@test` annotation gets accepted no matter what
|
||||
* Fixed [#2907](https://github.com/sebastianbergmann/phpunit/issues/2907): `StringMatchesFormatDescription` constraint does not handle escaped `%` correctly
|
||||
* Fixed [#2919](https://github.com/sebastianbergmann/phpunit/issues/2919): `assertJsonStringEqualsJsonString()` matches empty object as empty array
|
||||
|
||||
[7.0.3]: https://github.com/sebastianbergmann/phpunit/compare/7.0.2...7.0.3
|
||||
[7.0.2]: https://github.com/sebastianbergmann/phpunit/compare/7.0.1...7.0.2
|
||||
[7.0.1]: https://github.com/sebastianbergmann/phpunit/compare/7.0.0...7.0.1
|
||||
[7.0.0]: https://github.com/sebastianbergmann/phpunit/compare/6.5...7.0.0
|
||||
|
63
vendor/phpunit/phpunit/ChangeLog-7.1.md
vendored
63
vendor/phpunit/phpunit/ChangeLog-7.1.md
vendored
@ -1,63 +0,0 @@
|
||||
# Changes in PHPUnit 7.1
|
||||
|
||||
All notable changes of the PHPUnit 7.1 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [7.1.6] - 2018-MM-DD
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3107](https://github.com/sebastianbergmann/phpunit/issues/3107): `CliTestDoxPrinter::addError()` cannot handle errors in `setUpBeforeClass()`
|
||||
* Fixed [#3142](https://github.com/sebastianbergmann/phpunit/issues/3142): Method-level annotations (`@backupGlobals`, `@backupStaticAttributes`, `@errorHandler`, `@preserveGlobalState`) do not override class-level annotations
|
||||
|
||||
## [7.1.5] - 2018-04-29
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3105](https://github.com/sebastianbergmann/phpunit/pull/3105): Name is prettified inconsistently when snake_case notation is used
|
||||
|
||||
## [7.1.4] - 2018-04-18
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3034](https://github.com/sebastianbergmann/phpunit/pull/3034): `$this->getStatus()` returns `STATUS_PASSED` in `tearDown()` after unexpected exception
|
||||
|
||||
## [7.1.3] - 2018-04-13
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3094](https://github.com/sebastianbergmann/phpunit/issues/3094): Faulty dependency constraint affecting `getObjectForTrait()` (failure using `--prefer-lowest`)
|
||||
|
||||
## [7.1.2] - 2018-04-10
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2830](https://github.com/sebastianbergmann/phpunit/issues/2830): `@runClassInSeparateProcess` does not work for tests that use `@dataProvider`
|
||||
* Fixed [#3059](https://github.com/sebastianbergmann/phpunit/pull/3059): `StringMatchesFormatDescription` constraint fails when matching multiline with `\r\n`
|
||||
* Fixed [#3087](https://github.com/sebastianbergmann/phpunit/pull/3087): `TestCase::getTestResultObject()` can return `null`
|
||||
|
||||
## [7.1.1] - 2018-04-06
|
||||
|
||||
### Fixed
|
||||
|
||||
* `CliTestDoxPrinter::writeProgress()` and `TeamCity::writeProgress()` are not compatible with `ResultPrinter::writeProgress()` (on PHP 7.1)
|
||||
|
||||
## [7.1.0] - 2018-04-06
|
||||
|
||||
### Added
|
||||
|
||||
* Implemented [#3002](https://github.com/sebastianbergmann/phpunit/issues/3002): Support for test runner extensions
|
||||
* Implemented [#3035](https://github.com/sebastianbergmann/phpunit/pull/3035): Add support for `iterable` in `assertInternalType()`
|
||||
|
||||
### Changed
|
||||
|
||||
* `PHPUnit\Framework\Assert` is no longer searched for test methods
|
||||
* `ReflectionMethod::invokeArgs()` is no longer used to invoke test methods
|
||||
|
||||
[7.1.6]: https://github.com/sebastianbergmann/phpunit/compare/7.1.5...7.1.6
|
||||
[7.1.5]: https://github.com/sebastianbergmann/phpunit/compare/7.1.4...7.1.5
|
||||
[7.1.4]: https://github.com/sebastianbergmann/phpunit/compare/7.1.3...7.1.4
|
||||
[7.1.3]: https://github.com/sebastianbergmann/phpunit/compare/7.1.2...7.1.3
|
||||
[7.1.2]: https://github.com/sebastianbergmann/phpunit/compare/7.1.1...7.1.2
|
||||
[7.1.1]: https://github.com/sebastianbergmann/phpunit/compare/7.1.0...7.1.1
|
||||
[7.1.0]: https://github.com/sebastianbergmann/phpunit/compare/7.0...7.1.0
|
||||
|
78
vendor/phpunit/phpunit/ChangeLog-7.2.md
vendored
78
vendor/phpunit/phpunit/ChangeLog-7.2.md
vendored
@ -1,78 +0,0 @@
|
||||
# Changes in PHPUnit 7.2
|
||||
|
||||
All notable changes of the PHPUnit 7.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [7.2.7] - 2018-07-15
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3154](https://github.com/sebastianbergmann/phpunit/issues/3154): Global constants as default parameter values are not handled correctly in namespace
|
||||
* Fixed [#3189](https://github.com/sebastianbergmann/phpunit/issues/3189): PHPUnit 7.2 potentially leaves a messy libxmlerror state
|
||||
* Fixed [#3199](https://github.com/sebastianbergmann/phpunit/pull/3199): Code Coverage for PHPT tests does not work when PHPDBG is used
|
||||
|
||||
## [7.2.6] - 2018-06-21
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3176](https://github.com/sebastianbergmann/phpunit/issues/3176): PHPUnit 7.2.5 breaks backward compatibility
|
||||
|
||||
## [7.2.5] - 2018-06-21
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3093](https://github.com/sebastianbergmann/phpunit/issues/3093): Unable to chain a `@dataProvider` in method `a` with a `@depends` in method `b`
|
||||
* Fixed [#3174](https://github.com/sebastianbergmann/phpunit/issues/3174): Code generator for test doubles does not handle proxied methods with variadic parameters correctly
|
||||
|
||||
## [7.2.4] - 2018-06-05
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3160](https://github.com/sebastianbergmann/phpunit/issues/3160): TeamCity logfile writer broken on Windows
|
||||
|
||||
## [7.2.3] - 2018-06-03
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3156](https://github.com/sebastianbergmann/phpunit/issues/3156): Combined use of `@depends` and `@dataProvider` is not handled correctly
|
||||
|
||||
## [7.2.2] - 2018-06-01
|
||||
|
||||
### Changed
|
||||
|
||||
* Ensure that `phpunit/php-code-coverage` is used in version `^6.0.7`
|
||||
|
||||
## [7.2.1] - 2018-06-01
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3155](https://github.com/sebastianbergmann/phpunit/issues/3155): Calling `getStatus()` on a `TestCase` object before the respective test has been executed results in type error
|
||||
|
||||
## [7.2.0] - 2018-06-01
|
||||
|
||||
### Added
|
||||
|
||||
* Implemented [#3042](https://github.com/sebastianbergmann/phpunit/pull/3042): Add `TestCase::expectNotToPerformAssertions()` method as alternative to `@doesNotPerformAssertions` annotation
|
||||
* Implemented [#3064](https://github.com/sebastianbergmann/phpunit/issues/3064): Mark tests as risky when they claim not to perform assertions but do
|
||||
* Implemented [#3066](https://github.com/sebastianbergmann/phpunit/issues/3066): Validate XML configuration against XSD
|
||||
* Implemented [#3076](https://github.com/sebastianbergmann/phpunit/issues/3076): Extensions can be configured via PHPUnit's XML configuration
|
||||
* Implemented [#3080](https://github.com/sebastianbergmann/phpunit/issues/3080): The XML configuration arguments can have boolean elements
|
||||
* Implemented [#3092](https://github.com/sebastianbergmann/phpunit/pull/3092): Ability to run tests in random order, reverse order, ordered using dependency resolution
|
||||
|
||||
### Changed
|
||||
|
||||
* Implemented [#3103](https://github.com/sebastianbergmann/phpunit/issues/3103): Merge `phpunit-mock-objects` back into PHPUnit's Git repository
|
||||
* Implemented [#3115](https://github.com/sebastianbergmann/phpunit/pull/3115): Method-level `@covers` annotation overrides class-level `@coversNothing` annotation
|
||||
|
||||
### Removed
|
||||
|
||||
* Fixed [#3069](https://github.com/sebastianbergmann/phpunit/issues/3069): Method `ResultPrinter::printWaitPrompt()` seems to be unused
|
||||
|
||||
[7.2.7]: https://github.com/sebastianbergmann/phpunit/compare/7.2.6...7.2.7
|
||||
[7.2.6]: https://github.com/sebastianbergmann/phpunit/compare/7.2.5...7.2.6
|
||||
[7.2.5]: https://github.com/sebastianbergmann/phpunit/compare/7.2.4...7.2.5
|
||||
[7.2.4]: https://github.com/sebastianbergmann/phpunit/compare/7.2.3...7.2.4
|
||||
[7.2.3]: https://github.com/sebastianbergmann/phpunit/compare/7.2.2...7.2.3
|
||||
[7.2.2]: https://github.com/sebastianbergmann/phpunit/compare/7.2.1...7.2.2
|
||||
[7.2.1]: https://github.com/sebastianbergmann/phpunit/compare/7.2.0...7.2.1
|
||||
[7.2.0]: https://github.com/sebastianbergmann/phpunit/compare/7.1...7.2.0
|
||||
|
82
vendor/phpunit/phpunit/ChangeLog-7.3.md
vendored
82
vendor/phpunit/phpunit/ChangeLog-7.3.md
vendored
@ -1,82 +0,0 @@
|
||||
# Changes in PHPUnit 7.3
|
||||
|
||||
All notable changes of the PHPUnit 7.3 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [7.3.6] - 2018-MM-DD
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3310](https://github.com/sebastianbergmann/phpunit/issues/3310): Inconsistent `@throws` annotations in `Assert/Functions.php`
|
||||
|
||||
## [7.3.5] - 2018-09-08
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3181](https://github.com/sebastianbergmann/phpunit/issues/3181): `--filter` should be case-insensitive
|
||||
* Fixed [#3234](https://github.com/sebastianbergmann/phpunit/issues/3234): `assertArraySubset()` with `$strict=true` does not display differences properly
|
||||
* Fixed [#3254](https://github.com/sebastianbergmann/phpunit/issues/3254): TextUI test runner cannot run a `Test` instance that is not a `TestSuite`
|
||||
|
||||
## [7.3.4] - 2018-09-05
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3270](https://github.com/sebastianbergmann/phpunit/issues/3270): Array / Object to string conversion in `NamePrettifier`
|
||||
|
||||
## [7.3.3] - 2018-09-01
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3265](https://github.com/sebastianbergmann/phpunit/pull/3265): Slashes are unnecessarily escaped in prettified JSON
|
||||
* Fixed [#3267](https://github.com/sebastianbergmann/phpunit/pull/3267): `%` not escaped correctly for `StringMatchesFormat` constraint
|
||||
|
||||
## [7.3.2] - 2018-08-22
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3219](https://github.com/sebastianbergmann/phpunit/issues/3219): `getMockFromWsdl()` generates invalid PHP code when WSDL filename contains special characters
|
||||
* Fixed [#3248](https://github.com/sebastianbergmann/phpunit/issues/3248) and [#3233](https://github.com/sebastianbergmann/phpunit/issues/3233): `phpunit.xsd` dictates element order where it should not
|
||||
* Fixed [#3251](https://github.com/sebastianbergmann/phpunit/issues/3251): TeamCity result logger is missing test duration information
|
||||
|
||||
## [7.3.1] - 2018-08-07
|
||||
|
||||
### Changed
|
||||
|
||||
* Reverted [#3161](https://github.com/sebastianbergmann/phpunit/pull/3161) (because of [#3240](https://github.com/sebastianbergmann/phpunit/issues/3240)): Support for indexed arrays in `PHPUnit\Framework\Constraint\ArraySubset`
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3237](https://github.com/sebastianbergmann/phpunit/issues/3237): Result caching enabled by default
|
||||
* Fixed [#3240](https://github.com/sebastianbergmann/phpunit/issues/3240): `assertArraySubset()` does not work as expected
|
||||
|
||||
## [7.3.0] - 2018-08-03
|
||||
|
||||
### Added
|
||||
|
||||
* Implemented [#3147](https://github.com/sebastianbergmann/phpunit/pull/3147): Support for running tests first that failed in a previous run
|
||||
* Implemented `cacheResult` configuration directive and `--cache-result` CLI option to control test result cache required for "run defects first" functionality (disabled by default)
|
||||
* Implemented `cacheResultFile` configuration directive and `--cache-result-file` CLI option to configure test result cache file (default: `.phpunit.result.cache`)
|
||||
* Implemented `stopOnDefect` configuration directive and `--stop-on-defect` CLI option for aborting test suite execution upon first defective test
|
||||
* Implemented `executionOrder` configuration directive and `--order-by` CLI option for sorting the test suite before execution
|
||||
* The `--order-by=random` CLI option should now be used instead of `--random-order`
|
||||
* The `--order-by=depends` CLI option should now be used instead of `--resolve-dependencies`
|
||||
* The `--order-by=reverse` CLI option should now be used instead of `--reverse-order`
|
||||
* Implemented [#3161](https://github.com/sebastianbergmann/phpunit/pull/3161): Support for indexed arrays in `PHPUnit\Framework\Constraint\ArraySubset`
|
||||
* Implemented [#3194](https://github.com/sebastianbergmann/phpunit/issues/3194): `@covers class` (and `@uses class`) should include traits used by class
|
||||
* Implemented [#3196](https://github.com/sebastianbergmann/phpunit/issues/3196): Support for replacing placeholders in `@testdox` text with data provider values
|
||||
* Implemented [#3198](https://github.com/sebastianbergmann/phpunit/pull/3198): Provide source location for useless tests
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3154](https://github.com/sebastianbergmann/phpunit/issues/3154): Global constants as default parameter values are not handled correctly in namespace
|
||||
* Fixed [#3218](https://github.com/sebastianbergmann/phpunit/issues/3218): `prefix` attribute for `directory` node missing from `phpunit.xml` XSD
|
||||
* Fixed [#3222](https://github.com/sebastianbergmann/phpunit/pull/3222): Priority of `@covers` and `@coversNothing` is wrong
|
||||
* Fixed [#3225](https://github.com/sebastianbergmann/phpunit/issues/3225): `coverage-php` missing from `phpunit.xsd`
|
||||
|
||||
[7.3.6]: https://github.com/sebastianbergmann/phpunit/compare/7.3.5...7.3.6
|
||||
[7.3.5]: https://github.com/sebastianbergmann/phpunit/compare/7.3.4...7.3.5
|
||||
[7.3.4]: https://github.com/sebastianbergmann/phpunit/compare/7.3.3...7.3.4
|
||||
[7.3.3]: https://github.com/sebastianbergmann/phpunit/compare/7.3.2...7.3.3
|
||||
[7.3.2]: https://github.com/sebastianbergmann/phpunit/compare/7.3.1...7.3.2
|
||||
[7.3.1]: https://github.com/sebastianbergmann/phpunit/compare/7.3.0...7.3.1
|
||||
[7.3.0]: https://github.com/sebastianbergmann/phpunit/compare/7.2...7.3.0
|
||||
|
55
vendor/phpunit/phpunit/ChangeLog-7.4.md
vendored
55
vendor/phpunit/phpunit/ChangeLog-7.4.md
vendored
@ -1,55 +0,0 @@
|
||||
# Changes in PHPUnit 7.4
|
||||
|
||||
All notable changes of the PHPUnit 7.4 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [7.4.5] - 2018-12-03
|
||||
|
||||
* Fixed [#3410](https://github.com/sebastianbergmann/phpunit/issues/3410): Parent directory of `cacheResultFile` is not created when it does not exist
|
||||
* Fixed [#3418](https://github.com/sebastianbergmann/phpunit/pull/3418): Conflicting placeholder replacement and argument exporting inconsistencies in `@testdox`
|
||||
|
||||
## [7.4.4] - 2018-11-14
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3379](https://github.com/sebastianbergmann/phpunit/issues/3379): Dependent test of skipped test has status `-1`
|
||||
* Fixed [#3394](https://github.com/sebastianbergmann/phpunit/issues/3394): Process Isolation does not work when PHPUnit is used as PHAR
|
||||
* Fixed [#3398](https://github.com/sebastianbergmann/phpunit/pull/3398): Bug when replacing placeholders in `@testdox` annotation using an associative array
|
||||
* Fixed [#3401](https://github.com/sebastianbergmann/phpunit/pull/3401): Test re-ordering edge cases
|
||||
* Fixed [#3402](https://github.com/sebastianbergmann/phpunit/pull/3402): Listening to the tests in reverse revealed evil hidden messages
|
||||
|
||||
## [7.4.3] - 2018-10-23
|
||||
|
||||
### Changed
|
||||
|
||||
* Use `^3.1` of `sebastian/environment` again due to [regression](https://github.com/sebastianbergmann/environment/issues/31)
|
||||
|
||||
## [7.4.2] - 2018-10-23
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3354](https://github.com/sebastianbergmann/phpunit/pull/3354): Regression when `columns="max"` is used
|
||||
|
||||
## [7.4.1] - 2018-10-18
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3321](https://github.com/sebastianbergmann/phpunit/pull/3321): Incorrect TestDox output for data provider with indexed array
|
||||
* Fixed [#3353](https://github.com/sebastianbergmann/phpunit/issues/3353): Requesting less than 16 columns of output results in an error
|
||||
|
||||
## [7.4.0] - 2018-10-05
|
||||
|
||||
### Added
|
||||
|
||||
* Implemented [#3127](https://github.com/sebastianbergmann/phpunit/issues/3127): Emit error when mocked method is not really mocked
|
||||
* Implemented [#3224](https://github.com/sebastianbergmann/phpunit/pull/3224): Ability to enforce a time limit for tests not annotated with `@small`, `@medium`, or `@large`
|
||||
* Implemented [#3272](https://github.com/sebastianbergmann/phpunit/issues/3272): Ability to generate code coverage whitelist filter script for Xdebug
|
||||
* Implemented [#3284](https://github.com/sebastianbergmann/phpunit/issues/3284): Ability to reorder tests based on execution time
|
||||
* Implemented [#3290](https://github.com/sebastianbergmann/phpunit/issues/3290): Ability to load a PHP script before any code of PHPUnit itself is loaded
|
||||
|
||||
[7.4.5]: https://github.com/sebastianbergmann/phpunit/compare/7.4.4...7.4.5
|
||||
[7.4.4]: https://github.com/sebastianbergmann/phpunit/compare/7.4.3...7.4.4
|
||||
[7.4.3]: https://github.com/sebastianbergmann/phpunit/compare/7.4.2...7.4.3
|
||||
[7.4.2]: https://github.com/sebastianbergmann/phpunit/compare/7.4.1...7.4.2
|
||||
[7.4.1]: https://github.com/sebastianbergmann/phpunit/compare/7.4.0...7.4.1
|
||||
[7.4.0]: https://github.com/sebastianbergmann/phpunit/compare/7.3.5...7.4.0
|
||||
|
13
vendor/phpunit/phpunit/ChangeLog-7.5.md
vendored
13
vendor/phpunit/phpunit/ChangeLog-7.5.md
vendored
@ -2,6 +2,12 @@
|
||||
|
||||
All notable changes of the PHPUnit 7.5 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [7.5.1] - 2018-12-12
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3441](https://github.com/sebastianbergmann/phpunit/issues/3441): Call to undefined method `DataProviderTestSuite::usesDataProvider()`
|
||||
|
||||
## [7.5.0] - 2018-12-07
|
||||
|
||||
### Added
|
||||
@ -23,9 +29,10 @@ All notable changes of the PHPUnit 7.5 release series are documented in this fil
|
||||
|
||||
### Fixed
|
||||
|
||||
* Implemented [#3428](https://github.com/sebastianbergmann/phpunit/pull/3428): `TestSuite` setup failures are not logged correctly
|
||||
* Implemented [#3429](https://github.com/sebastianbergmann/phpunit/pull/3429): Inefficient loop in `getHookMethods()`
|
||||
* Implemented [#3437](https://github.com/sebastianbergmann/phpunit/pull/3437): JUnit logger skips PHPT tests
|
||||
* Fixed [#3428](https://github.com/sebastianbergmann/phpunit/pull/3428): `TestSuite` setup failures are not logged correctly
|
||||
* Fixed [#3429](https://github.com/sebastianbergmann/phpunit/pull/3429): Inefficient loop in `getHookMethods()`
|
||||
* Fixed [#3437](https://github.com/sebastianbergmann/phpunit/pull/3437): JUnit logger skips PHPT tests
|
||||
|
||||
[7.5.1]: https://github.com/sebastianbergmann/phpunit/compare/7.5.0...7.5.1
|
||||
[7.5.0]: https://github.com/sebastianbergmann/phpunit/compare/7.4.5...7.5.0
|
||||
|
||||
|
@ -30,7 +30,7 @@ class Version
|
||||
}
|
||||
|
||||
if (self::$version === null) {
|
||||
$version = new VersionId('7.5.0', \dirname(__DIR__, 2));
|
||||
$version = new VersionId('7.5.1', \dirname(__DIR__, 2));
|
||||
self::$version = $version->getVersion();
|
||||
}
|
||||
|
||||
|
@ -290,11 +290,17 @@ class JUnit extends Printer implements TestListener
|
||||
*/
|
||||
public function startTest(Test $test): void
|
||||
{
|
||||
$usesDataprovider = false;
|
||||
|
||||
if (\method_exists($test, 'usesDataProvider')) {
|
||||
$usesDataprovider = $test->usesDataProvider();
|
||||
}
|
||||
|
||||
$testCase = $this->document->createElement('testcase');
|
||||
$testCase->setAttribute('name', $test->getName());
|
||||
|
||||
$class = new ReflectionClass($test);
|
||||
$methodName = $test->getName(!$test->usesDataProvider());
|
||||
$methodName = $test->getName(!$usesDataprovider);
|
||||
|
||||
if ($class->hasMethod($methodName)) {
|
||||
$method = $class->getMethod($methodName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user