4 Commits
0.1.1 ... 0.2.1

Author SHA1 Message Date
Aerex
67e34e52b8 refactor(lib): Fixed API change for process symfony 2022-06-19 12:44:50 -05:00
Aerex
dc96556b5a chore: Updated to sabre to version 4.3 2022-06-19 11:25:30 -05:00
Aerex
31822ab7e7 fix: Updated TreeBuilder contructor arguments 2022-02-23 20:59:44 -06:00
Aerex
50e9a4c621 chore: Updated dependencies 2022-02-23 20:54:07 -06:00
4 changed files with 17 additions and 18 deletions

View File

@@ -19,8 +19,8 @@
"bin/baikalstorage"
],
"require": {
"php": ">=5.5",
"sabre/dav" : "~4.1.0",
"php" : "^7.2 || ^8.0",
"sabre/dav" : "~4.3.0",
"sabre/vobject": "^4.2.1",
"nesbot/carbon": "^2.0.0",
"laminas/laminas-validator": "^2.13",

View File

@@ -1,4 +1,4 @@
<?php
<?php
namespace Aerex\BaikalStorage\Configs;
@@ -21,9 +21,9 @@ class ConfigBuilder implements ConfigurationInterface {
}
public function getConfigTreeBuilder() {
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('configs');
$ref = $rootNode->children()
$treeBuilder = new TreeBuilder('configs', 'array');
$rootNode = $treeBuilder->getRootNode();
$ref = $rootNode->children()
->arrayNode('general')
->children()
->arrayNode('logger')
@@ -35,12 +35,12 @@ class ConfigBuilder implements ConfigurationInterface {
->validate()
->IfNotInArray(['DEBUG', 'INFO', 'NOTICE', 'WARNING', 'ERROR', 'CRITICAL', 'ALERT', 'EMERGENCY'])
->thenInvalid('Invalid log level %s')
->end()
->end()
->end()
->end()
->end()
->end()
->end()
->end()
->end()
->end()
->end()
->end()
->arrayNode('storages')
->children();
foreach ($this->configs as $config) {

View File

@@ -1,4 +1,4 @@
<?php
<?php
namespace Aerex\BaikalStorage\Configs;

View File

@@ -1,4 +1,4 @@
<?php
<?php
namespace Aerex\BaikalStorage;
@@ -14,20 +14,19 @@ class Console extends AbstractConsole {
private function convertToString($input) {
if (is_array($input)) {
return json_encode($input);
return json_encode($input);
}
return $input;
}
public function execute($cmd, $args, $input = null, $envs = []) {
$stdin[] = $cmd;
$stdin = array_merge($stdin, $this->defaultArgs, $args);
$stdin = array_merge($stdin, $this->defaultArgs, $args);
if (isset($input)) {
$input = $this->convertToString($input);
}
$process = new Process(implode(' ', $stdin), null, $envs, $input);
$process->inheritEnvironmentVariables();
$process = new Process($stdin, null, $envs, $input);
try {
$process->mustRun();