[TASK] Remove usage of PATH_typo3conf from ConfigurationManager 79/52879/5
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 20 May 2017 17:57:23 +0000 (19:57 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 22 May 2017 11:11:15 +0000 (13:11 +0200)
Resolves: #81284
Releases: master, 8.7
Change-Id: I59730f5807d27bbc7eb232917763daa89f41315a
Reviewed-on: https://review.typo3.org/52879
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Configuration/ConfigurationManager.php
typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php

index 2993be9..ae4efda 100644 (file)
@@ -66,11 +66,6 @@ class ConfigurationManager
     protected $additionalFactoryConfigurationFile = 'typo3conf/AdditionalFactoryConfiguration.php';
 
     /**
-     * @var string Absolute path to typo3conf directory
-     */
-    protected $pathTypo3Conf = PATH_typo3conf;
-
-    /**
      * Writing to these configuration paths is always allowed,
      * even if the requested sub path does not exist yet.
      *
@@ -286,7 +281,7 @@ class ConfigurationManager
     public function canWriteConfiguration()
     {
         $fileLocation = $this->getLocalConfigurationFileLocation();
-        return @is_writable(file_exists($fileLocation) ? $fileLocation : $this->pathTypo3Conf);
+        return @is_writable(file_exists($fileLocation) ? $fileLocation : PATH_site . 'typo3conf/');
     }
 
     /**
index fa57496..a9df8ca 100644 (file)
@@ -397,20 +397,13 @@ class ConfigurationManagerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTes
         $directory = 'typo3temp/var/tests/' . $this->getUniqueId('test_');
         $absoluteDirectory = PATH_site . $directory;
         mkdir($absoluteDirectory);
-        $subject->_set('pathTypo3Conf', $absoluteDirectory);
 
-        $file1 = 'typo3temp/var/tests/' . $this->getUniqueId('test_');
-        $absoluteFile1 = PATH_site . $file1;
+        $file = 'typo3temp/var/tests/' . $this->getUniqueId('test_');
+        $absoluteFile1 = PATH_site . $file;
         touch($absoluteFile1);
         $this->testFilesToDelete[] = $absoluteFile1;
         $subject->_set('localConfigurationFile', $absoluteFile1);
 
-        $file2 = 'typo3temp/var/tests/' . $this->getUniqueId('test_');
-        $absoluteFile2 = PATH_site . $file2;
-        touch($absoluteFile2);
-        $this->testFilesToDelete[] = $absoluteFile2;
-        $subject->_set('localconfFile', $absoluteFile2);
-
         clearstatcache();
 
         $result = $subject->canWriteConfiguration();