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

Rename Features as Group #16

Merged
merged 4 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

This library adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/en/1.0.0/).

## 1.0.0

Initial release.

## Unreleased

Nothing yet.

## 2.0.0

### Changed

- `Features` class renamed `Group`.

## 1.0.0

Initial release.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"require": {
"php": "^8.1",
"alleyinteractive/laminas-validator-extensions": "^2.0",
"spatie/once": "^3.1",
"alleyinteractive/wp-match-blocks": "^3.0"
"alleyinteractive/wp-match-blocks": "^3.0",
"spatie/once": "^3.1"
},
"require-dev": {
"alleyinteractive/alley-coding-standards": "^1.0.0",
Expand Down
8 changes: 4 additions & 4 deletions docs/feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface Feature {
## Bundled implementations

- [Conditional_Feature](https://github.com/alleyinteractive/wp-type-extensions/blob/main/src/alley/wp/features/class-conditional-feature.php): Boot a feature only when a condition is met.
- [Features](https://github.com/alleyinteractive/wp-type-extensions/blob/main/src/alley/wp/features/class-features.php): Bundle many features.
- [Group](https://github.com/alleyinteractive/wp-type-extensions/blob/main/src/alley/wp/features/class-group.php): Group related features.
- [Lazy_Feature](https://github.com/alleyinteractive/wp-type-extensions/blob/main/src/alley/wp/features/class-lazy-feature.php): Instantiate a feature only when called upon.
- [Quick_Feature](https://github.com/alleyinteractive/wp-type-extensions/blob/main/src/alley/wp/features/class-quick-feature.php): Make a callable a feature.
- [Template_Feature](https://github.com/alleyinteractive/wp-type-extensions/blob/main/src/alley/wp/features/class-template-feature.php): Boot a feature only when templates load.
Expand All @@ -22,16 +22,16 @@ interface Feature {
## Basic usage

```php
use Alley\WP\Features\Features;
use Alley\WP\Features\Group;
use Alley\WP\Features\Quick_Feature;
use Alley\WP\Features\Template_Feature;

$queries = new Project\Post_Queries_Implementation(
/* ... */
);

$project = new Features(
new Features(
$project = new Group(
new Group(
new Project\Ads_Backend_Feature(),
new Template_Feature(
origin: new Project\Ads_Frontend_Feature(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Features class file
* Group class file
*
* @package wp-type-extensions
*/
Expand All @@ -10,9 +10,9 @@
use Alley\WP\Types\Feature;

/**
* Bundle many features.
* Group many features.
*/
final class Features implements Feature {
final class Group implements Feature {
/**
* Collected features.
*
Expand Down
Loading