This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/main by this push:
new 7da6b7319 AVRO-2843: [PHP] Copy composer setup from Apache Thrift
(#3057)
7da6b7319 is described below
commit 7da6b7319774d67a4738e0179b48c3f587218883
Author: José Joaquín Atria <[email protected]>
AuthorDate: Thu Feb 6 12:43:34 2025 +0000
AVRO-2843: [PHP] Copy composer setup from Apache Thrift (#3057)
---
composer.json | 63 ++++++++++++++++++++++++++++++++++++++-----
lang/php/build.sh | 6 ++---
lang/php/monorepo.json | 16 -----------
lang/php/test/test_helper.php | 4 +--
4 files changed, 62 insertions(+), 27 deletions(-)
diff --git a/composer.json b/composer.json
index b39f209ff..adcd2180f 100644
--- a/composer.json
+++ b/composer.json
@@ -3,16 +3,67 @@
"description": "Apache Avro™ is a data serialization system.",
"minimum-stability": "stable",
"license": "Apache-2.0",
+ "homepage": "http://avro.apache.org",
+ "type": "library",
+ "keywords": [
+ "avro",
+ "data",
+ "serialization"
+ ],
+ "readme": "README.md",
+ "authors": [
+ {
+ "name": "Apache Avro Developers",
+ "email": "[email protected]",
+ "homepage": "http://avro.apache.org"
+ }
+ ],
+ "support": {
+ "email": "[email protected]",
+ "issues": "https://issues.apache.org/jira/browse/AVRO"
+ },
"require": {
- "beberlei/composer-monorepo-plugin": "0.16.5"
+ "php": "^7.1 || ^8.0"
},
+ "deps": [
+ "vendor/phpunit/phpunit",
+ "vendor/squizlabs/php_codesniffer"
+ ],
"require-dev": {
- "phpunit/phpunit": "^9.1",
- "squizlabs/php_codesniffer": "^3.5"
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
+ "squizlabs/php_codesniffer": "3.*",
+ "php-mock/php-mock-phpunit": "^2.10",
+ "ext-json": "*",
+ "ext-xml": "*",
+ "ext-curl": "*",
+ "ext-pcntl": "*"
+ },
+ "autoload": {
+ "psr-4": {
+ "Apache\\Avro\\": "lang/php/lib/"
+ }
},
- "config": {
- "allow-plugins": {
- "beberlei/composer-monorepo-plugin": true
+ "autoload-dev": {
+ "psr-4": {
+ "Apache\\Avro\\Tests\\": "lang/php/test/"
}
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "archive": {
+ "exclude": [
+ "*",
+ ".*",
+ "!/CHANGES.md",
+ "!/LICENSE",
+ "!/NOTICE",
+ "!/README.md",
+ "!/composer.json",
+ "!/lang/php/README.md",
+ "!/lang/php/lib"
+ ]
}
}
diff --git a/lang/php/build.sh b/lang/php/build.sh
index d470e8b91..8b5497001 100755
--- a/lang/php/build.sh
+++ b/lang/php/build.sh
@@ -54,18 +54,18 @@ do
test-interop)
composer install -d "../.."
- vendor/bin/phpunit test/InterOpTest.php
+ ../../vendor/bin/phpunit test/InterOpTest.php
;;
lint)
composer install -d "../.."
find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l
- vendor/bin/phpcs --standard=PSR12 lib
+ ../../vendor/bin/phpcs --standard=PSR12 lib
;;
test)
composer install -d "../.."
- vendor/bin/phpunit -v
+ ../../vendor/bin/phpunit -v
;;
dist)
diff --git a/lang/php/monorepo.json b/lang/php/monorepo.json
deleted file mode 100644
index dfbdb75e7..000000000
--- a/lang/php/monorepo.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "deps": [
- "vendor/phpunit/phpunit",
- "vendor/squizlabs/php_codesniffer"
- ],
- "autoload": {
- "psr-4": {
- "Apache\\Avro\\": "lib/"
- }
- },
- "autoload-dev": {
- "psr-4": {
- "Apache\\Avro\\Tests\\": "test/"
- }
- }
-}
diff --git a/lang/php/test/test_helper.php b/lang/php/test/test_helper.php
index b911aaf4a..78af6775a 100644
--- a/lang/php/test/test_helper.php
+++ b/lang/php/test/test_helper.php
@@ -17,8 +17,8 @@
* limitations under the License.
*/
-if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
- include __DIR__ . '/../vendor/autoload.php';
+if (file_exists(__DIR__ . '/../../../vendor/autoload.php')) {
+ include __DIR__ . '/../../../vendor/autoload.php';
} else {
include __DIR__ . '/../lib/autoload.php';
}