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
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.2']
php-version: ['8.3']
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.2']
php-version: ['8.3', '8.4']
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
Expand All @@ -45,7 +45,7 @@ jobs:
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}-
- run: make composer.lock pkg-install tools/psalm/vendor/bin/psalm tools/phpunit/vendor/bin/phpunit
- run: make composer.lock pkg-install tools/psalm/vendor/bin/psalm tools/phpunit/bin/run
- name: Get changed PHP files
if: github.ref != 'refs/heads/main'
id: changed-php-files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.2', '8.3']
php-version: ['8.3', '8.4']
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
Expand Down
5 changes: 3 additions & 2 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

$finder = Finder::create()
->in(__DIR__)
->in(__DIR__ . '/tools/chorale/src/')
->exclude('build')
->exclude('docs')
->exclude('tools')
Expand All @@ -21,8 +22,8 @@
->setRules([
// Rule sets
'@PER-CS' => true,
'@PHP80Migration:risky' => true,
'@PHP82Migration' => true,
'@PHP82Migration:risky' => true,
'@PHP83Migration' => true,
'@PHPUnit100Migration:risky' => true,

// Rules
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CHURN = tools/churn/vendor/bin/churn
INFECTION = tools/infection/vendor/bin/infection
PHP_CS_FIXER = tools/php-cs-fixer/vendor/bin/php-cs-fixer
PHPACTOR = tools/phpactor/vendor/bin/phpactor
PHPUNIT = tools/phpunit/vendor/bin/phpunit
PHPUNIT = tools/phpunit/bin/run
PSALM = tools/psalm/vendor/bin/psalm
RECTOR = tools/rector/vendor/bin/rector
# end: Tools
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@
}
},
"require-dev": {
"phpunit/phpunit": "^10.4",
"symfony/http-foundation": "^5 || ^6 || ^7",
"symfony/messenger": "^5 || ^6 || ^7",
"symfony/serializer": "^5 || ^6 || ^7"
Expand All @@ -246,4 +245,4 @@
"@php -r \"if(file_exists('./.git')&&file_exists('./build/hooks/pre-commit')){copy('./build/hooks/pre-commit','./.git/hooks/pre-commit');chmod('./.git/hooks/pre-commit',0755);}\""
]
}
}
}
32 changes: 30 additions & 2 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,28 @@
findUnusedVariablesAndParams="true"
findUnusedBaselineEntry="false"
findUnusedCode="true"
phpVersion="8.3"
autoloader="vendor/autoload.php"
>
<projectFiles>
<directory name="src/SonsOfPHP"/>
<ignoreFiles>
<!-- Ignore test suites across packages to reduce noise like UnusedClass -->
<directory name="src/SonsOfPHP/Bard/Tests"/>
<directory name="src/SonsOfPHP/Bridge/*/*/Tests"/>
<directory name="src/SonsOfPHP/Bridge/*/*/*/Tests"/>
<directory name="src/SonsOfPHP/Bundle/*/Tests"/>
<directory name="src/SonsOfPHP/Component/*/Tests"/>
<!-- Ignore vendors -->
<directory name="src/SonsOfPHP/Bard/vendor/*"/>
<directory name="src/SonsOfPHP/Bridge/*/*/vendor/*"/>
<directory name="src/SonsOfPHP/Bridge/*/*/*/vendor/*"/>
<directory name="src/SonsOfPHP/Bundle/*/vendor/*"/>
<directory name="src/SonsOfPHP/Component/*/vendor/*"/>
<directory name="src/SonsOfPHP/Contract/*/vendor/**"/>
<directory name="vendor/**"/>
<!-- Ignore Rector config which references Rector classes outside our autoload -->
<file name="rector.php" />
</ignoreFiles>
</projectFiles>
<extraFiles>
Expand All @@ -32,7 +42,25 @@
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
<issueHandlers>
<!--<PossiblyUnusedMethod errorLevel="info" />-->
<!--<UnusedClass errorLevel="info" />-->
<UnusedClass errorLevel="info" />
<UnnecessaryVarAnnotation errorLevel="info" />
<!-- Keep other findings visible but non-blocking for DX -->
<PossiblyUnusedMethod errorLevel="info" />
<!-- Psalm false-positives in Bard console helpers and operations naming -->
<UndefinedInterfaceMethod>
<errorLevel type="info">
<directory name="src/SonsOfPHP/Bard/src/Console/Command" />
</errorLevel>
</UndefinedInterfaceMethod>
<ParamNameMismatch>
<errorLevel type="info">
<directory name="src/SonsOfPHP/Bard/src/Operation" />
</errorLevel>
</ParamNameMismatch>
<InvalidArgument errorLevel="info" />
<UndefinedClass errorLevel="info" />
<NullableReturnStatement errorLevel="info" />
<InvalidCatch errorLevel="info" />
<LessSpecificImplementedReturnType errorLevel="info" />
</issueHandlers>
</psalm>
4 changes: 3 additions & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@
->withCache(__DIR__ . '/build/cache/rector')
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tools/chorale',
])
->withSkip([
__DIR__ . '/src/SonsOfPHP/*/vendor/*',
__DIR__ . '/src/SonsOfPHP/*/*/vendor/*',
__DIR__ . '/src/SonsOfPHP/*/*/*/vendor/*',
__DIR__ . '/src/SonsOfPHP/*/*/*/*/vendor/*',
__DIR__ . '*/vendor/*',
])
// This should be the same version that is found in composer.json file
->withPhpSets(
php82: true,
php83: true,
)
//->withAttributesSets(
// phpunit: true,
Expand Down
6 changes: 2 additions & 4 deletions src/SonsOfPHP/Bard/Tests/Console/Command/AddCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,12 @@
#[UsesClass(AddPackageOperation::class)]
final class AddCommandTest extends TestCase
{
private Application $application;

private AddCommand $command;

protected function setUp(): void
{
$this->application = new Application();
$this->command = $this->application->get('add');
$application = new Application();
$this->command = $application->get('add');
}

public function testItsNameIsCorrect(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,12 @@
#[UsesClass(AddPackageOperation::class)]
final class CopyCommandTest extends TestCase
{
private Application $application;

private CopyCommand $command;

protected function setUp(): void
{
$this->application = new Application();
$this->command = $this->application->get('copy');
$application = new Application();
$this->command = $application->get('copy');
}

public function testItExecutesSuccessfully(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,12 @@
#[UsesClass(UpdateRequireDevSectionOperation::class)]
final class MergeCommandTest extends TestCase
{
private Application $application;

private MergeCommand $command;

protected function setUp(): void
{
$this->application = new Application();
$this->command = $this->application->get('merge');
$application = new Application();
$this->command = $application->get('merge');
}

public function testItExecutesSuccessfully(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,12 @@
#[UsesClass(AddPackageOperation::class)]
final class PushCommandTest extends TestCase
{
private Application $application;

private PushCommand $command;

protected function setUp(): void
{
$this->application = new Application();
$this->command = $this->application->get('push');
$application = new Application();
$this->command = $application->get('push');
}

public function testItExecutesSuccessfully(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,12 @@
#[UsesClass(Version::class)]
final class ReleaseCommandTest extends TestCase
{
private Application $application;

private ReleaseCommand $command;

protected function setUp(): void
{
$this->application = new Application();
$this->command = $this->application->get('release');
$application = new Application();
$this->command = $application->get('release');
}

public function testItsNameIsCorrect(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@
#[UsesClass(JsonFile::class)]
final class SplitCommandTest extends TestCase
{
private Application $application;

private SplitCommand $command;

protected function setUp(): void
{
$this->application = new Application();
$this->command = $this->application->get('split');
$application = new Application();
$this->command = $application->get('split');
}

public function testItsNameIsCorrect(): void
Expand Down
4 changes: 2 additions & 2 deletions src/SonsOfPHP/Bard/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"bin/bard"
],
"require": {
"php": ">=8.2",
"php": ">=8.3",
"sonsofphp/event-dispatcher": "^0.3.x-dev",
"sonsofphp/json": "^0.3.x-dev",
"sonsofphp/logger": "^0.3.x-dev",
Expand Down Expand Up @@ -71,4 +71,4 @@
"url": "https://tidelift.com/subscription/pkg/packagist-sonsofphp-sonsofphp"
}
]
}
}
4 changes: 2 additions & 2 deletions src/SonsOfPHP/Bard/src/Console/Command/ReleaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
*/
final class ReleaseCommand extends AbstractCommand
{
private VersionInterface|null $currentVersion = null;
private ?VersionInterface $currentVersion = null;

private VersionInterface|null $releaseVersion = null;
private ?VersionInterface $releaseVersion = null;

private bool $isDryRun = true;

Expand Down
4 changes: 2 additions & 2 deletions src/SonsOfPHP/Bridge/Aws/Filesystem/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=8.2",
"php": ">=8.3",
"sonsofphp/filesystem": "^0.3.x-dev",
"aws/aws-sdk-php": "^3.0"
},
Expand All @@ -55,4 +55,4 @@
"url": "https://tidelift.com/subscription/pkg/packagist-sonsofphp-sonsofphp"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=8.2",
"php": ">=8.3",
"doctrine/collections": "^2",
"sonsofphp/pager": "^0.3.x-dev"
},
Expand All @@ -53,4 +53,4 @@
"url": "https://tidelift.com/subscription/pkg/packagist-sonsofphp-sonsofphp"
}
]
}
}
4 changes: 2 additions & 2 deletions src/SonsOfPHP/Bridge/Doctrine/DBAL/Pager/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=8.2",
"php": ">=8.3",
"doctrine/dbal": "^3",
"sonsofphp/pager": "^0.3.x-dev"
},
Expand All @@ -53,4 +53,4 @@
"url": "https://tidelift.com/subscription/pkg/packagist-sonsofphp-sonsofphp"
}
]
}
}
4 changes: 2 additions & 2 deletions src/SonsOfPHP/Bridge/Doctrine/EventSourcing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=8.2",
"php": ">=8.3",
"doctrine/dbal": "^3",
"sonsofphp/event-sourcing": "^0.3.x-dev"
},
Expand All @@ -53,4 +53,4 @@
"url": "https://tidelift.com/subscription/pkg/packagist-sonsofphp-sonsofphp"
}
]
}
}
4 changes: 2 additions & 2 deletions src/SonsOfPHP/Bridge/Doctrine/ORM/Pager/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=8.2",
"php": ">=8.3",
"doctrine/orm": "^2 || ^3",
"sonsofphp/pager": "^0.3.x-dev"
},
Expand All @@ -53,4 +53,4 @@
"url": "https://tidelift.com/subscription/pkg/packagist-sonsofphp-sonsofphp"
}
]
}
}
4 changes: 2 additions & 2 deletions src/SonsOfPHP/Bridge/LiipImagine/Filesystem/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=8.2",
"php": ">=8.3",
"sonsofphp/filesystem": "^0.3.x-dev",
"liip/imagine-bundle": "^2.0"
},
Expand All @@ -58,4 +58,4 @@
"url": "https://tidelift.com/subscription/pkg/packagist-sonsofphp-sonsofphp"
}
]
}
}
4 changes: 2 additions & 2 deletions src/SonsOfPHP/Bridge/Symfony/Cqrs/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"minimum-stability": "dev",
"require": {
"php": ">=8.2",
"php": ">=8.3",
"sonsofphp/cqrs": "^0.3.x-dev",
"symfony/options-resolver": "^6 || ^7"
},
Expand All @@ -67,4 +67,4 @@
"url": "https://tidelift.com/subscription/pkg/packagist-sonsofphp-sonsofphp"
}
]
}
}
Loading
Loading