Conversation
There was a problem hiding this comment.
Pull request overview
This PR is a major refactoring of the OneAccess plugin codebase to follow PSR-4 autoloading standards and OneDesign principles. The changes reorganize the directory structure, introduce modern PHP patterns (interfaces, traits), update build tooling, and establish comprehensive testing infrastructure.
Key changes include:
- Restructuring code into
inc/Moduleswith proper namespacing (OneAccess\Modules\Core,OneAccess\Modules\Rest, etc.) - Replacing singleton pattern implementation with interface-based design
- Moving from
assets/build/jsto flatbuilddirectory structure - Adding TypeScript support and modern build configuration
- Introducing PHPUnit and PHPStan for testing and static analysis
- Enhanced PHPCS configuration with additional rulesets
Reviewed changes
Copilot reviewed 72 out of 80 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| webpack.config.js | Simplified build output structure, added TypeScript support with path aliases |
| uninstall.php | Refactored to use functions with proper namespacing and improved multisite support |
| tsconfig.json | New TypeScript configuration with strict type checking |
| phpunit.xml.dist | New PHPUnit configuration for automated testing |
| phpstan.neon.dist | New static analysis configuration |
| phpcs.xml.dist | Enhanced coding standards with VIP, PHPCompatibility, and Slevomat rules |
| package.json | Updated dependencies, simplified scripts, added TypeScript tooling |
| oneaccess.php | Simplified bootstrap with new autoloader and constants approach |
| inc/Modules/* | New modular structure following PSR-4 with Registrable interface pattern |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 72 out of 80 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (2)
inc/Modules/Core/DB.php:117
- Typo in SQL: 'updated_a t' has extra whitespace/tabs and should be 'updated_at'.
inc/Modules/Core/DB.php:111 - Typo in SQL: 'U NSIGNED' has extra whitespace/tabs and should be 'UNSIGNED'.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 72 out of 81 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (2)
inc/Modules/Core/DB.php:111
- Fixed typo in SQL statement: 'U NSIGNED' corrected to 'UNSIGNED' (removed extra tab/space characters).
inc/Modules/Core/DB.php:117 - Fixed typo in SQL statement: 'updated_a t' corrected to 'updated_at' (removed extra tab/space character).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 77 out of 86 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
inc/Modules/Core/DB.php:111
- Typo in SQL schema definition: 'BIGINT(20) U NSIGNED' has a tab/space character inserted incorrectly. Should be 'BIGINT(20) UNSIGNED'.
inc/Modules/Core/DB.php:117 - Typo in SQL schema definition: 'updated_a t' has a tab/space character inserted incorrectly. Should be 'updated_at'.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 79 out of 88 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
inc/Modules/Core/DB.php:111
- Fixed typo in SQL column definition: Changed 'BIGINT(20) U NSIGNED' to 'BIGINT(20) UNSIGNED' (removed tab character in the middle of UNSIGNED).
inc/Modules/Core/DB.php:117 - Fixed typo in SQL column definition: Changed 'updated_a t' to 'updated_at' (removed tab character in the middle of the column name).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 79 out of 88 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| id?: string; | ||
| name: string; |
justlevine
left a comment
There was a problem hiding this comment.
Last few nits and LGTM.
(Issues with npm run lint:css or shared QA bugs with onedesign can be handled in followups)
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 79 out of 88 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
inc/Modules/Core/DB.php:114
- Fixed typo in SQL CREATE TABLE statement: 'U NSIGNED' has been corrected to 'UNSIGNED'
inc/Modules/Core/DB.php:120 - Fixed typo in column name: 'updated_a t' has been corrected to 'updated_at'
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
justlevine
left a comment
There was a problem hiding this comment.
(approving per the diff alone. We anyway need to QA/polish before triggering a new release)
Overview
Major architectural refactoring to align with modern PHP and JavaScript standards, introducing modular design patterns, comprehensive testing infrastructure, and improved developer experience.
Key Changes
Architecture & Code Organization
inc/Modules/with proper namespacing (OneAccess\Modules\Core,OneAccess\Modules\Rest, etc.)Registrableinterface pattern, replacing singleton implementations for better testability and maintainabilityBuild & Tooling
assets/build/jsto flatbuild/directory structurepackage.jsonwith streamlined build scripts and current toolingCode Quality & Testing
phpunit.xml.distconfiguration for automated testingphpstan.neon.dist) for type safetyPlugin Bootstrap
oneaccess.phpto use modern autoloader and constants approachuninstall.phpwith proper namespacing and function-based structureChecklist