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 composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"ext-json": "*",
"ibexa/admin-ui": "~6.0.x-dev",
"ibexa/core": "~6.0.x-dev",
"ibexa/doctrine-schema": "~6.0.x-dev",
"ibexa/twig-components": "~6.0.x-dev",
"zetacomponents/system-information": "^1.1.1"
},
Expand All @@ -20,7 +21,6 @@
"ibexa/content-forms": "~6.0.x-dev",
"ibexa/design-engine": "~6.0.x-dev",
"ibexa/design-system-twig": "~6.0.x-dev",
"ibexa/doctrine-schema": "~6.0.x-dev",
"ibexa/fieldtype-richtext": "~6.0.x-dev",
"ibexa/http-cache": "~6.0.x-dev",
"ibexa/notifications": "~6.0.x-dev",
Expand Down
7 changes: 0 additions & 7 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
parameters:
ignoreErrors:
-
message: '#^Parameter \#4 \$condition of method Doctrine\\DBAL\\Query\\QueryBuilder\:\:innerJoin\(\) expects string\|null, Doctrine\\DBAL\\Query\\Expression\\CompositeExpression given\.$#'
identifier: argument.type
count: 1
path: src/lib/Storage/Metrics/DraftsCountMetrics.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
use Doctrine\DBAL\Connection;
use Ibexa\Bundle\SystemInfo\SystemInfo\Value\RepositoryMetrics;
use Ibexa\Bundle\SystemInfo\SystemInfo\Value\RepositorySystemInfo;
use Ibexa\Core\Base\Exceptions\InvalidArgumentException;
use Ibexa\Core\Persistence\Doctrine\DatabasePlatformResolver;
use Ibexa\Contracts\DoctrineSchema\Database\DatabasePlatformResolver;
use Ibexa\SystemInfo\Storage\MetricsProvider;

/**
Expand Down Expand Up @@ -51,11 +50,8 @@ private function getDatabasePlatformName(): string
{
$platform = $this->connection->getDatabasePlatform();

try {
return DatabasePlatformResolver::resolveName($platform)->value;
} catch (InvalidArgumentException) {
return $platform::class;
}
// The resolver returns null for a platform it does not recognise rather than throwing.
return DatabasePlatformResolver::resolveName($platform)->value ?? $platform::class;
}

private function populateRepositoryMetricsData(): RepositoryMetrics
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Storage/Metrics/ContentTypesCountMetrics.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function getValue(): int
->select($this->getCountExpression(self::ID_COLUMN))
->from(ContentTypeGateway::CONTENT_TYPE_TABLE)
->where(
$queryBuilder->expr()->eq(self::STATUS_COLUMN, Type::STATUS_DEFINED)
$queryBuilder->expr()->eq(self::STATUS_COLUMN, (string)Type::STATUS_DEFINED)
);

return (int)$queryBuilder->executeQuery()->fetchOne();
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Storage/Metrics/DraftsCountMetrics.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public function getValue(): int
'v',
ContentGateway::CONTENT_ITEM_TABLE,
'c',
$expr->and(
(string)$expr->and(
$expr->eq('c.id', 'v.contentobject_id'),
$expr->neq('c.status', ContentInfo::STATUS_TRASHED)
$expr->neq('c.status', (string)ContentInfo::STATUS_TRASHED)
)
)
->where(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function getValue(): int
->select($this->getCountExpression(self::ID_COLUMN))
->from(ContentGateway::CONTENT_ITEM_TABLE)
->where(
$queryBuilder->expr()->eq(self::STATUS_COLUMN, ContentInfo::STATUS_PUBLISHED)
$queryBuilder->expr()->eq(self::STATUS_COLUMN, (string)ContentInfo::STATUS_PUBLISHED)
);

return (int)$queryBuilder->executeQuery()->fetchOne();
Expand Down
Loading