magento / magento/data-migration-tool

Deprecated Functionality: preg_replace()

Open
#899 5 comments 0 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

### Preconditions

1. From Magento 1.9.0.1
2. To Magento 2.4.4
3. PHP 8.1

### Steps to reproduce

1. bin/magento migrate:data vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.0.1/config.xml.dist -a

### Expected result

1. Successful migration

### Actual result

>[2022-08-04T08:44:12.308463+00:00][INFO][mode: data][stage: data migration][step: Map Step]: started
>0% [>---------------------------] Remaining Time: < 1 sec
>In ErrorHandler.php line 61:
>
> Deprecated Functionality: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/vendor/magento/data-migration-tool/src/Migration/Handler/TruncateSuffix.
php on line 93

### Additional notes

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

The failure is reported in vendor/magento/data-migration-tool/src/Migration/Handler/TruncateSuffix.php on line 93. Start by running the reported bin/magento migrate:data command with PHP 8.1 and inspect the inputs reaching preg_replace(). Done means the migration completes without the deprecated-functionality error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.