diff --git a/.travis.yml b/.travis.yml index efe6b2b..a62040b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,9 @@ language: php php: - - 5.4 - - 5.5 - - 5.6 - 7.0 - 7.1 + - 7.2 env: global: @@ -14,18 +12,17 @@ env: - REQUIRE="" - DB=mysql CAKE_VERSION=2 + - secure: "kmIqmn7zQbmOuceFPERYUeGgL42iDeY61oHGFJIIbfGW9iZBTSO8FzZ0tYET2gdJU+8QOjImEaArddJRVclLPG/eSSlgxYx8jXGVMgoYctvqjOG8oNIfn/QtVSQuv6ZIre9tB/bY6zYYHlC+A6212BB5sIw6TnE7YyE0v0rjJrU=" + matrix: - - DB=mysql CAKE_VERSION=2.6 - - DB=mysql CAKE_VERSION=2.7 - - DB=mysql CAKE_VERSION=2.8 - - DB=mysql CAKE_VERSION=2.9 - - DB=mysql CAKE_VERSION=2.10 + - CAKE_VERSION=2.9 + - CAKE_VERSION=2.10 PHPUNIT_VERSION=^5.7 matrix: include: - php: 7.1 env: - - CODECOVERAGE=1 + - CODECOVERAGE=1 PHPUNIT_VERSION=^5.7 - php: 7.1 env: - PHPCS=1 @@ -33,18 +30,8 @@ matrix: env: - FOC_VALIDATE=1 exclude: - - php: 7.0 - env: DB=mysql CAKE_VERSION=2.6 - - php: 7.0 - env: DB=mysql CAKE_VERSION=2.7 - - php: 7.0 - env: DB=mysql CAKE_VERSION=2.8 - - php: 7.1 - env: DB=mysql CAKE_VERSION=2.6 - - php: 7.1 - env: DB=mysql CAKE_VERSION=2.7 - - php: 7.1 - env: DB=mysql CAKE_VERSION=2.8 + - php: 7.2 + env: CAKE_VERSION=2.9 branches: only: diff --git a/README.md b/README.md index 04819c9..efca4df 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,15 @@ # Edexml plugin for CakePHP -[![Build Status](https://travis-ci.org/Oefenweb/cakephp-edexml.png?branch=master)](https://travis-ci.org/Oefenweb/cakephp-edexml) [![PHP 7 ready](http://php7ready.timesplinter.ch/Oefenweb/cakephp-edexml/badge.svg)](https://travis-ci.org/Oefenweb/cakephp-edexml) [![Coverage Status](https://codecov.io/gh/Oefenweb/cakephp-edexml/branch/master/graph/badge.svg)](https://codecov.io/gh/Oefenweb/cakephp-edexml) [![Packagist downloads](http://img.shields.io/packagist/dt/Oefenweb/cakephp-edexml.svg)](https://packagist.org/packages/oefenweb/cakephp-edexml) [![Code Climate](https://codeclimate.com/github/Oefenweb/cakephp-edexml/badges/gpa.svg)](https://codeclimate.com/github/Oefenweb/cakephp-edexml) +[![Build Status](https://travis-ci.org/Oefenweb/cakephp-edexml.png?branch=master)](https://travis-ci.org/Oefenweb/cakephp-edexml) +[![PHP 7 ready](http://php7ready.timesplinter.ch/Oefenweb/cakephp-edexml/badge.svg)](https://travis-ci.org/Oefenweb/cakephp-edexml) +[![Coverage Status](https://codecov.io/gh/Oefenweb/cakephp-edexml/branch/master/graph/badge.svg)](https://codecov.io/gh/Oefenweb/cakephp-edexml) +[![Packagist downloads](http://img.shields.io/packagist/dt/Oefenweb/cakephp-edexml.svg)](https://packagist.org/packages/oefenweb/cakephp-edexml) +[![Code Climate](https://codeclimate.com/github/Oefenweb/cakephp-edexml/badges/gpa.svg)](https://codeclimate.com/github/Oefenweb/cakephp-edexml) ## Requirements -* CakePHP 2.6.0 or greater. -* PHP 5.4.16 or greater. +* CakePHP 2.9.0 or greater. +* PHP 7.0.0 or greater. ## Installation @@ -26,20 +30,20 @@ CakePlugin::load('Edexml'); First include the plugin model in your controller: ``` -public $uses = array('Edexml.Edexml'); +public $uses = ['Edexml.Edexml']; ``` Validate Edexml file: ``` -$this->Edexml->saveAll($this->request->data, array('validate' => 'only')) +$this->Edexml->saveAll($this->request->data, ['validate' => 'only']); ``` And in the corresponding view: ``` -echo $this->Form->create('Edexml.Edexml', array('type' => 'file')); -echo $this->Form->input('file', array('type' => 'file')); +echo $this->Form->create('Edexml.Edexml', ['type' => 'file']); +echo $this->Form->input('file', ['type' => 'file']); echo $this->Form->end(__('Submit')); ``` @@ -48,7 +52,7 @@ echo $this->Form->end(__('Submit')); First include the plugin model in your controller: ``` -public $uses = array('Edexml.Edexml'); +public $uses = ['Edexml.Edexml']; ``` Convert the Edexml file: