Skip to content

Commit 7da6b73

Browse files
authored
AVRO-2843: [PHP] Copy composer setup from Apache Thrift (#3057)
1 parent fb1850b commit 7da6b73

File tree

4 files changed

+62
-27
lines changed

4 files changed

+62
-27
lines changed

composer.json

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,67 @@
33
"description": "Apache Avro™ is a data serialization system.",
44
"minimum-stability": "stable",
55
"license": "Apache-2.0",
6+
"homepage": "http://avro.apache.org",
7+
"type": "library",
8+
"keywords": [
9+
"avro",
10+
"data",
11+
"serialization"
12+
],
13+
"readme": "README.md",
14+
"authors": [
15+
{
16+
"name": "Apache Avro Developers",
17+
"email": "dev@avro.apache.org",
18+
"homepage": "http://avro.apache.org"
19+
}
20+
],
21+
"support": {
22+
"email": "dev@avro.apache.org",
23+
"issues": "https://issues.apache.org/jira/browse/AVRO"
24+
},
625
"require": {
7-
"beberlei/composer-monorepo-plugin": "0.16.5"
26+
"php": "^7.1 || ^8.0"
827
},
28+
"deps": [
29+
"vendor/phpunit/phpunit",
30+
"vendor/squizlabs/php_codesniffer"
31+
],
932
"require-dev": {
10-
"phpunit/phpunit": "^9.1",
11-
"squizlabs/php_codesniffer": "^3.5"
33+
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
34+
"squizlabs/php_codesniffer": "3.*",
35+
"php-mock/php-mock-phpunit": "^2.10",
36+
"ext-json": "*",
37+
"ext-xml": "*",
38+
"ext-curl": "*",
39+
"ext-pcntl": "*"
40+
},
41+
"autoload": {
42+
"psr-4": {
43+
"Apache\\Avro\\": "lang/php/lib/"
44+
}
1245
},
13-
"config": {
14-
"allow-plugins": {
15-
"beberlei/composer-monorepo-plugin": true
46+
"autoload-dev": {
47+
"psr-4": {
48+
"Apache\\Avro\\Tests\\": "lang/php/test/"
1649
}
50+
},
51+
"extra": {
52+
"branch-alias": {
53+
"dev-master": "1.0.x-dev"
54+
}
55+
},
56+
"archive": {
57+
"exclude": [
58+
"*",
59+
".*",
60+
"!/CHANGES.md",
61+
"!/LICENSE",
62+
"!/NOTICE",
63+
"!/README.md",
64+
"!/composer.json",
65+
"!/lang/php/README.md",
66+
"!/lang/php/lib"
67+
]
1768
}
1869
}

lang/php/build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,18 @@ do
5454

5555
test-interop)
5656
composer install -d "../.."
57-
vendor/bin/phpunit test/InterOpTest.php
57+
../../vendor/bin/phpunit test/InterOpTest.php
5858
;;
5959

6060
lint)
6161
composer install -d "../.."
6262
find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l
63-
vendor/bin/phpcs --standard=PSR12 lib
63+
../../vendor/bin/phpcs --standard=PSR12 lib
6464
;;
6565

6666
test)
6767
composer install -d "../.."
68-
vendor/bin/phpunit -v
68+
../../vendor/bin/phpunit -v
6969
;;
7070

7171
dist)

lang/php/monorepo.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

lang/php/test/test_helper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
* limitations under the License.
1818
*/
1919

20-
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
21-
include __DIR__ . '/../vendor/autoload.php';
20+
if (file_exists(__DIR__ . '/../../../vendor/autoload.php')) {
21+
include __DIR__ . '/../../../vendor/autoload.php';
2222
} else {
2323
include __DIR__ . '/../lib/autoload.php';
2424
}

0 commit comments

Comments
 (0)