lean-console/src/Lib/ConsoleControllerTrait.php

39 lines
742 B
PHP

<?php
namespace Lean\Console\Lib;
use DI\Attribute\Inject;
use Notes\Attribute\Ignore;
use Psr\Container\ContainerInterface;
use Storage\Session;
use Lean\Console\Form;
use Notes\Security\Attribute\{ Security, Taxus };
use Picea;
#[Security(locked: false)]
#[Taxus("dev")]
#[\Notes\Route\Attribute\Object\Route(method: [ 'GET', 'POST' ] , base: "/~")]
trait ConsoleControllerTrait
{
use \Lean\ControllerTrait;
#[Inject]
protected ContainerInterface $container;
#[Ignore]
public function version() : string
{
$version = iterator_to_array(
new Form\Update\Git(getenv('PROJECT_PATH'))->run("/usr/bin/git describe --tags")
);
# dump($version);
return "1.5.0";
}
}