Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-599

Backwards compatible typing changes

    • Type: Icon: Epic Epic
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.15.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • 4
    • 4
    • 4
    • 100
    • Hide

      2022-10-04: Setting Target End Date to 2022-10-07

      Engineer: Andreas Braun

      • Typing improvements for PHPLib are mostly completed
      • 2 changes currently in Code Review

      Rationale for Delays:

      • None

      Risks:

      • N/A
      Show
      2022-10-04: Setting Target End Date to 2022-10-07 Engineer: Andreas Braun Typing improvements for PHPLib are mostly completed 2 changes currently in Code Review Rationale for Delays: None Risks: N/A

      Epic Summary

      Note: this mirrors changes tracked in PHPC-1709.

      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:
            Unassigned Unassigned
            Reporter:
            andreas.braun@mongodb.com Andreas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              4 weeks, 4 days