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

Explicitly define C constant values in stubs when using @cvalue annotations

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      When referring to C constants in stubs, PHPC typically uses @cvalue <constant> within a doc block and then defines the actual constant as "UNKNOWN". If we replace "UNKNOWN" with the C constant's defined value, gen_stub.php will generate logic to assert consistency at runtime and we'll be prepared for future improvements that may utilize stubs to generate documentation.

      This came out of mongodb/mongo-php-driver/pull#1395 for PHPC-2180.

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

              Created:
              Updated: