You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library is used by Google Cloud APIs (BigQuery in particular). When this library is imported as part of a standalone build, the Nonstandard namespace conflicts with itself.
Description
Ramsey\Uuid\Nonstandard creates a Uuid class that conflicts with Ramsey\Uuid\Uuid when use Ramsey\Uuid\Uuid is encountered later in the same namespace by PHP because "Uuid" is already defined as a class. PHP has no idea which class to use and so it throws up a Fatal error.
Steps to reproduce
Run PHP Decomposer to generate a standalone build of Google Cloud BigQuery.
Get this lovely and very confusing error message when linting the output: PHP Fatal error: Cannot use Ramsey\Uuid\Uuid as Uuid because the name is already in use in C:\php-decomposer\projects\google-cloud-apis\final\google-cloud-apis_decomposed.php on line 47783.
Expected behavior
Non-conflicting namespace and class names.
Suggested fix
In vendor\ramsey\uuid\src\Nonstandard\UuidV6.php, change:
use Ramsey\Uuid\Uuid;
class UuidV6 extends Uuid implements UuidInterface
To:
use Ramsey\Uuid\Uuid as BaseUuid;
class UuidV6 extends BaseUuid implements UuidInterface
The text was updated successfully, but these errors were encountered:
This library is used by Google Cloud APIs (BigQuery in particular). When this library is imported as part of a standalone build, the Nonstandard namespace conflicts with itself.
Description
Ramsey\Uuid\Nonstandard
creates aUuid
class that conflicts withRamsey\Uuid\Uuid
whenuse Ramsey\Uuid\Uuid
is encountered later in the same namespace by PHP because "Uuid" is already defined as a class. PHP has no idea which class to use and so it throws up a Fatal error.Steps to reproduce
PHP Fatal error: Cannot use Ramsey\Uuid\Uuid as Uuid because the name is already in use in C:\php-decomposer\projects\google-cloud-apis\final\google-cloud-apis_decomposed.php on line 47783
.Expected behavior
Non-conflicting namespace and class names.
Suggested fix
In
vendor\ramsey\uuid\src\Nonstandard\UuidV6.php
, change:To:
The text was updated successfully, but these errors were encountered: