Commit Graph

101 Commits

Author SHA1 Message Date
sayuprc d63a68029f [PHP] Fully qualify stdClass with global namespace (#39996)
This PR addresses the following review comment: https://github.com/grpc/grpc/pull/37563#discussion_r2166825714

Changed `stdClass` to `\stdClass` to explicitly reference the global namespace.

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #39996

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39996 from sayuprc:use-global-namespace ea680d137bc413d79b8c58ac57c363b15edd134f
PiperOrigin-RevId: 775872442
2025-06-25 16:04:50 -07:00
sayuprc 019b517748 [php] Fix PHPDoc so that UnaryCall defines the proper return type (#37563)
Type information is added to the result of `UnaryCall::wait()` execution.

resolve #33431

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #37563

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37563 from sayuprc:typing-support-for-php 0f1e6b257621db16e24f1e3305f1bff8a98bf600
PiperOrigin-RevId: 775541985
2025-06-24 23:31:46 -07:00
Shusaku Yusa 58d3117e7b fix typing of nullable parameters (#39199)
From PHP8.4, a parameter that has `null` as a default value has to be typed as a nullable type: https://www.php.net/manual/en/migration84.deprecated.php
In the code base, the factory methods of `Status` class have to be fixed to comply with this syntax. On the other hand, nullable type is not available in 7.0 (https://www.php.net/manual/en/migration71.new-features.php), which is supported in this library now.
<strike>Since the versions 7.0 - 8.0 have already reached the EOL (https://www.php.net/supported-versions.php) as of now, I would like to propose dropping support of these versions, and adding support of 8.4.</strike>
cc: @stanley-cheung

Closes #39199

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39199 from shu-yusa:master 29cc63f60b9adf6aa38bb283c6edf8fa4316d8ea
PiperOrigin-RevId: 775306237
2025-06-24 11:06:08 -07:00
Mark D. Roth 076d5076c6 [reorg] move security base APIs and credential code to new locations (#38825)
This includes the following moves from src/core/lib/security:
- certificate_provider/* → src/core/credentials/transport/tls/
- context/* → split between src/core/call/security_context* and src/core/transport/auth_context*
- credentials/
  - composite/ → split between src/core/credentials/call/composite/ and src/core/credentials/transport/composite/
  - alts, google_default, insecure, local, ssl, tls, xds → src/core/credentials/transport/
  - fake/ → split between test/core/test_util/test_call_creds* and src/core/credentials/transport/fake
  - external, iam, jwt, oauth2, plugin, token_fetcher → src/core/credentials/call/
  - call_creds_utils.* → src/core/credentials/call/
  - channel_creds_registry* → src/core/credentials/transport/
  - credentials.* → split between src/core/credentials/call/call_credentials.* and src/core/credentials/transport/transport_credentials.*
- security_connector/
  - alts, fake, insecure, local, ssl, tls → src/core/credentials/transport/
  - security_connector* → src/core/credentials/transport/
  - ssl_utils*, load_system_roots* → src/core/credentials/transport/tls/
- transport/ → src/core/filter/auth/
- util/* → src/core/credentials/call/

The only thing left in src/core/lib/security is the authz code, which I will move in a separate PR.

I have also moved the tests from test/core/security into a similar structure.  Some specific notes:
- I have removed print_google_default_creds_token.cc, since it does not appear in any build file and appears to be completely unused.
- I moved secure_endpoint_test.cc to test/core/handshaker, to match where the implementation lives in the tree.

Closes #38825

PiperOrigin-RevId: 731487339
2025-02-26 16:01:37 -08:00
hedane bb4acc9950 [PHP] fix a little bug in BaseStub.getDefaultChannel() #32705 (#32792)
@alto-php This is my first PR on GitHub, thank you.. #32705
2023-04-04 16:27:53 -07:00
Simon Podlipsky 066e398bcc [PHP] Use @throws (#32565)
https://docs.phpdoc.org/3.0/guide/references/phpdoc/tags/throws.html#throws
2023-03-30 15:37:19 +00:00
Frank de Jonge 7b3977e9f1 Use correct namespace for checking if the isDefaultRootsPemSet method exists. (#31580)
The `method_exists` function requires a fully qualified class name to be
sent to check if a method exists. The current class was missing the
namespace, which means the function always returns `false`. In our
application this caused the credentials to be loaded many times over,
which ate up some CPU. This bug fix ensures that this is only run once
per request.
2023-03-06 16:00:10 -08:00
Stanley Cheung 44b113b3c1 PHP: stop reading composer.json file just to read the version string (#26156)
* PHP: remove reading from composer.json just for the version string

* Be extra defensive
2021-05-10 15:45:40 -07:00
Hannah Shi 6769ce39f4 PHP: php server commit 4/n, add RpcServer, generator and server examples (#25640)
* add RpcServer and generator
add server examples: greeter and route guide

* php server generator xds client

* add generated stub

* fix clang format fail
2021-05-01 01:07:44 -07:00
Stanley Cheung c0a78774f8 PHP: allow xDS interop client to start RPCs asynchronously (#25696)
* PHP: allow xDS interop client to start RPCs asynchronously

* Address review comments

* Remove adhoc test config
2021-04-08 20:02:04 -07:00
Stanley Cheung 82625840bc PHP: remove experimental from Interceptor API (#25788) 2021-03-23 11:45:56 -07:00
Hannah Shi d098697659 PHP: php server commit 3/n, add ServerContext and MethodDescriptor (#25399)
* add ServerContext and MethodDescriptor

* re-run generate_projects.sh
2021-03-03 22:36:49 -08:00
Hannah Shi 061fcbb214 PHP: php server commit 2/n, add Server Call (#25397)
* php server commit 2, server call

* re-run generate_projects.sh

* temp solution to avoid using autoload

* remove type-hint of
2021-03-03 11:57:43 -08:00
root bd48e43fc8 php server commit 1, status 2021-02-02 16:34:11 +00:00
root cb2e78c59e fix phpunit 8 warnings 2021-01-13 16:01:33 +00:00
Stanley Cheung 7889bc9e55 Merge pull request #23020 from jeffreyqw/remove-deserializefunc
PHP: AbstractCall remove decode method
2020-05-28 17:58:01 -07:00
jeffreyqw 5e5080e1da remove extra if clause 2020-05-28 15:55:28 -07:00
Stanley Cheung 3614b0088c PHP xDS Interop test client 2020-05-27 21:11:49 -07:00
jeffreyqw 3a598311af remove 'method_exists' clause 2020-05-21 15:26:52 -07:00
jeffreyqw 35993468cd PHP: AbstractCall removedecode method
remove method_exists($data, 'encode')) and method_exists($obj, $deserializeFunc)
2020-05-20 20:42:10 -07:00
Stanley Cheung 7123a41cb1 PHP: Fix logic setting roots pem 2020-01-13 22:25:38 -08:00
Hannah Shi c75febf906 del unneed func 2019-11-21 03:52:09 +00:00
Hannah Shi 2537632d8c add invalidateDefaultRootsPem 2019-11-20 16:35:35 +00:00
Hannah Shi 337f0c5b15 indentation 2019-11-08 16:52:13 +00:00
Hannah Shi 35c6369daa init ssl roots only once 2019-11-01 21:10:11 +00:00
tanjunchen 64cdea5a07 fix some spelling mistakes in document 2019-10-04 09:07:35 +08:00
Stanley Cheung c63b8e16a8 Merge pull request #19232 from jtattermusch/php_dots_in_metadata_keys
PHP: Allow dots in metadata keys
2019-06-06 15:24:09 -07:00
Jan Tattermusch e8cb29dd1e allow dots in metadata keys 2019-06-04 11:45:39 -04:00
Jan Tattermusch 15cae38cbd remove port suffix from JWT audience 2019-06-04 11:32:45 -04:00
Brent Shaffer ad371f802d fixes subpackage issue with loading composer 2018-07-19 16:52:46 -07:00
ZhouyihaiDing a7e282eecb PHP: add call invoker 2018-06-26 15:18:26 -07:00
ZhouyihaiDing d6b483b6f0 PHP: add deserialze as the argument for the interceptor 2018-06-20 16:42:55 -07:00
Zhouyihai Ding 10470bb4a0 Merge pull request #15417 from chingor13/php-default-channel
PHP: Surface a static method to fetch the default Channel
2018-05-17 09:26:07 -07:00
Jeff Ching 6d96a9a612 Provide hostname to getDefaultChannel 2018-05-16 17:06:48 -07:00
Jeff Ching 31676f36b1 Surface a static method to fetch the default Channel that a BaseStub would create 2018-05-16 16:45:20 -07:00
ZhouyihaiDing 251a573765 php InterceptorChannel inherits from Channel 2018-05-16 13:38:43 -07:00
ZhouyihaiDing 3c047a2cd5 PHP: fix InterceptorChannel not autoload by composer 2018-05-15 19:08:30 -07:00
ZhouyihaiDing 52b95cf1fb gRPC PHP Client Interceptor implementation and tests
move InterceptorChannel to Internal subdir; change year
2018-05-07 14:06:30 -07:00
Chad Kunde 1ac45e116e Removed opts checks in BaseStub when the elements aren't not used. 2018-01-30 11:09:19 +08:00
Guilherme Oliveira 83a2cc0c44 php return the right classes 2017-10-09 11:53:27 +02:00
Michael Bausor ff1e926421 Remove assignment 2017-08-16 12:23:01 -07:00
Michael Bausor 8a61db3c37 Remove metadata set 2017-08-16 12:21:16 -07:00
Michael Bausor 81fd629092 Move OP_RECV_INITIAL_METADATA out of start() methods
Moves the OP_RECV_INITIAL_METADATA out of the start() methods for
UnaryCall and ServerStreamingCall, and adds a check so that the
getMetadata methods for those objects will always contain the
metadata.
2017-08-15 10:13:06 -07:00
Jan Tattermusch 7897ae9308 auto-fix most of licenses 2017-06-08 11:22:41 +02:00
Rajendra Talekar 9b3a6cc3d2 Fixing is_a check for Channel
php ```is_a``` function expects fully qualified class name to validate.
2017-04-10 15:07:02 +05:30
thinkerou 34d21ceadc fix php style 2017-03-26 01:10:21 +08:00
Stanley Cheung 55bff48335 PHP: proto3 API change 2017-03-13 13:09:43 -07:00
Stanley Cheung de78a21579 Merge pull request #9416 from thinkerou/update_method_property_visibility
PHP: Update the visibility property  of method
2017-01-26 19:31:48 -08:00
thinkerou 8772a366ba update method prop visibility 2017-01-20 18:24:20 +08:00
thinkerou 16713db012 fix code style 2017-01-20 14:43:19 +08:00