PHPackages                             honl/magento2-import - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. honl/magento2-import

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

honl/magento2-import
====================

v1.4.1(1mo ago)40499—6.7%20[2 issues](https://github.com/ho-nl/magento2-Ho_Import/issues)1PHPPHP ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.1 || ~8.2 || ~8.3 || ~8.4

Since Nov 15Pushed 1mo ago9 watchersCompare

[ Source](https://github.com/ho-nl/magento2-Ho_Import)[ Packagist](https://packagist.org/packages/honl/magento2-import)[ RSS](/packages/honl-magento2-import/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (27)Versions (35)Used By (1)

Magento 2 Importing library
===========================

[](#magento-2-importing-library)

Import library to create an array-interface for importing products/categories. Ho\_Import is build on top of Magento's internal Import/Export modules.

The goal of the library is to be a swiss army knife for importing products in Magento 2. Features include:

- Stream XML over HTTP and from disk
- Download files from HTTP(s)/FTP
- Map items from source file to Magento format
- Lot's of [RowModifiers](https://github.com/ho-nl/magento2-Ho_Import/tree/master/src/RowModifier)
- Fixed importer core bugs

[ExampleProfile.php](src/docs/examples/basic/ExampleProfile.php)

Installation
------------

[](#installation)

```
composer config repositories.honl/magento2-import vcs git@github.com:ho-nl/magento2-Ho_Import.git
composer require honl/magento2-import
```

Goals
-----

[](#goals)

Performance: Since building imports is (really) hard and requires a lot of feedback loops to get your data right (change, check, change, check), it is absolutely essential that is as fast as possible. A developer can't work if he has to wait 10 minutes after each change. So only having to wait only a few seconds to be able to see what is going into Magento is essential.

Ease of use: The API should be clear that a developer is only limited by their knowledge of Magento it's self. No junior developer should have to thing about streaming files, performance and memory usage.

Extensible: It should be very easy to extend and customize a import

Maintainable: The library should have a stable API (currently not stable yet) so that we can upgrade imports that are build a year ago without having to worry that everything will break.

Getting the abstraction right
-----------------------------

[](#getting-the-abstraction-right)

With Ho\_Import for Magento 1, we created a [custom DSL](https://github.com/ho-nl/magento1-Ho_Import/blob/master/docs/imports/product_multiple_sources.xml#L39-L209) to map external files to a Magento compatible format. This worked, but we soon discovered that we needed a lot of basic PHP functionality in the importer. We caught ourselves implementing PHP functionality in Ho\_Import compatible wrappers...

The alternative was working bare with [Avs\_FastSimpleImport](https://github.com/avstudnitz/AvS_FastSimpleImport) gave no abstraction other than, 'you can fill this array'. Although this was a huge leap forward from 'create your own csv file', it didn't offer any tools to make building imports easier more robust and faster.

Now, writing a new import library for Magento 2 and having to start from scratch, it was a good moment to create a new abstraction. Assuming that people who need to build imports at least know the basics of Magento 2 programming we can create an import that doesn't rely on 'nice abstractions', but does offer the tools to get an import quickly up and running.

1. Create a single class file to create a fully functional import. If the class is too complex, the developer can decide to spit the logic them selves.
2. Use RowModifiers to modify data and make it easy for other developers to create new

The core concept of the new import library is based around RowModifiers.

### What are RowModifiers?

[](#what-are-rowmodifiers)

A `RowModifier` can update items, add items, delete items, add new values, rewrite values, validate rows, etc.

Example usage of the `\Ho\Import\RowModifier\ItemMapper`

```
$items = [ ... ]; //Array of all products

/** @var \Ho\Import\RowModifier\ItemMapper $itemMapper */
$itemMapper = $this->itemMapperFactory->create([
    'mapping' => [
        'store_view_code' => \Ho\Import\RowModifier\ItemMapper::FIELD_EMPTY,
        'sku' => function ($item) {
             return $item['ItemCode'];
         }
        'name' => function ($item) {
            return $item['NameField'] . $item['ColorCode'];
        }
    ]
]);
$itemMapper->setItems($items);
$itemMapper->process($items); //The items array is modified with new values.
```

RowModifies all inherit from `\Ho\Import\RowModifier\AbstractRowModifier`

General Assumptions
-------------------

[](#general-assumptions)

- People writing imports are programmers or at least have basic programming knowledge.
- Magento's importer is limited and certainly doesn't *Just Work(tm)*, we need to build abstractions on top to be able to actually focus on the import instead of all the 'stuff' that comes with an import.

Technical assumptions
---------------------

[](#technical-assumptions)

- PHP's array format is memory efficient enough that it can hold all products needing to be imported in memory. e.g. 50k products requires more memory, but is usually ran on a beefy server.
-

Contibutors
-----------

[](#contibutors)

Here at H&amp;O we've created many imports for clients, we have exstenbuild Ho\_Import, core contributor to Avs\_FastSimpleImport

that mapped source files to Magento compatible formats, but was never intended to solve problems with url rewrites, creating configurables. All that functionality

This library builds on top of Magento's internal Import/Export module

Console commands
----------------

[](#console-commands)

### `ho:import:run profileName`

[](#hoimportrun-profilename)

Run an import script directly (not recommended on live environments, might cause deadlocks).

### `cron:schedule jobName`

[](#cronschedule-jobname)

Schedule a job to run immediately.

Credits
-------

[](#credits)

The module is written by Paul Hachmang (twitter: [@paales](https://twitter.com/paales), email: ) and build for Reach Digital. We make [Magento Webshops](https://www.reachdigital.nl/) (website: , email: , twitter: [@ho\_nl](https://twitter.com/ho_nl)).

###  Health Score

64

—

FairBetter than 99% of packages

Maintenance92

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity92

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 51.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~165 days

Recently: every ~7 days

Total

22

Last Release

35d ago

Major Versions

0.4.0 → v1.0.12021-09-21

PHP version history (5 changes)0.4.0PHP ~7.0.0

v1.0.1PHP ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0

v1.3.2PHP ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.2

v1.3.5PHP ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.1 || ~8.2

v1.4.0PHP ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.1 || ~8.2 || ~8.3 || ~8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15377342?v=4)[honl](/maintainers/honl)[@HonL](https://github.com/HonL)

---

Top Contributors

[![paales](https://avatars.githubusercontent.com/u/1244416?v=4)](https://github.com/paales "paales (161 commits)")[![Maikel-Koek](https://avatars.githubusercontent.com/u/6301809?v=4)](https://github.com/Maikel-Koek "Maikel-Koek (39 commits)")[![NoorulBhoelai](https://avatars.githubusercontent.com/u/13124447?v=4)](https://github.com/NoorulBhoelai "NoorulBhoelai (34 commits)")[![SimonPrins](https://avatars.githubusercontent.com/u/6427655?v=4)](https://github.com/SimonPrins "SimonPrins (32 commits)")[![PascalBrouwers](https://avatars.githubusercontent.com/u/17834386?v=4)](https://github.com/PascalBrouwers "PascalBrouwers (30 commits)")[![wimvdputten](https://avatars.githubusercontent.com/u/5382391?v=4)](https://github.com/wimvdputten "wimvdputten (11 commits)")[![sprankhub](https://avatars.githubusercontent.com/u/930199?v=4)](https://github.com/sprankhub "sprankhub (2 commits)")[![bramvanderholst](https://avatars.githubusercontent.com/u/7457340?v=4)](https://github.com/bramvanderholst "bramvanderholst (2 commits)")[![ErwinOtten](https://avatars.githubusercontent.com/u/1251986?v=4)](https://github.com/ErwinOtten "ErwinOtten (1 commits)")

---

Tags

fsim2-m2-importmagento2

### Embed Badge

![Health badge](/badges/honl-magento2-import/health.svg)

```
[![Health](https://phpackages.com/badges/honl-magento2-import/health.svg)](https://phpackages.com/packages/honl-magento2-import)
```

###  Alternatives

[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

346132.9M112](/packages/google-cloud-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
