From 658ca4deb17f9a16affae041ba1e2e13b0658200 Mon Sep 17 00:00:00 2001 From: Aaron Carlino Date: Thu, 25 Jun 2020 12:09:28 +1200 Subject: [PATCH 1/3] MINOR: Add noindex metatag to debugview --- src/Dev/DebugView.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Dev/DebugView.php b/src/Dev/DebugView.php index 24200bf8e..a87f49b71 100644 --- a/src/Dev/DebugView.php +++ b/src/Dev/DebugView.php @@ -223,6 +223,7 @@ class DebugView ->resolveURL('silverstripe/framework:client/styles/debug.css'); $output = '' . $url . ''; $output .= ''; + $output .= ''; $output .= ''; $output .= ''; From b62288cc92bd7e58182e1b02b083eeb474366d52 Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Thu, 17 Oct 2019 13:03:04 +1300 Subject: [PATCH 2/3] BUG Disabled the UpgradeBootstrap upgrader doctor task --- .upgrade.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.upgrade.yml b/.upgrade.yml index a2d4baa0e..8e9407635 100644 --- a/.upgrade.yml +++ b/.upgrade.yml @@ -952,8 +952,6 @@ skipConfigs: excludedPaths: - '*fixtures*' - '*vendor*' -doctorTasks: - SilverStripe\Dev\Upgrade\UpgradeBootstrap: src/Dev/Upgrade/UpgradeBootstrap.php warnings: classes: 'Object': From ec83959f2c3ff7784fdd9503601732b5d006de13 Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Tue, 30 Jun 2020 21:35:51 +1200 Subject: [PATCH 3/3] API Remove UpgradeBootstrap (not part of our official API) --- src/Dev/Upgrade/UpgradeBootstrap.php | 94 ---------------------------- 1 file changed, 94 deletions(-) delete mode 100644 src/Dev/Upgrade/UpgradeBootstrap.php diff --git a/src/Dev/Upgrade/UpgradeBootstrap.php b/src/Dev/Upgrade/UpgradeBootstrap.php deleted file mode 100644 index 101fe987a..000000000 --- a/src/Dev/Upgrade/UpgradeBootstrap.php +++ /dev/null @@ -1,94 +0,0 @@ - true, - 'index.php' => true, - 'install.php' => false, - ]; - - /** - * @param InputInterface $input - * @param OutputInterface $output - * @param $basePath - */ - public function __invoke(InputInterface $input, OutputInterface $output, $basePath) - { - $publicPath = file_exists("{$basePath}/public") ? "{$basePath}/public" : $basePath; - - // Fail if destination isn't writable - $this->ensureWritable($publicPath); - - // Check source - $source = $basePath . '/vendor/silverstripe/recipe-core/public'; - if (!is_dir($source)) { - throw new BadMethodCallException("silverstripe/recipe-core is not installed."); - } - - // Copy scaffolded files from recipe-core - $output->writeln("Upgrading project bootstrapping files:"); - foreach ($this->files as $file => $canCreate) { - $fileSource = $source . '/' . $file; - $fileDest = $publicPath . '/' . $file; - - // Skip if we should only upgrade existing files - if (!$canCreate && !file_exists($fileDest)) { - continue; - } - $output->writeln(" - Upgrading {$file}"); - $this->copyFile( - $fileSource, - $fileDest - ); - } - } - - /** - * Ensure path is writable - * - * @param string $path - */ - protected function ensureWritable($path) - { - if (!is_writable($path)) { - throw new BadMethodCallException("Path $path is not writable"); - } - } - - /** - * Copy file - * - * @param string $source - * @param string $dest - */ - protected function copyFile($source, $dest) - { - // Ensure existing file can be overwritten - if (file_exists($dest)) { - $this->ensureWritable($dest); - } - file_put_contents($dest, file_get_contents($source)); - } -}