dev: refactor code#565
Conversation
032e0d3 to
01ddeb6
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR refactors PPOM’s persistence and rendering layers by introducing a repository for PPOM meta-table access and a new field-markup renderer architecture, while keeping procedural functions as compatibility wrappers.
Changes:
- Introduces
PPOM_Meta_Repositoryand updates core codepaths to use it instead of direct$wpdbqueries. - Adds a new
FieldMarkuprendering system (context + registry + per-type renderers) and keeps legacy entrypoints as deprecated shims. - Improves static analysis support (PHPStan bootstrap/constants, PSR-4 autoload for
src/) and reorganizes compat wrapper files.
Reviewed changes
Copilot reviewed 76 out of 133 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
classes/class-ppom-meta-repository.php |
Centralizes database access for PPOM meta rows + caching helpers. |
classes/ppom.class.php |
Switches PPOM_Meta read paths to the repository and adds bulk settings fetch. |
src/FieldMarkup/* |
Introduces new field rendering architecture and renderer dispatch registry. |
inc/*.php (wrappers) |
Replaces legacy implementations with delegating compatibility shims. |
phpstan.neon, phpstan-bootstrap-ppom.php, composer.json |
Enables static analysis over src/ and defines constants/autoload. |
architecture.md, AGENTS.md |
Updates docs for the new REST/architecture locations. |
💡 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 75 out of 136 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2c6f4a0 to
ac7bd0e
Compare
abaicus
left a comment
There was a problem hiding this comment.
@Soare-Robert-Daniel From what I can tell, seems to look good. We should thoroughly test before releasing though, as things might have slipped through the cracks.
|
I made some tests along with the current PRO version and the changes are stable: no crashes or missing data. I will merge it to be part of the baseline. |
|
🎉 This PR is included in version 34.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
Will affect visual aspect of the product
NO
Screenshots
Test instructions
Check before Pull Request is ready:
Closes #.