Skip to content

Commit

Permalink
Add compatibility with Yii 2.0.13. (#30)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
petrabarus authored Jun 20, 2018
1 parent e28dd34 commit 62dbc8b
Show file tree
Hide file tree
Showing 10 changed files with 940 additions and 440 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ vendor/
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
/nbproject/
.idea
18 changes: 9 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
language: php

php:
- 5.5
- 5.6
- 7.0
- 7.1

addons:
apt:
packages:
- ant-contrib
sudo: required

services:
- docker

install:
- travis_retry composer self-update && composer --version
- travis_retry composer install --prefer-source --no-interaction
- dpkg -s ant-contrib
- ant prepare

script:
- ant
- ./vendor/bin/phing test

after_success:
- bash <(curl -s https://codecov.io/bash)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ This is a DynamoDB extension for Yii2
## Requirement

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

## Installation
Expand Down
66 changes: 5 additions & 61 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,70 +1,14 @@
<project name="yii2-dynamodb" default="test" basedir=".">
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="dynamodb/ant-contrib.jar" />
<property name="dynamodbpath" location="${basedir}/dynamodb/DynamoDBLocal.jar"/>
<target name="run-test">
<exec executable="${basedir}/vendor/bin/phpunit" failonerror="true">
</exec>
</target>
<target name="start-server">
<echo>Starting server</echo>
<exec executable="java" spawn="true">
<arg value="-Djava.library.path=${basedir}/dynamodb/DynamoDBLocal_Lib"/>
<arg value="-jar"/>
<arg value="${dynamodbpath}"/>
<arg value="-inMemory"/>
<arg value="-sharedDb"/>
<arg value="--port" />
<arg value="2700" />
</exec>
<sleep seconds="3"/>
<exec command="./test/start_server.sh"/>
</target>
<target name="stop-server">
<exec executable="jps">
<arg value="-l"/>
<redirector outputproperty="dynamodb.pid">
<outputfilterchain>
<linecontains>
<contains value="DynamoDBLocal.jar"/>
</linecontains>
<replaceregex pattern=" ${dynamodbpath}" replace="" />
</outputfilterchain>
</redirector>
</exec>
<echo>Cleaning up</echo>
<exec executable="kill">
<arg value="-9"/>
<arg value="${dynamodb.pid}"/>
</exec>
</target>
<target name="test">
<antcall target="start-server"></antcall>
<echo>Running phpunit</echo>
<trycatch>
<try>
<antcall target="run-test">
</antcall>
</try>

<finally>
<antcall target="stop-server">
</antcall>
</finally>
</trycatch>
<target name="test" depends="start-server">
<exec command="./vendor/bin/phpunit" passthru="true" checkreturn="true"/>
</target>
<target name="phpcs">
<exec executable="${basedir}/vendor/bin/phpcs" failonerror="true">
<arg value="--standard=${basedir}/ruleset.xml"/>
<exec executable="./vendor/bin/phpcs">
<arg value="--standard=./ruleset.xml"/>
<arg value="src"/>
</exec>
</target>
<target name="prepare">
<mkdir dir="${basedir}/dynamodb"/>
<get dest="dynamodb/ant-contrib.jar" >
<url url="http://central.maven.org/maven2/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar" />
</get>
<get dest="${basedir}/dynamodb/dynamodb.zip">
<url url="http://s3-ap-southeast-1.amazonaws.com/dynamodb-local-singapore/dynamodb_local_latest.zip"/>
</get>
<unzip src="${basedir}/dynamodb/dynamodb.zip" dest="${basedir}/dynamodb/"/>
</target>
</project>
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
],
"minimum-stability": "dev",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "^2.0.9,<2.1",
"aws/aws-sdk-php": "~3.28.0"
"php": ">=7.0",
"yiisoft/yii2": "^2.0.13",
"aws/aws-sdk-php": "~3.28"
},
"require-dev": {
"phpunit/phpunit": "4.6.*",
"phpunit/dbunit": ">=1.2",
"phpunit/php-code-coverage": "2.2.4",
"phing/phing": "2.16.1",
"phpunit/phpunit": "6.5.*",
"phpunit/php-code-coverage": "^5.3",
"fzaninotto/faker": "dev-master",
"flow/jsonpath": "dev-master",
"yiisoft/yii2-coding-standards": "*",
Expand Down
Loading

0 comments on commit 62dbc8b

Please sign in to comment.