承接 shorock/flex-doctrine-pg 相关项目开发

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

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

shorock/flex-doctrine-pg

Composer 安装命令:

composer require shorock/flex-doctrine-pg

包简介

Open minded PostGres connection driver for Doctrine DBAL

README 文档

README

A little Doctrine DBAL driver for PostgreSQL connections. Basically, we've taken to using certain options in the libpq library that Doctrine's built in DSN constructor is opinionated about. Notably, sslcert or service, whereby we can use a different SSL certificate for cert authentication to Postgres. (BTW - if you just have one cert/key per user, they can just use the canon name of ~/.postgresql/server.crt, server.key, & root.crt and you don't need this module.

If you've never used 'service', it's a lovely way to go. You can also do your command line connection with $ psql service=mydb if you set that up.

Now, if you're using Doctrine more directly, the fact that it can't handle some of these advanced configuration options isn't such a problem. Write your options into new PDO(...) and pass it to Doctrine. Not so easy if you're wanting to use something higher level (Symfony, etc).

I'm pulling from the driverOptions array for bare Doctrine DBAL because I didn't want to add more options to the Symfony Doctrine bundle's top-level configuration schema.

Example (Symfony - config.yml)

doctrine:
    dbal:
      driver_class: Shorock\Doctrine\FlexPDOPgSql\Driver
      user: shorock
      options:
        service: libdb
	# or
	# dsn: "pgsql:dbname=libdb.you.edu sslcert=/etc/pki/alternate.crt sslkey=/etc/pki/alternate.key"

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-01-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固