承接 crasivo/bitrix-console 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

crasivo/bitrix-console

最新稳定版本:0.0.1

Composer 安装命令:

composer require crasivo/bitrix-console

包简介

Symfony console adapter for 1C-Bitrix

README 文档

README

An adapter for the popular Symfony Console library in 1C-Bitrix & Bitrix24.

Minimum requirements for installation:

  • 1C-Bitrix kernel (main) version: v20.5.400
  • PHP version: v7.2
  • Symfony Console version: v5.0

🚀 Quick Start

To use the library, simply install the Composer package via the command:

$ cd /path/to/project
$ composer require crasivo/bitrix-console

The library is ready to use. The executable file is located in the vendor/bin/console folder. Below is an example command to get a list of all modules.

$ php vendor/bin/console list

🕹️ Usage

Creating Commands

The process of creating commands for 1C-Bitrix (current adapter) is no different from Symfony. Command classes can be stored anywhere, including folders in a custom module. The only requirement for operation is visibility for Composer autoload.

Registering Commands

The library includes the CommandLocator class (analogous to the standard ServiceLocator), which loads commands from .settings.php configuration files. If your module is installed, the locator will also automatically load commands from it.

To register, simply define the console.commands section and specify a list of your commands in it. Below is an example of registering commands in various ways.

use Your\Awesome\Command;

return [
    'console' => [
        'value' => [
            'commands' => [
                Command::class, // simple (via class name)
                'some.command' => ['className' => Command::class], // classic
                'some.command' => ['constructor' => function () { return new Command(); }] // via constructor
            ],
        ],
        'readonly' => true,
    ],
];

📜 License

This project is distributed under the MIT license. The full text of the license can be found in the LICENSE file.

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-18