Commit Graph

313 Commits

Author SHA1 Message Date
Paul Yang
39f4240856
Maven requires https connection (#7110) 2020-01-20 19:23:06 -08:00
Andres Valdes
35febfc2e9 Correct @return in Any.unpack docblock (#7089)
As per https://docs.phpdoc.org/latest/references/phpdoc/tags/return.html, the first token after the @return tag should be the return type.
2020-01-20 16:32:11 -08:00
Rafi Kamal
ed8688de72
Merge pull request #7064 from rafi-kamal/3.11.x-202001071136
Merge branch 3.11.x to master
2020-01-08 12:24:20 -08:00
Brian Wignall
a104dffcb6 Fix typos (#7050)
Uses https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines to find likely typos, with https://github.com/bwignall/typochecker to help automate the checking.
2020-01-08 10:18:20 -08:00
Paul Yang
fe1790ca0d
Fix Multiple Request for PHP (#7008)
* Add scripts to test multirequest

* chmod ug+x multirequest.sh

* Add continuous test

* Compile c extension

* Class entry is obsolete in the second request
1) Needes to use class name in persistent map
2) Invalidate class entry stored in descriptor

* Add new files to dist

* Fix compile_extension

* Cleanup outputs for phpize
2019-12-12 13:59:51 -08:00
Rafi Kamal
39492b68d8
Update protobuf version to 3.11.2 (#7004) 2019-12-10 17:50:28 -08:00
Paul Yang
a66423f0fd
Make c extension portable for php 7.4 (#6968)
* Make c extension portable for php 7.4

* Fix conformance tests

* Fix comments

* Fix 32-bit

* Update conformance failure list

* Fix compiler warnings

* Cleanup configure created by phpize
The file created in php 7.4 is not recognizable by previous versions

* Fix conformance tests for 64-bit php

* Fix conformance test

* Fix compile warning

* Fix compile warnings
2019-12-09 17:02:10 -08:00
Paul Yang
2929bb3736
Initialize wrapper message during parsing (#6974)
* Initialize wrapper message during parsing
In case the internal value is default

* Fix zts build
2019-12-03 11:11:28 -08:00
Rafi Kamal
b78c53f935
Update protobuf version to 3.11.1 (#6972) 2019-12-02 11:57:21 -08:00
Paul Yang
e69c939652
Extern declare protobuf_globals (#6946) 2019-11-27 01:00:51 -08:00
Rafi Kamal
1d5375c621
Update protobuf version to 3.11.0 (#6943) 2019-11-25 15:12:00 -08:00
Rafi Kamal
b0386daa19
Remove add_proto_enumdesc and get_proto_enumdesc (#6931) 2019-11-22 11:40:56 -08:00
Rafi Kamal
391440e3dd
Implement lazy loading of php class for proto messages (#6911) (#6925)
* Implement lazy loading of php class for proto messages

* Fix php 7.1

* Fix encode

* Fix memory leak

* Fix enum descriptor
2019-11-22 10:06:45 -08:00
Bo Yang
dbd66dddfb Remove add_proto_enumdesc and get_proto_enumdesc 2019-11-22 06:55:05 +00:00
Rafi Kamal
6220db4ec4
Update protobuf version (#6927) 2019-11-21 19:10:04 -08:00
Paul Yang
6d7bb7e714
Implement lazy loading of php class for proto messages (#6911)
* Implement lazy loading of php class for proto messages

* Fix php 7.1

* Fix encode

* Fix memory leak

* Fix enum descriptor
2019-11-20 20:33:27 -08:00
Paul Yang
edda0c92f5 Persistent Descriptor Pool (#6899)
* Make reserve names map persistent

* Add DescriptorInternal to map

* Use get_msgdef_desc in encode_decode.c

* Add persistent map for ce=>def and enum=>def

* Replace get_ce_obj

* Remove get_proto_obj

* Remove obsolete fields from Descriptor and EnumDescriptor

* Add cache for descriptor php values

* Add cache for descriptors

* Fix bug

* Avoid add generated file again if it has been added

* Fix the bug upb depends on null-ended str for look up.

* Initialize generated pool impl

* Turn down old generated pool

* Add init entry flag protobuf.keep_descriptor_pool_after_request

By default, it's off. Add protobuf.keep_descriptor_pool_after_request=1 to php.ini to enable it

* Fix zts build
2019-11-19 15:32:13 -08:00
Rafi Kamal
cd7b27be38 Update protobuf version (#6898) 2019-11-19 15:32:13 -08:00
Paul Yang
3cae867740
Persistent Descriptor Pool (#6899)
* Make reserve names map persistent

* Add DescriptorInternal to map

* Use get_msgdef_desc in encode_decode.c

* Add persistent map for ce=>def and enum=>def

* Replace get_ce_obj

* Remove get_proto_obj

* Remove obsolete fields from Descriptor and EnumDescriptor

* Add cache for descriptor php values

* Add cache for descriptors

* Fix bug

* Avoid add generated file again if it has been added

* Fix the bug upb depends on null-ended str for look up.

* Initialize generated pool impl

* Turn down old generated pool

* Add init entry flag protobuf.keep_descriptor_pool_after_request

By default, it's off. Add protobuf.keep_descriptor_pool_after_request=1 to php.ini to enable it

* Fix zts build
2019-11-18 13:13:25 -08:00
Rafi Kamal
3cc55d6167
Update protobuf version (#6898) 2019-11-15 17:44:10 -08:00
Paul Yang
601f6963eb
Lazily Create Singular Wrapper Message (#6833)
* Register additional handlers from wrappers

* Return zval instead of parse frame

* Use parse frame

* Update upb

* Lazily create wrapper messages

* Fix a segment fault

Need check type of field before getting submsg def

* Avoid expanding during serialization and direct access

* Fix a bug that getXXXUnwrapped returns null for string

* Implement writeWrapperUnwrapped

* Add more tests

* Fix oneof wrapper parsing

* Fix get oneof field

* Avoid expansion for oneof wrappers

* Fix bug

* Fix a bug that in php7 variable is defined out of scope

* Fix broken tests
 * Update upb to fix Timestamp conformance tests
 * Fix segmentation fault for oneof wrapper fields

* Fix encoding/decoding top level wrapper values

* Add type checking for write wrapper value in php7

* Fix zts build

* Fix the bug that readWrapperValue uses parent message's layout to access wrapper value

* Fix wrapper in map
2019-11-14 12:17:04 -08:00
Paul Yang
c53e5b8e11
Avoid too much overhead in layout_init (#6716)
* Avoid initializing primitive fields in layout_init

* Avoid initializing string/bytes/message fields in layout_init

* Lazily create map when needed

* Lazily create repeated fields

* Change layout_init to only do memcpy

* Fix test for php-7.0

* Fix conformance test where default value of string/message map is not encoded

* Fix test for zts

* Clean up

* Fix comments
2019-10-29 12:48:24 -07:00
Rafi Kamal
d8e678aae4
Merge pull request #6728 from protocolbuffers/3.10.x-merge
Merge 3.10.x with master and increment the version number
2019-10-10 16:56:19 -07:00
Paul Yang
2dec82e1e0
Fix conformance test (#6750)
* Fix conformance test

Default value of string/message map is not encoded

* Fix zts build
2019-10-10 16:03:52 -07:00
Rafi Kamal
2ed41359fe Update version to 3.11.0-RC0 2019-10-03 14:24:27 -07:00
Rafi Kamal
97c7c3fc97 Merge 3.10.x to master 2019-10-03 14:03:38 -07:00
Paul Yang
f50204dab4
Initialize well known type values (#6713) (#6714)
* Initialize well known type values

Also fixes #6667

* Revert unwanted change
2019-09-30 15:53:30 -07:00
Paul Yang
a32c2d0306
Initialize well known type values (#6713)
* Initialize well known type values

Also fixes #6667

* Revert unwanted change
2019-09-30 14:43:03 -07:00
Nikhil Pothuru
11a5b035da Update README.md (#6708)
* Update README.md

Fixed spelling error

* Update README.md
2019-09-29 19:49:17 -07:00
Paul Yang
66bae588dd
Add document for php development (#6694)
* Add document for php development

* Fix comments
2019-09-26 13:04:07 -07:00
Paul Yang
3f323c5b99
Fix incorrect leap day for Timestamp in php (#6696) 2019-09-24 18:26:02 -07:00
Rafi Kamal
33151f2c87
Merge pull request #6647 from rafi-kamal/3.10.x-201909121347
Update protobuf version to 3.10.0 stable
2019-09-18 15:32:09 -07:00
Jie Luo
2a4657971d
Update to 3.10.0-rc0 (#6660)
* Cherry pick changes on update_version.py #6643

* Update version to 3.10.0-rc-0

* Do not add rc0 to php packages.xml
2019-09-18 13:30:03 -07:00
Paul Yang
2610eb6675
Add license (#6651) 2019-09-16 15:35:53 -07:00
Rafi Kamal
5021cd3419 Update protobuf version 2019-09-12 13:50:24 -07:00
Rafi Kamal
63fc281046 Update protobuf version 2019-09-05 10:15:17 -07:00
Rafi Kamal
4e07b6347d
Merge pull request #6618 from TeBoring/3.10.x-cherrypick
Cherry Pick (#6614)
2019-09-05 09:53:25 -07:00
Rafi Kamal
56bf637221 Update protobuf version 2019-09-05 09:47:52 -07:00
Paul Yang
398d37f95f Sync upb (#6614)
* Sync upb

https://github.com/protocolbuffers/upb/pull/209

* Update upb

https://github.com/protocolbuffers/upb/pull/210
2019-09-05 09:10:01 -07:00
Paul Yang
7f520092d9
Sync upb (#6614)
* Sync upb

https://github.com/protocolbuffers/upb/pull/209

* Update upb

https://github.com/protocolbuffers/upb/pull/210
2019-09-04 14:41:27 -07:00
Paul Yang
e9d4e4acbc
Fix the issue for parsing zero length message (#6592)
* When length is zero, substr returns null instead of emptry string, which breaks the invariable for message.
* Tested in https://github.com/protocolbuffers/protobuf/pull/6560
2019-08-30 10:47:25 -07:00
Wang Qilin
829bb1d791 fix no check for null pointer in encode_decode.c (#6578) 2019-08-29 15:35:14 -07:00
Paul Yang
342ae0ebc3
Fix issues for php map when parsing missing key/value (#6588)
* For missing message value, map should create a default message
instance in order to keep its invariable.
* On 32-bit platform, int64 map key should be string
2019-08-29 15:27:48 -07:00
Paul Yang
659e799fb8
Sync upb (#6577)
* Sync upb

* https://github.com/protocolbuffers/upb/pull/208

* Fix php c extension compiling

Don't use macros defined by upb

* Update ruby conformance failure list
2019-08-27 13:14:57 -07:00
Paul Yang
6b3024f693
Accept string for int64 wrappers (#6491) 2019-08-19 17:16:58 -07:00
Jie Luo
43156775be
Merge 3.9.x 201908071359 to master (#6484)
* Add changelog for 3.9.x

* Revert "Make php message class final to avoid mocking (#6277)" (#6324)

This reverts commit 7f84a94366.
This is just temporary. Eventually, we still want to roll forward this
change. Some users are complaining they need more time to clean up their
code.

* Update extract_includes.bat.in

File io_win32.h is not in directory google\protobuf\stubs under directory google\protobuf\io

* Set oneof case in array constructor (#6351)

Forgot to set it previously.

* Update protobuf version (#6366)

* Drop building wheel for python 3.4 (#6406)

https://github.com/matthew-brett/multibuild/pull/240

* Fix binary compatibility in FieldCodec factory methods (#6380) (#6424)

* Fix binary compatibility in FieldCodec factory messages

* Make default value parameter for current factories required

* Route old methods through default value overloads

* Remove ExtensionRegistry.Add(params) overload

* Rename ExtensionRegistry.Add(IEnumerable<Extension>) overload to AddRange

* Edit naming of parameters in Extension classes

* * Fix add API warnings to docs for extension APIs
* Rename internal ExtensionSet.GetValue to TryGetValue

* Disable javadoc error (#6371)

* Disable javadoc error

Actual fixes of the javadoc will be followed up

* Remove duplicated configuration

* Update javadoc plugin version

* Updated Bazel test script to use most recent Bazel version (#6413) (#6433)

I'm not exactly sure why, but this fixes the failing Bazel presubmit
test. Using the most recent version seems like a good idea anyway so
that we can make sure we're compatible with any new Bazel changes.

* [bazel] Add fixes for --incompatible_load_{cc,java,proto}_rules_from_bzl

* No need to update version in generated code (#6471)

generate_descriptor will handle that

* Update protobuf version (#6472)
2019-08-09 13:21:18 -07:00
Paul Yang
56988bee34
No free when construct was not done (#6483)
* No free when construct was not done

This fix the segfault when some other error happens

* Add more tests

* Use Sub to avoid printing too much
2019-08-07 13:17:20 -07:00
Jie Luo
d1eeb852fc
compatibility test between last released and current for java python php (#6441)
* compatibility tests between last released and the current version
2019-07-31 17:49:26 -07:00
Bo Yang
d581c76063 Merge branch 'master' into 3.9.x
Conflicts:
	java/lite/pom.xml
	java/util/pom.xml
2019-06-21 20:31:00 +00:00
Paul Yang
54288a01ce
Rename get/setXXXValue to get/setXXXUnwrapped (#6295) 2019-06-21 13:25:23 -07:00