Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Dec 7, 2023
2 parents 651da8c + b4beabd commit 6fa0597
Show file tree
Hide file tree
Showing 50 changed files with 2,293 additions and 1,717 deletions.
21 changes: 17 additions & 4 deletions .composer-require-checker.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

"ctype", "date", "fileinfo", "filter", "iconv", "json", "pcre", "reflection", "session", "simplexml", "spl", "xml",

"curl", "gd", "intl", "mbstring", "mysqli", "zlib", "pdo", "pgsql", "gettext", "tidy",
"curl", "gd", "intl", "mbstring", "mysqli", "zlib", "pdo", "pgsql", "gettext",

"exif", "pcntl"
],
Expand Down Expand Up @@ -40,11 +40,15 @@
"GALETTE_TEMPIMAGES_PATH",
"GALETTE_THEME",
"GALETTE_THEMES_PATH",
"GALETTE_THEME_DIR",
"GALETTE_TPL_SUBDIR",
"GALETTE_VERSION",
"GALETTE_X_FORWARDED_FOR_INDEX",
"_CURRENT_THEME_PATH",
"GALETTE_URI",
"GALETTE_MYSQL_MIN",
"GALETTE_MARIADB_MIN",
"GALETTE_PGSQL_MIN",
"GALETTE_DISPLAY_VERSION",
"GALETTE_PHP_MIN",
"_T",
"__",
"_Tn",
Expand Down Expand Up @@ -87,7 +91,16 @@
"DI\\autowire",
"DI\\Container",
"DI\\ContainerBuilder",
"DI\\Bridge\\Slim\\App"
"DI\\Bridge\\Slim\\App",

"// Should not error (not used) but...",
"mt_rand",
"rand",
"random_int",


"// Not detected, do not know why.",
"Psr\\Http\\Server\\RequestHandlerInterface"
],
"scan-files": [
"*.php",
Expand Down
34 changes: 15 additions & 19 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
php-versions: [ '7.2', '7.3', '7.4', '8.0', '8.1' ]
php-versions: [ '8.1', '8.2' ]
coverage: [none]
fail-fast: false

Expand All @@ -30,47 +30,43 @@ jobs:
tools: composer
coverage: ${{ matrix.coverage }}

- name: Checkout plugin
uses: actions/checkout@v2

- name: Checkout Galette core
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: galette/galette
path: galette-core
fetch-depth: 1
ref: develop

- name: Checkout plugin
uses: actions/checkout@v3
with:
path: galette-core/galette/plugins/plugin-paypal

- name: Get composer cache directory
id: composer-cache
run: |
mv composer.json.checker composer.json
echo "::set-output name=dir::$(composer config cache-files-dir)"
if: ${{ matrix.php-versions!= '7.2' && matrix.php-versions!= '7.3' }}
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
if: ${{ matrix.php-versions!= '7.2' && matrix.php-versions!= '7.3' }}

- name: Install dependencies
run: |
cd galette-core/galette
composer install --ignore-platform-reqs
if: ${{ matrix.php-versions!= '7.2' && matrix.php-versions!= '7.3' }}

- name: Install CS only
run: |
composer require squizlabs/php_codesniffer
if: ${{ matrix.php-versions== '7.2' || matrix.php-versions== '7.3' }}
- name: CS
run: |
vendor/bin/phpcs -n -p --standard=galette-core/phpcs-rules.xml lib/ ./*.php
cd galette-core/galette/plugins/plugin-paypal
../../vendor/bin/phpcs -n -p --standard=../../../phpcs-rules.xml lib/ ./*.php
- name: Check missing symbols
run: |
vendor/bin/composer-require-checker check --config-file=.composer-require-checker.config.json
if: ${{ matrix.php-versions!= '7.2' && matrix.php-versions!= '7.3' }}
cd galette-core/galette/plugins/plugin-paypal
composer require maglnet/composer-require-checker -W
vendor/bin/composer-require-checker check --config-file=.composer-require-checker.config.json ../../composer.json
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.exvim*
dist/
tempcache/
174 changes: 174 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
#tools:
# external_code_coverage:
# timeout: 600 # Timeout in seconds.

build:
dependencies:
override:
- composer self-update
- git clone --depth=1 https://github.com/galette/galette -b develop galette && pushd galette
- ./bin/install_deps && popd

nodes:

analysis:
environment:
php:
version: 8.1

project_setup:
override:
- 'true'
tests:
override:
- php-scrutinizer-run
- js-scrutinizer-run

cache:
directories:
- vendor # Cache for already installed composer package -> speed up composer install
- galette/vendor # Same ^
- bin # As vendor directory is cached, bin directory must be also cached (as some dependency will not installed if they are already present and so, related binary will not be linked)
- ~/.composer # Composer home directory (avoid fetching already fetched packages)
filter:
excluded_paths:
- 'galette/*'
- 'tests/*'
- 'bin/*'
- '*.min.js'
dependency_paths:
- "galette/vendor/"
- "vendor/"

checks:
php:
fix_php_opening_tag: false
remove_php_closing_tag: false
one_class_per_file: false
side_effects_or_types: false
no_mixed_inline_html: false
require_braces_around_control_structures: false
php5_style_constructor: false
no_global_keyword: false
avoid_usage_of_logical_operators: false
psr2_class_declaration: false
no_underscore_prefix_in_properties: false
no_underscore_prefix_in_methods: false
blank_line_after_namespace_declaration: false
single_namespace_per_use: false
psr2_switch_declaration: false
psr2_control_structure_declaration: false
avoid_superglobals: false
security_vulnerabilities: false
no_exit: false
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: false
javascript: true

coding_style:
php:
indentation:
general:
use_tabs: false
size: 4
switch:
indent_case: true
spaces:
general:
linefeed_character: newline
before_parentheses:
function_declaration: false
closure_definition: true
function_call: false
if: true
for: true
while: true
switch: true
catch: true
array_initializer: false
around_operators:
assignment: true
logical: true
equality: true
relational: true
bitwise: true
additive: true
multiplicative: true
shift: true
unary_additive: false
concatenation: true
negation: false
before_left_brace:
class: true
function: true
if: true
else: true
for: true
while: true
do: true
switch: true
try: true
catch: true
finally: true
before_keywords:
else: true
while: true
catch: true
finally: true
within:
brackets: false
array_initializer: false
grouping: false
function_call: false
function_declaration: false
if: false
for: false
while: false
switch: false
catch: false
type_cast: false
ternary_operator:
before_condition: true
after_condition: true
before_alternative: true
after_alternative: true
in_short_version: false
other:
before_comma: false
after_comma: true
before_semicolon: false
after_semicolon: true
after_type_cast: false
braces:
classes_functions:
class: undefined
function: undefined
closure: undefined
if:
opening: undefined
always: true
else_on_new_line: false
for:
opening: undefined
always: true
while:
opening: undefined
always: true
do_while:
opening: undefined
always: true
while_on_new_line: false
switch:
opening: undefined
try:
opening: undefined
catch_on_new_line: false
finally_on_new_line: false
upper_lower_casing:
keywords:
general: undefined
constants:
true_false_null: undefined
19 changes: 11 additions & 8 deletions _define.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*
* PHP version 5
*
* Copyright © 2011-2021 The Galette Team
* Copyright © 2011-2023 The Galette Team
*
* This file is part of Galette (http://galette.tuxfamily.org).
* This file is part of Galette (https://galette.eu).
*
* Galette is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -28,24 +28,27 @@
* @package GalettePaypal
*
* @author Johan Cwiklinski <[email protected]>
* @copyright 2011-2021 The Galette Team
* @copyright 2011-2023 The Galette Team
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
* @link http://galette.tuxfamily.org
* @since Available since 0.7dev - 2011-05-31
* @link https://galette.eu
*/

$this->register(
'Galette Paypal', //Name
'Paypal integration', //Short description
'Johan Cwiklinski', //Author
'1.10.0', //Version
'0.9.6', //Galette compatible version
'2.0.0', //Version
'1.0.0', //Galette compatible version
'paypal', //routing name and translation domain
'2021-11-29', //Release date
'2023-12-07', //Release date
[ //Permissions needed
'paypal_preferences' => 'staff',
'store_paypal_preferences' => 'staff',
'paypal_history' => 'staff',
'filter_paypal_history' => 'staff'
]
);

$this->setCsrfExclusions([
'/paypal_(success|notify|cancelled)/',
]);
Loading

0 comments on commit 6fa0597

Please sign in to comment.