Skip to content

Conversation

@HazAT
Copy link
Member

@HazAT HazAT commented Oct 29, 2018

This PR add the "global" SDK to the SDK 🙃
Which means it should enable stuff like:

init(["dsn" => "DSN"]);

captureMessage("test");

Internally it uses a Hub, Scope and Client to make everything work.

@HazAT HazAT self-assigned this Oct 29, 2018
Makefile Outdated

phpstan:
vendor/bin/phpstan analyse
vendor/bin/phpstan analyse src tests -c phpstan.neon -l 7
Copy link
Contributor

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"],
Copy link
Contributor

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"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"files": ["src/Sdk.php"],

* Gets the instance of the client built using the configured options.
*
* @return ClientInterface
* @return Client
Copy link
Contributor

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.

Suggested change
* @return Client
* @return ClientInterface

* @return Client
*/
public function getClient();
public function getClient(): Client;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function getClient(): Client;
public function getClient(): ClientInterface;

*
* @var Hub
*/
public static $currentHub;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public static $currentHub;
private static $currentHub;

@Jean85 Jean85 added this to the Release 2.0 milestone Oct 29, 2018
@HazAT HazAT changed the title [WIP] [2.0] feat: Add global SDK [2.0] feat: Add global SDK Oct 29, 2018
@ste93cry ste93cry self-requested a review October 29, 2018 13:34
@HazAT
Copy link
Member Author

HazAT commented Oct 29, 2018

I will merge this now, tests work besides the http bug #681

@HazAT HazAT merged commit 3e9272e into 2.0 Oct 29, 2018
@HazAT HazAT deleted the feat/global-sdk branch October 29, 2018 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants