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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: