Skip to content

Commit cfc56e9

Browse files
committed
Rewriting as Laminas Project package
1 parent d728304 commit cfc56e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+395
-4301
lines changed

.gitattributes

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/.gitattributes export-ignore
33
/.gitignore export-ignore
44
/.travis.yml export-ignore
5-
/composer.lock export-ignore
65
/docs/ export-ignore
76
/phpcs.xml export-ignore
87
/phpunit.xml.dist export-ignore

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/clover.xml
2+
/composer.lock
23
/coveralls-upload.json
34
/phpunit.xml
45
/vendor/

.travis.yml

+2-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
sudo: false
2-
31
language: php
42

53
cache:
@@ -12,24 +10,17 @@ env:
1210
- COVERAGE_DEPS="php-coveralls/php-coveralls"
1311

1412
matrix:
13+
fast_finish: true
1514
include:
1615
- php: 5.6
1716
env:
1817
- DEPS=lowest
19-
- php: 5.6
20-
env:
21-
- DEPS=locked
22-
- LEGACY_DEPS="phpunit/phpunit"
2318
- php: 5.6
2419
env:
2520
- DEPS=latest
2621
- php: 7
2722
env:
2823
- DEPS=lowest
29-
- php: 7
30-
env:
31-
- DEPS=locked
32-
- LEGACY_DEPS="phpunit/phpunit"
3324
- php: 7
3425
env:
3526
- DEPS=latest
@@ -38,18 +29,12 @@ matrix:
3829
- DEPS=lowest
3930
- php: 7.1
4031
env:
41-
- DEPS=locked
32+
- DEPS=latest
4233
- CS_CHECK=true
4334
- TEST_COVERAGE=true
44-
- php: 7.1
45-
env:
46-
- DEPS=latest
4735
- php: 7.2
4836
env:
4937
- DEPS=lowest
50-
- php: 7.2
51-
env:
52-
- DEPS=locked
5338
- php: 7.2
5439
env:
5540
- DEPS=latest

CHANGELOG.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ All notable changes to this project will be documented in this file, in reverse
2828

2929
### Added
3030

