SuiteCRM 7.14.6 to 8.7.1 upgrade error at Step 2.5

I’m trying to upgrade SuiteCRM from 7.14.6 to 8.7.1 following the documentation: Migration - 7.14.x to 8.7.0+ :: SuiteCRM Documentation

  1. Migration steps: I have done 2.1 to 2.4.

Error from Step 2.5:
$ sudo -u www-data ./bin/console suitecrm:app:setup-legacy-migration
PHP Fatal error: Declaration of Symfony\Component\Cache\CacheItem::expiresAt(?DateTimeInterface $expiration): static must be compatible with Psr\Cache\CacheItemInterface::expiresAt($expiration) in /var/www/html/crm7to8/vendor/symfony/cache/CacheItem.php on line 65

Basic information:
OS: Ubuntu Linux 22.04.5

$ php -v
PHP 8.1.2-1ubuntu2.19 (cli) (built: Sep 30 2024 16:25:25) (NTS)

$ composer -v
Composer 2.2.6 2022-02-04 17:00:38

Can anyone help to see what is the problem? FYI, I can install a blank copy of SuiteCRM 8.7.1 without any problem on the same machine.

Refresh the browser and again. Make sure you have correct permissions

Make a backup of your “vendor” directory and then try a

composer install --no-dev

Re-check ownerships and permissions on vendor directory afterwards.

The result of running:
$ sudo -u www-data composer install --no-dev

Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 0 installs, 0 updates, 95 removals

  • Removing zozlak/rdf-constants (1.2.1)
  • Removing theseer/tokenizer (1.2.3)
  • Removing symfony/web-profiler-bundle (v6.4.16)
  • Removing symfony/phpunit-bridge (v7.2.0)
  • Removing symfony/maker-bundle (v1.61.0)
  • Removing symfony/dom-crawler (v6.4.16)
  • Removing symfony/debug-bundle (v6.4.13)
  • Removing symfony/css-selector (v6.4.13)
  • Removing symfony/browser-kit (v6.4.13)
  • Removing sweetrdf/rdf-interface (2.1.0)
  • Removing sweetrdf/rdf-helpers (2.0.0)
  • Removing sweetrdf/easyrdf (1.15.0)
  • Removing softcreatr/jsonpath (0.9.1)
  • Removing sebastian/version (3.0.2)
  • Removing sebastian/type (3.2.1)
  • Removing sebastian/resource-operations (3.0.4)
  • Removing sebastian/recursion-context (4.0.5)
  • Removing sebastian/object-reflector (2.0.4)
  • Removing sebastian/object-enumerator (4.0.4)
  • Removing sebastian/lines-of-code (1.0.4)
  • Removing sebastian/global-state (5.0.7)
  • Removing sebastian/exporter (4.0.6)
  • Removing sebastian/environment (5.1.5)
  • Removing sebastian/diff (4.0.6)
  • Removing sebastian/complexity (2.0.3)
  • Removing sebastian/comparator (4.0.8)
  • Removing sebastian/code-unit-reverse-lookup (2.0.3)
  • Removing sebastian/code-unit (1.0.8)
  • Removing sebastian/cli-parser (1.0.2)
  • Removing scssphp/scssphp (v1.13.0)
  • Removing react/stream (v1.4.0)
  • Removing react/socket (v1.16.0)
  • Removing react/event-loop (v1.5.0)
  • Removing react/dns (v1.13.0)
  • Removing react/child-process (v0.6.5)
  • Removing react/cache (v1.2.0)
  • Removing psy/psysh (v0.12.7)
  • Removing phpunit/phpunit (9.6.22)
  • Removing phpunit/php-timer (5.0.3)
  • Removing phpunit/php-text-template (2.0.4)
  • Removing phpunit/php-invoker (3.1.1)
  • Removing phpunit/php-file-iterator (3.0.6)
  • Removing phpunit/php-code-coverage (9.2.32)
  • Removing phpowermove/docblock (v4.0)
  • Removing php-webdriver/webdriver (1.15.2)
  • Removing phootwork/lang (v3.2.3)
  • Removing phootwork/collection (v3.2.3)
  • Removing phar-io/version (3.2.1)
  • Removing phar-io/manifest (2.0.4)
  • Removing nikic/php-parser (v4.19.4)
  • Removing nette/utils (v4.0.5)
  • Removing nette/php-generator (v4.1.7)
  • Removing myclabs/deep-copy (1.12.1)
  • Removing mockery/mockery (1.6.12)
  • Removing mikey179/vfsstream (v1.6.12)
  • Removing masterminds/html5 (2.9.0)
  • Removing league/html-to-markdown (5.1.1)
  • Removing league/container (4.2.4)
  • Removing hamcrest/hamcrest-php (v2.0.1)
  • Removing grasmash/expander (2.0.3)
  • Removing friendsofphp/php-cs-fixer (v3.65.0)
  • Removing filp/whoops (2.16.0)
  • Removing fidry/cpu-core-counter (1.2.0)
  • Removing fakerphp/faker (v1.24.1)
  • Removing evenement/evenement (v3.0.2)
  • Removing doctrine/doctrine-fixtures-bundle (3.7.1)
  • Removing doctrine/data-fixtures (2.0.1)
  • Removing dflydev/dot-access-data (v3.0.3)
  • Removing dama/doctrine-test-bundle (v8.2.0)
  • Removing consolidation/self-update (2.2.0)
  • Removing consolidation/robo (4.0.6)
  • Removing consolidation/output-formatters (4.6.0)
  • Removing consolidation/log (2.1.1)
  • Removing consolidation/config (2.1.2)
  • Removing consolidation/annotated-command (4.10.0)
  • Removing composer/xdebug-handler (3.0.5)
  • Removing composer/semver (3.4.3)
  • Removing composer/pcre (3.3.2)
  • Removing codeception/stub (4.1.3)
  • Removing codeception/module-webdriver (3.2.2)
  • Removing codeception/module-symfony (3.5.0)
  • Removing codeception/module-rest (3.4.0)
  • Removing codeception/module-phpbrowser (3.0.1)
  • Removing codeception/module-filesystem (3.0.1)
  • Removing codeception/module-asserts (3.0.0)
  • Removing codeception/lib-xml (1.0.3)
  • Removing codeception/lib-web (1.0.6)
  • Removing codeception/lib-innerbrowser (3.1.3)
  • Removing codeception/lib-asserts (2.1.0)
  • Removing codeception/codeception (5.1.2)
  • Removing clue/ndjson-react (v1.3.0)
  • Removing cebe/php-openapi (1.7.0)
  • Removing browserstack/browserstack-local (v1.1.0)
  • Removing behat/gherkin (v4.11.0)
  • Removing api-platform/schema-generator (v5.2.2)
    Generating optimized autoload files
    Class Zend_Validate_Barcode_IntelligentMail located in ./vendor/zf1/zend-validate/library/Zend/Validate/Barcode/Intelligentmail.php does not comply with psr-0 autoloading standard. Skipping.
    Class Zend_Gdata_Analytics_Goal located in ./vendor/zf1/zend-gdata/library/Zend/Gdata/Analytics/Extension/Goal.php does not comply with psr-0 autoloading standard. Skipping.
    Class SuiteCRM\URIFilter located in ./public/legacy/include/include/URIFilter.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\LangException located in ./public/legacy/include/include/LangException.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\DatabaseTransactions located in ./public/legacy/include/include/DatabaseTransactions.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\TestCaseAbstract located in ./public/legacy/include/include/TestCaseAbstract.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\JsonApiErrorObject located in ./public/legacy/include/include/JsonApiErrorObject.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\CleanCSV located in ./public/legacy/include/include/CleanCSV.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\Imap located in ./public/legacy/include/include/Imap.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\portability\System\Upgrade\PostUpgrade located in ./public/legacy/include/include/portability/System/Upgrade/PostUpgrade.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\ErrorMessageException located in ./public/legacy/include/include/ErrorMessageException.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\Zend_Oauth_Provider located in ./public/legacy/include/include/Zend_Oauth_Provider.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\LangText located in ./public/legacy/include/include/LangText.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\StateCheckerDirectoryIterator located in ./public/legacy/include/include/StateCheckerDirectoryIterator.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\SubPanel\SubPanelRowCounter located in ./public/legacy/include/include/SubPanel/SubPanelRowCounter.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\ImapInterface located in ./public/legacy/include/include/ImapInterface.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\HTMLPurifierURISchemeCid located in ./public/legacy/include/include/HTMLPurifierURISchemeCid.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\HtmlSanitizer located in ./public/legacy/include/include/HtmlSanitizer.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\RefreshDatabase located in ./public/legacy/include/include/RefreshDatabase.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\HTMLPurifierFilterXmp located in ./public/legacy/include/include/HTMLPurifierFilterXmp.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\ErrorMessage located in ./public/legacy/include/include/ErrorMessage.php does not comply with psr-4 autoloading standard. Skipping.
    Class SuiteCRM\LangExceptionInterface located in ./public/legacy/include/include/LangExceptionInterface.php does not comply with psr-4 autoloading standard. Skipping.
    110 packages you are using are looking for funding.
    Use the composer fund command to find out more!

