Skip to content

dev: refactor code#565

Merged
Soare-Robert-Daniel merged 30 commits into
developmentfrom
dev/refactoring
Apr 15, 2026
Merged

dev: refactor code#565
Soare-Robert-Daniel merged 30 commits into
developmentfrom
dev/refactoring

Conversation

@Soare-Robert-Daniel

@Soare-Robert-Daniel Soare-Robert-Daniel commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Better group the code in classes.

Will affect visual aspect of the product

NO

Screenshots

Test instructions

  • Since this is a big restructuring, check for regression on the basic workflows

Check before Pull Request is ready:

Closes #.

@Soare-Robert-Daniel Soare-Robert-Daniel self-assigned this Apr 6, 2026
@Soare-Robert-Daniel Soare-Robert-Daniel added the pr-checklist-skip Allow this Pull Request to skip checklist. label Apr 6, 2026
Base automatically changed from dev/format to development April 7, 2026 10:49
@Soare-Robert-Daniel Soare-Robert-Daniel marked this pull request as ready for review April 7, 2026 14:59
@pirate-bot

pirate-bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Plugin build for 39678c2 is ready 🛎️!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_Repository and updates core codepaths to use it instead of direct $wpdb queries.
  • Adds a new FieldMarkup rendering 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.

Comment thread src/FieldMarkup/InputRendererRegistry.php
Comment thread src/FieldMarkup/Renderers/AudioVideoRenderer.php Outdated
Comment thread src/FieldMarkup/Renderers/AudioVideoRenderer.php
Comment thread src/FieldMarkup/Renderers/AudioVideoRenderer.php
Comment thread classes/class-ppom-meta-repository.php
Comment thread classes/class-ppom-meta-repository.php Outdated
Comment thread classes/ppom.class.php
Comment thread inc/ppom-meta-repository-functions.php
Comment thread architecture.md Outdated
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Apr 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/Arrays/Settings.php
Comment thread backend/settings-panel.class.php
Comment thread classes/class-ppom-meta-repository.php
Comment thread classes/class-ppom-meta-repository.php

@abaicus abaicus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@Soare-Robert-Daniel

Copy link
Copy Markdown
Contributor Author

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.

@Soare-Robert-Daniel Soare-Robert-Daniel merged commit a8f17ea into development Apr 15, 2026
12 checks passed
@Soare-Robert-Daniel Soare-Robert-Daniel deleted the dev/refactoring branch April 15, 2026 11:54
@Soare-Robert-Daniel Soare-Robert-Daniel linked an issue Apr 16, 2026 that may be closed by this pull request
@pirate-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 34.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist. released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code Base Refactoring

4 participants