31-
- [#200](https://github.com/zfcampus/zf-apigility/pull/200) adds support for PHP 7.1 and 7.2.
31+
- [zfcampus/zf-apigility#200](https://github.com/zfcampus/zf-apigility/pull/200) adds support for PHP 7.1 and 7.2.
3232

3333
### Changed
3434

@@ -40,22 +40,22 @@ All notable changes to this project will be documented in this file, in reverse
4040

4141
### Removed
4242

43-
- [#200](https://github.com/zfcampus/zf-apigility/pull/200) removes support for HHVM.
43+
- [zfcampus/zf-apigility#200](https://github.com/zfcampus/zf-apigility/pull/200) removes support for HHVM.
4444

4545
### Fixed
4646

47-
- [#194](https://github.com/zfcampus/zf-apigility/pull/194) fixes an issue within `Zend\Apigility\Application` whereby it was not
47+
- [zfcampus/zf-apigility#194](https://github.com/zfcampus/zf-apigility/pull/194) fixes an issue within `Laminas\ApiTools\Application` whereby it was not
4848
clearing the "stop propagation" flag prior to triggering new events.
4949

5050
## 1.3.0 - 2016-07-28
5151

5252
### Added
5353

54-
- [#169](https://github.com/zfcampus/zf-apigility/pull/169) adds support for
55-
version 3 releases of Zend Framework components, retaining compatibility with
54+
- [zfcampus/zf-apigility#169](https://github.com/zfcampus/zf-apigility/pull/169) adds support for
55+
version 3 releases of Laminas components, retaining compatibility with
5656
version 2 releases.
57-
- [#169](https://github.com/zfcampus/zf-apigility/pull/169) adds support in
58-
`ZF\Apigility\Application` for handling PHP 7 `Throwable`s (in addition to
57+
- [zfcampus/zf-apigility#169](https://github.com/zfcampus/zf-apigility/pull/169) adds support in
58+
`Laminas\ApiTools\Application` for handling PHP 7 `Throwable`s (in addition to
5959
standard exceptions).
6060

6161
### Deprecated
@@ -64,12 +64,12 @@ All notable changes to this project will be documented in this file, in reverse
6464

6565
### Removed
6666

67-
- [#169](https://github.com/zfcampus/zf-apigility/pull/169) removes support for
67+
- [zfcampus/zf-apigility#169](https://github.com/zfcampus/zf-apigility/pull/169) removes support for
6868
PHP 5.5.
69-
- [#169](https://github.com/zfcampus/zf-apigility/pull/169) removes the
69+
- [zfcampus/zf-apigility#169](https://github.com/zfcampus/zf-apigility/pull/169) removes the
7070
dependency on rwoverdijk/assetmanager. It now *suggests* one or the other of:
7171
- rwoverdijk/assetmanager `^1.7` (not yet released)
72-
- zfcampus/zf-asset-manager `^1.0`
72+
- laminas-api-tools/api-tools-asset-manager `^1.0`
7373

7474
### Fixed
7575

COPYRIGHT.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Copyright (c) 2019, Laminas Foundation.
2+
All rights reserved. (https://getlaminas.org/)

LICENSE.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
Copyright (c) 2014-2018, Zend Technologies USA, Inc.
1+
Copyright (c) 2019, Laminas Foundation
22
All rights reserved.
33

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

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

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.
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.
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 Laminas Foundation nor the names of its contributors may
15+
be used to endorse or promote products derived from this software without
16+
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

+51-51
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# ZF Apigility
1+
# Laminas API Tools
22

3-
[![Build Status](https://secure.travis-ci.org/zfcampus/zf-apigility.svg?branch=master)](https://secure.travis-ci.org/zfcampus/zf-apigility)
4-
[![Coverage Status](https://coveralls.io/repos/github/zfcampus/zf-apigility/badge.svg?branch=master)](https://coveralls.io/github/zfcampus/zf-apigility?branch=master)
3+
[![Build Status](https://travis-ci.org/laminas-api-tools/api-tools.svg?branch=master)](https://travis-ci.org/laminas-api-tools/api-tools)
4+
[![Coverage Status](https://coveralls.io/repos/github/laminas-api-tools/api-tools/badge.svg?branch=master)](https://coveralls.io/github/laminas-api-tools/api-tools?branch=master)
55

66
## Introduction
77

8-
Meta-module for Zend Framework combining features from:
8+
Meta-module for Laminas combining features from:
99

10-
- zf-api-problem
11-
- zf-content-negotiation
12-
- zf-content-validation
13-
- zf-hal
14-
- zf-mvc-auth
15-
- zf-rest
16-
- zf-rpc
17-
- zf-versioning
10+
- api-tools-api-problem
11+
- api-tools-content-negotiation
12+
- api-tools-content-validation
13+
- api-tools-hal
14+
- api-tools-mvc-auth
15+
- api-tools-rest
16+
- api-tools-rpc
17+
- api-tools-versioning
1818

1919
in order to provide a cohesive solution for exposing web-based APIs.
2020

@@ -29,14 +29,14 @@ Please see the [composer.json](composer.json) file.
2929
Run the following `composer` command:
3030

3131
```console
32-
$ composer require zfcampus/zf-apigility
32+
$ composer require laminas-api-tools/api-tools
3333
```
3434

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

3737
```javascript
3838
"require": {
39-
"zfcampus/zf-apigility": "^1.3"
39+
"laminas-api-tools/api-tools": "^1.3"
4040
}
4141
```
4242

@@ -50,49 +50,49 @@ return [
5050
/* ... */
5151
'modules' => [
5252
/* ... */
53-
'ZF\Apigility',
53+
'Laminas\ApiTools',
5454
],
5555
/* ... */
5656
];
5757
```
5858

59-
> ### zf-component-installer
59+
> ### laminas-component-installer
6060
>
61-
> If you use [zf-component-installer](https://github.com/zendframework/zf-component-installer),
62-
> that plugin will install zf-apigility, and all modules it depends on, as a
61+
> If you use [laminas-component-installer](https://github.com/laminas/laminas-component-installer),
62+
> that plugin will install api-tools, and all modules it depends on, as a
6363
> module in your application configuration for you.
6464
6565
## Assets
6666

67-
If you are using this module along with the [admin](https://github.com/zfcampus/zf-apigility-admin)
68-
and/or the [welcome screen](https://github.com/zfcampus/zf-apigility-welcome),
67+
If you are using this module along with the [admin](https://github.com/laminas-api-tools/api-tools-admin)
68+
and/or the [welcome screen](https://github.com/laminas-api-tools/api-tools-welcome),
6969
this module contains assets that you will need to make web accessible. For that,
7070
you have two options:
7171

72-
- [rwoverdijk/assetmanager](https://github.com/rwoverdijk/AssetManager) is a ZF
72+
- [rwoverdijk/assetmanager](https://github.com/rwoverdijk/AssetManager) is a Laminas
7373
module that provides advanced capabilities around web asset management, and is
7474
the original tool used by this module. At its current release (1.6.0),
75-
however, it does not support v3 components from Zend Framework. An upcoming
75+
however, it does not support v3 components from Laminas. An upcoming
7676
1.7.0 release will likely support them.
77-
- [zfcampus/zf-asset-manager](https://github.com/zfcampus/zf-asset-manager) is a
77+
- [laminas-api-tools/api-tools-asset-manager](https://github.com/laminas-api-tools/api-tools-asset-manager) is a
7878
Composer plugin that acts during installation and uninstallation of packages,
7979
copying and removing asset trees as defined using the configuration from
8080
rwoverdijk/assetmanager. To use this, however, you will need to install the
8181
plugin *first*, and then this module. (If you have already installed this
82-
module, remove it using `composer remove zfcampus/zf-apigility`.)
82+
module, remove it using `composer remove laminas-api-tools/api-tools`.)
8383

8484
## Configuration
8585

8686
### User Configuration
8787

8888
The top-level configuration key for user configuration of this module is
89-
`zf-apigility`.
89+
`api-tools`.
9090

9191
#### db-connected
9292

9393
`db-connected` is an array of resources that can be built via the
94-
[TableGatewayAbstractFactory](#zfapigilitytablegatewayabstractfactory) and the
95-
[DbConnectedResourceAbstractFactory](#zfapigilitydbconnectedresourceabstractfactory) when required
94+
[TableGatewayAbstractFactory](#apitoolstablegatewayabstractfactory) and the
95+
[DbConnectedResourceAbstractFactory](#apitoolsdbconnectedresourceabstractfactory) when required
9696
to fulfill the use case of database table-driven resource use cases. The following example
9797
enumerates all of the required and optional configuration necessary to enable this.
9898

@@ -123,14 +123,14 @@ Example:
123123

124124
### System Configuration
125125

126-
The following configuration is required to ensure the proper functioning of this module in Zend
126+
The following configuration is required to ensure the proper functioning of this module in Laminas
127127
Framework applications, and is provided by the module:
128128

129129
```php
130-
namespace ZF\Apigility;
130+
namespace Laminas\ApiTools;
131131

132-
use Zend\Db\Adapter\AdapterAbstractServiceFactory as DbAdapterAbstractServiceFactory;
133-
use Zend\ServiceManager\Factory\InvokableFactory;
132+
use Laminas\Db\Adapter\AdapterAbstractServiceFactory as DbAdapterAbstractServiceFactory;
133+
use Laminas\ServiceManager\Factory\InvokableFactory;
134134

135135
return [
136136
'asset_manager' => [
@@ -142,10 +142,10 @@ return [
142142
],
143143
'router' => [
144144
'routes' => [
145-
'zf-apigility' => [
145+
'api-tools' => [
146146
'type' => 'literal',
147147
'options' => [
148-
'route' => '/apigility',
148+
'route' => '/api-tools',
149149
],
150150
'may_terminate' => false,
151151
],
@@ -165,51 +165,51 @@ return [
165165
];
166166
```
167167

168-
## ZF Events
168+
## Laminas Events
169169

170170
### Listeners
171171

172-
#### ZF\Apigility\MvcAuth\UnauthenticatedListener
172+
#### Laminas\ApiTools\MvcAuth\UnauthenticatedListener
173173

174174
This listener is attached to `MvcAuthEvent::EVENT_AUTHENTICATION_POST` at priority `100`. The
175-
primary purpose fo this listener is to override the `zf-mvc-auth` _unauthenticated_ listener in
175+
primary purpose fo this listener is to override the `api-tools-mvc-auth` _unauthenticated_ listener in
176176
order to be able to respond with an API-Problem response (vs. a standard HTTP response) on
177177
authentication failure.
178178

179-
#### ZF\Apigility\MvcAuth\UnauthorizedListener
179+
#### Laminas\ApiTools\MvcAuth\UnauthorizedListener
180180

181181
This listener is attached to `MvcAuthEvent::EVENT_AUTHORIZATION_POST` at priority `100`. The
182-
primary purpose of this listener is to override the `zf-mvc-auth` _unauthorized_ listener in order
182+
primary purpose of this listener is to override the `api-tools-mvc-auth` _unauthorized_ listener in order
183183
to be able to respond with an API-Problem response (vs a standard HTTP response) on authorization
184184
failure.
185185

186-
#### ZF\Apigility\Module
186+
#### Laminas\ApiTools\Module
187187

188188
This listener is attached to `MvcEvent::EVENT_RENDER` at priority `400`. Its purpose is to
189-
conditionally attach `ZF\ApiProblem\RenderErrorListener` when an `MvcEvent`'s result is a
190-
`HalJsonModel` or `JsonModel`, ensuring `zf-api-problem` can render a response in situations where
189+
conditionally attach `Laminas\ApiTools\ApiProblem\RenderErrorListener` when an `MvcEvent`'s result is a
190+
`HalJsonModel` or `JsonModel`, ensuring `api-tools-api-problem` can render a response in situations where
191191
a rendering error occurs.
192192

193-
## ZF Services
193+
## Laminas Services
194194

195195
### Factories
196196

197-
#### ZF\Apigility\DbConnectedResourceAbstractFactory
197+
#### Laminas\ApiTools\DbConnectedResourceAbstractFactory
198198

199-
This factory uses the requested name in addition to the `zf-apigility.db-connected` configuration
200-
in order to produce `ZF\Apigility\DbConnectedResource` based resources.
199+
This factory uses the requested name in addition to the `api-tools.db-connected` configuration
200+
in order to produce `Laminas\ApiTools\DbConnectedResource` based resources.
201201

202-
#### ZF\Apigility\TableGatewayAbstractFactory
202+
#### Laminas\ApiTools\TableGatewayAbstractFactory
203203

204-
This factory uses the requested name in addition to the `zf-apigility.db-connected` configuration
205-
in order to produce correctly configured `Zend\Db\TableGateway\TableGateway` instances. These
204+
This factory uses the requested name in addition to the `api-tools.db-connected` configuration
205+
in order to produce correctly configured `Laminas\Db\TableGateway\TableGateway` instances. These
206206
instances of `TableGateway`s are configured to use the proper `HydratingResultSet` and produce
207207
the configured entities with each row returned when iterated.
208208

209209
### Models
210210

211-
#### ZF\Apigility\DbConnectedResource
211+
#### Laminas\ApiTools\DbConnectedResource
212212

213213
This instance serves as the base class for database connected REST resource classes. This
214-
implementation is an extension of `ZF\Rest\AbstractResourceListener` and can be routed to by
215-
Apigility as a RESTful resource.
214+
implementation is an extension of `Laminas\ApiTools\Rest\AbstractResourceListener` and can be routed to by
215+
Laminas API Tools as a RESTful resource.

asset/Gruntfile.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ module.exports = function(grunt) {
2121
// Project settings
2222
ag: {
2323
vendor: 'vendor',
24-
css: 'zf-apigility/css',
25-
js: 'zf-apigility/js'
24+
css: 'api-tools/css',
25+
js: 'api-tools/js'
2626
},
2727

2828
// Watches files for changes and runs tasks based on the changed files

asset/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Apigility Assets
1+
Laminas API Tools Assets
22
================
33

4-
This directory contains build tools and assets for the zf-apigility module. CSS
4+
This directory contains build tools and assets for the api-tools module. CSS
55
in this directory is primarily geared towards projects started with the
6-
zf-apigility-skeleton to ensure that they have some reasonable styling and user
6+
api-tools-skeleton to ensure that they have some reasonable styling and user
77
interface.
88

99
Contributing
@@ -25,5 +25,5 @@ At this point, you will have all necessary dependencies.
2525
### Making changes
2626

2727
- Run `grunt watch`.
28-
- Edit and save changes in `zf-apigility/css/main.less`.
28+
- Edit and save changes in `api-tools/css/main.less`.
2929
- Check in your changes when done, and crate a pull request.

0 commit comments

Comments
 (0)