Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid exceptions on fetching uninitialized names in ClassLikes #10730

Closed
wants to merge 3 commits into from

Commits on Feb 20, 2024

  1. Configuration menu
    Copy the full SHA
    b0e6db1 View commit details
    Browse the repository at this point in the history
  2. Avoid exceptions on fetching uninitialized names in ClassLikes

    Similar to the behavior of `ClassLikes::classImplements()` (vimeo#5984),
    the following methods will return a false/empty value in case a
    specific class name has not been initialized yet:
    
    + `ClassLikes::classExtends()` returns `false`
    + `ClassLikes::getParentInterfaces()` returns `[]`
    ohader committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    93e2c3e View commit details
    Browse the repository at this point in the history
  3. Drop relying on class-like storage exceptions in CallMap tests

    Since the method `ClassLikes::classExtends()` is not throwning an
    exception anymore for unknown class names, the `CallMap` tests had
    to be adjusted to make the tested behavior a bit more explicit.
    
    Previously any class name that was unknown to the class-like storage
    of PsalmPHP, which however was existing in the native PHP scope
    (classes, interfaces or enums) was alread enough to make the
    type comparison succeed...
    ohader committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    f80f840 View commit details
    Browse the repository at this point in the history