pdt icon indicating copy to clipboard operation
pdt copied to clipboard

Oracle OCI types are incorrect

Open ghost opened this issue 3 years ago • 1 comments

Describe the bug PDT recognises OCI_Collection - which is not a valid OCI type PDT doesn't recognise OCICollection - which is the valid type

Please can the list of valid Eclipse types be updated to correctly recognise the Oracle OCI types

Describe the eclipse environment 2021-12

Describe your system Windows 10 - PHP 8.1

To Reproduce final public static function collectionToArray(OCICollection $OCIcollection) : array {

Eclipse will "zigzag" OCICollection and fail to resolve it to a type. This is incorrect as the script executes perfectly.

On the other hand, Eclipse will recognise OCI_Collection as a valid type. But execution of the script will fail as the type is invalid

Expected behavior Eclipse PDT should recognise the OCICollection type as a valid type.

Screenshots image

Additional context Add any other context about the problem here.

ghost avatar Feb 22 '22 22:02 ghost

OCI-Collection was renamed OCICollection in PHP 8. PDT doesn't yet formally support PHP 8. That being said, it looks like there was an error in the naming before given that it should have been OCI-Collection not OCI_Collection, despite the usual PHP conventions.

agmckee avatar Feb 23 '22 08:02 agmckee

Unfortunately I'm not able to generate correct oci8.php stubs, because this extension not work on M1

I'll try to do this before release

zulus avatar May 20 '23 17:05 zulus

What about using docker? PS: you can easily install PHP extensions in docker images with my https://github.com/mlocati/docker-php-extension-installer

mlocati avatar May 20 '23 17:05 mlocati

hmm this might be an option. Instant client in theory works with aarch64

zulus avatar May 20 '23 17:05 zulus

Yep, it should work with aarch64 - see https://github.com/mlocati/docker-php-extension-installer/blob/master/install-php-extensions#L1862

mlocati avatar May 20 '23 17:05 mlocati