291a59a6 introduced exceptions in PhabricatorAPI static constructors. Formerly, they returned null.
When a new payload comes from GitHub, the NotifyNewCommitsToDiffusion job notifies Phabricator of the new commit. But when there is no Phabricator instance for the same door (or in the future a mapping, see T851), the code doesn't detect this new exception.
This error occurs in our production notifications.nasqueron.org instance:
[2017-01-07 06:14:10] production.ERROR: RuntimeException: No credentials for Phabricator project Keruald. in /var/wwwroot/default/app/Phabricator/PhabricatorAP
I.php:67
Stack trace:
#0 /var/wwwroot/default/app/Phabricator/PhabricatorAPIFactory.php(26): Nasqueron\Notifications\Phabricator\PhabricatorAPI::forProject('Keruald')
#1 /var/wwwroot/default/bootstrap/cache/compiled.php(6325): Nasqueron\Notifications\Phabricator\PhabricatorAPIFactory->getForProject('Keruald')
#2 /var/wwwroot/default/app/Jobs/NotifyNewCommitsToDiffusion.php(146): Illuminate\Support\Facades\Facade::__callStatic('getForProject', Array)
#3 /var/wwwroot/default/app/Jobs/NotifyNewCommitsToDiffusion.php(136): Nasqueron\Notifications\Jobs\NotifyNewCommitsToDiffusion->fetchAPI()
#4 /var/wwwroot/default/app/Jobs/NotifyNewCommitsToDiffusion.php(75): Nasqueron\Notifications\Jobs\NotifyNewCommitsToDiffusion->fetchRequirements()
#5 /var/wwwroot/default/app/Listeners/PhabricatorListener.php(40): Nasqueron\Notifications\Jobs\NotifyNewCommitsToDiffusion->handle()
#6 /var/wwwroot/default/app/Listeners/PhabricatorListener.php(26): Nasqueron\Notifications\Listeners\PhabricatorListener->notifyNewCommits(Object(Nasqueron\Not
ifications\Events\GitHubPayloadEvent))NOTE: tests for NotifyNewCommitsToDiffusion are needed to detect this kind of issue during refactoring.