Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
5dcf37c
Remove vendor and add on gitignore
mgiannopoulos24 May 17, 2026
dc2125a
Installed PHPunit and added a lot of unit tests.
mgiannopoulos24 May 17, 2026
96c8649
Add code tags on some bullet points
mgiannopoulos24 May 17, 2026
ca06409
Add shell support on wp-env
mgiannopoulos24 May 17, 2026
c1c4984
Update documentation
mgiannopoulos24 May 17, 2026
689026a
Remove 8.2 since not supported
mgiannopoulos24 May 17, 2026
abe9616
Add uninstall hooks to a separate file.
mgiannopoulos24 May 18, 2026
a3ea88c
Minor instruction fixes
mgiannopoulos24 May 18, 2026
e7b5ca1
Add text domain and custom capabilities lint.
mgiannopoulos24 May 19, 2026
f438473
Add links to readme, fix inline code and add donation link.
mgiannopoulos24 May 20, 2026
416313e
Add PHPStan configuration and workflow
mgiannopoulos24 May 29, 2026
d0999fa
Revert back to nxp 2.3.2 to ensure compatibility and add more php ver…
mgiannopoulos24 May 29, 2026
c655be6
Change PHP version from 8.2 to 7.4
mgiannopoulos24 Jun 8, 2026
ffc636d
Bump version number to 1.15.0
mgiannopoulos24 Jun 8, 2026
3f19022
Merge branch 'develop' into ci/unit-tests-workflows
mgiannopoulos24 Jun 8, 2026
c5b50bd
Add embed-icons-font script to package.json
mgiannopoulos24 Jun 8, 2026
a1d3177
Version updates
mgiannopoulos24 Jun 13, 2026
61b1428
PHPCS fixes.
mgiannopoulos24 Jun 13, 2026
01b64f3
Move csv outside of `tests` in order to implement issue #145 easier.
mgiannopoulos24 Jun 13, 2026
e96f0e9
Update release workflows.
mgiannopoulos24 Jun 14, 2026
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
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# .editorconfig
root = true

[*.php]
indent_style = tab
indent_size = 4
tab_width = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
69 changes: 69 additions & 0 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: "GitHub Release"
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag name to release (e.g., v1.14.0)'
required: true
type: string

jobs:
release:
name: "Release"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.inputs.tag }}

- name: Verify tag is on main branch
run: |
git fetch origin main
if git merge-base --is-ancestor ${{ github.event.inputs.tag }} origin/main; then
echo "Success: Tag is on the main branch."
else
echo "Error: Tag was not pushed to the main branch. Skipping release."
exit 1
fi

- name: Get tag message for release body
id: tag_message
run: |
MESSAGE=$(git tag -l --format='%(contents)' ${{ github.event.inputs.tag }})
if [ -z "$MESSAGE" ]; then
MESSAGE=$(git log -1 --format=%s ${{ github.event.inputs.tag }})
fi
MESSAGE="${MESSAGE//'%'/'%25'}"
MESSAGE="${MESSAGE//$'\n'/'%0A'}"
MESSAGE="${MESSAGE//$'\r'/'%0D'}"
echo "body=$MESSAGE" >> $GITHUB_OUTPUT

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Build the project
run: bun install && bun run build

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
Comment thread
mgiannopoulos24 marked this conversation as resolved.
tools: composer
coverage: none

- name: Install production Composer dependencies
run: composer install --no-dev --optimize-autoloader --no-interaction --prefer-dist --no-progress

- name: Create plugin zip
run: bunx bestzip build/cooked.zip cooked.php LICENSE readme.txt wpml-config.xml assets/ includes/ languages/ templates/ vendor/

- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag }}
body: ${{ steps.tag_message.outputs.body }}
files: build/cooked.zip
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: PHP Lint

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.5, 8.4, 8.3, 8.2, 8.1, 8.0, 7.4]

name: PHP ${{ matrix.php }}

steps:
- name: Check out code
uses: actions/checkout@v6

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer

- name: Lint PHP
run: php -l includes/ templates/ tests/
34 changes: 34 additions & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: PHPCS

on:
# push:
# branches: [ main, develop ]
# pull_request:
# branches: [ main, develop ]
workflow_dispatch:

jobs:
phpcs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.5, 8.4, 8.3, 8.2, 8.1, 8.0, 7.4]

