• Type: Icon: Epic Epic
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.15.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Done
    • Improve PHPC Typing

      Epic Summary

      Summary
      The following typing improvements have been made since PHP 7.0:

      • Introduction of scalar type and return types for methods (PHP 7.0)
      • Nullable types and void return type (PHP 7.1)
      • object type for arguments and return values (PHP 7.2)
      • Union types (PHP 8.0)

      Motivation
      There is a push in the PHP ecosystem to use stricter typing when writing PHP code. While this is not as important for PHP extensions such as PHPC, it provides users with a sense of security in that argument types and return types are not only specified in documentation, but also set in code. Introducing such types can cause BC breaks when method signatures change, so these changes should be done with care to prevent unnecessary breakage in user projects that rely on this code.

      Cast of Characters

      Engineering Lead:
      Document Author:
      POCers:
      Product Owner:
      Program Manager:
      Stakeholders:

      Documentation

      [Scope Document|some.url]
      [Technical Design Document|some.url]

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

              Created:
              Updated:
              Resolved: