Allow inheritance overriding by using "static::errorLog('message')" instead of "self::errorLog('message')" #38

wants to merge 1 commit into from

2 participants


If you wanted to customize the api logger, you could inherit after \Facebook class and write custom errorLog() method.

Unfortunately, facebook-php-sdk will still use its own method, because "self" takes a method from the class it is being called.

Changing "self" keyword to "static" solves the problem.


Sorry it took so long to respond to this. Can you sign the Contributor License Agreement?

Once that's done we can look at merging this. Thanks for your contribution.


gfosco: signed


So the issue with this is that the SDK is currently compatible with PHP 5.2 as the lowest requirement. Switching to static:: will break 5.2. Another PR, 81 was submitted which changes it to an instance method, but that would also break existing code. I think this will have to be delayed until we make larger changes and a new release for PHP 5.4 and higher.


Due to the breaking change issue, this will be closed. A future version of the SDK which requires a more recent version of PHP will support this static method. Thanks again.

@gfosco gfosco closed this Oct 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment