require core-bundle ^4.5 instead of ^4.4
fritzmg opened this issue · 5 comments
Shouldn't this bundle also require the core-bundle in version ^4.5? Some people get confused because they get some bundles in Version 4.5.0
instead of 4.4.x
while updating their 4.4.x
installations.
@xchs also reported a problem due to utf8mb4
because of that (though I don't know which bundle would cause such a problem).
I don't know which bundle would cause such a problem
In my case, it seems to be the contao/newsletter-bundle.
A Composer dry-run shows that some packages would be updated from 4.4.9 to 4.5.0:
$ composer update --dry-run
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 17 updates, 0 removals
- Updating symfony/symfony (v3.4.1) to symfony/symfony (v3.4.2)
- Updating friendsofsymfony/http-cache (2.0.2) to friendsofsymfony/http-cache (2.1.0)
- Updating sensio/framework-extra-bundle (v3.0.28) to sensio/framework-extra-bundle (v3.0.29)
- Updating knplabs/knp-time-bundle (1.7.5) to knplabs/knp-time-bundle (1.8.0)
- Updating knplabs/knp-menu-bundle (v2.2.0) to knplabs/knp-menu-bundle (v2.2.1)
- Updating contao-components/mediaelement (4.2.6) to contao-components/mediaelement (4.2.7)
- Updating contao-components/ace (1.2.8) to contao-components/ace (1.2.9)
- Updating contao/core-bundle (4.4.9) to contao/core-bundle (4.4.11)
- Updating contao/installation-bundle (4.4.9) to contao/installation-bundle (4.4.11)
- Updating contao/manager-plugin (2.1.1) to contao/manager-plugin (2.2.0)
- Updating contao/manager-bundle (4.4.9) to contao/manager-bundle (4.4.11)
- Updating contao/calendar-bundle (4.4.9) to contao/calendar-bundle (4.4.11)
- Updating contao/comments-bundle (4.4.9) to contao/comments-bundle (4.5.0)
- Updating contao/faq-bundle (4.4.9) to contao/faq-bundle (4.4.11)
- Updating contao/listing-bundle (4.4.9) to contao/listing-bundle (4.5.0)
- Updating contao/news-bundle (4.4.9) to contao/news-bundle (4.4.11)
- Updating contao/newsletter-bundle (4.4.9) to contao/newsletter-bundle (4.5.0)
Actually, I only want to update to version 4.4.11 and not 4.5.0.
The install tool then wants to perform the following updates to the database (including the change of the collation to utf8mb4_bin
):
which leads to the following error:
app.CRITICAL: An exception occurred. {"exception":"[object] (Doctrine\\DBAL\\Exception\\DriverException(code: 0): An exception occurred while executing 'ALTER TABLE tl_newsletter CHANGE alias alias VARCHAR(128) DEFAULT '' NOT NULL COLLATE utf8mb4_bin':\n\nSQLSTATE[HY000]: General error: 1273 Unknown collation: 'utf8mb4_bin' at /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:121, Doctrine\\DBAL\\Driver\\PDOException(code: HY000): SQLSTATE[HY000]: General error: 1273 Unknown collation: 'utf8mb4_bin' at /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:106, PDOException(code: HY000): SQLSTATE[HY000]: General error: 1273 Unknown collation: 'utf8mb4_bin' at /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104)"} []
This is easily comprehensible, because there is actually no utf8mb4_bin
on my host.
In total the comments-bundle, newsletter-bundle and listing-bundle are affected. All other Contao bundles require the core-bundle with version ^4.5.
Just for reference, here is the original comment about keeping the bundles (and editions) in sync: contao/core-bundle#493 (comment)
@xchs indeed, the newsletter-bundle uses utf8mb4_bin
here and since it only requires the core-bundle in version ^4.4
it will be installed in Contao 4.4 too, without proper utf8mb4
support.