-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more commands to Flow CLI (#1246)
* Added more commands to Flow CLI * Added a way to pass configuration to flow cli * Added extra tests for protocol value object
- Loading branch information
1 parent
444b79f
commit c269cc5
Showing
47 changed files
with
272,088 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,10 @@ | |
"Flow\\": [ | ||
"src/Flow" | ||
] | ||
} | ||
}, | ||
"files": [ | ||
"src/Flow/CLI/DSL/functions.php" | ||
] | ||
}, | ||
"bin": [ | ||
"flow" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Flow\CLI\Arguments; | ||
|
||
use function Flow\CLI\argument_string; | ||
use function Flow\Filesystem\DSL\path_real; | ||
use Flow\ETL\Config; | ||
use Flow\Filesystem\Path; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
|
||
final class FilePathArgument | ||
{ | ||
public function __construct(private readonly string $path) | ||
{ | ||
} | ||
|
||
public function getExisting(InputInterface $input, Config $config) : Path | ||
{ | ||
$path = path_real(argument_string($this->path, $input)); | ||
|
||
if ($config->fstab()->for($path)->status($path) === null) { | ||
throw new \InvalidArgumentException("File '{$path->path()}' does not exist."); | ||
} | ||
|
||
return $path; | ||
} | ||
} |
Oops, something went wrong.