mazahaler/project-connection-checker 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

mazahaler/project-connection-checker

Composer 安装命令:

composer require mazahaler/project-connection-checker

包简介

The extension allows to check connection to db, mail operation and secrets.json for compliance

README 文档

README

The extension allows to check for compliance secrets.json file and secrets in the project. The extension also allows to check db connections and mailing.

Requirements:

  • PHP 7.4. and higher;
  • Yii 2.0. and higher.

Installation:

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist mazahaler/project-connection-checker

or add

"mazahaler/project-connection-checker": "*"

to the require section of your composer.json.

Usage:

<?php

use mazahaler\ProjectConnectionChecker\ProjectConnectionChecker;

/**
* Check secrets, db connections and mailing
 * @param 1: Root path of the project
 * @param 2: Path to secrets.json
 * @param 3: \yii\swiftmailer\Mailer class
 * @param 4: Array of db connections in format: ['Your connection title(used for error output)' => [Instance of \yii\db\Connection | \yii\mongodb\Connection]]
 */
ProjectConnectionChecker::checkAll(\Yii::getAlias('@app'), \Yii::getAlias('@app') . '/secrets/secrets.json', \Yii::$app->mailer, ['mysql' => [\Yii::$app->db], 'mongodb' => [\Yii::$app->mongodb]]);

// OR check it separately:

ProjectConnectionChecker::checkSecrets(\Yii::getAlias('@app'), \Yii::getAlias('@app') . '/secrets/secrets.json');

ProjectConnectionChecker::checkMailing(\Yii::$app->mailer);

ProjectConnectionChecker::checkConnections(['mysql' => [\Yii::$app->db], 'mongodb' => [\Yii::$app->mongodb]]);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2021-03-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固