Skip to content

Commit 9dc08f7

Browse files
committed
Merge branch 'oci8-3.0'
* oci8-3.0: Rename OCI8 classes to use standard names so arg stub parsing works Bump OCI8 version to 3.0 so a PHP 8 PECL release can be made
2 parents 59536d5 + 74ca2a3 commit 9dc08f7

Some content is hidden

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

46 files changed

+172
-164
lines changed

ext/oci8/oci8.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
#elif PHP_MAJOR_VERSION < 7
4242
/* PHP 7 is the minimum supported version for OCI8 2.1 */
4343
#error Use PHP OCI8 2.0 for your version of PHP
44+
#elif PHP_MAJOR_VERSION < 8
45+
/* PHP 8 is the minimum supported version for OCI8 3.0 */
46+
#error Use PHP OCI8 2.2 for your version of PHP
4447
#endif
4548

4649
#include "php_oci8.h"
@@ -288,8 +291,8 @@ PHP_MINIT_FUNCTION(oci)
288291
le_descriptor = zend_register_list_destructors_ex(php_oci_descriptor_list_dtor, NULL, "oci8 descriptor", module_number);
289292
le_collection = zend_register_list_destructors_ex(php_oci_collection_list_dtor, NULL, "oci8 collection", module_number);
290293

291-
INIT_CLASS_ENTRY(oci_lob_class_entry, "OCI-Lob", class_OCI_Lob_methods);
292-
INIT_CLASS_ENTRY(oci_coll_class_entry, "OCI-Collection", class_OCI_Collection_methods);
294+
INIT_CLASS_ENTRY(oci_lob_class_entry, "OCI_Lob", class_OCI_Lob_methods);
295+
INIT_CLASS_ENTRY(oci_coll_class_entry, "OCI_Collection", class_OCI_Collection_methods);
293296

294297
oci_lob_class_entry_ptr = zend_register_internal_class(&oci_lob_class_entry);
295298
oci_coll_class_entry_ptr = zend_register_internal_class(&oci_coll_class_entry);

ext/oci8/package.xml

Lines changed: 51 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,19 @@ http://pear.php.net/dtd/package-2.0.xsd">
88
<summary>Extension for Oracle Database</summary>
99

1010
<description>
11-
Use the OCI8 extension to access Oracle Database. Use 'pecl install
12-
oci8' to install for PHP 7. Use 'pecl install oci8-2.0.12' to install
13-
for PHP 5.2 - PHP 5.6. Use 'pecl install oci8-1.4.10' to install for
14-
PHP 4.3.9 - PHP 5.1. The OCI8 extension can be linked with Oracle
15-
client libraries from Oracle Database 12, 11, or 10.2. These
16-
libraries are found in your database installation, or in the free
17-
Oracle Instant Client from
18-
http://www.oracle.com/technetwork/database/features/instant-client/.
19-
Oracle's standard cross-version connectivity applies. For example,
20-
PHP OCI8 linked with Instant Client 11.2 can connect to Oracle
21-
Database 9.2 onward. See Oracle's note "Oracle Client / Server
22-
Interoperability Support" (ID 207303.1) for details.
11+
The OCI8 extension let you access Oracle Database.
12+
13+
Use 'pecl install oci8' to install for PHP 8.
14+
15+
Use 'pecl install oci8-2.2.0' to install for PHP 7.
16+
17+
Use 'pecl install oci8-2.0.12' to install for PHP 5.2 - PHP 5.6.
18+
19+
Use 'pecl install oci8-1.4.10' to install for PHP 4.3.9 - PHP 5.1.
20+
21+
The OCI8 extension can be linked with Oracle client libraries from Oracle Database 10.2 or later. These libraries are found in your database installation, or in the free Oracle Instant Client from https://www.oracle.com/database/technologies/instant-client.html.
22+
23+
Oracle's standard cross-version connectivity applies. For example, PHP OCI8 linked with Instant Client 19c can connect to Oracle Database 11.2 onward. See Oracle's note "Oracle Client / Server Interoperability Support" (ID 207303.1) for details.
2324
</description>
2425
<lead>
2526
<name>Christopher Jones</name>
@@ -31,7 +32,7 @@ Interoperability Support" (ID 207303.1) for details.
3132
<name>Tianfang Yang</name>
3233
<user>tianfyan</user>
3334
<email>[email protected]</email>
34-
<active>yes</active>
35+
<active>no</active>
3536
</lead>
3637
<lead>
3738
<name>Antony Dovgal</name>
@@ -52,25 +53,30 @@ Interoperability Support" (ID 207303.1) for details.
5253
<active>no</active>
5354
</lead>
5455

