Skip to content
Merged
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
11 changes: 8 additions & 3 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ jobs:
cs:
uses: bedita/github-workflows/.github/workflows/php-cs.yml@v2
with:
php_versions: '["8.3"]'
php_versions: '["8.5"]'

psalm:
uses: bedita/github-workflows/.github/workflows/php-psalm.yml@v2
with:
php_versions: '["8.5"]'

stan:
uses: bedita/github-workflows/.github/workflows/php-stan.yml@v2
with:
php_versions: '["8.3"]'
php_versions: '["8.5"]'

unit:
name: 'Run unit tests'
Expand All @@ -30,7 +35,7 @@ jobs:

strategy:
matrix:
php-version: [8.3]
php-version: [8.3, 8.4, 8.5]

steps:
- name: 'Checkout current revision'
Expand Down
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ build:
analysis:
environment:
php:
version: 8.3.3
version: 8.3.16
tests:
override:
- php-scrutinizer-run
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Github Actions](https://github.com/bedita/dev-tools/workflows/php/badge.svg)](https://github.com/bedita/dev-tools/actions?query=workflow%3Aphp)
[![codecov](https://codecov.io/gh/bedita/dev-tools/branch/master/graph/badge.svg)](https://codecov.io/gh/bedita/dev-tools)
[![phpstan](https://img.shields.io/badge/PHPStan-level%209-brightgreen.svg)](https://phpstan.org)
[![psalm](https://img.shields.io/badge/psalm-level%208-brightgreen.svg)](https://psalm.dev)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/bedita/dev-tools/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/bedita/dev-tools/?branch=master)
[![image](https://img.shields.io/packagist/v/bedita/dev-tools.svg?label=stable)](https://packagist.org/packages/bedita/dev-tools)
[![image](https://img.shields.io/github/license/bedita/dev-tools.svg)](https://github.com/bedita/dev-tools/blob/master/LICENSE.LGPL)
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"phpstan/phpstan": "^1.10",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpunit/phpunit": "^11.5 || ^12.1"
"phpunit/phpunit": "^11.5 || ^12.1",
"vimeo/psalm": "^6.8"
},
"autoload": {
"psr-4": {
Expand All @@ -54,6 +55,7 @@
],
"cs-check": "vendor/bin/phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests",
"cs-fix": "vendor/bin/phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests",
"psalm": "vendor/bin/psalm",
"stan": "vendor/bin/phpstan analyse",
"test": "vendor/bin/phpunit --colors=always",
"coverage": "vendor/bin/phpunit --colors=always --coverage-html coverage"
Expand Down
23 changes: 23 additions & 0 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<psalm
errorLevel="8"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedBaselineEntry="true"
findUnusedCode="false"
>
<issueHandlers>
<ClassMustBeFinal errorLevel="suppress" />
<MissingOverrideAttribute errorLevel="suppress" />
<ImplicitToStringCast errorLevel="suppress" />
<UndefinedConstant errorLevel="suppress" />
</issueHandlers>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>
10 changes: 0 additions & 10 deletions tests/TestCase/Command/ChangeLogCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,11 @@
use Cake\Routing\Router;
use Cake\TestSuite\TestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversMethod;

/**
* {@see BEdita\DevTools\Command\ChangeLogCommand} Test Case
*/
#[CoversClass(ChangeLogCommand::class)]
#[CoversMethod(ChangeLogCommand::class, 'buildOptionParser')]
#[CoversMethod(ChangeLogCommand::class, 'classify')]
#[CoversMethod(ChangeLogCommand::class, 'createChangeLog')]
#[CoversMethod(ChangeLogCommand::class, 'execute')]
#[CoversMethod(ChangeLogCommand::class, 'fetchPrs')]
#[CoversMethod(ChangeLogCommand::class, 'filterItems')]
#[CoversMethod(ChangeLogCommand::class, 'initialize')]
#[CoversMethod(ChangeLogCommand::class, 'loglines')]
#[CoversMethod(ChangeLogCommand::class, 'saveChangeLog')]
class ChangeLogCommandTest extends TestCase
{
use ConsoleIntegrationTestTrait;
Expand Down
6 changes: 0 additions & 6 deletions tests/TestCase/Command/ResourcesMigrationCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,11 @@
use Cake\TestSuite\StringCompareTrait;
use Cake\TestSuite\TestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversMethod;

/**
* Test resources migration task
*/
#[CoversClass(ResourcesMigrationCommand::class)]
#[CoversMethod(ResourcesMigrationCommand::class, 'bake')]
#[CoversMethod(ResourcesMigrationCommand::class, 'buildOptionParser')]
#[CoversMethod(ResourcesMigrationCommand::class, 'fileName')]
#[CoversMethod(ResourcesMigrationCommand::class, 'name')]
#[CoversMethod(ResourcesMigrationCommand::class, 'template')]
class ResourcesMigrationCommandTest extends TestCase
{
use ConsoleIntegrationTestTrait;
Expand Down
3 changes: 0 additions & 3 deletions tests/TestCase/DevToolsPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,13 @@
use Cake\Http\ServerRequest;
use Cake\Routing\Middleware\AssetMiddleware;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

/**
* Test {@see \BEdita\DevTools\DevToolsPlugin}.
*/
#[CoversClass(DevToolsPlugin::class)]
#[CoversMethod(DevToolsPlugin::class, 'bootstrap')]
#[CoversMethod(DevToolsPlugin::class, 'middleware')]
class DevToolsPluginTest extends TestCase
{
/**
Expand Down