Skip to content

Releases: SilverAssist/wp-github-updater

WP GitHub Updater v1.3.1

02 Mar 17:50

Choose a tag to compare

What's New in v1.3.1

Fixed

  • Multi-Plugin Asset URL Resolution: Fixed getPackageAssetUrl() method to correctly resolve asset URLs when multiple plugins use the package simultaneously. Previously, PHP's autoloader would load the Updater class from the first registered vendor directory, causing __DIR__ to always resolve to that location and resulting in 404 errors for JavaScript assets in other plugins.
  • Plugin-Specific Path Resolution: Changed to use $this->config->pluginFile-based resolution instead of __DIR__, ensuring each plugin instance loads assets from its own vendor directory.
  • Fallback Support: Maintained backward compatibility with __DIR__-based fallback for non-standard installations or development environments.

Added

  • Comprehensive Multi-Plugin Tests: Added three new unit tests specifically for multi-plugin scenarios:
    • testGetPackageAssetUrlWithStandardVendorStructure() - Tests standard Composer vendor structure
    • testGetPackageAssetUrlFallbackForNonStandardInstallation() - Tests fallback behavior
    • testGetPackageAssetUrlWithMultiplePlugins() - Tests simultaneous multi-plugin usage

Technical Details

The bug occurred because:

  1. PHP's autoloader loads classes from the first registered vendor directory
  2. __DIR__ in a shared class always points to that first location
  3. Multiple plugin instances would all resolve to the same (incorrect) asset path
  4. This caused 404 errors and "wpGithubUpdaterCheckUpdates is not defined" JavaScript errors

The fix:

  1. Uses $this->config->pluginFile which is unique per plugin instance
  2. Constructs the standard vendor path: vendor/silverassist/wp-github-updater
  3. Verifies the path exists before using it
  4. Falls back to __DIR__-based resolution for non-standard setups

📦 Package Information

  • Package Name: wp-github-updater
  • Version: 1.3.1
  • Namespace: SilverAssist\WpGithubUpdater
  • License: PolyForm Noncommercial 1.0.0
  • PHP Version: 8.2+
  • WordPress Version: 6.0+

🚀 Installation via Composer

composer require silverassist/wp-github-updater:^1.3.1

📋 Basic Usage

use SilverAssist\WpGithubUpdater\UpdaterConfig;
use SilverAssist\WpGithubUpdater\Updater;

// Configure the updater
$config = new UpdaterConfig(__FILE__, 'owner/repository', [
    'text_domain' => 'my-plugin-textdomain',
]);

// Initialize the updater
$updater = new Updater($config);

// Built-in update check button (v1.3.0+)
echo '<button onclick="' . $updater->enqueueCheckUpdatesScript() . '">Check Updates</button>';

✨ Key Features

  • 🔄 Automatic WordPress plugin updates from GitHub releases
  • � Built-in "Check Updates" JavaScript with admin notices (v1.3.0+)
  • �🌍 Configurable internationalization (i18n) support
  • 📋 WordPress admin integration with update notifications
  • 🔒 Secure GitHub API communication with proper error handling
  • ⚡ Efficient caching system for version checks
  • 🧪 Comprehensive PHPUnit test suite
  • 📝 PSR-12 + WordPress coding standards compliance
  • 🎯 Modern PHP 8+ architecture with strict typing

📚 Documentation

🔧 Requirements

  • PHP 8.2 or higher
  • WordPress 6.0 or higher
  • Composer for package management
  • GitHub repository with releases for updates

🐛 Issues & Support

Found a bug or need help? Please open an issue on GitHub.

WP GitHub Updater v1.3.0

02 Mar 16:35

Choose a tag to compare

What's New in v1.3.0

Added

  • Built-in "Check Updates" JavaScript: New enqueueCheckUpdatesScript() method that provides a complete update check solution without requiring consuming plugins to maintain their own JavaScript files
  • Asset Management: New getPackageAssetUrl() method to resolve URLs for package assets in vendor directory
  • JavaScript Variable Sanitization: New sanitizeJsVarName() method to create valid JavaScript variable names from plugin basenames
  • Multi-Plugin Support: Unique global variable names per plugin prevent conflicts when multiple plugins using the updater are active on the same page
  • Centralized i18n Strings: Built-in translatable strings for update check messages with override capability
  • WordPress Admin Notices: Automatic admin notice display for update check results (checking, available, up-to-date, errors)
  • Auto-Redirect: Automatic redirect to WordPress Updates page when updates are available

Changed

  • Simplified Integration: Consuming plugins can now use a single method call (enqueueCheckUpdatesScript()) instead of maintaining ~40 lines of PHP and ~120 lines of JavaScript
  • Consistent Behavior: Standardized update check behavior across all plugins using the package
  • Documentation: Comprehensive README updates with usage examples, migration guide, and multi-plugin support details

Benefits

  • Eliminates Code Duplication: No need for per-plugin JavaScript files and AJAX handling code
  • Prevents Conflicts: Unique data keys ensure multiple plugins can coexist without interference
  • Easier Maintenance: Bug fixes and improvements are centralized in the package
  • Better UX: Consistent, polished update check experience across all consuming plugins

📦 Package Information

  • Package Name: wp-github-updater
  • Version: 1.3.0
  • Namespace: SilverAssist\WpGithubUpdater
  • License: PolyForm Noncommercial 1.0.0
  • PHP Version: 8.2+
  • WordPress Version: 6.0+

🚀 Installation via Composer

composer require silverassist/wp-github-updater:^1.3.0

📋 Basic Usage

use SilverAssist\WpGithubUpdater\UpdaterConfig;
use SilverAssist\WpGithubUpdater\Updater;

// Configure the updater
$config = new UpdaterConfig(__FILE__, 'owner/repository', [
    'text_domain' => 'my-plugin-textdomain',
]);

// Initialize the updater
$updater = new Updater($config);

// Built-in update check button (v1.3.0+)
echo '<button onclick="' . $updater->enqueueCheckUpdatesScript() . '">Check Updates</button>';

✨ Key Features

  • 🔄 Automatic WordPress plugin updates from GitHub releases
  • � Built-in "Check Updates" JavaScript with admin notices (v1.3.0+)
  • �🌍 Configurable internationalization (i18n) support
  • 📋 WordPress admin integration with update notifications
  • 🔒 Secure GitHub API communication with proper error handling
  • ⚡ Efficient caching system for version checks
  • 🧪 Comprehensive PHPUnit test suite
  • 📝 PSR-12 + WordPress coding standards compliance
  • 🎯 Modern PHP 8+ architecture with strict typing

📚 Documentation

🔧 Requirements

  • PHP 8.2 or higher
  • WordPress 6.0 or higher
  • Composer for package management
  • GitHub repository with releases for updates

🐛 Issues & Support

Found a bug or need help? Please open an issue on GitHub.

WP GitHub Updater v1.2.1

12 Oct 04:12

Choose a tag to compare

What's New in v1.2.1

Changed

  • PHP Version Requirement: Lowered minimum PHP version from 8.3 to 8.2 for broader compatibility
  • Documentation Updates: Updated all documentation, examples, and tests to reflect PHP 8.2 requirement
  • Workflow Updates: Updated GitHub Actions workflow to reflect PHP 8.2 requirement

Testing

  • 51 Tests Passing: All tests verified with PHP 8.2 compatibility
  • Test Fixtures Updated: Updated all test fixtures and expectations for PHP 8.2

📦 Package Information

  • Package Name: wp-github-updater
  • Version: 1.2.1
  • Namespace: SilverAssist\WpGithubUpdater
  • License: PolyForm Noncommercial 1.0.0
  • PHP Version: 8.2+
  • WordPress Version: 6.0+

🚀 Installation via Composer

composer require silverassist/wp-github-updater:^1.2.1

📋 Basic Usage

use SilverAssist\WpGithubUpdater\UpdaterConfig;
use SilverAssist\WpGithubUpdater\Updater;

// Configure the updater
$config = new UpdaterConfig(__FILE__, 'owner/repository', [
    'text_domain' => 'my-plugin-textdomain', // v1.1.0+ feature
]);

// Initialize the updater
$updater = new Updater($config);

