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

Add return type information to final classes

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.15.0
    • Affects Version/s: None
    • Component/s: None
    • None

      Since most of the classes in the MongoDB namespace, we can start adding return type information to the zend_arginfo struct. This can be done by replacing ZEND_BEGIN_ARG_INFO with either ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO (PHP 7.4+) or ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO (PHP 7.0+) as appropriate.

      On PHP 8 and later, we can also make use of union types. This should be done conditionally when compiling for PHP 8.

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            andreas.braun@mongodb.com Andreas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: