Skip to content

WIP: WordPress aware Container conrtact and Adapter#8

Merged
defunctl merged 35 commits into
mainfrom
feat/add-wp-container
Jul 1, 2026
Merged

WIP: WordPress aware Container conrtact and Adapter#8
defunctl merged 35 commits into
mainfrom
feat/add-wp-container

Conversation

@dpanta94

@dpanta94 dpanta94 commented Jul 1, 2026

Copy link
Copy Markdown
Member

Introduces a WordPress aware container contract and adapter implementation.

@dpanta94 dpanta94 self-assigned this Jul 1, 2026
@dpanta94 dpanta94 added the enhancement New feature or request label Jul 1, 2026
Comment thread src/ContainerWordPress/ContainerAdapter.php Outdated
Comment thread src/ContainerWordPress/ContainerAdapter.php Outdated
Comment thread src/ContainerWordPress/ContainerAdapter.php Outdated
Comment thread src/ContainerWordPress/ContainerAdapter.php
Comment thread src/ContainerWordPress/README.md Outdated
use StellarWP\Foundation\ContainerWordPress\ContainerAdapter;

// This implements the Contracts/Container.php interface.
$container = new ContainerAdapter(new Container());

@defunctl defunctl Jul 1, 2026

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.

This should now be (with the correct use statement above):

$container = new ContainerAdapter( new FoundationContainerAdapter( new Container() ) );

We can show an example of how to customize the prefix hook as well.

Comment thread src/ContainerWordPress/Contracts/Container.php
Comment thread src/ContainerWordPress/ContainerAdapter.php Outdated
Comment thread src/ContainerWordPress/ContainerAdapter.php Outdated
Comment thread src/ContainerWordPress/ContainerAdapter.php Outdated
Comment thread src/ContainerWordPress/ContainerAdapter.php Outdated
Comment thread src/ContainerWordPress/composer.json
Comment thread src/ContainerWordPress/ContainerAdapter.php
Comment thread src/ContainerWordPress/Contracts/Container.php Outdated
Comment thread src/ContainerWordPress/ContainerAdapter.php Outdated
Comment thread src/ContainerWordPress/README.md Outdated
Comment thread src/ContainerWordPress/ContainerAdapter.php Outdated
Comment thread src/ContainerWordPress/ContainerAdapter.php Outdated
@defunctl
defunctl self-requested a review July 1, 2026 17:05
Comment thread src/ContainerWordPress/ContainerAdapter.php
Comment thread src/ContainerWordPress/README.md
Comment thread src/ContainerWordPress/README.md
Comment thread src/ContainerWordPress/README.md Outdated
);
```

### `register_on_action()`

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.

These methods and the ones below need updating

@defunctl
defunctl self-requested a review July 1, 2026 18:04
@defunctl
defunctl marked this pull request as ready for review July 1, 2026 20:06
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Coverage Report

Totals Coverage
Statements: 97.66% ( 835 / 855 )
Methods: 94.48% ( 137 / 145 )
Lines: 98.31% ( 698 / 710 )

@defunctl
defunctl merged commit dbba70d into main Jul 1, 2026
7 checks passed
@defunctl
defunctl deleted the feat/add-wp-container branch July 1, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants