espend/idea-badge

此包的最新版本(v1.5.0)没有可用的许可信息。

借助Poser库,为IntelliJ IDEA / PhpStorm 插件仓库的统计提供徽章支持。

v1.5.0 2020-01-03 16:09 UTC

This package is auto-updated.

Last update: 2024-08-29 03:47:41 UTC


README

Build Status Total Downloads Latest Stable Version

安装

$ php composer.phar require espend/idea-badge
<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new espend\IdeaBadgeBundle\espendIdeaBadgeBundle(),
    );
}

配置

# app/config/routing.yml

espend_poser_extra:
    resource: .
    type: espend_idea_badge

基本用法

# app/config/config.yml

espend_idea_badge:
    badge_lifetime:       3600
    route_path:           '/badges/{id}/{provider}'
    badge_controller:     'espend_idea_badge_bundle.badge.controller:showAction'
    monthly_storage_path: '%kernel.root_dir%/../var/badge_monthly_storage_path.json'

网址

/badge/{pluginId}/downloads
/badge/{pluginId}/last-month
/badge/{pluginId}/version

运行测试

vendor/bin/phpunit tests/