diff --git a/app/Http/Controllers/CoverageController.php b/app/Http/Controllers/CoverageController.php index 5adda4b639..e35f0f1e17 100644 --- a/app/Http/Controllers/CoverageController.php +++ b/app/Http/Controllers/CoverageController.php @@ -259,7 +259,7 @@ public function manageCoverage(): View|RedirectResponse $messagePlainText .= 'Details on the submission can be found at '; $config = Config::getInstance(); - $messagePlainText .= $config->getBaseUrl(); + $messagePlainText .= url('/'); $messagePlainText .= "\n\n"; $serverName = $config->get('CDASH_SERVER_NAME'); if (strlen($serverName) == 0) { diff --git a/app/Http/Controllers/ManageProjectRolesController.php b/app/Http/Controllers/ManageProjectRolesController.php index e7b8f4a5b1..ac014b42ae 100644 --- a/app/Http/Controllers/ManageProjectRolesController.php +++ b/app/Http/Controllers/ManageProjectRolesController.php @@ -414,8 +414,6 @@ public function viewPage(): View|RedirectResponse private function register_user($projectid, $email, $firstName, $lastName, $repositoryCredential) { - $config = Config::getInstance(); - if(config('auth.project_admin_registration_form_enabled') === false) { return 'Users cannot be registered via this form at the current time.'; } @@ -482,8 +480,6 @@ private function register_user($projectid, $email, $firstName, $lastName, $repos $UserProject->ProjectId = 0; $UserProject->AddCredential($email); // Add the email by default - $currentURI = $config->getBaseUrl(); - $prefix = ''; if (strlen($firstName) > 0) { $prefix = ' '; @@ -496,7 +492,7 @@ private function register_user($projectid, $email, $firstName, $lastName, $repos // Send the email $text = 'Hello' . $prefix . $firstName . ",\n\n"; $text .= 'You have been registered to CDash because you have access to the source repository for ' . $projectname . "\n"; - $text .= 'To access your CDash account: ' . $currentURI . "/user\n"; + $text .= 'To access your CDash account: ' . url('/user') . "\n"; $text .= 'Your login is: ' . $email . "\n"; $text .= 'Your password is: ' . $pass . "\n\n"; $text .= 'Generated by CDash.'; diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index f00a6266f9..90a2245b74 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -494,8 +494,7 @@ public function recoverPassword(): View // Create a new password $password = generate_password(10); - $currentURI = $config->getBaseUrl(); - $url = $currentURI . '/user'; + $url = url('/user'); $text = "Hello,\n\n You have asked to recover your password for CDash.\n\n"; $text .= 'Your new password is: ' . $password . "\n"; diff --git a/app/cdash/app/Model/BuildError.php b/app/cdash/app/Model/BuildError.php index 219478f57a..d3cddd9749 100644 --- a/app/cdash/app/Model/BuildError.php +++ b/app/cdash/app/Model/BuildError.php @@ -16,7 +16,6 @@ namespace CDash\Model; use App\Utils\RepositoryUtils; -use CDash\Config; use PDO; use App\Models\BuildError as EloquentBuildError; @@ -157,8 +156,6 @@ public static function marshal($data, Project $project, $revision): array */ public function GetUrlForSelf(): string { - $config = Config::getInstance(); - $url = $config->getBaseUrl(); - return "{$url}/viewBuildError.php?type={$this->Type}&buildid={$this->BuildId}"; + return url('/viewBuildError.php') . "?type={$this->Type}&buildid={$this->BuildId}"; } } diff --git a/app/cdash/app/Model/BuildFailure.php b/app/cdash/app/Model/BuildFailure.php index 38e1c8b780..e18a59817d 100644 --- a/app/cdash/app/Model/BuildFailure.php +++ b/app/cdash/app/Model/BuildFailure.php @@ -16,7 +16,6 @@ namespace CDash\Model; use App\Utils\RepositoryUtils; -use CDash\Config; use CDash\Database; use PDO; @@ -330,8 +329,6 @@ public static function marshal($data, Project $project, $revision, $linkifyOutpu /** Returns a self referencing URI for a the current BuildFailure. */ public function GetUrlForSelf(): string { - $config = Config::getInstance(); - $url = $config->getBaseUrl(); - return "{$url}/viewBuildError.php?type={$this->Type}&buildid={$this->BuildId}"; + return url('/viewBuildError.php') . "?type={$this->Type}&buildid={$this->BuildId}"; } } diff --git a/app/cdash/app/Model/BuildUpdate.php b/app/cdash/app/Model/BuildUpdate.php index 224e71a12f..b6459cf0d4 100644 --- a/app/cdash/app/Model/BuildUpdate.php +++ b/app/cdash/app/Model/BuildUpdate.php @@ -15,7 +15,6 @@ =========================================================================*/ namespace CDash\Model; -use CDash\Config; use CDash\Database; use Illuminate\Support\Facades\DB; use PDO; @@ -432,7 +431,6 @@ public function FillFromBuildId(): bool */ public function GetUrlForSelf(): string { - $config = Config::getInstance(); - return "{$config->getBaseUrl()}/build/{$this->BuildId}/update"; + return url("/build/{$this->BuildId}/update"); } } diff --git a/app/cdash/app/Model/DynamicAnalysis.php b/app/cdash/app/Model/DynamicAnalysis.php index a6e2614035..1b72d8b5a1 100644 --- a/app/cdash/app/Model/DynamicAnalysis.php +++ b/app/cdash/app/Model/DynamicAnalysis.php @@ -15,7 +15,6 @@ =========================================================================*/ namespace CDash\Model; -use CDash\Config; use CDash\Database; use Illuminate\Support\Facades\DB; @@ -336,9 +335,6 @@ public function GetLastId($build): int /** Returns a self referencing URI for the current DynamicAnalysis. */ public function GetUrlForSelf(): string { - $config = Config::getInstance(); - $base_url = $config->getBaseUrl(); - - return "{$base_url}/viewDynamicAnalysisFile.php?id={$this->Id}"; + return url('/viewDynamicAnalysisFile.php') . "?id={$this->Id}"; } } diff --git a/app/cdash/app/Model/Project.php b/app/cdash/app/Model/Project.php index a2bd275e09..887c724b44 100644 --- a/app/cdash/app/Model/Project.php +++ b/app/cdash/app/Model/Project.php @@ -1288,8 +1288,7 @@ public function CheckForTooManyBuilds(): bool // Perform the "daily update" step asychronously here via cURL. if (config('cdash.daily_updates') === true) { - $baseUrl = Config::getInstance()->getBaseUrl(); - self::curlRequest("{$baseUrl}/ajax/dailyupdatescurl.php?projectid={$this->Id}"); + self::curlRequest(url('/ajax/dailyupdatescurl.php') . "?projectid={$this->Id}"); } $max_builds = (int) config('cdash.builds_per_project'); diff --git a/app/cdash/include/CDash/Config.php b/app/cdash/include/CDash/Config.php index be8fe58530..1856ca28d9 100644 --- a/app/cdash/include/CDash/Config.php +++ b/app/cdash/include/CDash/Config.php @@ -44,72 +44,4 @@ public function getServer(): string } return $server; } - - /** - * @deprecated 09/04/2023 Use url() instead. - */ - public function getProtocol(): string - { - $protocol = 'http'; - if ($this->get('CDASH_USE_HTTPS') || - (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)) { - $protocol = 'https'; - } - return $protocol; - } - - /** - * @deprecated 09/04/2023 Use url() instead. - */ - public function getServerPort(): ?string - { - if (isset($_SERVER['SERVER_PORT']) - && $_SERVER['SERVER_PORT'] != 80 - && $_SERVER['SERVER_PORT'] != 443) { - return $_SERVER['SERVER_PORT']; - } - return null; - } - - private function getPath(): string - { - $path = config('cdash.curl_localhost_prefix') ?: $_SERVER['REQUEST_URI']; - if (!str_starts_with($path, '/')) { - $path = "/{$path}"; - } - return $path; - } - - /** - * @deprecated 09/04/2023 Use url() instead. - */ - public function getBaseUrl(): string - { - $uri = config('app.url'); - - if (!$uri) { - $protocol = $this->getProtocol(); - $host = $this->getServer(); - $port = $this->getServerPort() !== null ? ":{$this->getServerPort()}" : ''; - $path = $this->getPath(); - - // Trim any known subdirectories off of the path. - $subdirs = ['/ajax/', '/api/', '/auth/']; - foreach ($subdirs as $subdir) { - $pos = strpos($path, $subdir); - if ($pos !== false) { - $path = substr($path, 0, $pos); - } - } - - // Also trim any .php files from the path. - if (str_contains($path, '.php')) { - $path = dirname($path); - } - - $uri = "{$protocol}://{$host}{$port}{$path}"; - } - - return rtrim($uri, '/'); - } } diff --git a/app/cdash/include/Messaging/Subscription/Subscription.php b/app/cdash/include/Messaging/Subscription/Subscription.php index 3765688594..d46a2d1285 100644 --- a/app/cdash/include/Messaging/Subscription/Subscription.php +++ b/app/cdash/include/Messaging/Subscription/Subscription.php @@ -1,7 +1,6 @@ summary) { $project = $this->project; - $config = Config::getInstance(); - $baseUrl = $config->getBaseUrl(); $summary = []; $topics = $this->subscriber->getTopics(); $summary['topics'] = []; $summary['build_group'] = $this->buildGroup->GetName(); $summary['project_name'] = $project->GetName(); - $summary['project_url'] = "{$baseUrl}/index.php?project={$project->Name}"; + $summary['project_url'] = url("/index.php") . "?project={$project->Name}"; $summary['site_name'] = $this->site->name; $summary['build_name'] = ''; $summary['build_subproject_names'] = []; @@ -203,7 +200,7 @@ public function getBuildSummary() if (is_null($summary['build_summary_url'])) { $id = (int) $summary['build_parent_id'] ?: $build->Id; - $summary['build_summary_url'] = "{$baseUrl}/build/{$id}"; + $summary['build_summary_url'] = url("/build/{$id}"); } } } diff --git a/app/cdash/include/dailyupdates.php b/app/cdash/include/dailyupdates.php index 2dcd7ccef9..e6253baefb 100644 --- a/app/cdash/include/dailyupdates.php +++ b/app/cdash/include/dailyupdates.php @@ -738,7 +738,6 @@ function get_repository_commits(int $projectid, $dates): array function sendEmailExpectedBuilds($projectid, $currentstarttime): void { $config = Config::getInstance(); - $currentURI = $config->getBaseUrl(); $db = Database::getInstance(); @@ -832,7 +831,7 @@ function sendEmailExpectedBuilds($projectid, $currentstarttime): void $missingTitle = 'CDash [' . $projectname . '] - Missing Build for ' . $sitename; $missingSummary = 'The following expected build(s) for the project ' . $projectname . " didn't submit yesterday:\n"; $missingSummary .= '* ' . $sitename . ' - ' . $buildname . ' (' . $builtype . ")\n"; - $missingSummary .= "\n" . $currentURI . '/index.php?project=' . urlencode($projectname) . "\n"; + $missingSummary .= "\n" . url('/index.php') . '?project=' . urlencode($projectname) . "\n"; $missingSummary .= "\n-CDash on " . $serverName . "\n"; if (cdashmail($recipients, $missingTitle, $missingSummary)) { @@ -848,7 +847,7 @@ function sendEmailExpectedBuilds($projectid, $currentstarttime): void // Send a summary email to the project administrator or users who want to receive notification // of missing builds if ($missingbuilds == 1) { - $summary .= "\n" . $currentURI . '/index.php?project=' . urlencode($projectname) . "\n"; + $summary .= "\n" . url('/index.php') . '?project=' . urlencode($projectname) . "\n"; $summary .= "\n-CDash on " . $serverName . "\n"; $title = 'CDash [' . $projectname . '] - Missing Builds'; diff --git a/app/cdash/include/sendemail.php b/app/cdash/include/sendemail.php index 77678c9085..ae5f7d2600 100644 --- a/app/cdash/include/sendemail.php +++ b/app/cdash/include/sendemail.php @@ -132,8 +132,7 @@ function get_email_summary(int $buildid, array $errors, $errorkey, int $maxitems $build = new Build(); $build->Id = $buildid; - $config = Config::getInstance(); - $serverURI = $config->getBaseUrl(); + $serverURI = url('/'); $information = ''; // Update information @@ -346,9 +345,6 @@ function get_email_summary(int $buildid, array $errors, $errorkey, int $maxitems /** Generate the title and body for a broken build. */ function generate_broken_build_message(array $emailtext, $Build, $Project): array|false { - $config = Config::getInstance(); - $serverURI = $config->getBaseUrl(); - $preamble = 'A submission to CDash for the project ' . $Project->Name . ' has '; $titleerrors = '('; @@ -437,8 +433,7 @@ function generate_broken_build_message(array $emailtext, $Build, $Project): arra $body = 'Details on the submission can be found at '; - $body .= $serverURI; - $body .= "/build/{$Build->Id}"; + $body .= url("/build/{$Build->Id}"); $body .= "\n\n"; $body .= 'Project: ' . $Project->Name . "\n"; @@ -559,9 +554,6 @@ function send_update_email(UpdateHandler $handler, int $projectid): void } if (!empty($recipients)) { - $config = Config::getInstance(); - $serverURI = $config->getBaseUrl(); - // Generate the email to send $subject = 'CDash [' . $Project->Name . '] - Update Errors for ' . $sitename; @@ -574,7 +566,7 @@ function send_update_email(UpdateHandler $handler, int $projectid): void $body = "$sitename has encountered errors during the Update step and you have been identified as the maintainer of this site.\n\n"; $body .= "*Update Errors*\n"; - $body .= 'Status: ' . $update['status'] . ' (' . $serverURI . '/build/' . $buildid . "/update)\n"; + $body .= 'Status: ' . $update['status'] . ' (' . url('/build/' . $buildid . '/update') . ")\n"; if (cdashmail($recipients, $subject, $body)) { add_log('email sent to: ' . implode(', ', $recipients), 'send_update_email'); } else { diff --git a/app/cdash/tests/case/CDash/ConfigTest.php b/app/cdash/tests/case/CDash/ConfigTest.php index 33046b9ae1..44598d45e1 100644 --- a/app/cdash/tests/case/CDash/ConfigTest.php +++ b/app/cdash/tests/case/CDash/ConfigTest.php @@ -60,73 +60,6 @@ public function testGetServer() $config->set('CDASH_SERVER_NAME', $backup); } - public function testGetProtocol() - { - $config = Config::getInstance(); - $backup = $config->get('CDASH_USE_HTTPS'); - $_SERVER['SERVER_PORT'] = ''; - - $expected = 'http'; - $config->set('CDASH_USE_HTTPS', false); - $actual = $config->getProtocol(); - - $this->assertEquals($expected, $actual); - - $expected = 'https'; - $config->set('CDASH_USE_HTTPS', true); - $actual = $config->getProtocol(); - - $this->assertEquals($expected, $actual); - - $_SERVER['SERVER_PORT'] = 443; - $config->set('CDASH_USE_HTTPS', false); - $actual = $config->getProtocol(); - $this->assertEquals($expected, $actual); - - $config->set('CDASH_USE_HTTPS', $backup); - } - - public function testGetServerPort() - { - $config = Config::getInstance(); - $_SERVER['SERVER_PORT'] = 80; - $this->assertNull($config->getServerPort()); - - $_SERVER['SERVER_PORT'] = 443; - $this->assertNull($config->getServerPort()); - - $_SERVER['SERVER_PORT'] = 8080; - $this->assertEquals(8080, $config->getServerPort()); - } - - public function testGetBaseUrl() - { - global $CDASH_USE_HTTPS; - include 'config/config.php'; - - $config = Config::getInstance(); - $base_url = config('app.url'); - - config(['app.url' => null]); - $config->set('CDASH_USE_HTTPS', true); - $_SERVER['SERVER_NAME'] = 'www2.tonyrobins.com'; - $_SERVER['SERVER_PORT'] = 8080; - $_SERVER['REQUEST_URI'] = '/path/to/success'; - - - $expected = 'https://www2.tonyrobins.com:8080/path/to/success'; - $actual = $config->getBaseUrl(); - - $this->assertEquals($expected, $actual); - - config(['app.url' => 'http://open.cdash.org']); - $expected = 'http://open.cdash.org'; - $this->assertEquals($expected, $config->getBaseUrl()); - - config(['app.url' => $base_url]); - $config->set('CDASH_USE_HTTPS', $CDASH_USE_HTTPS); - } - public function testDisablePullRequestComments() { include 'config/config.php'; diff --git a/app/cdash/tests/case/CDash/MultipleSubprojectsEmailTest.php b/app/cdash/tests/case/CDash/MultipleSubprojectsEmailTest.php index 8545e28816..3b1fb30b2c 100644 --- a/app/cdash/tests/case/CDash/MultipleSubprojectsEmailTest.php +++ b/app/cdash/tests/case/CDash/MultipleSubprojectsEmailTest.php @@ -29,6 +29,7 @@ use CDash\Test\CDashUseCaseTestCase; use CDash\Test\UseCase\UseCase; use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\URL; class MultipleSubprojectsEmailTest extends CDashUseCaseTestCase { @@ -55,7 +56,6 @@ public static function setUpBeforeClass() : void $config = Config::getInstance(); $config->set('CDASH_SERVER_NAME', 'open.cdash.org'); - // deal with timezone stuff self::$tz = date_default_timezone_get(); @@ -109,6 +109,7 @@ public function setUp() : void $this->createApplication(); config(['app.url' => 'http://open.cdash.org']); + URL::forceRootUrl('http://open.cdash.org'); if (self::$projectid === -1) { self::$projectid = DB::table('project')->insertGetId([ @@ -452,7 +453,7 @@ public function testDyanamicAnalysisUseCaseBuild() Type: Experimental Total Dynamic analysis tests failing or not run: 1 -*Dynamic analysis tests failing or not run* +*Dynamic analysis tests failing or not run* " . /* Join is needed to preserve trailing space */" experimentalFail (http://open.cdash.org/viewDynamicAnalysisFile.php?id=1) -CDash on open.cdash.org diff --git a/app/cdash/tests/test_email.php b/app/cdash/tests/test_email.php index cd3cff7731..67291a5d75 100644 --- a/app/cdash/tests/test_email.php +++ b/app/cdash/tests/test_email.php @@ -4,7 +4,6 @@ use App\Models\Site; use App\Models\TestDiff; use App\Models\User; -use CDash\Config; use Illuminate\Support\Facades\DB; require_once dirname(__FILE__) . '/cdash_test_case.php'; @@ -116,13 +115,13 @@ public function testSubmissionEmailBuild() return; } - $config = Config::getInstance(); + $url = url('/'); $expected = [ 'DEBUG: user1@kw', 'DEBUG: PASSED (w=6): EmailProjectExample - Win32-MSVC2009 - Nightly', 'Congratulations. A submission to CDash for the project EmailProjectExample has fixed warnings', - "{$config->getBaseUrl()}/build/", + "{$url}/build/", 'Project: EmailProjectExample', 'Site: Dash20.kitware', 'Build Name: Win32-MSVC2009', @@ -163,12 +162,12 @@ public function testSubmissionEmailTest() if (!$this->submission('EmailProjectExample', $file)) { return; } - $config = Config::getInstance(); + $url = url('/'); $expected = [ 'DEBUG: user1@kw', 'DEBUG: PASSED (t=2): EmailProjectExample - Win32-MSVC2009 - Nightly', 'Congratulations. A submission to CDash for the project EmailProjectExample has fixed failing tests', - "{$config->getBaseUrl()}/build/", + "{$url}/build/", 'Project: EmailProjectExample', 'Site: Dash20.kitware', 'Build Name: Win32-MSVC2009', @@ -192,8 +191,7 @@ public function testSubmissionEmailDynamicAnalysis() if (!$this->submission('EmailProjectExample', $file)) { return; } - $config = Config::getInstance(); - $url = $config->getBaseUrl(); + $url = url('/'); $expected = [ 'simpletest@localhost', 'FAILED (d=10): EmailProjectExample - Win32-MSVC2009 - Nightly', @@ -250,8 +248,7 @@ public function testEmailSentToGitCommitter() return; } - $config = Config::getInstance(); - $url = $config->getBaseUrl(); + $url = url('/'); $expected = [ 'simpletest@localhost', 'FAILED (t=4): EmailProjectExample - Win32-MSVC2009 - Nightly', diff --git a/app/cdash/tests/test_subproject.php b/app/cdash/tests/test_subproject.php index 253629e806..1fc68d9077 100644 --- a/app/cdash/tests/test_subproject.php +++ b/app/cdash/tests/test_subproject.php @@ -14,7 +14,6 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ -use CDash\Config; class SubProjectTestCase extends KWWebTestCase { @@ -56,7 +55,7 @@ public function testSubmissionSubProjectBuild() if (!$this->submission('SubProjectExample', $file)) { return; } - $url = Config::getInstance()->getBaseUrl(); + $url = url('/'); $expected = [ 'simpletest@localhost', 'FAILED (w=21): SubProjectExample/NOX - Linux-GCC-4.1.2-SERIAL_RELEASE - Nightly', @@ -98,7 +97,7 @@ public function testSubmissionSubProjectTest() if (!$this->submission('SubProjectExample', $file)) { return; } - $url = Config::getInstance()->getBaseUrl(); + $url = url('/'); $expected = [ 'nox-noemail@noemail', 'FAILED (t=1): SubProjectExample/NOX - Linux-GCC-4.1.2-SERIAL_RELEASE - Nightly', diff --git a/app/cdash/tests/test_timeoutsandmissingtests.php b/app/cdash/tests/test_timeoutsandmissingtests.php index b3a61a7a54..0835f4cd02 100644 --- a/app/cdash/tests/test_timeoutsandmissingtests.php +++ b/app/cdash/tests/test_timeoutsandmissingtests.php @@ -1,5 +1,4 @@ fail('Errors in log after submit'); } - $url = Config::getInstance()->getBaseUrl(); + $url = url('/'); $expected = [ 'simpletest@localhost', 'FAILED (m=3): EmailProjectExample - Win32-MSVC2009 - Nightly', @@ -104,7 +103,7 @@ public function testTimeoutFailuresDifferentiatedInEmail() $this->fail('failed to submit test data'); return; } - $url = Config::getInstance()->getBaseUrl(); + $url = url('/'); $expected = [ 'simpletest@localhost', 'FAILED (t=2): EmailProjectExample - OSX-SIERRA-10.12.1 - Nightly', diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 8d12712601..0a55c41670 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -898,14 +898,6 @@ parameters: count: 1 path: app/Http/Controllers/CoverageController.php - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 1 - path: app/Http/Controllers/CoverageController.php - - message: "#^Cannot access offset 'branchestested' on array\\|false\\|null\\.$#" count: 1 @@ -1409,14 +1401,6 @@ parameters: count: 2 path: app/Http/Controllers/ManageProjectRolesController.php - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 1 - path: app/Http/Controllers/ManageProjectRolesController.php - - message: "#^Loose comparison via \"\\!\\=\" is not allowed\\.$#" count: 5 @@ -2576,14 +2560,6 @@ parameters: count: 4 path: app/Http/Controllers/UserController.php - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 1 - path: app/Http/Controllers/UserController.php - - message: """ #^Call to deprecated method getPdo\\(\\) of class CDash\\\\Database\\: @@ -7195,14 +7171,6 @@ parameters: count: 1 path: app/cdash/app/Model/BuildError.php - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 1 - path: app/cdash/app/Model/BuildError.php - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" count: 2 @@ -7446,14 +7414,6 @@ parameters: count: 2 path: app/cdash/app/Model/BuildFailure.php - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 1 - path: app/cdash/app/Model/BuildFailure.php - - message: """ #^Call to deprecated method getPdo\\(\\) of class CDash\\\\Database\\: @@ -7992,14 +7952,6 @@ parameters: count: 3 path: app/cdash/app/Model/BuildUpdate.php - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 1 - path: app/cdash/app/Model/BuildUpdate.php - - message: """ #^Call to deprecated method getPdo\\(\\) of class CDash\\\\Database\\: @@ -9054,14 +9006,6 @@ parameters: count: 1 path: app/cdash/app/Model/DynamicAnalysis.php - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 1 - path: app/cdash/app/Model/DynamicAnalysis.php - - message: """ #^Call to deprecated method getPdo\\(\\) of class CDash\\\\Database\\: @@ -9753,14 +9697,6 @@ parameters: count: 1 path: app/cdash/app/Model/Project.php - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 1 - path: app/cdash/app/Model/Project.php - - message: """ #^Call to deprecated method getServer\\(\\) of class CDash\\\\Config\\: @@ -10975,16 +10911,6 @@ parameters: count: 1 path: app/cdash/include/CDash/Config.php - - - message: "#^Loose comparison via \"\\!\\=\" is not allowed\\.$#" - count: 2 - path: app/cdash/include/CDash/Config.php - - - - message: "#^Loose comparison via \"\\=\\=\" is not allowed\\.$#" - count: 1 - path: app/cdash/include/CDash/Config.php - - message: "#^Method CDash\\\\Config\\:\\:get\\(\\) has no return type specified\\.$#" count: 1 @@ -11010,21 +10936,11 @@ parameters: count: 1 path: app/cdash/include/CDash/Config.php - - - message: "#^Only booleans are allowed in a negated boolean, mixed given\\.$#" - count: 1 - path: app/cdash/include/CDash/Config.php - - message: "#^Property CDash\\\\Config\\:\\:\\$_config type has no value type specified in iterable type array\\.$#" count: 1 path: app/cdash/include/CDash/Config.php - - - message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#" - count: 1 - path: app/cdash/include/CDash/Config.php - - message: "#^Cannot call method fetch\\(\\) on PDOStatement\\|false\\.$#" count: 1 @@ -11663,14 +11579,6 @@ parameters: count: 1 path: app/cdash/include/Messaging/Subscription/CommitAuthorSubscriptionBuilder.php - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 1 - path: app/cdash/include/Messaging/Subscription/Subscription.php - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" count: 3 @@ -14199,14 +14107,6 @@ parameters: count: 3 path: app/cdash/include/dailyupdates.php - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 1 - path: app/cdash/include/dailyupdates.php - - message: """ #^Call to deprecated method getServer\\(\\) of class CDash\\\\Config\\: @@ -15193,14 +15093,6 @@ parameters: count: 2 path: app/cdash/include/sendemail.php - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 3 - path: app/cdash/include/sendemail.php - - message: """ #^Call to deprecated method getServer\\(\\) of class CDash\\\\Config\\: @@ -16239,22 +16131,6 @@ parameters: #^Call to deprecated method get\\(\\) of class CDash\\\\Config\\: 09/04/2023 Use config\\(\\) instead\\.$# """ - count: 4 - path: app/cdash/tests/case/CDash/ConfigTest.php - - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 2 - path: app/cdash/tests/case/CDash/ConfigTest.php - - - - message: """ - #^Call to deprecated method getProtocol\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ count: 3 path: app/cdash/tests/case/CDash/ConfigTest.php @@ -16266,25 +16142,17 @@ parameters: count: 2 path: app/cdash/tests/case/CDash/ConfigTest.php - - - message: """ - #^Call to deprecated method getServerPort\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 3 - path: app/cdash/tests/case/CDash/ConfigTest.php - - message: """ #^Call to deprecated method set\\(\\) of class CDash\\\\Config\\: 09/04/2023 Use config\\(\\) instead\\.$# """ - count: 11 + count: 5 path: app/cdash/tests/case/CDash/ConfigTest.php - message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertEquals\\(\\)\\.$#" - count: 10 + count: 4 path: app/cdash/tests/case/CDash/ConfigTest.php - @@ -16292,11 +16160,6 @@ parameters: count: 1 path: app/cdash/tests/case/CDash/ConfigTest.php - - - message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNull\\(\\)\\.$#" - count: 2 - path: app/cdash/tests/case/CDash/ConfigTest.php - - message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\)\\.$#" count: 1 @@ -16312,31 +16175,16 @@ parameters: count: 1 path: app/cdash/tests/case/CDash/ConfigTest.php - - - message: "#^Method ConfigTest\\:\\:testGetBaseUrl\\(\\) has no return type specified\\.$#" - count: 1 - path: app/cdash/tests/case/CDash/ConfigTest.php - - message: "#^Method ConfigTest\\:\\:testGetInstance\\(\\) has no return type specified\\.$#" count: 1 path: app/cdash/tests/case/CDash/ConfigTest.php - - - message: "#^Method ConfigTest\\:\\:testGetProtocol\\(\\) has no return type specified\\.$#" - count: 1 - path: app/cdash/tests/case/CDash/ConfigTest.php - - message: "#^Method ConfigTest\\:\\:testGetServer\\(\\) has no return type specified\\.$#" count: 1 path: app/cdash/tests/case/CDash/ConfigTest.php - - - message: "#^Method ConfigTest\\:\\:testGetServerPort\\(\\) has no return type specified\\.$#" - count: 1 - path: app/cdash/tests/case/CDash/ConfigTest.php - - message: "#^Method ConfigTest\\:\\:testGetSet\\(\\) has no return type specified\\.$#" count: 1 @@ -22545,14 +22393,6 @@ parameters: count: 1 path: app/cdash/tests/test_email.php - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 4 - path: app/cdash/tests/test_email.php - - message: "#^Call to deprecated method pass\\(\\) of class SimpleTestCase\\.$#" count: 5 @@ -24782,14 +24622,6 @@ parameters: count: 1 path: app/cdash/tests/test_submitsortingdata.php - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 2 - path: app/cdash/tests/test_subproject.php - - message: "#^Call to deprecated method pass\\(\\) of class SimpleTestCase\\.$#" count: 3 @@ -25322,14 +25154,6 @@ parameters: count: 1 path: app/cdash/tests/test_timeoutsandmissingtests.php - - - message: """ - #^Call to deprecated method getBaseUrl\\(\\) of class CDash\\\\Config\\: - 09/04/2023 Use url\\(\\) instead\\.$# - """ - count: 2 - path: app/cdash/tests/test_timeoutsandmissingtests.php - - message: "#^Call to deprecated method pass\\(\\) of class SimpleTestCase\\.$#" count: 2 diff --git a/resources/views/email/issue/missing_tests.blade.php b/resources/views/email/issue/missing_tests.blade.php index c1290be188..06de0f741e 100755 --- a/resources/views/email/issue/missing_tests.blade.php +++ b/resources/views/email/issue/missing_tests.blade.php @@ -1,9 +1,6 @@ first()->buildid; -$url = "{$config->getBaseUrl()}/viewTest.php?buildid={$buildid}"; +$url = url('/viewTest.php') . "?buildid={$buildid}"; ?> @foreach($items as $missing_tests) {{ $missing_tests->test->name }} ({!! $url !!})