Run composer recipes at any time to see the status of your Symfony recipes.

Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 255
!! PHP Fatal error: Declaration of Symfony\Component\Cache\CacheItem::expiresAt(?DateTimeInterface $expiration): static must be compatible with Psr\Cache\CacheItemInterface::expiresAt($expiration) in /var/www/html/crm7to8/vendor/symfony/cache/CacheItem.php on line 65
!!
Script @auto-scripts was called via post-install-cmd

It might be one of your PHP modules that is causing trouble, have a look here

I have no clue which PHP module is causing the trouble. Any suggestions?

That post mentions two specific ones. I don’t have any further suggestions, that’s all I know

The upgrade process from SuiteCRM 7.14.6 to 8.7.1 has proven to be challenging, particularly for users without extensive technical expertise. The absence of a functional upgrade wizard for this transition has forced many to rely on manual upgrade procedures outlined in the official documentation.Unfortunately, the provided guide lacks comprehensive details, leaving users to grapple with numerous unforeseen issues without clear solutions. This situation has led to frustration and, in some cases, the decision to remain on the older version.To address these concerns, it would be beneficial if the SuiteCRM development team could consider implementing a more user-friendly upgrade path. A potential approach could involve:

  1. Allowing users to install a fresh instance of SuiteCRM 8.
  2. Developing an upgrade wizard within SuiteCRM 7 that facilitates data migration to the new SuiteCRM 8 instance.

This method could significantly simplify the upgrade process, making it more accessible to a broader user base. As it stands, the complexity of the current upgrade procedure has left many users, including myself, at an impasse, unable to take advantage of the new features and improvements offered in SuiteCRM 8.7.1.