* 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.
* 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.
* 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.
* Simplified PHP testing setup.
- Consolidated on a single autoloader, created by composer.
- Consolidated on a single phpunit invocation strategy: we run
phpunit on a directory, which will run all tests matching *Test.php
in that directory.
- We now rely on autoloading to import all test protos. require_once()
calls for test protos are removed.
- For now the valgrind tests are removed. A follow-up PR will re-enable
them in a more robust way.
* More improvements to PHP testing.
1. Replace custom PHPUnit-selection logic in test.sh with generic
composer version selection.
2. Optimized both test proto generation and the custom extension
build to avoid unnecessary work when the files are already up
to date.
* Added assertions to verify that the C test doesn't use PHP sources.
* Updated tests.sh for the new PHP testing commands.
* Removed obsolete rules from tests.sh.
* Fixed generate_test_protos.sh for when tmp does not exist.
Also removed undefined_test.php and fixed Makefile.am.
* Added php8.0_all again which is still used.
* Added missing file to Makefile.am.
* Re-added php_all_32 rule which is also still used.
* Updated testing commands for macOS and download composer.
* Use /usr/local/bin on mac instead of /usr/bin, since the latter is not writable.
* Removed references to legacy class names from generated code.
* Removed old PHP extension in favor of new extension. This drops PHP5 compat.
* Updated failure lists for things fixed by the new extension.
* Updated Makefile.am for new file list.
* Fix distcheck.
* Added code for the new PHP extension.
* Removed a bunch of unused variables shown by compiler warnings.
* Test protobuf2 in the tests.
* Updated upb version to fix a goldenfile test.
* Added pure-PHP changes. Extension now passes all tests.
* Enabled protobuf2 for all C extension tests.
* Fixed pure=PHP lib: full names no longer start with '.'.
* Added files for new extension to Makefile.am.
* Downgraded make-preload.py to python 2, since python3 isn't available in the php_all Kokoro image.
* Disable tests of new C extension with PHP 5.x.
* Also do not compile the extension for PHP5.
* Accept version 5.*.*, and use /usr/bin/python.
* Addressed PR comments.
* Addressed PR comments.
* Added "const" to a parameter and fixed a memory leak seen in Valgrind.
* Stop testing the C extension for PHP5.
The next release of protobuf will deprecate the C extension
for PHP5, see:
https://github.com/protocolbuffers/protobuf/issues/7525
* Made the PHP5.6 Mac test only exercise pure-PHP.
* Build protoc for PHP 5.6 test.
* Rewrote bundling script in PHP to avoid dependency on Python.
* A few more fixes.
* Fixed int32/int64 behavior for 32-bit builds.
* Match more PHP versions in testing script.
* Use phpize --clean before building extension.
* Force-delete configure.in to avoid phpize problems cross-version.
* Delete both configure.ac and configure.in.
* De-duplicated code to generate PHP protos and install phpunit.
* Removed all references to generate_php_test_proto.
* Replaced with internal_build_cpp.
* Make Timestamp::__construct() static to avoid conflicts with MongoDB.
* Replicated PHPUnit versions and added new script to Makefile.am.
* Fixed filename in Makefile.am.
* Disabled test that SEGV's on macOS.
* Removed extraneous "set -e".
* Make sure generate_protos.sh happens on every test path.
* Removed stray '$' chars.
* Added proper support for aggregate_metadata tests. But now I get a stack overflow.
Stack overflow:
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
/Users/haberman/code/protobuf/php/tests/generated/GPBMetadata/Proto/TestDescriptors.php:16
namespace GPBMetadata\Proto;
class TestDescriptors
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
\GPBMetadata\Proto\TestDescriptors::initOnce();
$pool->internalAddGeneratedFile(hex2bin(
""
), true);
static::$is_initialized = true;
}
}
* Fixed and verified metadata aggregation testing.
* Simplified PHP testing scripts.
- allow them to be run from any directory.
- remove "VERSION" arg, we can get PHP from $PATH.
* Added a few places I missed.
* Removed redundant "cd `dirname $0`".
Also replaced all backticks with $(), for consistency.
* 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
* 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