Skip to content

[Bug] [Notifier] [Mailer] getOriginalDsn() cannot be used when Dsn is instantiated via new Dsn() #39533

@OskarStark

Description

@OskarStark

Originally posted by @OskarStark in #39457 (comment)

Oh I've done that, but we have a "bigger" problem here.

public function getOriginalDsn(): string
{
return $this->dsn;
}

should return string, but it contains null whenever you instantiate the Dsn class vie new instead of fromString()

$dsnObject = new self($parsedDsn['scheme'], $parsedDsn['host'], $user, $password, $port, $query, $path);
$dsnObject->dsn = $dsn;

One option could be to change the return type to ?string or make the constructor private and only instantiate through fromString. Currently new Dsn(...) is only used in tests. 🤔

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions