msphpsql icon indicating copy to clipboard operation
msphpsql copied to clipboard

Return Type of resource replace by class

Open jansor opened this issue 3 years ago • 4 comments

Hi,

I was wondering, as I understand the type of resource is something in the future version they going to deprecate/replace. Now when i was just playing around with CURL under PHP8.0 and saw following items in documentation.

image

The documentation is based for PHP Storm, but is their a similar implementation possible?

As an example that's direct from PHP: https://www.php.net/manual/en/class.curlhandle.php

As a future implementation towards 8.1 or next version, can we apply the same logic under the SQL system?

Just a suggestion

Thanks for all the hard work!!

jansor avatar Jun 11 '21 07:06 jansor

Thanks @jansor , and yes we are aware of the resource type going to be deprecated in the near future, but I'm not sure I understand your question.

Are you asking if we are going to define our own class(es) for sqlsrv/pdo_sqlsrv to communicate with SQL Server?

yitam avatar Jun 11 '21 20:06 yitam

Hi @yitam , i assume yes,

I don't know how to implement this but for future releases of the driver, add opaque class? Similar to CurlHandle?

final SqlSrvHandle{ }

Under the documentation part its then possible to add: image

This gives the advantage that we can define return types on methods and properties.

jansor avatar Jun 12 '21 04:06 jansor

Thanks @jansor for the suggestion. Currently there is no immediate plan for this, but I'll mark this as a feature request.

yitam avatar Jun 14 '21 15:06 yitam