diff --git a/.github/workflows/pull-request-version.yml b/.github/workflows/pull-request-version.yml
index 2d2df4e..7ae8b57 100644
--- a/.github/workflows/pull-request-version.yml
+++ b/.github/workflows/pull-request-version.yml
@@ -1,4 +1,4 @@
-name: "Check plugin version and tags"
+name: "Check plugin version and release files"
on:
pull_request:
branches:
@@ -6,33 +6,19 @@ on:
jobs:
version-check:
- name: "Check version doesn't not already exists."
+ name: "Version bump, tag, and file checks"
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: 0
- - id: set-vars
- name: "Set variables from .plugin-data file"
- run: |
- # Get all data from .plugin-data file
- content=`cat ./.plugin-data`
- # the following lines are only required for multi line json
- content="${content//'%'/'%25'}"
- content="${content//$'\n'/'%0A'}"
- content="${content//$'\r'/'%0D'}"
- # end of optional handling for multi line json
- echo "::set-output name=pluginData::$content"
+ - name: Fetch tags
+ run: git fetch --tags --prune origin
- - id: version-check
- name: "Check version in .plugin-data is not existing"
- run: |
- # Check version from .plugin-data
- VERSION=${{fromJson(steps.set-vars.outputs.pluginData).version}}
-
- if git rev-parse "$VERSION" >/dev/null 2>&1; then
- echo "Tag aleady exists please update the .plugin-data file to good version";
- exit 1;
- fi
+ - name: Verify version bump and release files
+ env:
+ BASE_SHA: ${{ github.event.pull_request.base.sha }}
+ HEAD_SHA: ${{ github.event.pull_request.head.sha }}
+ run: tests/bin/check-release-version.sh
diff --git a/.github/workflows/quality-js.yml b/.github/workflows/quality-js.yml
index 798f4f2..16fdf38 100644
--- a/.github/workflows/quality-js.yml
+++ b/.github/workflows/quality-js.yml
@@ -2,8 +2,15 @@ name: Javascript Quality Checks
on:
pull_request:
- paths:
- - 'src/**'
+ paths:
+ - 'src/**'
+ - 'package.json'
+ push:
+ paths:
+ - 'src/**'
+ - 'package.json'
+ branches:
+ - main
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
diff --git a/.github/workflows/quality-php.yml b/.github/workflows/quality-php.yml
index ed79cdc..2100ba7 100644
--- a/.github/workflows/quality-php.yml
+++ b/.github/workflows/quality-php.yml
@@ -1,9 +1,10 @@
-name: Quality PHP
+name: PHP Quality Checks
on:
pull_request:
- paths:
- - '**.php'
+ push:
+ branches:
+ - main
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
@@ -13,9 +14,10 @@ concurrency:
cancel-in-progress: true
jobs:
- build:
+ checks:
+ name: Lint PHP
runs-on: ubuntu-latest
- name: PHP quality
+
steps:
- name: Checkout project
uses: actions/checkout@v3
@@ -24,7 +26,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- extensions: mbstring, intl #optional, setup extensions
+ extensions: mbstring, intl
- name: Setup Composer
run: |
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f058c20..489ffd9 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -38,14 +38,6 @@ jobs:
exit 1;
fi
- - id: build-node
- name: "Build project CSS and JS"
- uses: actions/setup-node@v4
- with:
- node-version-file: 'package.json'
- - run: npm install
- - run: npm run build
-
- id: build-php
name: "Build project PHP"
uses: shivammathur/setup-php@v2
@@ -53,6 +45,21 @@ jobs:
php-version: 8.1
- run: composer install --prefer-dist --no-dev -o --ignore-platform-reqs
+ - id: setup-node
+ name: "Setup Node.js"
+ uses: actions/setup-node@v4
+ with:
+ node-version-file: 'package.json'
+ cache: 'npm'
+
+ - id: build-js
+ name: "Build JavaScript assets"
+ run: |
+ echo "Install npm dependencies"
+ npm ci
+ echo "Build assets"
+ npm run build
+
- id: commit-and-push
name: "Commit and push new TAG"
run: |
diff --git a/.plugin-data b/.plugin-data
index 9425050..91edf44 100644
--- a/.plugin-data
+++ b/.plugin-data
@@ -1,4 +1,4 @@
{
- "version": "1.1.0",
+ "version": "1.1.1",
"slug": "blockparty-icons"
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 106e882..4756984 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,11 @@ This plugin **doesn't run any sanitization on SVGs** before using them. Only use
## Changelog
+### 1.1.1 - 2026-08-26
+
+- Fix deprecated warning for nullable string parameters in `CollectionItem`
+- Align GitHub workflows with other blockparty repos and add release version consistency checks
+
### 1.1.0 - 2026-08-14
- Add WP-CLI command to convert `beapi/icon-block` / `beapi/icon-item` old contents to `blockparty/icon`
diff --git a/blockparty-icons.php b/blockparty-icons.php
index 5ac3209..c294308 100644
--- a/blockparty-icons.php
+++ b/blockparty-icons.php
@@ -4,7 +4,7 @@
* Description: Provides blocks in WordPress editor to add custom SVG icons.
* Requires at least: 6.2
* Requires PHP: 8.1
- * Version: 1.1.0
+ * Version: 1.1.1
* Author: Be API Technical Team
* Author URI: https://beapi.fr
* License: GPL-2.0-or-later
@@ -30,7 +30,7 @@
include_once __DIR__ . '/vendor/autoload.php';
}
-define( 'BLOCKPARTY_ICONS_VERSION', '1.1.0' );
+define( 'BLOCKPARTY_ICONS_VERSION', '1.1.1' );
define( 'BLOCKPARTY_ICONS_URL', plugin_dir_url( __FILE__ ) );
define( 'BLOCKPARTY_ICONS_DIR', plugin_dir_path( __FILE__ ) );
define( 'BLOCKPARTY_ICONS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
diff --git a/includes/Icon/CollectionItem.php b/includes/Icon/CollectionItem.php
index 0914ece..f2c716f 100644
--- a/includes/Icon/CollectionItem.php
+++ b/includes/Icon/CollectionItem.php
@@ -4,13 +4,13 @@
class CollectionItem {
- private $name;
- private $label;
- private $type;
- private $version;
- private $content;
+ private string $name;
+ private ?string $label;
+ private string $type;
+ private ?string $version;
+ private string $content;
- public function __construct( string $name, string $type, string $content, string $label = null, string $version = null ) {
+ public function __construct( string $name, string $type, string $content, ?string $label = null, ?string $version = null ) {
$this->name = $name;
$this->type = $type;
$this->content = $content;
diff --git a/package-lock.json b/package-lock.json
index 0ca9864..aa22b2a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "blockparty-icons",
- "version": "1.0.8",
+ "version": "1.1.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "blockparty-icons",
- "version": "1.0.8",
+ "version": "1.1.1",
"license": "GPL-2.0-or-later",
"dependencies": {
"@beapi/icons": "^1.2.5",
diff --git a/package.json b/package.json
index 60d0c3f..0c18322 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "blockparty-icons",
- "version": "1.1.0",
+ "version": "1.1.1",
"description": "Provides blocks in WordPress editor to add custom SVG icons from your theme.",
"author": "Be API Technical team",
"license": "GPL-2.0-or-later",
diff --git a/readme.txt b/readme.txt
index 12b6c02..3c5ef0a 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ Tags: block, icons, svg, gutenberg, editor
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 8.1
-Stable tag: 1.1.0
+Stable tag: 1.1.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -36,6 +36,10 @@ Yes. Register a collection with `type` set to `folder` and `source` pointing to
== Changelog ==
+= 1.1.1 =
+* Fix deprecated warning for nullable string parameters in `CollectionItem`.
+* Align GitHub workflows with other blockparty repos and add release version consistency checks.
+
= 1.1.0 =
* Add WP-CLI command to convert `beapi/icon-block` / `beapi/icon-item` old content to `blockparty/icon`.
diff --git a/src/block.json b/src/block.json
index 37a95d2..ffd022b 100644
--- a/src/block.json
+++ b/src/block.json
@@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "blockparty/icon",
- "version": "1.1.0",
+ "version": "1.1.1",
"title": "Icon",
"category": "widgets",
"description": "Easily add custom vector icon to your content.",
diff --git a/tests/bin/check-release-version.sh b/tests/bin/check-release-version.sh
new file mode 100755
index 0000000..7585107
--- /dev/null
+++ b/tests/bin/check-release-version.sh
@@ -0,0 +1,139 @@
+#!/usr/bin/env bash
+#
+# When .plugin-data version changes between base and head commits, verify
+# the release tag is unused and that every versioned file is updated consistently.
+#
+# Usage (from repository root):
+# ./tests/bin/check-release-version.sh
+# (default: merge-base of main|origin/main|master with HEAD → HEAD, for local runs)
+# BASE_SHA=