8b87075924
* 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.
31 lines
932 B
JSON
31 lines
932 B
JSON
{
|
|
"name": "google/protobuf",
|
|
"type": "library",
|
|
"description": "proto library for PHP",
|
|
"keywords": ["proto"],
|
|
"homepage": "https://developers.google.com/protocol-buffers/",
|
|
"license": "BSD-3-Clause",
|
|
"require": {
|
|
"php": ">=7.0.0"
|
|
},
|
|
"require-dev": {
|
|
"phpunit/phpunit": ">=5.0.0"
|
|
},
|
|
"autoload": {
|
|
"psr-4": {
|
|
"Google\\Protobuf\\": "src/Google/Protobuf",
|
|
"GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf"
|
|
}
|
|
},
|
|
"autoload-dev": {
|
|
"psr-4": {
|
|
"": "tmp"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"test_c": "./generate_test_protos.sh && ./tests/compile_extension.sh && php -dextension=ext/google/protobuf/modules/protobuf.so vendor/bin/phpunit --bootstrap tests/force_c_ext.php tests",
|
|
"test": "./generate_test_protos.sh && vendor/bin/phpunit tests",
|
|
"aggregate_metadata_test": "./generate_test_protos.sh --aggregate_metadata && vendor/bin/phpunit tests"
|
|
}
|
|
}
|