Full command

This commit is contained in:
2023-11-29 23:02:12 -03:00
parent dc7a39e193
commit f957d29779
4 changed files with 37 additions and 3 deletions

View File

@ -1,10 +1,10 @@
FROM php:8.1-fpm
FROM php:8.2-fpm
ENV TZ "America/Santiago"
RUN apt-get update && apt-get install -y --no-install-recommends cron && rm -r /var/lib/apt/lists/*
RUN pecl install xdebug-3.1.3 \
RUN pecl install xdebug-3.2.2 \
&& docker-php-ext-enable xdebug
COPY ./php-errors.ini /usr/local/etc/php/conf.d/docker-php-errors.ini

View File

@ -0,0 +1,2 @@
<?php
$app->add($app->getContainer()->get(Incoviba\Command\Full::class));

32
cli/src/Command/Full.php Normal file
View File

@ -0,0 +1,32 @@
<?php
namespace Incoviba\Command;
use Symfony\Component\Console;
use Incoviba\Common\Alias\Command;
#[Console\Attribute\AsCommand(
name: 'run:full'
)]
class Full extends Command
{
public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
{
$commands = [
'comunas',
'money:ipc',
'money:uf',
'proyectos:activos',
'ventas:cierres:vigentes',
'ventas:cuotas:hoy',
'ventas:cuotas:pendientes',
'ventas:cuotas:vencer'
];
foreach ($commands as $command) {
$cmd = new Console\Input\ArrayInput([
'command' => $command
]);
$this->getApplication()->doRun($cmd, $output);
}
return Command::SUCCESS;
}
}

View File

@ -12,7 +12,7 @@ class Pendientes extends Command
public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
{
$this->logger->debug("Running {$this->getName()}");
$uri = '/api/ventas/cuotas/pendientes';
$uri = '/api/ventas/cuotas/pendiente';
$output->writeln("GET {$uri}");
$response = $this->client->get($uri);
$output->writeln("Response Code: {$response->getStatusCode()}");