Merge pull request #5591 from wallabag/fix/test-php8

Add build test on PHP 8.0 & 8.1
This commit is contained in:
Jérémy Benoist
2022-01-31 13:09:56 +01:00
committed by GitHub
15 changed files with 48 additions and 23 deletions

View File

@ -30,6 +30,16 @@ abstract class WallabagMigration extends AbstractMigration implements ContainerA
$this->container = $container;
}
/**
* @todo remove when upgrading DoctrineMigration (only needed for PHP 8)
*
* @see https://github.com/doctrine/DoctrineMigrationsBundle/issues/393
*/
public function isTransactional(): bool
{
return false;
}
protected function getTable($tableName, $unEscaped = false)
{
$table = $this->container->getParameter('database_table_prefix') . $tableName;

View File

@ -682,6 +682,19 @@ class Entry
return $this->tags;
}
/**
* Only used during tests.
*/
public function getTagsLabel(): array
{
$tags = [];
foreach ($this->tags as $tag) {
$tags[] = $tag->getLabel();
}
return $tags;
}
/**
* @VirtualProperty
* @SerializedName("tags")