55-
<date>2018-12-11</date>
56+
<date>2020-07-15</date>
5657
<time>12:00:00</time>
5758

5859
<version>
59-
<release>2.2.0</release>
60-
<api>2.2.0</api>
60+
<release>3.0.0</release>
61+
<api>3.0.0</api>
6162
</version>
6263
<stability>
6364
<release>stable</release>
6465
<api>stable</api>
6566
</stability>
6667
<license uri="http://www.php.net/license">PHP</license>
6768
<notes>
68-
This version is for PHP 7 only.
69-
Added oci_set_call_timeout() for call timeouts. (Requires Oracle client libraries 18c or later)
70-
Added oci_set_db_operation() for the Oracle Database 'DBOP' end-to-end-tracing attribute. (Requires Oracle 12.2 or later)
71-
Fixed bug #76804 (oci_pconnect with OCI_CRED_EXT not working). (KoenigsKind)
72-
Fixed installation on PHP 7.3.
73-
Internal change: Convert some parameter parsing to the Fast Parameter Parsing API.
69+
This version is for PHP 8 only.
70+
71+
Deprecated old OCI8 function aliases. (Jens de Nies)
72+
73+
Removed obsolete no-op function oci_internal_debug(). (Jens de Nies)
74+
75+
The OCI-Lob class is now called OCI_Lob.
76+
77+
The OCI-Collection calls is now called OCI_Collection.
78+
79+
Generate arginfo from function stubs. (Jens de Nies)
7480
</notes>
7581
<contents>
7682
<dir name="/">
@@ -187,11 +193,6 @@ Internal change: Convert some parameter parsing to the Fast Parameter Parsing AP
187193
<file name="coll_003_func.phpt" role="test" />
188194
<file name="coll_004.phpt" role="test" />
189195
<file name="coll_004_func.phpt" role="test" />
190-
<file name="coll_005.phpt" role="test" />
191-
<file name="coll_006.phpt" role="test" />
192-
<file name="coll_006_func.phpt" role="test" />
193-
<file name="coll_007.phpt" role="test" />
194-
<file name="coll_008.phpt" role="test" />
195196
<file name="coll_009.phpt" role="test" />
196197
<file name="coll_009_func.phpt" role="test" />
197198
<file name="coll_010.phpt" role="test" />
@@ -214,7 +215,6 @@ Internal change: Convert some parameter parsing to the Fast Parameter Parsing AP
214215
<file name="coll_019.phpt" role="test" />
215216
<file name="commit_001.phpt" role="test" />
216217
<file name="commit_002.phpt" role="test" />
217-
<file name="commit_old.phpt" role="test" />
218218
<file name="conn_attr.inc" role="test" />
219219
<file name="conn_attr_1.phpt" role="test" />
220220
<file name="conn_attr_2.phpt" role="test" />
@@ -224,8 +224,6 @@ Internal change: Convert some parameter parsing to the Fast Parameter Parsing AP
224224
<file name="connect.inc" role="test" />
225225
<file name="connect.phpt" role="test" />
226226
<file name="connect_1.phpt" role="test" />
227-
<file name="connect_1_old.phpt" role="test" />
228-
<file name="connect_old.phpt" role="test" />
229227
<file name="connect_scope1.phpt" role="test" />
230228
<file name="connect_scope2.phpt" role="test" />
231229
<file name="connect_scope_try1.phpt" role="test" />
@@ -237,18 +235,14 @@ Internal change: Convert some parameter parsing to the Fast Parameter Parsing AP
237235
<file name="connect_with_charset_001.phpt" role="test" />
238236
<file name="connect_without_oracle_home.phpt" role="test" />
239237
<file name="connect_without_oracle_home_11.phpt" role="test" />
240-
<file name="connect_without_oracle_home_old.phpt" role="test" />
241-
<file name="connect_without_oracle_home_old_11.phpt" role="test" />
242238
<file name="create_table.inc" role="test" />
243239
<file name="create_type.inc" role="test" />
244240
<file name="cursor_bind.phpt" role="test" />
245241
<file name="cursor_bind_err.phpt" role="test" />
246242
<file name="cursors.phpt" role="test" />
247-
<file name="cursors_old.phpt" role="test" />
248243
<file name="db_op_1.phpt" role="test" />
249244
<file name="db_op_2.phpt" role="test" />
250245
<file name="dbmsoutput.phpt" role="test" />
251-
<file name="debug.phpt" role="test" />
252246
<file name="default_prefetch0.phpt" role="test" />
253247
<file name="default_prefetch1.phpt" role="test" />
254248
<file name="default_prefetch2.phpt" role="test" />
@@ -260,7 +254,6 @@ Internal change: Convert some parameter parsing to the Fast Parameter Parsing AP
260254
<file name="define4.phpt" role="test" />
261255
<file name="define5.phpt" role="test" />
262256
<file name="define6.phpt" role="test" />
263-
<file name="define_old.phpt" role="test" />
264257
<file name="descriptors.phpt" role="test" />
265258
<file name="details.inc" role="test" />
266259
<file name="drcp_cclass1.phpt" role="test" />
@@ -293,11 +286,11 @@ Internal change: Convert some parameter parsing to the Fast Parameter Parsing AP
293286
<file name="error_bind.phpt" role="test" />
294287
<file name="error_bind_2.phpt" role="test" />
295288
<file name="error_bind_3.phpt" role="test" />
296-
<file name="error_old.phpt" role="test" />
297289
<file name="error_parse.phpt" role="test" />
298290
<file name="error_set.phpt" role="test" />
299291
<file name="exec_fetch.phpt" role="test" />
300292
<file name="execute_mode.phpt" role="test" />
293+
<file name="existence_aliases.phpt" role="test" />
301294
<file name="extauth_01.phpt" role="test" />
302295
<file name="extauth_02.phpt" role="test" />
303296
<file name="extauth_03.phpt" role="test" />
@@ -310,9 +303,6 @@ Internal change: Convert some parameter parsing to the Fast Parameter Parsing AP
310303
<file name="fetch_all5.phpt" role="test" />
311304
<file name="fetch_array.phpt" role="test" />
312305
<file name="fetch_assoc.phpt" role="test" />
313-
<file name="fetch_into.phpt" role="test" />
314-
<file name="fetch_into1.phpt" role="test" />
315-
<file name="fetch_into2.phpt" role="test" />
316306
<file name="fetch_object.phpt" role="test" />
317307
<file name="fetch_object_1.phpt" role="test" />
318308
<file name="fetch_object_2.phpt" role="test" />
@@ -321,8 +311,6 @@ Internal change: Convert some parameter parsing to the Fast Parameter Parsing AP
321311
<file name="field_funcs1.phpt" role="test" />
322312
<file name="field_funcs2.phpt" role="test" />
323313
<file name="field_funcs3.phpt" role="test" />
324-
<file name="field_funcs_old.phpt" role="test" />
325-
<file name="function_aliases.phpt" role="test" />
326314
<file name="imp_res_1.phpt" role="test" />
327315
<file name="imp_res_2.phpt" role="test" />
328316
<file name="imp_res_3.phpt" role="test" />
@@ -370,7 +358,6 @@ Internal change: Convert some parameter parsing to the Fast Parameter Parsing AP
370358
<file name="lob_012.phpt" role="test" />
371359
<file name="lob_013.phpt" role="test" />
372360
<file name="lob_014.phpt" role="test" />
373-
<file name="lob_015.phpt" role="test" />
374361
<file name="lob_016.phpt" role="test" />
375362
<file name="lob_017.phpt" role="test" />
376363
<file name="lob_018.phpt" role="test" />
@@ -416,7 +403,6 @@ Internal change: Convert some parameter parsing to the Fast Parameter Parsing AP
416403
<file name="password.phpt" role="test" />
417404
<file name="password_2.phpt" role="test" />
418405
<file name="password_new.phpt" role="test" />
419-
<file name="password_old.phpt" role="test" />
420406
<file name="pecl_bug10194.phpt" role="test" />
421407
<file name="pecl_bug10194_blob.phpt" role="test" />
422408
<file name="pecl_bug10194_blob_64.phpt" role="test" />
@@ -426,21 +412,17 @@ Internal change: Convert some parameter parsing to the Fast Parameter Parsing AP
426412
<file name="pecl_bug8816.phpt" role="test" />
427413
<file name="persistent.phpt" role="test" />
428414
<file name="prefetch.phpt" role="test" />
429-
<file name="prefetch_old.phpt" role="test" />
430415
<file name="privileged_connect.phpt" role="test" />
431416
<file name="privileged_connect1.phpt" role="test" />
432417
<file name="refcur_prefetch_1.phpt" role="test" />
433418
<file name="refcur_prefetch_2.phpt" role="test" />
434419
<file name="refcur_prefetch_3.phpt" role="test" />
435420
<file name="refcur_prefetch_4.phpt" role="test" />
436-
<file name="reflection1.phpt" role="test" />
437-
<file name="reflection2.phpt" role="test" />
438421
<file name="select_null.phpt" role="test" />
439422
<file name="serverversion.phpt" role="test" />
440423
<file name="skipif.inc" role="test" />
441424
<file name="statement_cache.phpt" role="test" />
442425
<file name="statement_type.phpt" role="test" />
443-
<file name="statement_type_old.phpt" role="test" />
444426
<file name="test.gif" role="test" />
445427
<file name="test.txt" role="test" />
446428
<file name="testping.phpt" role="test" />
@@ -461,6 +443,8 @@ Internal change: Convert some parameter parsing to the Fast Parameter Parsing AP
461443
<file name="oci8_failover.c" role="src" />
462444
<file name="php_oci8.h" role="src" />
463445
<file name="php_oci8_int.h" role="src" />
446+
<file name="oci8.stub.php" role="src" />
447+
<file name="oci8_arginfo.h" role="src" />
464448
<file name="README.md" role="doc" />
465449
</dir> <!-- / -->
466450
</contents>
@@ -480,6 +464,26 @@ Internal change: Convert some parameter parsing to the Fast Parameter Parsing AP
480464
</extsrcrelease>
481465
<changelog>
482466