name: PHP ${{ matrix.php }}

steps:
- name: Check out code
uses: actions/checkout@v6

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer

- name: Install dependencies
run: composer install --no-interaction --no-progress

- name: Run PHPCS
run: vendor/bin/phpcs --standard=phpcs.xml .
34 changes: 34 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: PHPStan

on:
# push:
# branches: [ main, develop ]
# pull_request:
# branches: [ main, develop ]
workflow_dispatch:

jobs:
phpstan:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.5, 8.4, 8.3, 8.2, 8.1, 8.0, 7.4]

name: PHP ${{ matrix.php }}

steps:
- name: Check out code
uses: actions/checkout@v6

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer

- name: Install dependencies
run: composer install --no-interaction --no-progress

- name: Run PHPStan
run: ./vendor/bin/phpstan analyse --memory-limit=512M --no-progress
34 changes: 34 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: PHPUnit Tests

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:

jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.5, 8.4, 8.3, 8.2, 8.1, 8.0, 7.4]

name: PHP ${{ matrix.php }}

steps:
- name: Check out code
uses: actions/checkout@v6

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer

- name: Install dependencies
run: composer install --no-interaction --no-progress

- name: Run PHPUnit
run: ./vendor/bin/phpunit
57 changes: 57 additions & 0 deletions .github/workflows/wp-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "Wordpress.org Release"
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag name to deploy to WordPress.org (e.g., v1.14.0)'
required: true
type: string

jobs:
tag:
name: "build"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.inputs.tag }}

- name: Verify tag is on main branch
run: |
git fetch origin main
if git merge-base --is-ancestor ${{ github.event.inputs.tag }} origin/main; then
echo "Success: Tag is on the main branch."
else
echo "Error: Tag was not pushed to the main branch. Skipping release."
exit 1
fi

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Build the project
run: bun install && bun run build

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer
coverage: none

- name: Install production Composer dependencies
run: composer install --no-dev --optimize-autoloader --no-interaction --prefer-dist --no-progress

- name: Install SVN
run: sudo apt-get update && sudo apt-get install -y subversion

- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@stable
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: "cooked"
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@

# DDEV
.ddev/
.ddev/docker-compose.cooked.yaml

# Node.js
# Dev dependencies
node_modules/
vendor

# Tests
tests/test-results/
tests/playwright-report/
tests/blob-report/
tests/playwright/.cache/
tests/.auth/
tests/phpunit/.cache

# Build
build/*

# DDEV generated files
.ddev/docker-compose.cooked.yaml

# WordPress
wordpress/
2 changes: 1 addition & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
"WP_ENVIRONMENT_TYPE": "local",
"DISALLOW_FILE_EDIT": false
}
}
}
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cff-version: 1.2.0
message: "If you use cooked, please cite it using the following metadata"
message: "If you use Cooked, please cite it using the following metadata"
title: cooked
authors:
- family-names: Scheetz
Expand Down
Empty file removed build/.gitkeep
Empty file.
32 changes: 22 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@
"nutrition"
],
"homepage": "https://wordpress.org/plugins/cooked/",
"version": "1.14.0",
"version": "1.15.0",
"type": "wordpress-plugin",
"license": "GPL-3.0-or-later",
"prefer-stable": true,
"minimum-stability": "dev",
"config": {
"optimize-autoloader": true
},
"authors": [
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Gora Tech",
"email": "contact@goratech.dev",
Expand All @@ -33,12 +28,29 @@
"source": "https://github.com/XjSv/Cooked",
"security": "https://github.com/XjSv/Cooked?tab=security-ov-file"
},
"optimize-autoloader": true,
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=7.4.0",
"nxp/math-executor": "^2.3"
},
"require-dev": {
"php": "^7 || ^8"
"phpunit/phpunit": "^9.6",
"squizlabs/php_codesniffer": "^3.13",
"wp-coding-standards/wpcs": "^3.3",
"phpcompatibility/php-compatibility": "^10.0@alpha",
"phpcompatibility/phpcompatibility-wp": "^3.0@alpha",
"phpstan/phpstan": "^2.2",
"phpstan/extension-installer": "^1.4",
"szepeviktor/phpstan-wordpress": "^2.0"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpstan/extension-installer": true
},
"platform": {
"php": "7.4"
}
}
}
Loading