From 8b9ca41fa9107ecd0d38320100fdb97dcc1e7bc1 Mon Sep 17 00:00:00 2001
From: Georg Ringer <georg.ringer@gmail.com>
Date: Fri, 3 Nov 2017 19:49:01 +0100
Subject: [PATCH] [!!!][TASK] Remove TS option page.stylesheet

Remove the TypoScript option 'page.stylesheet' in favor of
using `page.includeCSS`.

Resolves: #82915
Releases: master
Change-Id: If8bb68a1520c23096ab0729caba681031c6a5401
Reviewed-on: https://review.typo3.org/54549
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
---
 ...5-RemoveTypoScriptOptionPagestylesheet.rst | 32 +++++++++++++++++++
 .../frontend/Classes/Page/PageGenerator.php   |  6 ----
 .../t3editor/Resources/Private/tsref.xml      |  8 -----
 .../JavaScript/Mode/typoscript/typoscript.js  |  1 -
 4 files changed, 32 insertions(+), 15 deletions(-)
 create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Breaking-82915-RemoveTypoScriptOptionPagestylesheet.rst

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-82915-RemoveTypoScriptOptionPagestylesheet.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-82915-RemoveTypoScriptOptionPagestylesheet.rst
new file mode 100644
index 000000000000..597e831bf8ab
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-82915-RemoveTypoScriptOptionPagestylesheet.rst
@@ -0,0 +1,32 @@
+.. include:: ../../Includes.txt
+
+===========================================================
+Breaking: #82915 - Remove TypoScript option page.stylesheet
+===========================================================
+
+See :issue:`82915`
+
+Description
+===========
+
+The TypoScript option `page.stylesheet` has been removed.
+
+
+Impact
+======
+
+Setting this option will have no effect anymore.
+
+
+Affected Installations
+======================
+
+Any TYPO3 installation using this option.
+
+
+Migration
+=========
+
+Use a configuration like :ts:`page.includeCSS.aFile = fileadmin/styles.css`
+
+.. index:: Frontend, NotScanned
diff --git a/typo3/sysext/frontend/Classes/Page/PageGenerator.php b/typo3/sysext/frontend/Classes/Page/PageGenerator.php
index 3b7d807cafd6..2bb76ab1e791 100644
--- a/typo3/sysext/frontend/Classes/Page/PageGenerator.php
+++ b/typo3/sysext/frontend/Classes/Page/PageGenerator.php
@@ -270,12 +270,6 @@ class PageGenerator
                 self::addCssToPageRenderer($stylesFromPlugins, false, 'InlineDefaultCss');
             }
         }
-        if ($tsfe->pSetup['stylesheet']) {
-            $ss = $tsfe->tmpl->getFileName($tsfe->pSetup['stylesheet']);
-            if ($ss) {
-                $pageRenderer->addCssFile($ss);
-            }
-        }
         /**********************************************************************/
         /* config.includeCSS / config.includeCSSLibs
         /**********************************************************************/
diff --git a/typo3/sysext/t3editor/Resources/Private/tsref.xml b/typo3/sysext/t3editor/Resources/Private/tsref.xml
index 313016c699f2..0fed78514080 100644
--- a/typo3/sysext/t3editor/Resources/Private/tsref.xml
+++ b/typo3/sysext/t3editor/Resources/Private/tsref.xml
@@ -5070,14 +5070,6 @@ This must be a valid ".ico"-file (iconfile)]]></description>
 		<property name="stdWrap" type="stdWrap">
 			<description><![CDATA[Wraps the content of the the cObject array with stdWrap options]]></description>
 			<default><![CDATA[
-]]></default>
-		</property>
-		<property name="stylesheet" type="string">
-			<description><![CDATA[Inserts a stylesheet in the <HEAD>-section of the page;
-page.stylesheet = myStyleSheet.css
-leads to
-<link rel="stylesheet" href="myStyleSheet.css">]]></description>
-			<default><![CDATA[
 ]]></default>
 		</property>
 		<property name="typeNum" type="int">
diff --git a/typo3/sysext/t3editor/Resources/Public/JavaScript/Mode/typoscript/typoscript.js b/typo3/sysext/t3editor/Resources/Public/JavaScript/Mode/typoscript/typoscript.js
index ed63c4b093ae..86bd1d42261d 100644
--- a/typo3/sysext/t3editor/Resources/Public/JavaScript/Mode/typoscript/typoscript.js
+++ b/typo3/sysext/t3editor/Resources/Public/JavaScript/Mode/typoscript/typoscript.js
@@ -825,7 +825,6 @@
 				'strftime': kw('strftime'),
 				'stripHtml': kw('stripHtml'),
 				'styles': kw('styles'),
-				'stylesheet': kw('stylesheet'),
 				'submenuObjSuffixes': kw('submenuObjSuffixes'),
 				'subMenuOffset': kw('subMenuOffset'),
 				'submit': kw('submit'),
-- 
GitLab