mark release as stable and updates php requirement (#94)

This commit is contained in:
Dengke Tang
2023-03-16 14:08:44 -07:00
committed by GitHub
parent c4ea24d822
commit ed3f8ca16d
5 changed files with 24 additions and 18 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
<dependencies>
<required>
<php>
<min>7.4.0</min>
<min>5.5.0</min>
</php>
<pearinstaller>
<min>1.10.0</min>
+1 -1
View File
@@ -16,7 +16,7 @@
<api>1.0.0</api>
</version>
<stability>
<release>devel</release>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="https://www.apache.org/licenses/LICENSE-2.0">Apache License Version 2.0</license>
+11 -5
View File
@@ -47,14 +47,20 @@ os.chdir(WORK_DIR)
run(['git', 'submodule', 'update', '--init', '--recursive'])
# replace the version number in the ext/crt.c file
# replace the version number in the file_with_version
data = ""
with open("ext/crt.c", "r") as c_file:
file_with_version = "ext/php_aws_crt.h"
with open(file_with_version, "r") as c_file:
for line in c_file:
line = re.sub("#define CRT_VERSION .*",
f"#define CRT_VERSION \"{VERSION}\"", line)
if "define PHP_AWSCRT_VERSION" in line:
line = re.sub("define PHP_AWSCRT_VERSION .*",
f"define PHP_AWSCRT_VERSION \"{VERSION}\"", line)
if VERSION not in line:
sys.exit(
f"check {file_with_version}, the version number was not updated correctly.")
data += line
with open("ext/crt.c", "w") as c_file:
with open(file_with_version, "w") as c_file:
c_file.write(data)
+1 -3
View File
@@ -263,8 +263,6 @@ static PHP_GINIT_FUNCTION(awscrt) {
awscrt_globals->log_level = 0;
}
#define CRT_VERSION "1.0.4"
zend_module_entry awscrt_module_entry = {
STANDARD_MODULE_HEADER,
"awscrt",
@@ -274,7 +272,7 @@ zend_module_entry awscrt_module_entry = {
NULL, /* RINIT */
NULL, /* RSHUTDOWN */
NULL, /* MINFO */
CRT_VERSION,
PHP_AWSCRT_VERSION,
PHP_MODULE_GLOBALS(awscrt),
PHP_GINIT(awscrt),
NULL, /* GSHUTDOWN */
+10 -8
View File
@@ -37,6 +37,8 @@
#define AWS_PHP_AT_LEAST_7 (ZEND_EXTENSION_API_NO >= AWS_PHP_EXTENSION_API_7_0)
#define AWS_PHP_AT_LEAST_7_2 (ZEND_EXTENSION_API_NO >= AWS_PHP_EXTENSION_API_7_2)
#define PHP_AWSCRT_VERSION "1.1.0"
ZEND_BEGIN_MODULE_GLOBALS(awscrt)
long log_level;
ZEND_END_MODULE_GLOBALS(awscrt)
@@ -48,16 +50,16 @@ ZEND_EXTERN_MODULE_GLOBALS(awscrt)
#if AWS_PHP_AT_LEAST_7
/* PHP 7 takes a zval*, PHP5 takes a zval** */
# define AWS_PHP_STREAM_FROM_ZVAL(s, z) php_stream_from_zval(s, z)
#define XRETURN_STRINGL RETURN_STRINGL
#define XRETURN_STRING RETURN_STRING
#define XRETVAL_STRINGL RETVAL_STRINGL
#define XRETVAL_STRING RETVAL_STRING
# define XRETURN_STRINGL RETURN_STRINGL
# define XRETURN_STRING RETURN_STRING
# define XRETVAL_STRINGL RETVAL_STRINGL
# define XRETVAL_STRING RETVAL_STRING
#else /* PHP 5.5-5.6 */
# define AWS_PHP_STREAM_FROM_ZVAL(s, z) php_stream_from_zval(s, &z)
#define XRETURN_STRINGL(s, l) RETURN_STRINGL(s, l, 1)
#define XRETURN_STRING(s) RETURN_STRING(s, 1)
#define XRETVAL_STRINGL(s, l) RETVAL_STRINGL(s, l, 1)
#define XRETVAL_STRING(s) RETVAL_STRING(s, 1)
# define XRETURN_STRINGL(s, l) RETURN_STRINGL(s, l, 1)
# define XRETURN_STRING(s) RETURN_STRING(s, 1)
# define XRETVAL_STRINGL(s, l) RETVAL_STRINGL(s, l, 1)
# define XRETVAL_STRING(s) RETVAL_STRING(s, 1)
#endif /* PHP 5.x */
#include "api.h"