Skip to content

Commit

Permalink
composer update vendor/
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Dec 14, 2022
1 parent 9ea259f commit ed621d6
Show file tree
Hide file tree
Showing 45 changed files with 1,160 additions and 499 deletions.
13 changes: 7 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 22 additions & 21 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,17 +414,17 @@
},
{
"name": "phpstan/phpstan-deprecation-rules",
"version": "1.1.0",
"version_normalized": "1.1.0.0",
"version": "1.1.1",
"version_normalized": "1.1.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-deprecation-rules.git",
"reference": "f6e02de43f10c3f7c5ef86c125d9eedef94558cf"
"reference": "2c6792eda026d9c474c14aa018aed312686714db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/f6e02de43f10c3f7c5ef86c125d9eedef94558cf",
"reference": "f6e02de43f10c3f7c5ef86c125d9eedef94558cf",
"url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/2c6792eda026d9c474c14aa018aed312686714db",
"reference": "2c6792eda026d9c474c14aa018aed312686714db",
"shasum": ""
},
"require": {
Expand All @@ -437,7 +437,7 @@
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5"
},
"time": "2022-12-07T16:49:11+00:00",
"time": "2022-12-13T14:26:20+00:00",
"type": "phpstan-extension",
"extra": {
"phpstan": {
Expand All @@ -459,23 +459,23 @@
"description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.",
"support": {
"issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues",
"source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.1.0"
"source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.1.1"
},
"install-path": "../phpstan/phpstan-deprecation-rules"
},
{
"name": "phpstan/phpstan-phpunit",
"version": "1.3.1",
"version_normalized": "1.3.1.0",
"version": "1.3.2",
"version_normalized": "1.3.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-phpunit.git",
"reference": "b9827cf8df2bd97c7c07b1bb27c694ee41052754"
"reference": "cd9c6938f8bbfcb6da3ed5a3c7ea60873825d088"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/b9827cf8df2bd97c7c07b1bb27c694ee41052754",
"reference": "b9827cf8df2bd97c7c07b1bb27c694ee41052754",
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/cd9c6938f8bbfcb6da3ed5a3c7ea60873825d088",
"reference": "cd9c6938f8bbfcb6da3ed5a3c7ea60873825d088",
"shasum": ""
},
"require": {
Expand All @@ -491,7 +491,7 @@
"phpstan/phpstan-strict-rules": "^1.0",
"phpunit/phpunit": "^9.5"
},
"time": "2022-12-12T21:02:25+00:00",
"time": "2022-12-13T15:08:22+00:00",
"type": "phpstan-extension",
"extra": {
"phpstan": {
Expand All @@ -514,7 +514,7 @@
"description": "PHPUnit extensions and rules for PHPStan",
"support": {
"issues": "https://github.com/phpstan/phpstan-phpunit/issues",
"source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.1"
"source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.2"
},
"install-path": "../phpstan/phpstan-phpunit"
},
Expand Down Expand Up @@ -765,17 +765,17 @@
},
{
"name": "staabm/phpstan-dba",
"version": "0.2.53",
"version_normalized": "0.2.53.0",
"version": "0.2.54",
"version_normalized": "0.2.54.0",
"source": {
"type": "git",
"url": "https://github.com/staabm/phpstan-dba.git",
"reference": "afb452df151e72dfb0bc69feaae15c2599322f0d"
"reference": "246281fe4479cab7388ed480fc58a5b63b2d833f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/staabm/phpstan-dba/zipball/afb452df151e72dfb0bc69feaae15c2599322f0d",
"reference": "afb452df151e72dfb0bc69feaae15c2599322f0d",
"url": "https://api.github.com/repos/staabm/phpstan-dba/zipball/246281fe4479cab7388ed480fc58a5b63b2d833f",
"reference": "246281fe4479cab7388ed480fc58a5b63b2d833f",
"shasum": ""
},
"require": {
Expand All @@ -785,6 +785,7 @@
"phpstan/phpstan": "^1.5.6"
},
"require-dev": {
"dibi/dibi": "^4.2",
"doctrine/dbal": "^3.2",
"ext-mysqli": "*",
"ext-pdo": "*",
Expand All @@ -796,7 +797,7 @@
"phpunit/phpunit": "^9",
"vlucas/phpdotenv": "^5.4"
},
"time": "2022-12-02T17:42:55+00:00",
"time": "2022-12-14T19:36:18+00:00",
"type": "phpstan-extension",
"extra": {
"phpstan": {
Expand All @@ -817,7 +818,7 @@
],
"support": {
"issues": "https://github.com/staabm/phpstan-dba/issues",
"source": "https://github.com/staabm/phpstan-dba/tree/0.2.53"
"source": "https://github.com/staabm/phpstan-dba/tree/0.2.54"
},
"install-path": "../staabm/phpstan-dba"
},
Expand Down
22 changes: 11 additions & 11 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '2d35504164fe12985fdd6320a1fa7c1676184b8e',
'reference' => '9ea259f9752d73c6d5dd636277b57cfee4626fe8',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '2d35504164fe12985fdd6320a1fa7c1676184b8e',
'reference' => '9ea259f9752d73c6d5dd636277b57cfee4626fe8',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -74,18 +74,18 @@
'dev_requirement' => false,
),
'phpstan/phpstan-deprecation-rules' => array(
'pretty_version' => '1.1.0',
'version' => '1.1.0.0',
'reference' => 'f6e02de43f10c3f7c5ef86c125d9eedef94558cf',
'pretty_version' => '1.1.1',
'version' => '1.1.1.0',
'reference' => '2c6792eda026d9c474c14aa018aed312686714db',
'type' => 'phpstan-extension',
'install_path' => __DIR__ . '/../phpstan/phpstan-deprecation-rules',
'aliases' => array(),
'dev_requirement' => false,
),
'phpstan/phpstan-phpunit' => array(
'pretty_version' => '1.3.1',
'version' => '1.3.1.0',
'reference' => 'b9827cf8df2bd97c7c07b1bb27c694ee41052754',
'pretty_version' => '1.3.2',
'version' => '1.3.2.0',
'reference' => 'cd9c6938f8bbfcb6da3ed5a3c7ea60873825d088',
'type' => 'phpstan-extension',
'install_path' => __DIR__ . '/../phpstan/phpstan-phpunit',
'aliases' => array(),
Expand Down Expand Up @@ -128,9 +128,9 @@
'dev_requirement' => false,
),
'staabm/phpstan-dba' => array(
'pretty_version' => '0.2.53',
'version' => '0.2.53.0',
'reference' => 'afb452df151e72dfb0bc69feaae15c2599322f0d',
'pretty_version' => '0.2.54',
'version' => '0.2.54.0',
'reference' => '246281fe4479cab7388ed480fc58a5b63b2d833f',
'type' => 'phpstan-extension',
'install_path' => __DIR__ . '/../staabm/phpstan-dba',
'aliases' => array(),
Expand Down
3 changes: 3 additions & 0 deletions vendor/phpstan/phpstan-deprecation-rules/rules.neon
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
parameters:
deprecationRulesInstalled: true

services:
-
class: PHPStan\Rules\Deprecations\DeprecatedClassHelper
Expand Down
3 changes: 3 additions & 0 deletions vendor/phpstan/phpstan-phpunit/extension.neon
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ services:
class: PHPStan\Rules\PHPUnit\AnnotationHelper
-
class: PHPStan\Rules\PHPUnit\DataProviderHelper
factory: @PHPStan\Rules\PHPUnit\DataProviderHelperFactory::create()
-
class: PHPStan\Rules\PHPUnit\DataProviderHelperFactory

conditionalTags:
PHPStan\PhpDoc\PHPUnit\MockObjectTypeNodeResolverExtension:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ class DataProviderHelper
*/
private $reflectionProvider;

public function __construct(ReflectionProvider $reflectionProvider)
/** @var bool */
private $phpunit10OrNewer;

public function __construct(ReflectionProvider $reflectionProvider, bool $phpunit10OrNewer)
{
$this->reflectionProvider = $reflectionProvider;
$this->phpunit10OrNewer = $phpunit10OrNewer;
}

/**
Expand Down Expand Up @@ -108,9 +112,9 @@ public function processDataProvider(
))->build();
}

if ($deprecationRulesInstalled && !$dataProviderMethodReflection->isStatic()) {
if ($deprecationRulesInstalled && $this->phpunit10OrNewer && !$dataProviderMethodReflection->isStatic()) {
$errors[] = RuleErrorBuilder::message(sprintf(
'@dataProvider %s related method must be static.',
'@dataProvider %s related method must be static in PHPUnit 10 and newer.',
$dataProviderValue
))->build();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php declare(strict_types = 1);

namespace PHPStan\Rules\PHPUnit;

use PHPStan\Reflection\ReflectionProvider;
use PHPUnit\Framework\TestCase;
use function dirname;
use function explode;
use function file_get_contents;
use function is_file;
use function json_decode;

class DataProviderHelperFactory
{

/** @var ReflectionProvider */
private $reflectionProvider;

public function __construct(ReflectionProvider $reflectionProvider)
{
$this->reflectionProvider = $reflectionProvider;
}

public function create(): DataProviderHelper
{
$phpUnit10OrNewer = false;
if ($this->reflectionProvider->hasClass(TestCase::class)) {
$testCase = $this->reflectionProvider->getClass(TestCase::class);
$file = $testCase->getFileName();
if ($file !== null) {
$phpUnitRoot = dirname($file, 3);
$phpUnitComposer = $phpUnitRoot . '/composer.json';
if (is_file($phpUnitComposer)) {
$composerJson = @file_get_contents($phpUnitComposer);
if ($composerJson !== false) {
$json = json_decode($composerJson, true);
$version = $json['extra']['branch-alias']['dev-main'] ?? null;
if ($version !== null) {
$majorVersion = (int) explode('.', $version)[0];
if ($majorVersion >= 10) {
$phpUnit10OrNewer = true;
}
}
}
}
}
}

return new DataProviderHelper($this->reflectionProvider, $phpUnit10OrNewer);
}

}
2 changes: 1 addition & 1 deletion vendor/staabm/phpstan-dba/.github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
db-image: 'mysql:8.0'
reflector: "pdo-mysql"
mode: "recording"
phpstan-version: "@dev"
phpstan-version: "phpstan@dev"

- php-version: "8.0"
db-image: 'mysql:8.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ jobs:
env:
PGPASSWORD: postgres

- run: composer phpunit
- run: composer phpunit -- --colors=always
12 changes: 6 additions & 6 deletions vendor/staabm/phpstan-dba/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ jobs:
# ignore php8.2 requirement error https://github.com/sebastianbergmann/phpunit/issues/5033
composer-options: "--prefer-dist --no-progress --ignore-platform-req=php+"

- name: Configure matchers
uses: mheap/phpunit-matcher-action@v1
- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Lint
run: php vendor/bin/parallel-lint --colors src tests
Expand All @@ -106,7 +106,7 @@ jobs:
run: |
mysql -uroot -h127.0.0.1 -proot < tests/schema.sql
- run: composer phpunit -- --teamcity
- run: composer phpunit -- --colors=always

replay:
name: PHPUnit (reflection replay)
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
# ignore php8.2 requirement error https://github.com/sebastianbergmann/phpunit/issues/5033
composer-options: "--prefer-dist --no-progress --ignore-platform-req=php+"

- name: Configure matchers
uses: mheap/phpunit-matcher-action@v1
- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- run: composer phpunit -- --teamcity
- run: composer phpunit -- --colors=always
Loading

0 comments on commit ed621d6

Please sign in to comment.