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

Assertion enhancements regarding value-of in combination with backed enums #10150

Merged
merged 10 commits into from
Aug 25, 2023

Commits on Aug 25, 2023

  1. qa: add test to verify backed enums are no literals

    Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
    boesing committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    22bcd57 View commit details
    Browse the repository at this point in the history
  2. bugfix: prevent enums from being detected as literals

    Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
    boesing committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    31eaf83 View commit details
    Browse the repository at this point in the history
  3. feature: introducing proper handling of value-of in combination wit…

    …h backed enums
    
    This introduces both:
    - a bugfix for a regression introduced by `31eaf83c4` which prevents backed enums are incorrectly identified as literals
    - an additional feature so that `value-of` can be used with backed enums to assert any of the enum cases values
    
    Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
    boesing committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    5948559 View commit details
    Browse the repository at this point in the history
  4. qa: apply coding standard

    Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
    boesing committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    6c1899d View commit details
    Browse the repository at this point in the history
  5. bugfix: remove atomic type comparator regarding TEnumCase

    Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
    boesing committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    cd3e294 View commit details
    Browse the repository at this point in the history
  6. qa: resolving psalm issues

    - remove unused variable
    - add assertion to reduce possible types from `TEnumCase`
    - use `TypeCombiner` to provide proper `Union` containing all literals
    
    Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
    boesing committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    f93ac70 View commit details
    Browse the repository at this point in the history
  7. qa: ensure that we do have at least one enum case extracted from the …

    …`value-of<Enum>` usage
    
    Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
    boesing committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    a8bb8d3 View commit details
    Browse the repository at this point in the history
  8. qa: re-arrange code to avoid line-length limit of 120 chars

    Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
    boesing committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    a6b646f View commit details
    Browse the repository at this point in the history
  9. qa: add proper parameter type-hint to suit psalm analysis

    Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
    boesing committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    e985e8a View commit details
    Browse the repository at this point in the history
  10. Update src/Psalm/Type.php

    weirdan committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    ad0a132 View commit details
    Browse the repository at this point in the history