Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
19 changes: 0 additions & 19 deletions .codeclimate.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build
on:
push:
branches:
- master
- github-actions
pull_request:
branches:
- master
- github-actions
jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ 'ubuntu-latest' ]
php-versions: [ '8.2', '8.3' ]
phpunit-versions: [ '10' ]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: xdebug
tools: phpstan,phpunit:${{ matrix.phpunit-versions }}

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Install dependencies
run: composer install

- run: phpunit --version

- run: vendor/bin/phpunit --configuration phpunit.xml
- run: vendor/bin/phpstan analyze
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,13 @@ build
docs/examples/quickstart/log.log
resources/php.ini

/.phpunit.result.cache
/.phpunit.cache/
/.idea/.gitignore
/.idea/modules.xml
/.idea/PAMI.iml
/.idea/php.xml
/.idea/php-test-framework.xml
/.idea/phpspec.xml
/.idea/phpunit.xml
/.idea/vcs.xml
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

28 changes: 9 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
[![Build](https://github.com/level23/PAMI/actions/workflows/build.yml/badge.svg)](https://github.com/level23/PAMI/actions/workflows/build.yml)
[![License](https://poser.pugx.org/marcelog/PAMI/license)](https://packagist.org/packages/marcelog/PAMI)
[![Latest Stable Version](https://poser.pugx.org/marcelog/PAMI/v/stable)](https://packagist.org/packages/marcelog/PAMI)
[![Documentation Status](https://readthedocs.org/projects/pami/badge/?version=latest)](http://pami.readthedocs.org/en/latest/?badge=latest)

[![Build Status](https://travis-ci.org/marcelog/PAMI.svg)](https://travis-ci.org/marcelog/PAMI)
[![Coverage Status](https://coveralls.io/repos/marcelog/PAMI/badge.svg?branch=master&service=github)](https://coveralls.io/github/marcelog/PAMI?branch=master)
[![Code Climate](https://codeclimate.com/github/marcelog/PAMI/badges/gpa.svg)](https://codeclimate.com/github/marcelog/PAMI)
[![Issue Count](https://codeclimate.com/github/marcelog/PAMI/badges/issue_count.svg)](https://codeclimate.com/github/marcelog/PAMI)

[![Click here to lend your support to: PAMI and make a donation at pledgie.com !](https://pledgie.com/campaigns/30944.png?skin_name=chrome' border='0')](https://pledgie.com/campaigns/30944)

# Introduction

Expand All @@ -18,8 +10,8 @@ events, using an observer-listener pattern.
The idea behind this, is to easily implement operator consoles, monitors, etc.
either via SOA or ajax.

A port for nodejs is available at: http://marcelog.github.com/Nami
A port for erlang is available at: https://github.com/marcelog/erlami
This package was forked and updated to the latest PHP standards. The original can be found here:
[https://github.com/marcelog/PAMI](https://github.com/marcelog/PAMI)

# Resources

Expand All @@ -28,16 +20,14 @@ A port for erlang is available at: https://github.com/marcelog/erlami

# PHP Versions

Note: PAMI Requires PHP 5.3+. PHP versions 5.3.9 and 5.3.10 WILL NOT WORK due
to a bug introduced in stream_get_line() in 5.3.9. Please use 5.3.11+ or up
to 5.3.8 (see README.PHP-5.3.9-and-5.3.10).
This PAMI requires PHP 8.2 or higher.

# Installing
Add this library to your [Composer](https://packagist.org/) configuration. In
composer.json:
```json
"require": {
"marcelog/pami": "2.*"
"level23/pami": "2.*"
}
```

Expand All @@ -49,15 +39,15 @@ For an in-depth tutorial: http://marcelog.github.com/articles/pami_introduction_
// Make sure you include the composer autoload.
require __DIR__ . '/vendor/autoload.php';

$options = array(
$options = [
'host' => '2.3.4.5',
'scheme' => 'tcp://',
'port' => 9999,
'username' => 'asd',
'secret' => 'asd',
'connect_timeout' => 10,
'read_timeout' => 10
);
'read_timeout' => 10,
];
$client = new \PAMI\Client\Impl\ClientImpl($options);

// Registering a closure
Expand Down Expand Up @@ -316,7 +306,7 @@ vendor/bin/phing build
## Contributing
To contribute:
* Make sure you open a **concise** and **short** pull request.
* Throw in any needed unit tests to accomodate the new code or the
* Throw in any needed unit tests to accommodate the new code or the
changes involved.
* Run `phing` and make sure everything is ok before submitting the pull
request (make phpmd and CodeSniffer happy, also make sure that phpDocumentor
Expand Down
78 changes: 0 additions & 78 deletions build.xml

This file was deleted.

59 changes: 43 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,65 @@
{
"name": "marcelog/pami",
"name": "level23/pami",
"type": "library",
"description": "Asterisk Manager Interface (AMI) client for PHP, event driven, object oriented",
"keywords": ["asterisk","ami","client","telephony","voip","event","action","manager","monitor"],
"homepage": "http://marcelog.github.com/PAMI",
"keywords": [
"asterisk",
"ami",
"client",
"telephony",
"voip",
"event",
"action",
"manager",
"monitor"
],
"homepage": "https://github.com/level23/PAMI",
"license": "Apache-2.0",
"authors": [
{
"name": "Richard Stellingwerff",
"email": "richard@level23.nl",
"homepage": "https://level23.github.com/",
"role": "Maintainer"
},
{
"name": "Teye Heimans",
"email": "teye@level23.nl",
"homepage": "https://level23.github.com/",
"role": "Maintainer"
},
{
"name": "Marcelo Gornstein",
"email": "marcelog@gmail.com",
"homepage": "http://marcelog.github.com/",
"homepage": "https://marcelog.github.com/",
"role": "Developer"
}
],
"autoload": {
"files": [
"src/PAMI/Helpers/helpers.php"
],
"psr-4": {
"PAMI\\": "src/PAMI"
}
},
"autoload-dev": {
"files": [
"src/PAMI/Helpers/helpers.php"
],
"psr-4": {
"Tests\\": "tests/"
}
},
"require": {
"php": ">=5.3.3",
"php": "^8.2",
"psr/log": ">= 1.0.0"
},
"require-dev": {
"phpunit/phpunit": "4.*",
"monolog/monolog": "1.*",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/phpdocumentor": "2.*",
"phing/phing": "2.*",
"phpmd/phpmd": "2.*",
"satooshi/php-coveralls": "1.0.1",
"evert/phpdoc-md" : "~0.1.1",
"codeclimate/php-test-reporter": "dev-master",
"sebastian/phpcpd": "*",
"marcelog/pagi": "2.*"
"phpunit/phpunit": "10",
"monolog/monolog": "3.5.*",
"mockery/mockery": "^1.6",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-mockery": "^1.1"
}
}
Binary file removed composer.phar
Binary file not shown.
11 changes: 11 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
includes:
- vendor/phpstan/phpstan-mockery/extension.neon

parameters:
level: 6
checkMissingIterableValueType: true
ignoreErrors:
excludePaths:
paths:
- tests
- src
31 changes: 31 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="true"
bootstrap="./tests/Resources/bootstrap.php"
colors="true"
processIsolation="false"
stopOnError="true"
stopOnFailure="true"
stopOnIncomplete="true"
stopOnSkipped="true"
stopOnRisky="true"
timeoutForSmallTests="1"
timeoutForMediumTests="10"
timeoutForLargeTests="60"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
cacheDirectory=".phpunit.cache">
<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
<exclude>
<directory suffix="Launcher.php">src/PAMI/Application</directory>
<directory suffix=".php">vendor</directory>
</exclude>
</coverage>
<testsuites>
<testsuite name="Tests">
<directory suffix="Test.php">tests/</directory>
</testsuite>
</testsuites>
</phpunit>
Loading