Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/wp framework #268

Merged
merged 15 commits into from
Jan 30, 2025
Merged

Update/wp framework #268

merged 15 commits into from
Jan 30, 2025

Conversation

darylldoyle
Copy link
Collaborator

Description of the Change

The current implementation of WP-Scaffold includes numerous components (e.g., Abstract Post Types, Abstract Taxonomies, Module Loaders) that often don't require direct maintenance by project teams. While this structure facilitates rapid, iterative releases, it places the burden of updating these components on individual project teams after initialising a scaffold-based project.

This PR integrates the new https://github.com/10up/wp-framework/ package into the scaffold. The framework aims to remove much of the project-agnostic functionality from the scaffold so that it can be updated and maintained separately.

Splitting the scaffold into a core repository and a separate framework package offers significant advantages in terms of security, scalability, standardisation, and the ability to push updates seamlessly across projects. This approach ensures all projects can benefit from centralised improvements while allowing teams the flexibility to customise for unique needs.

Things still to do

  • Need to release the wp-framework repo and add to packagist
  • Need to update the composer files to pull in a tag rather than dev-trunk

How to test the Change

  • Spin up a new scaffold project locally.
  • Composer install in all the places
  • Set the demo post type and taxonomy to be registered within the mu-plugin
  • See everything works.

Changelog Entry

  • Added - WP-Framework Package
  • Removed - All abstract classes as they're now inherited from the framework

Credits

Props @darylldoyle

Checklist:

@darylldoyle
Copy link
Collaborator Author

Tests are currently failing because the wp-framework repo is not public

Copy link
Member

@fabiankaegy fabiankaegy left a comment

Choose a reason for hiding this comment

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

Left a few small notes here :)

mu-plugins/10up-plugin/composer.json Outdated Show resolved Hide resolved
mu-plugins/10up-plugin/includes/core.php Outdated Show resolved Hide resolved
printf(
'<div class="%1$s"><p>%2$s</p></div>',
esc_attr( $class ),
wp_kses_post( __( 'Please ensure the <code>10up/wp-framework</code> composer package is installed.', 'tenup-plugin' ) )
Copy link
Member

Choose a reason for hiding this comment

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

Can we make this link to the GitHub repo?

themes/10up-block-theme/functions.php Show resolved Hide resolved
@tlovett1 tlovett1 self-requested a review January 20, 2025 20:00
Copy link

@dsawardekar dsawardekar left a comment

Choose a reason for hiding this comment

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

@darylldoyle This looks great—approved! Just one minor suggestion:

Instead of ^1.0.0, I recommend using ~1.0.0. For framework-level changes, this helps signal if there are any breaking changes.

@darylldoyle darylldoyle merged commit dbe1de2 into trunk Jan 30, 2025
7 checks passed
@darylldoyle darylldoyle deleted the update/wp-framework branch January 30, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants