{"id":18504217,"url":"https://github.com/pomm-project/foundation","last_synced_at":"2025-04-05T19:15:12.527Z","repository":{"id":21036299,"uuid":"24332880","full_name":"pomm-project/Foundation","owner":"pomm-project","description":"Foundation package for the Pomm database framework.","archived":false,"fork":false,"pushed_at":"2023-02-15T21:36:19.000Z","size":795,"stargazers_count":70,"open_issues_count":14,"forks_count":36,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-01-22T14:41:28.335Z","etag":null,"topics":["database","php","pomm","postgres","postgresql"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pomm-project.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2014-09-22T14:55:17.000Z","updated_at":"2023-03-17T14:35:54.000Z","dependencies_parsed_at":"2022-09-13T22:10:13.960Z","dependency_job_id":"3cbec74a-8814-4e81-9494-bb15afbd992e","html_url":"https://github.com/pomm-project/Foundation","commit_stats":{"total_commits":459,"total_committers":27,"mean_commits":17.0,"dds":0.196078431372549,"last_synced_commit":"11840c088f31033a39e4b8c033579b2e8f993801"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomm-project%2FFoundation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomm-project%2FFoundation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomm-project%2FFoundation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomm-project%2FFoundation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pomm-project","download_url":"https://codeload.github.com/pomm-project/Foundation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247386266,"owners_count":20930619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","php","pomm","postgres","postgresql"],"created_at":"2024-11-06T14:03:32.679Z","updated_at":"2025-04-05T19:15:12.499Z","avatar_url":"https://github.com/pomm-project.png","language":"PHP","readme":"# Foundation\n\n[![Latest Stable Version](https://poser.pugx.org/pomm-project/foundation/v/stable)](https://packagist.org/packages/pomm-project/foundation) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/pomm-project/Foundation/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/pomm-project/Foundation/?branch=master) [![Build Status](https://travis-ci.org/pomm-project/Foundation.svg?branch=master)](https://travis-ci.org/pomm-project/Foundation) [![Monthly Downloads](https://poser.pugx.org/pomm-project/foundation/d/monthly.png)](https://packagist.org/packages/pomm-project/foundation) [![License](https://poser.pugx.org/pomm-project/foundation/license.svg)](https://packagist.org/packages/pomm-project/foundation)\n\nThis is the **experimental branch** of the  foundation component of [Pomm Project](http://www.pomm-project.org). It is compatible with PHP version \u003e= 8.0.\n\n## What is Foundation ?\n\nFoundation 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](https://github.com/pomm-project/ModelManager). If you want to create a custom database access layer or just perform SQL queries, Foundation is the right tool.\n\nFoundation provides out of the box:\n\n * Converters (all built-in Postgresql types are supported + arrays, HStore etc.) see [this SO comment](http://stackoverflow.com/questions/31643297/pg-query-result-contains-strings-instead-of-integer-numeric/31740990#31740990).\n * Prepared Queries.\n * Parametrized queries.\n * Seekable iterators on results.\n * LISTEN / NOTIFY asynchronous messages support.\n * Service manager for easy integration with dependency injection containers.\n\n[See more with code examples on this blog post](http://www.pomm-project.org/news/a-short-focus-on-pomm-s-foundation.html).\n\n## Requirements\n\nThis branch is tested against the following configurations:\n * PHP 5.6, 7.0, 7.1, 7.2, 7.3 and uses mod-pgsql only (not PDO)\n * Postgresql 9.4\n\nPomm might work with older versions of PHP or Postgres but this is not tested and can be broken any time.\n\n## Installation\n\nPomm components are available on [packagist](https://packagist.org/packages/pomm-project/) using [composer](https://packagist.org/). To install and use Pomm's foundation, add a require line to `\"pomm-project/foundation\"` in your `composer.json` file.\n\n**Note:** It is important the PHP configuration file defines the correct [timezone](http://php.net/manual/en/datetime.configuration.php) setting. Pomm also sets the PostgreSQL connection to this timezone to prevent time shifts between the application and the database.\n\n## Documentation\n\nFoundation’s documentation is available [either online](https://github.com/pomm-project/Foundation/blob/master/documentation/foundation.rst) or directly in the `documentation` folder of the project.\n\n## Tests\n\nThis package uses [Atoum](https://github.com/atoum/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`:\n\n * `PommProject\\Foundation\\Tester\\VanillaSessionAtoum`\n * `PommProject\\Foundation\\Tester\\FoundationSessionAtoum`\n\nMaking 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.\n\n## Known bugs\n\nUnfortunately there is a bug we can not fix easily or without degrading performances of the whole stack:\n * 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)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpomm-project%2Ffoundation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpomm-project%2Ffoundation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpomm-project%2Ffoundation/lists"}