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

[Registry] New Component and Contract #226

Merged
merged 3 commits into from
Sep 12, 2024

Conversation

JoshuaEstes
Copy link
Member

@JoshuaEstes JoshuaEstes commented Sep 12, 2024

Description

This component allows developers to registry services based on an identifier.

Example:

$registry = new Registry('stdClass');
$registry->register('example.identifier', new stdClass());
// Throws Exception
$registry->register('another.identifier', 'not an object and does not implement/extend stdClass');

$service = $registry->get('example.identifier');

Checklist

  • Updated CHANGELOG files
  • Updated Documentation
  • Unit Tests Created
  • php-cs-fixer

@JoshuaEstes JoshuaEstes requested a review from a team as a code owner September 12, 2024 03:26
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Sep 12, 2024
@JoshuaEstes JoshuaEstes merged commit afa1bca into SonsOfPHP:main Sep 12, 2024
3 of 7 checks passed
@JoshuaEstes JoshuaEstes deleted the registry branch September 12, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contracts documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant