-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6679 from morozov/remove-is-identifier-quoted
Disallow mixing qualified and unqualified names
- Loading branch information
Showing
6 changed files
with
76 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\DBAL\Schema\Exception; | ||
|
||
use Doctrine\DBAL\Schema\Name\OptionallyQualifiedName; | ||
use Doctrine\DBAL\Schema\SchemaException; | ||
use InvalidArgumentException; | ||
|
||
use function sprintf; | ||
|
||
/** @psalm-immutable */ | ||
class ImproperlyQualifiedName extends InvalidArgumentException implements SchemaException | ||
{ | ||
public static function fromUnqualifiedName(OptionallyQualifiedName $name): self | ||
{ | ||
return new self(sprintf('Schema uses qualified names, but %s is unqualified.', $name->toString())); | ||
} | ||
|
||
public static function fromQualifiedName(OptionallyQualifiedName $name): self | ||
{ | ||
return new self(sprintf('Schema uses unqualified names, but %s is qualified.', $name->toString())); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters