Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/composer.lock
/phpstan.neon
/vendor
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@
"composer/composer": "^2.9",
"phpunit/phpunit": "^9.5",
"symfony/process": "^6",
"dms/phpunit-arraysubset-asserts": "^0.5.0"
"dms/phpunit-arraysubset-asserts": "^0.5.0",
"phpstan/phpstan": "^2.1"
},
"scripts": {
"phpstan": "phpstan",
"test": [
"phpunit ./tests --debug"
]
Expand Down
7 changes: 7 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
parameters:
ignoreErrors:
-
message: '#^Instantiated class Tuf\\Tests\\FixtureBuilder\\Fixture not found\.$#'
identifier: class.notFound
count: 1
path: tests/FunctionalTestBase.php
8 changes: 8 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
includes:
- phpstan-baseline.neon

parameters:
level: 0
paths:
- src
- tests
2 changes: 1 addition & 1 deletion src/ComposerFileStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ComposerFileStorage extends FileStorage
/**
* {@inheritDoc}
*/
public function __construct(string $basePath)
final public function __construct(string $basePath)
{
(new Filesystem())->ensureDirectoryExists($basePath);
parent::__construct($basePath);
Expand Down
2 changes: 2 additions & 0 deletions tests/FunctionalTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ protected function setUp(): void
mkdir($this->workingDir . '/tuf', recursive: true);

// Make PHP-TUF's fixture builder available.
// @TODO: Consider moving the fixture builder to its own library that
// both php-tuf and composer-integration can pull in via require-dev.
$loaders = ClassLoader::getRegisteredLoaders();
reset($loaders)->addPsr4('Tuf\\Tests\\', key($loaders) . '/php-tuf/php-tuf/tests');

Expand Down
Loading