Zend Framework

remove unnecessary requirements from Zend_Service_Twitter constructor

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.5
  • Fix Version/s: 1.9.6
  • Component/s: Zend_Service_Twitter
  • Labels:
    None

Description

There are cases where Zend_Service_Twitter can be used without authentication, but the constructor requires $username and $password to always be passed. For example, checking if a given username exists or not:

$tw = new Zend_Service_Twitter(null);
$exists = $tw->user->show($who)->id() !== null;

Since the first parameter is required, one can't simply do this:

$tw = new Zend_Service_Twitter();

I'd like to propose that both constructor parameters should be optional, in order to more cleanly support these anonymous uses.

Activity

Hide
Jon Whitcraft added a comment -

Done with r19095 and merged into the release branch with r19096

Show
Jon Whitcraft added a comment - Done with r19095 and merged into the release branch with r19096

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: