Commit Graph

157 Commits

Author SHA1 Message Date
Paul Yang
b61dd9d9a2
Add file option php_metadata_namespace and ruby_package (#4609) 2018-05-11 13:57:06 -07:00
Paul Yang
7377d81ca4
Throw error if user want to access message properties (#4603)
* Throw error if user want to access message properties

* Fix typo
2018-05-10 10:52:39 -07:00
Paul Yang
5f7334f5f3
Avoid direct check of class name (#4601)
* Avoid direct check of class name

So that subclasses are also ok

* Use type hint in function signature.
2018-05-10 10:52:00 -07:00
Petar Dambovaliev
0869b1a0a7 Add space between class name and concat message (#4577)
The class name was linked to the next word in the sentence.
"User\UserRequestis not found in descriptor pool."
2018-04-30 11:00:46 -07:00
urfinjuezz
d7d863ea07 fix json_decode call parameters (#4381) 2018-04-09 14:14:31 -07:00
Brent Shaffer
13e627ad69 includes the expected class in the exception, otherwise the error is harder to track down (#3371) 2018-04-09 14:08:58 -07:00
Paul Yang
c931743461
Merge branch (#4466)
* Fix setup.py for windows build.

* Bump version number to 3.5.2

* Cat the test-suite.log on errors for presubits
2018-04-02 15:55:28 -07:00
Paul Yang
6dd563a674
Sync upb change (#4373) 2018-03-08 17:35:22 -08:00
Paul Yang
a48d58df96
Convert descriptortype to type for upb_msgval_sizeof (#4357) 2018-03-06 15:07:05 -08:00
Paul Yang
0f4ad85740
For encoding upb needs descriptor type instead of type. (#4354) 2018-03-06 13:30:03 -08:00
Adam Cozzette
5004d09ff0 PHP: fixed typo in message.c 2018-03-05 14:25:42 -08:00
Jisi Liu
bb40c0c0c4
Merge pull request #4291 from google/3.5.x
Merge 3.5.x to master
2018-02-26 10:05:09 -08:00
Paul Yang
51293f36d8
Fix more memory leak for php c extension (#4211)
* Fix more memory leak for php c extension

* Fix memory leak for php5.5
2018-01-25 11:31:05 -08:00
Paul Yang
3823897475
Well known types are not initialized properly. (#4139)
Previously, within the same load period of protobuf module, well known
types are not initialized correctly for the second request. The reason
is that well known type are only initialized if a method local static
variable is not set. However, that variable is not reset after request
ends. Therefore, when the second request comes, the method local static
variable is still set (by previous request) and well types are not
initialized in this case.
2018-01-05 13:05:07 -08:00
Jisi Liu
383a4941d5 Merge remote-tracking branch 'origin/3.5.x' into master 2018-01-03 09:28:40 -08:00
Paul Yang
c79ba5c1b6
Merge pull request #4034 from TeBoring/php-timestamp-bug
Avoid calling method from php extension directly
2017-12-15 10:36:07 -08:00
Bo Yang
8d6f13e86d Fix for php5.5 2017-12-14 13:24:00 -08:00
Bo Yang
39159c89f1 Accept DatetimeInterface in fromDatetime 2017-12-14 11:33:34 -08:00
Bo Yang
1a549d9a90 Avoid using php_date_get_date_ce() in case date extension is not
available.
2017-12-13 17:09:55 -08:00
Bo Yang
fffe8d39f8 Call php method via function name instead of calling directly.
This changes the linking error if php extension is not statically linked
to a runtime error. In this way, users who don't need Timestamp can
still use protobuf even if date extension is not statically linked in
php.
2017-12-12 17:47:04 -08:00
Paul Yang
f69a5db66f
Merge pull request #4028 from TeBoring/3.5.x
Add backslach to make class explict in global namespace
2017-12-12 14:28:27 -08:00
Bo Yang
88102eae8f Replace private timelib_update_ts with public date_timestamp_get 2017-12-12 13:57:49 -08:00
Bo Yang
9f6aceaa8c Add PROTOBUF_ENABLE_TIMESTAMP to let user decide whether timestamp util
can be used at install time.
2017-12-12 12:06:51 -08:00
Bo Yang
3b13c3f02e Add backslach to make class explict in global namespace 2017-12-11 15:44:27 -08:00
Bo Yang
fc5818b2bb Merge branch '3.5.0.1' into 3.5.x 2017-12-11 10:50:50 -08:00
Paul Yang
c370f88fb1
Recursively clear unknown fields in submessages. (#3982)
* Recursively clear unknown fields in submessages.

* Recursively discard unknown fields in submsg for c extension

* Fix zts build

* Add comment for tests

* Add a TODO to add a util for encoding varint for better readability.

* Add test for oneof message field.
2017-12-07 11:16:47 -08:00
Bo Yang
457f6a607c Add release log 2017-12-06 10:54:11 -08:00
Bo Yang
ba60b854b6 Update php c extension version number to 3.5.0.1 2017-12-06 10:46:57 -08:00
Bo Yang
212563d756 Fix memory leak in php7 2017-12-06 10:40:07 -08:00
Bo Yang
3b7a5f4515 Fix several more memory leak 2017-12-06 10:38:18 -08:00
Bo Yang
7d3437152a Fix memory leak when creating map field via array. 2017-12-06 10:37:53 -08:00
Bo Yang
e0d3aa057b Fix memory leak when creating repeated field via array. 2017-12-06 10:37:26 -08:00
Paul Yang
de44982a74 Remove duplicate typedef. (#3975) 2017-12-06 10:36:52 -08:00
Bo Yang
b140cb3145 Fix memory leak when creating map field via array. 2017-12-04 12:32:10 -08:00
Bo Yang
1acacf46cc Fix memory leak when creating repeated field via array. 2017-12-01 20:14:57 -08:00
Adam Cozzette
a27da09339 Merge branch '3.5.x' into 3.5.x-merge 2017-11-30 13:34:51 -08:00
Paul Yang
94bb1eed17
Remove duplicate typedef. (#3975) 2017-11-30 12:21:00 -08:00
Paul Yang
74e7decbbf
Provide discardUnknonwnFields API in php (#3976)
* Provide discardUnknownFields API in php implementation

* Provide discardUnknownFields API in php c extension.
2017-11-30 12:19:50 -08:00
Paul Yang
98836a56e6
Update version number for php c extension (#3896) 2017-11-15 17:17:36 -08:00
Paul Yang
857a021645
Use fully qualifed name for DescriptorPool in Any.php to avoid name (#3886)
conflict
2017-11-15 11:09:14 -08:00
Issac Trotts
0d466884a2 Update README.md: C extension works on PHP 7 (#3888)
Here's the pull request that made it happen: https://github.com/google/protobuf/pull/2951
2017-11-15 11:08:15 -08:00
Paul Yang
188f18044f
All integer types should accept null in json. (#3869) 2017-11-13 09:31:28 -08:00
Paul Yang
2df472690e
Fix php well known type conformance tests (#3828) (#3840)
* Fix php well known type conformance tests

* Properly generate code for test.proto

* Provide GPBMetadata files in c extensions for generated files to import.

* Remove unnecessary test

* Clean up code

* Add declaration for initOnce.

* Refactoring
2017-11-04 09:33:56 -07:00
Paul Yang
bcda919cee
Fix php well known type conformance tests (#3828)
* Fix php well known type conformance tests

* Properly generate code for test.proto

* Provide GPBMetadata files in c extensions for generated files to import.

* Remove unnecessary test

* Clean up code

* Add declaration for initOnce.

* Refactoring
2017-11-03 12:30:09 -07:00
xuwei-k
05b56d01c1 update joda-time javadoc url 2017-10-30 17:48:54 +09:00
Jisi Liu
ecf2957106 Update descriptor protos 2017-10-18 14:21:22 -07:00
Jisi Liu
de15e73d58 Merge remote-tracking branch 'origin/3.4.x' into master 2017-10-11 14:44:03 -07:00
Paul Yang
6032746882 Reserve unknown fields in php (#3659)
* Reserve unknown fields in upb
1) For decoding, an unknownfields will be lazily created on message,
which contains bytes of unknown fields.
2) For encoding, if the unknownfields is present on message, all bytes
contained in it will be serialized.

* Register the function to encode unknown field at decode time.

* Remove upb_handlers_setaddunknown

* Use upb_sink_putunknown in decoder

* Remove upb_pb_encoder_encode_unknown

* Do not expose encode_unknown

* Implement reserve unknown field in php Implement.

* Make buffer private to CodedInputStream
2017-10-09 12:39:13 -07:00
Paul Yang
77f64bb777 Add well known types to php runtime. (#3697)
* Add well known types to php runtime.

* Fix php7.0 tests

* No longer generate empty.proto in test as it has been included in
runtime.

* Fix zts build

* Clean code

* Rename g_p_b_empty to empty.

* Don't generate code for empty.proto in compatibility test

* Fix 32-bit

* Fix mac build

* Fix Makefile.am to add new files
2017-10-05 21:03:57 -07:00
Paul Yang
ae55fd2cc5 Enforce all error report for php tests. (#3670)
* Enforce all error report for php tests.

* Import vendor/autoload.php in tests/bootstrap_phpunit.php
2017-09-22 14:08:01 -07:00