定制 gerardojbaez/php-checkup 二次开发

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

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

gerardojbaez/php-checkup

Composer 安装命令:

composer require gerardojbaez/php-checkup

包简介

Framework agnostic application health and requirement checks.

README 文档

README

Banner

PHP Checkup

Framework agnostic application health and requirement checks.

Build Status Coverage Software License

TL;DR

use \Gerardojbaez\PhpCheckup\Checks\Php\ExtensionIsLoaded;
use \Gerardojbaez\PhpCheckup\Manager;
use \Gerardojbaez\PhpCheckup\Runner;

$manager = new Manager;

// Register checks
$manager->add(
    (new Check('Required PHP extension "mbstring" is installed', new ExtensionIsLoaded('mbstring')))
        ->group('requirements')
        ->passing('The extension is installed')
        ->failing('The extension is not installed. Please install or enable it before proceeding.')
        ->critical()
);

// Run checks
$runner = new Runner($manager);
$runner->run()->isPassing();

Why

Application health-checks is a great way to see how an application is performing at any given time and to see what needs immediate attention. They also improve communication by allowing users to quickly and easily share important environment-specific information with developers.

PHP Checkup aims to provide the foundation for such functionality by giving developers a list of common checks, a quick way to add new custom checks, and an easy way to run all or a portion of them.

Use cases

  • Application pre-installation checks
    • For example, to make sure that the server meets all the minimum requirements
  • Application post-installation checks
    • For example, make sure that the front-page and API are returning 200 status code, and
    • oAuth server is properly configured, and
    • Installer is disabled
  • Application post-update checks
  • A webpage inside an administrative system showing all the health checks of the application.
  • A stand-alone package so users can check whether their server meet a minimum set of requirements for a particular application, before purchasing.
  • Application performance check-list and suggestions.
  • Perform environment-specific checks

Example health checks

  • URL HTTP Status
  • Database connection
  • Database type
  • Database version
  • PHP version
  • PHP installed extensions
  • PHP memory limit
  • PHP INI settings (more commonly used for suggestions and security checks)
  • Queue status
  • Last cronjob executed (maybe show a warning when last cronjob is older than a specified date)
  • Writable directory or file
  • Expected directory structure
  • Presence/absence of a file or directory
  • Payment gateway connection
  • Email service connection
  • Make sure private files like .env aren’t accessible publicly
  • Warn about debug flag on a production environment
  • SSL Check
  • Warn about permissive file-permissions

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固