aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/tests
Commit message (Collapse)AuthorAge
* Merge pull request #4827 from acozzette/merge-3-6-xGravatar Adam Cozzette2018-06-25
|\ | | | | Merge 3.6.x branch into master
* | rename duplicate testMessageSetNullFail function (#3669)Gravatar Pat Moroney2018-06-25
| | | | | | | | the testMessageSetNullFail function was declared twice. So I renamed one to testMessageSetNullFailMap
| * Use legacy name in php runtime (#4741)Gravatar Paul Yang2018-06-07
| | | | | | | | | | | | | | | | | | * 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)Gravatar Paul Yang2018-05-29
| |
* | Fix php memory leak test (#4692)Gravatar Paul Yang2018-05-29
| |
| * PHP namespaces for nested messages and enums (#4536)Gravatar Brent Shaffer2018-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.Gravatar Bo Yang2018-05-25
| |
| * PHP array constructors for protobuf messages (#4530)Gravatar Brent Shaffer2018-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)Gravatar Paul Yang2018-05-25
| | | | | | | | | | | | | | | | | | | | | | * 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
* | PHP namespaces for nested messages and enums (#4536)Gravatar Brent Shaffer2018-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.Gravatar Bo Yang2018-05-24
| |
* | PHP array constructors for protobuf messages (#4530)Gravatar Brent Shaffer2018-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)Gravatar Paul Yang2018-05-14
|/ | | | | | | | | | | * 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)Gravatar Paul Yang2018-05-10
| | | | | | * Throw error if user want to access message properties * Fix typo
* Fix more memory leak for php c extension (#4211)Gravatar Paul Yang2018-01-25
| | | | | | * Fix more memory leak for php c extension * Fix memory leak for php5.5
* Call php method via function name instead of calling directly.Gravatar Bo Yang2017-12-12
| | | | | | | 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_getGravatar Bo Yang2017-12-12
|
* Add PROTOBUF_ENABLE_TIMESTAMP to let user decide whether timestamp utilGravatar Bo Yang2017-12-12
| | | | can be used at install time.
* Merge branch '3.5.0.1' into 3.5.xGravatar Bo Yang2017-12-11
|\
* | Recursively clear unknown fields in submessages. (#3982)Gravatar Paul Yang2017-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 in php7Gravatar Bo Yang2017-12-06
| |
| * Fix several more memory leakGravatar Bo Yang2017-12-06
| |
| * Fix memory leak when creating map field via array.Gravatar Bo Yang2017-12-06
| |
| * Fix memory leak when creating repeated field via array.Gravatar Bo Yang2017-12-06
| |
* | Fix memory leak when creating map field via array.Gravatar Bo Yang2017-12-04
| |
* | Fix memory leak when creating repeated field via array.Gravatar Bo Yang2017-12-01
| |
* | Provide discardUnknonwnFields API in php (#3976)Gravatar Paul Yang2017-11-30
|/ | | | | | * Provide discardUnknownFields API in php implementation * Provide discardUnknownFields API in php c extension.
* Merge remote-tracking branch 'origin/3.4.x' into masterGravatar Jisi Liu2017-10-11
|\
* | Reserve unknown fields in php (#3659)Gravatar Paul Yang2017-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)Gravatar Paul Yang2017-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)Gravatar Paul Yang2017-09-22
| | | | | | | | | | | | * Enforce all error report for php tests. * Import vendor/autoload.php in tests/bootstrap_phpunit.php
| * Exclude valid constant name from reserved name.Gravatar Bo Yang2017-09-12
| |
| * Add prefix to php reserved keywords.Gravatar Bo Yang2017-09-08
| |
* | Add native php support for Duration. (#3583)Gravatar Paul Yang2017-09-05
| |
* | Add php support for Timestamp. (#3575)Gravatar Paul Yang2017-08-31
| | | | | | | | | | | | * Add php support for Timestamp. * Fix comments
* | Add any support in php runtime. (#3486)Gravatar Paul Yang2017-08-25
|/ | | | | | | | | | | | * 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.Gravatar Bo Yang2017-08-21
|
* Fix the bug in php c extension that setting one field can change ↵Gravatar Paul Yang2017-08-04
| | | | | | | | | | | | | | | | | | | | | | 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
* Add getClass for php Descriptor in c extension (#3443)Gravatar Paul Yang2017-08-02
|
* Expose descriptor API in php c extension (#3422)Gravatar Paul Yang2017-08-02
|
* Fix cycle dependency for repeated field not collected by gc (#3399)Gravatar Paul Yang2017-07-25
|
* Support PHP generic services (#3269)Gravatar Matt A2017-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add php_generic_services option * Generate PHP generic services * Respect namespaces for generated PHP services * Test PHP generated services * Rename PHP generator service method doc comment function * Correct phpdoc service method case * Test namespaced PHP generic services * Always use the FQCN for PHP generic service input/output * Add generated_service_test to php test.sh * Add php service test protos to CI * Add php service files to php_EXTRA_DIST * Use Interface suffix for php generic services
* remove pass by reference for php setters (#3344)Gravatar Brent Shaffer2017-07-17
| | | | | | * remove pass by reference for php setters * comments out memory leak test
* Initial value in generated code cannot be used by c extension. (#3367)Gravatar Paul Yang2017-07-14
| | | | | | | | | | In the generated code of previous versions, each php field is given an initial value. In c extension, it was assumed that the field order in the generated code is consistent with upb fields order, so that the correct initial value can be bound to the correct upb field. However, this may not be true. The order of fields in generated code is decided by proto compiler, while the order of upb fields is decided by the hash function used in c extension. This PR fixes the issue by reset the initial value at runtime.
* Add map iterator for c extension (#3350)Gravatar Paul Yang2017-07-13
|
* Uncomment php tests (#3301)Gravatar Paul Yang2017-07-09
|
* Add json encode/decode for php. (#3226)Gravatar Paul Yang2017-06-30
| | | | | | | | | | * Add json encode/decode for php. * Fix php conformance test on 32-bit machines. * Fix conformance test for c extension. * Fix comments
* adds PHPDoc @return and @param for getters and setters respectively (#3131)Gravatar Brent Shaffer2017-06-27
| | | | | | | | | | | | | | | | | | | | | | | | * adds PHPDoc @return and @param for getters and setters respectively * addresses changes in PR review * adds documentation tests * Update php_generator: - Prepend \ to names where required - Remove <pre> tags - Update protobuf field comments * Updates class files with the protobuf changes * Addresses review comments * removes Protobuf Type line from PHP generated classes * fixes phpdoc test * adds array types to phpdoc
* Switch to addEnumType to fix fatal error (#3225)Gravatar Ryan Gordon2017-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Switch to addEnumType to fix fatal error * Fixing more cases of HHVM incompatibility * Updating tests to be hhvm compatible * Fixing tests * Fixing merge * Don't use call_user_func, should hopefully fix tests * Fixing spelling * Fixing another misspelling in a test * Fixing placement of append and kvUpdate functions * Actually fix function helpers * Remove double addEnumType. How did this ever work? * Fixing a couple more tests * Only use the setter if the return value isn't an object
* Add new file option php_namespace. (#3162)Gravatar Paul Yang2017-06-05
| | | | | | | | | | | | | | | | * Add new file option php_namespace. Use this option to change the namespace of php generated classes. Default is empty. When this option is empty, the package name will be used for determining the namespace. * Uncomment commented tests * Revert gdb test change * Update csharp descriptor. * Add test for empty php_namespace.