Release 2.25 (#5109)

This commit is contained in:
Kevin Papst
2024-11-21 22:44:49 +01:00
committed by GitHub
parent 49eb7068c9
commit 0c26a2678e
261 changed files with 6431 additions and 7426 deletions

View File

@@ -22,7 +22,7 @@ class DemoFull
#[Exporter\Expose(name: 'fake-name', label: 'Protected-Property', type: 'boolean')]
protected bool $protectedProperty = false;
#[Exporter\Expose(label: 'Private-Property', type: 'integer', translationDomain: 'test')]
private int $privateProperty = 123; // @phpstan-ignore-line
private int $privateProperty = 123; // @phpstan-ignore property.onlyWritten
#[Exporter\Expose(label: 'Public-Method')]
public function publicMethod(): string
@@ -47,7 +47,7 @@ class DemoFull
return 12345;
}
// @phpstan-ignore-next-line
// @phpstan-ignore method.unused
#[Exporter\Expose(name: 'fake-method', label: 'Private-Method', type: 'boolean', translationDomain: 'bar')]
private function privateMethod(): bool
{

View File

@@ -14,5 +14,5 @@ use App\Export\Annotation as Exporter;
class ExpressionOnProperty
{
#[Exporter\Expose(name: 'accessor', label: 'accessor', exp: 'object.foo')]
private $foo; // @phpstan-ignore-line
private $foo; // @phpstan-ignore missingType.property, property.unused
}

View File

@@ -77,7 +77,7 @@ class AnnotationExtractorTest extends TestCase
$this->expectException(ExtractorException::class);
$this->expectExceptionMessage('AnnotationExtractor needs a non-empty class name for work');
/* @phpstan-ignore-next-line */
/* @phpstan-ignore argument.type */
$sut->extract(new \stdClass());
}

View File

@@ -63,7 +63,7 @@ class MetaFieldExtractorTest extends TestCase
$this->expectException(ExtractorException::class);
$this->expectExceptionMessage('MetaFieldExtractor needs a MetaDisplayEventInterface instance for work');
/* @phpstan-ignore-next-line */
/* @phpstan-ignore argument.type */
$sut->extract(new \stdClass());
}
}

View File

@@ -62,7 +62,7 @@ class UserPreferenceExtractorTest extends TestCase
$this->expectException(ExtractorException::class);
$this->expectExceptionMessage('UserPreferenceExtractor needs a UserPreferenceDisplayEvent instance for work');
/* @phpstan-ignore-next-line */
/* @phpstan-ignore argument.type */
$sut->extract(new \stdClass());
}
}

View File

@@ -28,12 +28,18 @@ class SpreadsheetExporterTest extends TestCase
$sut->registerCellFormatter('foo', new class() implements CellFormatterInterface {
public function setFormattedValue(Worksheet $sheet, int $column, int $row, $value): void
{
if (!\is_scalar($value)) {
throw new \InvalidArgumentException('Only scalar values are supported');
}
$sheet->setCellValue([$column, $row], '##' . $value . '##');
}
});
$sut->registerCellFormatter('bar', new class() implements CellFormatterInterface {
public function setFormattedValue(Worksheet $sheet, int $column, int $row, $value): void
{
if (!\is_scalar($value)) {
throw new \InvalidArgumentException('Only scalar values are supported');
}
$sheet->setCellValue([$column, $row], '~' . $value . '~');
}
});