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

Commit ea3c5c8

Browse files
committed
Merge branch 'feature/107-php-7.2-support' into develop
Close #107 Fixes #113
2 parents 028d1c3 + bad3224 commit ea3c5c8

27 files changed

+1771
-1009
lines changed

.coveralls.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
coverage_clover: clover.xml
2+
json_path: coveralls-upload.json

.gitattributes

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
/test export-ignore
2-
.gitattributes export-ignore
3-
.gitignore export-ignore
4-
.travis.yml export-ignore
5-
phpcs.xml export-ignore
6-
phpunit.xml.dist export-ignore
1+
/.coveralls.yml export-ignore
2+
/.gitattributes export-ignore
3+
/.gitignore export-ignore
4+
/.travis.yml export-ignore
5+
/composer.lock export-ignore
6+
/docs/ export-ignore
7+
/phpcs.xml export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/test/ export-ignore

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
vendor/
2-
phpunit.xml
1+
/clover.xml
2+
/coveralls-upload.json
3+
/phpunit.xml
4+
/vendor/

.travis.yml

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@ cache:
99

1010
env:
1111
global:
12-
- COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"
12+
- COMPOSER_ARGS="--no-interaction"
13+
- COVERAGE_DEPS="php-coveralls/php-coveralls"
1314

1415
matrix:
15-
fast_finish: true
1616
include:
1717
- php: 5.6
1818
env:
1919
- DEPS=lowest
2020
- php: 5.6
2121
env:
2222
- DEPS=locked
23+
- LEGACY_DEPS="phpunit/phpunit zendframework/zend-permissions-rbac"
24+
- TEST_COVERAGE=true
2325
- php: 5.6
2426
env:
2527
- DEPS=latest
@@ -29,36 +31,47 @@ matrix:
2931
- php: 7
3032
env:
3133
- DEPS=locked
34+
- LEGACY_DEPS="phpunit/phpunit zendframework/zend-permissions-rbac"
3235
- CS_CHECK=true
3336
- php: 7
3437
env:
3538
- DEPS=latest
36-
- php: hhvm
39+
- php: 7.1
3740
env:
3841
- DEPS=lowest
39-
- php: hhvm
42+
- php: 7.1
4043
env:
4144
- DEPS=locked
42-
- php: hhvm
45+
- php: 7.1
46+
env:
47+
- DEPS=latest
48+
- php: 7.2
49+
env:
50+
- DEPS=lowest
51+
- php: 7.2
52+
env:
53+
- DEPS=locked
54+
- php: 7.2
4355
env:
4456
- DEPS=latest
45-
allow_failures:
46-
- php: hhvm
47-
48-
notifications:
49-
irc: "irc.freenode.org#apigility-dev"
50-
email: false
5157

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

5661
install:
62+
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
63+
- if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
5764
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
58-
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
59-
- travis_retry composer install $COMPOSER_ARGS
60-
- composer show
65+
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update $COMPOSER_ARGS --prefer-lowest --prefer-stable ; fi
66+
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
67+
- stty cols 120 && composer show
6168

6269
script:
63-
- composer test
70+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
6471
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi
72+
73+
after_script:
74+
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry php vendor/bin/php-coveralls -v ; fi
75+
76+
notifications:
77+
email: false

CHANGELOG.md

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,13 @@
22

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

5-
## 1.4.0 - TBD
5+
## 1.4.0 - 2018-05-02
66

77
### Added
88

9-
- Nothing.
10-
11-
### Deprecated
12-
13-
- Nothing.
14-
15-
### Removed
16-
17-
- Nothing.
18-
19-
### Fixed
20-
21-
- Nothing.
22-
23-
## 1.3.4 - TBD
9+
- [#107](https://github.com/zfcampus/zf-rest/pull/107) adds support for PHP 7.2.
2410

25-
### Added
11+
### Changed
2612

2713
- Nothing.
2814

@@ -32,7 +18,7 @@ All notable changes to this project will be documented in this file, in reverse
3218

3319
### Removed
3420

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

3723
### Fixed
3824

CONTRIBUTING.md

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

LICENSE.txt renamed to LICENSE.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
Copyright (c) 2014, Zend Technologies USA, Inc.
1+
Copyright (c) 2014-2018, Zend Technologies USA, Inc.
22
All rights reserved.
33

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

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

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

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

1818
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1919
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED

README.md

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
ZF REST
22
=======
33

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

67
Introduction
78
------------
@@ -27,14 +28,14 @@ Installation
2728
Run the following `composer` command:
2829

2930
```console
30-
$ composer require "zfcampus/zf-rest:~1.0-dev"
31+
$ composer require zfcampus/zf-rest
3132
```
3233

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

3536
```javascript
3637
"require": {
37-
"zfcampus/zf-rest": "~1.0-dev"
38+
"zfcampus/zf-rest": "^1.3"
3839
}
3940
```
4041

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

4647
```php
47-
return array(
48+
return [
4849
/* ... */
49-
'modules' => array(
50+
'modules' => [
5051
/* ... */
5152
'ZF\Rest',
52-
),
53+
],
5354
/* ... */
54-
);
55+
];
5556
```
5657

58+
> ### zf-component-installer
59+
>
60+
> If you use [zf-component-installer](https://github.com/zendframework/zf-component-installer),
61+
> that plugin will install zf-rest as a module for you.
62+
5763
Configuration
58-
-------------
64+
=============
5965

6066
### User Configuration
6167

@@ -143,56 +149,56 @@ of service attacks on your API.
143149
#### User configuration example:
144150

145151
```php
146-
'AddressBook\\V1\\Rest\\Contact\\Controller' => array(
152+
'AddressBook\\V1\\Rest\\Contact\\Controller' => [
147153
'listener' => 'AddressBook\\V1\\Rest\\Contact\\ContactResource',
148154
'route_name' => 'address-book.rest.contact',
149155
'route_identifier_name' => 'contact_id',
150156
'collection_name' => 'contact',
151-
'entity_http_methods' => array(
157+
'entity_http_methods' => [
152158
0 => 'GET',
153159
1 => 'PATCH',
154160
2 => 'PUT',
155161
3 => 'DELETE',
156-
),
157-
'collection_http_methods' => array(
162+
],
163+
'collection_http_methods' => [
158164
0 => 'GET',
159165
1 => 'POST',
160-
),
161-
'collection_query_whitelist' => array(),
166+
],
167+
'collection_query_whitelist' => [],
162168
'page_size' => 25,
163169
'page_size_param' => null,
164170
'entity_class' => 'AddressBook\\V1\\Rest\\Contact\\ContactEntity',
165171
'collection_class' => 'AddressBook\\V1\\Rest\\Contact\\ContactCollection',
166172
'service_name' => 'Contact',
167-
),
173+
],
168174
```
169175

170176
### System Configuration
171177

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

175181
```php
176-
'service_manager' => array(
177-
'invokables' => array(
182+
'service_manager' => [
183+
'invokables' => [
178184
'ZF\Rest\RestParametersListener' => 'ZF\Rest\Listener\RestParametersListener',
179-
),
180-
'factories' => array(
185+
],
186+
'factories' => [
181187
'ZF\Rest\OptionsListener' => 'ZF\Rest\Factory\OptionsListenerFactory',
182-
),
183-
),
188+
],
189+
],
184190

185-
'controllers' => array(
186-
'abstract_factories' => array(
187-
'ZF\Rest\Factory\RestControllerFactory'
188-
)
189-
),
191+
'controllers' => [
192+
'abstract_factories' => [
193+
'ZF\Rest\Factory\RestControllerFactory',
194+
],
195+
],
190196

191-
'view_manager' => array(
197+
'view_manager' => [
192198
// Enable this in your application configuration in order to get full
193199
// exception stack traces in your API-Problem responses.
194200
'display_exceptions' => false,
195-
),
201+
],
196202
```
197203

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

0 commit comments

Comments
 (0)