承接 pomm-project/foundation 相关项目开发

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

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

pomm-project/foundation

Composer 安装命令:

composer require pomm-project/foundation

包简介

Pomm connection manager for Postgresql

README 文档

README

Latest Stable Version Scrutinizer Code Quality Build Status Monthly Downloads License

This is the experimental branch of the foundation component of Pomm Project. It is compatible with PHP version >= 8.0.

What is Foundation ?

Foundation is the main block of Pomm database framework. It makes clients able to communicate either with the database or with each others through a session. One of these clients -- the query manager -- can make Foundation to be used as DBAL replacement. If you are looking for a library to use PostgreSQL in your web development, you might want to look at Pomm’s model manager. If you want to create a custom database access layer or just perform SQL queries, Foundation is the right tool.

Foundation provides out of the box:

  • Converters (all built-in Postgresql types are supported + arrays, HStore etc.) see this SO comment.
  • Prepared Queries.
  • Parametrized queries.
  • Seekable iterators on results.
  • LISTEN / NOTIFY asynchronous messages support.
  • Service manager for easy integration with dependency injection containers.

See more with code examples on this blog post.

Requirements

This branch is tested against the following configurations:

  • PHP 5.6, 7.0, 7.1, 7.2, 7.3 and uses mod-pgsql only (not PDO)
  • Postgresql 9.4

Pomm might work with older versions of PHP or Postgres but this is not tested and can be broken any time.

Installation

Pomm components are available on packagist using composer. To install and use Pomm's foundation, add a require line to "pomm-project/foundation" in your composer.json file.

Note: It is important the PHP configuration file defines the correct timezone setting. Pomm also sets the PostgreSQL connection to this timezone to prevent time shifts between the application and the database.

Documentation

Foundation’s documentation is available either online or directly in the documentation folder of the project.

Tests

This package uses Atoum as unit test framework. The tests are located in sources/tests. The test suite needs to access the database to ensure that read and write operations are made in a consistent manner. You need to set up a database for that and fill the sources/tests/config.php file with the according DSN. For convenience, Foundation provides two classes that extend Atoum with a Session:

  • PommProject\Foundation\Tester\VanillaSessionAtoum
  • PommProject\Foundation\Tester\FoundationSessionAtoum

Making your test class to extend one of these will grant them with a buildSession method that returns a newly created session. Clients of these classes must implement a initializeSession(Session $session) method (even a blank one). It is often a good idea to provide a fixture class as a session client, this method is the right place to register it.

Known bugs

Unfortunately there is a bug we can not fix easily or without degrading performances of the whole stack:

  • The ConvertedResultIterator can not recognize custom composite types when they are defined in schemas other than public. This is because the pg_type function does not return the schema the type belongs to. There are not turns around unless the schema is inspected manually by issuing a lot of queries. (see #53)

pomm-project/foundation 适用场景与选型建议

pomm-project/foundation 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 437.12k 次下载、GitHub Stars 达 69, 最近一次更新时间为 2014 年 09 月 29 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「framework」 「database」 「postgresql」 「pomm」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 pomm-project/foundation 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 pomm-project/foundation 我们能提供哪些服务?
定制开发 / 二次开发

基于 pomm-project/foundation 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 437.12k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 70
  • 点击次数: 30
  • 依赖项目数: 11
  • 推荐数: 1

GitHub 信息

  • Stars: 69
  • Watchers: 11
  • Forks: 33
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-09-29