<NME> Apache.php
<BEF> ADDFILE
<MSG> Apache .htaccess validation check

<DFF> @@ -0,0 +1,60 @@
+<?php
+
+namespace Bolt\Configuration\Validation;
+
+use Bolt\Configuration\ResourceManager;
+use Bolt\Controller\ExceptionControllerInterface;
+use Symfony\Component\HttpFoundation\Request;
+
+/**
+ * Apache .htaccess validation check.
+ *
+ * @author Gawain Lynch <gawain.lynch@gmail.com>
+ */
+class Apache implements ValidationInterface, ResourceManagerAwareInterface
+{
+    /** @var ResourceManager */
+    private $resourceManager;
+
+    /**
+     * This check looks for the presence of the .htaccess file inside the web directory.
+     * It is here only as a convenience check for users that install the basic version of Bolt.
+     *
+     * If you see this error and want to disable it, call $config->getVerifier()->disableApacheChecks();
+     * inside your bootstrap.php file, just before the call to $config->verify().
+     *
+     * {@inheritdoc}
+     */
+    public function check(ExceptionControllerInterface $exceptionController)
+    {
+        $request = Request::createFromGlobals();
+        $serverSoftware = $request->server->get('SERVER_SOFTWARE', '');
+        $isApache = strpos($serverSoftware, 'Apache') !== false;
+        if (!$isApache) {
+            return null;
+        }
+
+        $path = $this->resourceManager->getPath('web/.htaccess');
+        if (is_readable($path)) {
+            return null;
+        }
+
+        return $exceptionController->systemCheck('htaccess');
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function isTerminal()
+    {
+        return true;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setResourceManager(ResourceManager $resourceManager)
+    {
+        $this->resourceManager = $resourceManager;
+    }
+}

{'commit': "diff --git a/src/Configuration/Validation/Apache.php b/src/Configuration/Validation/Apache.php\nnew file mode 100644\nindex 000000000..ac5b141fe\n--- /dev/null\n+++ b/src/Configuration/Validation/Apache.php\n@@ -0,0 +1,60 @@\n+<?php\n+\n+namespace Bolt\\Configuration\\Validation;\n+\n+use Bolt\\Configuration\\ResourceManager;\n+use Bolt\\Controller\\ExceptionControllerInterface;\n+use Symfony\\Component\\HttpFoundation\\Request;\n+\n+/**\n+ * Apache .htaccess validation check.\n+ *\n+ * @author Gawain Lynch <gawain.lynch@gmail.com>\n+ */\n+class Apache implements ValidationInterface, ResourceManagerAwareInterface\n+{\n+    /** @var ResourceManager */\n+    private $resourceManager;\n+\n+    /**\n+     * This check looks for the presence of the .htaccess file inside the web directory.\n+     * It is here only as a convenience check for users that install the basic version of Bolt.\n+     *\n+     * If you see this error and want to disable it, call $config->getVerifier()->disableApacheChecks();\n+     * inside your bootstrap.php file, just before the call to $config->verify().\n+     *\n+     * {@inheritdoc}\n+     */\n+    public function check(ExceptionControllerInterface $exceptionController)\n+    {\n+        $request = Request::createFromGlobals();\n+        $serverSoftware = $request->server->get('SERVER_SOFTWARE', '');\n+        $isApache = strpos($serverSoftware, 'Apache') !== false;\n+        if (!$isApache) {\n+            return null;\n+        }\n+\n+        $path = $this->resourceManager->getPath('web/.htaccess');\n+        if (is_readable($path)) {\n+            return null;\n+        }\n+\n+        return $exceptionController->systemCheck('htaccess');\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function isTerminal()\n+    {\n+        return true;\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function setResourceManager(ResourceManager $resourceManager)\n+    {\n+        $this->resourceManager = $resourceManager;\n+    }\n+}\n", 'commit_subject': 'Apache .htaccess validation check', 'repo_name': 'bolt/bolt', 'committer': {'name': 'Gawain Lynch', 'email': 'f745ec5336bcd096400627fc09f6ec7139408726@gmail.com', 'time_sec': '1470165652', 'tz_offset': '120', 'date': {'seconds': '1470165652'}}, 'commit_tree': 'fc4fd89745599a8c426520f5045940d91c5e6c2a', 'commit_message': 'Apache .htaccess validation check\n', 'language_name': 'PHP', 'license': 'mit', 'hunks': "@@ -0,0 +1,60 @@\n+<?php\n+\n+namespace Bolt\\Configuration\\Validation;\n+\n+use Bolt\\Configuration\\ResourceManager;\n+use Bolt\\Controller\\ExceptionControllerInterface;\n+use Symfony\\Component\\HttpFoundation\\Request;\n+\n+/**\n+ * Apache .htaccess validation check.\n+ *\n+ * @author Gawain Lynch <gawain.lynch@gmail.com>\n+ */\n+class Apache implements ValidationInterface, ResourceManagerAwareInterface\n+{\n+    /** @var ResourceManager */\n+    private $resourceManager;\n+\n+    /**\n+     * This check looks for the presence of the .htaccess file inside the web directory.\n+     * It is here only as a convenience check for users that install the basic version of Bolt.\n+     *\n+     * If you see this error and want to disable it, call $config->getVerifier()->disableApacheChecks();\n+     * inside your bootstrap.php file, just before the call to $config->verify().\n+     *\n+     * {@inheritdoc}\n+     */\n+    public function check(ExceptionControllerInterface $exceptionController)\n+    {\n+        $request = Request::createFromGlobals();\n+        $serverSoftware = $request->server->get('SERVER_SOFTWARE', '');\n+        $isApache = strpos($serverSoftware, 'Apache') !== false;\n+        if (!$isApache) {\n+            return null;\n+        }\n+\n+        $path = $this->resourceManager->getPath('web/.htaccess');\n+        if (is_readable($path)) {\n+            return null;\n+        }\n+\n+        return $exceptionController->systemCheck('htaccess');\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function isTerminal()\n+    {\n+        return true;\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function setResourceManager(ResourceManager $resourceManager)\n+    {\n+        $this->resourceManager = $resourceManager;\n+    }\n+}\n", 'addition_count': 60, 'deletion_count': 0, 'src_file': '/dev/null', 'tgt_file': 'b/src/Configuration/Validation/Apache.php', 'file_extension': '.php', 'before_file': 'ADDFILE', 'message': 'Apache .htaccess validation check\n', 'author_name': 'Gawain Lynch', 'lang': 'php'}