Skip to content

Commit

Permalink
Rename OCI8 classes to use standard names so arg stub parsing works
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbj committed Jul 20, 2020
1 parent 8058776 commit 74ca2a3
Show file tree
Hide file tree
Showing 44 changed files with 118 additions and 113 deletions.
4 changes: 2 additions & 2 deletions ext/oci8/oci8.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ PHP_MINIT_FUNCTION(oci)
le_descriptor = zend_register_list_destructors_ex(php_oci_descriptor_list_dtor, NULL, "oci8 descriptor", module_number);
le_collection = zend_register_list_destructors_ex(php_oci_collection_list_dtor, NULL, "oci8 collection", module_number);

INIT_CLASS_ENTRY(oci_lob_class_entry, "OCI-Lob", class_OCI_Lob_methods);
INIT_CLASS_ENTRY(oci_coll_class_entry, "OCI-Collection", class_OCI_Collection_methods);
INIT_CLASS_ENTRY(oci_lob_class_entry, "OCI_Lob", class_OCI_Lob_methods);
INIT_CLASS_ENTRY(oci_coll_class_entry, "OCI_Collection", class_OCI_Collection_methods);

oci_lob_class_entry_ptr = zend_register_internal_class(&oci_lob_class_entry);
oci_coll_class_entry_ptr = zend_register_internal_class(&oci_coll_class_entry);
Expand Down
4 changes: 4 additions & 0 deletions ext/oci8/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ Oracle's standard cross-version connectivity applies. For example, PHP OCI8 lin

Removed obsolete no-op function oci_internal_debug(). (Jens de Nies)

The OCI-Lob class is now called OCI_Lob.

The OCI-Collection calls is now called OCI_Collection.

Generate arginfo from function stubs. (Jens de Nies)
</notes>
<contents>
Expand Down
2 changes: 1 addition & 1 deletion ext/oci8/tests/bug35973.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ echo "Done\n";
--EXPECTF--
array(1) {
["NC"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand Down
4 changes: 2 additions & 2 deletions ext/oci8/tests/bug44008.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #44008 (Incorrect usage of OCI-Lob->close crashes PHP)
Bug #44008 (Incorrect usage of OCI_Lob->close crashes PHP)
--SKIPIF--
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
Expand Down Expand Up @@ -30,7 +30,7 @@ $r = $textLob->load();
echo "$r\n";

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

// Cleanup
Expand Down
2 changes: 1 addition & 1 deletion ext/oci8/tests/coll_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ require __DIR__."/drop_type.inc";

?>
--EXPECTF--
object(OCI-Collection)#%d (1) {
object(OCI_Collection)#%d (1) {
["collection"]=>
resource(%d) of type (oci8 collection)
}
Expand Down
4 changes: 2 additions & 2 deletions ext/oci8/tests/coll_002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ require __DIR__."/drop_type.inc";

?>
--EXPECTF--
object(OCI-Collection)#%d (1) {
object(OCI_Collection)#%d (1) {
["collection"]=>
resource(%d) of type (oci8 collection)
}
bool(true)
string(%d) "OCI-Collection::size(): supplied resource is not a valid oci8 collection resource"
string(%d) "OCI_Collection::size(): supplied resource is not a valid oci8 collection resource"

Warning: oci_new_collection(): OCI-22303: type ""."NONEXISTENT" not found in %s on line %d
bool(false)
Expand Down
2 changes: 1 addition & 1 deletion ext/oci8/tests/coll_002_func.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ require __DIR__."/drop_type.inc";

?>
--EXPECTF--
object(OCI-Collection)#%d (1) {
object(OCI_Collection)#%d (1) {
["collection"]=>
resource(%d) of type (oci8 collection)
}
Expand Down
2 changes: 1 addition & 1 deletion ext/oci8/tests/coll_003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require __DIR__."/drop_type.inc";
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
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)
Expand Down
2 changes: 1 addition & 1 deletion ext/oci8/tests/coll_009.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ require __DIR__."/drop_type.inc";

?>
--EXPECTF--
Warning: OCI-Collection::append(): OCI-01861: literal does not match format string in %s on line %d
Warning: OCI_Collection::append(): OCI-01861: literal does not match format string in %s on line %d
bool(false)
bool(true)
bool(false)
Expand Down
4 changes: 2 additions & 2 deletions ext/oci8/tests/coll_016.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ require __DIR__."/drop_type.inc";
--EXPECTF--
bool(true)

Warning: OCI-Collection::assignelem(): OCI-22165: given index [%d] must be in the range of %s to [0] in %s on line %d
Warning: OCI_Collection::assignelem(): OCI-22165: given index [%d] must be in the range of %s to [0] in %s on line %d
bool(false)

Warning: OCI-Collection::assignelem(): OCI-22165: given index [5000] must be in the range of %s to [0] in %s on line %d
Warning: OCI_Collection::assignelem(): OCI-22165: given index [5000] must be in the range of %s to [0] in %s on line %d
bool(false)
bool(false)
bool(false)
Expand Down
14 changes: 7 additions & 7 deletions ext/oci8/tests/coll_019.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -75,33 +75,33 @@ echo "Done\n";
--EXPECTF--
Test 0

Notice: OCI-Collection::append(): Unknown or unsupported type of element: 113 in %s on line %d
Notice: OCI_Collection::append(): Unknown or unsupported type of element: 113 in %s on line %d
bool(false)

