Your software
My PHP version is :7.3
My MariaDB version is 10.3
Updating/Installing Errors
I am : Updating from 3.0–> 3.01
Upgrading/installing via Command Line
These errors are showing in the installer : Step 1 [->--------------------------] Migrating database schema…PHP Fatal error: Declaration of Mautic\Migrations\Version20200617155347::up(Doctrine\DBAL\Schema\Schema $schema) must be compatible with Mautic\CoreBundle\Doctrine\AbstractMauticMigration::up(Doctrine\DBAL\Schema\Schema $schema): void in /var/www/vhosts/Mautic-Install.com/hub.Mautic-Install.com/app/migrations/Version20200617155347.php on line 36
In Version20200617155347.php line 36:
Compile Error: Declaration of Mautic\Migrations\Version20200617155347::up(Doctrine\DBAL\Schema\Schema $schema) must be compatible with Mautic\CoreBundle\Doctrine\AbstractMauticMigrat
ion::up(Doctrine\DBAL\Schema\Schema $schema): void
mautic:update:apply [–force] [-p|–update-package [UPDATE-PACKAGE]] [–finish] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–]
These errors are showing in the Mautic log : [root@howdy ~]# [root@howdy ~]# /opt/plesk/php/7.3/bin/php /var/www/vhosts/Mautic-Install.com/hub.Mautic-Install.com/bin/console mautic:update:find
Step 1 [->--------------------------] Migrating database schema…PHP Fatal error: Declaration of Mautic\Migrations\Version20200617155347::up(Doctrine\DBAL\Schema\Schema $schema) must be compatible with Mautic\CoreBundle\Doctrine\AbstractMauticMigration::up(Doctrine\DBAL\Schema\Schema $schema): void in /var/www/vhosts/Mautic-Install.com/hub.Mautic-Install.com/app/migrations/Version20200617155347.php on line 36
In Version20200617155347.php line 36:
Compile Error: Declaration of Mautic\Migrations\Version20200617155347::up(Doctrine\DBAL\Schema-bash: [root@howdy: command not found
\Schema $schema) must be compatible with Mautic\CoreBundle\Doctrine\AbstractMauticMigrat
ion::up(Doctrine\DBAL\Schema\Schema $schema): void
mautic:update:apply [–force] [-p|–update-package [UPDATE-PACKAGE]] [–finish] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–]
[root@howdy ~]# Version 3.0.1 of Mautic is available for download. Please visit https://github.com/mautic/mautic/releases/tag/3.0.1 for more information.
-bash: Version: command not found
[root@howdy ~]# To update, you can run ‘php bin/console mautic:update:apply’ from the command line.
-bash: To: command not found
[root@howdy ~]# [root@howdy ~]# /opt/plesk/php/7.3/bin/php /var/www/vhosts/Mautic-Install.com/hub.Mautic-Install.com/bin/console mautic:update:apply
-bash: [root@howdy: command not found
[root@howdy ~]# Are you sure you wish to update Mautic to the latest version? y
-bash: Are: command not found
[root@howdy ~]# Step 5 [----->----------------------] Clearing the cache
-bash: Step: command not found
[root@howdy ~]#
[root@howdy ~]# IMPORTANT: Run the same command again with --finish. For example ‘php bin/console mautic:update:apply --finish’
-bash: syntax error near unexpected token newline' [root@howdy ~]# [root@howdy ~]# /opt/plesk/php/7.3/bin/php /var/www/vhosts/Mautic-Install.com/hub.Mautic-Install.com/bin/console mautic:update:apply --finish -bash: [root@howdy: command not found [root@howdy ~]# Step 1 [->--------------------------] Migrating database schema...PHP Fatal error: Declaration of Mautic\Migrations\Version20200617155347::up(Doctrine\DBAL\Schema\Schema $schema) must be compatible with Mautic\CoreBundle\Doctrine\AbstractMauticMigration::up(Doctrine\DBAL\Schema\Schema $schema): void in /var/www/vhosts/Mautic-Install.com/hub.Mautic-Install.com/app/migrations/Version20200617155347.php on line 36 -bash: syntax error near unexpected token
(’
[root@howdy ~]#
[root@howdy ~]# In Version20200617155347.php line 36:
-bash: In: command not found
[root@howdy ~]#
[root@howdy ~]# Compile Error: Declaration of Mautic\Migrations\Version20200617155347::up(Doctrine\DBAL\Schema\Schema $schema) must be compatible with Mautic\CoreBundle\Doctrine\AbstractMauticMigrat
-bash: syntax error near unexpected token (' [root@howdy ~]# ion::up(Doctrine\DBAL\Schema\Schema $schema): void -bash: syntax error near unexpected token
Doctrine\DBAL\Schema\Schema’
[root@howdy ~]#
[root@howdy ~]#
[root@howdy ~]# mautic:update:apply [–force] [-p|–update-package [UPDATE-PACKAGE]] [–finish] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–]
-bash: syntax error near unexpected token `newline’
[root@howdy ~]# /opt/plesk/php/7.3/bin/php /var/www/vhosts/Mautic-Install.com/hub.Mautic-Install.com/bin/console doctrine:schema:update --force
Updating database schema…
In AbstractMySQLDriver.php line 106:
An exception occurred while executing ‘ALTER TABLE mauhu_oauth2_accesstokens CHANGE client_id client_id INT UNSIGNED NOT NULL, CHANGE user_id user_id INT UNSIGNED NOT NULL, CHANGE to
ken token VARCHAR(191) NOT NULL, CHANGE scope scope VARCHAR(191) DEFAULT NULL’:
SQLSTATE[HY000]: General error: 1832 Cannot change column ‘client_id’: used in a foreign key constraint ‘FK_5DD8E68219EB6921’
In PDOConnection.php line 80:
SQLSTATE[HY000]: General error: 1832 Cannot change column ‘client_id’: used in a foreign key constraint ‘FK_5DD8E68219EB6921’
In PDOConnection.php line 75:
SQLSTATE[HY000]: General error: 1832 Cannot change column ‘client_id’: used in a foreign key constraint ‘FK_5DD8E68219EB6921’
doctrine:schema:update [–complete] [–dump-sql] [-f|–force] [–em [EM]] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–]
[root@howdy ~]# /opt/plesk/php/7.3/bin/php /var/www/vhosts/Mautic-Install.com/hub.Mautic-Install.com/bin/console doctrine:migrations:generate
PHP Fatal error: Declaration of Mautic\Migrations\Version20200617155347::up(Doctrine\DBAL\Schema\Schema $schema) must be compatible with Mautic\CoreBundle\Doctrine\AbstractMauticMigration::up(Doctrine\DBAL\Schema\Schema $schema): void in /var/www/vhosts/Mautic-Install.com/hub.Mautic-Install.com/app/migrations/Version20200617155347.php on line 36
In Version20200617155347.php line 36:
Compile Error: Declaration of Mautic\Migrations\Version20200617155347::up(Doctrine\DBAL\Schema\Schema $schema) must be compatible with Mautic\CoreBundle\Doctrine\AbstractMauticMigrat
ion::up(Doctrine\DBAL\Schema\Schema $schema): void
doctrine:migrations:generate [–editor-cmd [EDITOR-CMD]] [–configuration [CONFIGURATION]] [–db-configuration [DB-CONFIGURATION]] [–db DB] [–em EM] [–shard SHARD] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–]
[root@howdy ~]# /opt/plesk/php/7.3/bin/php /var/www/vhosts/Mautic-Install.com/hub.Mautic-Install.com/bin/console doctrine:migrations:migrate
PHP Fatal error: Declaration of Mautic\Migrations\Version20200617155347::up(Doctrine\DBAL\Schema\Schema $schema) must be compatible with Mautic\CoreBundle\Doctrine\AbstractMauticMigration::up(Doctrine\DBAL\Schema\Schema $schema): void in /var/www/vhosts/Mautic-Install.com/hub.Mautic-Install.com/app/migrations/Version20200617155347.php on line 36
In Version20200617155347.php line 36:
Compile Error: Declaration of Mautic\Migrations\Version20200617155347::up(Doctrine\DBAL\Schema\Schema $schema) must be compatible with Mautic\CoreBundle\Doctrine\AbstractMauticMigrat
ion::up(Doctrine\DBAL\Schema\Schema $schema): void
doctrine:migrations:migrate [–write-sql [WRITE-SQL]] [–dry-run] [–query-time] [–allow-no-migration] [–all-or-nothing [ALL-OR-NOTHING]] [–configuration [CONFIGURATION]] [–db-configuration [DB-CONFIGURATION]] [–db DB] [–em EM] [–shard SHARD] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–] []
[root@howdy ~]# /opt/plesk/php/7.3/bin/php /var/www/vhosts/Mautic-Install.com/hub.Mautic-Install.com/bin/console doctrine:migrations:migrate
PHP Fatal error: Declaration of Mautic\Migrations\Version20200617155347::up(Doctrine\DBAL\Schema\Schema $schema) must be compatible with Mautic\CoreBundle\Doctrine\AbstractMauticMigration::up(Doctrine\DBAL\Schema\Schema $schema): void in /var/www/vhosts/Mautic-Install.com/hub.Mautic-Install.com/app/migrations/Version20200617155347.php on line 36
In Version20200617155347.php line 36:
Compile Error: Declaration of Mautic\Migrations\Version20200617155347::up(Doctrine\DBAL\Schema\Schema $schema) must be compatible with Mautic\CoreBundle\Doctrine\AbstractMauticMigrat
ion::up(Doctrine\DBAL\Schema\Schema $schema): void
doctrine:migrations:migrate [–write-sql [WRITE-SQL]] [–dry-run] [–query-time] [–allow-no-migration] [–all-or-nothing [ALL-OR-NOTHING]] [–configuration [CONFIGURATION]] [–db-configuration [DB-CONFIGURATION]] [–db DB] [–em EM] [–shard SHARD] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–] []
These errors are showing in the upgrade_log.txt file (located in the root of your Mautic instance when an upgrade has been attempted - ensure you remove or redact any sensitive data such as domain names in the file path) :
Your problem
My problem is : upgrade from M3.0 to 3.01 failed- site if 500 error now
Steps I have tried to fix the problem : cleared cache- google gave me this but any fixes mentioned cause more issues https://github.com/symfony/symfony/issues/30828