467+
<release>
468+
<version>
469+
<release>2.2.0</release>
470+
<api>2.2.0</api>
471+
</version>
472+
<stability>
473+
<release>stable</release>
474+
<api>stable</api>
475+
</stability>
476+
<license uri="http://www.php.net/license">PHP</license>
477+
<notes>
478+
This version is for PHP 7 only.
479+
Added oci_set_call_timeout() for call timeouts. (Requires Oracle client libraries 18c or later)
480+
Added oci_set_db_operation() for the Oracle Database 'DBOP' end-to-end-tracing attribute. (Requires Oracle 12.2 or later)
481+
Fixed bug #76804 (oci_pconnect with OCI_CRED_EXT not working). (KoenigsKind)
482+
Fixed installation on PHP 7.3.
483+
Internal change: Convert some parameter parsing to the Fast Parameter Parsing API.
484+
</notes>
485+
</release>
486+
483487
<release>
484488
<version>
485489
<release>2.1.8</release>

ext/oci8/php_oci8.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
*/
4242
#undef PHP_OCI8_VERSION
4343
#endif
44-
#define PHP_OCI8_VERSION "2.2.0"
44+
#define PHP_OCI8_VERSION "3.0.0"
4545

4646
extern zend_module_entry oci8_module_entry;
4747
#define phpext_oci8_ptr &oci8_module_entry

