Commit Graph

495 Commits

Author SHA1 Message Date
Maximilian
82372d8fe6
Use proper SPDX license identifier (#9441)
The previously used term "3-Clause BSD License" is not properly
standarized. A common standard is SPDX, therefore "3-Clause BSD License"
is substituted with "BSD-3-Clause" which is a SPDX identifier.

`grep -rl "3-Clause BSD License" | xargs -n1 sed -i "s/3-Clause BSD
License/BSD-3-Clause/g"`
2022-01-27 00:23:14 +00:00
Adam Cozzette
5bb34e9930 Merge branch '3.19.x' into merge-3.19.x 2022-01-11 18:07:17 +00:00
Adam Cozzette
cc7b1b5323 Update protobuf version 2022-01-10 18:08:15 -08:00
Adam Cozzette
eb94f17a8b Update protobuf version 2022-01-05 10:05:11 -08:00
Adam Cozzette
7ccf4d8f67
Merge pull request #9169 from protocolbuffers/3.19.x
Merge 3.19.x into master
2021-11-02 10:10:47 -07:00
Adam Cozzette
7c40b2df1f
Update protobuf version (#9167) 2021-10-28 14:07:53 -07:00
Adam Cozzette
1c8ae24595 Update changelog for 3.19.1
I also updated CHANGES.txt to include a couple things I forgot to add
for 3.19.0.
2021-10-28 18:09:06 +00:00
Chris Bainbridge
65852d6e9c
Fix comment syntax in any.proto (#8792)
* Fix comment syntax in any.proto

Remove extra spaces which cause incorrect indentation in godoc.
Remove the "====" style title which is not rendered by godoc.

* Run ./generate_descriptor_proto.sh
2021-10-27 11:28:21 -07:00
Adam Cozzette
17b30e9647
Update protobuf version (#9119) 2021-10-20 10:14:02 -07:00
Adam Cozzette
3f3e6f47c6
Update version to 3.19.0-rc2 and fix changelog about Java 7 (#9116)
* Update protobuf version

* Update CHANGES.txt to reflect that we're not yet dropping Java 7
2021-10-19 09:01:57 -07:00
Adam Cozzette
53a1d66d9d
Update PHP release notes for 3.19.0 (#9110) 2021-10-15 15:35:27 -07:00
Adam Cozzette
519340d662
Update protobuf version (#9106) 2021-10-15 14:33:06 -07:00
Josh
8171716ae9
Added "object" as a reserved name for PHP (#8962)
* Added "object" as a reserved name for PHP

* Fixed spacing
2021-10-12 16:14:05 -07:00
Adam Cozzette
2a75e8ca58 Merge branch '3.18.x' into merge-3.18.x 2021-10-05 14:04:13 -07:00
Adam Cozzette
0dab03ba7b
Update protobuf version to 3.18.1 (#9051)
* Update protobuf version

* Update PHP release notes in package.xml
2021-10-04 17:43:33 -07:00
Joshua Haberman
2128ce074f Merge branch '3.18.x' into merge-release 2021-09-27 15:29:06 -07:00
Paul Yang
12fb2b7450
Update protobuf version (#8973)
* Update protobuf version

* Update php notes
2021-09-13 12:34:03 -07:00
Joshua Haberman
26e0ee8eec Fixed multirequest.sh script for when nohup.out does not exist. 2021-09-11 09:24:14 -07:00
Joshua Haberman
759a539736 Fixed PHP SEGV when constructing messages from a destructor.
This also fixes the keep_descriptor_pool_after_request option, which
was not working properly.
2021-09-10 16:57:59 -07:00
Joshua Haberman
44df0abc02 Added support for PHP 8.1 (currently in RC1). 2021-09-09 21:32:11 -07:00
Joshua Haberman
e5c570bb57 Sync from Piper @395706834
PROTOBUF_SYNC_PIPER
2021-09-09 08:21:42 -07:00
Bo Yang
d8f55782b0 Update protobuf version 2021-08-27 14:39:58 -07:00
Paul Yang
7cbc08615f
Update protobuf version (#8887) 2021-08-18 17:20:20 -07:00
Bo Yang
509aee4b8b Sync from Piper @391414001
PROTOBUF_SYNC_PIPER
2021-08-17 17:26:34 -07:00
Deanna Garcia
9b7685436b Removing php workaround 2021-08-13 20:09:07 +00:00
Adam Cozzette
8a3c4948a4
Merge pull request #8858 from acozzette/sync-stage
Integrate from Piper for C++, Java, and Python
2021-08-09 15:55:00 -07:00
Adam Cozzette
75680f8a70 Remove the _build directory before building protoc 2021-08-09 09:37:19 -07:00
Adam Cozzette
ed1d7443ff Make generate_test_protos.sh echo commands 2021-08-06 15:53:14 -07:00
Adam Cozzette
562fc946c7 Sync from Piper @388508285
PROTOBUF_SYNC_PIPER
2021-08-03 11:58:05 -07:00
Joshua Haberman
c5960fdcf5 Removed PHP support for third_party/wyhash in favor of ABSL wyhash. 2021-08-02 15:36:53 -07:00
Joshua Haberman
9d578a3a9c Ported Ruby to ABSL wyhash. 2021-08-02 15:32:01 -07:00
Brent Shaffer
2126123b53
PHP: add new keywords to missing test (#8801) 2021-07-08 12:54:08 -07:00
Brent Shaffer
d2c82dff39
fix: missing comma in PHP names.c and generator.cc (#8787)
* Update names.c

* Update php_generator.cc
2021-07-07 13:02:34 -07:00
Brent Shaffer
d995c1c182 update counts 2021-06-29 09:17:25 -07:00
Brent Shaffer
bade043986 update reserved names: add finally, fn, match, yield 2021-06-29 07:56:08 -07:00
Paul Yang
b24d0c2b7a
Disable the warning for adding duplicated symbol (#8720)
When we need to aggregate metadata, duplication does happen.
Disable the warning for now to mitigate the noise for users of aggregate
metadata.
2021-06-09 15:09:27 -07:00
Deanna Garcia
367851d124 Update protobuf version 2021-06-04 21:21:39 +00:00
deannagarcia
f5a0e3988b
Merge branch 'master' into 3.17.x 2021-06-04 17:22:24 +00:00
Deanna Garcia
506f2273d1 Merging 3.17.x branch into master 2021-06-02 22:29:40 +00:00
Joshua Haberman
75de6aa21a Fixed sub-message getters for well-known types when message is unset.
The well-known types generate C code into wkt.inc, and this C code was
not testing isset($msg->submsg_field) like the generated code does:

```php
// PHP generated getter: checks isset().
public function getOptions()
{
    return isset($this->options) ? $this->options : null;
}
```

```c
// C generated getter, does not check upb_msg_has()
static PHP_METHOD(google_protobuf_Value, getListValue) {
  Message* intern = (Message*)Z_OBJ_P(getThis());
  const upb_fielddef *f = upb_msgdef_ntofz(intern->desc->msgdef,
                                           "list_value");
  zval ret;
  Message_get(intern, f, &ret);
  RETURN_COPY_VALUE(&ret);
}
```

This led to an error where we wnuld try to get a sub-message field from upb
when it `upb_msg_has(msg, field) == false`, which is an error according to upb.

There are two possible fixes for this bug. A guiding principle is that we want
the generated C code in wkt.inc to have the same behavior as PHP generated
code. Following this principle, the two possible fixes are:

1. Change the code generator for wkt.inc to check upb_msg_has(f) before
   calling Message_get(). This would match the isset() check that the
   The PHP generated code does, and we would leave the PHP code unchanged.

2. Change Message_get() to itself perform the upb_msg_has(f) check for
   sub-message fields. This means that generated code would no longer need
   to perform an isset() check, so we would want to remove this check from
   the PHP generated code also to avoid a redundant check.

Both of these are reasonable fixes, and it is not immediately obvious which is
better. (1) has the benefit of resolving this case when we are in more
specialized code (a getter function that already knows this is a sub-message
field), and therefore avoids performing the check later in more generic code
that would have to test the type again. On the other hand, the isset() check is
not needed for the pure PHP implementation, as an unset PHP variable will
return `null` anyway. And for the C extension, we'd rather check upb_msg_has()
at the C level instead of PHP.

So this change implements (2). The generated code in wkt.inc remains unchanged,
and the PHP generated code for sub-message fields is changed to remove the
isset() check.
2021-05-27 10:45:18 -07:00
Deanna Garcia
d303bba1bb Updating change logs 2021-05-25 21:02:52 +00:00
Deanna Garcia
5b8208ecea Update protobuf version 2021-05-25 19:36:05 +00:00
Joshua Haberman
9521803d40 Sync from Piper @375548932
PROTOBUF_SYNC_PIPER
2021-05-24 13:49:39 -07:00
Adam Cozzette
b506c31de0 Merge branch '3.17.x' into merge-3.17.x 2021-05-24 12:24:38 -07:00
Joshua Haberman
e635605003
Added missing release notes for 3.17.1. (#8649) 2021-05-24 11:15:46 -07:00
Adam Cozzette
52784ced2f
Update protobuf version (#8633) 2021-05-19 16:43:44 -07:00
Joshua Haberman
0b87475592
Php & Ruby Cherry Picks for 3.17.1 (#8632)
* Some more updates to PHP testing infrastructure (#8576)

* WIP.

* Added build config for all of the tests.

* Use ../src/protoc if it is available, for cases where Bazel isn't available.

* Added test_php.sh.

* Fix for the broken macOS tests.

* Move all jobs to use php80 instead of lots of separate jobs.

* Only pass -t flag if we are running in a terminal.

* Updated php_all job to use new Docker stuff.

* Fixed PHP memory leaks and arginfo errors (#8614)

* Fixed a bunch of incorrect arginfo and a few incorrect error messages.

* Passes mem check test with no leaks!

* WIP.

* Fix build warning that was causing Bazel build to fail.

* Added compatibility code for PHP <8.0.

* Added test_valgrind target and made tests Valgrind-clean.

* Updated Valgrind test to fail if memory leaks are detected.

* Removed intermediate shell script so commands are easier to cut, paste, and modify.

* Passing all Valgrind tests!

* Hoist addref into ObjCache_Get().

* Removed special case of map descriptors by keying object map on upb_msgdef.

* Removed all remaining RETURN_ZVAL() macros.

* Removed all explicit reference add/del operations.

* Added REFCOUNTING.md to Makefile.am.

* Updated upb version and fixed PHP to not get unset message field. (#8621)

* Updated upb version and fixed PHP to not get unset message field.

* Updated changelog.

* Fixed preproc test to handle old versions of Clang withot __has_attribute().

* A second try at fixing __has_attribute().

* Copy __has_attribute() fix to cc file also.

* Updated failure list for PHP for fixed test.

* Updated version of upb for Ruby (#8624)

* Updated upb.

* Preserve legacy behavior for unset messages.

* Updated failure list.

* Updated CHANGES.txt.

* Added erroneously-deleted test file.

* Fixed condition on compatibility code.

* Re-introduced deleted file again, and fixed Rakefile to not delete it.

* Fix generation of test protos.
2021-05-19 15:53:47 -07:00
Joshua Haberman
7611164792
Updated upb version and fixed PHP to not get unset message field. (#8621)
* Updated upb version and fixed PHP to not get unset message field.

* Updated changelog.

* Fixed preproc test to handle old versions of Clang withot __has_attribute().

* A second try at fixing __has_attribute().

* Copy __has_attribute() fix to cc file also.

* Updated failure list for PHP for fixed test.
2021-05-17 15:27:05 -07:00
Joshua Haberman
7e95c64dfb
[PHP] Fixed $msg->setMessage(null) to properly clear the message. (#8472)
* [PHP] Fixed $msg->setMessage(null) to properly clear the message.

Fixes: https://github.com/protocolbuffers/protobuf/issues/8457

* Changed pure PHP to throw TypeError, and added a test for null.

* Added more tests and fixed null in setter for oneof.
2021-05-14 16:48:45 -07:00
Deanna Garcia
380e352b0b Sync from Piper @373820256
PROTOBUF_SYNC_PIPER
2021-05-14 17:50:31 +00:00