4.6 KiB
4.6 KiB
AI Assistant Guide for Fix Plugin Does Not Exist Notices
This guide helps AI assistants understand the project structure, workflows, and best practices for this repository.
Project Overview
- Plugin Name: Fix 'Plugin file does not exist.' Notices
- Repository: https://github.com/wpallstars/fix-plugin-does-not-exist-notices
- Description: WordPress plugin that adds missing plugins to the plugins list with a "Remove Reference" link to clean up invalid plugin entries and remove error notices.
Version Management
Version Numbering Convention
We follow Semantic Versioning:
- MAJOR.MINOR.PATCH (e.g., 1.6.0)
- MAJOR: Breaking changes
- MINOR: New features, non-breaking
- PATCH: Bug fixes, non-breaking
When to Increment Version Numbers
-
PATCH (1.6.0 → 1.6.1):
- Bug fixes
- Small text changes
- Minor improvements that don't add new features
-
MINOR (1.6.0 → 1.7.0):
- New features
- Significant improvements to existing functionality
- Deprecation of features (but not removal)
-
MAJOR (1.6.0 → 2.0.0):
- Breaking changes
- Removal of features
- Major architectural changes
Version Update Checklist
When updating the version number, always update these files:
fix-plugin-does-not-exist-notices.php
(Plugin header)CHANGELOG.md
(Add new version section)readme.txt
(Stable tag and Changelog section)- Update
FPDEN_VERSION
constant in the main plugin file
Git Workflow
Branch Naming Convention
- Feature branches:
feature/descriptive-name
- Bug fix branches:
fix/issue-description
- Release branches:
v{MAJOR}.{MINOR}.{PATCH}
Commit Message Guidelines
- Use present tense ("Add feature" not "Added feature")
- Start with a verb
- Keep the first line under 50 characters
- Reference issues when relevant: "Fix #123: Resolve plugin detection issue"
Release Process
- Create a new branch for the version:
git checkout -b v{MAJOR}.{MINOR}.{PATCH}
- Update version numbers in all required files
- Update CHANGELOG.md with all changes
- Commit changes:
git commit -m "Prepare release v{MAJOR}.{MINOR}.{PATCH}"
- Push branch to all remotes:
git push github HEAD:v{MAJOR}.{MINOR}.{PATCH} git push gitea HEAD:v{MAJOR}.{MINOR}.{PATCH}
- Create and push a tag to trigger the GitHub Actions workflow:
git tag -a v{MAJOR}.{MINOR}.{PATCH} -m "Release version {MAJOR}.{MINOR}.{PATCH}" git push github refs/tags/v{MAJOR}.{MINOR}.{PATCH} git push gitea refs/tags/v{MAJOR}.{MINOR}.{PATCH}
Build Process
The build process is handled by build.sh
:
- Updates version numbers
- Installs composer dependencies
- Copies files to build directory
- Creates ZIP file
To manually build the plugin:
./build.sh {MAJOR}.{MINOR}.{PATCH}
Remote Repositories
The plugin is hosted on multiple repositories:
- GitHub: https://github.com/wpallstars/fix-plugin-does-not-exist-notices
- Gitea: https://gitea.wpallstars.com/wpallstars/fix-plugin-does-not-exist-notices
- WordPress.org: https://wordpress.org/plugins/fix-plugin-does-not-exist-notices/
Always push changes to all remotes to keep them in sync.
GitHub Actions
The repository uses GitHub Actions for automated builds and deployments:
- Triggered by tags matching the pattern
v*
- Builds the plugin
- Creates a GitHub release
- Deploys to WordPress.org
Testing Guidelines
Before releasing:
- Test with the latest WordPress version
- Test with PHP 7.0+ (minimum supported version)
- Verify all features work as expected
- Check for any PHP warnings or notices
Common Tasks for AI Assistants
Creating a New Release
# 1. Create a new branch
git checkout -b v1.7.0
# 2. Update version numbers in files
# - fix-plugin-does-not-exist-notices.php
# - CHANGELOG.md
# - readme.txt
# - FPDEN_VERSION constant
# 3. Commit changes
git add .
git commit -m "Prepare release v1.7.0"
# 4. Push to remotes
git push github HEAD:v1.7.0
git push gitea HEAD:v1.7.0
# 5. Create and push tag
git tag -a v1.7.0 -m "Release version 1.7.0"
git push github refs/tags/v1.7.0
git push gitea refs/tags/v1.7.0
Adding a New Feature
# 1. Create feature branch
git checkout -b feature/new-feature-name
# 2. Make changes and commit
git add .
git commit -m "Add new feature"
# 3. Push to remotes
git push github HEAD:feature/new-feature-name
git push gitea HEAD:feature/new-feature-name
Fixing a Bug
# 1. Create bugfix branch
git checkout -b fix/bug-description
# 2. Make changes and commit
git add .
git commit -m "Fix #123: Fix bug description"
# 3. Push to remotes
git push github HEAD:fix/bug-description
git push gitea HEAD:fix/bug-description