承接 yidas/yii2-composer-bower-skip 相关项目开发

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

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

yidas/yii2-composer-bower-skip

Composer 安装命令:

composer require yidas/yii2-composer-bower-skip

包简介

A Composer package that allows you to install or update Yii2 without Bower-Asset

README 文档

README

Yii2 Composer Bower Skip


A Composer package that allows you to install or update Yii2 without Bower-Asset.

Latest Stable Version License Total Downloads Monthly Downloads

FEATURES

  • Prevent the error of Bower packages when using Composer install & update for Yii2

    Problem 1

    - yiisoft/yii2 2.0.12 requires bower-asset/jquery 2.2.@stable | 2.1.@stable | 1.11.@stable | 1.12.@stable -> no matching package found.

  • Skip Bower packages installation or update, No fxp/composer-asset-plugin needed

Bower packages are not original Packagist source from Composer, so it will cause error when you install or update Bower without a plugin (fxp/composer-asset-plugin or Asset-Packagist). After requiring this package, Bower packages will not be required or updated, which you will keep the current version of Bower or even no Bower in the project vendor.

If you are using Yii2 core Bower, the recommended way is using yidas/yii2-bower-asset which could install or update Bower for Yii2 without plugin.

INSTALLATION

1. Require Package

In Yii2 composer.json, require yidas/yii2-composer-bower-skip before yiisoft/yii2.

Example composer.json:

"require": {
    "php": ">=5.4.0",
    "yidas/yii2-composer-bower-skip": "~2.0.5",
    "yiisoft/yii2": "~2.0.5",
    "yiisoft/yii2-bootstrap": "~2.0.0"
}

2. Remove Composer Asset-Packagist Repositories Optionally

If you are using the version 2.0.13 or higher of Yii, you may optional remove the repositories setting of composer.json to use original Composer repository.

Example segament to delete in composer.json :

"repositories": [
    {
        "type": "composer",
        "url": "https://asset-packagist.org"
    }
]

After that, you can run composer update or composer install without handling Bower-Asset.

CREATE PROJECT

If you doesn't has Yii2 project yet, choose one of below ways to create:

Create Project via Composer

You can use Composer to create Yii2 project by using following package:

yidas/yii2-app-basic

composer create-project --prefer-dist yidas/yii2-app-basic

yidas/yii2-app-advanced

composer create-project --prefer-dist yidas/yii2-app-advanced

These packages are Yii 2 Application Template with fixed Bower, which including yidas/yii2-bower-asset already.

Creating Project from Official Site

You could download Yii2 project from official Archive File, then manally install yii2-composer-bower-skip on it by following above instruction.

FAQ

Still Stuck when Composer Update

If you still get trouble with Bower after install this package, try to delete composer.lock file and make sure the asset plugin is disabled:

composer global remove fxp/composer-asset-plugin
composer update

Keep Current Bower

If you still want to keep vendor\bower, you could set reverse Git-ignore for that folder:

# composer vendor dir
/vendor/*
!/vendor/bower

For example, you may lose Bower vendor after the project is pushed to Git server then re-install Composer from the clone one.

If you want keep whole vendor ignored, you could take a look for yidas/yii2-bower-asset which support auto-install for Bower.

LIMITATIONS

This solution is for the situation that you won't require or update Bower asset of Yii2 for development such as using yii2-debug and yii2-gii.

If you are using Yii2 Bower, there are some smooth ways to require or update Bower for Yii2:

Yii2 Bower Asset Package

yidas/yii2-bower-asset goals to install Bower for Yii2 app by original Composer repository, and makes Bower and Composer separated.

This is the recommended way to handle Bower with Yii2.

Asset-Packagist Solution

Asset-Packagist is the new solution of Yii2, you may install Bower smoothly in Yii2 from 2.0.14 version until release.

yidas/yii2-composer-bower-skip 适用场景与选型建议

yidas/yii2-composer-bower-skip 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 760.92k 次下载、GitHub Stars 达 42, 最近一次更新时间为 2016 年 11 月 20 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「framework」 「bower」 「yii2」 「bower asset」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 yidas/yii2-composer-bower-skip 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 yidas/yii2-composer-bower-skip 我们能提供哪些服务?
定制开发 / 二次开发

基于 yidas/yii2-composer-bower-skip 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 42
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-11-20