From 3e50a4bfe3eb1212c54f4b69a66faf843e22e1ee Mon Sep 17 00:00:00 2001 From: Maxim Smakouz Date: Tue, 22 Aug 2023 17:53:03 +0300 Subject: [PATCH 1/3] Add readme for Cycle Bridge, DataGrid bridge --- installer/Module/CycleBridge/Package.php | 24 +++++++++++++++------ installer/Module/DataGridBridge/Package.php | 18 ++++++++++++---- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/installer/Module/CycleBridge/Package.php b/installer/Module/CycleBridge/Package.php index d5fcca3..dc16332 100644 --- a/installer/Module/CycleBridge/Package.php +++ b/installer/Module/CycleBridge/Package.php @@ -7,6 +7,8 @@ use Installer\Application\ComposerPackages; use Installer\Internal\Generator\GeneratorInterface; use Installer\Internal\Package as BasePackage; +use Installer\Internal\Readme\Block\ListBlock; +use Installer\Internal\Readme\Section; use Installer\Module\CycleBridge\Generator\Bootloaders; use Installer\Module\CycleBridge\Generator\Config; use Installer\Module\CycleBridge\Generator\Env; @@ -30,13 +32,21 @@ public function __construct( new Env(), new Skeleton(), ], - array $instructions = [ - 'Database configuration file: app/config/database.php', - 'Migrations configuration file: app/config/migration.php', - 'Cycle ORM configuration file: app/config/cycle.php', - 'Documentation: https://spiral.dev/docs/basics-orm', - ], ) { - parent::__construct(ComposerPackages::CycleBridge, $resources, $generators, $instructions); + parent::__construct(ComposerPackages::CycleBridge, $resources, $generators); + } + + public function getReadme(): array + { + return [ + Section::Configuration->value => [ + new ListBlock([ + 'Database configuration file: `app/config/database.php`', + 'Migrations configuration file: `app/config/migration.php`', + 'Cycle ORM configuration file: `app/config/cycle.php`', + 'Documentation: `https://spiral.dev/docs/basics-orm`' + ], $this->getTitle()) + ], + ]; } } diff --git a/installer/Module/DataGridBridge/Package.php b/installer/Module/DataGridBridge/Package.php index 1121f97..0eb771f 100644 --- a/installer/Module/DataGridBridge/Package.php +++ b/installer/Module/DataGridBridge/Package.php @@ -7,6 +7,8 @@ use Installer\Application\ComposerPackages; use Installer\Internal\Generator\GeneratorInterface; use Installer\Internal\Package as BasePackage; +use Installer\Internal\Readme\Block\ListBlock; +use Installer\Internal\Readme\Section; use Installer\Module\DataGridBridge\Generator\Bootloaders; use Installer\Module\DataGridBridge\Generator\Interceptors; @@ -21,10 +23,18 @@ public function __construct( new Bootloaders(), new Interceptors(), ], - array $instructions = [ - 'Documentation: https://spiral.dev/docs/component-data-grid', - ], ) { - parent::__construct(ComposerPackages::DataGridBridge, $resources, $generators, $instructions); + parent::__construct(ComposerPackages::DataGridBridge, $resources, $generators); + } + + public function getReadme(): array + { + return [ + Section::Configuration->value => [ + new ListBlock([ + 'Documentation: `https://spiral.dev/docs/component-data-grid`', + ], $this->getTitle()) + ], + ]; } } From 533fe18402c9c49f44c3fcd8ebc05288ea54765e Mon Sep 17 00:00:00 2001 From: Maxim Smakouz Date: Tue, 22 Aug 2023 17:55:16 +0300 Subject: [PATCH 2/3] Fix CS --- installer/Module/CycleBridge/Package.php | 2 +- installer/Module/DataGridBridge/Package.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/Module/CycleBridge/Package.php b/installer/Module/CycleBridge/Package.php index dc16332..e8b8d15 100644 --- a/installer/Module/CycleBridge/Package.php +++ b/installer/Module/CycleBridge/Package.php @@ -45,7 +45,7 @@ public function getReadme(): array 'Migrations configuration file: `app/config/migration.php`', 'Cycle ORM configuration file: `app/config/cycle.php`', 'Documentation: `https://spiral.dev/docs/basics-orm`' - ], $this->getTitle()) + ], $this->getTitle()), ], ]; } diff --git a/installer/Module/DataGridBridge/Package.php b/installer/Module/DataGridBridge/Package.php index 0eb771f..231f2c9 100644 --- a/installer/Module/DataGridBridge/Package.php +++ b/installer/Module/DataGridBridge/Package.php @@ -33,7 +33,7 @@ public function getReadme(): array Section::Configuration->value => [ new ListBlock([ 'Documentation: `https://spiral.dev/docs/component-data-grid`', - ], $this->getTitle()) + ], $this->getTitle()), ], ]; } From e8c6a707f9833d64452f460b5b78265f308109f9 Mon Sep 17 00:00:00 2001 From: Maxim Smakouz Date: Tue, 22 Aug 2023 17:55:49 +0300 Subject: [PATCH 3/3] Fix CS --- installer/Module/CycleBridge/Package.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/Module/CycleBridge/Package.php b/installer/Module/CycleBridge/Package.php index e8b8d15..097d18b 100644 --- a/installer/Module/CycleBridge/Package.php +++ b/installer/Module/CycleBridge/Package.php @@ -44,7 +44,7 @@ public function getReadme(): array 'Database configuration file: `app/config/database.php`', 'Migrations configuration file: `app/config/migration.php`', 'Cycle ORM configuration file: `app/config/cycle.php`', - 'Documentation: `https://spiral.dev/docs/basics-orm`' + 'Documentation: `https://spiral.dev/docs/basics-orm`', ], $this->getTitle()), ], ];