承接 devmcc/package-dev 相关项目开发

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

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

devmcc/package-dev

Composer 安装命令:

composer require devmcc/package-dev

包简介

A simple tool for developing Composer packages.

README 文档

README

A simple tool for developing Composer packages.

PackageDev makes use of symlinks to make it seem as if the package you are developing is run in vendor. Thanks to this, you can make changes to your package and immediately check the results.

Installation

It is recommended to install PackageDev globally:

composer global require devmcc/package-dev

After you have installed PackageDev, go to the root directory of the project that needs to use your package and run:

package-dev init

Next, open up your project's composer.json file and add the following:

"scripts": {
    "pre-install-cmd": [
        "package-dev symlink-remove"
    ],
    "pre-update-cmd": [
        "package-dev symlink-remove"
    ],
    "post-install-cmd": [
        "package-dev symlink-create"
    ],
    "post-update-cmd": [
        "package-dev symlink-create"
    ]
}

Linking packages

After running init, a new directory called packages was created, you need to add your packages to this directory.

If your package is called devmcc/testing, you need to add your package in the following folder structure:

./packages/devmcc/testing

Link your package with the following command:

package-dev link devmcc/testing

Unlink your package with the following command:

package-dev unlink devmcc/testing

Using a phar archive

PackageDev can be run through a phar archive. This can be very usefull for when you are using things like Docker containers.

You can create an archive with:

package-dev phar

Next, make the following changes to your project's composer.json file:

"pre-install-cmd": [
-    "package-dev symlink-remove"
+    "@php package-dev.phar symlink-remove"
],
"pre-update-cmd": [
-    "package-dev symlink-remove"
+    "@php package-dev.phar symlink-remove"
],
"post-install-cmd": [
-    "package-dev symlink-create"
+    "@php package-dev.phar symlink-create"
],
"post-update-cmd": [
-    "package-dev symlink-create"
+    "@php package-dev.phar symlink-create"
]

NOTE: In order to be able to create phar archives, you need to add the following to your php.ini file:

phar.readonly = 0

Upgrading from version 1

For anyone who was using version 1, here is how you can upgrade to version 2: Unlink all your packages, do the upgrade and link them again

Testing

After you have cloned the repo and installed all dependencies you can do the following:

  • Run unit tests with - vendor/bin/phpunit
  • Run code analysis with - vendor/bin/phpstan analyse src tests --level max
  • Run code coverage analysis with - vendor/bin/phpunit --coverage-html tmp/code-coverage
    • Then open tmp/code-coverage/index.html in your browser
  • Run phpcs with - vendor/bin/phpcs --standard=PSR12 src tests

devmcc/package-dev 适用场景与选型建议

devmcc/package-dev 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 28 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 05 月 06 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 devmcc/package-dev 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-06