Skip to content

Commit

Permalink
Bump dev tools and CI workflows (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Dec 29, 2022
1 parent 6e6ce1e commit 6f1e0c4
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 43 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/coding-standards.yml
Expand Up @@ -12,7 +12,6 @@ on:
jobs:
coding-standards:
name: "Coding Standards"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@1.4.1"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@3.0.0"
with:
composer-root-version: "1.4"
php-version: "8.1"
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
phpunit:
name: "PHPUnit"
uses: "doctrine/.github/.github/workflows/continuous-integration.yml@1.4.1"
uses: "doctrine/.github/.github/workflows/continuous-integration.yml@3.0.0"
with:
php-versions: '["7.1", "7.2", "7.3", "7.4", "8.0", "8.1"]'
php-versions: '["7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]'
composer-root-version: "1.4"
4 changes: 2 additions & 2 deletions .github/workflows/phpbench.yml
Expand Up @@ -16,7 +16,7 @@ env:
jobs:
phpbench:
name: "PHPBench"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"

strategy:
matrix:
Expand All @@ -37,7 +37,7 @@ jobs:
ini-values: "zend.assertions=1"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
uses: "actions/cache@v3"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-on-milestone-closed.yml
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
release:
name: "Git tag, release & create merge-up PR"
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@1.4.1"
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@3.0.0"
secrets:
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/static-analysis.yml
Expand Up @@ -12,7 +12,6 @@ on:
jobs:
static-analysis:
name: "Static Analysis"
uses: "doctrine/.github/.github/workflows/static-analysis.yml@1.4.1"
uses: "doctrine/.github/.github/workflows/static-analysis.yml@3.0.0"
with:
composer-root-version: "1.4"
php-version: "8.1"
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -21,12 +21,12 @@
"require-dev": {
"ext-phar": "*",
"ext-pdo": "*",
"doctrine/coding-standard": "^9",
"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.22"
"vimeo/psalm": "^4.30 || ^5.4"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Expand Up @@ -4,7 +4,7 @@ includes:

parameters:
level: max
phpVersion: 80103
phpVersion: 80200
paths:
- src
- tests
Expand Down
2 changes: 1 addition & 1 deletion psalm.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<psalm
errorLevel="7"
phpVersion="8.1"
phpVersion="8.2"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
Expand Down
4 changes: 1 addition & 3 deletions src/Doctrine/Instantiator/Instantiator.php
Expand Up @@ -60,9 +60,7 @@ final class Instantiator implements InstantiatorInterface
public function instantiate($className)
{
if (isset(self::$cachedCloneables[$className])) {
/**
* @phpstan-var T
*/
/** @phpstan-var T */
$cachedCloneable = self::$cachedCloneables[$className];

return clone $cachedCloneable;
Expand Down
Expand Up @@ -31,41 +31,31 @@ public function init(): void
$this->instantiator->instantiate(UnCloneableAsset::class);
}

/**
* @Revs(20000)
*/
/** @Revs(20000) */
public function benchInstantiateSelf(): void
{
$this->instantiator->instantiate(self::class);
}

/**
* @Revs(20000)
*/
/** @Revs(20000) */
public function benchInstantiateInternalClass(): void
{
$this->instantiator->instantiate(ArrayObject::class);
}

/**
* @Revs(20000)
*/
/** @Revs(20000) */
public function benchInstantiateSimpleSerializableAssetClass(): void
{
$this->instantiator->instantiate(SimpleSerializableAsset::class);
}

/**
* @Revs(20000)
*/
/** @Revs(20000) */
public function benchInstantiateSerializableArrayObjectAsset(): void
{
$this->instantiator->instantiate(SerializableArrayObjectAsset::class);
}

/**
* @Revs(20000)
*/
/** @Revs(20000) */
public function benchInstantiateUnCloneableAsset(): void
{
$this->instantiator->instantiate(UnCloneableAsset::class);
Expand Down
4 changes: 1 addition & 3 deletions tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php
Expand Up @@ -105,9 +105,7 @@ class $className {}
PHP
);

/**
* @phpstan-var class-string
*/
/** @phpstan-var class-string */
$classNameWithNamespace = $namespace . '\\' . $className;

$instance = $this->instantiator->instantiate($classNameWithNamespace);
Expand Down
Expand Up @@ -36,9 +36,7 @@ public function unserialize($serialized): void
throw new BadMethodCallException('Not supposed to be called!');
}

/**
* @param mixed[] $data
*/
/** @param mixed[] $data */
public function __unserialize($data): void
{
throw new BadMethodCallException('Not supposed to be called!');
Expand Down
Expand Up @@ -37,17 +37,13 @@ public function unserialize($serialized): void
throw new BadMethodCallException('Not supposed to be called!');
}

/**
* @return mixed[]
*/
/** @return mixed[] */
public function __serialize(): array
{
return [];
}

/**
* @param mixed[] $data
*/
/** @param mixed[] $data */
public function __unserialize($data): void
{
throw new BadMethodCallException('Not supposed to be called!');
Expand Down

0 comments on commit 6f1e0c4

Please sign in to comment.