Skip to content
This repository was archived by the owner on Aug 21, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions composer-dependency-analyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,27 @@
// Adjusting scanned paths
->addPathToScan(__DIR__ . '/src', isDev: false)
->addPathToScan(__DIR__ . '/tests', isDev: true)
->addPathToScan(__DIR__ . '/vendor', isDev: false)
->addPathToExclude(__DIR__ . '/vendor/rector/rector')
->addPathToExclude(__DIR__ . '/vendor/phpstan/phpstan')
// applies only to directory scanning, not directly listed files
->setFileExtensions(['php'])

// Ignoring errors in vendor directory
->ignoreErrorsOnPath(__DIR__ . '/vendor', [ErrorType::SHADOW_DEPENDENCY])
->ignoreErrorsOnPath(__DIR__ . '/vendor', [ErrorType::UNKNOWN_FUNCTION])
->ignoreErrorsOnPath(__DIR__ . '/vendor', [ErrorType::UNKNOWN_CLASS])
->ignoreErrorsOnPath(__DIR__ . '/vendor', [ErrorType::DEV_DEPENDENCY_IN_PROD])
->ignoreErrorsOnPath(__DIR__ . '/src', [ErrorType::DEV_DEPENDENCY_IN_PROD])

// do not complain about some modules
->ignoreErrorsOnPackage('mimmi20/coding-standard', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPackage('phpstan/extension-installer', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPackage('phpstan/phpstan-deprecation-rules', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPackage('ergebnis/composer-normalize', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPackage('infection/infection', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPackage('phpstan/phpstan', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPackage('rector/rector', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPackage('shipmonk/composer-dependency-analyser', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPackage('symplify/phpstan-rules', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPackage('tomasvotruba/cognitive-complexity', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPackage('tomasvotruba/type-coverage', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPackage('tomasvotruba/unused-public', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPackage('phpstan/phpstan-phpunit', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPackage('rector/type-perfect', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPackage(
'jbelien/phpstan-sarif-formatter',
[ErrorType::UNUSED_DEPENDENCY],
Expand Down
19 changes: 6 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,21 @@
"psr/container": "^1.1.2"
},
"require-dev": {
"ext-ctype": "*",
"ext-dom": "*",
"ext-simplexml": "*",
"ext-tokenizer": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
"ergebnis/composer-normalize": "^2.52.0",
"infection/infection": "^0.34.0",
"infection/infection": "^0.34.1",
"jbelien/phpstan-sarif-formatter": "^1.2.0",
"laminas/laminas-modulemanager": "^2.19.0",
"laminas/laminas-servicemanager": "^3.24.0",
"mikey179/vfsstream": "^1.6.12",
"mimmi20/coding-standard": "^6.2.5",
"nikic/php-parser": "^5.7.0",
"phpstan/extension-installer": "^1.4.3",
"phpstan/phpstan": "^2.2.3",
"phpstan/phpstan-deprecation-rules": "^2.0.4",
"phpstan/phpstan": "^2.2.7",
"phpstan/phpstan-deprecation-rules": "^2.0.5",
"phpstan/phpstan-phpunit": "^2.0.16",
"phpunit/phpunit": "^12.5.8",
"rector/rector": "^2.5.2",
"rector/type-perfect": "^2.1.4",
"rector/rector": "^2.5.9",
"rector/type-perfect": "^2.2.0",
"shipmonk/composer-dependency-analyser": "^1.8.4",
"symfony/process": "^7.3.4",
"symplify/phpstan-rules": "^14.10.0",
"tomasvotruba/cognitive-complexity": "^1.2.0",
"tomasvotruba/type-coverage": "^2.2.1",
Expand Down
8 changes: 3 additions & 5 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector;
use Rector\DeadCode\Rector\If_\RemoveDeadInstanceOfRector;
use Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector;
use Rector\Php81\Rector\Array_\FirstClassCallableRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\DeadCode\Rector\StmtsAwareInterface\RemoveDeadInstanceOfAssertRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
Expand All @@ -30,16 +29,15 @@
$rectorConfig->sets([
SetList::DEAD_CODE,
LevelSetList::UP_TO_PHP_83,
PHPUnitSetList::PHPUNIT_100,
PHPUnitSetList::PHPUNIT_120,
]);

$rectorConfig->skip(
[
NullToStrictStringFuncCallArgRector::class,
RemoveDeadInstanceOfRector::class,
FirstClassCallableRector::class,
RemoveAlwaysTrueIfConditionRector::class,
RemoveParentCallWithoutParentRector::class,
RemoveDeadInstanceOfAssertRector::class,
],
);
};
2 changes: 1 addition & 1 deletion tests/View/Helper/ViteUrlTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php

Check warning on line 1 in tests/View/Helper/ViteUrlTest.php

View workflow job for this annotation

GitHub Actions / Project Analysis / Check Coding Standards with PHP-CS-Fixer (ubuntu-latest, 8.3)

Found violation(s) of type: self_static_accessor

Check warning on line 1 in tests/View/Helper/ViteUrlTest.php

View workflow job for this annotation

GitHub Actions / Project Analysis / Check Coding Standards with PHP-CS-Fixer (ubuntu-latest, 8.3)

Found violation(s) of type: php_unit_test_case_static_method_calls

Check warning on line 1 in tests/View/Helper/ViteUrlTest.php

View workflow job for this annotation

GitHub Actions / Project Analysis / Check Coding Standards with PHP-CS-Fixer (ubuntu-latest, 8.3)

Found violation(s) of type: self_static_accessor

Check warning on line 1 in tests/View/Helper/ViteUrlTest.php

View workflow job for this annotation

GitHub Actions / Project Analysis / Check Coding Standards with PHP-CS-Fixer (ubuntu-latest, 8.3)

Found violation(s) of type: php_unit_test_case_static_method_calls

/**
* This file is part of the mimmi20/laminasviewrenderer-vite-url package.
Expand Down Expand Up @@ -73,14 +73,14 @@
* @throws NoPreviousThrowableException
* @throws \PHPUnit\Framework\MockObject\Exception
*/
public function testFileWithWrongRenderer(): void

Check failure on line 76 in tests/View/Helper/ViteUrlTest.php

View workflow job for this annotation

GitHub Actions / Project Analysis / Static Code Analysis with PHPStan (ubuntu-latest, 8.3)

Method Mimmi20\LaminasView\ViteUrl\View\Helper\ViteUrlTest::testFileWithWrongRenderer() has PHPUnit\Framework\Exception in PHPDoc `@throws` tag but it's not thrown.

Check failure on line 76 in tests/View/Helper/ViteUrlTest.php

View workflow job for this annotation

GitHub Actions / Project Analysis / Static Code Analysis with PHPStan (ubuntu-latest, 8.3)

Method Mimmi20\LaminasView\ViteUrl\View\Helper\ViteUrlTest::testFileWithWrongRenderer() has PHPUnit\Event\NoPreviousThrowableException in PHPDoc `@throws` tag but it's not thrown.

Check failure on line 76 in tests/View/Helper/ViteUrlTest.php

View workflow job for this annotation

GitHub Actions / Project Analysis / Static Code Analysis with PHPStan (ubuntu-latest, 8.3)

Method Mimmi20\LaminasView\ViteUrl\View\Helper\ViteUrlTest::testFileWithWrongRenderer() has PHPUnit\Framework\Exception in PHPDoc `@throws` tag but it's not thrown.

Check failure on line 76 in tests/View/Helper/ViteUrlTest.php

View workflow job for this annotation

GitHub Actions / Project Analysis / Static Code Analysis with PHPStan (ubuntu-latest, 8.3)

Method Mimmi20\LaminasView\ViteUrl\View\Helper\ViteUrlTest::testFileWithWrongRenderer() has PHPUnit\Event\NoPreviousThrowableException in PHPDoc `@throws` tag but it's not thrown.
{
$publicDir = 'test-public-dir';
$buildDir = 'test-build-dir';

$object = new ViteUrl($publicDir, $buildDir);

$view = $this->createMock(RendererInterface::class);
$view = $this->createStub(RendererInterface::class);

$object->setView($view);

Expand All @@ -97,7 +97,7 @@
* @throws NoPreviousThrowableException
* @throws \PHPUnit\Framework\MockObject\Exception
*/
public function testFileWithHotRelaoding(): void

Check failure on line 100 in tests/View/Helper/ViteUrlTest.php

View workflow job for this annotation

GitHub Actions / Project Analysis / Static Code Analysis with PHPStan (ubuntu-latest, 8.3)

Method Mimmi20\LaminasView\ViteUrl\View\Helper\ViteUrlTest::testFileWithHotRelaoding() has PHPUnit\Event\NoPreviousThrowableException in PHPDoc `@throws` tag but it's not thrown.

Check failure on line 100 in tests/View/Helper/ViteUrlTest.php

View workflow job for this annotation

GitHub Actions / Project Analysis / Static Code Analysis with PHPStan (ubuntu-latest, 8.3)

Method Mimmi20\LaminasView\ViteUrl\View\Helper\ViteUrlTest::testFileWithHotRelaoding() has PHPUnit\Event\NoPreviousThrowableException in PHPDoc `@throws` tag but it's not thrown.
{
$root = vfsStream::setup('root');
$hotUrl = 'https://test.hot.dir';
Expand Down Expand Up @@ -134,7 +134,7 @@
* @throws NoPreviousThrowableException
* @throws \PHPUnit\Framework\MockObject\Exception
*/
public function testFileWithHotRelaoding3(): void

Check failure on line 137 in tests/View/Helper/ViteUrlTest.php

View workflow job for this annotation

GitHub Actions / Project Analysis / Static Code Analysis with PHPStan (ubuntu-latest, 8.3)

Method Mimmi20\LaminasView\ViteUrl\View\Helper\ViteUrlTest::testFileWithHotRelaoding3() has PHPUnit\Framework\Exception in PHPDoc `@throws` tag but it's not thrown.

Check failure on line 137 in tests/View/Helper/ViteUrlTest.php

View workflow job for this annotation

GitHub Actions / Project Analysis / Static Code Analysis with PHPStan (ubuntu-latest, 8.3)

Method Mimmi20\LaminasView\ViteUrl\View\Helper\ViteUrlTest::testFileWithHotRelaoding3() has PHPUnit\Event\NoPreviousThrowableException in PHPDoc `@throws` tag but it's not thrown.

Check failure on line 137 in tests/View/Helper/ViteUrlTest.php

View workflow job for this annotation

GitHub Actions / Project Analysis / Static Code Analysis with PHPStan (ubuntu-latest, 8.3)

Method Mimmi20\LaminasView\ViteUrl\View\Helper\ViteUrlTest::testFileWithHotRelaoding3() has PHPUnit\Framework\Exception in PHPDoc `@throws` tag but it's not thrown.

Check failure on line 137 in tests/View/Helper/ViteUrlTest.php

View workflow job for this annotation

GitHub Actions / Project Analysis / Static Code Analysis with PHPStan (ubuntu-latest, 8.3)

Method Mimmi20\LaminasView\ViteUrl\View\Helper\ViteUrlTest::testFileWithHotRelaoding3() has PHPUnit\Event\NoPreviousThrowableException in PHPDoc `@throws` tag but it's not thrown.
{
$root = vfsStream::setup('root');
$name = 'test.js';
Expand Down
Loading