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

Allow use with v3 releases of Zend Framework components #10

Merged
merged 5 commits into from
Jul 12, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Administrava
- Added CONDUCT.md
- Updated CONTRIBUTING.md to refer to CONDUCT.md
- Updated CONTRIBUTING.md to refer to composer scripts
- Updated README:
  - use short array notation
  - drop references to "ZF2" (just "ZF")
  - updated composer instructions
- Changed LICENSE to a markdown file
- Added `config` to phpcs configuration
  • Loading branch information
weierophinney committed Jul 12, 2016
commit e41fff83bd8db8a593a366902ccb25bda9e90949
43 changes: 43 additions & 0 deletions CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Contributor Code of Conduct

The Zend Framework project adheres to [The Code Manifesto](https://codemanifesto.com)
as its guidelines for contributor interactions.

## The Code Manifesto

We want to work in an ecosystem that empowers developers to reach their
potential — one that encourages growth and effective collaboration. A space that
is safe for all.

A space such as this benefits everyone that participates in it. It encourages
new developers to enter our field. It is through discussion and collaboration
that we grow, and through growth that we improve.

In the effort to create such a place, we hold to these values:

1. **Discrimination limits us.** This includes discrimination on the basis of
race, gender, sexual orientation, gender identity, age, nationality, technology
and any other arbitrary exclusion of a group of people.
2. **Boundaries honor us.** Your comfort levels are not everyone’s comfort
levels. Remember that, and if brought to your attention, heed it.
3. **We are our biggest assets.** None of us were born masters of our trade.
Each of us has been helped along the way. Return that favor, when and where
you can.
4. **We are resources for the future.** As an extension of #3, share what you
know. Make yourself a resource to help those that come after you.
5. **Respect defines us.** Treat others as you wish to be treated. Make your
discussions, criticisms and debates from a position of respectfulness. Ask
yourself, is it true? Is it necessary? Is it constructive? Anything less is
unacceptable.
6. **Reactions require grace.** Angry responses are valid, but abusive language
and vindictive actions are toxic. When something happens that offends you,
handle it assertively, but be respectful. Escalate reasonably, and try to
allow the offender an opportunity to explain themselves, and possibly correct
the issue.
7. **Opinions are just that: opinions.** Each and every one of us, due to our
background and upbringing, have varying opinions. The fact of the matter, is
that is perfectly acceptable. Remember this: if you respect your own
opinions, you should respect the opinions of others.
8. **To err is human.** You might not intend it, but mistakes do happen and
contribute to build experience. Tolerate honest mistakes, and don't hesitate
to apologize if you make one yourself.
22 changes: 14 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,31 @@ First, use [Composer](https://getcomposer.org) to install all dependencies:
$ composer install
```

To run tests, use the PHPUnit executable installed by Composer:
To run tests:

```console
$ ./vendor/bin/phpunit
$ composer test
```

## CODING STANDARDS

While Apigility uses Zend Framework 2 coding standards, in practice, we check
standards using [php-cs-fixer](https://github.com/fabpot/PHP-CS-Fixer) (which is
installed via Composer with other dependencies). To check for CS issues:
standards against PSR-1/2. To check for CS issues:

```console
$ ./vendor/bin/php-cs-fixer fix . --dry-run
$ composer cs-check
```

This will report CS issues. Alternately, you can have the tool fix them for you
by omitting the `--dry-run` switch:
This will report CS issues. You can also attempt to fix many reported errors
automatically:

```console
$ ./vendor/bin/php-cs-fixer fix .
$ composer cs-fix
```

If you use `cs-fix` to fix issues, make certain you add and commit any files
changed!

## Conduct

Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project.
19 changes: 10 additions & 9 deletions LICENSE.txt → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
Copyright (c) 2014, Zend Technologies USA, Inc.
Copyright (c) 2014-2016, 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
37 changes: 21 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ZF RPC
Introduction
------------

Module for implementing RPC web services in ZF2.
Module for implementing RPC web services in Zend Framework.

Enables:

Expand All @@ -25,14 +25,14 @@ Installation
Run the following `composer` command:

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

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

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

Expand All @@ -42,16 +42,21 @@ Finally, add the module name to your project's `config/application.config.php` u
key:

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

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

Configuration
=============

Expand Down Expand Up @@ -79,13 +84,13 @@ Inside this key, the following sub-keys are required:
Example:

```php
'zf-rpc' => array(
'Application\Controller\LoginController' => array(
'http_methods' => array('POST'),
'zf-rpc' => [
'Application\Controller\LoginController' => [
'http_methods' => ['POST'],
'route_name' => 'api-login',
'callable' => 'Application\Controller\LoginController::process',
),
),
],
],
```

### System Configuration
Expand All @@ -94,11 +99,11 @@ The following configuration ensures this module operates properly in the context
application:

```php
'controllers' => array(
'abstract_factories' => array(
'controllers' => [
'abstract_factories' => [
'ZF\Rpc\Factory\RpcControllerFactory',
),
),
],
],
```

ZF2 Events
Expand Down
1 change: 1 addition & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
</rule>

<!-- Paths to check -->
<file>config</file>
<file>src</file>
<file>test</file>
</ruleset>