Notice: OCI-Collection::assignelem(): Unknown or unsupported type of element: 113 in %s on line %d
Notice: OCI_Collection::assignelem(): Unknown or unsupported type of element: 113 in %s on line %d
bool(false)
bool(false)
Test 1

Warning: OCI-Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
Warning: OCI_Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
bool(false)
bool(false)
Test 2

Warning: OCI-Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
Warning: OCI_Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
bool(false)
bool(false)
Test 3

Warning: OCI-Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
Warning: OCI_Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
bool(false)
bool(false)
Test 4

Warning: OCI-Collection::append(): OCI-01840: input value not long enough for date format in %s on line %d
Warning: OCI_Collection::append(): OCI-01840: input value not long enough for date format in %s on line %d
bool(false)

Warning: OCI-Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
Warning: OCI_Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
bool(false)
bool(false)
Done
4 changes: 2 additions & 2 deletions ext/oci8/tests/define3.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ string(32) "614fcbba1effb7caa27ef0ef25c27fcf"
string(32) "06d4f219d946c74d748d43932cd9dcb2"
Test 1
bool(true)
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
file md5:614fcbba1effb7caa27ef0ef25c27fcf
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand Down
2 changes: 1 addition & 1 deletion ext/oci8/tests/descriptors.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ echo "Done\n";
--EXPECTF--
array(1) {
["BLOB"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand Down
6 changes: 3 additions & 3 deletions ext/oci8/tests/fetch_object_2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ object(stdClass)#%d (3) {
["COL1"]=>
string(3) "123"
["COL2"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand All @@ -80,7 +80,7 @@ object(stdClass)#%d (3) {
["COL1"]=>
string(3) "456"
["COL2"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand All @@ -91,7 +91,7 @@ object(stdClass)#%d (3) {
["COL1"]=>
string(3) "789"
["COL2"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand Down
Binary file modified ext/oci8/tests/lob_001.phpt
Binary file not shown.
2 changes: 1 addition & 1 deletion ext/oci8/tests/lob_002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ oci8_test_sql_execute($c, $stmtarray);

?>
--EXPECTF--
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand Down
Binary file modified ext/oci8/tests/lob_003.phpt
Binary file not shown.
6 changes: 3 additions & 3 deletions ext/oci8/tests/lob_004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ echo "Done\n";

?>
--EXPECTF--
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand All @@ -67,12 +67,12 @@ int(3)
bool(true)
array(2) {
[0]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
["BLOB"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand Down
4 changes: 2 additions & 2 deletions ext/oci8/tests/lob_005.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ echo "Done\n";
--EXPECTF--
array(2) {
[0]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
["BLOB"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand Down
Binary file modified ext/oci8/tests/lob_006.phpt
Binary file not shown.
6 changes: 3 additions & 3 deletions ext/oci8/tests/lob_007.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ echo "Done\n";

?>
--EXPECTF--
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand All @@ -54,12 +54,12 @@ int(7000)
int(7000)
array(2) {
[0]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
["BLOB"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand Down
6 changes: 3 additions & 3 deletions ext/oci8/tests/lob_008.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ echo "Done\n";

?>
--EXPECTF--
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
int(7000)
array(2) {
[0]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
["BLOB"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand Down
6 changes: 3 additions & 3 deletions ext/oci8/tests/lob_009.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@ echo "Done\n";

?>
--EXPECTF--
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
bool(true)
bool(true)
array(2) {
[0]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
["BLOB"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand Down
4 changes: 2 additions & 2 deletions ext/oci8/tests/lob_016.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ echo "Done\n";
--EXPECTF--
array(2) {
["LOB_1"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
["LOB_2"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand Down
4 changes: 2 additions & 2 deletions ext/oci8/tests/lob_017.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ echo "Done\n";
--EXPECTF--
array(2) {
["LOB_1"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
["LOB_2"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand Down
Binary file modified ext/oci8/tests/lob_019.phpt
Binary file not shown.
Binary file modified ext/oci8/tests/lob_020.phpt
Binary file not shown.
2 changes: 1 addition & 1 deletion ext/oci8/tests/lob_021.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int(4)
bool(true)
int(4)
bool(true)
string(%d) "OCI-Lob::write(): %s is not a valid oci8 descriptor resource"
string(%d) "OCI_Lob::write(): %s is not a valid oci8 descriptor resource"
string(%d) "oci_free_descriptor(): %s is not a valid oci8 descriptor resource"

Warning: oci_free_descriptor(): Unable to find descriptor property in %s on line %d
Expand Down
2 changes: 1 addition & 1 deletion ext/oci8/tests/lob_022.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ echo "Done\n";
?>
--EXPECTF--

Warning: OCI-Lob::save(): Offset parameter must be greater than or equal to 0 in %s on line %d
Warning: OCI_Lob::save(): Offset parameter must be greater than or equal to 0 in %s on line %d
string(4) "data"
string(9) "long data"
string(9) "long data"
Expand Down
6 changes: 3 additions & 3 deletions ext/oci8/tests/lob_023.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ echo "Done\n";

?>
--EXPECTF--
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand All @@ -59,12 +59,12 @@ Warning: oci_lob_import(): Unable to find descriptor property in %s on line %d
bool(false)
array(2) {
[0]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
["BLOB"]=>
object(OCI-Lob)#%d (1) {
object(OCI_Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Expand Down

0 comments on commit 74ca2a3

Please sign in to comment.