Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-2460

Replace PHONGO_ZVAL_CLASS_OR_TYPE_NAME macro with zend_zval_type_name

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.21.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • PHP Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P macro in php_phongo.h can be replaced with zend_zval_type_name(). There is also a zend_zval_value_name() macro (since php/php-src@7936c80), but that is only available in PHP 8.3+.

      PHONGO_ZVAL_CLASS_OR_TYPE_NAME can simply be removed, as that macro was only ever called with a dereferenced zval pointer.

      Note that zend_zval_type_name() also applies ZVAL_DEREF to resolve zval references automatically, which is relevant to some recent issues discovered in PHPC-2457.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: