Skip to content

Commit 62dbc8b

Browse files
authored
Add compatibility with Yii 2.0.13. (#30)
* Add compatibility with Yii 2.0.13. * Upgrade compatibility to 7.2. * Upgrade AWS SDK compatibility to 7.2. * Fix AWS required version. * Downgrade to 7.1. * Fix README.
1 parent e28dd34 commit 62dbc8b

10 files changed

+940
-440
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ vendor/
77
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
88
# composer.lock
99
/nbproject/
10+
.idea

.travis.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
language: php
22

33
php:
4-
- 5.5
5-
- 5.6
64
- 7.0
5+
- 7.1
76

8-
addons:
9-
apt:
10-
packages:
11-
- ant-contrib
7+
sudo: required
8+
9+
services:
10+
- docker
1211

1312
install:
1413
- travis_retry composer self-update && composer --version
1514
- travis_retry composer install --prefer-source --no-interaction
16-
- dpkg -s ant-contrib
17-
- ant prepare
1815

1916
script:
20-
- ant
17+
- ./vendor/bin/phing test
18+
19+
after_success:
20+
- bash <(curl -s https://codecov.io/bash)

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ This is a DynamoDB extension for Yii2
1111
## Requirement
1212

1313
This extension requires
14-
- PHP minimum 5.4
15-
- Yii2 minimum 2.0.9 and lesser than 2.1
14+
- PHP minimum 7.0 and before 7.2 (Upgrade is still underwork)
15+
- Yii2 minimum 2.0.13 and lesser than 2.1
1616
- AWS PHP SDK 3.28
1717

1818
## Installation

build.xml

+5-61
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,14 @@
11
<project name="yii2-dynamodb" default="test" basedir=".">
2-
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="dynamodb/ant-contrib.jar" />
3-
<property name="dynamodbpath" location="${basedir}/dynamodb/DynamoDBLocal.jar"/>
4-
<target name="run-test">
5-
<exec executable="${basedir}/vendor/bin/phpunit" failonerror="true">
6-
</exec>
7-
</target>
82
<target name="start-server">
9-
<echo>Starting server</echo>
10-
<exec executable="java" spawn="true">
11-
<arg value="-Djava.library.path=${basedir}/dynamodb/DynamoDBLocal_Lib"/>
12-
<arg value="-jar"/>
13-
<arg value="${dynamodbpath}"/>
14-
<arg value="-inMemory"/>
15-
<arg value="-sharedDb"/>
16-
<arg value="--port" />
17-
<arg value="2700" />
18-
</exec>
19-
<sleep seconds="3"/>
3+
<exec command="./test/start_server.sh"/>
204
</target>
21-
<target name="stop-server">
22-
<exec executable="jps">
23-
<arg value="-l"/>
24-
<redirector outputproperty="dynamodb.pid">
25-
<outputfilterchain>
26-
<linecontains>
27-
<contains value="DynamoDBLocal.jar"/>
28-
</linecontains>
29-
<replaceregex pattern=" ${dynamodbpath}" replace="" />
30-
</outputfilterchain>
31-
</redirector>
32-
</exec>
33-
<echo>Cleaning up</echo>
34-
<exec executable="kill">
35-
<arg value="-9"/>
36-
<arg value="${dynamodb.pid}"/>
37-
</exec>
38-
</target>
39-
<target name="test">
40-
<antcall target="start-server"></antcall>
41-
<echo>Running phpunit</echo>
42-
<trycatch>
43-
<try>
44-
<antcall target="run-test">
45-
</antcall>
46-
</try>
47-
48-
<finally>
49-
<antcall target="stop-server">
50-
</antcall>
51-
</finally>
52-
</trycatch>
5+
<target name="test" depends="start-server">
6+
<exec command="./vendor/bin/phpunit" passthru="true" checkreturn="true"/>
537
</target>
548
<target name="phpcs">
55-
<exec executable="${basedir}/vendor/bin/phpcs" failonerror="true">
56-
<arg value="--standard=${basedir}/ruleset.xml"/>
9+
<exec executable="./vendor/bin/phpcs">
10+
<arg value="--standard=./ruleset.xml"/>
5711
<arg value="src"/>
5812
</exec>
5913
</target>
60-
<target name="prepare">
61-
<mkdir dir="${basedir}/dynamodb"/>
62-
<get dest="dynamodb/ant-contrib.jar" >
63-
<url url="http://central.maven.org/maven2/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar" />
64-
</get>
65-
<get dest="${basedir}/dynamodb/dynamodb.zip">
66-
<url url="http://s3-ap-southeast-1.amazonaws.com/dynamodb-local-singapore/dynamodb_local_latest.zip"/>
67-
</get>
68-
<unzip src="${basedir}/dynamodb/dynamodb.zip" dest="${basedir}/dynamodb/"/>
69-
</target>
7014
</project>

composer.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
],
1111
"minimum-stability": "dev",
1212
"require": {
13-
"php": ">=5.4.0",
14-
"yiisoft/yii2": "^2.0.9,<2.1",
15-
"aws/aws-sdk-php": "~3.28.0"
13+
"php": ">=7.0",
14+
"yiisoft/yii2": "^2.0.13",
15+
"aws/aws-sdk-php": "~3.28"
1616
},
1717
"require-dev": {
18-
"phpunit/phpunit": "4.6.*",
19-
"phpunit/dbunit": ">=1.2",
20-
"phpunit/php-code-coverage": "2.2.4",
18+
"phing/phing": "2.16.1",
19+
"phpunit/phpunit": "6.5.*",
20+
"phpunit/php-code-coverage": "^5.3",
2121
"fzaninotto/faker": "dev-master",
2222
"flow/jsonpath": "dev-master",
2323
"yiisoft/yii2-coding-standards": "*",

0 commit comments

Comments
 (0)