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

ActiveLibrary

sv1ft/exchange1c
================

Catalog Loader from 1c - CommerceML protocol

1.3.5(2y ago)2366↓100%MITPHPPHP &gt;=7.1

Since Jan 31Pushed 2y agoCompare

[ Source](https://github.com/Sv1fT/exchange1c)[ Packagist](https://packagist.org/packages/sv1ft/exchange1c)[ Docs](https://github.com/Sv1fT)[ RSS](/packages/sv1ft-exchange1c/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (5)Versions (10)Used By (0)

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

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

[![Packagist](https://camo.githubusercontent.com/66f1ee572eb8789106737eda765fe45c950ae0485badeb49f926924fc4696e38/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f53763166542f65786368616e676531632e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist](https://camo.githubusercontent.com/a01b429cf51608093dec52325f641561e350bc89e422df78a70ac0d4c5c96a64/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f53763166542f65786368616e676531632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Sv1fT/exchange1c)[![Packagist](https://camo.githubusercontent.com/1b642cb911338f777e31c5bf3785e9f91e4ac7951a53d83e3c3fb12ca8bd3f7c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f53763166542f65786368616e676531632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Sv1fT/exchange1c)[![Travis (.org)](https://camo.githubusercontent.com/8b4d3965689e8bd5ffc9f485bd1b7809b75eec97b2a909ca1178945f8840d8d8/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f53763166542f65786368616e676531632e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Sv1fT/exchange1c)[![Codecov](https://camo.githubusercontent.com/63dd64c7fe29b900a503467469b803840e7d496feed0c018aab22ddf4a1bb320/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f53763166542f65786368616e676531632e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/Sv1fT/exchange1c)[![StyleCI](https://camo.githubusercontent.com/6eed384f1e57d167b193a2dc24ab892847aa9bbea07e8fb6eac5ebdbe84a160d/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3135333735313638312f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/153751681)

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

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

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

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

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

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

- php ^7.1
- carono/commerceml
- symfony/http-foundation ^4.1

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

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

`composer require Sv1fT/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'    => [
        \Sv1fT\Exchange1C\Interfaces\GroupInterface::class => \Tests\Models\GroupTestModel::class,
        \Sv1fT\Exchange1C\Interfaces\ProductInterface::class => \Tests\Models\ProductTestModel::class,
        \Sv1fT\Exchange1C\Interfaces\OfferInterface::class => \Tests\Models\OfferTestModel::class,
    ],
];
$config = new \Sv1fT\Exchange1C\Config($configValues);
$request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();
$symfonyDispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher();
$dispatcher = new \Sv1fT\Exchange1C\SymfonyEventDispatcher($symfonyDispatcher);
$modelBuilder = new \Sv1fT\Exchange1C\ModelBuilder();
// Создаем необходимые сервисы
$loaderService = new \Sv1fT\Exchange1C\Services\FileLoaderService($request, $config);
$authService = new \Sv1fT\Exchange1C\Services\AuthService($request, $config);
$categoryService = new \Sv1fT\Exchange1C\Services\CategoryService($request, $config, $dispatcher, $modelBuilder);
$offerService = new \Sv1fT\Exchange1C\Services\OfferService($request, $config, $dispatcher, $modelBuilder);
$catalogService = new \Sv1fT\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

26

—

LowBetter than 46% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

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

Total

9

Last Release

1094d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/09bf91ccbf0ad62bc9783091adeb337878fb9520988ce78c2333938294f3b452?d=identicon)[Sv1fT](/maintainers/Sv1fT)

---

Top Contributors

[![bigperson](https://avatars.githubusercontent.com/u/4757391?v=4)](https://github.com/bigperson "bigperson (8 commits)")[![sv1ftone](https://avatars.githubusercontent.com/u/230410438?v=4)](https://github.com/sv1ftone "sv1ftone (7 commits)")[![burcev-alex](https://avatars.githubusercontent.com/u/11717148?v=4)](https://github.com/burcev-alex "burcev-alex (4 commits)")[![Sv1fT](https://avatars.githubusercontent.com/u/13273000?v=4)](https://github.com/Sv1fT "Sv1fT (2 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/sv1ft-exchange1c/health.svg)

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

###  Alternatives

[bigperson/exchange1c

Catalog Loader from 1c - CommerceML protocol

406.4k4](/packages/bigperson-exchange1c)[carono/commerceml

Library for parsing CommerceML files

2236.0k4](/packages/carono-commerceml)[kilylabs/odata-1c

ODATA protocol client adopted to use with 1C

7538.7k](/packages/kilylabs-odata-1c)[bigperson/laravel-exchange1c

Catalog Loader from 1c - CommerceML with laravel

333.3k](/packages/bigperson-laravel-exchange1c)[kilylabs/client-bank-exchange-php

1CClientBankExchange parser written in PHP

2824.2k](/packages/kilylabs-client-bank-exchange-php)[gillbeits/commerceml

Library for CommerceML 2.0 parser

323.3k](/packages/gillbeits-commerceml)

PHPackages © 2026

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