承接 otis22/cleardb-url 相关项目开发

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

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

otis22/cleardb-url

Composer 安装命令:

composer require otis22/cleardb-url

包简介

Clear-db-url parser.

README 文档

README

Clear-db-url parser. Cleardb is a db as service. Useful for heroku users.

GitHub CI Autofix Coverage Status

How to use

Install package

composer require otis22/cleardb-url

For heroku users

Heroku server put clearDb url to environments. This function use env with name CLEARDB_DATABASE_URL.

use function Otis22\ClearDb\credential;

$credential = credential();

$credential->db(); #db name
$credential->driver(); #db type(mysql, pgsql, ...)
$credential->host(); #host
$credential->pass(); #password
$credential->user(); #user   

For phinx on heroku

use function Otis22\ClearDb\phinx;

return
[
...
    'environments' => [
        'default_migration_table' => 'phinxlog',
        'default_environment' => 'production',
        'production' => phinx()->asArray()
    ],
...

Parse custom clearDb url

use Otis22\ClearDb\ParsedUrl;
use Otis22\ClearDb\Credential;

$credential = new Credential(
    new ParsedUrl('mysql://user:pass@host/dbname?reconnect=true')
);
# Available for getting db credentials
$credential->db();
...

Contributing

For run all tests

make all

or connect to terminal

make exec

or use built in php server http://localhost:8080

# start server on 8080 port
make serve 
# custom port 8081
make serve PORT=8081

Dafault php version is 7.4. Use PHP_VERSION= for using custom version.

make all PHP_VERSION=8.0
# run both 
make all PHP_VERSION=7.4 && make all PHP_VERSION=8.0

all commands

# composer install
make install
# composer install with --no-dev
make install-no-dev
# check code style
make style
# fix code style
make style-fix
# run static analyze tools
make static-analyze
# run unit tests
make unit
#  check coverage
make coverage

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-12-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固