Skip to content

Commit

Permalink
Use double quote for enum
Browse files Browse the repository at this point in the history
Workaround to php/php-src#12063
  • Loading branch information
remicollet committed Aug 28, 2023
1 parent 22c5bcd commit b839fd3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/php/classes/locale_week_info_arginfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ static zend_class_entry *register_class_Ecma_Intl_Locale_WeekInfo(zend_class_ent
class_entry->ce_flags |= ZEND_ACC_READONLY_CLASS;
zend_class_implements(class_entry, 1, class_entry_JsonSerializable);

zend_string *property_firstDay_class_Ecma_Intl_Locale_WeekDay = zend_string_init("Ecma\\Intl\\Locale\\WeekDay", sizeof("Ecma\\Intl\\Locale\\WeekDay")-1, 1);
zval property_firstDay_default_value;
ZVAL_UNDEF(&property_firstDay_default_value);
zend_string *property_firstDay_name = zend_string_init("firstDay", sizeof("firstDay") - 1, 1);
zend_string *property_firstDay_class_Ecma_Intl_Locale_WeekDay = zend_string_init("Ecma\\Intl\\Locale\\WeekDay", sizeof("Ecma\\Intl\\Locale\\WeekDay")-1, 1);
zend_declare_typed_property(class_entry, property_firstDay_name, &property_firstDay_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_firstDay_class_Ecma_Intl_Locale_WeekDay, 0, 0));
zend_string_release(property_firstDay_name);

Expand Down
16 changes: 8 additions & 8 deletions src/php/ecma_intl.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ private function __construct()
*/
enum Category: string
{
case Calendar = 'calendar';
case Collation = 'collation';
case Currency = 'currency';
case NumberingSystem = 'numberingSystem';
case TimeZone = 'timeZone';
case Unit = 'unit';
case Calendar = "calendar";
case Collation = "collation";
case Currency = "currency";
case NumberingSystem = "numberingSystem";
case TimeZone = "timeZone";
case Unit = "unit";
}
/**
Expand Down Expand Up @@ -530,8 +530,8 @@ public function toString(): string
*/
enum CharacterDirection: string
{
case LeftToRight = 'ltr';
case RightToLeft = 'rtl';
case LeftToRight = "ltr";
case RightToLeft = "rtl";
}

/**
Expand Down
8 changes: 4 additions & 4 deletions src/php/ecma_intl_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 072a04a13d5217758e021d976cd7ca954937a184 */
* Stub hash: 11bd1b4bc7dde6dc1911c6e13b57af946558dd88 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Ecma_Intl_getCanonicalLocales, 0, 1, IS_ARRAY, 0)
ZEND_ARG_OBJ_TYPE_MASK(0, locales, Traversable|Stringable, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, NULL)
Expand Down Expand Up @@ -332,10 +332,10 @@ static zend_class_entry *register_class_Ecma_Intl_Locale(zend_class_entry *class
zend_declare_typed_property(class_entry, property_script_name, &property_script_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING|MAY_BE_NULL));
zend_string_release(property_script_name);

zend_string *property_textInfo_class_Ecma_Intl_Locale_TextInfo = zend_string_init("Ecma\\Intl\\Locale\\TextInfo", sizeof("Ecma\\Intl\\Locale\\TextInfo")-1, 1);
zval property_textInfo_default_value;
ZVAL_UNDEF(&property_textInfo_default_value);
zend_string *property_textInfo_name = zend_string_init("textInfo", sizeof("textInfo") - 1, 1);
zend_string *property_textInfo_class_Ecma_Intl_Locale_TextInfo = zend_string_init("Ecma\\Intl\\Locale\\TextInfo", sizeof("Ecma\\Intl\\Locale\\TextInfo")-1, 1);
zend_declare_typed_property(class_entry, property_textInfo_name, &property_textInfo_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_textInfo_class_Ecma_Intl_Locale_TextInfo, 0, 0));
zend_string_release(property_textInfo_name);

Expand All @@ -345,10 +345,10 @@ static zend_class_entry *register_class_Ecma_Intl_Locale(zend_class_entry *class
zend_declare_typed_property(class_entry, property_timeZones_name, &property_timeZones_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ARRAY|MAY_BE_NULL));
zend_string_release(property_timeZones_name);

zend_string *property_weekInfo_class_Ecma_Intl_Locale_WeekInfo = zend_string_init("Ecma\\Intl\\Locale\\WeekInfo", sizeof("Ecma\\Intl\\Locale\\WeekInfo")-1, 1);
zval property_weekInfo_default_value;
ZVAL_UNDEF(&property_weekInfo_default_value);
zend_string *property_weekInfo_name = zend_string_init("weekInfo", sizeof("weekInfo") - 1, 1);
zend_string *property_weekInfo_class_Ecma_Intl_Locale_WeekInfo = zend_string_init("Ecma\\Intl\\Locale\\WeekInfo", sizeof("Ecma\\Intl\\Locale\\WeekInfo")-1, 1);
zend_declare_typed_property(class_entry, property_weekInfo_name, &property_weekInfo_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_weekInfo_class_Ecma_Intl_Locale_WeekInfo, 0, 0));
zend_string_release(property_weekInfo_name);

Expand Down Expand Up @@ -447,10 +447,10 @@ static zend_class_entry *register_class_Ecma_Intl_Locale_TextInfo(zend_class_ent
class_entry->ce_flags |= ZEND_ACC_READONLY_CLASS;
zend_class_implements(class_entry, 1, class_entry_JsonSerializable);

zend_string *property_direction_class_Ecma_Intl_Locale_CharacterDirection = zend_string_init("Ecma\\Intl\\Locale\\CharacterDirection", sizeof("Ecma\\Intl\\Locale\\CharacterDirection")-1, 1);
zval property_direction_default_value;
ZVAL_UNDEF(&property_direction_default_value);
zend_string *property_direction_name = zend_string_init("direction", sizeof("direction") - 1, 1);
zend_string *property_direction_class_Ecma_Intl_Locale_CharacterDirection = zend_string_init("Ecma\\Intl\\Locale\\CharacterDirection", sizeof("Ecma\\Intl\\Locale\\CharacterDirection")-1, 1);
zend_declare_typed_property(class_entry, property_direction_name, &property_direction_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_direction_class_Ecma_Intl_Locale_CharacterDirection, 0, 0));
zend_string_release(property_direction_name);

Expand Down

0 comments on commit b839fd3

Please sign in to comment.