passage en mode composer sur le gitea
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "~8.1",
|
||||
"kletellier/pdowrapper": "dev-master",
|
||||
"kletellier/pdowrapper": "^1.0",
|
||||
"symfony/http-kernel": "^6.3",
|
||||
"bramus/router": "~1.6",
|
||||
"filp/whoops": "^2.15",
|
||||
@@ -15,8 +15,8 @@
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://git.kletellier.xyz/greg/PdoWrapper.git"
|
||||
"type": "composer",
|
||||
"url": "https://git.kletellier.xyz/api/packages/greg/composer"
|
||||
}
|
||||
],
|
||||
"require-dev": {
|
||||
|
||||
24
src/Commands/TestCommand.php
Normal file
24
src/Commands/TestCommand.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Kletellier\MiniWeb\Commands;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
class TestCommand extends Command
|
||||
{
|
||||
protected static $defaultName = 'app:test';
|
||||
protected static $defaultDescription = 'Test.';
|
||||
|
||||
protected function configure(): void
|
||||
{
|
||||
$this->setHelp('Test');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$output->writeln("test");
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
}
|
||||
16
src/Controllers/Home.php
Normal file
16
src/Controllers/Home.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Kletellier\MiniWeb\Controllers;
|
||||
|
||||
use Kletellier\MiniWeb\Core\Controllers\Controller;
|
||||
use DateTimeZone;
|
||||
|
||||
class Home extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$date = new \DateTime('now', new DateTimeZone("Europe/Paris"));
|
||||
$html = $this->renderView("index", ["date" => $date->format("d/m/Y H:i:s")]);
|
||||
$this->render($html);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user