Skip to content

Conversation

@distantnative
Copy link
Member

@distantnative distantnative commented Jun 24, 2025

Description

Caution

Code coverage drops a bit. But this is actually more accurate as we are indeed missing tests, especially for the Sql abstract class

Switching over package by package (or smaller units) to PHPUnit PHP annotations to see how the code coverage is affected.

The changes were mostly created automatically with Rector:

<?php

declare(strict_types = 1);

use Rector\Config\RectorConfig;
use Rector\PHPUnit\AnnotationsToAttributes\Rector\Class_\CoversAnnotationWithValueToAttributeRector;
use Rector\PHPUnit\AnnotationsToAttributes\Rector\ClassMethod\DataProviderAnnotationToAttributeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;

return RectorConfig::configure()
	->withImportNames()
	->withPaths([
		__DIR__ . '/tests/Database',
	])
	->withRules([
		CoversAnnotationWithValueToAttributeRector::class,
		DataProviderAnnotationToAttributeRector::class,
		AddVoidReturnTypeWhereNoReturnRector::class
	]);

Changelog

🧹 Housekeeping

  • Using PHP attributes for PHPUnit annotations

Ready?

  • In-code documentation (wherever needed)
  • Unit tests for fixed bug/feature

@distantnative distantnative added this to the 5.1.0 milestone Jun 24, 2025
@distantnative distantnative self-assigned this Jun 24, 2025
@distantnative distantnative force-pushed the v51/test/database-pkg-phpunit-attributes branch from ac533bb to fa3b9cc Compare June 24, 2025 19:00
@distantnative distantnative force-pushed the v51/test/database-pkg-phpunit-attributes branch from fa3b9cc to 27485e9 Compare July 8, 2025 13:20
@distantnative distantnative requested a review from a team July 8, 2025 13:22
@distantnative distantnative marked this pull request as ready for review July 8, 2025 13:22
@bastianallgeier bastianallgeier merged commit 91624f1 into develop-minor Jul 9, 2025
14 checks passed
@bastianallgeier bastianallgeier deleted the v51/test/database-pkg-phpunit-attributes branch July 9, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants