From 45475c2e216f1b4ee2c543109695ec1b264156b6 Mon Sep 17 00:00:00 2001 From: Jens de Nies Date: Sun, 17 May 2020 23:48:01 +0200 Subject: [PATCH] Deprecate function aliases in oci8 extension. Closes GH-5589 --- ext/oci8/oci8.c | 92 ++-- ext/oci8/tests/bug26133.phpt | 12 +- ext/oci8/tests/bug27303_1.phpt | 8 +- ext/oci8/tests/bug27303_1_11gR1.phpt | 8 +- ext/oci8/tests/bug27303_2.phpt | 8 +- ext/oci8/tests/bug27303_2_11gR1.phpt | 8 +- ext/oci8/tests/bug27303_3.phpt | 8 +- ext/oci8/tests/bug27303_4.phpt | 8 +- ext/oci8/tests/bug27303_4_11gR1.phpt | 8 +- ext/oci8/tests/bug42841.phpt | 2 +- ext/oci8/tests/bug43492.phpt | 14 +- ext/oci8/tests/bug43492_2.phpt | 12 +- ext/oci8/tests/coll_002.phpt | 13 +- ext/oci8/tests/coll_005.phpt | 30 -- ext/oci8/tests/coll_006.phpt | 33 -- ext/oci8/tests/coll_006_func.phpt | 33 -- ext/oci8/tests/coll_007.phpt | 37 -- ext/oci8/tests/coll_008.phpt | 32 -- ext/oci8/tests/coll_009.phpt | 12 +- ext/oci8/tests/coll_009_func.phpt | 12 +- ext/oci8/tests/coll_010.phpt | 12 +- ext/oci8/tests/coll_010_func.phpt | 12 +- ext/oci8/tests/coll_011.phpt | 12 +- ext/oci8/tests/coll_011_func.phpt | 12 +- ext/oci8/tests/coll_012.phpt | 12 +- ext/oci8/tests/coll_012_func.phpt | 12 +- ext/oci8/tests/coll_013.phpt | 10 +- ext/oci8/tests/coll_013_func.phpt | 10 +- ext/oci8/tests/coll_014.phpt | 10 +- ext/oci8/tests/coll_014_func.phpt | 10 +- ext/oci8/tests/coll_015.phpt | 10 +- ext/oci8/tests/coll_015_func.phpt | 10 +- ext/oci8/tests/coll_016.phpt | 10 +- ext/oci8/tests/coll_016_func.phpt | 10 +- ext/oci8/tests/coll_017.phpt | 10 +- ext/oci8/tests/coll_017_func.phpt | 10 +- ext/oci8/tests/commit_old.phpt | 149 ------ ext/oci8/tests/connect_1.phpt | 2 +- ext/oci8/tests/connect_1_old.phpt | 35 -- ext/oci8/tests/connect_old.phpt | 22 - .../connect_without_oracle_home_old.phpt | 34 -- .../connect_without_oracle_home_old_11.phpt | 41 -- ext/oci8/tests/create_type.inc | 8 +- ext/oci8/tests/cursors_old.phpt | 70 --- ext/oci8/tests/define_old.phpt | 48 -- ext/oci8/tests/details.inc | 2 +- ext/oci8/tests/error_old.phpt | 43 -- ext/oci8/tests/existence_aliases.phpt | 100 ++++ ext/oci8/tests/fetch.phpt | 6 +- ext/oci8/tests/fetch_all1.phpt | 29 -- ext/oci8/tests/fetch_into.phpt | 71 --- ext/oci8/tests/fetch_into1.phpt | 195 -------- ext/oci8/tests/fetch_into2.phpt | 73 --- ext/oci8/tests/fetch_object.phpt | 2 +- ext/oci8/tests/fetch_object_1.phpt | 2 +- ext/oci8/tests/field_funcs_old.phpt | 108 ----- ext/oci8/tests/function_aliases.phpt | 196 -------- ext/oci8/tests/num.phpt | 103 +---- ext/oci8/tests/password_new.phpt | 2 +- ext/oci8/tests/password_old.phpt | 50 -- ext/oci8/tests/prefetch_old.phpt | 56 --- ext/oci8/tests/reflection1.phpt | 432 +----------------- ext/oci8/tests/serverversion.phpt | 4 - ext/oci8/tests/statement_type_old.phpt | 56 --- 64 files changed, 332 insertions(+), 2169 deletions(-) delete mode 100644 ext/oci8/tests/coll_005.phpt delete mode 100644 ext/oci8/tests/coll_006.phpt delete mode 100644 ext/oci8/tests/coll_006_func.phpt delete mode 100644 ext/oci8/tests/coll_007.phpt delete mode 100644 ext/oci8/tests/coll_008.phpt delete mode 100644 ext/oci8/tests/commit_old.phpt delete mode 100644 ext/oci8/tests/connect_1_old.phpt delete mode 100644 ext/oci8/tests/connect_old.phpt delete mode 100644 ext/oci8/tests/connect_without_oracle_home_old.phpt delete mode 100644 ext/oci8/tests/connect_without_oracle_home_old_11.phpt delete mode 100644 ext/oci8/tests/cursors_old.phpt delete mode 100644 ext/oci8/tests/define_old.phpt delete mode 100644 ext/oci8/tests/error_old.phpt create mode 100644 ext/oci8/tests/existence_aliases.phpt delete mode 100644 ext/oci8/tests/fetch_into.phpt delete mode 100644 ext/oci8/tests/fetch_into1.phpt delete mode 100644 ext/oci8/tests/fetch_into2.phpt delete mode 100644 ext/oci8/tests/field_funcs_old.phpt delete mode 100644 ext/oci8/tests/function_aliases.phpt delete mode 100644 ext/oci8/tests/password_old.phpt delete mode 100644 ext/oci8/tests/prefetch_old.phpt delete mode 100644 ext/oci8/tests/statement_type_old.phpt diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index dc506355f2..89aafde7ee 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -797,52 +797,52 @@ static const zend_function_entry php_oci_functions[] = { PHP_FE(oci_unregister_taf_callback, arginfo_oci_unregister_taf_callback) PHP_FALIAS(oci_free_cursor, oci_free_statement, arginfo_oci_free_statement) - PHP_FALIAS(ocifreecursor, oci_free_statement, arginfo_oci_free_statement) - PHP_FALIAS(ocibindbyname, oci_bind_by_name, arginfo_oci_bind_by_name) - PHP_FALIAS(ocidefinebyname, oci_define_by_name, arginfo_oci_define_by_name) - PHP_FALIAS(ocicolumnisnull, oci_field_is_null, arginfo_oci_field_is_null) - PHP_FALIAS(ocicolumnname, oci_field_name, arginfo_oci_field_name) - PHP_FALIAS(ocicolumnsize, oci_field_size, arginfo_oci_field_size) - PHP_FALIAS(ocicolumnscale, oci_field_scale, arginfo_oci_field_scale) - PHP_FALIAS(ocicolumnprecision, oci_field_precision, arginfo_oci_field_precision) - PHP_FALIAS(ocicolumntype, oci_field_type, arginfo_oci_field_type) - PHP_FALIAS(ocicolumntyperaw, oci_field_type_raw, arginfo_oci_field_type_raw) - PHP_FALIAS(ociexecute, oci_execute, arginfo_oci_execute) - PHP_FALIAS(ocicancel, oci_cancel, arginfo_oci_cancel) - PHP_FALIAS(ocifetch, oci_fetch, arginfo_oci_fetch) - PHP_FALIAS(ocifetchstatement, oci_fetch_all, arginfo_oci_fetch_all) - PHP_FALIAS(ocifreestatement, oci_free_statement, arginfo_oci_free_statement) - PHP_FALIAS(ociinternaldebug, oci_internal_debug, arginfo_oci_internal_debug) - PHP_FALIAS(ocinumcols, oci_num_fields, arginfo_oci_num_fields) - PHP_FALIAS(ociparse, oci_parse, arginfo_oci_parse) - PHP_FALIAS(ocinewcursor, oci_new_cursor, arginfo_oci_new_cursor) - PHP_FALIAS(ociresult, oci_result, arginfo_oci_result) - PHP_FALIAS(ociserverversion, oci_server_version, arginfo_oci_server_version) - PHP_FALIAS(ocistatementtype, oci_statement_type, arginfo_oci_statement_type) - PHP_FALIAS(ocirowcount, oci_num_rows, arginfo_oci_num_rows) - PHP_FALIAS(ocilogoff, oci_close, arginfo_oci_close) - PHP_FALIAS(ocilogon, oci_connect, arginfo_oci_connect) - PHP_FALIAS(ocinlogon, oci_new_connect, arginfo_oci_new_connect) - PHP_FALIAS(ociplogon, oci_pconnect, arginfo_oci_pconnect) - PHP_FALIAS(ocierror, oci_error, arginfo_oci_error) - PHP_FALIAS(ocifreedesc, oci_free_descriptor, arginfo_oci_free_descriptor) - PHP_FALIAS(ocisavelob, oci_lob_save, arginfo_oci_lob_save) - PHP_FALIAS(ocisavelobfile, oci_lob_import, arginfo_oci_lob_import) - PHP_FALIAS(ociwritelobtofile, oci_lob_export, arginfo_oci_lob_export) - PHP_FALIAS(ociloadlob, oci_lob_load, arginfo_oci_lob_load) - PHP_FALIAS(ocicommit, oci_commit, arginfo_oci_commit) - PHP_FALIAS(ocirollback, oci_rollback, arginfo_oci_rollback) - PHP_FALIAS(ocinewdescriptor, oci_new_descriptor, arginfo_oci_new_descriptor) - PHP_FALIAS(ocisetprefetch, oci_set_prefetch, arginfo_oci_set_prefetch) - PHP_FALIAS(ocipasswordchange, oci_password_change, arginfo_oci_password_change) - PHP_FALIAS(ocifreecollection, oci_free_collection, arginfo_oci_free_collection) - PHP_FALIAS(ocinewcollection, oci_new_collection, arginfo_oci_new_collection) - PHP_FALIAS(ocicollappend, oci_collection_append, arginfo_oci_collection_append) - PHP_FALIAS(ocicollgetelem, oci_collection_element_get, arginfo_oci_collection_element_get) - PHP_FALIAS(ocicollassignelem, oci_collection_element_assign, arginfo_oci_collection_element_assign) - PHP_FALIAS(ocicollsize, oci_collection_size, arginfo_oci_collection_size) - PHP_FALIAS(ocicollmax, oci_collection_max, arginfo_oci_collection_max) - PHP_FALIAS(ocicolltrim, oci_collection_trim, arginfo_oci_collection_trim) + PHP_DEP_FALIAS(ocifreecursor, oci_free_statement, arginfo_oci_free_statement) + PHP_DEP_FALIAS(ocibindbyname, oci_bind_by_name, arginfo_oci_bind_by_name) + PHP_DEP_FALIAS(ocidefinebyname, oci_define_by_name, arginfo_oci_define_by_name) + PHP_DEP_FALIAS(ocicolumnisnull, oci_field_is_null, arginfo_oci_field_is_null) + PHP_DEP_FALIAS(ocicolumnname, oci_field_name, arginfo_oci_field_name) + PHP_DEP_FALIAS(ocicolumnsize, oci_field_size, arginfo_oci_field_size) + PHP_DEP_FALIAS(ocicolumnscale, oci_field_scale, arginfo_oci_field_scale) + PHP_DEP_FALIAS(ocicolumnprecision, oci_field_precision, arginfo_oci_field_precision) + PHP_DEP_FALIAS(ocicolumntype, oci_field_type, arginfo_oci_field_type) + PHP_DEP_FALIAS(ocicolumntyperaw, oci_field_type_raw, arginfo_oci_field_type_raw) + PHP_DEP_FALIAS(ociexecute, oci_execute, arginfo_oci_execute) + PHP_DEP_FALIAS(ocicancel, oci_cancel, arginfo_oci_cancel) + PHP_DEP_FALIAS(ocifetch, oci_fetch, arginfo_oci_fetch) + PHP_DEP_FALIAS(ocifetchstatement, oci_fetch_all, arginfo_oci_fetch_all) + PHP_DEP_FALIAS(ocifreestatement, oci_free_statement, arginfo_oci_free_statement) + PHP_DEP_FALIAS(ociinternaldebug, oci_internal_debug, arginfo_oci_internal_debug) + PHP_DEP_FALIAS(ocinumcols, oci_num_fields, arginfo_oci_num_fields) + PHP_DEP_FALIAS(ociparse, oci_parse, arginfo_oci_parse) + PHP_DEP_FALIAS(ocinewcursor, oci_new_cursor, arginfo_oci_new_cursor) + PHP_DEP_FALIAS(ociresult, oci_result, arginfo_oci_result) + PHP_DEP_FALIAS(ociserverversion, oci_server_version, arginfo_oci_server_version) + PHP_DEP_FALIAS(ocistatementtype, oci_statement_type, arginfo_oci_statement_type) + PHP_DEP_FALIAS(ocirowcount, oci_num_rows, arginfo_oci_num_rows) + PHP_DEP_FALIAS(ocilogoff, oci_close, arginfo_oci_close) + PHP_DEP_FALIAS(ocilogon, oci_connect, arginfo_oci_connect) + PHP_DEP_FALIAS(ocinlogon, oci_new_connect, arginfo_oci_new_connect) + PHP_DEP_FALIAS(ociplogon, oci_pconnect, arginfo_oci_pconnect) + PHP_DEP_FALIAS(ocierror, oci_error, arginfo_oci_error) + PHP_DEP_FALIAS(ocifreedesc, oci_free_descriptor, arginfo_oci_free_descriptor) + PHP_DEP_FALIAS(ocisavelob, oci_lob_save, arginfo_oci_lob_save) + PHP_DEP_FALIAS(ocisavelobfile, oci_lob_import, arginfo_oci_lob_import) + PHP_DEP_FALIAS(ociwritelobtofile, oci_lob_export, arginfo_oci_lob_export) + PHP_DEP_FALIAS(ociloadlob, oci_lob_load, arginfo_oci_lob_load) + PHP_DEP_FALIAS(ocicommit, oci_commit, arginfo_oci_commit) + PHP_DEP_FALIAS(ocirollback, oci_rollback, arginfo_oci_rollback) + PHP_DEP_FALIAS(ocinewdescriptor, oci_new_descriptor, arginfo_oci_new_descriptor) + PHP_DEP_FALIAS(ocisetprefetch, oci_set_prefetch, arginfo_oci_set_prefetch) + PHP_DEP_FALIAS(ocipasswordchange, oci_password_change, arginfo_oci_password_change) + PHP_DEP_FALIAS(ocifreecollection, oci_free_collection, arginfo_oci_free_collection) + PHP_DEP_FALIAS(ocinewcollection, oci_new_collection, arginfo_oci_new_collection) + PHP_DEP_FALIAS(ocicollappend, oci_collection_append, arginfo_oci_collection_append) + PHP_DEP_FALIAS(ocicollgetelem, oci_collection_element_get, arginfo_oci_collection_element_get) + PHP_DEP_FALIAS(ocicollassignelem, oci_collection_element_assign, arginfo_oci_collection_element_assign) + PHP_DEP_FALIAS(ocicollsize, oci_collection_size, arginfo_oci_collection_size) + PHP_DEP_FALIAS(ocicollmax, oci_collection_max, arginfo_oci_collection_max) + PHP_DEP_FALIAS(ocicolltrim, oci_collection_trim, arginfo_oci_collection_trim) PHP_FE_END }; diff --git a/ext/oci8/tests/bug26133.phpt b/ext/oci8/tests/bug26133.phpt index 1df68ad2d9..e2115d17fc 100644 --- a/ext/oci8/tests/bug26133.phpt +++ b/ext/oci8/tests/bug26133.phpt @@ -20,13 +20,13 @@ oci8_test_sql_execute($c, $stmtarray); $ora_sql = "INSERT INTO bug26133_tab (id, value) VALUES (1,'1') RETURNING ROWID INTO :v_rowid "; -$statement = OCIParse($c,$ora_sql); -$rowid = OCINewDescriptor($c,OCI_D_ROWID); -OCIBindByName($statement,":v_rowid", $rowid,-1,OCI_B_ROWID); -if (OCIExecute($statement)) { - OCICommit($c); +$statement = oci_parse($c,$ora_sql); +$rowid = oci_new_descriptor($c,OCI_D_ROWID); +oci_bind_by_name($statement,":v_rowid", $rowid,-1,OCI_B_ROWID); +if (oci_execute($statement)) { + oci_commit($c); } -OCIFreeStatement($statement); +oci_free_statement($statement); $rowid->free(); // Cleanup diff --git a/ext/oci8/tests/bug27303_1.phpt b/ext/oci8/tests/bug27303_1.phpt index a0e254a753..0ed1a4d54a 100644 --- a/ext/oci8/tests/bug27303_1.phpt +++ b/ext/oci8/tests/bug27303_1.phpt @@ -30,19 +30,19 @@ define('MYLIMIT', 200); $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv"; -$stid = OCIParse($c, $stmt); +$stid = oci_parse($c, $stmt); if (!$stid) { echo "Parse error"; die; } -$r = OCIBindByName($stid, ':MYBV', $mybv); +$r = oci_bind_by_name($stid, ':MYBV', $mybv); if (!$r) { echo "Bind error"; die; } for ($i = 1; $i < MYLIMIT; $i++) { - $r = OCIExecute($stid, OCI_DEFAULT); + $r = oci_execute($stid, OCI_DEFAULT); if (!$r) { echo "Execute error"; die; } var_dump($mybv); } -OCICommit($c); +oci_commit($c); $stmtarray = array( "drop sequence myseq", diff --git a/ext/oci8/tests/bug27303_1_11gR1.phpt b/ext/oci8/tests/bug27303_1_11gR1.phpt index 35495a81da..f42beb3699 100644 --- a/ext/oci8/tests/bug27303_1_11gR1.phpt +++ b/ext/oci8/tests/bug27303_1_11gR1.phpt @@ -28,19 +28,19 @@ define('MYLIMIT', 200); $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv"; -$stid = OCIParse($c, $stmt); +$stid = oci_parse($c, $stmt); if (!$stid) { echo "Parse error"; die; } -$r = OCIBindByName($stid, ':MYBV', $mybv); +$r = oci_bind_by_name($stid, ':MYBV', $mybv); if (!$r) { echo "Bind error"; die; } for ($i = 1; $i < MYLIMIT; $i++) { - $r = OCIExecute($stid, OCI_DEFAULT); + $r = oci_execute($stid, OCI_DEFAULT); if (!$r) { echo "Execute error"; die; } var_dump($mybv); } -OCICommit($c); +oci_commit($c); $stmtarray = array( "drop sequence myseq", diff --git a/ext/oci8/tests/bug27303_2.phpt b/ext/oci8/tests/bug27303_2.phpt index 3674b72486..655598eb06 100644 --- a/ext/oci8/tests/bug27303_2.phpt +++ b/ext/oci8/tests/bug27303_2.phpt @@ -31,20 +31,20 @@ define('INITMYBV', 11); $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv"; -$stid = OCIParse($c, $stmt); +$stid = oci_parse($c, $stmt); if (!$stid) { echo "Parse error"; die; } $mybv = INITMYBV; -$r = OCIBindByName($stid, ':MYBV', $mybv); +$r = oci_bind_by_name($stid, ':MYBV', $mybv); if (!$r) { echo "Bind error"; die; } for ($i = 1; $i < MYLIMIT; $i++) { - $r = OCIExecute($stid, OCI_DEFAULT); + $r = oci_execute($stid, OCI_DEFAULT); if (!$r) { echo "Execute error"; die; } var_dump($mybv); } -OCICommit($c); +oci_commit($c); $stmtarray = array( "drop sequence myseq", diff --git a/ext/oci8/tests/bug27303_2_11gR1.phpt b/ext/oci8/tests/bug27303_2_11gR1.phpt index 1abb66538a..021855741d 100644 --- a/ext/oci8/tests/bug27303_2_11gR1.phpt +++ b/ext/oci8/tests/bug27303_2_11gR1.phpt @@ -31,20 +31,20 @@ define('INITMYBV', 11); $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv"; -$stid = OCIParse($c, $stmt); +$stid = oci_parse($c, $stmt); if (!$stid) { echo "Parse error"; die; } $mybv = INITMYBV; -$r = OCIBindByName($stid, ':MYBV', $mybv); +$r = oci_bind_by_name($stid, ':MYBV', $mybv); if (!$r) { echo "Bind error"; die; } for ($i = 1; $i < MYLIMIT; $i++) { - $r = OCIExecute($stid, OCI_DEFAULT); + $r = oci_execute($stid, OCI_DEFAULT); if (!$r) { echo "Execute error"; die; } var_dump($mybv); } -OCICommit($c); +oci_commit($c); $stmtarray = array( "drop sequence myseq", diff --git a/ext/oci8/tests/bug27303_3.phpt b/ext/oci8/tests/bug27303_3.phpt index 347a1a93d9..d629de226a 100644 --- a/ext/oci8/tests/bug27303_3.phpt +++ b/ext/oci8/tests/bug27303_3.phpt @@ -23,20 +23,20 @@ define('INITMYBV', 11); $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv"; -$stid = OCIParse($c, $stmt); +$stid = oci_parse($c, $stmt); if (!$stid) { echo "Parse error"; die; } $mybv = INITMYBV; -$r = OCIBindByName($stid, ':MYBV', $mybv, 5, SQLT_INT); +$r = oci_bind_by_name($stid, ':MYBV', $mybv, 5, SQLT_INT); if (!$r) { echo "Bind error"; die; } for ($i = 1; $i < MYLIMIT; $i++) { - $r = OCIExecute($stid, OCI_DEFAULT); + $r = oci_execute($stid, OCI_DEFAULT); if (!$r) { echo "Execute error"; die; } var_dump($mybv); } -OCICommit($c); +oci_commit($c); $drop_st = array(); $drop_st[] = "drop sequence myseq"; diff --git a/ext/oci8/tests/bug27303_4.phpt b/ext/oci8/tests/bug27303_4.phpt index e51f3cdc75..626f56bd11 100644 --- a/ext/oci8/tests/bug27303_4.phpt +++ b/ext/oci8/tests/bug27303_4.phpt @@ -29,19 +29,19 @@ define('MYLIMIT', 200); $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv"; -$stid = OCIParse($c, $stmt); +$stid = oci_parse($c, $stmt); if (!$stid) { echo "Parse error"; die; } -$r = OCIBindByName($stid, ':MYBV', $mybv, 0 ); +$r = oci_bind_by_name($stid, ':MYBV', $mybv, 0 ); if (!$r) { echo "Bind error"; die; } for ($i = 1; $i < MYLIMIT; $i++) { - $r = OCIExecute($stid, OCI_DEFAULT); + $r = oci_execute($stid, OCI_DEFAULT); if (!$r) { echo "Execute error"; die; } var_dump($mybv); } -OCICommit($c); +oci_commit($c); $drop_st = array(); $drop_st[] = "drop sequence myseq"; diff --git a/ext/oci8/tests/bug27303_4_11gR1.phpt b/ext/oci8/tests/bug27303_4_11gR1.phpt index bd5e2571fc..168a528785 100644 --- a/ext/oci8/tests/bug27303_4_11gR1.phpt +++ b/ext/oci8/tests/bug27303_4_11gR1.phpt @@ -27,19 +27,19 @@ define('MYLIMIT', 200); $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv"; -$stid = OCIParse($c, $stmt); +$stid = oci_parse($c, $stmt); if (!$stid) { echo "Parse error"; die; } -$r = OCIBindByName($stid, ':MYBV', $mybv, 0 ); +$r = oci_bind_by_name($stid, ':MYBV', $mybv, 0 ); if (!$r) { echo "Bind error"; die; } for ($i = 1; $i < MYLIMIT; $i++) { - $r = OCIExecute($stid, OCI_DEFAULT); + $r = oci_execute($stid, OCI_DEFAULT); if (!$r) { echo "Execute error"; die; } var_dump($mybv); } -OCICommit($c); +oci_commit($c); $drop_st = array(); $drop_st[] = "drop sequence myseq"; diff --git a/ext/oci8/tests/bug42841.phpt b/ext/oci8/tests/bug42841.phpt index eade55fc02..3b4a6051a6 100644 --- a/ext/oci8/tests/bug42841.phpt +++ b/ext/oci8/tests/bug42841.phpt @@ -99,7 +99,7 @@ function bug43449_getCur($c) $ret = array(); - while (ocifetchinto($cur, $row, OCI_ASSOC)) { + while ($row = oci_fetch_assoc($cur)) { $ret[] = $row; } diff --git a/ext/oci8/tests/bug43492.phpt b/ext/oci8/tests/bug43492.phpt index 27eed00b0a..05fc43210b 100644 --- a/ext/oci8/tests/bug43492.phpt +++ b/ext/oci8/tests/bug43492.phpt @@ -40,22 +40,22 @@ will fail with the error "ORA-01000: maximum open cursors exceeded". function fetch($c, $i) { global $s; // (*) Allow parent statement to be available when child is used - $s = ociparse($c, 'select cursor(select * from bug43492_tab) c from bug43492_tab'); - ociexecute($s, OCI_DEFAULT); - ocifetchinto($s, $result, OCI_ASSOC); - ociexecute($result['C'], OCI_DEFAULT); + $s = oci_parse($c, 'select cursor(select * from bug43492_tab) c from bug43492_tab'); + oci_execute($s, OCI_DEFAULT); + $result = oci_fetch_assoc($s); + oci_execute($result['C'], OCI_DEFAULT); return $result['C']; } for($i = 0; $i < 300; $i++) { $cur = fetch($c, $i); for($j = 0; $j < 10; $j++) { - ocifetchinto($cur, $row, OCI_NUM); + $row = oci_fetch_row($cur); echo "$row[0] "; } echo "\n"; - ocifreestatement($cur); - ocifreestatement($s); // (*) Free the parent statement cleanly + oci_free_statement($cur); + oci_free_statement($s); // (*) Free the parent statement cleanly } echo "Done\n"; diff --git a/ext/oci8/tests/bug43492_2.phpt b/ext/oci8/tests/bug43492_2.phpt index 03b4c31382..0ea4cdf806 100644 --- a/ext/oci8/tests/bug43492_2.phpt +++ b/ext/oci8/tests/bug43492_2.phpt @@ -32,21 +32,21 @@ $stmtarray = array( oci8_test_sql_execute($c, $stmtarray); function fetch($c, $i) { - $s = ociparse($c, 'select cursor(select * from bug43492_tab) c from bug43492_tab'); - ociexecute($s, OCI_DEFAULT); - ocifetchinto($s, $result, OCI_ASSOC); - ociexecute($result['C'], OCI_DEFAULT); + $s = oci_parse($c, 'select cursor(select * from bug43492_tab) c from bug43492_tab'); + oci_execute($s, OCI_DEFAULT); + $result = oci_fetch_assoc($s); + oci_execute($result['C'], OCI_DEFAULT); return $result['C']; } for($i = 0; $i < 300; $i++) { $cur = fetch($c, $i); for($j = 0; $j < 10; $j++) { - ocifetchinto($cur, $row, OCI_NUM); + $row = oci_fetch_row($cur); echo "$row[0] "; } echo "\n"; - ocifreestatement($cur); + oci_free_statement($cur); } echo "Done\n"; diff --git a/ext/oci8/tests/coll_002.phpt b/ext/oci8/tests/coll_002.phpt index 2de2d2b125..05515f63ae 100644 --- a/ext/oci8/tests/coll_002.phpt +++ b/ext/oci8/tests/coll_002.phpt @@ -12,9 +12,15 @@ require __DIR__."/connect.inc"; require __DIR__."/create_type.inc"; var_dump($coll1 = oci_new_collection($c, $type_name)); - var_dump($coll1->free()); -var_dump($coll1->size()); + +try { + var_dump($coll1->size()); +} catch (TypeError $error) { + var_dump($error->getMessage()); +} + +var_dump(oci_new_collection($c, "NONEXISTENT")); echo "Done\n"; @@ -27,7 +33,8 @@ object(OCI-Collection)#%d (1) { resource(%d) of type (oci8 collection) } bool(true) +string(%d) "OCI-Collection::size(): supplied resource is not a valid oci8 collection resource" -Warning: OCI-Collection::size(): supplied resource is not a valid oci8 collection resource in %s on line %d +Warning: oci_new_collection(): OCI-22303: type ""."NONEXISTENT" not found in %s on line %d bool(false) Done diff --git a/ext/oci8/tests/coll_005.phpt b/ext/oci8/tests/coll_005.phpt deleted file mode 100644 index 72fdbfd9da..0000000000 --- a/ext/oci8/tests/coll_005.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -ocinewcollection() ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -?> ---FILE-- - ---EXPECTF-- -object(OCI-Collection)#%d (1) { - ["collection"]=> - resource(%d) of type (oci8 collection) -} - -Warning: ocinewcollection(): OCI-22303: type ""."NONEXISTENT" not found in %s on line %d -bool(false) -Done diff --git a/ext/oci8/tests/coll_006.phpt b/ext/oci8/tests/coll_006.phpt deleted file mode 100644 index cc69f9b506..0000000000 --- a/ext/oci8/tests/coll_006.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ocinewcollection() + free() ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -?> ---FILE-- -free()); -var_dump($coll1->size()); - -echo "Done\n"; - -require __DIR__."/drop_type.inc"; - -?> ---EXPECTF-- -object(OCI-Collection)#%d (1) { - ["collection"]=> - resource(%d) of type (oci8 collection) -} -bool(true) - -Warning: OCI-Collection::size(): supplied resource is not a valid oci8 collection resource in %s on line %d -bool(false) -Done diff --git a/ext/oci8/tests/coll_006_func.phpt b/ext/oci8/tests/coll_006_func.phpt deleted file mode 100644 index 7bd1152f2c..0000000000 --- a/ext/oci8/tests/coll_006_func.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -ocinewcollection() + free() ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -?> ---FILE-- - ---EXPECTF-- -object(OCI-Collection)#%d (1) { - ["collection"]=> - resource(%d) of type (oci8 collection) -} -bool(true) - -Warning: oci_collection_size(): supplied resource is not a valid oci8 collection resource in %s on line %d -bool(false) -Done diff --git a/ext/oci8/tests/coll_007.phpt b/ext/oci8/tests/coll_007.phpt deleted file mode 100644 index b3b05a5d9c..0000000000 --- a/ext/oci8/tests/coll_007.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -collection methods ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -?> ---FILE-- -size()); -var_dump($coll1->max()); -var_dump($coll1->trim(3)); -var_dump($coll1->append(1)); -var_dump($coll1->getElem(0)); -var_dump($coll1->assignElem(0,2)); - -echo "Done\n"; - -require __DIR__."/drop_type.inc"; - -?> ---EXPECTF-- -int(0) -int(0) - -Warning: OCI-Collection::trim(): OCI-22167: given trim size [3] must be less than or equal to [0] in %s on line %d -bool(false) -bool(true) -float(1) -bool(true) -Done diff --git a/ext/oci8/tests/coll_008.phpt b/ext/oci8/tests/coll_008.phpt deleted file mode 100644 index b85dc1e917..0000000000 --- a/ext/oci8/tests/coll_008.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -ocicollassign() ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -?> ---FILE-- -append(1)); - -var_dump($coll2->assign($coll1)); - -var_dump($coll2->getElem(0)); - -echo "Done\n"; - -require __DIR__."/drop_type.inc"; - -?> ---EXPECT-- -bool(true) -bool(true) -float(1) -Done diff --git a/ext/oci8/tests/coll_009.phpt b/ext/oci8/tests/coll_009.phpt index 2707fbccf7..19289c5290 100644 --- a/ext/oci8/tests/coll_009.phpt +++ b/ext/oci8/tests/coll_009.phpt @@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); -$coll2 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); +$coll2 = oci_new_collection($c, $type_name); var_dump($coll1->append("2005-07-28")); diff --git a/ext/oci8/tests/coll_009_func.phpt b/ext/oci8/tests/coll_009_func.phpt index 5b3e08579a..10e03c2095 100644 --- a/ext/oci8/tests/coll_009_func.phpt +++ b/ext/oci8/tests/coll_009_func.phpt @@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); -$coll2 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); +$coll2 = oci_new_collection($c, $type_name); var_dump(oci_collection_append($coll1, "2005-07-28")); diff --git a/ext/oci8/tests/coll_010.phpt b/ext/oci8/tests/coll_010.phpt index 42bd788a81..da0b278e07 100644 --- a/ext/oci8/tests/coll_010.phpt +++ b/ext/oci8/tests/coll_010.phpt @@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); -$coll2 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); +$coll2 = oci_new_collection($c, $type_name); var_dump($coll1->append(null)); diff --git a/ext/oci8/tests/coll_010_func.phpt b/ext/oci8/tests/coll_010_func.phpt index 9ef6c22250..f244ce16a8 100644 --- a/ext/oci8/tests/coll_010_func.phpt +++ b/ext/oci8/tests/coll_010_func.phpt @@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); -$coll2 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); +$coll2 = oci_new_collection($c, $type_name); var_dump(oci_collection_append($coll1, null)); diff --git a/ext/oci8/tests/coll_011.phpt b/ext/oci8/tests/coll_011.phpt index 562de0889f..6af52e9a3c 100644 --- a/ext/oci8/tests/coll_011.phpt +++ b/ext/oci8/tests/coll_011.phpt @@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); -$coll2 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); +$coll2 = oci_new_collection($c, $type_name); var_dump($coll1->append("string")); var_dump($coll1->append("string")); diff --git a/ext/oci8/tests/coll_011_func.phpt b/ext/oci8/tests/coll_011_func.phpt index ca43336ffc..ca9d733e88 100644 --- a/ext/oci8/tests/coll_011_func.phpt +++ b/ext/oci8/tests/coll_011_func.phpt @@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); -$coll2 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); +$coll2 = oci_new_collection($c, $type_name); var_dump(oci_collection_append($coll1, "string")); var_dump(oci_collection_append($coll1, "string")); diff --git a/ext/oci8/tests/coll_012.phpt b/ext/oci8/tests/coll_012.phpt index be0439e8ba..680e03049f 100644 --- a/ext/oci8/tests/coll_012.phpt +++ b/ext/oci8/tests/coll_012.phpt @@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); -$coll2 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); +$coll2 = oci_new_collection($c, $type_name); var_dump($coll1->append("28-JUL-05")); diff --git a/ext/oci8/tests/coll_012_func.phpt b/ext/oci8/tests/coll_012_func.phpt index fa6a026d16..aa047653dd 100644 --- a/ext/oci8/tests/coll_012_func.phpt +++ b/ext/oci8/tests/coll_012_func.phpt @@ -14,17 +14,17 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); -$coll2 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); +$coll2 = oci_new_collection($c, $type_name); var_dump(oci_collection_append($coll1, "28-JUL-05")); diff --git a/ext/oci8/tests/coll_013.phpt b/ext/oci8/tests/coll_013.phpt index 1e943bf57e..10e5422b2a 100644 --- a/ext/oci8/tests/coll_013.phpt +++ b/ext/oci8/tests/coll_013.phpt @@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); var_dump($coll1->append("28-JUL-05")); var_dump($coll1->assignElem(0,"01-JAN-05")); diff --git a/ext/oci8/tests/coll_013_func.phpt b/ext/oci8/tests/coll_013_func.phpt index 417bfdb18f..7e4f253bfc 100644 --- a/ext/oci8/tests/coll_013_func.phpt +++ b/ext/oci8/tests/coll_013_func.phpt @@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); var_dump(oci_collection_append($coll1, "28-JUL-05")); var_dump(oci_collection_element_assign($coll1, 0, "01-JAN-05")); diff --git a/ext/oci8/tests/coll_014.phpt b/ext/oci8/tests/coll_014.phpt index 697d306818..158fd39f2e 100644 --- a/ext/oci8/tests/coll_014.phpt +++ b/ext/oci8/tests/coll_014.phpt @@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); var_dump($coll1->append("striing")); var_dump($coll1->assignElem(0,"blah")); diff --git a/ext/oci8/tests/coll_014_func.phpt b/ext/oci8/tests/coll_014_func.phpt index fc9df35a7c..a3f1d9bde8 100644 --- a/ext/oci8/tests/coll_014_func.phpt +++ b/ext/oci8/tests/coll_014_func.phpt @@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); var_dump(oci_collection_append($coll1, "striing")); var_dump(oci_collection_element_assign($coll1, 0,"blah")); diff --git a/ext/oci8/tests/coll_015.phpt b/ext/oci8/tests/coll_015.phpt index d3bffd2fe5..cc519f202f 100644 --- a/ext/oci8/tests/coll_015.phpt +++ b/ext/oci8/tests/coll_015.phpt @@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); var_dump($coll1->append(1)); var_dump($coll1->assignElem(0,2345)); diff --git a/ext/oci8/tests/coll_015_func.phpt b/ext/oci8/tests/coll_015_func.phpt index 3685a28b96..5db45ee339 100644 --- a/ext/oci8/tests/coll_015_func.phpt +++ b/ext/oci8/tests/coll_015_func.phpt @@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); var_dump(oci_collection_append($coll1, 1)); var_dump(oci_collection_element_assign($coll1,0,2345)); diff --git a/ext/oci8/tests/coll_016.phpt b/ext/oci8/tests/coll_016.phpt index d4b19efb43..f64ac03f52 100644 --- a/ext/oci8/tests/coll_016.phpt +++ b/ext/oci8/tests/coll_016.phpt @@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); var_dump($coll1->append(1)); var_dump($coll1->assignElem(-1,2345)); diff --git a/ext/oci8/tests/coll_016_func.phpt b/ext/oci8/tests/coll_016_func.phpt index 95ed0588dc..a9d9f0f8f4 100644 --- a/ext/oci8/tests/coll_016_func.phpt +++ b/ext/oci8/tests/coll_016_func.phpt @@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); var_dump(oci_collection_append($coll1, 1)); var_dump(oci_collection_element_assign($coll1,-1,2345)); diff --git a/ext/oci8/tests/coll_017.phpt b/ext/oci8/tests/coll_017.phpt index 0bd730934f..6701a930c3 100644 --- a/ext/oci8/tests/coll_017.phpt +++ b/ext/oci8/tests/coll_017.phpt @@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); var_dump($coll1->append("string")); var_dump($coll1->assignElem(0, null)); diff --git a/ext/oci8/tests/coll_017_func.phpt b/ext/oci8/tests/coll_017_func.phpt index e3d9be2a43..b1c403a16b 100644 --- a/ext/oci8/tests/coll_017_func.phpt +++ b/ext/oci8/tests/coll_017_func.phpt @@ -14,16 +14,16 @@ $ora_sql = "DROP TYPE ".$type_name." "; -$statement = OCIParse($c,$ora_sql); -@OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +@oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; -$statement = OCIParse($c,$ora_sql); -OCIExecute($statement); +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); -$coll1 = ocinewcollection($c, $type_name); +$coll1 = oci_new_collection($c, $type_name); var_dump(oci_collection_append($coll1, "string")); var_dump(oci_collection_element_assign($coll1, 0, null)); diff --git a/ext/oci8/tests/commit_old.phpt b/ext/oci8/tests/commit_old.phpt deleted file mode 100644 index bfbae9b597..0000000000 --- a/ext/oci8/tests/commit_old.phpt +++ /dev/null @@ -1,149 +0,0 @@ ---TEST-- -ocicommit()/ocirollback() ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -?> ---FILE-- - ---EXPECT-- -bool(true) -int(0) -array(5) { - ["ID"]=> - array(0) { - } - ["VALUE"]=> - array(0) { - } - ["BLOB"]=> - array(0) { - } - ["CLOB"]=> - array(0) { - } - ["STRING"]=> - array(0) { - } -} -bool(true) -int(4) -array(5) { - ["ID"]=> - array(4) { - [0]=> - string(1) "1" - [1]=> - string(1) "1" - [2]=> - string(1) "1" - [3]=> - string(1) "1" - } - ["VALUE"]=> - array(4) { - [0]=> - string(1) "1" - [1]=> - string(1) "1" - [2]=> - string(1) "1" - [3]=> - string(1) "1" - } - ["BLOB"]=> - array(4) { - [0]=> - NULL - [1]=> - NULL - [2]=> - NULL - [3]=> - NULL - } - ["CLOB"]=> - array(4) { - [0]=> - NULL - [1]=> - NULL - [2]=> - NULL - [3]=> - NULL - } - ["STRING"]=> - array(4) { - [0]=> - NULL - [1]=> - NULL - [2]=> - NULL - [3]=> - NULL - } -} -Done diff --git a/ext/oci8/tests/connect_1.phpt b/ext/oci8/tests/connect_1.phpt index 297b0897b6..9bdcf3e2b3 100644 --- a/ext/oci8/tests/connect_1.phpt +++ b/ext/oci8/tests/connect_1.phpt @@ -22,7 +22,7 @@ else { } var_dump(oci_close($c1)); -var_dump(ocilogoff($c2)); +var_dump(oci_close($c2)); echo "Done\n"; diff --git a/ext/oci8/tests/connect_1_old.phpt b/ext/oci8/tests/connect_1_old.phpt deleted file mode 100644 index 3ce756f51c..0000000000 --- a/ext/oci8/tests/connect_1_old.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -ociplogon() & ocinlogon() ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -resource(%d) of type (oci8 persistent connection) -resource(%d) of type (oci8 connection) -bool(true) -bool(true) -Done diff --git a/ext/oci8/tests/connect_old.phpt b/ext/oci8/tests/connect_old.phpt deleted file mode 100644 index c55197fca1..0000000000 --- a/ext/oci8/tests/connect_old.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -ocilogon() ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -resource(%d) of type (oci8 connection) -Done diff --git a/ext/oci8/tests/connect_without_oracle_home_old.phpt b/ext/oci8/tests/connect_without_oracle_home_old.phpt deleted file mode 100644 index bd217acd77..0000000000 --- a/ext/oci8/tests/connect_without_oracle_home_old.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -ocilogon() without ORACLE_HOME set (OCIServerAttach() segfaults) ---SKIPIF-- - ---ENV-- -ORACLE_HOME="" ---FILE-- - ---EXPECTF-- -Warning: ocilogon(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and %s are set and point to the right directories in %s on line %d - -Warning: ocilogon(): %s ORA-01804 - in %s on line %d -bool(false) diff --git a/ext/oci8/tests/connect_without_oracle_home_old_11.phpt b/ext/oci8/tests/connect_without_oracle_home_old_11.phpt deleted file mode 100644 index 243741bfde..0000000000 --- a/ext/oci8/tests/connect_without_oracle_home_old_11.phpt +++ /dev/null @@ -1,41 +0,0 @@ ---TEST-- -ocilogon() without ORACLE_HOME set (OCIServerAttach() segfaults) ---SKIPIF-- -= 2) || - ($matches[1] >= 12) - ))) { - die("skip test expected to work only with Oracle 11gR2 or greater version of client"); -} -?> ---ENV-- -ORACLE_HOME="" ---FILE-- - ---EXPECTF-- -Warning: ocilogon(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and %s are set and point to the right directories in %s on line %d - -Warning: ocilogon(): Error while trying to retrieve text for error ORA-01804 - in %sconnect_without_oracle_home_old_11.php on line %d -bool(false) diff --git a/ext/oci8/tests/create_type.inc b/ext/oci8/tests/create_type.inc index 40df1b9594..3415e1b9cc 100644 --- a/ext/oci8/tests/create_type.inc +++ b/ext/oci8/tests/create_type.inc @@ -5,13 +5,13 @@ ".$type_name." "; - $statement = OCIParse($c,$ora_sql); - @OCIExecute($statement); + $statement = oci_parse($c,$ora_sql); + @oci_execute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER(11)"; - $statement = OCIParse($c,$ora_sql); - OCIExecute($statement); + $statement = oci_parse($c,$ora_sql); + oci_execute($statement); } ?> diff --git a/ext/oci8/tests/cursors_old.phpt b/ext/oci8/tests/cursors_old.phpt deleted file mode 100644 index 7c5c668f62..0000000000 --- a/ext/oci8/tests/cursors_old.phpt +++ /dev/null @@ -1,70 +0,0 @@ ---TEST-- -fetching cursor from a statement ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -?> ---FILE-- - ---EXPECTF-- -array(2) { - ["ID"]=> - string(1) "1" - ["VALUE"]=> - string(1) "1" -} -bool(true) - -Warning: ocifetchinto():%sORA-01002: %s in %scursors_old.php on line %d -array(2) { - ["ID"]=> - string(1) "1" - ["VALUE"]=> - string(1) "1" -} -bool(true) -Done diff --git a/ext/oci8/tests/define_old.phpt b/ext/oci8/tests/define_old.phpt deleted file mode 100644 index 25458e1283..0000000000 --- a/ext/oci8/tests/define_old.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -ocidefinebyname() ---SKIPIF-- - ---FILE-- - ---EXPECT-- -string(4) "some" -Done diff --git a/ext/oci8/tests/details.inc b/ext/oci8/tests/details.inc index 101ebfcd79..34c8d15dab 100644 --- a/ext/oci8/tests/details.inc +++ b/ext/oci8/tests/details.inc @@ -75,4 +75,4 @@ if (!function_exists('oci8_test_sql_execute')) { } -?> +?> \ No newline at end of file diff --git a/ext/oci8/tests/error_old.phpt b/ext/oci8/tests/error_old.phpt deleted file mode 100644 index e25b66516b..0000000000 --- a/ext/oci8/tests/error_old.phpt +++ /dev/null @@ -1,43 +0,0 @@ ---TEST-- -ocierror() ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs: different error messages from TimesTen -require(__DIR__.'/skipif.inc'); -?> ---FILE-- - ---EXPECTF-- -resource(%s) of type (oci8 connection) -resource(%s) of type (oci8 statement) - -Warning: ociexecute(): ORA-00900: %s in %s on line %d -bool(false) -array(4) { - ["code"]=> - int(900) - ["message"]=> - string(%d) "ORA-00900: %s" - ["offset"]=> - int(0) - ["sqltext"]=> - string(12) "WRONG SYNTAX" -} -Done diff --git a/ext/oci8/tests/existence_aliases.phpt b/ext/oci8/tests/existence_aliases.phpt new file mode 100644 index 0000000000..9cdd7fbcaf --- /dev/null +++ b/ext/oci8/tests/existence_aliases.phpt @@ -0,0 +1,100 @@ +--TEST-- +Test if function aliases still exist. +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) \ No newline at end of file diff --git a/ext/oci8/tests/fetch.phpt b/ext/oci8/tests/fetch.phpt index eae30bad23..2bb455c4d1 100644 --- a/ext/oci8/tests/fetch.phpt +++ b/ext/oci8/tests/fetch.phpt @@ -29,9 +29,9 @@ if (!oci_execute($s)) { die("oci_execute(select) failed!\n"); } -while(ocifetch($s)) { - $row = ociresult($s, 1); - $row1 = ociresult($s, 2); +while(oci_fetch($s)) { + $row = oci_result($s, 1); + $row1 = oci_result($s, 2); var_dump($row); var_dump($row1); } diff --git a/ext/oci8/tests/fetch_all1.phpt b/ext/oci8/tests/fetch_all1.phpt index b531364109..911b458754 100644 --- a/ext/oci8/tests/fetch_all1.phpt +++ b/ext/oci8/tests/fetch_all1.phpt @@ -30,14 +30,6 @@ if (!oci_execute($s)) { var_dump(oci_fetch_all($s, $all)); var_dump($all); -/* ocifetchstatement */ -if (!oci_execute($s)) { - die("oci_execute(select) failed!\n"); -} - -var_dump(ocifetchstatement($s, $all)); -var_dump($all); - // Cleanup $stmtarray = array( @@ -70,25 +62,4 @@ array(2) { string(1) "1" } } -int(3) -array(2) { - ["ID"]=> - array(3) { - [0]=> - string(1) "1" - [1]=> - string(1) "1" - [2]=> - string(1) "1" - } - ["VALUE"]=> - array(3) { - [0]=> - string(1) "1" - [1]=> - string(1) "1" - [2]=> - string(1) "1" - } -} Done diff --git a/ext/oci8/tests/fetch_into.phpt b/ext/oci8/tests/fetch_into.phpt deleted file mode 100644 index 634e7379ef..0000000000 --- a/ext/oci8/tests/fetch_into.phpt +++ /dev/null @@ -1,71 +0,0 @@ ---TEST-- -ocifetchinto() ---SKIPIF-- - ---FILE-- - ---EXPECT-- -int(2) -array(2) { - [0]=> - string(1) "1" - [1]=> - string(1) "1" -} -int(2) -array(4) { - [0]=> - string(1) "1" - ["ID"]=> - string(1) "1" - [1]=> - string(1) "1" - ["VALUE"]=> - string(1) "1" -} -Done diff --git a/ext/oci8/tests/fetch_into1.phpt b/ext/oci8/tests/fetch_into1.phpt deleted file mode 100644 index 27591eaa97..0000000000 --- a/ext/oci8/tests/fetch_into1.phpt +++ /dev/null @@ -1,195 +0,0 @@ ---TEST-- -various ocifetchinto() tests ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -?> ---FILE-- - ---EXPECT-- -int(5) -array(2) { - [0]=> - string(1) "1" - [1]=> - string(1) "1" -} -int(5) -array(2) { - ["ID"]=> - string(1) "1" - ["VALUE"]=> - string(1) "1" -} -int(5) -array(5) { - [0]=> - string(1) "1" - [1]=> - string(1) "1" - [2]=> - NULL - [3]=> - NULL - [4]=> - NULL -} -int(5) -array(2) { - [0]=> - string(1) "1" - [1]=> - string(1) "1" -} -int(5) -array(4) { - [0]=> - string(1) "1" - ["ID"]=> - string(1) "1" - [1]=> - string(1) "1" - ["VALUE"]=> - string(1) "1" -} -int(5) -array(10) { - [0]=> - string(1) "1" - ["ID"]=> - string(1) "1" - [1]=> - string(1) "1" - ["VALUE"]=> - string(1) "1" - [2]=> - NULL - ["BLOB"]=> - NULL - [3]=> - NULL - ["CLOB"]=> - NULL - [4]=> - NULL - ["STRING"]=> - NULL -} -int(5) -array(10) { - [0]=> - string(1) "1" - ["ID"]=> - string(1) "1" - [1]=> - string(1) "1" - ["VALUE"]=> - string(1) "1" - [2]=> - NULL - ["BLOB"]=> - NULL - [3]=> - NULL - ["CLOB"]=> - NULL - [4]=> - NULL - ["STRING"]=> - NULL -} -int(5) -array(5) { - [0]=> - string(1) "1" - [1]=> - string(1) "1" - [2]=> - NULL - [3]=> - NULL - [4]=> - NULL -} -int(5) -array(5) { - ["ID"]=> - string(1) "1" - ["VALUE"]=> - string(1) "1" - ["BLOB"]=> - NULL - ["CLOB"]=> - NULL - ["STRING"]=> - NULL -} -int(5) -array(5) { - [0]=> - string(1) "1" - [1]=> - string(1) "1" - [2]=> - NULL - [3]=> - NULL - [4]=> - NULL -} -Done diff --git a/ext/oci8/tests/fetch_into2.phpt b/ext/oci8/tests/fetch_into2.phpt deleted file mode 100644 index 13467e0e54..0000000000 --- a/ext/oci8/tests/fetch_into2.phpt +++ /dev/null @@ -1,73 +0,0 @@ ---TEST-- -ocifetchinto() & wrong number of params ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -?> ---FILE-- - ---EXPECTF-- -Warning: ocifetchinto() expects at least 2 parameters, 1 given in %s on line %d -NULL - -Notice: Undefined variable $all in %s on line %d -NULL - -Warning: ocifetchinto() expects at most 3 parameters, 4 given in %s on line %d -NULL -NULL - -Warning: ocifetchinto(): supplied resource is not a valid oci8 statement resource in %s on line %d -bool(false) -NULL -int(5) -array(2) { - [0]=> - string(1) "1" - [1]=> - string(1) "1" -} -Done diff --git a/ext/oci8/tests/fetch_object.phpt b/ext/oci8/tests/fetch_object.phpt index 1e270b6000..ca6d153abe 100644 --- a/ext/oci8/tests/fetch_object.phpt +++ b/ext/oci8/tests/fetch_object.phpt @@ -116,5 +116,5 @@ Test 2 Test 3 123 -Notice: Undefined property: stdClass::$CASESENSITIVE in %sfetch_object.php on line %d +Warning: Undefined property: stdClass::$CASESENSITIVE in %sfetch_object.php on line %d diff --git a/ext/oci8/tests/fetch_object_1.phpt b/ext/oci8/tests/fetch_object_1.phpt index 586daebca8..fc83f37571 100644 --- a/ext/oci8/tests/fetch_object_1.phpt +++ b/ext/oci8/tests/fetch_object_1.phpt @@ -116,5 +116,5 @@ Test 2 Test 3 123 -Notice: Undefined property: stdClass::$CASESENSITIVE in %sfetch_object_1.php on line %d +Warning: Undefined property: stdClass::$CASESENSITIVE in %sfetch_object_1.php on line %d diff --git a/ext/oci8/tests/field_funcs_old.phpt b/ext/oci8/tests/field_funcs_old.phpt deleted file mode 100644 index afb6dc62e1..0000000000 --- a/ext/oci8/tests/field_funcs_old.phpt +++ /dev/null @@ -1,108 +0,0 @@ ---TEST-- -ocicolumn*() family ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -?> ---FILE-- - $field) { - $num++; - var_dump(ocicolumnisnull($s, $num)); - var_dump(ocicolumnname($s, $num)); - var_dump(ocicolumntype($s, $num)); - var_dump(ocicolumntyperaw($s, $num)); - var_dump(ocicolumnscale($s, $num)); - var_dump(ocicolumnprecision($s, $num)); - var_dump(ocicolumnsize($s, $num)); -} - - -require __DIR__.'/drop_table.inc'; - -echo "Done\n"; - -?> ---EXPECT-- -array(5) { - [0]=> - string(1) "1" - [1]=> - string(1) "1" - [2]=> - NULL - [3]=> - NULL - [4]=> - NULL -} -bool(false) -string(2) "ID" -string(6) "NUMBER" -int(2) -int(-127) -int(0) -int(22) -bool(false) -string(5) "VALUE" -string(6) "NUMBER" -int(2) -int(-127) -int(0) -int(22) -bool(true) -string(4) "BLOB" -string(4) "BLOB" -int(113) -int(0) -int(0) -int(4000) -bool(true) -string(4) "CLOB" -string(4) "CLOB" -int(112) -int(0) -int(0) -int(4000) -bool(true) -string(6) "STRING" -string(8) "VARCHAR2" -int(1) -int(0) -int(0) -int(10) -Done diff --git a/ext/oci8/tests/function_aliases.phpt b/ext/oci8/tests/function_aliases.phpt deleted file mode 100644 index 2c890d6403..0000000000 --- a/ext/oci8/tests/function_aliases.phpt +++ /dev/null @@ -1,196 +0,0 @@ ---TEST-- -Existence of old function aliases ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -Warning: oci_free_cursor() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocifreecursor() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocibindbyname() expects at least 3 parameters, 0 given in %s on line %d -NULL - -Warning: ocidefinebyname() expects at least 3 parameters, 0 given in %s on line %d -NULL - -Warning: ocicolumnisnull() expects exactly 2 parameters, 0 given in %s on line %d -bool(false) - -Warning: ocicolumnname() expects exactly 2 parameters, 0 given in %s on line %d -bool(false) - -Warning: ocicolumnsize() expects exactly 2 parameters, 0 given in %s on line %d -bool(false) - -Warning: ocicolumnscale() expects exactly 2 parameters, 0 given in %s on line %d -bool(false) - -Warning: ocicolumnprecision() expects exactly 2 parameters, 0 given in %s on line %d -bool(false) - -Warning: ocicolumntype() expects exactly 2 parameters, 0 given in %s on line %d -bool(false) - -Warning: ocicolumntyperaw() expects exactly 2 parameters, 0 given in %s on line %d -bool(false) - -Warning: ociexecute() expects at least 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocicancel() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocifetch() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocifetchstatement() expects at least 2 parameters, 0 given in %s on line %d -NULL - -Warning: ocifreestatement() expects exactly 1 parameter, 0 given in %s on line %d -NULL -NULL - -Warning: ocinumcols() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ociparse() expects exactly 2 parameters, 0 given in %s on line %d -NULL - -Warning: ocinewcursor() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ociresult() expects exactly 2 parameters, 0 given in %s on line %d -bool(false) - -Warning: ociserverversion() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocistatementtype() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocirowcount() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocilogoff() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocilogon() expects at least 2 parameters, 0 given in %s on line %d -NULL - -Warning: ocinlogon() expects at least 2 parameters, 0 given in %s on line %d -NULL - -Warning: ociplogon() expects at least 2 parameters, 0 given in %s on line %d -NULL -bool(false) - -Warning: ocifreedesc() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocisavelob() expects at least 2 parameters, 0 given in %s on line %d -NULL - -Warning: ocisavelobfile() expects exactly 2 parameters, 0 given in %s on line %d -NULL - -Warning: ociwritelobtofile() expects at least 2 parameters, 0 given in %s on line %d -NULL - -Warning: ociloadlob() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocicommit() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocirollback() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocinewdescriptor() expects at least 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocisetprefetch() expects exactly 2 parameters, 0 given in %s on line %d -NULL - -Warning: Wrong parameter count for ocipasswordchange() in %s on line %d -NULL - -Warning: ocifreecollection() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocinewcollection() expects at least 2 parameters, 0 given in %s on line %d -NULL - -Warning: ocicollappend() expects exactly 2 parameters, 0 given in %s on line %d -NULL - -Warning: ocicollgetelem() expects exactly 2 parameters, 0 given in %s on line %d -NULL - -Warning: ocicollassignelem() expects exactly 3 parameters, 0 given in %s on line %d -NULL - -Warning: ocicollsize() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocicollmax() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocicolltrim() expects exactly 2 parameters, 0 given in %s on line %d -NULL -Done diff --git a/ext/oci8/tests/num.phpt b/ext/oci8/tests/num.phpt index d23450734f..ef1def4bdb 100644 --- a/ext/oci8/tests/num.phpt +++ b/ext/oci8/tests/num.phpt @@ -17,22 +17,13 @@ $stmtarray = array( oci8_test_sql_execute($c, $stmtarray); // Run Test - echo "Test 1\n"; -var_dump(ocirowcount()); -var_dump(oci_num_rows()); -var_dump(ocinumcols()); -var_dump(oci_num_fields()); - -echo "Test 2\n"; $insert_sql = "insert into num_tab (id, value) values (1,1)"; if (!($s = oci_parse($c, $insert_sql))) { die("oci_parse(insert) failed!\n"); } -var_dump(ocirowcount($s)); var_dump(oci_num_rows($s)); -var_dump(ocinumcols($s)); var_dump(oci_num_fields($s)); for ($i = 0; $i<3; $i++) { @@ -41,20 +32,16 @@ for ($i = 0; $i<3; $i++) { } } -echo "Test 3\n"; -var_dump(ocirowcount($s)); +echo "Test 2\n"; var_dump(oci_num_rows($s)); -var_dump(ocinumcols($s)); var_dump(oci_num_fields($s)); if (!oci_commit($c)) { die("oci_commit() failed!\n"); } -echo "Test 4\n"; -var_dump(ocirowcount($s)); +echo "Test 3\n"; var_dump(oci_num_rows($s)); -var_dump(ocinumcols($s)); var_dump(oci_num_fields($s)); // All rows @@ -64,20 +51,16 @@ if (!($s = oci_parse($c, $select_sql))) { die("oci_parse(select) failed!\n"); } -echo "Test 5a\n"; -var_dump(ocirowcount($s)); +echo "Test 4a\n"; var_dump(oci_num_rows($s)); -var_dump(ocinumcols($s)); var_dump(oci_num_fields($s)); if (!oci_execute($s)) { die("oci_execute(select) failed!\n"); } -echo "Test 5b\n"; -var_dump(ocirowcount($s)); +echo "Test 4b\n"; var_dump(oci_num_rows($s)); -var_dump(ocinumcols($s)); var_dump(oci_num_fields($s)); @@ -85,10 +68,8 @@ if (oci_fetch_all($s,$r) === false) { die("oci_fetch_all(select) failed!\n"); } -echo "Test 5c\n"; -var_dump(ocirowcount($s)); +echo "Test 4c\n"; var_dump(oci_num_rows($s)); -var_dump(ocinumcols($s)); var_dump(oci_num_fields($s)); // One row @@ -106,10 +87,8 @@ if (oci_fetch_all($s,$r) === false) { die("oci_fetch_all(select) failed!\n"); } -echo "Test 6\n"; -var_dump(ocirowcount($s)); +echo "Test 5\n"; var_dump(oci_num_rows($s)); -var_dump(ocinumcols($s)); var_dump(oci_num_fields($s)); // No rows @@ -127,10 +106,8 @@ if (oci_fetch_all($s,$r) === false) { die("oci_fetch_all(select) failed!\n"); } -echo "Test 7\n"; -var_dump(ocirowcount($s)); +echo "Test 6\n"; var_dump(oci_num_rows($s)); -var_dump(ocinumcols($s)); var_dump(oci_num_fields($s)); $delete_sql = "delete from num_tab"; @@ -143,22 +120,12 @@ if (!oci_execute($s)) { die("oci_execute(delete) failed!\n"); } -echo "Test 8a\n"; -var_dump(ocirowcount($s)); +echo "Test 7a\n"; var_dump(oci_num_rows($s)); -var_dump(ocinumcols($s)); var_dump(oci_num_fields($s)); - oci_commit($c); -echo "Test 8b\n"; -var_dump(ocirowcount($s)); -var_dump(oci_num_rows($s)); -var_dump(ocinumcols($s)); -var_dump(oci_num_fields($s)); - - // Cleanup $stmtarray = array( @@ -172,66 +139,30 @@ echo "Done\n"; ?> --EXPECTF-- Test 1 - -Warning: ocirowcount() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: oci_num_rows() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: ocinumcols() expects exactly 1 parameter, 0 given in %s on line %d -NULL - -Warning: oci_num_fields() expects exactly 1 parameter, 0 given in %s on line %d -NULL -Test 2 int(0) int(0) -int(0) -int(0) -Test 3 -int(1) +Test 2 int(1) int(0) -int(0) -Test 4 -int(1) +Test 3 int(1) int(0) -int(0) -Test 5a -int(0) -int(0) +Test 4a int(0) int(0) -Test 5b +Test 4b int(0) -int(0) -int(2) int(2) -Test 5c -int(3) +Test 4c int(3) int(2) -int(2) -Test 6 +Test 5 int(1) -int(1) -int(2) int(2) -Test 7 -int(0) +Test 6 int(0) int(1) -int(1) -Test 8a -int(3) +Test 7a int(3) int(0) -int(0) -Test 8b -int(3) -int(3) -int(0) -int(0) -Done +Done \ No newline at end of file diff --git a/ext/oci8/tests/password_new.phpt b/ext/oci8/tests/password_new.phpt index c0e53001df..8c7acd471f 100644 --- a/ext/oci8/tests/password_new.phpt +++ b/ext/oci8/tests/password_new.phpt @@ -37,7 +37,7 @@ require __DIR__."/connect.inc"; $new_password = "test"; var_dump(oci_password_change($dbase, $user, $password, $new_password)); -var_dump($new_c = ocilogon($user,$new_password,$dbase)); +var_dump($new_c = oci_connect($user,$new_password,$dbase)); var_dump(oci_password_change($dbase, $user, $new_password, $password)); diff --git a/ext/oci8/tests/password_old.phpt b/ext/oci8/tests/password_old.phpt deleted file mode 100644 index a92dba4366..0000000000 --- a/ext/oci8/tests/password_old.phpt +++ /dev/null @@ -1,50 +0,0 @@ ---TEST-- -ocipasswordchange() ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -require(__DIR__.'/connect.inc'); -if (empty($dbase)) die ("skip requires database connection string be set"); -if ($test_drcp) die("skip password change not supported in DRCP Mode"); - -preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches_sv); -preg_match('/([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches); -if (!(isset($matches_sv[0]) && isset($matches[0]) - && $matches_sv[1] == $matches[1] - && $matches_sv[2] == $matches[2] - && $matches_sv[3] == $matches[3] - && $matches_sv[4] == $matches[4])) { - // Avoid diffs due to cross version protocol changes (e.g. like 11.2.0.2-11.2.0.3) and bugs like Oracle bug: 6277160 - die ("skip test only runs when database client libraries and database server are the same version"); -} - -// This test in Oracle 12c needs a non-CDB or the root container -if (isset($matches_sv[0]) && $matches_sv[1] >= 12) { - $s = oci_parse($c, "select nvl(sys_context('userenv', 'con_name'), 'notacdb') as dbtype from dual"); - $r = @oci_execute($s); - if (!$r) - die('skip could not identify container type'); - $r = oci_fetch_array($s); - if ($r['DBTYPE'] !== 'CDB$ROOT') - die('skip cannot run test using a PDB'); -} -?> ---FILE-- - ---EXPECTF-- -resource(%d) of type (oci8 connection) -resource(%d) of type (oci8 connection) -resource(%d) of type (oci8 connection) -Done diff --git a/ext/oci8/tests/prefetch_old.phpt b/ext/oci8/tests/prefetch_old.phpt deleted file mode 100644 index 1fdf01305e..0000000000 --- a/ext/oci8/tests/prefetch_old.phpt +++ /dev/null @@ -1,56 +0,0 @@ ---TEST-- -ocisetprefetch() ---SKIPIF-- - ---FILE-- - ---EXPECT-- -bool(true) -bool(true) -int(1) -Done diff --git a/ext/oci8/tests/reflection1.phpt b/ext/oci8/tests/reflection1.phpt index 43c3205337..3420387326 100644 --- a/ext/oci8/tests/reflection1.phpt +++ b/ext/oci8/tests/reflection1.phpt @@ -24,7 +24,6 @@ reflection::export(new reflectionfunction('oci_fetch_object')); reflection::export(new reflectionfunction('oci_fetch_row')); reflection::export(new reflectionfunction('oci_fetch_assoc')); reflection::export(new reflectionfunction('oci_fetch_array')); -reflection::export(new reflectionfunction('ocifetchinto')); reflection::export(new reflectionfunction('oci_fetch_all')); reflection::export(new reflectionfunction('oci_free_statement')); reflection::export(new reflectionfunction('oci_internal_debug')); @@ -75,52 +74,6 @@ reflection::export(new reflectionfunction('oci_collection_max')); reflection::export(new reflectionfunction('oci_collection_trim')); reflection::export(new reflectionfunction('oci_new_collection')); reflection::export(new reflectionfunction('oci_free_cursor')); -reflection::export(new reflectionfunction('ocifreecursor')); -reflection::export(new reflectionfunction('ocibindbyname')); -reflection::export(new reflectionfunction('ocidefinebyname')); -reflection::export(new reflectionfunction('ocicolumnisnull')); -reflection::export(new reflectionfunction('ocicolumnname')); -reflection::export(new reflectionfunction('ocicolumnsize')); -reflection::export(new reflectionfunction('ocicolumnscale')); -reflection::export(new reflectionfunction('ocicolumnprecision')); -reflection::export(new reflectionfunction('ocicolumntype')); -reflection::export(new reflectionfunction('ocicolumntyperaw')); -reflection::export(new reflectionfunction('ociexecute')); -reflection::export(new reflectionfunction('ocicancel')); -reflection::export(new reflectionfunction('ocifetch')); -reflection::export(new reflectionfunction('ocifetchstatement')); -reflection::export(new reflectionfunction('ocifreestatement')); -reflection::export(new reflectionfunction('ociinternaldebug')); -reflection::export(new reflectionfunction('ocinumcols')); -reflection::export(new reflectionfunction('ociparse')); -reflection::export(new reflectionfunction('ocinewcursor')); -reflection::export(new reflectionfunction('ociresult')); -reflection::export(new reflectionfunction('ociserverversion')); -reflection::export(new reflectionfunction('ocistatementtype')); -reflection::export(new reflectionfunction('ocirowcount')); -reflection::export(new reflectionfunction('ocilogoff')); -reflection::export(new reflectionfunction('ocilogon')); -reflection::export(new reflectionfunction('ocinlogon')); -reflection::export(new reflectionfunction('ociplogon')); -reflection::export(new reflectionfunction('ocierror')); -reflection::export(new reflectionfunction('ocifreedesc')); -reflection::export(new reflectionfunction('ocisavelob')); -reflection::export(new reflectionfunction('ocisavelobfile')); -reflection::export(new reflectionfunction('ociwritelobtofile')); -reflection::export(new reflectionfunction('ociloadlob')); -reflection::export(new reflectionfunction('ocicommit')); -reflection::export(new reflectionfunction('ocirollback')); -reflection::export(new reflectionfunction('ocinewdescriptor')); -reflection::export(new reflectionfunction('ocisetprefetch')); -reflection::export(new reflectionfunction('ocipasswordchange')); -reflection::export(new reflectionfunction('ocifreecollection')); -reflection::export(new reflectionfunction('ocinewcollection')); -reflection::export(new reflectionfunction('ocicollappend')); -reflection::export(new reflectionfunction('ocicollgetelem')); -reflection::export(new reflectionfunction('ocicollassignelem')); -reflection::export(new reflectionfunction('ocicollsize')); -reflection::export(new reflectionfunction('ocicollmax')); -reflection::export(new reflectionfunction('ocicolltrim')); reflection::export(new reflectionfunction('oci_set_edition')); reflection::export(new reflectionfunction('oci_set_module_name')); reflection::export(new reflectionfunction('oci_set_action')); @@ -270,15 +223,6 @@ Function [ function oci_fetch_array ] { } } -Function [ function ocifetchinto ] { - - - Parameters [3] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ &$result ] - Parameter #2 [ $mode ] - } -} - Function [ function oci_fetch_all ] { - Parameters [5] { @@ -680,379 +624,6 @@ Function [ function oci_free_cursor ] { } } -Function [ function ocifreecursor ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function ocibindbyname ] { - - - Parameters [5] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_name ] - Parameter #2 [ &$variable ] - Parameter #3 [ $maximum_length ] - Parameter #4 [ $type ] - } -} - -Function [ function ocidefinebyname ] { - - - Parameters [4] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_name ] - Parameter #2 [ &$variable ] - Parameter #3 [ $type ] - } -} - -Function [ function ocicolumnisnull ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function ocicolumnname ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function ocicolumnsize ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function ocicolumnscale ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function ocicolumnprecision ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function ocicolumntype ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function ocicolumntyperaw ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function ociexecute ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $mode ] - } -} - -Function [ function ocicancel ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function ocifetch ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function ocifetchstatement ] { - - - Parameters [5] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ &$output ] - Parameter #2 [ $skip ] - Parameter #3 [ $maximum_rows ] - Parameter #4 [ $flags ] - } -} - -Function [ function ocifreestatement ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function ociinternaldebug ] { - - - Parameters [1] { - Parameter #0 [ $mode ] - } -} - -Function [ function ocinumcols ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function ociparse ] { - - - Parameters [2] { - Parameter #0 [ $connection_resource ] - Parameter #1 [ $sql_text ] - } -} - -Function [ function ocinewcursor ] { - - - Parameters [1] { - Parameter #0 [ $connection_resource ] - } -} - -Function [ function ociresult ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function ociserverversion ] { - - - Parameters [1] { - Parameter #0 [ $connection_resource ] - } -} - -Function [ function ocistatementtype ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function ocirowcount ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function ocilogoff ] { - - - Parameters [1] { - Parameter #0 [ $connection_resource ] - } -} - -Function [ function ocilogon ] { - - - Parameters [5] { - Parameter #0 [ $username ] - Parameter #1 [ $password ] - Parameter #2 [ $connection_string ] - Parameter #3 [ $character_set ] - Parameter #4 [ $session_mode ] - } -} - -Function [ function ocinlogon ] { - - - Parameters [5] { - Parameter #0 [ $username ] - Parameter #1 [ $password ] - Parameter #2 [ $connection_string ] - Parameter #3 [ $character_set ] - Parameter #4 [ $session_mode ] - } -} - -Function [ function ociplogon ] { - - - Parameters [5] { - Parameter #0 [ $username ] - Parameter #1 [ $password ] - Parameter #2 [ $connection_string ] - Parameter #3 [ $character_set ] - Parameter #4 [ $session_mode ] - } -} - -Function [ function ocierror ] { - - - Parameters [1] { - Parameter #0 [ $connection_or_statement_resource ] - } -} - -Function [ function ocifreedesc ] { - - - Parameters [1] { - Parameter #0 [ $lob_descriptor ] - } -} - -Function [ function ocisavelob ] { - - - Parameters [3] { - Parameter #0 [ $lob_descriptor ] - Parameter #1 [ $data ] - Parameter #2 [ $offset ] - } -} - -Function [ function ocisavelobfile ] { - - - Parameters [2] { - Parameter #0 [ $lob_descriptor ] - Parameter #1 [ $filename ] - } -} - -Function [ function ociwritelobtofile ] { - - - Parameters [4] { - Parameter #0 [ $lob_descriptor ] - Parameter #1 [ $filename ] - Parameter #2 [ $start ] - Parameter #3 [ $length ] - } -} - -Function [ function ociloadlob ] { - - - Parameters [1] { - Parameter #0 [ $lob_descriptor ] - } -} - -Function [ function ocicommit ] { - - - Parameters [1] { - Parameter #0 [ $connection_resource ] - } -} - -Function [ function ocirollback ] { - - - Parameters [1] { - Parameter #0 [ $connection_resource ] - } -} - -Function [ function ocinewdescriptor ] { - - - Parameters [2] { - Parameter #0 [ $connection_resource ] - Parameter #1 [ $type ] - } -} - -Function [ function ocisetprefetch ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $number_of_rows ] - } -} - -Function [ function ocipasswordchange ] { - - - Parameters [4] { - Parameter #0 [ $connection_resource_or_connection_string ] - Parameter #1 [ $username ] - Parameter #2 [ $old_password ] - Parameter #3 [ $new_password ] - } -} - -Function [ function ocifreecollection ] { - - - Parameters [1] { - Parameter #0 [ $collection ] - } -} - -Function [ function ocinewcollection ] { - - - Parameters [3] { - Parameter #0 [ $connection_resource ] - Parameter #1 [ $type_name ] - Parameter #2 [ $schema_name ] - } -} - -Function [ function ocicollappend ] { - - - Parameters [2] { - Parameter #0 [ $collection ] - Parameter #1 [ $value ] - } -} - -Function [ function ocicollgetelem ] { - - - Parameters [2] { - Parameter #0 [ $collection ] - Parameter #1 [ $index ] - } -} - -Function [ function ocicollassignelem ] { - - - Parameters [3] { - Parameter #0 [ $collection ] - Parameter #1 [ $index ] - Parameter #2 [ $value ] - } -} - -Function [ function ocicollsize ] { - - - Parameters [1] { - Parameter #0 [ $collection ] - } -} - -Function [ function ocicollmax ] { - - - Parameters [1] { - Parameter #0 [ $collection ] - } -} - -Function [ function ocicolltrim ] { - - - Parameters [2] { - Parameter #0 [ $collection ] - Parameter #1 [ $number ] - } -} - Function [ function oci_set_edition ] { - Parameters [1] { @@ -1097,5 +668,4 @@ Function [ function oci_get_implicit_resultset ] { - Parameters [1] { Parameter #0 [ $statement_resource ] } -} - +} \ No newline at end of file diff --git a/ext/oci8/tests/serverversion.phpt b/ext/oci8/tests/serverversion.phpt index d2a781e6a3..bf634a3be8 100644 --- a/ext/oci8/tests/serverversion.phpt +++ b/ext/oci8/tests/serverversion.phpt @@ -17,14 +17,10 @@ else { $v = oci_server_version($c); var_dump(str_replace("\n", "", $v)); -$v = ociserverversion($c); -var_dump(str_replace("\n", "", $v)); - echo "Done\n"; ?> --EXPECTF-- resource(%d) of type (oci8 connection) string(%d) "Oracle %s" -string(%d) "Oracle %s" Done diff --git a/ext/oci8/tests/statement_type_old.phpt b/ext/oci8/tests/statement_type_old.phpt deleted file mode 100644 index b095bc245f..0000000000 --- a/ext/oci8/tests/statement_type_old.phpt +++ /dev/null @@ -1,56 +0,0 @@ ---TEST-- -ocistatementtype() ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -resource(%d) of type (oci8 connection) -string(6) "SELECT" -string(6) "DELETE" -string(6) "INSERT" -string(6) "UPDATE" -string(4) "DROP" -string(6) "CREATE" -string(6) "CREATE" -string(5) "ALTER" -string(5) "BEGIN" -string(7) "DECLARE" -string(4) "CALL" -string(7) "UNKNOWN" -string(7) "UNKNOWN" -Done -- 2.40.0