✨ Key Features

  • 🔄 Automatic WordPress plugin updates from GitHub releases
  • 🌍 Configurable internationalization (i18n) support
  • 📋 WordPress admin integration with update notifications
  • 🔒 Secure GitHub API communication with proper error handling
  • ⚡ Efficient caching system for version checks
  • 🧪 Comprehensive PHPUnit test suite
  • 📝 PSR-12 + WordPress coding standards compliance
  • 🎯 Modern PHP 8+ architecture with strict typing

📚 Documentation

🔧 Requirements

  • PHP 8.2 or higher
  • WordPress 6.0 or higher
  • Composer for package management
  • GitHub repository with releases for updates

🐛 Issues & Support

Found a bug or need help? Please open an issue on GitHub.

WP GitHub Updater v1.1.4

30 Aug 05:09

Choose a tag to compare

What's New in v1.1.4

Added

  • WordPress Admin Notices: Integrated admin notification system that displays update availability after manual version checks
  • Dismissible Update Notices: Users can dismiss update notifications with built-in AJAX functionality
  • Admin Notice Management: New showUpdateNotice() method creates WordPress-compliant admin notices with proper styling
  • AJAX Notice Dismissal: New dismissUpdateNotice() AJAX handler for seamless notice management
  • Transient-Based Notifications: Update notices persist for the same duration as version cache (configurable via cache_duration)

Changed

  • Improved Manual Version Checks: Enhanced manualVersionCheck() method now sets admin notices for immediate user feedback
  • Code Refactoring: Centralized update availability logic using isUpdateAvailable() method to eliminate code duplication
  • Better WordPress Integration: Manual version checks now properly clear WordPress update transients for immediate admin interface updates
  • Enhanced User Experience: Update checks provide both AJAX responses and persistent admin notifications

Fixed

  • WordPress Admin Sync: Manual version checks now immediately reflect in WordPress admin plugins page
  • Transient Cache Management: Proper clearing of both plugin-specific and WordPress update caches
  • Admin Interface Updates: Resolved disconnect between manual checks and WordPress admin display

Technical Improvements

  • DRY Principle: Replaced duplicate version comparison logic with centralized isUpdateAvailable() method calls
  • AJAX Security: Enhanced nonce verification and sanitization for all AJAX endpoints
  • WordPress Standards: All admin notices follow WordPress UI/UX guidelines with proper escaping and styling
  • JavaScript Integration: Inline JavaScript for notice dismissal with jQuery compatibility

Documentation

  • API Documentation: Added comprehensive Public API Methods section to README
  • Integration Examples: Updated all examples to demonstrate new admin notice features
  • Configuration Guide: Enhanced advanced configuration examples with new capabilities
  • Code Examples: Programmatic version checking examples for developers

📦 Package Information

  • Package Name: wp-github-updater
  • Version: 1.1.4
  • Namespace: SilverAssist\WpGithubUpdater
  • License: PolyForm Noncommercial 1.0.0
  • PHP Version: 8.0+
  • WordPress Version: 6.0+

🚀 Installation via Composer

composer require silverassist/wp-github-updater:^1.1.4

📋 Basic Usage

use SilverAssist\WpGithubUpdater\UpdaterConfig;
use SilverAssist\WpGithubUpdater\Updater;

// Configure the updater
$config = new UpdaterConfig(__FILE__, 'owner/repository', [
    'text_domain' => 'my-plugin-textdomain', // v1.1.0+ feature
]);

// Initialize the updater
$updater = new Updater($config);

✨ Key Features

  • 🔄 Automatic WordPress plugin updates from GitHub releases
  • 🌍 Configurable internationalization (i18n) support
  • 📋 WordPress admin integration with update notifications
  • 🔒 Secure GitHub API communication with proper error handling
  • ⚡ Efficient caching system for version checks
  • 🧪 Comprehensive PHPUnit test suite
  • 📝 PSR-12 + WordPress coding standards compliance
  • 🎯 Modern PHP 8+ architecture with strict typing

📚 Documentation

🔧 Requirements

  • PHP 8.0 or higher
  • WordPress 6.0 or higher
  • Composer for package management
  • GitHub repository with releases for updates

🐛 Issues & Support

Found a bug or need help? Please open an issue on GitHub.

WP GitHub Updater v1.1.3

29 Aug 16:32

Choose a tag to compare

What's New in v1.1.3

Added

  • Enhanced Temporary File Handling: Implemented multiple fallback strategies for temporary file creation to resolve PCLZIP_ERR_MISSING_FILE (-4) errors
  • Custom Temporary Directory Support: New custom_temp_dir configuration option in UpdaterConfig for specifying alternative temporary directories
  • Automatic Directory Creation: The updater now attempts to create temporary directories if they don't exist
  • Comprehensive File Verification: Added file existence and readability checks after download to prevent installation failures

Changed

  • Improved Download Reliability: Enhanced maybeFixDownload() method with better error handling and multiple fallback strategies
  • Robust Temporary File Strategy: Six-tier fallback system for temporary file creation:
    1. Custom temporary directory (if configured)
    2. WordPress uploads directory
    3. WP_CONTENT_DIR/temp (auto-created)
    4. WP_TEMP_DIR (if defined in wp-config.php)
    5. System temporary directory
    6. Manual file creation as last resort

Fixed

  • PCLZIP Error Resolution: Addresses PCLZIP_ERR_MISSING_FILE (-4) errors caused by restrictive /tmp directory permissions
  • File Write Verification: Added byte-level verification to ensure complete file downloads
  • Permission Issues: Better handling of directory permission problems during plugin updates

Documentation

  • Integration Examples: Added examples for handling PCLZIP errors in integration guide
  • WordPress Configuration: Documented wp-config.php approach for setting custom temporary directories
  • Troubleshooting Guide: Comprehensive examples for different temporary directory configuration strategies

📦 Package Information

  • Package Name: wp-github-updater
  • Version: 1.1.3
  • Namespace: SilverAssist\WpGithubUpdater
  • License: PolyForm Noncommercial 1.0.0
  • PHP Version: 8.0+
  • WordPress Version: 6.0+

🚀 Installation via Composer

composer require silverassist/wp-github-updater:^1.1.3

📋 Basic Usage

use SilverAssist\WpGithubUpdater\UpdaterConfig;
use SilverAssist\WpGithubUpdater\Updater;

// Configure the updater
$config = new UpdaterConfig(__FILE__, 'owner/repository', [
    'text_domain' => 'my-plugin-textdomain', // v1.1.0+ feature
]);

// Initialize the updater
$updater = new Updater($config);

✨ Key Features

  • 🔄 Automatic WordPress plugin updates from GitHub releases
  • 🌍 Configurable internationalization (i18n) support
  • 📋 WordPress admin integration with update notifications
  • 🔒 Secure GitHub API communication with proper error handling
  • ⚡ Efficient caching system for version checks
  • 🧪 Comprehensive PHPUnit test suite
  • 📝 PSR-12 + WordPress coding standards compliance
  • 🎯 Modern PHP 8+ architecture with strict typing

📚 Documentation

🔧 Requirements

  • PHP 8.0 or higher
  • WordPress 6.0 or higher
  • Composer for package management
  • GitHub repository with releases for updates

🐛 Issues & Support

Found a bug or need help? Please open an issue on GitHub.

WP GitHub Updater v1.1.2

19 Aug 23:04

Choose a tag to compare

What's New in v1.1.2

Changed

  • API Accessibility: Changed getLatestVersion() method visibility from private to public to allow external access from consuming plugins

📦 Package Information

  • Package Name: wp-github-updater
  • Version: 1.1.2
  • Namespace: SilverAssist\WpGithubUpdater
  • License: PolyForm Noncommercial 1.0.0
  • PHP Version: 8.0+
  • WordPress Version: 6.0+

🚀 Installation via Composer

composer require silverassist/wp-github-updater:^1.1.2

📋 Basic Usage

use SilverAssist\WpGithubUpdater\UpdaterConfig;
use SilverAssist\WpGithubUpdater\Updater;

// Configure the updater
$config = new UpdaterConfig(__FILE__, 'owner/repository', [
    'text_domain' => 'my-plugin-textdomain', // v1.1.0+ feature
]);

// Initialize the updater
$updater = new Updater($config);

✨ Key Features

  • 🔄 Automatic WordPress plugin updates from GitHub releases
  • 🌍 Configurable internationalization (i18n) support
  • 📋 WordPress admin integration with update notifications
  • 🔒 Secure GitHub API communication with proper error handling
  • ⚡ Efficient caching system for version checks
  • 🧪 Comprehensive PHPUnit test suite
  • 📝 PSR-12 + WordPress coding standards compliance
  • 🎯 Modern PHP 8+ architecture with strict typing

📚 Documentation

🔧 Requirements

  • PHP 8.0 or higher
  • WordPress 6.0 or higher
  • Composer for package management
  • GitHub repository with releases for updates

🐛 Issues & Support

Found a bug or need help? Please open an issue on GitHub.

WP GitHub Updater v1.1.1

15 Aug 02:26

Choose a tag to compare

What's New in v1.1.1

Changed

  • License Migration: Updated from GPL v2.0+ to PolyForm Noncommercial 1.0.0
  • License References: Updated all references in composer.json, README.md, source files, and GitHub Actions workflow
  • License Documentation: Updated license badges and documentation to reflect noncommercial licensing

📦 Package Information

  • Package Name: wp-github-updater
  • Version: 1.1.1
  • Namespace: SilverAssist\WpGithubUpdater
  • License: PolyForm Noncommercial 1.0.0
  • PHP Version: 8.0+
  • WordPress Version: 6.0+

🚀 Installation via Composer

composer require silverassist/wp-github-updater:^1.1.1

📋 Basic Usage

use SilverAssist\WpGithubUpdater\UpdaterConfig;
use SilverAssist\WpGithubUpdater\Updater;

// Configure the updater
$config = new UpdaterConfig(__FILE__, 'owner/repository', [
    'text_domain' => 'my-plugin-textdomain', // v1.1.0+ feature
]);

// Initialize the updater
$updater = new Updater($config);

✨ Key Features

  • 🔄 Automatic WordPress plugin updates from GitHub releases
  • 🌍 Configurable internationalization (i18n) support
  • 📋 WordPress admin integration with update notifications
  • 🔒 Secure GitHub API communication with proper error handling
  • ⚡ Efficient caching system for version checks
  • 🧪 Comprehensive PHPUnit test suite
  • 📝 PSR-12 + WordPress coding standards compliance
  • 🎯 Modern PHP 8+ architecture with strict typing

📚 Documentation

🔧 Requirements

  • PHP 8.0 or higher
  • WordPress 6.0 or higher
  • Composer for package management
  • GitHub repository with releases for updates

🐛 Issues & Support

Found a bug or need help? Please open an issue on GitHub.

WP GitHub Updater v1.1.0

13 Aug 04:13

Choose a tag to compare

What's New in v1.1.0

Added

  • Configurable text domain support: New text_domain option in UpdaterConfig constructor for internationalization flexibility
  • Translation wrapper methods: Added __() and esc_html__() methods for package-aware translations
  • Translatable user-facing messages: All changelog and error messages now support internationalization
  • Centralized HTTP header management: Added getApiHeaders() and getDownloadHeaders() methods for consistent API communication
  • Comprehensive PHP coding standards: Implemented phpcs.xml with WordPress and PSR-12 standards enforcement
  • String quotation standardization: All strings now consistently use double quotes as per project standards
  • Enhanced type declarations: Full PHP 8+ type hint coverage with union types and nullable parameters
  • Enhanced PHPDoc documentation: Comprehensive descriptions and @since annotations throughout codebase
  • GitHub Actions workflow: Automated release creation when tags are pushed
  • Automated testing in CI: PHPUnit and PHPCS validation in release pipeline
  • Release documentation: Automated generation of release notes from CHANGELOG.md
  • Package validation: Automated structure validation and version consistency checks

Changed

  • Improved internationalization architecture: Text domain now configurable per consuming plugin instead of hardcoded
  • Centralized translation system: All user-facing strings now use configurable text domain with fallback support
  • Refactored HTTP request configurations: Eliminated code duplication through centralized header management patterns
  • Code quality enforcement: Added automated coding standards checking with phpcs and WordPress security rules
  • Documentation standards: Enhanced PHPDoc blocks with complete parameter and return type documentation
  • Updated User-Agent headers: Now include version information (WP-GitHub-Updater/1.1.0)

Fixed

  • Backward compatibility: Existing code without text_domain specification continues working with wp-github-updater fallback
  • String consistency: Eliminated mixed quote usage throughout codebase for improved maintainability
  • Security compliance: Enhanced input sanitization and output escaping validation
  • GitHub API request reliability: Improved through consistent header usage
  • Download stability: Optimized headers for GitHub asset downloads

