Skip to content

Commit

Permalink
adding some changes (#62)
Browse files Browse the repository at this point in the history
* adding some changes 🚀 🚀
- drop php 8.1
- update validator
- other changes

* add more changes :D

* Fixed what needed fixing and squished some bugs. 🐛
  • Loading branch information
abr4xas authored Dec 22, 2024
1 parent 00ed6f0 commit ab20d99
Show file tree
Hide file tree
Showing 26 changed files with 250 additions and 224 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
/docs export-ignore
/UPGRADING.md export-ignore
/help export-ignore
/.phpunit.cache export-ignore
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github: abr4xas
custom: https://angelcruz.dev/donate
21 changes: 9 additions & 12 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/abr4xas/php-instapago/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/abr4xas/php-instapago/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a security issue
url: https://github.com/abr4xas/php-instapago/security/policy
about: Learn how to notify us for sensitive bugs
- name: Report a bug
url: https://github.com/abr4xas/php-instapago/issues/new
about: Report a reproducable bug
- name: Ask a question
url: https://github.com/abr4xas/php-instapago/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/abr4xas/php-instapago/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a security issue
url: https://github.com/abr4xas/php-instapago/security/policy
about: Learn how to notify us for sensitive bugs
9 changes: 8 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ updates:
schedule:
interval: "weekly"
labels:
- "dependencies"
- "dependencies"

- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
1 change: 1 addition & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ permissions:
jobs:
dependabot:
runs-on: ubuntu-latest
timeout-minutes: 5
if: ${{ github.actor == 'dependabot[bot]' }}
steps:

Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/fix-php-code-style-issues-cs-fixer.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/fix-php-code-style-issues-pint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ permissions:
jobs:
php-code-styling:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout code
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/run-tests-pest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ on: [pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.2, 8.1]
php: [8.2, 8.3, 8.4]
stability: [prefer-lowest, prefer-stable]

name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
Expand All @@ -33,5 +34,8 @@ jobs:
- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction

- name: List Installed Dependencies
run: composer show -D

- name: Execute tests
run: vendor/bin/pest
run: vendor/bin/pest --ci
1 change: 1 addition & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ permissions:
jobs:
update:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout code
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ psalm.xml
vendor
.php-cs-fixer.cache
test.php
.phpunit.cache
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ require 'vendor/autoload.php';
use \Instapago\Instapago\Api;
use \Instapago\Instapago\Exceptions\{
InstapagoException,
AuthException,
BankRejectException,
InvalidInputException,
TimeoutException,
InstapagoAuthException,
InstapagoBankRejectException,
InstapagoInvalidInputException,
InstapagoTimeoutException,
ValidationException,
GenericException,
};
Expand All @@ -66,19 +66,19 @@ try{

echo $e->getMessage(); // manejar el error

}catch(AuthException $e){
}catch(InstapagoAuthException $e){

echo $e->getMessage(); // manejar el error

}catch(BankRejectException $e){
}catch(InstapagoBankRejectException $e){

echo $e->getMessage(); // manejar el error

}catch(InvalidInputException $e){
}catch(InstapagoInvalidInputException $e){

echo $e->getMessage(); // manejar el error

}catch(TimeoutException $e){
}catch(InstapagoTimeoutException $e){

echo $e->getMessage(); // manejar el error

Expand Down
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "instapago/instapago",
"description": ":D",
"description": "Instapago is a technological solution designed for the market of electronic commerce (eCommerce) in Venezuela and Latin America, with the intention of offering a premium product category, which allows people and companies leverage their expansion capabilities, facilitating payment mechanisms for customers with a friendly integration into systems currently used.",
"keywords": [
"Instapago",
"instapago"
Expand All @@ -15,12 +15,13 @@
}
],
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.5.1"
"php": "^8.2|^8.3|^8.4",
"guzzlehttp/guzzle": "^7.9.2"
},
"require-dev": {
"laravel/pint": "^1.10",
"pestphp/pest": "^2.6"
"laravel/pint": "^1.18.3",
"mockery/mockery": "^1.6",
"pestphp/pest": "^3.7"
},
"autoload": {
"psr-4": {
Expand Down
19 changes: 19 additions & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"preset": "psr12",
"rules": {
"blank_line_before_statement": true,
"method_argument_space": true,
"single_trait_insert_per_statement": true,
"types_spaces": {
"space": "single"
},
"align_multiline_comment": true,
"array_indentation": true,
"array_syntax": true,
"concat_space": {
"spacing": "one"
},
"explicit_string_variable": true,
"fully_qualified_strict_types": true
}
}
Loading

0 comments on commit ab20d99

Please sign in to comment.