asgoodasnu/version-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

asgoodasnu/version-bundle

最新稳定版本:v0.1.3

Composer 安装命令:

composer require asgoodasnu/version-bundle

包简介

Bundle to provide a version controller

README 文档

README

Build Status Total Downloads Latest Stable Version SensioLabsInsight

Installation

Install via composer:

composer.phar require asgoodasnu/version-bundle

Register your bundle in the AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Wk\VersionBundle\WkVersionBundle(),
        // ...
    );

    return $bundles;
}

If you want the REST API then add the following to app/config/routing.yml

_version:
    resource: "@WkVersionBundle/Resources/config/routing.yml"

Configuration

Put the following parameter into you app/config/parameters.yml

version: 1.0.0

Update this value if a new version has been deployed

Usage

Now you can retrieve the version number of your application via REST API

curl http://your-project.org/version.json

To make this version accessible for twig templates put it into app/config/config.yml

twig:
    # ...
    globals:
        version: "%version%" 

Then you can use it like that

<p>The version number is: {{ version }}</p>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-12