magento / magento/data-migration-tool

2.4.4 not compatible with php 8.1?

Open
#893 10 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
339
Forks
195
PR merge metrics
No merged PRs in 30d

Description

Sorry, I can't see anywhere mentioning whether this is compatible with 8.1, but after upgrading form 2.4.3, running bin/magento returns

```
bin/magento setup:upgrade
PHP Fatal error: During inheritance of Iterator: Uncaught Exception: Deprecated Functionality: Return type of Migration\ResourceModel\AbstractCollection::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /magento2/vendor/magento/data-migration-tool/src/Migration/ResourceModel/AbstractCollection.php on line 35 in /magento2/vendor/magento/framework/App/ErrorHandler.php:61
```

I don't think it's a caching error, https://github.com/magento/data-migration-tool/blob/2.4-develop/src/Migration/ResourceModel/AbstractCollection.php is not specifying the return type?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/Migration/ResourceModel/AbstractCollection.php, especially the current() method named in the PHP 8.1 fatal error. Run bin/magento setup:upgrade under PHP 8.1 to reproduce the failure and verify that the command completes without the reported return-type deprecation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.