Rename remove() to delete() for consistency with PSR-16 by clue · Pull Request #30 · reactphp/cache · GitHub
Skip to content

Rename remove() to delete() for consistency with PSR-16#30

Merged
WyriHaximus merged 1 commit into
reactphp:masterfrom
clue-labs:delete
Jun 8, 2018
Merged

Rename remove() to delete() for consistency with PSR-16#30
WyriHaximus merged 1 commit into
reactphp:masterfrom
clue-labs:delete

Conversation

@clue

@clue clue commented Jun 8, 2018

Copy link
Copy Markdown
Member

This simple PR renames the existing remove() method to delete() for consistency with PSR-6 and PSR-16. It also adds some documentation to be in line with #16 and #29, but the behavior is otherwise left unchanged.

// old
$cache->remove('foo');

// new
$cache->delete('foo');

Empirical evidence suggests that this method is rarely used and this release includes a number of BC breaks that aim at making this interface act more like a standard PSR-16 cache, so I figured it makes sense to rename this as part of this release.

@clue clue added this to the v0.5.0 milestone Jun 8, 2018
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread src/CacheInterface.php Outdated
Comment thread src/CacheInterface.php Outdated
@clue

clue commented Jun 8, 2018

Copy link
Copy Markdown
Member Author

@clue

clue commented Jun 8, 2018

Copy link
Copy Markdown
Member Author

@WyriHaximus WyriHaximus merged commit 834c1bd into reactphp:master Jun 8, 2018
@clue clue deleted the delete branch June 8, 2018 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants