Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add php 8.2 compatibility #5

Merged
merged 1 commit into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.1
FROM php:8.2
WORKDIR /tmp/cassandra-php-driver

RUN apt update -y \
Expand Down Expand Up @@ -32,11 +32,16 @@ RUN ext/doc/generate_doc.sh
COPY composer.json .
RUN composer install -n

ARG CI
ENV CI=$CI

COPY support support
COPY tests tests
COPY phpunit.xml .
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/
RUN bin/phpunit --stop-on-error --stop-on-failure
RUN bin/phpunit --stop-on-error --stop-on-failure --testsuite unit
RUN bin/phpunit --stop-on-error --stop-on-failure --testsuite integration --exclude-group flaky
RUN bash -c "for i in {1..10}; do bin/phpunit --stop-on-error --stop-on-failure --testsuite integration --group flaky && exit 0 || sleep 1; done; exit 1;"

COPY features features
COPY behat.yml .
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
all: build
build:
docker build . -t cassandra-php-driver
docker build . -t cassandra-php-driver --build-arg CI=$(CI)
run:
docker run -v $$PWD/ext/doc:/tmp/cassandra-php-driver/ext/doc -it cassandra-php-driver
11 changes: 11 additions & 0 deletions behat.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
default:
formatters:
pretty: true
suites:
default:
filters:
tags: "[email protected]&&[email protected]&&~@broken"
contexts:
- FeatureContext:
cassandra_version: "4.1.0"

cassandra-version-3.11:
formatters:
pretty: true
suites:
Expand Down
18 changes: 13 additions & 5 deletions ext/php_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ typedef zend_object php7to8_object;
#define PHP7TO8_ARG_INFO_VOID_RETURN(arginfo) \
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo, 0, 0, IS_VOID, 0) \
ZEND_END_ARG_INFO()
#define PHP7TO8_ARG_INFO_STRING_RETURN(arginfo) \
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo, 0, 0, IS_STRING, 0) \
ZEND_END_ARG_INFO()
#define PHP7TO8_ARG_INFO_BOOL_RETURN(arginfo) \
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo, 0, 0, _IS_BOOL, 0) \
ZEND_END_ARG_INFO()
Expand Down Expand Up @@ -172,6 +175,9 @@ typedef zval php7to8_object;
#define PHP7TO8_ARG_INFO_VOID_RETURN(arginfo) \
ZEND_BEGIN_ARG_INFO_EX(arginfo, 0, ZEND_RETURN_VALUE, 0) \
ZEND_END_ARG_INFO()
#define PHP7TO8_ARG_INFO_STRING_RETURN(arginfo) \
ZEND_BEGIN_ARG_INFO_EX(arginfo, 0, ZEND_RETURN_VALUE, 0) \
ZEND_END_ARG_INFO()
#define PHP7TO8_ARG_INFO_BOOL_RETURN(arginfo) \
ZEND_BEGIN_ARG_INFO_EX(arginfo, 0, ZEND_RETURN_VALUE, 0) \
ZEND_END_ARG_INFO()
Expand Down Expand Up @@ -200,6 +206,12 @@ typedef zval php7to8_object;
ZEND_END_ARG_INFO()
#endif

#if ((PHP_MAJOR_VERSION == 8 && PHP_MINOR_VERSION >= 2) || PHP_MAJOR_VERSION > 8)
#define PHP7TO82_ZEND_KEY() __key ? __key->val : NULL
#else
#define PHP7TO82_ZEND_KEY() _p->key ? _p->key->val : NULL
#endif

#if PHP_MAJOR_VERSION >= 7
#define php5to7_zend_register_internal_class_ex(ce, parent_ce) zend_register_internal_class_ex((ce), (parent_ce) TSRMLS_CC);

Expand Down Expand Up @@ -276,11 +288,7 @@ php5to7_string_compare(php5to7_string s1, php5to7_string s2)

