Skip to content

Not working with type hints of "Union Types" and "Intersection Types" #481

@bluedasher13

Description

@bluedasher13
<?php

use App\Models\Bar1;
use App\Models\Bar2;
use App\Models\Bar3;

class Foo
{
    public function __construct(array|Bar1 $bar = null)
    {
    }
}

"Using type hints of "Union Types" or "Intersection Types" such as array|Bar1 or Bar1&Bar2 can cause the highlighting of the entire PHP file to malfunction."

image
image
image

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions