Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
# Keep GitHub Actions up-to-date
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups: #all in one PR
github-actions-all:
patterns:
- "*"
51 changes: 14 additions & 37 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
branches:
- master
- develop
- 'feature/*'
- 'hotfix/*'
- 'release/*'
tags:
- '*'
pull_request:
Expand All @@ -25,7 +22,7 @@ jobs:

strategy:
matrix:
php-versions: [ '8.2', '8.5' ]
php-versions: [ '8.3', '8.5' ]
coverage: [none]
fail-fast: false

Expand All @@ -38,15 +35,15 @@ jobs:
coverage: ${{ matrix.coverage }}

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

- name: Checkout plugin
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
path: galette-core/galette/plugins/plugin-helloasso

Expand All @@ -73,7 +70,7 @@ jobs:
../../vendor/bin/phpcs lib/ ./*.php

- name: CS Fixer
if: matrix.php-versions == '8.2'
if: matrix.php-versions == '8.3'
run: |
cd galette-core/galette/plugins/plugin-helloasso
../../vendor/bin/php-cs-fixer check --show-progress=dots --verbose --diff
Expand All @@ -100,12 +97,12 @@ jobs:
matrix:
include:
#lower php version
- { php-version: "8.2", db-image: "mysql:5.7", coverage: none, always: true }
- { php-version: "8.2", db-image: "mysql:8.4", coverage: none, always: true }
- { php-version: "8.2", db-image: "mariadb:10.6", coverage: none, always: true }
- { php-version: "8.2", db-image: "mariadb:11", coverage: none, always: true }
- { php-version: "8.2", db-image: "postgres:13", coverage: none, always: true }
- { php-version: "8.2", db-image: "postgres:17", coverage: none, always: true }
- { php-version: "8.3", db-image: "mysql:5.7", coverage: none, always: true }
- { php-version: "8.3", db-image: "mysql:8.4", coverage: none, always: true }
- { php-version: "8.3", db-image: "mariadb:10.6", coverage: none, always: true }
- { php-version: "8.3", db-image: "mariadb:11", coverage: none, always: true }
- { php-version: "8.3", db-image: "postgres:13", coverage: none, always: true }
- { php-version: "8.3", db-image: "postgres:17", coverage: none, always: true }
#higher stable php version
- { php-version: "8.5", db-image: "mysql:5.7", coverage: none, always: true }
- { php-version: "8.5", db-image: "mysql:8.4", coverage: none, always: true }
Expand Down Expand Up @@ -166,37 +163,17 @@ jobs:
echo "npm $(npm --version)"
docker exec ${{ job.services.db.id }} bash -c "if [[ -n \$(command -v psql) ]]; then psql --version; else if [[ -n \$(command -v mysql) ]]; then mysql --version; else mariadb --version; fi fi"

- name: Checkout Galette core
- name: Build Galette
if: env.skip != 'true'
uses: actions/checkout@v4
uses: galette/.github/actions/build-galette@main
with:
repository: galette/galette
path: galette-core
fetch-depth: 1
ref: develop
php-version: ${{ matrix.php-version }}

- name: Checkout plugin
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
path: galette-core/galette/plugins/plugin-helloasso

- name: "Restore dependencies cache"
if: env.skip != 'true'
uses: actions/cache@v4
with:
path: |
~/.composer/cache/
~/.npm/_cacache/
key: "${{ runner.os }}-galette-${{ matrix.php-version }}-${{ hashFiles('galette/composer.lock', 'package-lock.json') }}"
restore-keys: |
${{ runner.os }}-galette-${{ matrix.php-version }}-

- name: Install dependencies
if: env.skip != 'true'
run: |
cd galette-core
bin/install_deps

- name: Init for PostgreSQL
env:
POSTGRES_HOST: localhost
Expand Down
12 changes: 6 additions & 6 deletions lib/GaletteHelloasso/Helloasso.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@

class Helloasso
{
public const TABLE = 'preferences';
public const TABLE_TOKENS = 'tokens';
public const string TABLE = 'preferences';
public const string TABLE_TOKENS = 'tokens';

public const PAYMENT_PENDING = 'Pending';
public const PAYMENT_COMPLETE = 'Complete';
public const string PAYMENT_PENDING = 'Pending';
public const string PAYMENT_COMPLETE = 'Complete';

public const API_ROUTE = 'https://api.helloasso.com/';
public const TEST_API_ROUTE = 'https://api.helloasso-sandbox.com/';
public const string API_ROUTE = 'https://api.helloasso.com/';
public const string TEST_API_ROUTE = 'https://api.helloasso-sandbox.com/';

private Db $zdb;
private Preferences $preferences;
Expand Down
16 changes: 8 additions & 8 deletions lib/GaletteHelloasso/HelloassoHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
*/
class HelloassoHistory extends History
{
public const TABLE = 'history';
public const PK = 'id_helloasso';

public const STATE_NONE = 0;
public const STATE_PROCESSED = 1;
public const STATE_ERROR = 2;
public const STATE_INCOMPLETE = 3;
public const STATE_ALREADYDONE = 4;
public const string TABLE = 'history';
public const string PK = 'id_helloasso';

public const int STATE_NONE = 0;
public const int STATE_PROCESSED = 1;
public const int STATE_ERROR = 2;
public const int STATE_INCOMPLETE = 3;
public const int STATE_ALREADYDONE = 4;

private int $id;

Expand Down
16 changes: 5 additions & 11 deletions lib/GaletteHelloasso/PluginGaletteHelloasso.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,10 @@ public function getMyDashboards(): array
*/
public function isInstalled(): bool
{
try {
$this->zdb->execute($this->zdb->select(HELLOASSO_PREFIX . Helloasso::TABLE)->limit(1));
$this->zdb->execute($this->zdb->select(HELLOASSO_PREFIX . Helloasso::TABLE_TOKENS)->limit(1));
$this->zdb->execute($this->zdb->select(HELLOASSO_PREFIX . HelloassoHistory::TABLE)->limit(1));
return true;
} catch (\Throwable $e) {
if (!$this->zdb->isMissingTableException($e)) {
throw $e;
}
}
return false;
return
$this->zdb->tableExists(HELLOASSO_PREFIX . Helloasso::TABLE)
&& $this->zdb->tableExists(HELLOASSO_PREFIX . Helloasso::TABLE_TOKENS)
&& $this->zdb->tableExists(HELLOASSO_PREFIX . HelloassoHistory::TABLE)
;
}
}
Loading