Skip to content
Closed
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
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
test:
runs-on: ubuntu-latest

permissions:
contents: read

strategy:
matrix:
symfony-version: ['4.4', '5.4']

name: PHP 7.4 - Symfony ${{ matrix.symfony-version }}

steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: mbstring, xml, ctype, iconv
coverage: none

- name: Validate composer.json and composer.lock
run: composer validate --strict

- 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: Install dependencies
run: |
composer self-update
composer --version
composer require symfony/framework-bundle:${{ matrix.symfony-version }} --no-update
composer install --no-interaction --prefer-dist

- name: Run test suite
run: vendor/bin/phpunit --configuration phpunit.xml.dist
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
composer.lock
composer.phar
phpunit.xml
.phpunit.result.cache
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('omnipay');
$treeBuilder = new TreeBuilder('omnipay');
$rootNode = $treeBuilder->getRootNode();
$rootNode->children()
->arrayNode('log')
->addDefaultsIfNotSet()
Expand Down
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
Xola OmnipayBundle [![Build status...](https://secure.travis-ci.org/xola/OmnipayBundle.png)](http://travis-ci.org/xola/OmnipayBundle)
Xola OmnipayBundle [![CI](https://github.com/xola/OmnipayBundle/workflows/CI/badge.svg)](https://github.com/xola/OmnipayBundle/actions)
==================
This bundle integrates the [Omnipay payment processing library](https://github.com/adrianmacneil/omnipay) into
[Symfony2](http://symfony.com/).
[Symfony](http://symfony.com/).

This bundle supports Omnipay 3
This bundle supports Omnipay 3 and requires PHP 7.4+ and Symfony 4.4+.

Requirements
------------
- PHP 7.4 or higher
- Symfony 4.4 or higher

Installation
------------
Expand All @@ -17,8 +22,18 @@ To install via [Composer](http://getcomposer.org/), add the following to your `c
}
```

Add the bundle to your application kernel.
Add the bundle to your application kernel (Symfony 4+: this is done automatically via Symfony Flex).

```php
// config/bundles.php (Symfony 4+)
return [
// ...
Xola\OmnipayBundle\OmnipayBundle::class => ['all' => true],
// ...
];
```

For older Symfony versions:
```php
// app/AppKernel.php
public function registerBundles()
Expand Down
11 changes: 5 additions & 6 deletions Resources/config/services.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
parameters:
omnipay.service.class: Xola\OmnipayBundle\Service\Omnipay

services:
omnipay:
class: "%omnipay.service.class%"
arguments: [ "@service_container", "@logger" ]
class: Xola\OmnipayBundle\Service\Omnipay
arguments:
- '@service_container'
- '@logger'
tags:
- { name: monolog.logger, channel: omnipay }
- { name: monolog.logger, channel: omnipay }
13 changes: 8 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "xola/omnipay-bundle",
"type": "symfony-bundle",
"description": "Integrates Omnipay 3 with Symfony 2+",
"description": "Integrates Omnipay 3 with Symfony 4.4+ and 5.4+",
"keywords": [
"omnipay",
"payment",
Expand All @@ -12,13 +12,16 @@
"homepage": "https://github.com/xola/OmnipayBundle",
"license": "MIT",
"require": {
"php": ">=7",
"symfony/framework-bundle": ">=2.1",
"php": "^7.4 || ^8.0",
"symfony/framework-bundle": "^4.4 || ^5.4",
"symfony/dependency-injection": "^4.4 || ^5.4",
"symfony/config": "^4.4 || ^5.4",
"symfony/http-kernel": "^4.4 || ^5.4",
"league/omnipay": "^3.0",
"php-http/logger-plugin": "^1.1"
},
"require-dev": {
"phpunit/phpunit": "^6",
"phpunit/phpunit": "^9.5",
"omnipay/authorizenet": "^3.3",
"omnipay/eway": "^3.0",
"omnipay/mollie": "^5.2",
Expand All @@ -28,7 +31,7 @@
"omnipay/securepay": "^3.0",
"omnipay/stripe": "^3.1",
"omnipay/worldpay": "^3.0",
"symfony/yaml": "^3.4"
"symfony/yaml": "^4.4 || ^5.4"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 3 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="Tests/bootstrap.php">

<testsuites>
Expand Down