Skip to content

Commit

Permalink
Merge pull request #33 from LinkNacional/dev
Browse files Browse the repository at this point in the history
1.6.0 Correções de bugs e adição de informações de cartão nos detalhes do pedido
  • Loading branch information
emanuellopess authored Nov 27, 2023
2 parents 15e111f + d68942f commit d1e87bc
Show file tree
Hide file tree
Showing 32 changed files with 3,958 additions and 1,012 deletions.
131 changes: 66 additions & 65 deletions .devcontainer/devcontainer.example.json
Original file line number Diff line number Diff line change
@@ -1,94 +1,95 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
{
"name": "PHP",
"image": "mcr.microsoft.com/vscode/devcontainers/php:7.4",
// https: //github.com/devcontainers/images/tree/main/src/php
"image": "mcr.microsoft.com/vscode/devcontainers/php:8.1",
"mounts": [
{
// path in your local machine where WordPress is.
"source": "/home/{yourusername}/projects/_wordpress",
"target": "/home/vscode/_wordpress",
"source": "/path/to/your/wordpress-stubs",
"target": "/home/vscode/wordpress",
"type": "bind"
}
],
"features": {
// https://github.com/devcontainers/features/tree/main/src/node
"ghcr.io/devcontainers/features/node:1": {
"version": "18.14.0",
"nvmVersion": "0.39.3"
}
},
"postCreateCommand": "npm install",
"customizations": {
"vscode": {
"extensions": [
"junstyle.php-cs-fixer",
"bmewburn.vscode-intelephense-client",
"neilbrayfield.php-docblocker",
"bmewburn.vscode-intelephense-client"
"dbaeumer.vscode-eslint"
],
"settings": {
"php-cs-fixer.config": ".php-cs-fixer.php",
"files.eol": "\n",
"files.encoding": "utf8",
"php.suggest.basic": false,
"[smarty]": {
"editor.tabSize": 2
"[html]": {
"editor.rulers": [
120
],
"editor.tabSize": 4
},
"[javascript]": {
"editor.defaultFormatter": "junstyle.php-cs-fixer",
"editor.rulers": [
80,
120
]
},
"[php]": {
"editor.indentSize": "tabSize",
"editor.detectIndentation": false,
"editor.defaultFormatter": "junstyle.php-cs-fixer",
"editor.insertSpaces": true,
"editor.tabSize": 4,
"editor.rulers": [
80,
120
]
},
"[smarty]": {
"editor.rulers": [
120
],
"editor.tabSize": 4,
"editor.wrappingIndent": "deepIndent",
"editor.wrappingStrategy": "advanced"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true,
"files.encoding": "utf8",
"files.eol": "\n",
"html.format.wrapAttributes": "force-expand-multiline",
"html.format.wrapAttributesIndentSize": 4,
"html.format.wrapLineLength": 120,
"intelephense.completion.maxItems": 10,
"intelephense.environment.documentRoot": "src",
"intelephense.environment.phpVersion": "8.1",
"intelephense.environment.includePaths": [
"/home/vscode/wordpress"
],
"intelephense.files.associations": [
"*.php"
],
"namespaceResolver.showMessageOnStatusBar": true,
"namespaceResolver.sortAlphabetically": true,
"namespaceResolver.sortNatural": true,
"namespaceResolver.sortOnSave": true,
"php-cs-fixer.autoFixByBracket": true,
"php-cs-fixer.autoFixBySemicolon": true,
"php-cs-fixer.config": ".php-cs-fixer.php",
"php-cs-fixer.executablePath": "${extensionPath}/php-cs-fixer.phar",
"php-cs-fixer.formatHtml": true,
"php-cs-fixer.onsave": true,
"php-cs-fixer.executablePath": "${extensionPath}/php-cs-fixer.phar",
"php.validate.enable": false,
"php-docblocker.useShortNames": true,
"php-docblocker.qualifyClassNames": true,
"php-docblocker.paramDescription": true,
"php-docblocker.returnGap": true,
"php-docblocker.alignParams": true,
"php-docblocker.alignReturn": true,
"php-docblocker.gap": true,
"php-docblocker.defaultType": "string",
"php-docblocker.classTemplate": {
"message": {},
"since": {
"content": "@since 1.0.0",
"gapAfter": true,
"gapBefore": true
},
"link": {
"content": "@link "
}
},
"php-docblocker.functionTemplate": {
"message": {
"gapAfter": true
},
"since": {
"content": "@since 1.0.0"
},
"param": {
"gapBefore": true,
"gapAfter": true
},
"return": {}
},
"php-docblocker.propertyTemplate": {
"message": {
"gapAfter": true
},
"since": {
"content": "@since 1.0.0"
},
"var": {
"content": "@var ${1:mixed}"
},
"access": {
"access": "@access "
},
"link": {
"content": "@link "
}
}
"php-docblocker.useShortNames": true,
"php.suggest.basic": false,
"php.validate.enable": false,
"smarty.highlight": true
}
}
}
}
}
11 changes: 11 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": "standard",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
}
}
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Descreva o bug
Uma descrição clara e concisa do que é o bug.

## Informação do sistema
- PHP: [ex. 8.1]
- WooCommerce: [ex. 8.3.1]
- WordPress: [ex. 6.1]

## Passos para reproduzir
Etapas para reproduzir o comportamento:
1. Vá para '...'
2. Clique em '....'
3. Role para baixo até '....'
4. Ver erro

## Comportamento esperado
Uma descrição clara e concisa do que você esperava que acontecesse.

## Capturas de tela
Se aplicável, adicione capturas de tela para ajudar a explicar seu problema.

## Critérios de Aceitação

<!-- Defina as condições que devem ser verdadeiras para encerrar o problema. -->

