-
Notifications
You must be signed in to change notification settings - Fork 8
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
fix: Use late static binding in AbstractProvider #123
fix: Use late static binding in AbstractProvider #123
Conversation
Great catch @schodemeiss 👏 I would like to have a unit test that covers this functioning as we expect. Could you include one for this? |
For both PRs, your commits need to be signed off for the DCO. |
I'll write tests for both. I don't know what a/the DCO is though? Apologies! |
Hey @schodemeiss, no worries! A DCO is the Developer Certificate of Origin. It's a way to signify that you're willing and able to contribute your code to the CNCF. To add your Signed-off-by line to every commit in this branch:
|
Ok -- that test covers that case nicely, and I've force pushed adding a sign off to the commit. Hope that's what you were after. I'll do #121 next. |
Switched from self::$NAME to static::$NAME in the getMetadata method of the AbstractProvider class. This change is to ensure the name of the extending provider is used in the metadata. Previously, when extending from AbstractProvider, the metadata name was always AbstractProvider. Signed-off-by: Andrew Menino-Barlow <[email protected]>
That covers it. Utilizing the AbstractProvider for the test provided is 👌 Ran the full suite of Actions. If that's all set I'll approve ✅ |
LGTM! Merging @schodemeiss. Thanks for your contribution! |
🤖 I have created a release *beep* *boop* --- ## [2.0.6](2.0.5...2.0.6) (2024-05-07) ### 🐛 Bug Fixes * Improve error handling in OpenFeatureClient ([#121](#121)) ([58e97d2](58e97d2)) * Use late static binding in AbstractProvider ([#123](#123)) ([2123274](2123274)) ### 🧹 Chore * **deps:** update dependency psalm/plugin-phpunit to ^0.19.0 ([#119](#119)) ([09f9d47](09f9d47)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
You're welcome! Thanks for merging it in. |
This PR
Switches from self::$NAME to static::$NAME in the getMetadata method of the AbstractProvider class. This change is to ensure the name of the extending provider is used in the metadata. Previously, when extending from AbstractProvider, the metadata name was always AbstractProvider.
How to test
Create a class that extends AbstractProvider, give it a different name, then call "getMetadata" and see that the name is now the name of the extended class and not "AbstractProvider"