From 5d014e8fc3265df08cd871da7fdd4f4a1769b0d8 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Sun, 19 Apr 2026 10:32:15 +0200 Subject: [PATCH 1/4] Update isInstalled following latest core changes --- lib/GaletteHelloasso/PluginGaletteHelloasso.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/GaletteHelloasso/PluginGaletteHelloasso.php b/lib/GaletteHelloasso/PluginGaletteHelloasso.php index fcbd872..0d26a8d 100644 --- a/lib/GaletteHelloasso/PluginGaletteHelloasso.php +++ b/lib/GaletteHelloasso/PluginGaletteHelloasso.php @@ -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) + ; } } From 694f87e2194971e1c298be40368af0ad99b82f4a Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Sun, 19 Apr 2026 10:43:18 +0200 Subject: [PATCH 2/4] Bump minimal PHP version --- .github/workflows/ci-linux.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index ff007f6..c8133f1 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: - php-versions: [ '8.2', '8.5' ] + php-versions: [ '8.3', '8.5' ] coverage: [none] fail-fast: false @@ -73,7 +73,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 @@ -100,12 +100,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 } From a1e2a659eaa76d407a49e4d6e796cff7d3162927 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Sun, 19 Apr 2026 10:44:32 +0200 Subject: [PATCH 3/4] Add types on constants --- lib/GaletteHelloasso/Helloasso.php | 12 ++++++------ lib/GaletteHelloasso/HelloassoHistory.php | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/GaletteHelloasso/Helloasso.php b/lib/GaletteHelloasso/Helloasso.php index 8b05422..0001ed1 100644 --- a/lib/GaletteHelloasso/Helloasso.php +++ b/lib/GaletteHelloasso/Helloasso.php @@ -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; diff --git a/lib/GaletteHelloasso/HelloassoHistory.php b/lib/GaletteHelloasso/HelloassoHistory.php index 5f78229..4c0f8b8 100644 --- a/lib/GaletteHelloasso/HelloassoHistory.php +++ b/lib/GaletteHelloasso/HelloassoHistory.php @@ -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; From 56eeb4b870e0bde2382b673643a0e48b6f553bc3 Mon Sep 17 00:00:00 2001 From: Guillaume AGNIERAY Date: Mon, 20 Apr 2026 11:49:01 +0200 Subject: [PATCH 4/4] Update github workflow - Use Core builder action - Reduce number of actions run each time - Configure Dependabot to open PR on 3rd party libs Co-authored-by: Johan Cwiklinski --- .github/dependabot.yml | 11 +++++++++++ .github/workflows/ci-linux.yml | 35 ++++++---------------------------- 2 files changed, 17 insertions(+), 29 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..1590485 --- /dev/null +++ b/.github/dependabot.yml @@ -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: + - "*" diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index c8133f1..79d4cc0 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -5,9 +5,6 @@ on: branches: - master - develop - - 'feature/*' - - 'hotfix/*' - - 'release/*' tags: - '*' pull_request: @@ -38,7 +35,7 @@ jobs: coverage: ${{ matrix.coverage }} - name: Checkout Galette core - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: galette/galette path: galette-core @@ -46,7 +43,7 @@ jobs: ref: develop - name: Checkout plugin - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: path: galette-core/galette/plugins/plugin-helloasso @@ -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