1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 14:14:04 +00:00
tenancy/src/UUIDGenerator.php
Samuel Štancl dc430666ba
Add more tenant key generators (#36)
* Add RandomHexGenerator, create new namespace

* phpstan ignore

* add base64 generator

* add note about base64 being case sensitive

* docblock updates

* replace old UUIDGenerator with a class that throws an exception

* replace base64 generator with a random string generator

* Fix namespace

* Fix code style (php-cs-fixer)

* add test for the deprecated uuid generator

* update comments

---------

Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
2024-03-28 03:17:55 +01:00

18 lines
529 B
PHP

<?php
declare(strict_types=1);
namespace Stancl\Tenancy;
use Exception;
use Illuminate\Database\Eloquent\Model;
use Stancl\Tenancy\Contracts\UniqueIdentifierGenerator;
// todo@deprecation remove after 2024-04-12
class UUIDGenerator implements UniqueIdentifierGenerator
{
public static function generate(Model $model): string
{
throw new Exception('Tenancy update note: UUIDGenerator has been renamed to Stancl\Tenancy\UniqueIdentifierGenerators\UUIDGenerator. Please update your config/tenancy.php');
}
}