#define PHP5TO7_ZEND_HASH_FOREACH_STR_KEY_VAL(ht, _key, _val) \
ZEND_HASH_FOREACH(ht, 0); \
if (_p->key) { \
(_key) = _p->key->val; \
} else { \
(_key) = NULL; \
} \
_key = PHP7TO82_ZEND_KEY(); \
_val = _z;

#define PHP5TO7_ZEND_HASH_FOREACH_END(ht) ZEND_HASH_FOREACH_END()
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Bigint.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_num, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, num)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_bigint_methods[] = {
PHP_ME(Bigint, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Bigint, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Bigint, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Bigint, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Bigint, value, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Bigint, add, arginfo_num, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Blob.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_blob_methods[] = {
PHP_ME(Blob, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Blob, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Blob, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Blob, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Blob, bytes, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Blob, toBinaryString, arginfo_none, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Date.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,15 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_date_methods[] = {
PHP_ME(Date, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Date, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Date, seconds, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Date, toDateTime, arginfo_time, ZEND_ACC_PUBLIC)
PHP_ME(Date, fromDateTime, arginfo_datetime, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Date, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Date, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_FE_END
};

Expand Down
4 changes: 3 additions & 1 deletion ext/src/Decimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_num, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, num)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_decimal_methods[] = {
PHP_ME(Decimal, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Decimal, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Decimal, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Decimal, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Decimal, value, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Decimal, scale, arginfo_none, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Duration.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,15 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo__construct, 0, ZEND_RETURN_VALUE, 3)
ZEND_ARG_INFO(0, nanos)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_duration_methods[] = {
PHP_ME(Duration, __construct, arginfo__construct, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
PHP_ME(Duration, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Duration, months, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Duration, days, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Duration, nanos, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Duration, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Duration, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_FE_END
};

Expand Down
4 changes: 3 additions & 1 deletion ext/src/Float.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_num, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, num)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_float_methods[] = {
PHP_ME(Float, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Float, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Float, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Float, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Float, value, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Float, isInfinite, arginfo_none, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_inet_methods[] = {
PHP_ME(Inet, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Inet, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Inet, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Inet, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Inet, address, arginfo_none, ZEND_ACC_PUBLIC)
PHP_FE_END
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Smallint.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_num, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, num)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_smallint_methods[] = {
PHP_ME(Smallint, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Smallint, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Smallint, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Smallint, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Smallint, value, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Smallint, add, arginfo_num, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Time.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,14 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_time_methods[] = {
PHP_ME(Time, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Time, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Time, seconds, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Time, fromDateTime, arginfo_datetime, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Time, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Time, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_FE_END
};

Expand Down
4 changes: 3 additions & 1 deletion ext/src/Timestamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,15 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_timestamp_methods[] = {
PHP_ME(Timestamp, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Timestamp, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Timestamp, time, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Timestamp, microtime, arginfo_microtime, ZEND_ACC_PUBLIC)
PHP_ME(Timestamp, toDateTime, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Timestamp, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Timestamp, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_FE_END
};

Expand Down
4 changes: 3 additions & 1 deletion ext/src/Timeuuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,11 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_timeuuid_methods[] = {
PHP_ME(Timeuuid, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Timeuuid, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Timeuuid, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Timeuuid, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Timeuuid, uuid, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Timeuuid, version, arginfo_none, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Tinyint.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_num, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, num)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_tinyint_methods[] = {
PHP_ME(Tinyint, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Tinyint, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Tinyint, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Tinyint, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Tinyint, value, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Tinyint, add, arginfo_num, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Type.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_map, 0, ZEND_RETURN_VALUE, 2)
PHP_DRIVER_NAMESPACE_ZEND_ARG_OBJ_INFO(0, valueType, Type, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_type_methods[] = {
PHP_ABSTRACT_ME(Type, name, arginfo_none)
PHP_ABSTRACT_ME(Type, __toString, arginfo_none)
PHP_ABSTRACT_ME(Type, __toString, arginfo_string_return)

#define XX_SCALAR_METHOD(name, _) PHP_ME(Type, name, arginfo_none, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
PHP_DRIVER_SCALAR_TYPES_MAP(XX_SCALAR_METHOD)
Expand Down
3 changes: 2 additions & 1 deletion ext/src/Type/Collection.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_VARIADIC(arginfo_value, value)
PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_type_collection_methods[] = {
PHP_ME(TypeCollection, __construct, arginfo_none, ZEND_ACC_PRIVATE)
PHP_ME(TypeCollection, name, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeCollection, valueType, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeCollection, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeCollection, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(TypeCollection, create, arginfo_value, ZEND_ACC_PUBLIC)
PHP_FE_END
};
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Type/Custom.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_value, 0, ZEND_RETURN_VALUE, 0)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_type_custom_methods[] = {
PHP_ME(TypeCustom, __construct, arginfo_none, ZEND_ACC_PRIVATE)
PHP_ME(TypeCustom, name, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeCustom, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeCustom, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(TypeCustom, create, arginfo_value, ZEND_ACC_PUBLIC)
PHP_FE_END
};
Expand Down
3 changes: 2 additions & 1 deletion ext/src/Type/Map.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,14 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_VARIADIC(arginfo_value, value)
PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_type_map_methods[] = {
PHP_ME(TypeMap, __construct, arginfo_none, ZEND_ACC_PRIVATE)
PHP_ME(TypeMap, name, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeMap, keyType, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeMap, valueType, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeMap, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeMap, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(TypeMap, create, arginfo_value, ZEND_ACC_PUBLIC)
PHP_FE_END
};
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Type/Scalar.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_value, 0, ZEND_RETURN_VALUE, 0)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_type_scalar_methods[] = {
PHP_ME(TypeScalar, __construct, arginfo_none, ZEND_ACC_PRIVATE)
PHP_ME(TypeScalar, name, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeScalar, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeScalar, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(TypeScalar, create, arginfo_value, ZEND_ACC_PUBLIC)
PHP_FE_END
};
Expand Down
3 changes: 2 additions & 1 deletion ext/src/Type/Set.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_VARIADIC(arginfo_value, value)
PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_type_set_methods[] = {
PHP_ME(TypeSet, __construct, arginfo_none, ZEND_ACC_PRIVATE)
PHP_ME(TypeSet, name, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeSet, valueType, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeSet, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeSet, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(TypeSet, create, arginfo_value, ZEND_ACC_PUBLIC)
PHP_FE_END
};
Expand Down
3 changes: 2 additions & 1 deletion ext/src/Type/Tuple.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_VARIADIC(arginfo_values, values)
PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_type_tuple_methods[] = {
PHP_ME(TypeTuple, __construct, arginfo_none, ZEND_ACC_PRIVATE)
PHP_ME(TypeTuple, name, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeTuple, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeTuple, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(TypeTuple, types, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeTuple, create, arginfo_values, ZEND_ACC_PUBLIC)
PHP_FE_END
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Type/UserType.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,15 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_keyspace, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, keyspace)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_type_user_type_methods[] = {
PHP_ME(TypeUserType, __construct, arginfo_none, ZEND_ACC_PRIVATE)
PHP_ME(TypeUserType, withName, arginfo_name, ZEND_ACC_PUBLIC)
PHP_ME(TypeUserType, name, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeUserType, withKeyspace, arginfo_keyspace, ZEND_ACC_PUBLIC)
PHP_ME(TypeUserType, keyspace, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeUserType, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeUserType, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(TypeUserType, types, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeUserType, create, arginfo_value, ZEND_ACC_PUBLIC)
PHP_FE_END
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Uuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_uuid_methods[] = {
PHP_ME(Uuid, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Uuid, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Uuid, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Uuid, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Uuid, uuid, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Uuid, version, arginfo_none, ZEND_ACC_PUBLIC)
Expand Down
Loading