diff --git a/library/Icinga/Application/ApplicationBootstrap.php b/library/Icinga/Application/ApplicationBootstrap.php index ca1d262ac5..55eb637783 100644 --- a/library/Icinga/Application/ApplicationBootstrap.php +++ b/library/Icinga/Application/ApplicationBootstrap.php @@ -43,7 +43,7 @@ abstract class ApplicationBootstrap /** * Base directory * - * Parent folder for at least application, bin, modules, library/vendor and public + * Parent folder for at least application, bin, modules and public * * @var string */ @@ -56,13 +56,6 @@ abstract class ApplicationBootstrap */ protected $appDir; - /** - * Vendor library directory - * - * @var string - */ - protected $vendorDir; - /** * Icinga library directory * @@ -161,7 +154,6 @@ protected function __construct($baseDir = null, $configDir = null, $storageDir = } $this->baseDir = $baseDir; $this->appDir = $baseDir . '/application'; - $this->vendorDir = $baseDir . '/library/vendor'; if (substr(__DIR__, 0, 8) === 'phar:///') { $this->libDir = dirname(dirname(__DIR__)); } else { @@ -206,15 +198,6 @@ protected function __construct($baseDir = null, $configDir = null, $storageDir = } } - set_include_path( - implode( - PATH_SEPARATOR, - array($this->vendorDir, get_include_path()) - ) - ); - - Benchmark::measure('Bootstrap, autoloader registered'); - Icinga::setApp($this); require_once dirname(__FILE__) . '/functions.php'; @@ -328,18 +311,6 @@ public function getApplicationDir($subDir = null) return $this->getDirWithSubDir($this->appDir, $subDir); } - /** - * Get the vendor library directory - * - * @param string $subDir Optional sub directory to get - * - * @return string - */ - public function getVendorDir($subDir = null) - { - return $this->getDirWithSubDir($this->vendorDir, $subDir); - } - /** * Get the configuration directory * diff --git a/library/Icinga/Application/ClassLoader.php b/library/Icinga/Application/ClassLoader.php index aed26f7690..71b4d3ec89 100644 --- a/library/Icinga/Application/ClassLoader.php +++ b/library/Icinga/Application/ClassLoader.php @@ -3,8 +3,6 @@ namespace Icinga\Application; -use Zend_Loader_Autoloader; - /** * PSR-4 class loader */ @@ -263,18 +261,6 @@ protected function namespaceHasApplictionDirectory($namespace) return array_key_exists($namespace, $this->applicationDirectories); } - /** - * Require ZF autoloader - * - * @return Zend_Loader_Autoloader - */ - protected function requireZendAutoloader() - { - require_once 'Zend/Loader/Autoloader.php'; - $this->gotZend = true; - return Zend_Loader_Autoloader::getInstance(); - } - /** * Load the given class or interface * @@ -284,20 +270,6 @@ protected function requireZendAutoloader() */ public function loadClass($class) { - // We are aware of the Zend_ prefix and lazyload it's autoloader. - // Return as fast as possible if we already did so. - if (substr($class, 0, 5) === 'Zend_') { - if (! $this->gotZend) { - $zendLoader = $this->requireZendAutoloader(); - if (version_compare(PHP_VERSION, '7.0.0') >= 0) { - // PHP7 seems to remember the autoload function stack before auto-loading. Thus - // autoload functions registered during autoload never get called - return $zendLoader::autoload($class); - } - } - return false; - } - if ($file = $this->getSourceFile($class)) { if (file_exists($file)) { require $file; diff --git a/library/Icinga/File/Pdf.php b/library/Icinga/File/Pdf.php index e159e2fced..1b78424be6 100644 --- a/library/Icinga/File/Pdf.php +++ b/library/Icinga/File/Pdf.php @@ -11,21 +11,6 @@ use Icinga\Web\Hook; use Icinga\Web\Url; -call_user_func(function () { - /** - * @package dompdf - * @link http://dompdf.github.com/ - * @author Benj Carson - * @author Fabien Ménager - * @author Alexander A. Klimov - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - */ - - $baseDir = Icinga::app()->getBaseDir('library/vendor/dompdf'); - - require_once "$baseDir/vendor/autoload.php"; -}); - class Pdf { protected function assertNoHeadersSent() diff --git a/library/Icinga/Util/LessParser.php b/library/Icinga/Util/LessParser.php index 46aa061f57..1e07aa931c 100644 --- a/library/Icinga/Util/LessParser.php +++ b/library/Icinga/Util/LessParser.php @@ -6,8 +6,6 @@ use Icinga\Less\Visitor; use lessc; -require_once 'lessphp/lessc.inc.php'; - class LessParser extends lessc { public function __construct() diff --git a/library/Icinga/Web/Helper/HtmlPurifier.php b/library/Icinga/Web/Helper/HtmlPurifier.php index f0c292fdda..19fd207787 100644 --- a/library/Icinga/Web/Helper/HtmlPurifier.php +++ b/library/Icinga/Web/Helper/HtmlPurifier.php @@ -23,10 +23,6 @@ class HtmlPurifier */ public function __construct($config = null) { - require_once 'HTMLPurifier/Bootstrap.php'; - require_once 'HTMLPurifier.php'; - require_once 'HTMLPurifier.autoload.php'; - $purifierConfig = \HTMLPurifier_Config::createDefault(); $purifierConfig->set('Core.EscapeNonASCIICharacters', true); $purifierConfig->set('Attr.AllowedFrameTargets', array('_blank')); diff --git a/library/Icinga/Web/Helper/Markdown.php b/library/Icinga/Web/Helper/Markdown.php index e6509d0541..cb854b4759 100644 --- a/library/Icinga/Web/Helper/Markdown.php +++ b/library/Icinga/Web/Helper/Markdown.php @@ -10,8 +10,6 @@ class Markdown { public static function line($content, $config = null) { - require_once 'Parsedown/Parsedown.php'; - if ($config === null) { $config = function (\HTMLPurifier_Config $config) { $config->set('HTML.Parent', 'span'); // Only allow inline elements @@ -25,8 +23,6 @@ public static function line($content, $config = null) public static function text($content, $config = null) { - require_once 'Parsedown/Parsedown.php'; - if ($config === null) { $config = function (\HTMLPurifier_Config $config) { LinkTransformer::attachTo($config); diff --git a/library/Icinga/Web/JavaScript.php b/library/Icinga/Web/JavaScript.php index 7c5eebc2b4..1865136c76 100644 --- a/library/Icinga/Web/JavaScript.php +++ b/library/Icinga/Web/JavaScript.php @@ -190,7 +190,6 @@ public static function send($minified = false) } if ($minified) { - require_once 'JShrink/Minifier.php'; $out .= Minifier::minify($js, ['flaggedComments' => false]); $baseOut = Minifier::minify($baseJs, ['flaggedComments' => false]); $out = ';' . ltrim($baseOut, ';') . "\n" . $out; diff --git a/modules/doc/library/Doc/Renderer/DocSectionRenderer.php b/modules/doc/library/Doc/Renderer/DocSectionRenderer.php index de2d4d460f..4e76c3d25e 100644 --- a/modules/doc/library/Doc/Renderer/DocSectionRenderer.php +++ b/modules/doc/library/Doc/Renderer/DocSectionRenderer.php @@ -3,8 +3,6 @@ namespace Icinga\Module\Doc\Renderer; -require_once 'Parsedown/Parsedown.php'; - use DOMDocument; use DOMXPath; use Parsedown; diff --git a/modules/monitoring/application/views/helpers/EscapeComment.php b/modules/monitoring/application/views/helpers/EscapeComment.php index be85a223ed..0afc997170 100644 --- a/modules/monitoring/application/views/helpers/EscapeComment.php +++ b/modules/monitoring/application/views/helpers/EscapeComment.php @@ -23,10 +23,6 @@ class Zend_View_Helper_EscapeComment extends Zend_View_Helper_Abstract public function escapeComment($comment) { if (self::$purifier === null) { - require_once 'HTMLPurifier/Bootstrap.php'; - require_once 'HTMLPurifier.php'; - require_once 'HTMLPurifier.autoload.php'; - $config = HTMLPurifier_Config::createDefault(); $config->set('Core.EscapeNonASCIICharacters', true); $config->set('HTML.Allowed', 'a[href]');