Skip to content

Commit

Permalink
Merge pull request #16 from alleyinteractive/feature/features
Browse files Browse the repository at this point in the history
Rename `Features` as `Group`
  • Loading branch information
dlh01 authored Feb 20, 2024
2 parents 89bb8c9 + 6ad90bd commit a702c80
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
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

0 comments on commit a702c80

Please sign in to comment.