From 1bc70337dbb96821a8dc2e6878e196c469bff468 Mon Sep 17 00:00:00 2001 From: kafkiansky Date: Sun, 27 Sep 2026 16:29:00 +0300 Subject: [PATCH] Change namespace to Thesis\Google to avoid conflicts with google/* repositories --- Makefile | 2 +- composer.json | 4 ++-- src/CodeGeneratorRequest.php | 18 +++++++++--------- src/CodeGeneratorResponse.php | 11 +++++++---- src/CodeGeneratorResponse/Feature.php | 4 ++-- src/CodeGeneratorResponse/File.php | 10 +++++----- src/DescriptorRegistry.php | 14 +++++++------- src/Version.php | 4 ++-- src/autoload.metadata.php | 4 ++-- 9 files changed, 37 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index c559809..9deb25c 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ COMPOSER ?= $(RUN) composer t: terminal terminal: var ## Start a terminal inside the php container @$(if $(INSIDE_CONTAINER),echo 'Already inside docker container.'; exit 1,) - $(DOCKER_COMPOSE) run --rm $(ARGS) php bash + $(DOCKER_COMPOSE) run --rm $(ARGS) php sh .PHONY: t terminal run: ## Run a command using the php container: `make run CMD='php --version'` diff --git a/composer.json b/composer.json index 7a28210..ee4663d 100644 --- a/composer.json +++ b/composer.json @@ -21,12 +21,12 @@ "php": "^8.4", "ext-bcmath": "*", "thesis/protobuf": "^0.2", - "thesis/protobuf-descriptor-types": "^0.2", + "thesis/protobuf-descriptor-types": "^0.3", "thesis/protoregistry": "^0.1.2" }, "autoload": { "psr-4": { - "Google\\Protobuf\\Compiler\\": "src/" + "Thesis\\Google\\Protobuf\\Compiler\\": "src/" }, "files": [ "src/autoload.metadata.php" diff --git a/src/CodeGeneratorRequest.php b/src/CodeGeneratorRequest.php index 81c196f..6339376 100644 --- a/src/CodeGeneratorRequest.php +++ b/src/CodeGeneratorRequest.php @@ -3,14 +3,14 @@ /** * Code generated by thesis/protoc-plugin. DO NOT EDIT. * Versions: - * thesis/protoc-plugin — v0.4.3 + * thesis/protoc-plugin — v0.6.0 * protoc — v6.33.5 * Source: google/protobuf/compiler/plugin.proto */ declare(strict_types=1); -namespace Google\Protobuf\Compiler; +namespace Thesis\Google\Protobuf\Compiler; use Thesis\Protobuf\Reflection; @@ -26,7 +26,7 @@ * code generator should generate code only for these files. Each file's * descriptor will be included in proto_file, below. * @param ?string $parameter The generator parameter passed on the command-line. - * @param list<\Google\Protobuf\FileDescriptorProto> $protoFile FileDescriptorProtos for all files in files_to_generate and everything + * @param list<\Thesis\Google\Protobuf\FileDescriptorProto> $protoFile FileDescriptorProtos for all files in files_to_generate and everything * they import. The files will appear in topological order, so each file * appears before any file that imports it. * @@ -45,21 +45,21 @@ * * Type names of fields and extensions in the FileDescriptorProto are always * fully qualified. - * @param list<\Google\Protobuf\FileDescriptorProto> $sourceFileDescriptors File descriptors with all options, including source-retention options. + * @param list<\Thesis\Google\Protobuf\FileDescriptorProto> $sourceFileDescriptors File descriptors with all options, including source-retention options. * These descriptors are only provided for the files listed in * files_to_generate. - * @param ?\Google\Protobuf\Compiler\Version $compilerVersion The version number of protocol compiler. + * @param ?\Thesis\Google\Protobuf\Compiler\Version $compilerVersion The version number of protocol compiler. */ public function __construct( #[Reflection\Field(1, new Reflection\ListT(Reflection\StringT::T, false))] public array $fileToGenerate = [], #[Reflection\Field(2, Reflection\StringT::T)] public ?string $parameter = null, - #[Reflection\Field(15, new Reflection\ListT(new Reflection\ObjectT(\Google\Protobuf\FileDescriptorProto::class), false))] + #[Reflection\Field(15, new Reflection\ListT(new Reflection\ObjectT(\Thesis\Google\Protobuf\FileDescriptorProto::class), false))] public array $protoFile = [], - #[Reflection\Field(17, new Reflection\ListT(new Reflection\ObjectT(\Google\Protobuf\FileDescriptorProto::class), false))] + #[Reflection\Field(17, new Reflection\ListT(new Reflection\ObjectT(\Thesis\Google\Protobuf\FileDescriptorProto::class), false))] public array $sourceFileDescriptors = [], - #[Reflection\Field(3, new Reflection\ObjectT(\Google\Protobuf\Compiler\Version::class))] - public ?\Google\Protobuf\Compiler\Version $compilerVersion = null, + #[Reflection\Field(3, new Reflection\ObjectT(\Thesis\Google\Protobuf\Compiler\Version::class))] + public ?\Thesis\Google\Protobuf\Compiler\Version $compilerVersion = null, ) {} } diff --git a/src/CodeGeneratorResponse.php b/src/CodeGeneratorResponse.php index 3ab2c39..8b44f49 100644 --- a/src/CodeGeneratorResponse.php +++ b/src/CodeGeneratorResponse.php @@ -3,14 +3,14 @@ /** * Code generated by thesis/protoc-plugin. DO NOT EDIT. * Versions: - * thesis/protoc-plugin — v0.4.3 + * thesis/protoc-plugin — v0.6.0 * protoc — v6.33.5 * Source: google/protobuf/compiler/plugin.proto */ declare(strict_types=1); -namespace Google\Protobuf\Compiler; +namespace Thesis\Google\Protobuf\Compiler; use Thesis\Protobuf\Reflection; @@ -40,7 +40,7 @@ * Edition enum, but we want to allow unknown values. It should be specified * according the edition enum value, *not* the edition number. Only takes * effect for plugins that have FEATURE_SUPPORTS_EDITIONS set. - * @param list<\Google\Protobuf\Compiler\CodeGeneratorResponse\File> $file + * @param list<\Thesis\Google\Protobuf\Compiler\CodeGeneratorResponse\File> $file */ public function __construct( #[Reflection\Field(1, Reflection\StringT::T)] @@ -51,7 +51,10 @@ public function __construct( public ?int $minimumEdition = null, #[Reflection\Field(4, Reflection\Int32T::T)] public ?int $maximumEdition = null, - #[Reflection\Field(15, new Reflection\ListT(new Reflection\ObjectT(\Google\Protobuf\Compiler\CodeGeneratorResponse\File::class), false))] + #[Reflection\Field( + 15, + new Reflection\ListT(new Reflection\ObjectT(\Thesis\Google\Protobuf\Compiler\CodeGeneratorResponse\File::class), false), + )] public array $file = [], ) {} } diff --git a/src/CodeGeneratorResponse/Feature.php b/src/CodeGeneratorResponse/Feature.php index 17457e2..7baa7e5 100644 --- a/src/CodeGeneratorResponse/Feature.php +++ b/src/CodeGeneratorResponse/Feature.php @@ -3,14 +3,14 @@ /** * Code generated by thesis/protoc-plugin. DO NOT EDIT. * Versions: - * thesis/protoc-plugin — v0.4.3 + * thesis/protoc-plugin — v0.6.0 * protoc — v6.33.5 * Source: google/protobuf/compiler/plugin.proto */ declare(strict_types=1); -namespace Google\Protobuf\Compiler\CodeGeneratorResponse; +namespace Thesis\Google\Protobuf\Compiler\CodeGeneratorResponse; /** * @api diff --git a/src/CodeGeneratorResponse/File.php b/src/CodeGeneratorResponse/File.php index 04b580e..a21e353 100644 --- a/src/CodeGeneratorResponse/File.php +++ b/src/CodeGeneratorResponse/File.php @@ -3,14 +3,14 @@ /** * Code generated by thesis/protoc-plugin. DO NOT EDIT. * Versions: - * thesis/protoc-plugin — v0.4.3 + * thesis/protoc-plugin — v0.6.0 * protoc — v6.33.5 * Source: google/protobuf/compiler/plugin.proto */ declare(strict_types=1); -namespace Google\Protobuf\Compiler\CodeGeneratorResponse; +namespace Thesis\Google\Protobuf\Compiler\CodeGeneratorResponse; use Thesis\Protobuf\Reflection; @@ -71,7 +71,7 @@ * * If |insertion_point| is present, |name| must also be present. * @param ?string $content The file contents. - * @param ?\Google\Protobuf\GeneratedCodeInfo $generatedCodeInfo Information describing the file content being inserted. If an insertion + * @param ?\Thesis\Google\Protobuf\GeneratedCodeInfo $generatedCodeInfo Information describing the file content being inserted. If an insertion * point is used, this information will be appropriately offset and inserted * into the code generation metadata for the generated files. */ @@ -82,7 +82,7 @@ public function __construct( public ?string $insertionPoint = null, #[Reflection\Field(15, Reflection\StringT::T)] public ?string $content = null, - #[Reflection\Field(16, new Reflection\ObjectT(\Google\Protobuf\GeneratedCodeInfo::class))] - public ?\Google\Protobuf\GeneratedCodeInfo $generatedCodeInfo = null, + #[Reflection\Field(16, new Reflection\ObjectT(\Thesis\Google\Protobuf\GeneratedCodeInfo::class))] + public ?\Thesis\Google\Protobuf\GeneratedCodeInfo $generatedCodeInfo = null, ) {} } diff --git a/src/DescriptorRegistry.php b/src/DescriptorRegistry.php index af28280..7b4247c 100644 --- a/src/DescriptorRegistry.php +++ b/src/DescriptorRegistry.php @@ -3,14 +3,14 @@ /** * Code generated by thesis/protoc-plugin. DO NOT EDIT. * Versions: - * thesis/protoc-plugin — v0.4.3 + * thesis/protoc-plugin — v0.6.0 * protoc — v6.33.5 * Source: google/protobuf/compiler/plugin.proto */ declare(strict_types=1); -namespace Google\Protobuf\Compiler; +namespace Thesis\Google\Protobuf\Compiler; use Override; use Thesis\Protobuf\Registry; @@ -32,13 +32,13 @@ public function register(Registry\Pool $pool): void 'google/protobuf/descriptor.proto', ], messages: [ - new File\MessageDescriptor('google.protobuf.compiler.Version', \Google\Protobuf\Compiler\Version::class), - new File\MessageDescriptor('google.protobuf.compiler.CodeGeneratorRequest', \Google\Protobuf\Compiler\CodeGeneratorRequest::class), - new File\MessageDescriptor('google.protobuf.compiler.CodeGeneratorResponse', \Google\Protobuf\Compiler\CodeGeneratorResponse::class), - new File\MessageDescriptor('google.protobuf.compiler.CodeGeneratorResponse.File', \Google\Protobuf\Compiler\CodeGeneratorResponse\File::class), + new File\MessageDescriptor('google.protobuf.compiler.Version', \Thesis\Google\Protobuf\Compiler\Version::class), + new File\MessageDescriptor('google.protobuf.compiler.CodeGeneratorRequest', \Thesis\Google\Protobuf\Compiler\CodeGeneratorRequest::class), + new File\MessageDescriptor('google.protobuf.compiler.CodeGeneratorResponse', \Thesis\Google\Protobuf\Compiler\CodeGeneratorResponse::class), + new File\MessageDescriptor('google.protobuf.compiler.CodeGeneratorResponse.File', \Thesis\Google\Protobuf\Compiler\CodeGeneratorResponse\File::class), ], enums: [ - new File\EnumDescriptor('google.protobuf.compiler.CodeGeneratorResponse.Feature', \Google\Protobuf\Compiler\CodeGeneratorResponse\Feature::class), + new File\EnumDescriptor('google.protobuf.compiler.CodeGeneratorResponse.Feature', \Thesis\Google\Protobuf\Compiler\CodeGeneratorResponse\Feature::class), ], )); } diff --git a/src/Version.php b/src/Version.php index 1b95a63..dd2cc28 100644 --- a/src/Version.php +++ b/src/Version.php @@ -3,14 +3,14 @@ /** * Code generated by thesis/protoc-plugin. DO NOT EDIT. * Versions: - * thesis/protoc-plugin — v0.4.3 + * thesis/protoc-plugin — v0.6.0 * protoc — v6.33.5 * Source: google/protobuf/compiler/plugin.proto */ declare(strict_types=1); -namespace Google\Protobuf\Compiler; +namespace Thesis\Google\Protobuf\Compiler; use Thesis\Protobuf\Reflection; diff --git a/src/autoload.metadata.php b/src/autoload.metadata.php index 4e9c63d..b876af5 100644 --- a/src/autoload.metadata.php +++ b/src/autoload.metadata.php @@ -3,12 +3,12 @@ /** * Code generated by thesis/protoc-plugin. DO NOT EDIT. * Versions: - * thesis/protoc-plugin — v0.4.3 + * thesis/protoc-plugin — v0.6.0 * protoc — v6.33.5 */ declare(strict_types=1); \Thesis\Protobuf\Registry\Pool::get()->register( - new \Thesis\Protobuf\Registry\OnceRegistrar(new \Google\Protobuf\Compiler\DescriptorRegistry()), + new \Thesis\Protobuf\Registry\OnceRegistrar(new \Thesis\Google\Protobuf\Compiler\DescriptorRegistry()), );