承接 ivenms/package-changelog 相关项目开发

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

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

ivenms/package-changelog

最新稳定版本:0.0.5

Composer 安装命令:

composer require ivenms/package-changelog

包简介

show package changeLog on install/update

README 文档

README

PackageChangeLog
Latest Stable Version Total Downloads

usually when a package gets updated, the package owner could possibly add/change/remove something from the configuration file, or could add a new feature that he/she didn't have time to add to the read me yet, or for whatever reason that could potentially effect how the user consume the package.

Therefor PackageChangeLog was made, to help developers keep their packages as user friendly as possible and keep the users up-to-date with new changes as releases gets published.

Installation

  • composer require ivenms/package-changelog

  • after installation, package will auto-register the below to composer.json

    "scripts": {
        "post-install-cmd": [
            "@php artisan pcl:post-install"
        ],
        "post-update-cmd": [
            "@php artisan pcl:post-update"
        ]
    }

Upgrading to v:v:

  • remove 'App\\Providers\\EventServiceProvider::postAutoloadDump' from composer.json

  • remove

    /**
    * "ivenms/package-changelog".
    */
    public static function postAutoloadDump(\Composer\Script\Event $event)
    {
       if (class_exists('ivenms\PackageChangeLog\Ops')) {
           return \ivenms\PackageChangeLog\Ops::postAutoloadDump($event);
       }
    }

    from app\Providers\EventServiceProvider

  • clear the cache php artisan cache:clear


Usage

  • inside your "package" composer.json

    • add the package as a dependency
    • add "changeLog": "log_folder_name" to extra
    "require": {
        // ...
        "ivenms/package-changelog": "^2.0"
    },
    "extra": {
        // ...
        "changeLog": "logs"
    }
  • inside that folder add the log files

    • install post-install-cmd

    if you want to show a log on installation only, then add a file name install.txt and we will display it only when the package gets installed for the first time.

    release tag log file name
    * install.txt
    • update post-update-cmd

    the version have to be equal "==" to the release tag because we check against that version b4 showing the log.

    this is useful in-case you didn't add a changeLog for the current published version.

    release tag log file name
    v1.0.0 v1.0.0.txt

Uninstall

  • for whatever reason you decided to remove the package, make sure to remove all the package scripts under composer.json before uninstall
"scripts": {
    "post-install-cmd": [
        "@php artisan pcl:post-install"
    ],
    "post-update-cmd": [
        "@php artisan pcl:post-update"
    ]
}

Notes

  • we don't use any parser for the log file, so whatever you write in the file will be displayed to the user as it is.
  • This is more of a utility package directed towards developers & to get the best of it you have to add it to your package, however to test it you can install it like any other package & you would get a message like the screenshot above.

Security

If you discover any security-related issues, please email ivenms-dev@protonmail.com.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-25