forked from mercadopago/cart-woocommerce
-
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.
Merge pull request #1 from LinkNacional/dev
6.9.3 Plugin refactor with Link Nacional plugin updater and customizations
- Loading branch information
Showing
245 changed files
with
25,120 additions
and
19,812 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,102 @@ | ||
// 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", | ||
"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;composer install", | ||
"mounts": [ | ||
{ | ||
// path in your local machine where WordPress is. | ||
"source": "/home/{yourusername}/projects/_wordpress", | ||
"target": "/home/vscode/_wordpress", | ||
"type": "bind" | ||
} | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"junstyle.php-cs-fixer", | ||
"neilbrayfield.php-docblocker", | ||
"bmewburn.vscode-intelephense-client" | ||
], | ||
"settings": { | ||
"php-cs-fixer.config": ".php-cs-fixer.php", | ||
"files.eol": "\n", | ||
"files.encoding": "utf8", | ||
"php.suggest.basic": false, | ||
"[smarty]": { | ||
"editor.tabSize": 2 | ||
}, | ||
"[php]": { | ||
"editor.indentSize": "tabSize", | ||
"editor.detectIndentation": false, | ||
"editor.defaultFormatter": "junstyle.php-cs-fixer", | ||
"editor.insertSpaces": true, | ||
"editor.tabSize": 4, | ||
"editor.rulers": [ | ||
120 | ||
] | ||
}, | ||
"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 " | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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 @@ | ||
## Descreva o bug | ||
Uma descrição clara e concisa do que é o bug. | ||
|
||
## Informação do sistema | ||
- PHP: [ex. 8.1] | ||
- WooCommerce: [ex. 7.8.0] | ||
- 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. |
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,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. |
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,50 @@ | ||
name: Generate new release for plugin | ||
|
||
on: | ||
pull_request: | ||
types: [ closed ] | ||
branches: [ main ] | ||
|
||
env: | ||
PLUGIN_NAME: lkn-mercadopago-woocommerce | ||
|
||
jobs: | ||
release-build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# Add plugin files to a root directory | ||
- name: Make plugin root directory | ||
run: "mkdir $PLUGIN_NAME && mv -t ./$PLUGIN_NAME ./assets ./i18n ./includes ./packages ./templates *.php && ls -lah" | ||
|
||
# Compact plugin as .zip | ||
- name: Archive Release | ||
uses: thedoctor0/zip-release@master | ||
with: | ||
type: 'zip' | ||
path: '${{ env.PLUGIN_NAME }}' | ||
directory: '.' | ||
filename: '${{ env.PLUGIN_NAME }}.zip' | ||
exclusions: '*.git* /*node_modules/* .editorconfig' | ||
|
||
# Update version tag | ||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
custom_tag: "6.9.3" | ||
|
||
# Generate new release | ||
- name: Generate new Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
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 }} |
This file was deleted.
Oops, something went wrong.
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,7 +1,8 @@ | ||
node_modules | ||
.DS_Store | ||
.vscode | ||
.vscode/settings.json | ||
.idea | ||
.idea/ | ||
/vendor/ | ||
woocommerce-mercadopago.zip | ||
.devcontainer/devcontainer.json |
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,89 @@ | ||
<?php | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRules(array( | ||
'short_scalar_cast' => true, | ||
'visibility_required' => true, | ||
'elseif' => true, | ||
'no_superfluous_elseif' => true, | ||
'align_multiline_comment' => array('comment_type' => 'phpdocs_like'), | ||
'array_syntax' => array('syntax' => 'long'), | ||
'binary_operator_spaces' => true, | ||
'blank_line_after_opening_tag' => false, | ||
'braces' => array( | ||
'position_after_functions_and_oop_constructs' => 'same', | ||
), | ||
'cast_spaces' => true, | ||
'class_attributes_separation' => array( | ||
'elements' => array( | ||
'const' => 'one', | ||
'method' => 'one', | ||
'property' => 'only_if_meta', | ||
), | ||
), | ||
'class_definition' => array('single_line' => true), | ||
'class_keyword_remove' => true, | ||
'concat_space' => array('spacing' => 'one'), | ||
'control_structure_continuation_position' => true, | ||
'dir_constant' => true, | ||
'fully_qualified_strict_types' => true, | ||
'global_namespace_import' => true, | ||
'include' => true, | ||
'list_syntax' => array('syntax' => 'long'), | ||
'lowercase_cast' => true, | ||
'lowercase_static_reference' => true, | ||
'magic_constant_casing' => true, | ||
'magic_method_casing' => true, | ||
'method_chaining_indentation' => true, | ||
'native_constant_invocation' => true, | ||
'native_function_casing' => true, | ||
'native_function_type_declaration_casing' => true, | ||
'new_with_braces' => true, | ||
'no_alternative_syntax' => array('fix_non_monolithic_code' => false), | ||
'no_blank_lines_after_class_opening' => false, | ||
'no_blank_lines_after_phpdoc' => true, | ||
'no_empty_comment' => true, | ||
'no_extra_blank_lines' => array( | ||
'tokens' => array( | ||
'continue', | ||
'extra', | ||
'parenthesis_brace_block', | ||
'square_brace_block', | ||
'throw', | ||
'use', | ||
), | ||
), | ||
'no_spaces_around_offset' => array('positions' => array('outside')), | ||
'no_spaces_inside_parenthesis' => false, | ||
'not_operator_with_space' => true, | ||
// 'not_operator_with_successor_space' => true, | ||
'phpdoc_tag_casing' => true, | ||
'phpdoc_types_order' => array( | ||
'null_adjustment' => 'always_last', | ||
'sort_algorithm' => 'none', | ||
), | ||
'single_line_throw' => true, | ||
'strict_param' => true, | ||
'trim_array_spaces' => true, | ||
// WPCS 3.0 proposal, yoda style is optional | ||
'yoda_style' => array( | ||
'always_move_variable' => true, | ||
'equal' => true, | ||
'identical' => true, | ||
'always_move_variable' => true, | ||
), | ||
'modernize_types_casting' => 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', | ||
), | ||
)) | ||
->setIndent(' ') | ||
->setLineEnding("\n") | ||
->setRiskyAllowed(true); |
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,10 @@ | ||
{ | ||
"recommendations": [ | ||
"mehedidracula.php-namespace-resolver", | ||
"eamodio.gitlens", | ||
"vivaxy.vscode-conventional-commits", | ||
"ms-vscode-remote.remote-containers", | ||
"yzhang.markdown-all-in-one", | ||
"standard.vscode-standard" | ||
] | ||
} |
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,7 @@ | ||
{ | ||
"intelephense.environment.phpVersion": "8.1", | ||
// For autocomplete | ||
"intelephense.environment.includePaths": [ | ||
"/home/vscode/_wordpress" // This path is a bind mount that comes from devcontainer.json. | ||
] | ||
} |
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
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.