This plugin uses Composer patches to maintain modifications to the andreskrey/readability.php library. The release process is automated via GitHub Actions.
- The
vendor/directory is not committed to git (in.gitignore) - Modifications to vendor libraries are stored as patch files in
patches/ - Run
composer installto install dependencies and apply patches
-
Update version number in the main plugin file if needed
-
Create and push a tag:
git tag 1.2.3 git push origin 1.2.3
-
GitHub Action automatically:
- Runs
composer install --no-dev(installs production dependencies with patches) - Creates a clean ZIP file excluding development files
- Creates a GitHub Release with the ZIP attached
- Generates release notes from commits
- Runs
Included:
- All plugin PHP files
vendor/directory (with patches applied)patches/directorycomposer.json- Templates, languages, and site-configs
Excluded:
.gitdirectory.githubworkflowstests/directory- Development files (
phpunit.xml,phpcs.xml, etc.) .gitignore,.vscode,.DS_Storecomposer.lockandpatches.lock.jsonvendor.backup/
If you need to create a release manually:
# Install production dependencies
composer install --no-dev --optimize-autoloader
# Create a clean copy
mkdir -p release
rsync -av --exclude='.git' --exclude='.github' --exclude='tests' \
--exclude='.gitignore' --exclude='vendor.backup' \
./ release/friends-post-collection/
# Create ZIP
cd release
zip -r friends-post-collection-1.2.3.zip friends-post-collection/Current patches applied to andreskrey/readability.php:
-
Handle missing body element (
patches/readability-missing-body.patch)- Fallback to
<html>element if<body>tag is missing
- Fallback to
-
PHP 8+ union types (
patches/readability-php8-union-types.patch)- Adds modern PHP 8 union type hints to DOMNodeList
To view what the patches do:
cat patches/*.patch