# autogenerated file; do not edit
language: c
+sudo: false
addons:
postgresql: 9.4
- php-pear
- valgrind
+compiler:
+ - gcc
+ - clang
+
env:
global:
- PQ_DSN="postgres://postgres@localhost/test"
matrix:
- - PHP=7.0 enable_debug=no enable_maintainer_zts=no enable_json=no
- - PHP=7.1 enable_debug=no enable_maintainer_zts=no enable_json=no
- - PHP=7.2 enable_debug=no enable_maintainer_zts=no enable_json=no
- - PHP=master enable_debug=no enable_maintainer_zts=no enable_json=no
- - PHP=7.0 enable_debug=yes enable_maintainer_zts=no enable_json=no
- - PHP=7.1 enable_debug=yes enable_maintainer_zts=no enable_json=no
- - PHP=7.2 enable_debug=yes enable_maintainer_zts=no enable_json=no
- - PHP=master enable_debug=yes enable_maintainer_zts=no enable_json=no
- - PHP=7.0 enable_debug=no enable_maintainer_zts=yes enable_json=no
- - PHP=7.1 enable_debug=no enable_maintainer_zts=yes enable_json=no
- - PHP=7.2 enable_debug=no enable_maintainer_zts=yes enable_json=no
- - PHP=master enable_debug=no enable_maintainer_zts=yes enable_json=no
- - PHP=7.0 enable_debug=yes enable_maintainer_zts=yes enable_json=no
- - PHP=7.1 enable_debug=yes enable_maintainer_zts=yes enable_json=no
- - PHP=7.2 enable_debug=yes enable_maintainer_zts=yes enable_json=no
- - PHP=master enable_debug=yes enable_maintainer_zts=yes enable_json=no
- - PHP=7.0 enable_debug=no enable_maintainer_zts=no enable_json=yes
- - PHP=7.1 enable_debug=no enable_maintainer_zts=no enable_json=yes
- - PHP=7.2 enable_debug=no enable_maintainer_zts=no enable_json=yes
- - PHP=master enable_debug=no enable_maintainer_zts=no enable_json=yes
- - PHP=7.0 enable_debug=yes enable_maintainer_zts=no enable_json=yes
- - PHP=7.1 enable_debug=yes enable_maintainer_zts=no enable_json=yes
- - PHP=7.2 enable_debug=yes enable_maintainer_zts=no enable_json=yes
- - PHP=master enable_debug=yes enable_maintainer_zts=no enable_json=yes
- - PHP=7.0 enable_debug=no enable_maintainer_zts=yes enable_json=yes
- - PHP=7.1 enable_debug=no enable_maintainer_zts=yes enable_json=yes
- - PHP=7.2 enable_debug=no enable_maintainer_zts=yes enable_json=yes
- - PHP=master enable_debug=no enable_maintainer_zts=yes enable_json=yes
- PHP=7.0 enable_debug=yes enable_maintainer_zts=yes enable_json=yes
- PHP=7.1 enable_debug=yes enable_maintainer_zts=yes enable_json=yes
- - PHP=7.2 enable_debug=yes enable_maintainer_zts=yes enable_json=yes
- PHP=master enable_debug=yes enable_maintainer_zts=yes enable_json=yes
+ - PHP=7.2 enable_json=no
+ - PHP=7.2 enable_json=yes enable_debug=no enable_maintainer_zts=no
+ - PHP=7.2 enable_json=yes enable_debug=yes enable_maintainer_zts=no
+ - PHP=7.2 enable_json=yes enable_debug=no enable_maintainer_zts=yes
+ - PHP=7.2 enable_json=yes enable_debug=yes enable_maintainer_zts=yes
+ - PHP=7.2 enable_json=yes CFLAGS='-O0 -g --coverage' CXXFLAGS='-O0 -g --coverage'
-before_script:
+install:
- make -f travis/pecl/Makefile php
- make -f travis/pecl/Makefile pecl PECL=raphf:raphf:2.0.0
- - make -f travis/pecl/Makefile ext PECL=pq
+
+before_script:
- psql -U postgres -c "CREATE DATABASE test"
script:
+ - make -f travis/pecl/Makefile ext PECL=pq
- make -f travis/pecl/Makefile test
-sudo: false
+after_success:
+ - test -n "$CFLAGS" && cd src/.libs && bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy
+++ /dev/null
-#!/bin/sh
-CWD=$(dirname $0)
-awk -f $CWD/php_pq_type.awk >$CWD/php_pq_type.h \
- <${1-/usr/include/postgresql}/server/catalog/pg_type.h
+++ /dev/null
-#!/usr/bin/env php
-# autogenerated file; do not edit
-language: c
-
-addons:
- postgresql: 9.4
- apt:
- packages:
- - php5-cli
- - php-pear
- - valgrind
-
-env:
- global:
- - PQ_DSN="postgres://postgres@localhost/test"
- matrix:
-<?php
-
-$gen = include "./travis/pecl/gen-matrix.php";
-$env = $gen([
- "PHP" => ["7.0", "7.1", "7.2", "master"],
- "enable_debug",
- "enable_maintainer_zts",
- "enable_json",
-]);
-foreach ($env as $e) {
- printf(" - %s\n", $e);
-}
-
-?>
-
-before_script:
- - make -f travis/pecl/Makefile php
- - make -f travis/pecl/Makefile pecl PECL=raphf:raphf:2.0.0
- - make -f travis/pecl/Makefile ext PECL=pq
- - psql -U postgres -c "CREATE DATABASE test"
-
-script:
- - make -f travis/pecl/Makefile test
-
-sudo: false
+++ /dev/null
-#!/usr/bin/awk -f
-
-BEGIN {
- printf "#ifndef PHP_PQ_TYPE\n"
- printf "# define PHP_PQ_TYPE(t,o)\n"
- printf "#endif\n"
-}
-
-END {
- printf "#ifndef PHP_PQ_TYPE_IS_ARRAY\n"
- printf "# define PHP_PQ_TYPE_IS_ARRAY(oid) (\\\n\t\t0 \\\n"
- for (oid in arrays) {
- printf "\t||\t((oid) == %d) \\\n", oid
- }
- printf ")\n#endif\n"
-
- printf "#ifndef PHP_PQ_TYPE_OF_ARRAY\n"
- printf "# define PHP_PQ_TYPE_OF_ARRAY(oid) ("
- for (oid in arrays) {
- printf "\\\n\t(oid) == %d ? %s : ", oid, arrays[oid]
- }
- printf "0 \\\n)\n#endif\n"
-
- printf "#ifndef PHP_PQ_DELIM_OF_ARRAY\n"
- printf "# define PHP_PQ_DELIM_OF_ARRAY(oid) ("
- for (oid in delims) {
- printf "\\\n\t(oid) == %d ? '%s' : ", oid, delims[oid]
- }
- printf "\\\n\t0 \\\n)\n#endif\n"
-}
-
-/^DATA/ {
- oid = $4
- name = toupper($6)
- adelim = $15
- atypoid = $17
- if (sub("^_", "", name)) {
- arrays[oid] = atypoid
- name = name "ARRAY"
- }
- delims[oid] = adelim
- printf "#ifndef PHP_PQ_OID_%s\n", name
- printf "# define PHP_PQ_OID_%s %d\n", name, oid
- printf "#endif\n"
- printf "PHP_PQ_TYPE(\"%s\", %d)\n", name, oid
-}
--- /dev/null
+#!/bin/sh
+CWD=$(dirname $0)
+awk -f $CWD/php_pq_type.awk >$CWD/../php_pq_type.h \
+ <${1-/usr/include/postgresql}/server/catalog/pg_type.h
--- /dev/null
+#!/usr/bin/env php
+# autogenerated file; do not edit
+language: c
+sudo: false
+
+addons:
+ postgresql: 9.4
+ apt:
+ packages:
+ - php5-cli
+ - php-pear
+ - valgrind
+
+compiler:
+ - gcc
+ - clang
+
+env:
+ global:
+ - PQ_DSN="postgres://postgres@localhost/test"
+ matrix:
+<?php
+
+$gen = include "./travis/pecl/gen-matrix.php";
+$cur = "7.2";
+$env = $gen([
+ "PHP" => ["7.0", "7.1", "master"],
+ "enable_debug" => "yes",
+ "enable_maintainer_zts" => "yes",
+ "enable_json" => "yes",
+], [
+ "PHP" => $cur,
+ "enable_json" => "no",
+], [
+ "PHP" => $cur,
+ "enable_json" => "yes",
+ "enable_debug",
+ "enable_maintainer_zts"
+], [
+ "PHP" => $cur,
+ "enable_json" => "yes",
+ "CFLAGS" => "'-O0 -g --coverage'",
+ "CXXFLAGS" => "'-O0 -g --coverage'",
+]);
+
+foreach ($env as $g) {
+ foreach ($g as $e) {
+ printf(" - %s\n", $e);
+ }
+}
+
+?>
+
+install:
+ - make -f travis/pecl/Makefile php
+ - make -f travis/pecl/Makefile pecl PECL=raphf:raphf:2.0.0
+
+before_script:
+ - psql -U postgres -c "CREATE DATABASE test"
+
+script:
+ - make -f travis/pecl/Makefile ext PECL=pq
+ - make -f travis/pecl/Makefile test
+
+after_success:
+ - test -n "$CFLAGS" && cd src/.libs && bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy
--- /dev/null
+#!/usr/bin/awk -f
+
+BEGIN {
+ printf "#ifndef PHP_PQ_TYPE\n"
+ printf "# define PHP_PQ_TYPE(t,o)\n"
+ printf "#endif\n"
+}
+
+END {
+ printf "#ifndef PHP_PQ_TYPE_IS_ARRAY\n"
+ printf "# define PHP_PQ_TYPE_IS_ARRAY(oid) (\\\n\t\t0 \\\n"
+ for (oid in arrays) {
+ printf "\t||\t((oid) == %d) \\\n", oid
+ }
+ printf ")\n#endif\n"
+
+ printf "#ifndef PHP_PQ_TYPE_OF_ARRAY\n"
+ printf "# define PHP_PQ_TYPE_OF_ARRAY(oid) ("
+ for (oid in arrays) {
+ printf "\\\n\t(oid) == %d ? %s : ", oid, arrays[oid]
+ }
+ printf "0 \\\n)\n#endif\n"
+
+ printf "#ifndef PHP_PQ_DELIM_OF_ARRAY\n"
+ printf "# define PHP_PQ_DELIM_OF_ARRAY(oid) ("
+ for (oid in delims) {
+ printf "\\\n\t(oid) == %d ? '%s' : ", oid, delims[oid]
+ }
+ printf "\\\n\t0 \\\n)\n#endif\n"
+}
+
+/^DATA/ {
+ oid = $4
+ name = toupper($6)
+ adelim = $15
+ atypoid = $17
+ if (sub("^_", "", name)) {
+ arrays[oid] = atypoid
+ name = name "ARRAY"
+ }
+ delims[oid] = adelim
+ printf "#ifndef PHP_PQ_OID_%s\n", name
+ printf "# define PHP_PQ_OID_%s %d\n", name, oid
+ printf "#endif\n"
+ printf "PHP_PQ_TYPE(\"%s\", %d)\n", name, oid
+}
static zend_string *object_param_to_string(php_pq_params_t *p, zval *zobj, Oid type)
{
+#if PHP_PQ_HAVE_PHP_JSON_H && defined(PHP_PQ_OID_JSON)
smart_str str = {0};
+#endif
switch (type) {
#if PHP_PQ_HAVE_PHP_JSON_H && defined(PHP_PQ_OID_JSON)
-Subproject commit 05f5e23f9c6a3d588675f0387c882af1f57c0e4e
+Subproject commit 2622a78d9eb346103f502445f6ac8d315ebfecc5