Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 #94

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

V2 #94

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
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Run Tests
on:
pull_request:
push:
branches:
- master
Expand All @@ -12,13 +13,13 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ["8.2","8.1","8.0", "7.4", "7.3"]
php-versions: ["8.3","8.2","8.1"]
dependency-stability: ["prefer-stable"]

name: P${{ matrix.php-versions }} - L${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install PHP versions
uses: shivammathur/setup-php@v2
with:
Expand All @@ -39,10 +40,14 @@ jobs:
- name: PHP Version
run: php --version

- name: Execute static analysis tests
if: matrix.php-versions == '8.2'
run: composer test-static

# Code quality
- name: Execute tests (Unit and Feature tests) via PHPUnit
# Set environment
env:
SESSION_DRIVER: array

run: vendor/bin/phpunit --testdox
run: composer test
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ Thumbs.db
.idea

# PHPUnit
/.phpunit.cache
.phpunit.result.cache
*.cache

phpunit.xml
vendor
docker
docker-compose.yml
.env
.env
composer.lock
clover.xml
junit-logfile.xml
21 changes: 21 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

/**
* @see https://cs.symfony.com/doc/config.html
*/
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__)
;

$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'static_lambda' => true,
'void_return' => true,
'ternary_to_null_coalescing' => true,
'visibility_required' => true,
])
->setFinder($finder)
;
37 changes: 31 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,51 @@
{
"name": "sermepa/sermepa",
"description": "Pasarela de pago Redsys, Sermepa",
"keywords": ["sermepa", "payment", "pasarela", "lacaixa", "sabadell", "redsys"],
"homepage": "https://github.com/ssheduardo/sermepa",
"license": "MIT",
"keywords": [
"sermepa",
"payment",
"pasarela",
"lacaixa",
"sabadell",
"bbva",
"redsys"
],
"authors": [
{
"name": "Eduardo D",
"email": "[email protected]",
"homepage": "http://ubublog.com/"
}
],
"homepage": "https://github.com/ssheduardo/sermepa",
"require": {
"php": "^7.1.3|^7.2.5|^8.0|^8.1|^8.2"
"php": "^8.1"
},
"require-dev": {
"phpunit/phpunit": "^7.0|^8.5.8|^9.3.3"
"friendsofphp/php-cs-fixer": "^3.0",
"phpunit/phpunit": "^10.0"
},
"minimum-stability": "stable",
"autoload": {
"psr-4": {
"Sermepa\\Tpv\\": "src/Sermepa/Tpv/"
}
},
"minimum-stability": "stable"
}
"autoload-dev": {
"psr-4": {
"Sermepa\\Tests\\": "tests/"
}
},
"scripts": {
"fix": [
"@php ./vendor/bin/php-cs-fixer fix --allow-risky=yes"
],
"test-static": [
"@php ./vendor/bin/php-cs-fixer check --allow-risky=yes"
],
"test": [
"@php ./vendor/bin/phpunit --testdox"
]
}
}
Loading