Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PHP descriptors #3391

Merged
merged 12 commits into from Aug 4, 2017

Conversation

@michaelbausor
Copy link
Contributor

commented Jul 18, 2017

@grpc-kokoro

This comment has been minimized.

Copy link

commented Jul 18, 2017

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

1 similar comment
@grpc-kokoro

This comment has been minimized.

Copy link

commented Jul 18, 2017

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

@bazel-io

This comment has been minimized.

Copy link

commented Jul 18, 2017

Can one of the admins verify this patch?

@googlebot googlebot added the cla: yes label Jul 18, 2017

michaelbausor added some commits Jul 24, 2017

@michaelbausor

This comment has been minimized.

Copy link
Contributor Author

commented Jul 24, 2017

@TeBoring Added PHP implementation of descriptors in Google\Protobuf namespace, PTAL

@TeBoring

This comment has been minimized.

Copy link
Contributor

commented Jul 25, 2017

ok to test

require_once('test_util.php');
use Google\Protobuf\DescriptorPool;
use Google\Protobuf\Internal\GPBLabel;

This comment has been minimized.

Copy link
@TeBoring

TeBoring Jul 27, 2017

Contributor

No GPBLabel in c extension. Can we use integer instead?

This comment has been minimized.

Copy link
@michaelbausor

michaelbausor Jul 27, 2017

Author Contributor

Yes, updated.

$this->assertInstanceOf('\Google\Protobuf\FieldDescriptor', $desc->getField(0));
$this->assertSame(7, $desc->getFieldCount());
$this->assertInstanceOf('\Google\Protobuf\Descriptor', $desc->getNestedType(0));

This comment has been minimized.

Copy link
@TeBoring

TeBoring Jul 27, 2017

Contributor

c extension cannot provide info about nested type.

This comment has been minimized.

Copy link
@michaelbausor

michaelbausor Jul 27, 2017

Author Contributor

Sorry, I forgot about this one - removed now.

$this->assertSame('optional_int32', $fieldDesc->getName());
$this->assertSame(1, $fieldDesc->getNumber());
$this->assertSame(self::GPBLABEL_OPTIONAL, $fieldDesc->getLabel());
$this->assertSame(GPBType::INT32, $fieldDesc->getType());

This comment has been minimized.

Copy link
@TeBoring

TeBoring Jul 28, 2017

Contributor

Please also avoid using GPBType since it's internal. Otherwise, the compatibility test may be broken if we remove GPBType in future.

This comment has been minimized.

Copy link
@michaelbausor

michaelbausor Jul 31, 2017

Author Contributor

Fixed

$this->assertInstanceOf('\Google\Protobuf\FieldDescriptor', $desc->getField(0));
$this->assertSame(7, $desc->getFieldCount());
$this->assertInstanceOf('\Google\Protobuf\EnumDescriptor', $desc->getEnumType(0));

This comment has been minimized.

Copy link
@TeBoring

TeBoring Jul 28, 2017

Contributor

No information about nested enum in c extension.

This comment has been minimized.

Copy link
@michaelbausor

michaelbausor Jul 31, 2017

Author Contributor

Fixed

@TeBoring

This comment has been minimized.

Copy link
Contributor

commented Aug 2, 2017

#3422 has been merged.

@TeBoring

This comment has been minimized.

Copy link
Contributor

commented Aug 3, 2017

It seems you need to add new file into Makefile.am

@TeBoring

This comment has been minimized.

Copy link
Contributor

commented Aug 4, 2017

The error for jenkins is because the composer dependency used by jenkins is different after this change. Need to submit this change first and update the commit id in Dockerfile.

@michaelbausor michaelbausor changed the title WIP: Update PHP descriptors Update PHP descriptors Aug 4, 2017

@TeBoring TeBoring merged commit 21b0e55 into protocolbuffers:master Aug 4, 2017

3 of 5 checks passed

Jenkins Build finished.
Details
Jenkins 32bit Build finished.
Details
cla/google All necessary CLAs are signed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

TeBoring added a commit to TeBoring/protobuf that referenced this pull request Aug 4, 2017

TeBoring added a commit that referenced this pull request Aug 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.