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

feature: Add management() to SDK service as a Management API convenience method #376

Merged
merged 3 commits into from
Apr 24, 2023

Conversation

evansims
Copy link
Member

@evansims evansims commented Apr 24, 2023

Changes

This PR adds a management() convenience method to the SDK's Laravel service container. It saves writing a small amount of redundant boilerplate in order to access the Management API classes from the underlying PHP SDK.

Before this change:

<?php

app('auth0')
  ->getSdk()
  ->management()
  ->...

After this change:

<?php

app('auth0')
  ->management()
  ->...

Admittedly a minuscule change, but it better illustrates that the Management API is an integral part of the SDK, and is easily accessible to the host application.

References

Jira: SDK-4149

Testing

Tests have been added to cover the new method.

Contributor Checklist

@evansims evansims requested a review from a team as a code owner April 24, 2023 04:50
@evansims evansims added the Scope: Improvement Proposed improvements, or feature additions. label Apr 24, 2023
@evansims evansims added this to the Next Release milestone Apr 24, 2023
@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (ae4b1f7) 100.00% compared to head (22499e2) 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##                main      #376   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity       288       288           
===========================================
  Files             21        21           
  Lines            784       784           
===========================================
  Hits             784       784           
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Auth0.php 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@evansims evansims merged commit 7326cfb into main Apr 24, 2023
@evansims evansims deleted the feat/add-management-api-convenience-method branch April 24, 2023 14:54
@evansims evansims mentioned this pull request Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Improvement Proposed improvements, or feature additions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants