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
This commit is contained in:
+2
-1
@@ -15,7 +15,8 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"WPAllStars\\FixPluginDoesNotExistNotices\\": "includes/"
|
||||
"WPALLSTARS\\FixPluginDoesNotExistNotices\\Admin\\": "admin/lib/",
|
||||
"WPALLSTARS\\FixPluginDoesNotExistNotices\\": "includes/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user