Technical Improvements

  • Updated User-Agent headers to version 1.1.0
  • Added Composer dev dependencies: wp-coding-standards/wpcs and slevomat/coding-standard
  • Implemented comprehensive test coverage for new translation features
  • Enhanced error handling with proper WordPress i18n integration
  • Improved code maintainability through centralized header management patterns

📦 Package Information

  • Package Name: wp-github-updater
  • Version: 1.1.0
  • Namespace: SilverAssist\WpGithubUpdater
  • License: MIT
  • PHP Version: 8.0+
  • WordPress Version: 6.0+

🚀 Installation via Composer

composer require silverassist/wp-github-updater:^1.1.0

📋 Basic Usage

use SilverAssist\WpGithubUpdater\UpdaterConfig;
use SilverAssist\WpGithubUpdater\Updater;

// Configure the updater
$config = new UpdaterConfig(__FILE__, 'owner/repository', [
    'text_domain' => 'my-plugin-textdomain', // v1.1.0+ feature
]);

// Initialize the updater
$updater = new Updater($config);

✨ Key Features

  • 🔄 Automatic WordPress plugin updates from GitHub releases
  • 🌍 Configurable internationalization (i18n) support
  • 📋 WordPress admin integration with update notifications
  • 🔒 Secure GitHub API communication with proper error handling
  • ⚡ Efficient caching system for version checks
  • 🧪 Comprehensive PHPUnit test suite
  • 📝 PSR-12 + WordPress coding standards compliance
  • 🎯 Modern PHP 8+ architecture with strict typing

📚 Documentation

🔧 Requirements

  • PHP 8.0 or higher
  • WordPress 6.0 or higher
  • Composer for package management
  • GitHub repository with releases for updates

🐛 Issues & Support

Found a bug or need help? Please open an issue on GitHub.

Silver Assist Github Updater v1.0.1

08 Aug 00:28

Choose a tag to compare

This release improves the user experience and developer documentation of wp-github-updater, our Composer library for WordPress plugin automatic updates from public GitHub releases.

New Features

Markdown to HTML Parser

  • Enhanced changelog display with proper HTML formatting in WordPress update modals
  • Support for headers (#, ##, ###, ####), bold text (**text**), italic text (*text*)
  • Inline code formatting (code), unordered lists (- item), and links (text)
  • Automatic conversion from raw Markdown to clean HTML for better readability
  • Complete PHPDoc Documentation

Comprehensive documentation for all class properties and methods

  • @since annotations for version tracking and API documentation
  • Enhanced code maintainability with detailed inline documentation
  • Professional development standards for better developer experience

Improvements

  • Better changelog readability in WordPress plugin update notifications
  • Enhanced code documentation standards for easier maintenance and contribution
  • Improved developer experience with detailed method and property descriptions

Existing Features

  • WordPress plugin GitHub updater functionality
  • Configurable updater with UpdaterConfig class
  • Automatic update integration with WordPress
  • Manual AJAX version checking
  • Changelog fetching from GitHub releases
  • Transient caching for performance
  • PSR-4 autoloading and PHP 8+ support
  • AJAX nonce verification and WordPress capability checks
  • This release significantly improves the user experience when viewing plugin updates and provides a solid foundation for developers working with the codebase.

Full Changelog: v1.0.0...v1.0.1

Silver Assist Github Updater v1.0.0

07 Aug 20:55

Choose a tag to compare

Initial Release v1.0.0

This is the first public release of wp-github-updater, a Composer library for WordPress plugin automatic updates from public GitHub releases.

Features

  • WordPress plugin GitHub updater functionality
  • Configurable updater with UpdaterConfig class
  • Automatic update integration with WordPress
  • Manual AJAX version checking
  • Changelog fetching from GitHub releases
  • Transient caching for performance
  • PSR-4 autoloading and PHP 8+ support
  • Comprehensive documentation
  • AJAX nonce verification
  • WordPress capability checks

This release provides a solid foundation for integrating GitHub-based updates into your WordPress plugins, with security and performance best practices.

Full Changelog: https://github.com/SilverAssist/wp-github-updater/commits/v1.0.0