Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

pdo-pglite

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdo-pglite

PGlite connector for pdo & php-wasm.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

pdo-pglite

pdo-pglite is the PostgreSQL-compatible PDO driver extension used by php-wasm via @electric-sql/pglite.

This package mainly exists so custom php-wasm builds can compile in the pdo_pglite extension. It does not expose a separate JavaScript entrypoint from this folder. At runtime, support is activated by passing a PGlite constructor into the php-wasm runtime.

Requirements

pdo_pglite requires PHP 8.1 or newer.

Install

npm install php-wasm pdo-pglite @electric-sql/pglite

Usage

import { PhpWeb } from 'php-wasm/PhpWeb.mjs';
import { PGlite } from '@electric-sql/pglite';

const php = new PhpWeb({
  version: '8.4',
  PGlite,
});

await php.run(`<?php
  $pdo = new PDO('pgsql:idb-storage');
  var_dump($pdo instanceof PDO);
`);

Custom Builds

Enable WITH_PDO_PGLITE=1 in .php-wasm-rc.

Build Options

  • WITH_PDO_PGLITE: defaults to 1. Set it to 0 if you want to exclude the extension from a custom build.
  • PDO_PGLITE_DEV_PATH: optional local source checkout to use instead of cloning the upstream pdo-pglite repository during the build.

FAQs

Package last updated on 18 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts