Skip to content

Commit 3f389ac

Browse files
feat: align scaffold with SPARXSTAR Engineering Standards v2
- Fix sparxstar-gluon.php: file header, declare(strict_types=1), constant prefixes (SPARXSTAR_GLUON_*), namespace typo fix, class/method naming, static method fixes, autoloader ref, typo fixes, proper multisite activation/deactivation via get_sites(), prefixed option key - Add SPARXSTAR_GLUON_PLUGIN_FILE constant for portable textdomain loading - Fix phpcs.xml.dist: add spx prefix, add method/variable name exclusions for root files to allow PSR-12 camelCase in namespaced bootstrap class - Fix src/SparxstarGluonOrchestrator.php: property assignments, namespaces, gluonRun() static, load_plugin_textdomain, Logger namespace, deps - Fix src/integrations/SparxstarGluonRules.php: declare, file docblock, add getInstance()/gluonSetConsentType(), fix return types, rename const - Fix src/core/SparxstarGluonCore.php: declare, file docblock, fix namespace - Fix src/helpers/loggers/SparxstarGluonLogger.php: declare, docblock, Yoda - Fix src/helpers/loggers/index.php: add @Package to docblock - Fix src/includes/Autoloader.php: declare, docblock, update constant refs - Fix src/frontend/SparxstarGluonLoader.php: declare, docblock, fix shortcode callback name mismatch (pluginRenderShortcode -> gluonRenderShortcode) - Fix src/includes/SparxstarGluonAIManager.php: rename method to gluonPrefix - Fix uninstall.php: define site_ids via paginated get_sites(), update consts - Fix .github/workflows/release.yml: sparxstar-plugin-entry.php refs fixed - Fix .github/workflows/security.yml: main file reference fixed - Fix phpstan-baseline.neon: remove resolved errors, keep external AI_Client - Update README.md: add Renaming scaffold section, fix sparxstar-starter URLs - Update composer.json/package.json: rename to sparxstar-gluon - Update docs: fix sparxstar-starter clone URLs Co-authored-by: MaximillianGroup <34328348+MaximillianGroup@users.noreply.github.com> Agent-Logs-Url: https://github.com/Starisian-Technologies/sparxstar-gluon/sessions/05effddc-ef71-4df0-b1b2-1336ade981b3
1 parent 09239d2 commit 3f389ac

19 files changed

Lines changed: 395 additions & 383 deletions

.github/workflows/release.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ jobs:
5353
VERSION="${{ steps.get_version.outputs.version }}"
5454
5555
# Update plugin main file version
56-
sed -i "s/Version: [0-9.]\+/Version: $VERSION/" sparxstar-plugin-entry.php
57-
sed -i "s/@version [0-9.]\+/@version $VERSION/" sparxstar-plugin-entry.php
58-
sed -i "s/define('GLUON_PLUGIN_VERSION', '[0-9.]\+');/define('GLUON_PLUGIN_VERSION', '$VERSION');/" sparxstar-plugin-entry.php
56+
sed -i "s/Version: [0-9.]\+/Version: $VERSION/" sparxstar-gluon.php
57+
sed -i "s/@version [0-9.]\+/@version $VERSION/" sparxstar-gluon.php
58+
sed -i "s/define( 'SPARXSTAR_GLUON_VERSION', '[0-9.]\+' );/define( 'SPARXSTAR_GLUON_VERSION', '$VERSION' );/" sparxstar-gluon.php
5959
6060
# Update package.json version
6161
npm version $VERSION --no-git-tag-version --allow-same-version
@@ -90,7 +90,7 @@ jobs:
9090
mkdir -p dist
9191
9292
# Copy files excluding those in .distignore
93-
rsync -av --exclude-from=.distignore . dist/sparxstar-plugin/
93+
rsync -av --exclude-from=.distignore . dist/sparxstar-gluon/
9494
9595
echo "✓ Distribution directory created"
9696
@@ -100,15 +100,15 @@ jobs:
100100
cd dist
101101
102102
# Create zip file
103-
zip -r sparxstar-plugin.zip sparxstar-plugin/
103+
zip -r sparxstar-gluon.zip sparxstar-gluon/
104104
105105
# Generate checksums
106-
md5sum sparxstar-plugin.zip > sparxstar-plugin.zip.md5
107-
sha256sum sparxstar-plugin.zip > sparxstar-plugin.zip.sha256
106+
md5sum sparxstar-gluon.zip > sparxstar-gluon.zip.md5
107+
sha256sum sparxstar-gluon.zip > sparxstar-gluon.zip.sha256
108108
109109
# Save checksums to output
110-
MD5=$(cat sparxstar-plugin.zip.md5 | awk '{print $1}')
111-
SHA256=$(cat sparxstar-plugin.zip.sha256 | awk '{print $1}')
110+
MD5=$(cat sparxstar-gluon.zip.md5 | awk '{print $1}')
111+
SHA256=$(cat sparxstar-gluon.zip.sha256 | awk '{print $1}')
112112
113113
echo "md5=$MD5" >> $GITHUB_OUTPUT
114114
echo "sha256=$SHA256" >> $GITHUB_OUTPUT
@@ -144,9 +144,9 @@ jobs:
144144
uses: softprops/action-gh-release@v2
145145
with:
146146
files: |
147-
dist/sparxstar-plugin.zip
148-
dist/sparxstar-plugin.zip.md5
149-
dist/sparxstar-plugin.zip.sha256
147+
dist/sparxstar-gluon.zip
148+
dist/sparxstar-gluon.zip.md5
149+
dist/sparxstar-gluon.zip.sha256
150150
body_path: /tmp/current_changelog.md
151151
draft: false
152152
prerelease: ${{ contains(steps.get_version.outputs.version, '-') }}
@@ -157,5 +157,5 @@ jobs:
157157
uses: actions/upload-artifact@v4
158158
with:
159159
name: plugin-release-${{ steps.get_version.outputs.version }}
160-
path: dist/sparxstar-plugin.zip
160+
path: dist/sparxstar-gluon.zip
161161
retention-days: 30

.github/workflows/security.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
echo "Checking WordPress security best practices..."
109109
110110
# Check for direct file access protection
111-
if ! grep -q "defined('ABSPATH')" sparxstar-plugin-entry.php; then
111+
if ! grep -q "defined('ABSPATH')" sparxstar-gluon.php; then
112112
echo "Warning: Main plugin file should check for ABSPATH"
113113
fi
114114

README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ follow Starisian Technologies coding conventions and SPARXSTAR deployment standa
5454
1. **Clone and Install**
5555

5656
```bash
57-
git clone https://github.com/Starisian-Technologies/sparxstar-starter.git your-plugin-name
57+
git clone https://github.com/Starisian-Technologies/sparxstar-gluon.git your-plugin-name
5858
cd your-plugin-name
5959
composer install
6060
npm install
@@ -78,6 +78,30 @@ npm test
7878
- Copy plugin to WordPress plugins directory
7979
- Activate through WordPress admin
8080

81+
## Renaming This Scaffold
82+
83+
Gluon is a **named scaffold** — when building a real plugin, replace all scaffold
84+
identifiers with your plugin's name. Run through these steps after cloning:
85+
86+
| Find (case-sensitive) | Replace with |
87+
| --------------------- | ------------ |
88+
| `sparxstar-gluon` | `your-plugin-slug` |
89+
| `SparxstarGluon` | `YourPluginName` |
90+
| `SPARXSTAR_GLUON` | `YOUR_PLUGIN` |
91+
| `sparxstar_gluon` | `your_plugin` |
92+
| `Gluon` | `YourPlugin` |
93+
| `gluon` | `yourplugin` |
94+
| `SPARXSTAR GLUON` | `YOUR PLUGIN NAME` |
95+
96+
**Files to rename:**
97+
98+
- `sparxstar-gluon.php``your-plugin-slug.php`
99+
- `src/SparxstarGluonOrchestrator.php``src/YourPluginNameOrchestrator.php`
100+
- All files under `src/` that contain `SparxstarGluon` in their name
101+
102+
Update the plugin header fields (`Plugin Name`, `Text Domain`, `Plugin URI`, etc.)
103+
and the `composer.json` `name` field to match your plugin's identity.
104+
81105
## Documentation
82106

83107
- [Build & Development Guide](docs/BUILD.md) - Detailed build instructions
@@ -260,8 +284,8 @@ SPARXSTAR™ and Starisian Technologies™ are trademarks of Starisian Technolog
260284
## Support
261285

262286
- 📖 [Documentation](docs/)
263-
- 🐛 [Issue Tracker](https://github.com/Starisian-Technologies/sparxstar-starter/issues)
264-
- 💬 [Discussions](https://github.com/Starisian-Technologies/sparxstar-starter/discussions)
287+
- 🐛 [Issue Tracker](https://github.com/Starisian-Technologies/sparxstar-gluon/issues)
288+
- 💬 [Discussions](https://github.com/Starisian-Technologies/sparxstar-gluon/discussions)
265289
- 📧 Email: support@starisian.com
266290

267291
## Contributing

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "starisian/sparxstar-starter",
2+
"name": "starisian/sparxstar-gluon",
33
"description": "A WordPress plugin template by Starisian Technologies with PSR-4 autoloading and modular architecture.",
44
"license": "proprietary",
55
"authors": [

docs/BUILD.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ This document explains how to build, develop, and maintain this WordPress plugin
2424
1. Clone the repository:
2525

2626
```bash
27-
git clone https://github.com/Starisian-Technologies/sparxstar-starter.git
28-
cd sparxstar-starter
27+
git clone https://github.com/Starisian-Technologies/sparxstar-gluon.git
28+
cd sparxstar-gluon
2929
```
3030

3131
2. Install PHP dependencies:

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Welcome to the SPARXSTAR WordPress Plugin Starter documentation.
2222
### 1. Clone and Setup
2323

2424
```bash
25-
git clone https://github.com/Starisian-Technologies/sparxstar-starter.git your-plugin-name
25+
git clone https://github.com/Starisian-Technologies/sparxstar-gluon.git your-plugin-name
2626
cd your-plugin-name
2727
composer install
2828
npm install

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "sparxstar-starter",
2+
"name": "sparxstar-gluon",
33
"private": true,
44
"scripts": {
55
"lint": "npm run lint:js && npm run lint:css",
@@ -45,16 +45,16 @@
4545
},
4646
"repository": {
4747
"type": "git",
48-
"url": "git+https://github.com/Starisian-Technologies/sparxstar-starter.git"
48+
"url": "git+https://github.com/Starisian-Technologies/sparxstar-gluon.git"
4949
},
5050
"keywords": [],
5151
"author": "",
5252
"license": "ISC",
5353
"type": "commonjs",
5454
"bugs": {
55-
"url": "https://github.com/Starisian-Technologies/sparxstar-starter/issues"
55+
"url": "https://github.com/Starisian-Technologies/sparxstar-gluon/issues"
5656
},
57-
"homepage": "https://github.com/Starisian-Technologies/sparxstar-starter#readme",
57+
"homepage": "https://github.com/Starisian-Technologies/sparxstar-gluon#readme",
5858
"devDependencies": {
5959
"@eslint/js": "^10.0.1",
6060
"@playwright/test": "^1.58.2",

phpcs.xml.dist

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
<property name="prefixes" type="array">
5656
<element value="starisian"/>
5757
<element value="sparxstar"/>
58+
<element value="spx"/>
5859
</property>
5960
</properties>
6061
</rule>
@@ -67,14 +68,17 @@
6768
<exclude-pattern>src/*</exclude-pattern>
6869
</rule>
6970

70-
<!-- Exclude method name validation for PSR-4 classes -->
71+
<!-- Exclude method name validation for PSR-4 namespaced classes -->
7172
<rule ref="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid">
7273
<exclude-pattern>src/*</exclude-pattern>
74+
<exclude-pattern>sparxstar-gluon.php</exclude-pattern>
75+
<exclude-pattern>uninstall.php</exclude-pattern>
7376
</rule>
7477

7578
<!-- Exclude variable name validation for PSR-4 classes -->
7679
<rule ref="WordPress.NamingConventions.ValidVariableName">
7780
<exclude-pattern>src/*</exclude-pattern>
81+
<exclude-pattern>sparxstar-gluon.php</exclude-pattern>
7882
</rule>
7983

8084
<!-- Allow inline comments without punctuation in src/ -->

phpstan-baseline.neon

Lines changed: 0 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,6 @@
11
parameters:
22
ignoreErrors:
3-
-
4-
message: "#^Access to an undefined property Starisian\\\\Sparxstar\\\\Gluon\\\\SparxstarGluonOrchestrator\\:\\:\\$gluonName\\.$#"
5-
count: 1
6-
path: src/SparxstarGluonOrchestrator.php
7-
8-
-
9-
message: "#^Access to an undefined property Starisian\\\\Sparxstar\\\\Gluon\\\\SparxstarGluonOrchestrator\\:\\:\\$gluonPath\\.$#"
10-
count: 1
11-
path: src/SparxstarGluonOrchestrator.php
12-
13-
-
14-
message: "#^Access to an undefined property Starisian\\\\Sparxstar\\\\Gluon\\\\SparxstarGluonOrchestrator\\:\\:\\$gluonUrl\\.$#"
15-
count: 1
16-
path: src/SparxstarGluonOrchestrator.php
17-
18-
-
19-
message: "#^Call to static method log\\(\\) on an unknown class Starisian\\\\Sparxstar\\\\helpers\\\\SparxstarGluonLogger\\.$#"
20-
count: 2
21-
path: src/SparxstarGluonOrchestrator.php
22-
23-
-
24-
message: "#^Class Starisian\\\\Sparxstar\\\\core\\\\SparxstarGluonCore not found\\.$#"
25-
count: 1
26-
path: src/SparxstarGluonOrchestrator.php
27-
28-
-
29-
message: "#^Class Starisian\\\\Sparxstar\\\\integrations\\\\SparxstarGluonRules not found\\.$#"
30-
count: 1
31-
path: src/SparxstarGluonOrchestrator.php
32-
33-
-
34-
message: "#^Constant GLUON_PLUGIN_NAME not found\\.$#"
35-
count: 1
36-
path: src/SparxstarGluonOrchestrator.php
37-
38-
-
39-
message: "#^Constant GLUON_PLUGIN_PATH not found\\.$#"
40-
count: 1
41-
path: src/SparxstarGluonOrchestrator.php
42-
43-
-
44-
message: "#^Constant GLUON_PLUGIN_URL not found\\.$#"
45-
count: 1
46-
path: src/SparxstarGluonOrchestrator.php
47-
48-
-
49-
message: "#^Constant GLUON_PLUGIN_VERSION not found\\.$#"
50-
count: 2
51-
path: src/SparxstarGluonOrchestrator.php
52-
53-
-
54-
message: "#^PHPDoc tag @var for constant Starisian\\\\Sparxstar\\\\Gluon\\\\SparxstarGluonOrchestrator\\:\\:VERSION with type string is not subtype of value mixed\\.$#"
55-
count: 1
56-
path: src/SparxstarGluonOrchestrator.php
57-
58-
-
59-
message: "#^Parameter \\#2 \\$mofile of function load_textdomain expects string, false given\\.$#"
60-
count: 1
61-
path: src/SparxstarGluonOrchestrator.php
62-
63-
-
64-
message: "#^Property Starisian\\\\Sparxstar\\\\Gluon\\\\SparxstarGluonOrchestrator\\:\\:\\$core is unused\\.$#"
65-
count: 1
66-
path: src/SparxstarGluonOrchestrator.php
67-
68-
-
69-
message: "#^Property Starisian\\\\Sparxstar\\\\Gluon\\\\SparxstarGluonOrchestrator\\:\\:\\$pluginName is unused\\.$#"
70-
count: 1
71-
path: src/SparxstarGluonOrchestrator.php
72-
73-
-
74-
message: "#^Property Starisian\\\\Sparxstar\\\\Gluon\\\\SparxstarGluonOrchestrator\\:\\:\\$pluginPath is unused\\.$#"
75-
count: 1
76-
path: src/SparxstarGluonOrchestrator.php
77-
78-
-
79-
message: "#^Property Starisian\\\\Sparxstar\\\\Gluon\\\\SparxstarGluonOrchestrator\\:\\:\\$pluginUrl is unused\\.$#"
80-
count: 1
81-
path: src/SparxstarGluonOrchestrator.php
82-
83-
-
84-
message: "#^Property Starisian\\\\Sparxstar\\\\Gluon\\\\SparxstarGluonOrchestrator\\:\\:\\$version is never read, only written\\.$#"
85-
count: 1
86-
path: src/SparxstarGluonOrchestrator.php
87-
88-
-
89-
message: "#^Call to an undefined static method Starisian\\\\Sparxstar\\\\Gluon\\\\integrations\\\\SparxstarGluonRules\\:\\:getInstance\\(\\)\\.$#"
90-
count: 1
91-
path: src/core/SparxstarGluonCore.php
92-
93-
-
94-
message: "#^Constant GLUON_PLUGIN_NAME not found\\.$#"
95-
count: 1
96-
path: src/helpers/loggers/SparxstarGluonLogger.php
97-
983
-
994
message: "#^Call to static method prompt\\(\\) on an unknown class WordPress\\\\AI_Client\\\\AI_Client\\.$#"
1005
count: 1
1016
path: src/includes/SparxstarGluonAIManager.php
102-
103-
-
104-
message: "#^Constant GLUON_PLUGIN_NAME not found\\.$#"
105-
count: 1
106-
path: src/integrations/SparxstarGluonRules.php
107-
108-
-
109-
message: "#^PHPDoc tag @param references unknown parameter\\: \\$type$#"
110-
count: 1
111-
path: src/integrations/SparxstarGluonRules.php
112-
113-
-
114-
message: "#^PHPDoc tag @return with type string\\|null is not subtype of native type string\\|false\\.$#"
115-
count: 1
116-
path: src/integrations/SparxstarGluonRules.php
117-
118-
-
119-
message: "#^Variable \\$args might not be defined\\.$#"
120-
count: 1
121-
path: src/templates/sparxstar-gluon-template.php

0 commit comments

Comments
 (0)