Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php +psql #5051

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 35 additions & 3 deletions projects/php.net/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ dependencies:
build:
dependencies:
freetype.org: '*'
postgresql.org: '*'
darwin:
tukaani.org/xz: '*'

Expand Down Expand Up @@ -124,6 +125,8 @@ build:
- --with-libedit
- --with-openssl
- --with-pdo-sqlite
- --with-pdo-pgsql={{deps.postgresql.org.prefix}}
- --with-pdo-mysql
- --with-pic
- --with-sodium
- --with-sqlite3
Expand Down Expand Up @@ -156,6 +159,35 @@ provides:
- bin/phpdbg
- bin/phpize

test: |
php --version | grep {{ version }}
php -r 'echo "Hello World!\n";'
test:
- php --version | grep {{ version }}

- php -r 'echo "Hello World!\n";'

- run:
php $FIXTURE
fixture: |
<?php
phpinfo()
?>

- run:
- |
mkdir -p ./data
initdb -D ./data
pg_ctl -D ./data -l logfile start
createdb mary

# in order to not force php to depend on postgres we are trying this out
- pkgx +psql php $FIXTURE

- |
pg_ctl -D ./data stop
rm ./data
if: darwin # FIXME linux tests run as sudo which fails with initdb
fixture: |
<?php
$dbconn = pg_connect("host=localhost port=5432 dbname=mary") or die("Could not connect");
$v = pg_version($dbconn);
echo $v['client'];
?>
Loading