-
-
Notifications
You must be signed in to change notification settings - Fork 463
[2.0] feat: Add global SDK #680
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
Conversation
Makefile
Outdated
|
|
||
| phpstan: | ||
| vendor/bin/phpstan analyse | ||
| vendor/bin/phpstan analyse src tests -c phpstan.neon -l 7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those settings are hard-coded in the configuration, they are not needed.
composer.json
Outdated
| } | ||
| }, | ||
| "autoload-dev": { | ||
| "files": ["src/Sdk.php"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't add it twice to the autoloader, the previous one is always used.
composer.json
Outdated
| } | ||
| }, | ||
| "autoload-dev": { | ||
| "files": ["src/Sdk.php"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "files": ["src/Sdk.php"], |
src/ClientBuilderInterface.php
Outdated
| * Gets the instance of the client built using the configured options. | ||
| * | ||
| * @return ClientInterface | ||
| * @return Client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the interface for extendability.
| * @return Client | |
| * @return ClientInterface |
src/ClientBuilderInterface.php
Outdated
| * @return Client | ||
| */ | ||
| public function getClient(); | ||
| public function getClient(): Client; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| public function getClient(): Client; | |
| public function getClient(): ClientInterface; |
src/State/Hub.php
Outdated
| * | ||
| * @var Hub | ||
| */ | ||
| public static $currentHub; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| public static $currentHub; | |
| private static $currentHub; |
|
I will merge this now, tests work besides the |
This PR add the "global" SDK to the SDK 🙃
Which means it should enable stuff like:
Internally it uses a
Hub,ScopeandClientto make everything work.