aboutsummaryrefslogtreecommitdiff
path: root/php/tests
Commit message (Collapse)AuthorAgeFilesLines
* Adopt upb change for timestamp and duration json to php (#5106)Paul Yang2018-09-221-0/+182
| | | | | | | | | | | | | | | | | | | | | | | | | * Adopt upb change for timestamp and duration json to php * Remove unused code * Re-sync upb * Fix php implementation timestamp json parsing * Fix strptime use local timezone on mac. * Remove succeeding tests * Resync * Add tests for values * Fix php tests * Fix encoder handlers change default value Previously, oneofsubmsg_handler and submsg_handler change zval's default value directly. The fix use REPLACE_ZVAL_VALUE which create a copy of parsed value and assign it to zval.
* Fix well known type class not inheriting Message (#5095)Paul Yang2018-08-311-0/+1
| | | | | | | | | * Fix well known type class not inheriting Message Previously, well known types only implement Message interface but not inhert it. Fix the problem by calling zend_do_inheritance * Add back commented tests
* Replace repo links.Feng Xiao2018-08-221-1/+1
|
* Merge pull request #5032 from TeBoring/json-wrapperJoshua Haberman2018-08-131-0/+81
|\ | | | | Fix json parsing of wrapper values
| * Fix json parsing of wrapper valuesBo Yang2018-08-101-0/+81
| |
* | Merge branch '3.6.x' into merge-3-6-xAdam Cozzette2018-08-011-0/+13
|\ \ | |/ |/|
| * Make assertEquals pass for message (#4947)Paul Yang2018-07-201-0/+13
| | | | | | | | This change only makes assertEquals pass for message in c extension. However, it actually does nothing. This is the same behavior before 3.6.0 release.
| * Fix 32bit php testsBo Yang2018-07-152-2/+1
| |
| * Fix php testsBo Yang2018-07-152-0/+3
| |
* | php: Added nanosecond support for Timestamp (#3972)Leonard Hecker2018-07-203-2/+4
| | | | | | | | | | | | * php: Added nanosecond support for Timestamp * php: Fixed compatibility test
* | Fix 32bit php testsBo Yang2018-07-132-2/+1
| |
* | Fix php testsBo Yang2018-07-132-0/+3
| |
* | Merge pull request #4827 from acozzette/merge-3-6-xAdam Cozzette2018-06-251-16/+33
|\| | | | | Merge 3.6.x branch into master
| * Use legacy name in php runtime (#4741)v3.6.0.1Paul Yang2018-06-071-16/+33
| | | | | | | | | | | | | | | | | | * Use legacy name in php runtime Old generated code cannot work with new runtime, because the new runtime assumes new class name for nested message. For details see #4738. * Remove unused method
| * Fix php memory leak test (#4692)Paul Yang2018-05-291-4/+17
| |
| * PHP namespaces for nested messages and enums (#4536)Brent Shaffer2018-05-2519-120/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * uses namespaces for nested messages and enums * fixes namespaces for PHP dist * fixes namespace for Descriptors, adds Cardinality and Kind * fixes nested namespaces for reserved words and adds tests * adds tests and generator fix for php class prefixes * fixes escaping of protobuf packages, enum comments, misc others * nice refactor of generated code * adds class files for backwards compatibility * simplifies code with templates * adds compatibility files to makefile * cleanup of generator and fixes nested namespace bug * regenerates proto types * remove internal BC classes * adds deprecated warning, adds methods back * simplifies if statement * fixes dist files * addresses review comments * adds back TYPE_URL_PREFIX constant * adds @deprecated to old nested class files * skips tests which require a separate process when protobuf.so is enabled * Adds tests for legacy nested classes that do not require separate processes to test * uses legacy names for GPBUtil message check * adds block for IDE @deprecated message * Namespace for nested message/enum in c extension * Remove unused code
| * Implement array constructor in php c extension.Bo Yang2018-05-252-81/+66
| |
| * PHP array constructors for protobuf messages (#4530)Brent Shaffer2018-05-252-1/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP array constructors for protobuf messages * removes Descriptor from error message * allows mergeFrom to accept an array * only use initWithDescriptor if instanceof MapEntry * adds doc comments * removes ability for constructors to take arrays for submessages * Revert "allows mergeFrom to accept an array" This reverts commit b7b72182d561634af12c5c5c56a7cda3b33241f9. * makes mergeFromArray protected and fixes mergeFrom whitespace * Separates merging from JSON and merging from PHP array * removes well-known types and json keys from array construction * Addresses PR review comments * cleans up tests * fixes exception messages
| * Adopt php_metadata_namespace in php code generator (#4622)Paul Yang2018-05-253-0/+4
| | | | | | | | | | | | | | | | | | | | | | * Adopt php_metadata_namespace in php code generator The php_metadata_namespace is corresponded to the relative directory of the metadata file. e.g., previously, the metadata file of foo.proto was GPBMetadata/Foo.php. If the php_metadata_namespace is "Metadata\\Bar", the metadata file will be Metadata/Bar/Foo.php. * Handle empty php_metadata_namespace
* | rename duplicate testMessageSetNullFail function (#3669)Pat Moroney2018-06-251-1/+1
| | | | | | | | the testMessageSetNullFail function was declared twice. So I renamed one to testMessageSetNullFailMap
* | Fix php memory leak test (#4692)Paul Yang2018-05-291-4/+17
| |
* | PHP namespaces for nested messages and enums (#4536)Brent Shaffer2018-05-2419-120/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * uses namespaces for nested messages and enums * fixes namespaces for PHP dist * fixes namespace for Descriptors, adds Cardinality and Kind * fixes nested namespaces for reserved words and adds tests * adds tests and generator fix for php class prefixes * fixes escaping of protobuf packages, enum comments, misc others * nice refactor of generated code * adds class files for backwards compatibility * simplifies code with templates * adds compatibility files to makefile * cleanup of generator and fixes nested namespace bug * regenerates proto types * remove internal BC classes * adds deprecated warning, adds methods back * simplifies if statement * fixes dist files * addresses review comments * adds back TYPE_URL_PREFIX constant * adds @deprecated to old nested class files * skips tests which require a separate process when protobuf.so is enabled * Adds tests for legacy nested classes that do not require separate processes to test * uses legacy names for GPBUtil message check * adds block for IDE @deprecated message * Namespace for nested message/enum in c extension * Remove unused code
* | Implement array constructor in php c extension.Bo Yang2018-05-242-81/+66
| |
* | PHP array constructors for protobuf messages (#4530)Brent Shaffer2018-05-242-1/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP array constructors for protobuf messages * removes Descriptor from error message * allows mergeFrom to accept an array * only use initWithDescriptor if instanceof MapEntry * adds doc comments * removes ability for constructors to take arrays for submessages * Revert "allows mergeFrom to accept an array" This reverts commit b7b72182d561634af12c5c5c56a7cda3b33241f9. * makes mergeFromArray protected and fixes mergeFrom whitespace * Separates merging from JSON and merging from PHP array * removes well-known types and json keys from array construction * Addresses PR review comments * cleans up tests * fixes exception messages
* | Adopt php_metadata_namespace in php code generator (#4622)Paul Yang2018-05-143-0/+4
|/ | | | | | | | | | | * Adopt php_metadata_namespace in php code generator The php_metadata_namespace is corresponded to the relative directory of the metadata file. e.g., previously, the metadata file of foo.proto was GPBMetadata/Foo.php. If the php_metadata_namespace is "Metadata\\Bar", the metadata file will be Metadata/Bar/Foo.php. * Handle empty php_metadata_namespace
* Throw error if user want to access message properties (#4603)Paul Yang2018-05-101-1/+1
| | | | | | * Throw error if user want to access message properties * Fix typo
* Fix more memory leak for php c extension (#4211)Paul Yang2018-01-253-9/+61
| | | | | | * Fix more memory leak for php c extension * Fix memory leak for php5.5
* Call php method via function name instead of calling directly.Bo Yang2017-12-122-5/+5
| | | | | | | 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.
* Replace private timelib_update_ts with public date_timestamp_getBo Yang2017-12-121-0/+12
|
* Add PROTOBUF_ENABLE_TIMESTAMP to let user decide whether timestamp utilBo Yang2017-12-121-1/+1
| | | | can be used at install time.
* Merge branch '3.5.0.1' into 3.5.xBo Yang2017-12-111-3/+23
|\
| * Fix memory leak in php7Bo Yang2017-12-061-1/+2
| |
| * Fix several more memory leakBo Yang2017-12-061-2/+21
| |
| * Fix memory leak when creating map field via array.Bo Yang2017-12-061-0/+5
| |
| * Fix memory leak when creating repeated field via array.Bo Yang2017-12-061-0/+5
| |
* | Recursively clear unknown fields in submessages. (#3982)Paul Yang2017-12-071-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Fix memory leak when creating map field via array.Bo Yang2017-12-041-0/+5
| |
* | Fix memory leak when creating repeated field via array.Bo Yang2017-12-011-0/+5
| |
* | Provide discardUnknonwnFields API in php (#3976)Paul Yang2017-11-301-0/+7
|/ | | | | | * Provide discardUnknownFields API in php implementation * Provide discardUnknownFields API in php c extension.
* Merge remote-tracking branch 'origin/3.4.x' into masterJisi Liu2017-10-117-0/+910
|\
| * Exclude valid constant name from reserved name.Bo Yang2017-09-125-223/+599
| |
| * Add prefix to php reserved keywords.Bo Yang2017-09-085-0/+534
| |
* | Reserve unknown fields in php (#3659)Paul Yang2017-10-094-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Add well known types to php runtime. (#3697)Paul Yang2017-10-052-5/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Enforce all error report for php tests. (#3670)Paul Yang2017-09-222-0/+7
| | | | | | | | | | | | * Enforce all error report for php tests. * Import vendor/autoload.php in tests/bootstrap_phpunit.php
* | Add native php support for Duration. (#3583)Paul Yang2017-09-051-0/+11
| |
* | Add php support for Timestamp. (#3575)Paul Yang2017-08-311-0/+21
| | | | | | | | | | | | * Add php support for Timestamp. * Fix comments
* | Add any support in php runtime. (#3486)Paul Yang2017-08-252-2/+74
|/ | | | | | | | | | | | * Add any support in php runtime. * Remove unused file in config.m4 * Fix comments * Fix error for tsrmls build * Add newly added file to Makefile.am
* Use message name as defined in php runtime.Bo Yang2017-08-213-0/+21
|
* Fix the bug in php c extension that setting one field can change ↵Paul Yang2017-08-043-0/+19
| | | | | | | | | | | | | | | | | | | | | | another field's value. (#3455) * Fix the bug in php c extension that setting one field can change another field's value. The reason is that previously, in c extension, it was assumed that the order that fields were declared in php is the same as the order of fields in upb. This is not true. Now, for every field in upb, we will look up the actual property that is corresponding to the upb field. * Cleanup pull request * Fix indentation * Port to php5 * Port with php7.1 * Port to zts