Skip to content

Commit

Permalink
Merge branch 'dev-5' into dev-#2773
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Oct 9, 2023
2 parents dac78cd + 75afa7c commit c800c80
Show file tree
Hide file tree
Showing 130 changed files with 1,949 additions and 1,537 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
* @license https://basercms.net/license/index.html MIT License
*/

namespace BaserCore\Middleware;
namespace Middleware;

use BaserCore\Middleware\Configure;
use BaserCore\Middleware\View;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
Expand Down
222 changes: 112 additions & 110 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# In development .env files are parsed by PHP
# and set into the environment. This provides a simpler
# development workflow over standard environment variables.
export APP_NAME="ucmitz"
export APP_NAME="baserCMS"
export DEBUG="false"
export APP_ENCODING="UTF-8"
export APP_DEFAULT_LOCALE="ja_JP"
Expand Down
561 changes: 475 additions & 86 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "ucmitz",
"name": "basercms",
"version": "2.0.0",
"description": "Project to migrate baserCMS to CakePHP4",
"description": "baserCMS Project",
"author": "NPO baser foundation",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/baserproject/ucmitz.git"
"url": "git+https://github.com/baserproject/basercms.git"
},
"bugs": {
"url": "https://github.com/baserproject/ucmitz/issues"
"url": "https://github.com/baserproject/basercms/issues"
},
"homepage": "https://github.com/baserproject/ucmitz#readme",
"homepage": "https://github.com/baserproject/basercms#readme",
"workspaces": [
"plugins/bc-admin-third",
"plugins/bc-front",
Expand Down
10 changes: 0 additions & 10 deletions phpstan.neon

This file was deleted.

7 changes: 5 additions & 2 deletions plugins/baser-core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,18 @@
"baserproject/bc-uploader": "^5.1",
"baserproject/bc-widget-area": "^5.1",
"imo-tikuwa/cakephp-soft-delete": "^2.0",
"ext-mbstring": "*"
"ext-mbstring": "*",
"ext-zip": "*",
"ext-gd": "*"
},
"require-dev": {
"cakephp/bake": "^2.6",
"cakephp/debug_kit": "^4.5",
"phpunit/phpunit": "^9.5",
"symplify/monorepo-builder": "^10.2",
"vierge-noire/cakephp-fixture-factories": "^2.5",
"vierge-noire/cakephp-test-suite-light": "^2.0"
"vierge-noire/cakephp-test-suite-light": "^2.0",
"ext-xdebug": "*"
},
"autoload": {
"psr-4": {
Expand Down
20 changes: 17 additions & 3 deletions plugins/baser-core/src/BcPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ public function initialize(): void
/**
* bootstrap
*
* @param PluginApplicationInterface $application
* @param PluginApplicationInterface $app
* @checked
* @noTodo
*/
public function bootstrap(PluginApplicationInterface $application): void
public function bootstrap(PluginApplicationInterface $app): void
{
$pluginPath = BcUtil::getPluginPath($this->name);
if (file_exists($pluginPath . 'config' . DS . 'setting.php')) {
Expand All @@ -86,7 +88,7 @@ public function bootstrap(PluginApplicationInterface $application): void
}
// 親の bootstrap は、setting の読み込みの後でなければならない
// bootstrap 内で、setting の値を参照する場合があるため
parent::bootstrap($application);
parent::bootstrap($app);
}

/**
Expand Down Expand Up @@ -149,6 +151,8 @@ public function install($options = []): bool
* マイグレーションを実行する
*
* @param array $options
* @checked
* @noTodo
*/
public function migrate($options = [])
{
Expand All @@ -163,6 +167,8 @@ public function migrate($options = [])

/**
* アップデートプログラムを実行する
* @checked
* @noTodo
*/
public function execUpdater()
{
Expand Down Expand Up @@ -437,6 +443,8 @@ public function routes(RouteBuilder $routes): void
* @param RouteBuilder $routes
* @param string $plugin
* @return RouteBuilder
* @checked
* @noTodo
*/
public function contentsRoutingForReverse(RouteBuilder $routes, string $plugin)
{
Expand All @@ -463,6 +471,8 @@ function(RouteBuilder $routes) {
* @param RouteBuilder $routes
* @param string $plugin
* @return RouteBuilder
* @checked
* @noTodo
*/
public function frontPageRouting(RouteBuilder $routes, string $plugin)
{
Expand All @@ -488,6 +498,8 @@ function(RouteBuilder $routes) {
* @param RouteBuilder $routes
* @param string $plugin
* @return RouteBuilder
* @checked
* @noTodo
*/
public function prefixRouting(RouteBuilder $routes, string $plugin)
{
Expand Down Expand Up @@ -535,6 +547,8 @@ function(RouteBuilder $routes) use($isApi) {
* @param RouteBuilder $routes
* @param string $plugin
* @return RouteBuilder
* @checked
* @noTodo
*/
public function siteRouting(RouteBuilder $routes, string $plugin)
{
Expand Down
7 changes: 7 additions & 0 deletions plugins/baser-core/src/Command/ComposerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use Cake\Console\Arguments;
use Cake\Console\ConsoleIo;
use Psr\Log\LogLevel;
use BaserCore\Annotation\UnitTest;
use BaserCore\Annotation\NoTodo;
use BaserCore\Annotation\Checked;

/**
* ComposerCommand
Expand All @@ -28,6 +31,8 @@ class ComposerCommand extends Command
*
* @param \Cake\Console\ConsoleOptionParser $parser
* @return \Cake\Console\ConsoleOptionParser
* @checked
* @noTodo
*/
protected function buildOptionParser(\Cake\Console\ConsoleOptionParser $parser): \Cake\Console\ConsoleOptionParser
{
Expand All @@ -49,6 +54,8 @@ protected function buildOptionParser(\Cake\Console\ConsoleOptionParser $parser):
* @param Arguments $args
* @param ConsoleIo $io
* @return int|void|null
* @checked
* @noTodo
*/
public function execute(Arguments $args, ConsoleIo $io)
{
Expand Down
14 changes: 14 additions & 0 deletions plugins/baser-core/src/Command/CreateReleaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class CreateReleaseCommand extends Command
*
* @param \Cake\Console\ConsoleOptionParser $parser
* @return \Cake\Console\ConsoleOptionParser
* @checked
* @noTodo
*/
protected function buildOptionParser(\Cake\Console\ConsoleOptionParser $parser): \Cake\Console\ConsoleOptionParser
{
Expand All @@ -50,6 +52,8 @@ protected function buildOptionParser(\Cake\Console\ConsoleOptionParser $parser):
* @param Arguments $args
* @param ConsoleIo $io
* @return int|void|null
* @checked
* @noTodo
*/
public function execute(Arguments $args, ConsoleIo $io)
{
Expand Down Expand Up @@ -89,6 +93,8 @@ public function execute(Arguments $args, ConsoleIo $io)
* composer.json を配布用にセットアップする
*
* @param string $packagePath
* @checked
* @noTodo
*/
public function setupComposer(string $packagePath)
{
Expand All @@ -108,6 +114,8 @@ public function setupComposer(string $packagePath)
* パッケージを GitHub よりクローンする
*
* @param string $packagePath
* @checked
* @noTodo
*/
public function clonePackage(string $packagePath, string $branch)
{
Expand All @@ -122,6 +130,8 @@ public function clonePackage(string $packagePath, string $branch)
*
* インストール時、 composer で vendor に配置するため
* @param string $packagePath
* @checked
* @noTodo
*/
public function deletePlugins(string $packagePath)
{
Expand All @@ -139,6 +149,8 @@ public function deletePlugins(string $packagePath)
* Zip ファイルに固める
*
* @param string $packagePath
* @checked
* @noTodo
*/
public function createZip(string $packagePath)
{
Expand All @@ -154,6 +166,8 @@ public function createZip(string $packagePath)
* 配布用に不要なファイルを削除する
*
* @param string $packagePath
* @checked
* @noTodo
*/
public function deleteExcludeFiles(string $packagePath)
{
Expand Down
5 changes: 5 additions & 0 deletions plugins/baser-core/src/Command/SetupInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Cake\Console\Arguments;
use Cake\Console\ConsoleIo;
use Cake\Filesystem\Folder;
use BaserCore\Annotation\UnitTest;
use BaserCore\Annotation\NoTodo;
use BaserCore\Annotation\Checked;

/**
* SetupInstallCommand
Expand All @@ -35,6 +38,8 @@ class SetupInstallCommand extends Command
* @param Arguments $args
* @param ConsoleIo $io
* @return int|void|null
* @checked
* @noTodo
*/
public function execute(Arguments $args, ConsoleIo $io)
{
Expand Down
5 changes: 5 additions & 0 deletions plugins/baser-core/src/Command/SetupTestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use Cake\Command\Command;
use Cake\Console\Arguments;
use Cake\Console\ConsoleIo;
use BaserCore\Annotation\UnitTest;
use BaserCore\Annotation\NoTodo;
use BaserCore\Annotation\Checked;

/**
* SetupTestCommand
Expand All @@ -34,6 +37,8 @@ class SetupTestCommand extends Command
* @param Arguments $args
* @param ConsoleIo $io
* @return int|void|null
* @checked
* @noTodo
*/
public function execute(Arguments $args, ConsoleIo $io)
{
Expand Down
4 changes: 4 additions & 0 deletions plugins/baser-core/src/Command/UpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class UpdateCommand extends Command
*
* @param \Cake\Console\ConsoleOptionParser $parser
* @return \Cake\Console\ConsoleOptionParser
* @checked
* @noTodo
*/
protected function buildOptionParser(\Cake\Console\ConsoleOptionParser $parser): \Cake\Console\ConsoleOptionParser
{
Expand All @@ -53,6 +55,8 @@ protected function buildOptionParser(\Cake\Console\ConsoleOptionParser $parser):
* @param Arguments $args
* @param ConsoleIo $io
* @return int|void|null
* @checked
* @noTodo
*/
public function execute(Arguments $args, ConsoleIo $io)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public function initialize(): void
* Before Filter
* @param EventInterface $event
* @return Response|void|null
* @checked
* @noTodo
*/
public function beforeFilter(EventInterface $event)
{
Expand Down Expand Up @@ -107,6 +109,8 @@ public function beforeRender(EventInterface $event): void
* 初回アクセスメッセージ用のフラグを更新する
*
* @return void
* @checked
* @noTodo
*/
private function __updateFirstAccess()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ public function isAdminApiEnabled()
* ない場合は、 true を返却する
*
* @return bool
* @noTodo
* @checked
*/
public function isAvailableUser(): bool
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ public function index(ContentsServiceInterface $service)
*
* @param ContentsService $service
* @return void
* @checked
* @noTodo
*/
public function index_trash(ContentsServiceInterface $service)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class JwksController extends BcAdminApiController

/**
* Initialize
* @checked
* @noTodo
*/
public function initialize(): void
{
Expand All @@ -37,6 +39,8 @@ public function initialize(): void
*
* # PHPでの検証コード例
* JWT::decode($jwt, JWK::parseKeySet($keys), [Configure::read('Jwt.algorithm')])
* @checked
* @noTodo
*/
public function index()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,8 @@ public function batch(PluginsServiceInterface $service)
* 取得可能なコアのバージョン情報を取得
*
* @param PluginsServiceInterface $service
* @checked
* @noTodo
*/
public function get_available_core_version_info(PluginsServiceInterface $service)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public function view(SiteConfigsServiceInterface $service) {
/**
* システム基本設定を編集する
* @param SiteConfigsServiceInterface $service
* @checked
* @noTodo
*/
public function edit(SiteConfigsServiceInterface $service)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public function copy(ThemesServiceInterface $service, $theme)
* [API] テーマの初期データを読み込むAPIを実装
* @param ThemesServiceInterface $service
* @noTodo
* @checked
*/
public function load_default_data(ThemesServiceInterface $service)
{
Expand Down
2 changes: 2 additions & 0 deletions plugins/baser-core/src/Controller/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ public function beforeFilter(EventInterface $event)
* 現在アクセスしているURLについて権限があるかどうかを確認する。
*
* @return bool
* @noTodo
* @checked
*/
private function checkPermission()
{
Expand Down

0 comments on commit c800c80

Please sign in to comment.