ext/oci8/tests/bug35973.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ echo "Done\n";
3636
--EXPECTF--
3737
array(1) {
3838
["NC"]=>
39-
object(OCI-Lob)#%d (1) {
39+
object(OCI_Lob)#%d (1) {
4040
["descriptor"]=>
4141
resource(%d) of type (oci8 descriptor)
4242
}

ext/oci8/tests/bug44008.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Bug #44008 (Incorrect usage of OCI-Lob->close crashes PHP)
2+
Bug #44008 (Incorrect usage of OCI_Lob->close crashes PHP)
33
--SKIPIF--
44
<?php
55
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
@@ -30,7 +30,7 @@ $r = $textLob->load();
3030
echo "$r\n";
3131

3232
// Incorrectly closing the lob doesn't cause a crash.
33-
// OCI-LOB->close() is documented for use only with OCI-Lob->writeTemporary()
33+
// OCI-LOB->close() is documented for use only with OCI_Lob->writeTemporary()
3434
$textLob->close();
3535

3636
// Cleanup

ext/oci8/tests/coll_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ require __DIR__."/drop_type.inc";
2020

2121
?>
2222
--EXPECTF--
23-
object(OCI-Collection)#%d (1) {
23+
object(OCI_Collection)#%d (1) {
2424
["collection"]=>
2525
resource(%d) of type (oci8 collection)
2626
}

ext/oci8/tests/coll_002.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ require __DIR__."/drop_type.inc";
2828

2929
?>
3030
--EXPECTF--
31-
object(OCI-Collection)#%d (1) {
31+
object(OCI_Collection)#%d (1) {
3232
["collection"]=>
3333
resource(%d) of type (oci8 collection)
3434
}
3535
bool(true)
36-
string(%d) "OCI-Collection::size(): supplied resource is not a valid oci8 collection resource"
36+
string(%d) "OCI_Collection::size(): supplied resource is not a valid oci8 collection resource"
3737

3838
Warning: oci_new_collection(): OCI-22303: type ""."NONEXISTENT" not found in %s on line %d
3939
bool(false)

ext/oci8/tests/coll_002_func.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ require __DIR__."/drop_type.inc";
2727

2828
?>
2929
--EXPECTF--
30-
object(OCI-Collection)#%d (1) {
30+
object(OCI_Collection)#%d (1) {
3131
["collection"]=>
3232
resource(%d) of type (oci8 collection)
3333
}

ext/oci8/tests/coll_003.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ require __DIR__."/drop_type.inc";
2929
int(0)
3030
int(0)
3131

32-
Warning: OCI-Collection::trim(): OCI-22167: given trim size [3] must be less than or equal to [0] in %s on line %d
32+
Warning: OCI_Collection::trim(): OCI-22167: given trim size [3] must be less than or equal to [0] in %s on line %d
3333
bool(false)
3434
bool(true)
3535
float(1)

ext/oci8/tests/coll_009.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ require __DIR__."/drop_type.inc";
3838

3939
?>
4040
--EXPECTF--
41-
Warning: OCI-Collection::append(): OCI-01861: literal does not match format string in %s on line %d
41+
Warning: OCI_Collection::append(): OCI-01861: literal does not match format string in %s on line %d
4242
bool(false)
4343
bool(true)
4444
bool(false)

0 commit comments

Comments
 (0)