Skip to content

Conversation

bshaffer
Copy link
Contributor

same as #3331, but to the php-generated-dev branch

This adds typehints for all Message setters. A few other interesting things have happened as a result:

  1. Setters for Message types no longer pass-by-reference, since this is implicit for PHP objects
  2. Setters for Message types now accept an optional null, since the base Message class requires passing null to the public setters in order for the method clear() to work.

@anandolee
Copy link
Contributor

ping @TeBoring

2 similar comments
@xfxyjwf
Copy link
Contributor

xfxyjwf commented May 14, 2018

ping @TeBoring

@xfxyjwf
Copy link
Contributor

xfxyjwf commented May 21, 2018

ping @TeBoring

@anandolee anandolee added the php label Jun 18, 2018
@TeBoring TeBoring merged commit abac808 into protocolbuffers:php-generated-dev Jun 19, 2018
@bshaffer bshaffer deleted the php-typehints-generated-dev branch January 11, 2019 21:07
copybara-service bot pushed a commit that referenced this pull request Feb 14, 2025
Adds the type of the `RepeatedField` to the PHPDoc, e.g.

```php
/**
 * @return \Google\Protobuf\Internal\RepeatedField<int>
 */
```

Whereas before, the `<int>` part was not included.

This is the "getter" counterpart for #4533

Closes #11734

PiperOrigin-RevId: 726881276
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants