Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Commit

Permalink
Merging develop to master in preparation for 1.4.0 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed May 2, 2018
2 parents b355451 + ea3c5c8 commit 5c74b16
Show file tree
Hide file tree
Showing 27 changed files with 1,773 additions and 993 deletions.
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage_clover: clover.xml
json_path: coveralls-upload.json
15 changes: 9 additions & 6 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/test export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
phpcs.xml export-ignore
phpunit.xml.dist export-ignore
/.coveralls.yml export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/composer.lock export-ignore
/docs/ export-ignore
/phpcs.xml export-ignore
/phpunit.xml.dist export-ignore
/test/ export-ignore
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
vendor/
phpunit.xml
/clover.xml
/coveralls-upload.json
/phpunit.xml
/vendor/
45 changes: 29 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ cache:

env:
global:
- COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"
- COMPOSER_ARGS="--no-interaction"
- COVERAGE_DEPS="php-coveralls/php-coveralls"

matrix:
fast_finish: true
include:
- php: 5.6
env:
- DEPS=lowest
- php: 5.6
env:
- DEPS=locked
- LEGACY_DEPS="phpunit/phpunit zendframework/zend-permissions-rbac"
- TEST_COVERAGE=true
- php: 5.6
env:
- DEPS=latest
Expand All @@ -29,36 +31,47 @@ matrix:
- php: 7
env:
- DEPS=locked
- LEGACY_DEPS="phpunit/phpunit zendframework/zend-permissions-rbac"
- CS_CHECK=true
- php: 7
env:
- DEPS=latest
- php: hhvm
- php: 7.1
env:
- DEPS=lowest
- php: hhvm
- php: 7.1
env:
- DEPS=locked
- php: hhvm
- php: 7.1
env:
- DEPS=latest
- php: 7.2
env:
- DEPS=lowest
- php: 7.2
env:
- DEPS=locked
- php: 7.2
env:
- DEPS=latest
allow_failures:
- php: hhvm

notifications:
irc: "irc.freenode.org#apigility-dev"
email: false

before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- travis_retry composer self-update

install:
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
- if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
- travis_retry composer install $COMPOSER_ARGS
- composer show
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update $COMPOSER_ARGS --prefer-lowest --prefer-stable ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
- stty cols 120 && composer show

script:
- composer test
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi

after_script:
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry php vendor/bin/php-coveralls -v ; fi

notifications:
email: false
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 1.3.4 - TBD
## 1.4.0 - 2018-05-02

### Added

- [#107](https://github.com/zfcampus/zf-rest/pull/107) adds support for PHP 7.2.

### Changed

- Nothing.

### Deprecated
Expand All @@ -14,7 +18,7 @@ All notable changes to this project will be documented in this file, in reverse

### Removed

- Nothing.
- [#107](https://github.com/zfcampus/zf-rest/pull/107) removes support for HHVM.

### Fixed

Expand Down
74 changes: 0 additions & 74 deletions CONTRIBUTING.md

This file was deleted.

18 changes: 9 additions & 9 deletions LICENSE.txt → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Copyright (c) 2014, Zend Technologies USA, Inc.
Copyright (c) 2014-2018, Zend Technologies USA, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

* Neither the name of Zend Technologies USA, Inc. nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
- Neither the name of Zend Technologies USA, Inc. nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
Expand Down
66 changes: 36 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
ZF REST
=======

[![Build Status](https://travis-ci.org/zfcampus/zf-rest.png)](https://travis-ci.org/zfcampus/zf-rest)
[![Build Status](https://secure.travis-ci.org/zfcampus/zf-rest.svg?branch=master)](https://secure.travis-ci.org/zfcampus/zf-rest)
[![Coverage Status](https://coveralls.io/repos/github/zfcampus/zf-rest/badge.svg?branch=master)](https://coveralls.io/github/zfcampus/zf-rest?branch=master)

Introduction
------------
Expand All @@ -27,14 +28,14 @@ Installation
Run the following `composer` command:

```console
$ composer require "zfcampus/zf-rest:~1.0-dev"
$ composer require zfcampus/zf-rest
```

Alternately, manually add the following to your `composer.json`, in the `require` section:

```javascript
"require": {
"zfcampus/zf-rest": "~1.0-dev"
"zfcampus/zf-rest": "^1.3"
}
```

Expand All @@ -44,18 +45,23 @@ Finally, add the module name to your project's `config/application.config.php` u
key:

```php
return array(
return [
/* ... */
'modules' => array(
'modules' => [
/* ... */
'ZF\Rest',
),
],
/* ... */
);
];
```

> ### zf-component-installer
>
> If you use [zf-component-installer](https://github.com/zendframework/zf-component-installer),
> that plugin will install zf-rest as a module for you.
Configuration
-------------
=============

### User Configuration

Expand Down Expand Up @@ -143,56 +149,56 @@ of service attacks on your API.
#### User configuration example:

```php
'AddressBook\\V1\\Rest\\Contact\\Controller' => array(
'AddressBook\\V1\\Rest\\Contact\\Controller' => [
'listener' => 'AddressBook\\V1\\Rest\\Contact\\ContactResource',
'route_name' => 'address-book.rest.contact',
'route_identifier_name' => 'contact_id',
'collection_name' => 'contact',
'entity_http_methods' => array(
'entity_http_methods' => [
0 => 'GET',
1 => 'PATCH',
2 => 'PUT',
3 => 'DELETE',
),
'collection_http_methods' => array(
],
'collection_http_methods' => [
0 => 'GET',
1 => 'POST',
),
'collection_query_whitelist' => array(),
],
'collection_query_whitelist' => [],
'page_size' => 25,
'page_size_param' => null,
'entity_class' => 'AddressBook\\V1\\Rest\\Contact\\ContactEntity',
'collection_class' => 'AddressBook\\V1\\Rest\\Contact\\ContactCollection',
'service_name' => 'Contact',
),
],
```

### System Configuration

The `zf-rest` module provides the following configuration to ensure it operates properly in a Zend
Framework 2 application.
Framework application.

```php
'service_manager' => array(
'invokables' => array(
'service_manager' => [
'invokables' => [
'ZF\Rest\RestParametersListener' => 'ZF\Rest\Listener\RestParametersListener',
),
'factories' => array(
],
'factories' => [
'ZF\Rest\OptionsListener' => 'ZF\Rest\Factory\OptionsListenerFactory',
),
),
],
],

'controllers' => array(
'abstract_factories' => array(
'ZF\Rest\Factory\RestControllerFactory'
)
),
'controllers' => [
'abstract_factories' => [
'ZF\Rest\Factory\RestControllerFactory',
],
],

'view_manager' => array(
'view_manager' => [
// Enable this in your application configuration in order to get full
// exception stack traces in your API-Problem responses.
'display_exceptions' => false,
),
],
```

ZF2 Events
Expand Down Expand Up @@ -233,7 +239,7 @@ The following methods are called during `dispatch()`, depending on the HTTP meth
- `delete($id)` - Triggered by a `DELETE` request to a resource *entity*.
- `deleteList($data)` - Triggered by a `DELETE` request to a resource *collection*.
- `fetch($id)` - Triggered by a `GET` request to a resource *entity*.
- `fetchAll($params = array())` - Triggered by a `GET` request to a resource *collection*.
- `fetchAll($params = [])` - Triggered by a `GET` request to a resource *collection*.
- `patch($id, $data)` - Triggered by a `PATCH` request to resource *entity*.
- `patchList($data)` - Triggered by a `PATCH` request to a resource *collection*.
- `update($id, $data)` - Triggered by a `PUT` request to a resource *entity*.
Expand Down

0 comments on commit 5c74b16

Please sign in to comment.