Skip to content

Commit 0d909f5

Browse files
committed
OCI8: Mostly SKIPIF version updates to simplify version checks at the expense of not testing some edge cases with older Oracle patch set versions.
Delete two obsolete .phpt's.
1 parent a1a7522 commit 0d909f5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+168
-557
lines changed

ext/oci8/package.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ libraries are available.
4545
<active>no</active>
4646
</lead>
4747

48-
<date>2013-10-08</date>
48+
<date>2013-10-17</date>
4949
<time>12:00:00</time>
5050

5151
<version>
5252
<release>2.0.5</release>
5353
<api>2.0.5</api>
5454
</version>
5555
<stability>
56-
<release>devel</release>
57-
<api>devel</api>
56+
<release>stable</release>
57+
<api>stable</api>
5858
</stability>
5959
<license uri="http://www.php.net/license">PHP</license>
6060
<notes>
@@ -150,7 +150,6 @@ linking works in the new Windows PECL infrastructure.
150150
<file name="bug42841.phpt" role="test" />
151151
<file name="bug43492_2.phpt" role="test" />
152152
<file name="bug43492.phpt" role="test" />
153-
<file name="bug43497_92.phpt" role="test" />
154153
<file name="bug43497.phpt" role="test" />
155154
<file name="bug44008.phpt" role="test" />
156155
<file name="bug44113.phpt" role="test" />
@@ -163,7 +162,6 @@ linking works in the new Windows PECL infrastructure.
163162
<file name="bug51253.phpt" role="test" />
164163
<file name="bug51291_1.phpt" role="test" />
165164
<file name="bug51291_2.phpt" role="test" />
166-
<file name="clientversion_92.phpt" role="test" />
167165
<file name="clientversion.phpt" role="test" />
168166
<file name="close.phpt" role="test" />
169167
<file name="coll_001.phpt" role="test" />

