forked from DevelopersRede/erede-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adicionar PIX aos meios de pagamento
* ♻️ Fix empty url serialize * ✅ Fix tests * 🙈 Adicionar env no gitignore * ✨ Adicionando metodo de pagamento PIX * ✨ Adicionar e popular `qrCode` na transação * ♻️ Refatorar estrutura dos testes * ✅ Adicionar timezone `America/Sao_Paulo` nos testes * ♻️ Fix case `threeDSecure` props * 📝 Update readme
- Loading branch information
1 parent
f9e6aa0
commit dddb5ae
Showing
50 changed files
with
1,007 additions
and
1,576 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Run lint and tests | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- ready_for_review | ||
workflow_dispatch: | ||
|
||
env: | ||
PHP_VERSION: 8.3 | ||
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 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install PHP ${{ env.PHP_VERSION }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: none | ||
php-version: ${{ env.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 PHPUnit | ||
run: composer phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.