Issue Bug Closed

#106803Doctrine DBAL 4.3-dev exception on "InvalidColumnDeclaration" in DB compare (EXT:seo pages.sitemap_priority column)

Franz Holzinger 06/01/25, 19:52 updated 12/02/25, 13:59

Description

TYPO3 13.4.14dev

½ Doctrine\DBAL\Exception\InvalidColumnDeclaration
Column “sitemap_priority” has invalid type
in /path/vendor/doctrine/dbal/src/Exception/InvalidColumnDeclaration.php line 16
final class InvalidColumnDeclaration extends LogicException implements Exception
{
public static function fromInvalidColumnType(string $columnName, InvalidColumnType $e): self {
return new self(sprintf(‘Column “%s” has invalid type’, $columnName), 0, $e);
}
}
at Doctrine\DBAL\Exception\InvalidColumnDeclaration::fromInvalidColumnType()
in /path/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php line 1505
*/
public function getDecimalTypeDeclarationSQL(array $column): string {
if (! isset($column[‘precision’])) {
throw InvalidColumnDeclaration::fromInvalidColumnType($column[‘name’], ColumnPrecisionRequired::new());
}
if (! isset($column[‘scale’])) {
throw InvalidColumnDeclaration::fromInvalidColumnType($column[‘name’], ColumnScaleRequired::new());
at Doctrine\DBAL\Platforms\AbstractPlatform->getDecimalTypeDeclarationSQL()
in /path/vendor/doctrine/dbal/src/Platforms/AbstractMySQLPlatform.php line 677 * {@inheritDoc}
*/
public function getDecimalTypeDeclarationSQL(array $column): string {
return parent::getDecimalTypeDeclarationSQL($column) . $this->getUnsignedDeclaration($column);
}
    /**
    * {@inheritDoc}
at Doctrine\DBAL\Platforms\AbstractMySQLPlatform->getDecimalTypeDeclarationSQL()
in /path/vendor/doctrine/dbal/src/Types/DecimalType.php line 26
debug (‘B’);
debug ($column, ‘getSQLDeclaration $column’);
debug (‘E’);
        return $platform->getDecimalTypeDeclarationSQL($column);
}
    public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?string
    {
getSQLDeclaration $column
array(14 items)
name => ‘sitemap_priority’ (16 chars)
type => Doctrine\DBAL\Types\DecimalTypeprototypeobject
default => ‘0.5’ (3 chars)
notnull => TRUE
length => 0 (integer)
precision => NULL
scale => 0 (integer)
fixed => FALSE
unsigned => FALSE
autoincrement => FALSE
columnDefinition => NULL
comment => ‘’ (0 chars)
values => array(empty)
version => FALSE

The array index precision = NULL leads to this exception.

Reviews 2

Files 1

History 1828

Show 3 earlier messages
  1. Garvin Hicking commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2025-06-02T05:05:51+00:00" > 06/02/25, 05:05 </span>

    How and where is this exception thrown, how to reproduce?

  2. Franz Holzinger commented and changed priority Should have Must have <span data-processor="relativetime" data-value="2025-06-02T19:32:42+00:00" > 06/02/25, 19:32 </span>

    backend module: Maintenance -> Analyze Database Structure

  3. Garvin Hicking commented and changed priority Must have Should have <span data-processor="relativetime" data-value="2025-06-02T19:57:37+00:00" > 06/02/25, 19:57 </span>

    Can you please provide more details about your setup. Does not happen for me in v13 or v14 with MySQL 8.0. You’re using v13 without any custom extensions, right?

  1. Franz Holzinger commented <span data-processor="relativetime" data-value="2025-06-03T10:24:38+00:00" > 06/03/25, 10:24 </span>

    I have now deactivated all extensions. But the error remains the same.

    “name”: “typo3/cms-base-distribution”,
    “description”: “TYPO3 CMS Base Distribution”,
    “license”: “GPL-2.0-or-later”,
    “type”: “project”,
    “minimum-stability”: “dev”,
      “require”: {
    “typo3/cms-adminpanel”: “^13.4”,
    “typo3/cms-backend”: “^13.4”,
    “typo3/cms-belog”: “^13.4”,
    “typo3/cms-beuser”: “^13.4”,
    “typo3/cms-core”: “^13.4”,
    “typo3/cms-dashboard”: “^13.4”,
    “typo3/cms-extbase”: “^13.4”,
    “typo3/cms-extensionmanager”: “^13.4”,
    “typo3/cms-felogin”: “^13.4”,
    “typo3/cms-filelist”: “^13.4”,
    “typo3/cms-filemetadata”: “^13.4”,
    “typo3/cms-fluid”: “^13.4”,
    “typo3/cms-form”: “^13.4”,
    “typo3/cms-frontend”: “^13.4”,
    “typo3/cms-impexp”: “^13.4”,
    “typo3/cms-info”: “^13.4”,
    “typo3/cms-install”: “^13.4”,
    “typo3/cms-linkvalidator”: “^13.4”,
    “typo3/cms-lowlevel”: “^13.4”,
    “typo3/cms-reactions”: “^13.4”,
    “typo3/cms-recycler”: “^13.4”,
    “typo3/cms-rte-ckeditor”: “^13.4”,
    “typo3/cms-seo”: “^13.4”,
    “typo3/cms-setup”: “^13.4”,
    “typo3/cms-sys-note”: “^13.4”,
    “typo3/cms-t3editor”: “^13.4”,
    “typo3/cms-tstemplate”: “^13.4”,
    “typo3/cms-viewpage”: “^13.4”,
    “typo3/cms-webhooks”: “^13.4“
    }
  2. Garvin Hicking commented <span data-processor="relativetime" data-value="2025-06-03T14:59:59+00:00" > 06/03/25, 14:59 </span>

    Please give feedback to my other question to proceed here, thanks!
    Mainly your used database type+version could be a reason.

  3. Franz Holzinger commented <span data-processor="relativetime" data-value="2025-06-04T04:31:05+00:00" > 06/04/25, 04:31 </span>

    System Information

    TYPO3 Version    13.4.14-dev
    Web Server Apache
    PHP Version 8.3.21
    Database (Default) MySQL 10.11.11-MariaDB-0+deb12u1
    Application Context Development
    Composer mode Enabled
    Operating System Linux 6.1.0-23-amd64
  4. Garvin Hicking commented <span data-processor="relativetime" data-value="2025-06-04T05:27:32+00:00" > 06/04/25, 05:27 </span>

    What does your “SHOW CREATE TABLE pages” contain, for the sitemap_priority column specifically?

    Also, which doctrine/dbal version is listed in your composer.lock? 4.2.1?

  5. Franz Holzinger commented and changed attached clipboard-202506041056-agnau.png <span data-processor="relativetime" data-value="2025-06-04T08:56:54+00:00" > 06/04/25, 08:56 </span>

        CREATE TABLE `pages` (
        ...
        `sitemap_priority` decimal(2,1) NOT NULL DEFAULT 0.5,
        ...
        )

    clipboard-202506041056-agnau.png

  6. Garvin Hicking commented <span data-processor="relativetime" data-value="2025-06-04T09:32:10+00:00" > 06/04/25, 09:32 </span>

    Please try to read my questions more carefully, this is taking too much time this way.

    “Also, which doctrine/dbal version is listed in your composer.lock? 4.2.1?”

    So your DB definition is exactly the same that I have (and that the DB analyzer would not alter/change). I have tried this in MariaDB 10.11.11 (in ddev) and I do not get this error.

  7. Franz Holzinger commented and changed Sprint Focus Stabilization Sprint <span data-processor="relativetime" data-value="2025-06-04T09:38:15+00:00" > 06/04/25, 09:38 </span>

    doctrine/dbal 4.3.x-dev

  8. Garvin Hicking commented and changed Sprint Focus Stabilization Sprint <span data-processor="relativetime" data-value="2025-06-04T13:52:58+00:00" > 06/04/25, 13:52 </span>

    Please do not use dev versions of third party dependencies that are not yet supported (or report issues probably to dbal), I think this solves the mystery then :-) Ideally you could mention this in bug reports, if it comes up again.

    I will check if we leave the issue open or need to reject it due to unreleased dependencies that only get installed due to your individual composer restraints.

  9. Stefan Bürk commented and changed assigned to Stefan Bürk <span data-processor="relativetime" data-value="2025-06-04T16:23:11+00:00" > 06/04/25, 16:23 </span>

    It seems that doctrine/dbal changed something on the 4.3.x branch which leads to that error (dev version, not released yet), which was not the case I tested an older state of that dbal branch. Currently functional/acceptance tests also indicates this error with current 4.3.x branch version.

    Taking over and investigating this and see if that needs to be addressed on our side or doing the doctrine/dbal communication (report/fix/…). And also trying to identifiy the exact change(s) opening this error.

    Thanks for early reporting this – how ever in general not a good idee to pull in dev versions of (all) composer packages.

  10. Stefan Bürk commented <span data-processor="relativetime" data-value="2025-06-04T20:37:13+00:00" > 06/04/25, 20:37 </span>

    Investigated this now deeper. doctrine/dbal 4.3.x contains a couple of cleanup changes,
    changing stuff in the platforms and SchemaManager classes for platforms, which TYPO3
    extends to adjust internal stuff (after doctrine/dbal 4.0.0 dropped events), including
    some methods to hook at the exact places. These methods are changed now and in some
    case are not compatible with other not extended places which leads to the breaking
    behaviour with 4.3.x-dev.

    Not verified yet, but that may also occur for SQLite and PostgreSQL beside MySQL/MariaDB,
    but for the later it is verified.

    I need to investage a solution / solution scenario and also align with the Doctrine Team
    how to proceed/align with this. We need at least a “dual compatible” version released to
    work with 4.3 and >=4.3.x-dev(4.3.0) – or at least align rising to dbal 4.3.0 and releasing
    it within the same time window on a release day (for TYPO3 v13.4).

    That also means, that this issue ois only related to TYPO3 v13 and v14 (main).

    Related changes in dbal:

  11. Garvin Hicking changed subject seo: Column "sitemap_priority" has invalid type Doctrine DBAL 4.3-dev exception on "InvalidColumnDeclaration" in DB compare (EXT:seo pages.sitemap_priority column) <span data-processor="relativetime" data-value="2025-06-04T21:00:54+00:00" > 06/04/25, 21:00 </span>

  12. Gerrit Code Review pushed patch set 1 for main to change 89648 status Accepted Under Review <span data-processor="relativetime" data-value="2025-06-05T14:34:47+00:00" > 06/05/25, 14:34 </span>

  13. Stefan Bürk commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-06-10T07:45:29+00:00" > 06/10/25, 07:45 </span>

    Applied in changeset commit:b6e38c70c4acf9d20b56b88e379bd8fe213a4c9e.