ext/oci8/tests/bind_char_1.phpt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
66
require(dirname(__FILE__)."/connect.inc");
77
// The bind buffer size edge cases seem to change each DB version.
88
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
9-
if (!(isset($matches[0]) &&
10-
(($matches[1] == 10 && $matches[2] >= 2) ||
11-
($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
12-
))) {
13-
die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
14-
}
15-
preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
16-
if (isset($matches[0]) && $matches[0] < 11) {
17-
die("skip test expected to work only with Oracle 11g or greater version of client");
9+
if (!(isset($matches[0]) && $matches[1] >= 12)) {
10+
die("skip expected output only valid when using Oracle 12c database");
1811
}
1912
?>
2013
--ENV--

ext/oci8/tests/bind_char_1_11gR1.phpt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
66
require(dirname(__FILE__)."/connect.inc");
77
// The bind buffer size edge cases seem to change each DB version.
88
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
9-
if (!(isset($matches[0]) &&
10-
(($matches[1] == 11 && $matches[2] == 1) ||
11-
($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3)
12-
))) {
13-
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
9+
if (!(isset($matches[0]) && $matches[1] < 12)) {
10+
die("skip expected output only valid when using pre-Oracle 12c database");
1411
}
1512
?>
1613
--ENV--

ext/oci8/tests/bind_char_2.phpt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
66
require(dirname(__FILE__)."/connect.inc");
77
// The bind buffer size edge cases seem to change each DB version.
88
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
9-
if (!(isset($matches[0]) &&
10-
(($matches[1] == 10 && $matches[2] >= 2) ||
11-
($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
12-
))) {
13-
die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
14-
}
15-
preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
16-
if (isset($matches[0]) && $matches[0] < 11) {
17-
die("skip test expected to work only with Oracle 11g or greater version of client");
9+
if (!(isset($matches[0]) && $matches[1] >= 12)) {
10+
die("skip expected output only valid when using Oracle 12c database");
1811
}
1912
?>
2013
--ENV--

ext/oci8/tests/bind_char_2_11gR1.phpt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
66
require(dirname(__FILE__)."/connect.inc");
77
// The bind buffer size edge cases seem to change each DB version.
88
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
9-
if (!(isset($matches[0]) &&
10-
(($matches[1] == 11 && $matches[2] == 1) ||
11-
($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3)
12-
))) {
13-
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
9+
if (!(isset($matches[0]) && $matches[1] < 12)) {
10+
die("skip expected output only valid when using pre-Oracle 12c database");
1411
}
1512
?>
1613
--ENV--

ext/oci8/tests/bind_char_3.phpt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
66
require(dirname(__FILE__)."/connect.inc");
77
// The bind buffer size edge cases seem to change each DB version.
88
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
9-
if (!(isset($matches[0]) &&
10-
(($matches[1] == 10 && $matches[2] >= 2) ||
11-
($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
12-
))) {
13-
die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
14-
}
15-
preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
16-
if (isset($matches[0]) && $matches[0] < 11) {
17-
die("skip test expected to work only with Oracle 11g or greater version of client");
9+
if (!(isset($matches[0]) && $matches[1] >= 12)) {
10+
die("skip expected output only valid when using Oracle 12c database");
1811
}
1912
?>
2013
--ENV--

ext/oci8/tests/bind_char_3_11gR1.phpt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
66
require(dirname(__FILE__)."/connect.inc");
77
// The bind buffer size edge cases seem to change each DB version.
88
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
9-
if (!(isset($matches[0]) &&
10-
(($matches[1] == 11 && $matches[2] == 1) ||
11-
($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3)
12-
))) {
13-
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
9+
if (!(isset($matches[0]) && $matches[1] < 12)) {
10+
die("skip expected output only valid when using pre-Oracle 12c database");
1411
}
1512
?>
1613
--ENV--

ext/oci8/tests/bind_char_4.phpt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
66
require(dirname(__FILE__)."/connect.inc");
77
// The bind buffer size edge cases seem to change each DB version.
88
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
9-
if (!(isset($matches[0]) &&
10-
(($matches[1] == 10 && $matches[2] >= 2) ||
11-
($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
12-
))) {
13-
die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
14-
}
15-
preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
16-
if (isset($matches[0]) && $matches[0] < 11) {
17-
die("skip test expected to work only with Oracle 11g or greater version of client");
9+
if (!(isset($matches[0]) && $matches[1] >= 12)) {
10+
die("skip expected output only valid when using Oracle 12c database");
1811
}
1912
?>
2013
--ENV--

ext/oci8/tests/bind_char_4_11gR1.phpt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
66
require(dirname(__FILE__)."/connect.inc");
77
// The bind buffer size edge cases seem to change each DB version.
88
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
9-
if (!(isset($matches[0]) &&
10-
(($matches[1] == 11 && $matches[2] == 1) ||
11-
($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3)
12-
))) {
13-
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
9+
if (!(isset($matches[0]) && $matches[1] < 12)) {
10+
die("skip expected output only valid when using pre-Oracle 12c database");
1411
}
1512
?>
1613
--ENV--

ext/oci8/tests/bind_misccoltypes.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ Bind miscellaneous column types using default types
44
<?php
55
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
66
require(dirname(__FILE__).'/skipif.inc');
7-
if (preg_match('/^1[012]\./', oci_client_version()) != 1) {
8-
die("skip test expected to work only with Oracle 10g or greater version of client");
9-
}
107
?>
118
--FILE--
129
<?php

ext/oci8/tests/bind_number.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ Bind with NUMBER column variants
33
--SKIPIF--
44
<?php
55
if (!extension_loaded('oci8')) die("skip no oci8 extension");
6-
if (preg_match('/^1[012]\./', oci_client_version()) != 1) {
7-
die("skip test expected to work only with Oracle 10g or greater version of client");
8-
}
96
?>
107
--INI--
118
precision = 14

ext/oci8/tests/bind_sqltnum.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ Bind with SQLT_NUM
33
--SKIPIF--
44
<?php
55
if (!extension_loaded('oci8')) die("skip no oci8 extension");
6-
if (preg_match('/^1[012]\./', oci_client_version()) != 1) {
7-
die("skip test expected to work only with Oracle 10g or greater version of client");
8-
}
96
?>
107
--FILE--
118
<?php

ext/oci8/tests/bind_unsupported_2.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ Bind with various unsupported 10g+ bind types
33
--SKIPIF--
44
<?php
55
if (!extension_loaded('oci8')) die("skip no oci8 extension");
6-
preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
7-
if (isset($matches[0]) && $matches[0] < 10) {
8-
die ("skip expected output only valid for Oracle 10g+ clients");
9-
}
106
?>
117
--FILE--
128
<?php

ext/oci8/tests/bug27303_1.phpt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
66
require(dirname(__FILE__)."/connect.inc");
77
// The bind buffer size edge cases seem to change each DB version.
88
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
9-
if (!(isset($matches[0]) &&
10-
(($matches[1] == 10 && $matches[2] >= 2) ||
11-
($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
12-
))) {
13-
die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
14-
}
15-
preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
16-
if (isset($matches[0]) && $matches[0] < 11) {
17-
die("skip test expected to work only with Oracle 11g or greater version of client");
9+
if (!(isset($matches[0]) && $matches[1] >= 12)) {
10+
die("skip expected output only valid when using Oracle 12c database");
1811
}
1912
?>
2013
--ENV--

ext/oci8/tests/bug27303_1_11gR1.phpt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
66
require(dirname(__FILE__)."/connect.inc");
77
// The bind buffer size edge cases seem to change each DB version.
88
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
9-
if (!(isset($matches[0]) &&
10-
(($matches[1] == 10 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3) ||
11-
($matches[1] == 11 && $matches[2] == 1 && $matches[3] == 0 && $matches[4] == 6) ||
12-
($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3)
13-
))) {
14-
die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
9+
if (!(isset($matches[0]) && $matches[1] < 12)) {
10+
die("skip expected output only valid when using pre-Oracle 12c database");
1511
}
1612
?>
1713
--FILE--

ext/oci8/tests/bug27303_2.phpt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
66
require(dirname(__FILE__)."/connect.inc");
77
// The bind buffer size edge cases seem to change each DB version.
88
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
9-
if (!(isset($matches[0]) &&
10-
(($matches[1] == 10 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2) ||
11-
($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
12-
))) {
13-
die("skip expected output only valid when using Oracle 10.2.0.2 or 11.2.0.2 databases");
14-
}
15-
preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
16-
if (isset($matches[0]) && $matches[0] < 11) {
17-
die("skip test expected to work only with Oracle 11g or greater version of client");
9+
if (!(isset($matches[0]) && $matches[1] >= 12)) {
10+
die("skip expected output only valid when using Oracle 12c database");
1811
}
1912
?>
2013
--ENV--

ext/oci8/tests/bug27303_2_11gR1.phpt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
66
require(dirname(__FILE__)."/connect.inc");
77
// The bind buffer size edge cases seem to change each DB version.
88
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
9-
if (!(isset($matches[0]) &&
10-
(($matches[1] == 10 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3) ||
11-
($matches[1] == 11 && $matches[2] == 1 && $matches[3] == 0 && $matches[4] == 6) ||
12-
($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3)
13-
))) {
14-
die("skip expected output only valid when using specific Oracle database versions");
9+
if (!(isset($matches[0]) && $matches[1] < 12)) {
10+
die("skip expected output only valid when using pre-Oracle 12c database");
1511
}
1612
?>
1713
--FILE--

ext/oci8/tests/bug27303_4.phpt

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
66
require(dirname(__FILE__)."/connect.inc");
77
// The bind buffer size edge cases seem to change each DB version.
88
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
9-
if (!(isset($matches[0]) &&
10-
(($matches[1] == 10 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2) ||
11-
($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
12-
))) {
13-
die("skip expected output only valid when using Oracle 10.2.0.2 or 11.2.0.2 databases");
14-
// Other point releases may also work
15-
}
16-
preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
17-
if (isset($matches[0]) && $matches[0] < 11) {
18-
die("skip test expected to work only with Oracle 11g or greater version of client");
9+
if (!(isset($matches[0]) && $matches[1] >= 12)) {
10+
die("skip expected output only valid when using Oracle 12c database");
1911
}
2012
?>
2113
--ENV--

ext/oci8/tests/bug27303_4_11gR1.phpt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension");
66
require(dirname(__FILE__)."/connect.inc");
77
// The bind buffer size edge cases seem to change each DB version.
88
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
9-
if (!(isset($matches[0]) &&
10-
(($matches[1] == 10 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3) ||
11-
($matches[1] == 11 && $matches[2] == 1 && $matches[3] == 0 && $matches[4] == 6) ||
12-
($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 3)
13-
))) {
14-
die("skip expected output only valid when using specific Oracle database versions");
9+
if (!(isset($matches[0]) && $matches[1] < 12)) {
10+
die("skip expected output only valid when using pre-Oracle 12c database");
1511
}
1612
?>
1713
--FILE--

ext/oci8/tests/bug36403.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ Bug #36403 (oci_execute no longer supports OCI_DESCRIBE_ONLY)
33
--SKIPIF--
44
<?php
55
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
6-
preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
7-
if (isset($matches[0]) && $matches[0] < 10) {
8-
die("skip test expected to work only with Oracle 10g or greater version of client");
9-
}
106
?>
117
--FILE--
128
<?php

ext/oci8/tests/bug43497.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ Bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory)
55
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
66
require(dirname(__FILE__).'/skipif.inc');
77
if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
8-
preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
9-
if (isset($matches[0]) && $matches[0] < 10) {
10-
die("skip test expected to work only with Oracle 10g or greater version of client");
11-
}
128
?>
139
--FILE--
1410
<?php

0 commit comments

Comments
 (0)