定制 dxw/phar-install 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

dxw/phar-install

最新稳定版本:v1.1.2

Composer 安装命令:

composer require dxw/phar-install

包简介

README 文档

README

Tool to bundle up contents of vendor/ into vendor.phar file.

This may be useful if you want to put your project in a web-readable directory but you don't want to trawl through all the files in vendor/ to make sure none of them could allow an attacker to do something they shouldn't be able to do.

Usage

Add the following to composer.json:

  "scripts": {
    "post-update-cmd": "vendor/bin/phar-install"
  },

Add phar-install:

composer require --dev dxw/phar-install

vendor.phar will be rebuilt automatically every time composer update or composer require is run.

Now just replace require(__DIR__.'/vendor/autoload.php'); with require(__DIR__.'/vendor.phar');.

Get composer's autoloader

You can also get access to the autoloader object if needed. The phar file will return the autoloader. With this functionality you can add on your own project's namespaced files into the autoloader.

$autoload = require_once __DIR__ . '/vendor.phar';
$autoload->add('MyNamespace', __DIR__ . '/src');

Copyright

Copyright dxw 2015 - see COPYING.md

统计信息

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

GitHub 信息

  • Stars: 19
  • Watchers: 9
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-22