PHPackages                             alex8bits/exchange1c - 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. alex8bits/exchange1c

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

alex8bits/exchange1c
====================

Catalog Loader from 1c - CommerceML protocol

v2.1.1(2mo ago)164↓100%1MITPHPPHP &gt;=8.0

Since Mar 31Pushed 2mo agoCompare

[ Source](https://github.com/alex8bits/exchange1c)[ Packagist](https://packagist.org/packages/alex8bits/exchange1c)[ Docs](https://github.com/alex8bits/exchange1c)[ RSS](/packages/alex8bits-exchange1c/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (13)Used By (1)

PHP exchange1c - обмен 1С предприятие с сайтом на php
=====================================================

[](#php-exchange1c---обмен-1с-предприятие-с-сайтом-на-php)

[![Packagist](https://camo.githubusercontent.com/eaccbc0fe8a03b836410043292131257aafc59643217060ae7e4493c5d648be6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616c65786e736b38332f65786368616e676531632e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist](https://camo.githubusercontent.com/fc2cc1b804a63ab608b45fefa8b01172c758a3c5cce4c99cf62bfccdd1ac5169/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c65786e736b38332f65786368616e676531632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bigperson/exchange1c)[![Packagist](https://camo.githubusercontent.com/1e3f48c7dce9396bca5f48d0cf43edfa4f02b453360b09ce50b9b4450caf7c18/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c65786e736b38332f65786368616e676531632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bigperson/exchange1c)

Установка этой библиотеки, должна упрощать интеграцию 1С в ваш сайт.

Библиотека содержит набор интерфейсов, которые необходимо реализовать, чтобы получить возможность обмениваться товарами и документами с 1С. Предполагается, что у Вас есть 1С:Предприятие 8, Управление торговлей", редакция 11.3, версия 11.3.2 на платформе 8.3.9.2033.

Если у вас версия конфигурации ниже, то скорее всего библиотека все равно будет работать, т.к. по большей части, обмен с сайтами сильно не меняется в 1С от версии к версии.

Данная библиотека была написана на основе модуля  - все основные интерфейсы взяты именно из этого модуля.

Зависимости
===========

[](#зависимости)

- php ^8.0
- alex8bits/commerceml
- symfony/http-foundation ^7.2

Установка
=========

[](#установка)

`composer require alex8bits/exchange1c`

Использование
=============

[](#использование)

Для использования библиотеки вам неободимо определить массив конфигов и реализовать интерфейсы в ваших моделях. В примере используется адаптер для symfony/event-dispatcher - Также вы можете использовать пакет-адаптер для интеграции с Laravel

```
require_once './../vendor/autoload.php'; //Подулючаем автолоад

// Определяем конфиг
$configValues = [
    'import_dir'    => '1c_exchange',
    'login'    => 'admin',
    'password' => 'admin',
    'use_zip'       => false,
    'file_part' => 0,
    'models'    => [
        \Bigperson\Exchange1C\Interfaces\GroupInterface::class => \Tests\Models\GroupTestModel::class,
        \Bigperson\Exchange1C\Interfaces\ProductInterface::class => \Tests\Models\ProductTestModel::class,
        \Bigperson\Exchange1C\Interfaces\OfferInterface::class => \Tests\Models\OfferTestModel::class,
    ],
];
$config = new \Bigperson\Exchange1C\Config($configValues);
$request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();
$symfonyDispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher();
$dispatcher = new \Bigperson\Exchange1C\SymfonyEventDispatcher($symfonyDispatcher);
$modelBuilder = new \Bigperson\Exchange1C\ModelBuilder();
// Создаем необходимые сервисы
$loaderService = new \Bigperson\Exchange1C\Services\FileLoaderService($request, $config);
$authService = new \Bigperson\Exchange1C\Services\AuthService($request, $config);
$categoryService = new \Bigperson\Exchange1C\Services\CategoryService($request, $config, $dispatcher, $modelBuilder);
$offerService = new \Bigperson\Exchange1C\Services\OfferService($request, $config, $dispatcher, $modelBuilder);
$catalogService = new \Bigperson\Exchange1C\Services\CatalogService($request, $config, $authService, $loaderService, $categoryService, $offerService);

$mode = $request->get('mode');
$type = $request->get('type');

try {
    if ($type == 'catalog') {
        if (!method_exists($catalogService, $mode)) {
            throw new Exception('not correct request, mode=' . $mode);
        }
        //Запускаем сервис импорта каталога
        $body = $catalogService->$mode();
        $response = new \Symfony\Component\HttpFoundation\Response($body, 200, ['Content-Type', 'text/plain']);
        $response->send();
    } else {
        throw new \LogicException(sprintf('Logic for method %s not released', $type));
    }
} catch (\Exception $e) {
    $body = "failure\n";
    $body .= $e->getMessage() . "\n";
    $body .= $e->getFile() . "\n";
    $body .= $e->getLine() . "\n";

    $response = new \Symfony\Component\HttpFoundation\Response($body, 500, ['Content-Type', 'text/plain']);
    $response->send();
}
```

Более подробную информацию по интерфейсам и их реализациям можно почитаь в документации Документация будет добалена позже.

Лицензия
========

[](#лицензия)

Данный пакет является открытым кодом под лицензией [MIT license](LICENSE).

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance86

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~33 days

Recently: every ~77 days

Total

11

Last Release

69d ago

Major Versions

0.1 → 1.0.02025-04-03

v1.x-dev → 2.0.02025-12-26

PHP version history (2 changes)0.1PHP &gt;=7.1

1.0.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e3120e863bbd80929049bebf81511da3d053c7675b4f161db6efcae2dbe81f8?d=identicon)[alex8bits](/maintainers/alex8bits)

---

Top Contributors

[![alex8bits](https://avatars.githubusercontent.com/u/15152675?v=4)](https://github.com/alex8bits "alex8bits (14 commits)")[![bigperson](https://avatars.githubusercontent.com/u/4757391?v=4)](https://github.com/bigperson "bigperson (8 commits)")[![burcev-alex](https://avatars.githubusercontent.com/u/11717148?v=4)](https://github.com/burcev-alex "burcev-alex (4 commits)")[![skv12](https://avatars.githubusercontent.com/u/33741240?v=4)](https://github.com/skv12 "skv12 (4 commits)")[![Serokuz22](https://avatars.githubusercontent.com/u/54354622?v=4)](https://github.com/Serokuz22 "Serokuz22 (1 commits)")

---

Tags

commerceml1c1c-exchange1c-php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alex8bits-exchange1c/health.svg)

```
[![Health](https://phpackages.com/badges/alex8bits-exchange1c/health.svg)](https://phpackages.com/packages/alex8bits-exchange1c)
```

###  Alternatives

[bigperson/exchange1c

Catalog Loader from 1c - CommerceML protocol

406.5k4](/packages/bigperson-exchange1c)[bigperson/laravel-exchange1c

Catalog Loader from 1c - CommerceML with laravel

333.3k](/packages/bigperson-laravel-exchange1c)[carono/commerceml

Library for parsing CommerceML files

2136.6k5](/packages/carono-commerceml)

PHPackages © 2026

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