matks/customer-support-bundle

基于票务的包,用于将客户交流集成到您的symfony2应用中

v1.2 2018-01-05 10:49 UTC

This package is auto-updated.

Last update: 2024-09-09 23:47:55 UTC


README

Latest Stable Version Build Status Scrutinizer Code Quality Code Coverage Latest Unstable Version License

基于票务的包,用于将客户交流集成到您的symfony2应用中

安装

步骤 1: composer 需求

在您的 composer.json 中添加私有仓库元数据

{
    "require": {
        "matks/customer-support-bundle": "1.2"
    },
}

然后运行 composer 命令

$ php composer.phar install

步骤 2: 在您的 Symfony 应用中启用该包

<?php
    // app/AppKernel.php

    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Matks\Bundle\CustomerSupportBundle\CustomerSupportBundle(),
        )
    }

步骤 3: 配置 doctrine 实体解析器

doctrine:
    orm:
        resolve_target_entities:
            Matks\Bundle\CustomerSupportBundle\Model\UserInterface: Matks\Bundle\CustomerSupportBundle\Entity\User
            Matks\Bundle\CustomerSupportBundle\Model\MessageInterface: Matks\Bundle\CustomerSupportBundle\Entity\Message
            Matks\Bundle\CustomerSupportBundle\Model\TicketInterface: Matks\Bundle\CustomerSupportBundle\Entity\Ticket
            Matks\Bundle\CustomerSupportBundle\Model\CategoryInterface: Matks\Bundle\CustomerSupportBundle\Entity\Category

测试

独立上下文

在包隔离上下文中,只需使用 composer 安装开发依赖

$ composer install --dev

使用 phpunit 二进制文件运行单元测试套件

$ vendor/bin/phpunit

使用 behat 二进制文件运行验收测试,使用示例应用和 sqlite

$ vendor/bin/behat -c behat.ci.yml