-
-
Notifications
You must be signed in to change notification settings - Fork 598
Integrations are now Apps! #592
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
lib/Github/Api/Apps.php
Outdated
* | ||
* @return self | ||
*/ | ||
public function configure() |
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.
I think we should keep BC here and just remove the $this->acceptHeaderValue = 'application/vnd.github.machine-man-preview+json';
but keep the method as users of the lib are possibly calling this method
lib/Github/Api/Apps.php
Outdated
* @author Nils Adermann <naderman@naderman.de> | ||
*/ | ||
class Integrations extends AbstractApi | ||
class Apps extends AbstractApi |
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.
Also to keep BC the class can not be renamed (in my opinion). But the class can be deprecated and a new Apps class can be created (where this class can extend from)
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.
As I also modified the Client to point to the new class, there's no reason to keep using this...
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.
I know, I wanted to do a same sort of change but @Nyholm came up with a good point.
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.
👍
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.
Good. There were some minor BC breaks. Apart from that I'm very happy with the change.
lib/Github/Api/Apps.php
Outdated
class Apps extends AbstractApi | ||
{ | ||
/** | ||
* @deprecated |
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.
Why include this?
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.
Oh I see. Move this method back to the Integrations class. It is weird to add a class with deprecated functions.
lib/Github/Api/Integrations.php
Outdated
/** | ||
* @link https://developer.github.com/v3/integrations/ | ||
* @deprecated |
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.
Add a comment saying what the new thing is.
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.
Maybe we can do it "symfony" style with a @trigger_error
when using the class. Like this https://github.com/symfony/symfony/blob/3.3/src/Symfony/Component/ClassLoader/ApcClassLoader.php#L14
But also keep the annotation so ide's will show it. What do you think @Nyholm?
@@ -29,8 +29,9 @@ | |||
* @method Api\Gists gist() | |||
* @method Api\Gists gists() | |||
* @method Api\Miscellaneous\Gitignore gitignore() | |||
* @method Api\Integrations integration() |
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 could leave these comments.
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.
yes indeed keep the old methods (to the deprecated class) so a user will know they have to change their code to the new methods
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.
Done!
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.
👍
lib/Github/Client.php
Outdated
@@ -200,7 +201,8 @@ public function api($name) | |||
|
|||
case 'integration': | |||
case 'integrations': | |||
$api = new Api\Integrations($this); |
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 should keep this. Calling integrations should give you the deprecated Integrations class, right?
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.
That's right, this way the user knows he has to update some code
lib/Github/Client.php
Outdated
@@ -201,6 +201,8 @@ public function api($name) | |||
|
|||
case 'integration': | |||
case 'integrations': | |||
$api = new Api\Integrations($this); | |||
break |
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.
missing ;
here
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.
Im happy with the current state. Github is having some issues ATM. Lets wait a couple of hours or a day and then restart travis. After Travis is green Im happy to merge.
Yeah it looks like packagist is also having problems https://twitter.com/packagist/status/866952618349920257 |
@m1guelpf I've restarted the build! |
The build is green again! Thanks @m1guelpf |
See #591