Revert "RobotsTxt: specify more verbose classes"

Summary:
This reverts commit 88946a7fe2.

PHP Fatal error:  Cannot override final method PhabricatorRobotsController::processRequest() in /var/www/phorge/phorge/src/extensions/PhabricatorCustomRobotsTxtController.php on line 13

Fatal error: Cannot override final method PhabricatorRobotsController::processRequest() in /var/www/phorge/phorge/src/extensions/PhabricatorCustomRobotsTxtController.php on line 13

Signed-off-by: Yongmin Hong <revi@omglol.email>

Reviewers: #acl_sudoers, #blessed_reviewers, revi

Reviewed By: #acl_sudoers, #blessed_reviewers, revi

Differential Revision: https://issuetracker.revi.xyz/D10
This commit is contained in:
revi 2024-05-02 19:52:47 +09:00
parent 88946a7fe2
commit c628542223
Signed by: revi
GPG key ID: 1EB4F6CEEA100E94
2 changed files with 2 additions and 6 deletions

View file

@ -12,7 +12,5 @@ jobs:
phpsyntax: phpsyntax:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: "PHP Basic Syntax Check [robots.txt]" - name: PHP Basic Syntax Check
run: php -l PhabExt/PhabricatorCustomRobotsTxtController.php run: php -l PhabExt/PhabricatorCustomRobotsTxtController.php
- name: "PHP Basic Syntax Check [time.php]"
run: php -l time.php

View file

@ -1,6 +1,6 @@
<?php <?php
abstract class PhabricatorRobotsPlatformController extends PhabricatorRobotsController { abstract class PhabricatorRobotsController extends PhabricatorController {
public function shouldRequireLogin() { public function shouldRequireLogin() {
return false; return false;
@ -103,8 +103,6 @@ public function processRequest() {
$content = implode("\n", $out)."\n"; $content = implode("\n", $out)."\n";
// ToDo: Cloudflare does not cache the robots.txt due to the presence of Set-Cookie.
// T126
return id(new AphrontPlainTextResponse()) return id(new AphrontPlainTextResponse())
->setContent($content) ->setContent($content)
->setCacheDurationInSeconds(phutil_units('2 hours in seconds')) ->setCacheDurationInSeconds(phutil_units('2 hours in seconds'))