Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
628bc13
fix: empty url serialize
edson-nascimento May 2, 2024
dddb5ae
feat: Adicionar PIX aos meios de pagamento
edson-nascimento Nov 13, 2024
89e48af
Merge branch 'master' of github.com:silbeckdevs/erede-php
edson-nascimento Nov 14, 2024
e3cb186
➖ Remover `monolog` das dependências
edson-nascimento Nov 14, 2024
599cb66
✨ Adicionar método `toArray` nas entidades
edson-nascimento Nov 14, 2024
d771a6f
Merge pull request #2 from silbeckdevs/feature/fix-log-version
edson-nascimento Nov 14, 2024
fd03e61
🔖 Add packagist
edson-nascimento Feb 5, 2025
b65dfc9
✨ Adicionar campo `httpResponse` para salvar o json do response
edson-nascimento Jun 2, 2025
bfa932b
✨ Adicionar prop `brand` em `Authorization`
edson-nascimento Jun 2, 2025
f884250
✨ Adicionar novos campos em `Brand`
edson-nascimento Jun 2, 2025
fd26204
Merge pull request #4 from silbeckdevs/feature/add-brand-authorizatio…
edson-nascimento Jun 2, 2025
bc3b38b
✨ Criar método `getFirstAuthorizationCode`
edson-nascimento Jun 3, 2025
cf7ddb5
refactor: Separar métodos de request para `RedeHttpClient`
edson-nascimento Sep 30, 2025
d52ec35
feat: Integração OAuth 2.0
edson-nascimento Sep 30, 2025
25d3d8f
test: Criar testes de autenticação
edson-nascimento Oct 1, 2025
e6aef6a
refactor: Update OAuth implementation and dependencies
edson-nascimento Dec 4, 2025
6007cd3
docs: Update README
edson-nascimento Dec 4, 2025
52ff9a7
ci: update GitHub Actions checkout to v6
edson-nascimento Dec 4, 2025
28e14b2
feat: Add optional OAuthToken parameter to Store constructor
edson-nascimento Dec 5, 2025
e3aa04a
feat: Implement RedeSerializable interface in OAuthToken
edson-nascimento Dec 5, 2025
4060ade
refactor: generate OAuth token into a separate method
edson-nascimento Dec 5, 2025
bad9550
fix: update OAuth base URL production
edson-nascimento Dec 11, 2025
46b2ae5
chore: bump version to 2.0.0
edson-nascimento Dec 11, 2025
2688e53
Merge pull request #8 from silbeckdevs/feature/upgrade-v2
edson-nascimento Dec 15, 2025
55ba356
chore: update PHPStan to validate PHP ^8.2
edson-nascimento Dec 16, 2025
cadb5d4
chore: bump version to 2.0.1
edson-nascimento Dec 16, 2025
e2d2f73
ci: update PHP version strategy 8.2 and 8.3
edson-nascimento Dec 16, 2025
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: 11 additions & 0 deletions .cursorignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/dist/
build/
/logs/
/log/
/cache/
/.git/
/vendor/
/node_modules/
tests/config/env.test.php
tmp/
error_log
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# EditorConfig is awesome: https://editorconfig.org/

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true

[*.php]
indent_size = 4
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
commit-message:
prefix: 'chore'
schedule:
interval: 'monthly'
open-pull-requests-limit: 10
labels: ['dependencies']

- package-ecosystem: 'composer'
directory: '/'
commit-message:
prefix: 'chore'
schedule:
interval: 'monthly'
open-pull-requests-limit: 10
groups:
all-dependencies:
patterns: ['*']
update-types: ['minor', 'patch', 'major']
labels: ['dependencies']
versioning-strategy: 'increase'
66 changes: 66 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Run lint and tests
on:
pull_request:
types:
- opened
- reopened
- ready_for_review
workflow_dispatch:

env:
PHP_EXTENSIONS: mbstring
PHP_TOOLS: composer:v2, phpunit:11
REDE_PV: ${{ secrets.REDE_PV }}
REDE_TOKEN: ${{ secrets.REDE_TOKEN }}
REDE_DEBUG: ${{ vars.REDE_DEBUG }}

permissions:
id-token: write
contents: read

jobs:
run-tests:
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-latest

strategy:
matrix:
php-version: ["8.2", "8.3"]

steps:
- uses: actions/checkout@v6

- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.php-version }}
extensions: ${{ env.PHP_EXTENSIONS }}
tools: ${{ env.PHP_TOOLS }}

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Install dependencies
run: composer update --no-interaction --no-progress

- name: Static analysis
run: composer phpstan

- name: PHP Coding Standards Fixer
run: composer format:check

- name: Run unit tests
run: composer test:unit

- name: Run e2e tests
if: ${{ matrix.php-version == '8.3' }}
run: composer test:e2e
15 changes: 12 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
/vendor/*
/config/app.php
/tmp/*
/.env
/test.php
/teste.php
error_log
.phpunit.cache/*
.vscode/settings.json
.php-cs-fixer.cache
cghooks.lock
.idea
vendor/*
composer.lock

.phpunit.result.cache
.php-cs-fixer.cache
env.test.php
28 changes: 28 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* @see https://cs.symfony.com/doc/rules/index.html
* @see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/f65e6a20c9ef30f2fc93d8c3e1bf6aa3bd910192/src/RuleSet/Sets/PSR12Set.php
* @see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/f65e6a20c9ef30f2fc93d8c3e1bf6aa3bd910192/src/RuleSet/Sets/SymfonySet.php
*/
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

return (new PhpCsFixer\Config())
->setParallelConfig(\PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setRiskyAllowed(false)
->setRules([
'@PSR12' => true, // Aplicar o padrão PSR-12
'@Symfony' => true, // Aplicar o padrão Symfony
'fully_qualified_strict_types' => false, // Garantir namespaces completos
'array_syntax' => ['syntax' => 'short'], // Usar a sintaxe curta para arrays []
'binary_operator_spaces' => ['default' => 'single_space'],
'concat_space' => ['spacing' => 'one'],
'increment_style' => ['style' => 'post'],
'class_attributes_separation' => true,
])
->setIndent(' ')
->setLineEnding("\n")
->setFinder($finder);
17 changes: 17 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"recommendations": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-portuguese",
"usernamehw.errorlens",
"eamodio.gitlens",
"seatonjiang.gitmoji-vscode",
"devsense.phptools-vscode",
"phproberto.vscode-php-getters-setters",
"mehedidracula.php-namespace-resolver",
"junstyle.php-cs-fixer",
],
"unwantedRecommendations": []
}
35 changes: 35 additions & 0 deletions .vscode/settings.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"files.eol": "\n",
"eslint.run": "onSave",
"editor.tabSize": 2,
"php-cs-fixer.executablePath": "${workspaceFolder}/vendor/bin/php-cs-fixer",
"[php]": {
"editor.defaultFormatter": "junstyle.php-cs-fixer",
"editor.formatOnSave": false,
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.trimAutoWhitespace": true,
"editor.bracketPairColorization.enabled": true
},
"php.format.codeStyle": "PSR-12",
"php.debug.port": 9000,
"editor.rulers": [
150
],
"files.insertFinalNewline": true,
"javascript.suggest.autoImports": true,
"typescript.suggest.autoImports": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "explicit"
},
"eslint.format.enable": true,
"scss.validate": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
}
}
Loading