From 303ad08fb8645bee4d6e55650bcac40c313ffb39 Mon Sep 17 00:00:00 2001 From: Dimitri Sitchet Tomkeu Date: Thu, 27 Aug 2026 17:57:25 +0100 Subject: [PATCH 1/3] patch: mapping de nouvelles interfaces au container --- src/Config/Providers.php | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/Config/Providers.php b/src/Config/Providers.php index 724f19d8..b04c560a 100644 --- a/src/Config/Providers.php +++ b/src/Config/Providers.php @@ -17,6 +17,8 @@ use BlitzPHP\Cache\ResponseCache; use BlitzPHP\Container\AbstractProvider; use BlitzPHP\Contracts\Autoloader\LocatorInterface; +use BlitzPHP\Contracts\Cache\CacheInterface; +use BlitzPHP\Contracts\Cache\RepositoryInterface; use BlitzPHP\Contracts\Container\ContainerInterface; use BlitzPHP\Contracts\Event\EventManagerInterface; use BlitzPHP\Contracts\Mail\MailerInterface; @@ -36,10 +38,11 @@ use BlitzPHP\Session\Cookie\CookieManager; use BlitzPHP\Session\Store; use BlitzPHP\Translator\Translate; +use Psr\Container\ContainerInterface as PsrContainerInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Log\LoggerInterface; -use Psr\SimpleCache\CacheInterface; +use Psr\SimpleCache\CacheInterface as PsrCacheInterface; class Providers extends AbstractProvider { @@ -57,20 +60,22 @@ public static function definitions(): array private static function interfaces(): array { return [ - LocatorInterface::class => static fn () => service('locator'), - ContainerInterface::class => static fn () => service('container'), - EventManagerInterface::class => static fn () => service('event'), - MailerInterface::class => static fn () => service('mail'), - RouteCollectionInterface::class => static fn () => service('routes'), - EncrypterInterface::class => static fn () => service('encrypter'), - CookieManagerInterface::class => static fn () => service('cookie'), - SessionInterface::class => static fn () => service('session'), - RendererInterface::class => static fn () => service('viewer')->getAdapter(), - \Psr\Container\ContainerInterface::class => static fn () => service('container'), - ResponseInterface::class => static fn () => service('response'), - ServerRequestInterface::class => static fn () => service('request'), - LoggerInterface::class => static fn () => service('logger'), - CacheInterface::class => static fn () => service('cache'), + CacheInterface::class => static fn () => service('cache'), + PsrCacheInterface::class => static fn () => service('cache'), + ContainerInterface::class => static fn () => service('container'), + PsrContainerInterface::class => static fn () => service('container'), + CookieManagerInterface::class => static fn () => service('cookie'), + EncrypterInterface::class => static fn () => service('encrypter'), + EventManagerInterface::class => static fn () => service('event'), + LocatorInterface::class => static fn () => service('locator'), + LoggerInterface::class => static fn () => service('logger'), + MailerInterface::class => static fn () => service('mail'), + RendererInterface::class => static fn () => service('viewer')->getAdapter(), + RepositoryInterface::class => static fn () => service('cache'), + ResponseInterface::class => static fn () => service('response'), + RouteCollectionInterface::class => static fn () => service('routes'), + ServerRequestInterface::class => static fn () => service('request'), + SessionInterface::class => static fn () => service('session'), ]; } From cfa7ae7033a5cf7deebdad8ddc0dea3393a33fa9 Mon Sep 17 00:00:00 2001 From: Dimitri Sitchet Tomkeu Date: Thu, 27 Aug 2026 17:58:50 +0100 Subject: [PATCH 2/3] =?UTF-8?q?fix(CLI):=20correction=20de=20la=20methode?= =?UTF-8?q?=20`justify`=20lorsque=20les=20couleurs=20sont=20utilis=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Cli/Console/Command.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cli/Console/Command.php b/src/Cli/Console/Command.php index 861b9dc6..b1d3d1a3 100644 --- a/src/Cli/Console/Command.php +++ b/src/Cli/Console/Command.php @@ -587,11 +587,11 @@ final public function justify(string $first, ?string $second = '', array $option 'sep' => (string) ($options['sep'] ?? '.'), ]; - if (preg_match('/(\\x1b(?:.+)m)/U', $first, $matches)) { + while (preg_match('/(\\x1b(?:.+)m)/U', $first, $matches)) { $first = str_replace($matches[1], '', $first); $first = preg_replace('/\\x1b\[0m/', '', $first); } - if (preg_match('/(\\x1b(?:.+)m)/U', $second, $matches)) { + while (preg_match('/(\\x1b(?:.+)m)/U', $second, $matches)) { $second = str_replace($matches[1], '', $second); $second = preg_replace('/\\x1b\[0m/', '', $second); } From 2a6dd38194367fb838b513fc34c74a08381ecb25 Mon Sep 17 00:00:00 2001 From: dimtrovich <37987162+dimtrovich@users.noreply.github.com> Date: Thu, 27 Aug 2026 17:22:04 +0000 Subject: [PATCH 3/3] Fix styling --- src/Cli/Console/Command.php | 5 +++-- src/Config/Providers.php | 32 ++++++++++++++++---------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/Cli/Console/Command.php b/src/Cli/Console/Command.php index b1d3d1a3..73e70997 100644 --- a/src/Cli/Console/Command.php +++ b/src/Cli/Console/Command.php @@ -587,11 +587,12 @@ final public function justify(string $first, ?string $second = '', array $option 'sep' => (string) ($options['sep'] ?? '.'), ]; - while (preg_match('/(\\x1b(?:.+)m)/U', $first, $matches)) { + while (preg_match('/(\\x1b(?:.+)m)/U', $first, $matches)) { $first = str_replace($matches[1], '', $first); $first = preg_replace('/\\x1b\[0m/', '', $first); } - while (preg_match('/(\\x1b(?:.+)m)/U', $second, $matches)) { + + while (preg_match('/(\\x1b(?:.+)m)/U', $second, $matches)) { $second = str_replace($matches[1], '', $second); $second = preg_replace('/\\x1b\[0m/', '', $second); } diff --git a/src/Config/Providers.php b/src/Config/Providers.php index b04c560a..e53c30f1 100644 --- a/src/Config/Providers.php +++ b/src/Config/Providers.php @@ -60,22 +60,22 @@ public static function definitions(): array private static function interfaces(): array { return [ - CacheInterface::class => static fn () => service('cache'), - PsrCacheInterface::class => static fn () => service('cache'), - ContainerInterface::class => static fn () => service('container'), - PsrContainerInterface::class => static fn () => service('container'), - CookieManagerInterface::class => static fn () => service('cookie'), - EncrypterInterface::class => static fn () => service('encrypter'), - EventManagerInterface::class => static fn () => service('event'), - LocatorInterface::class => static fn () => service('locator'), - LoggerInterface::class => static fn () => service('logger'), - MailerInterface::class => static fn () => service('mail'), - RendererInterface::class => static fn () => service('viewer')->getAdapter(), - RepositoryInterface::class => static fn () => service('cache'), - ResponseInterface::class => static fn () => service('response'), - RouteCollectionInterface::class => static fn () => service('routes'), - ServerRequestInterface::class => static fn () => service('request'), - SessionInterface::class => static fn () => service('session'), + CacheInterface::class => static fn () => service('cache'), + PsrCacheInterface::class => static fn () => service('cache'), + ContainerInterface::class => static fn () => service('container'), + PsrContainerInterface::class => static fn () => service('container'), + CookieManagerInterface::class => static fn () => service('cookie'), + EncrypterInterface::class => static fn () => service('encrypter'), + EventManagerInterface::class => static fn () => service('event'), + LocatorInterface::class => static fn () => service('locator'), + LoggerInterface::class => static fn () => service('logger'), + MailerInterface::class => static fn () => service('mail'), + RendererInterface::class => static fn () => service('viewer')->getAdapter(), + RepositoryInterface::class => static fn () => service('cache'), + ResponseInterface::class => static fn () => service('response'), + RouteCollectionInterface::class => static fn () => service('routes'), + ServerRequestInterface::class => static fn () => service('request'), + SessionInterface::class => static fn () => service('session'), ]; }