{"id":14993770,"url":"https://github.com/haskel/grpc-web-bundle","last_synced_at":"2026-03-08T18:34:50.185Z","repository":{"id":186502995,"uuid":"600428605","full_name":"haskel/grpc-web-bundle","owner":"haskel","description":"gRPC-Web Symfony Bundle","archived":false,"fork":false,"pushed_at":"2023-08-18T18:49:56.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-18T03:42:33.509Z","etag":null,"topics":["grpc","grpc-web","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haskel.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"Security/DefaultJwtCookieBuilder.php","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-11T13:18:21.000Z","updated_at":"2023-08-11T22:26:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"a04a7541-d6d4-4e84-9678-5628c65c8521","html_url":"https://github.com/haskel/grpc-web-bundle","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"757b569dd8e5a944365e80bf5f633995e2b7faf9"},"previous_names":["haskel/grpc-web-bundle"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskel%2Fgrpc-web-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskel%2Fgrpc-web-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskel%2Fgrpc-web-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskel%2Fgrpc-web-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haskel","download_url":"https://codeload.github.com/haskel/grpc-web-bundle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243051842,"owners_count":20228279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grpc","grpc-web","symfony","symfony-bundle"],"created_at":"2024-09-24T15:30:30.899Z","updated_at":"2026-03-08T18:34:50.115Z","avatar_url":"https://github.com/haskel.png","language":"PHP","readme":"## gRPC-Web Bundle\n\n### Installation\n\n```bash\ncomposer require haskel/grpc-web-bundle\n```\n\nAdd  bundle to `config/bundles.php`:\n\n```php\nreturn [\n    // ...\n    Haskel\\GrpcWebBundle\\GrpcWebBundle::class =\u003e ['all' =\u003e true],\n];\n```\n\n### Configuration\n\n```yaml\n# config/packages/grpc_web.yaml\n\ngrpc_web:\n  # optional namespace of proto files\n  proto_namespace: 'my.somenamespace.api'\n\n  # optional name of response type attribute in request object\n  response_type_attribute_name: '_grpc_response_type'\n  \n  # map of exception classes to grpc standard response codes\n  exception_code_map:\n    App\\Exception\\ValidationException: 1\n    App\\Exception\\InvalidArgumentException: 2\n  \n  # configuration of integration with lexik_jwt_authentication bundle\n  security:\n    # optional class of success response builder\n    success_response_builder: 'App\\Security\\SuccessResponseBuilder'\n    # optional class of failure response builder\n    failure_response_builder: 'App\\Security\\FailureResponseBuilder'\n    # required class of sign in request\n    sign_in_request_class: 'App\\Model\\Api\\SignInRequest'\n```\n\n### Usage\n\n#### Create proto file\n\n```protobuf\nsyntax = \"proto3\";\n\npackage grpc.api;\n\nservice PingService {\n    rpc Ping (PingRequest) returns (PingResponse) {}\n}\n\nmessage PingRequest {\n    string message = 1;\n}\n\nmessage PingResponse {\n    string message = 1;\n}\n```\n\n#### Generate php code\n\n```bash\nprotoc --php_out=src --grpc-web_out=mode=grpcwebtext:src --proto_path=config/proto \n```\n\n#### Create controller\n\n```php\n\u003c?php\n\nnamespace App\\Controller\\Grpc;\n\nuse App\\Grpc\\Api\\PingRequest;\nuse App\\Grpc\\Api\\PingResponse;\nuse Haskel\\GrpcWebBundle\\Attribute as Grpc;\n\n#[Grpc\\Service('PingService', package: 'grpc.api')]\nclass PingService\n{\n    public function Ping(PingRequest $request): PingResponse\n    {\n        $message = $request-\u003egetMessage();\n        \n        $response = new PingResponse();\n        $response-\u003esetMessage(\"pong:\" . $message);\n        \n        return $response;\n    }\n}\n```\n\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaskel%2Fgrpc-web-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaskel%2Fgrpc-web-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaskel%2Fgrpc-web-bundle/lists"}