summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Pugh2018-02-05 18:26:05 (GMT)
committerJon Pugh2018-02-05 18:26:05 (GMT)
commit5d2d3692d522a9d30366a03d19e9450c0d307b85 (patch)
tree54bcd02e6a8cd4cc68c958d495f36605783a4d4d
parent5cfa3335e0a4ad5f1dd17f73ffc9199acff5970d (diff)
parent2b203d774d1fcb6b32685a39e903197e5990aa3a (diff)
Merge branch '4.x' into 4.x-cleanup4.x-cleanup
-rw-r--r--src/Provision.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Provision.php b/src/Provision.php
index d4eca9b..4b86221 100644
--- a/src/Provision.php
+++ b/src/Provision.php
@@ -32,6 +32,7 @@ use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Logger\ConsoleLogger;
use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Filesystem\Filesystem;
/**
* Class Provision
@@ -465,6 +466,9 @@ class Provision implements ConfigAwareInterface, ContainerAwareInterface, Logger
/**
* Determine the web user group on this server.
+ *
+ * @TODO: This should move to the Service class.
+ *
* @return mixed|null
*/
static function defaultWebGroup() {
@@ -509,4 +513,20 @@ class Provision implements ConfigAwareInterface, ContainerAwareInterface, Logger
}
return $group;
}
+
+ /**
+ * Return a new Symfony Filesystem component.
+ *
+ * Replacement for provision_file().
+ *
+ * Usage:
+ *
+ * Provision::fs()->exists();
+ *
+ *
+ * @return \Symfony\Component\Filesystem\Filesystem
+ */
+ public static function fs() {
+ return new Filesystem();
+ }
}