Commit Graph

8 Commits

Author SHA1 Message Date
marcus 4ecccbc107 fix: give Composer autoloader precedence and optimise PSR-4 loader (#30)
- Swap load_dependencies() before register_autoloader() in the
  constructor so Composer (when a vendor/ install is present) is
  registered on the spl_autoload stack first and therefore acts as
  the primary class resolver, with the custom loader as fallback.
- Add early-exit guard in the autoloader closure: skip the namespace
  map loop entirely for classes that don't share the plugin base
  prefix, avoiding unnecessary iteration on every WordPress class
  lookup.
- Store the namespace map in a static variable so it is allocated
  only once across all invocations rather than on each call.
- Switch from require_once to require inside the autoloader: the
  autoloader is only invoked for classes not yet defined, making the
  redundancy check in require_once unnecessary overhead.

Resolves #29
2026-04-26 11:01:53 +01:00
marcus 85d55e80fc feat: implement PSR-4 autoloader, remove manual require_once calls (#27)
- Add spl_autoload_register in Plugin::register_autoloader() mapping
  WPALLSTARS\FixPluginDoesNotExistNotices\Admin\ to admin/lib/ and
  WPALLSTARS\FixPluginDoesNotExistNotices\ to includes/
- Remove manual require_once calls for Core, Admin, and Modal classes
- Rename admin/lib/admin.php -> Admin.php and modal.php -> Modal.php
  for PSR-4 filename convention (class name must match file name)
- Fix composer.json: correct namespace case (WPAllStars -> WPALLSTARS)
  and add admin/lib/ directory mapping for Admin sub-namespace
- Fix wp-fix-plugin-does-not-exist-notices.php require_once to use
  correct case (plugin.php -> Plugin.php)

Resolves #25
2026-04-24 08:34:47 +01:00
marcus 1d1380275e fix: add missing Updater.php require in load_dependencies and fix Core.php case (#22)
Resolves #20

- Adds require_once for includes/Updater.php which was instantiated in
  init_components() but never loaded in load_dependencies()
- Fixes includes/core.php → includes/Core.php case mismatch (would fail
  on case-sensitive Linux filesystems)
2026-04-23 05:26:36 +01:00
marcus 18cf60c2a4 fix: correct case-sensitive require_once paths and add AGENTS.md (#14)
* fix: correct case-sensitive require_once paths and add AGENTS.md for AI guidance

- Fix includes/plugin.php -> includes/Plugin.php in main plugin file
- Fix includes/core.php -> includes/Core.php in includes/Plugin.php
  (Linux case-sensitive filesystems fail silently on macOS; runtime bug on production)
- Fix .ai-workflows/folder-structure.md: update class files to PascalCase,
  remove references to non-existent admin/ subdirectories (images/, partials/,
  settings/, tools/) that caused read:file_not_found errors in AI sessions
- Add AGENTS.md with authoritative file map to reduce AI agent errors:
  edit:not_read_first, bash:other, edit:edit_stale_read, read:file_not_found

Resolves #13

* fix: markdown formatting in AGENTS.md (Codacy MD022/MD032)
2026-04-22 09:57:41 +01:00
marcus fdf2860c10 Version 2.2.3 - Improved folder structure and organization 2025-04-14 22:56:11 +01:00
marcus e4c70b5711 Version 2.2.2-stable - Cleanup and improvements 2025-04-14 22:28:37 +01:00
marcus e1da072640 Replace custom Git Updater fixes with proper plugin headers
ci/woodpecker/push/woodpecker Pipeline is pending
Build Release / Build and Create Release (push) Has been cancelled
Build Release / Deploy to WordPress.org (push) Has been cancelled
ci/woodpecker/tag/woodpecker Pipeline was successful
2025-04-14 19:43:19 +01:00
marcus 15244dc687 Refactor plugin to use OOP best practices with proper namespaces and class structure
ci/woodpecker/push/woodpecker Pipeline is pending
Build Release / Build and Create Release (push) Has been cancelled
Build Release / Deploy to WordPress.org (push) Has been cancelled
ci/woodpecker/tag/woodpecker Pipeline was successful
2025-04-14 19:18:05 +01:00