- [ ] Algo acontece quando uma ação é executada.
- [ ] Algo não acontece quando uma ação é executada.
- [ ] O comportamento de correção no Componente A não afeta o comportamento existente no Componente B.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Sua solicitação de recurso está relacionada a um problema? Por favor descreva
Uma descrição clara e concisa de qual é o problema. Ex. Eu sempre fico frustrado quando [...]

## Descreva a solução que você gostaria
Uma descrição clara e concisa do que você quer que aconteça.

## Descreva as alternativas que você considerou
Uma descrição clara e concisa de quaisquer soluções ou recursos alternativos que você considerou.

## Critérios de Aceitação

<!-- Defina as condições que devem ser verdadeiras para encerrar o problema. -->

- [ ] Algo acontece quando uma ação é executada.
- [ ] Algo não acontece quando uma ação é executada.
- [ ] O comportamento de correção no Componente A não afeta o comportamento existente no Componente B.
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Changelog

<!-- Resuma o problema relacionado ou os novos recursos, explique COMO esse PR resolve o problema e POR QUE você fez as escolhas que fez. -->

- Adicionar nova configuração para...

## Conferir
- [ ] Atualizar versão hardcoded
- [ ] Atualizar README com notas
- [ ] Atualizar CHANGELOG
- [ ] Notificar @colab com changelog
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

# Add plugin files to a root directory
- name: Make plugin root directory
run: "mkdir $PLUGIN_NAME && mv -t ./$PLUGIN_NAME ./languages ./resources ./includes *.txt *.php && ls -lah"
run: "mkdir $PLUGIN_NAME && mv -t ./$PLUGIN_NAME ./languages ./resources ./includes *.txt *.php && find ./${{env.PLUGIN_NAME}} -type f -exec chmod 0644 {} + && find ./${{env.PLUGIN_NAME}} -type d -exec chmod 0755 {} + && ls -lah"

# Compact plugin as .zip
- name: Archive Release
Expand All @@ -44,5 +44,6 @@ jobs:
artifacts: "${{ env.PLUGIN_NAME }}.zip"
token: ${{ secrets.GITHUB_TOKEN }}
commit: "main"
draft: true
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
4 changes: 3 additions & 1 deletion .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/.vscode/settings.json
/.devcontainer/devcontainer.json
/.devcontainer/devcontainer.json
node_modules
sftp.json
23 changes: 18 additions & 5 deletions .php-cs-fixer.php → .vscode/.php-cs-fixer.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@

return (new PhpCsFixer\Config())
->setRules(array(
// Built-ins
'short_scalar_cast' => true,
'visibility_required' => true,
'elseif' => true,
'no_superfluous_elseif' => true,
'@PhpCsFixer' => true,
'align_multiline_comment' => array('comment_type' => 'phpdocs_like'),
'array_syntax' => array('syntax' => 'long'),
'binary_operator_spaces' => true,
Expand All @@ -36,7 +34,7 @@
'control_structure_continuation_position' => true,
'dir_constant' => true,
'fully_qualified_strict_types' => true,
'global_namespace_import' => true,
'global_namespace_import' => false,
'include' => true,
'list_syntax' => array('syntax' => 'long'),
'lowercase_cast' => true,
Expand Down Expand Up @@ -81,8 +79,23 @@
'identical' => true,
'always_move_variable' => true,
),
'modernize_types_casting' => true,
'final_class' => true,
'final_internal_class' => true,
'final_public_method_for_abstract_class' => true,
'void_return' => true,
'logical_operators' => true,
'array_indentation' => true,
'whitespace_after_comma_in_array' => array(
'ensure_single_space' => true,
),
'method_argument_space' => array(
'keep_multiple_spaces_after_comma' => false,
'on_multiline' => 'ensure_fully_multiline',
),
'native_function_invocation' => false,
'native_constant_invocation' => false
))
->setIndent(' ')
->setLineEnding("\n")
->setRiskyAllowed(true)
;
->setRiskyAllowed(true);
8 changes: 7 additions & 1 deletion CHANGELOG.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# 1.6.0 - 27/11/2023
* Correção de bug de carregamento de script do 3DS;
* Adição de exibição de informações adicionais do cartão nos detalhes do pedido;
* Correção de bug de máscaras dos campos de cartão de débito;
* Remoção de funções depreciadas do JQuery;
* Adição de botão de 'ver logs' nas configurações do plugin.

# 1.5.0
* Adição de regras de lintagem;
* Adição de carregamento de atributos globais ao script de parcelamento;
* Atualização de repositório para suportar devcontainers.


# 1.4.0
* Implementação de modo de compatibilidade de validação;
* Ajustes nas descrições de configurações;
Expand Down
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
16 changes: 12 additions & 4 deletions README.txt
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: linknacional
Donate link: https://www.linknacional.com.br/wordpress/woocommerce/cielo/
Tags: woocommerce, invoice, payment, paymethod, card, credit, debit
Requires at least: 5.7
Tested up to: 6.1
Stable tag: 1.5.0
Tested up to: 6.4
Stable tag: 1.6.0
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -72,10 +72,18 @@ Payment Gateway for Cielo API on WooCommerce plugin is dependent on WooCommerce

== Changelog ==

# 1.5.0
= 1.6.0 =
**27/11/2023**
* 3DS script loading bug fix;
* Added display of additional card information in order details;
* Correction of mask bug in debit card fields;
* Removal of deprecated functions from JQuery;
* Added 'view logs' button in plugin settings.

= 1.5.0 =
* Implemented loading of global attributes to installment script.

# 1.4.0
= 1.4.0 =
* Validation compatibility mode implementation;
* Tweaks to settings descriptions;
* Update notice links;
Expand Down
Loading

0 comments on commit d1e87bc

Please sign in to comment.