From 5961d93d9219aefad3bb533ab9a025d1db8edfec Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 29 Sep 2023 13:35:07 +0900 Subject: [PATCH 01/23] chore: update workflows Based on codeigniter4/.github --- .github/workflows/infection.yml | 8 ---- .github/workflows/phpcsfixer.yml | 52 +++++++++++++++++++++++++- .github/workflows/phpstan.yml | 63 +++++++++++++++++++++++++++++++- .github/workflows/phpunit.yml | 2 +- .github/workflows/rector.yml | 16 +++++--- 5 files changed, 123 insertions(+), 18 deletions(-) diff --git a/.github/workflows/infection.yml b/.github/workflows/infection.yml index 983dcbc..bc1d813 100644 --- a/.github/workflows/infection.yml +++ b/.github/workflows/infection.yml @@ -9,14 +9,6 @@ on: - 'composer.*' - 'phpunit*' - '.github/workflows/infection.yml' - push: - branches: - - develop - paths: - - '**.php' - - 'composer.*' - - 'phpunit*' - - '.github/workflows/infection.yml' jobs: infection: diff --git a/.github/workflows/phpcsfixer.yml b/.github/workflows/phpcsfixer.yml index ee1221a..1a9233b 100644 --- a/.github/workflows/phpcsfixer.yml +++ b/.github/workflows/phpcsfixer.yml @@ -13,7 +13,55 @@ on: paths: - '**.php' - '.github/workflows/phpcsfixer.yml' + workflow_call: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read jobs: - phpcsfixer: - uses: codeigniter4/.github/.github/workflows/phpcsfixer.yml@main + build: + name: PHP ${{ matrix.php-versions }} Coding Standards + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, '[ci skip]')" + strategy: + fail-fast: false + matrix: + php-versions: ['8.1'] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: json, tokenizer + coverage: none + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Get composer cache directory + run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV + + - name: Cache composer dependencies + uses: actions/cache@v3 + with: + path: ${{ env.COMPOSER_CACHE_FILES_DIR }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: | + if [ -f composer.lock ]; then + composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader + else + composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader + fi + + - name: Check code for standards compliance + run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --using-cache=no --diff diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 58e2add..ee06002 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -17,7 +17,66 @@ on: - 'composer.*' - 'phpstan*' - '.github/workflows/phpstan.yml' + workflow_call: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read jobs: - phpstan: - uses: codeigniter4/.github/.github/workflows/phpstan.yml@main + build: + name: PHP ${{ matrix.php-versions }} Static Analysis + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, '[ci skip]')" + strategy: + fail-fast: false + matrix: + php-versions: ['8.1'] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: phpstan, phpunit + extensions: intl, json, mbstring, xml + coverage: none + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Get composer cache directory + run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV + + - name: Cache composer dependencies + uses: actions/cache@v3 + with: + path: ${{ env.COMPOSER_CACHE_FILES_DIR }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Create PHPStan cache directory + run: mkdir -p build/phpstan + + - name: Cache PHPStan results + uses: actions/cache@v3 + with: + path: build/phpstan + key: ${{ runner.os }}-phpstan-${{ github.sha }} + restore-keys: ${{ runner.os }}-phpstan- + + - name: Install dependencies + run: | + if [ -f composer.lock ]; then + composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader + else + composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader + fi + + - name: Run static analysis + run: vendor/bin/phpstan analyze diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 490da8c..bf40445 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -25,7 +25,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[ci skip]')" strategy: matrix: - php-versions: ['7.4', '8.0', '8.1'] + php-versions: ['8.1'] steps: - name: Checkout diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 7759986..4662a9c 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -17,6 +17,14 @@ on: - 'composer.*' - 'rector.php' - '.github/workflows/rector.yml' + workflow_call: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read jobs: build: @@ -26,7 +34,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.4', '8.0', '8.1'] + php-versions: ['8.1'] steps: - name: Checkout @@ -40,7 +48,7 @@ jobs: extensions: intl, json, mbstring, xml coverage: none env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get composer cache directory run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV @@ -61,6 +69,4 @@ jobs: fi - name: Analyze for refactoring - run: | - composer global require --dev rector/rector:^0.15.1 - rector process --dry-run --no-progress-bar + run: vendor/bin/rector process --dry-run --no-progress-bar From 2d0fe06f885f394d61427996d2ea7331e02e00fc Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 29 Sep 2023 13:41:15 +0900 Subject: [PATCH 02/23] chore: update rector.php Copied from devkit. --- rector.php | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/rector.php b/rector.php index fa02e9e..2680794 100644 --- a/rector.php +++ b/rector.php @@ -1,11 +1,11 @@ sets([ SetList::DEAD_CODE, LevelSetList::UP_TO_PHP_74, - PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD, + PHPUnitSetList::PHPUNIT_CODE_QUALITY, PHPUnitSetList::PHPUNIT_100, ]); @@ -79,31 +78,14 @@ JsonThrowOnErrorRector::class, StringifyStrNeedlesRector::class, + YieldDataProviderRector::class, // Note: requires php 8 RemoveUnusedPromotedPropertyRector::class, AnnotationWithValueToAttributeRector::class, - // Ignore tests that might make calls without a result - RemoveEmptyMethodCallRector::class => [ - __DIR__ . '/tests', - ], - - // Ignore files that should not be namespaced to their folder - NormalizeNamespaceByPSR4ComposerAutoloadRector::class => [ - __DIR__ . '/app/Helpers', - ], - // May load view files directly when detecting classes StringClassNameToClassConstantRector::class, - - // May be uninitialized on purpose - AddDefaultValueForUndefinedVariableRector::class, - - // PHPStan will report false positive errors - UnnecessaryTernaryExpressionRector::class => [ - __DIR__ . '/app/Libraries/Blog.php', - ], ]); // auto import fully qualified class names @@ -112,7 +94,6 @@ $rectorConfig->rule(SimplifyUselessVariableRector::class); $rectorConfig->rule(RemoveAlwaysElseRector::class); $rectorConfig->rule(CountArrayToEmptyArrayComparisonRector::class); - $rectorConfig->rule(ForToForeachRector::class); $rectorConfig->rule(ChangeNestedForeachIfsToEarlyContinueRector::class); $rectorConfig->rule(ChangeIfElseValueAssignToEarlyReturnRector::class); $rectorConfig->rule(SimplifyStrposLowerRector::class); @@ -125,12 +106,18 @@ $rectorConfig->rule(UnusedForeachValueToArrayKeysRector::class); $rectorConfig->rule(ChangeArrayPushToArrayAssignRector::class); $rectorConfig->rule(UnnecessaryTernaryExpressionRector::class); - $rectorConfig->rule(AddPregQuoteDelimiterRector::class); $rectorConfig->rule(SimplifyRegexPatternRector::class); $rectorConfig->rule(FuncGetArgsToVariadicParamRector::class); $rectorConfig->rule(MakeInheritedMethodVisibilitySameAsParentRector::class); $rectorConfig->rule(SimplifyEmptyArrayCheckRector::class); - $rectorConfig->rule(NormalizeNamespaceByPSR4ComposerAutoloadRector::class); + $rectorConfig + ->ruleWithConfiguration(TypedPropertyFromAssignsRector::class, [ + /** + * The INLINE_PUBLIC value is default to false to avoid BC break, if you use for libraries and want to preserve BC break, you don't need to configure it, as it included in LevelSetList::UP_TO_PHP_74 + * Set to true for projects that allow BC break + */ + TypedPropertyFromAssignsRector::INLINE_PUBLIC => true, + ]); $rectorConfig->rule(StringClassNameToClassConstantRector::class); $rectorConfig->rule(PrivatizeFinalClassPropertyRector::class); $rectorConfig->rule(CompleteDynamicPropertiesRector::class); From 734d4d319544321c23bd1c291edb81e06e7c232e Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 29 Sep 2023 13:45:38 +0900 Subject: [PATCH 03/23] chore: change TypedPropertyFromAssignsRector::INLINE_PUBLIC to false --- rector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rector.php b/rector.php index 2680794..0fb460f 100644 --- a/rector.php +++ b/rector.php @@ -116,7 +116,7 @@ * The INLINE_PUBLIC value is default to false to avoid BC break, if you use for libraries and want to preserve BC break, you don't need to configure it, as it included in LevelSetList::UP_TO_PHP_74 * Set to true for projects that allow BC break */ - TypedPropertyFromAssignsRector::INLINE_PUBLIC => true, + TypedPropertyFromAssignsRector::INLINE_PUBLIC => false, ]); $rectorConfig->rule(StringClassNameToClassConstantRector::class); $rectorConfig->rule(PrivatizeFinalClassPropertyRector::class); From 18ac9898f4ea40b8a4ef138415ab73eec4cc0306 Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 29 Sep 2023 13:47:09 +0900 Subject: [PATCH 04/23] refactor: by rector --- app/Entities/GitHub/ReleasePromise.php | 4 +--- app/Libraries/Blog.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/Entities/GitHub/ReleasePromise.php b/app/Entities/GitHub/ReleasePromise.php index a3ee500..f91f2d1 100644 --- a/app/Entities/GitHub/ReleasePromise.php +++ b/app/Entities/GitHub/ReleasePromise.php @@ -25,10 +25,8 @@ class ReleasePromise extends Release /** * API call to fetch the additional data. - * - * @var Closure|null */ - private $resolver; + private ?Closure $resolver = null; /** * Stores the resolver along with data. diff --git a/app/Libraries/Blog.php b/app/Libraries/Blog.php index 39f424e..e455512 100644 --- a/app/Libraries/Blog.php +++ b/app/Libraries/Blog.php @@ -250,7 +250,7 @@ protected function readPost(string $folder, string $filename) foreach ($contents as $line) { if (trim($line) === '---') { - $inFrontMatter = $inFrontMatter ? false : true; + $inFrontMatter = ! $inFrontMatter; if (! $inFrontMatter) { $inBody = true; From dd736a1d629e31600e9372aec5400bea061c5126 Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 29 Sep 2023 13:53:15 +0900 Subject: [PATCH 05/23] chore: update phpunit.yml --- .github/workflows/phpunit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index bf40445..3bba810 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -39,7 +39,7 @@ jobs: extensions: intl, json, mbstring, gd, xdebug, xml, sqlite3 coverage: xdebug env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get composer cache directory run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV @@ -66,7 +66,7 @@ jobs: TACHYCARDIA_MONITOR_GA: enabled GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - if: matrix.php-versions == '8.0' + - if: matrix.php-versions == '8.1' name: Run Coveralls continue-on-error: true run: | From c47b3fe82d76d8e16ec61325719ea10e150d76f4 Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 29 Sep 2023 13:54:36 +0900 Subject: [PATCH 06/23] chore: fix infection.yml GITHUB_ACCESS_TOKEN is needed to run. --- .github/workflows/infection.yml | 59 +++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/.github/workflows/infection.yml b/.github/workflows/infection.yml index bc1d813..ee05ec1 100644 --- a/.github/workflows/infection.yml +++ b/.github/workflows/infection.yml @@ -9,7 +9,62 @@ on: - 'composer.*' - 'phpunit*' - '.github/workflows/infection.yml' + workflow_call: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read jobs: - infection: - uses: codeigniter4/.github/.github/workflows/infection.yml@main + main: + name: Mutation Testing + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, '[ci skip]')" + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + tools: infection, phpunit + extensions: intl, json, mbstring, gd, xml, sqlite3 + coverage: xdebug + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up problem matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Configure matchers + uses: mheap/phpunit-matcher-action@v1 + + - name: Get composer cache directory + run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV + + - name: Cache composer dependencies + uses: actions/cache@v3 + with: + path: ${{ env.COMPOSER_CACHE_FILES_DIR }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: | + if [ -f composer.lock ]; then + composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader + else + composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader + fi + + - name: Run Infection for added files only + run: | + git fetch --depth=1 origin $GITHUB_BASE_REF + infection --threads=max --git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF --ignore-msi-with-no-mutations --only-covered --logger-github + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 21606553bd1450526b1c3af5cc8a8b27549b6f44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 11:23:02 +0000 Subject: [PATCH 07/23] chore(deps): bump knplabs/github-api from 3.11.0 to 3.12.0 Bumps [knplabs/github-api](https://github.com/KnpLabs/php-github-api) from 3.11.0 to 3.12.0. - [Release notes](https://github.com/KnpLabs/php-github-api/releases) - [Changelog](https://github.com/KnpLabs/php-github-api/blob/master/CHANGELOG-3.X.md) - [Commits](https://github.com/KnpLabs/php-github-api/compare/v3.11.0...v3.12.0) --- updated-dependencies: - dependency-name: knplabs/github-api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/composer.lock b/composer.lock index 8d1f0ff..d5b855e 100644 --- a/composer.lock +++ b/composer.lock @@ -675,16 +675,16 @@ }, { "name": "knplabs/github-api", - "version": "v3.11.0", + "version": "v3.12.0", "source": { "type": "git", "url": "https://github.com/KnpLabs/php-github-api.git", - "reference": "c68b874ac3267c3cc0544b726dbb4e49a72a9920" + "reference": "b50fc1f40bb5ac50957d32c5732fcde9167ac30a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/c68b874ac3267c3cc0544b726dbb4e49a72a9920", - "reference": "c68b874ac3267c3cc0544b726dbb4e49a72a9920", + "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/b50fc1f40bb5ac50957d32c5732fcde9167ac30a", + "reference": "b50fc1f40bb5ac50957d32c5732fcde9167ac30a", "shasum": "" }, "require": { @@ -698,7 +698,7 @@ "psr/cache": "^1.0|^2.0|^3.0", "psr/http-client-implementation": "^1.0", "psr/http-factory-implementation": "^1.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.0|^2.0", "symfony/deprecation-contracts": "^2.2|^3.0", "symfony/polyfill-php80": "^1.17" }, @@ -718,7 +718,7 @@ "extra": { "branch-alias": { "dev-2.x": "2.20.x-dev", - "dev-master": "3.10.x-dev" + "dev-master": "3.11.x-dev" } }, "autoload": { @@ -751,7 +751,7 @@ ], "support": { "issues": "https://github.com/KnpLabs/php-github-api/issues", - "source": "https://github.com/KnpLabs/php-github-api/tree/v3.11.0" + "source": "https://github.com/KnpLabs/php-github-api/tree/v3.12.0" }, "funding": [ { @@ -759,7 +759,7 @@ "type": "github" } ], - "time": "2023-03-10T11:40:14+00:00" + "time": "2023-09-30T16:42:04+00:00" }, { "name": "laminas/laminas-escaper", @@ -1910,16 +1910,16 @@ }, { "name": "psr/http-message", - "version": "1.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { @@ -1928,7 +1928,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1943,7 +1943,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -1957,9 +1957,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/log", From 1841309831bce88107b9fea2e20af0861fc4e3a0 Mon Sep 17 00:00:00 2001 From: Arhell Date: Wed, 4 Oct 2023 00:17:36 +0300 Subject: [PATCH 08/23] fix github icon dark theme --- public/assets/css/ci-theme.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/assets/css/ci-theme.css b/public/assets/css/ci-theme.css index 928f552..03500d3 100644 --- a/public/assets/css/ci-theme.css +++ b/public/assets/css/ci-theme.css @@ -1795,10 +1795,12 @@ html.dark-theme a.slogan-link:hover { html.dark-theme #github-scores { color: rgba(255, 255, 255, 0.5); } -html.dark-theme .github-icon svg { +html.dark-theme .github-icon svg, +html.dark-theme .github-icon svg path { fill: #fff; } + html.dark-theme .githubs:hover .github-data { color: #fff; } From 7105b7967a871d0e56530d5df543647c94649fed Mon Sep 17 00:00:00 2001 From: demyr17 <61029105+demyr17@users.noreply.github.com> Date: Sun, 8 Oct 2023 18:31:15 +0300 Subject: [PATCH 09/23] Update ci-theme.css --- public/assets/css/ci-theme.css | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/public/assets/css/ci-theme.css b/public/assets/css/ci-theme.css index 03500d3..6dfc161 100644 --- a/public/assets/css/ci-theme.css +++ b/public/assets/css/ci-theme.css @@ -707,7 +707,7 @@ section.content-outer { .ci-features-box-icon svg { width: 51px; height: 59px; - fill: var(--primary-color); + fill: transparent; /*var(--primary-color);*/ stroke: var(--primary-color); } @@ -751,7 +751,7 @@ section.content-outer { color: var(--primary-color); } .ci-features-box:hover .ci-features-box-icon svg { - fill: var(--primary-color); + fill: rgba(221, 72, 20, 0.8); /*var(--primary-color);*/ stroke: var(--primary-color); } @@ -1663,6 +1663,10 @@ html.dark-theme a:hover { color: rgba(221, 72, 20, 1); } +html.dark-theme .dark { + color: rgba(255, 255, 255, 0.5); +} + /* HEADER =================================================================== */ html.dark-theme header { @@ -1679,8 +1683,8 @@ html.dark-theme #top-menu { html.dark-theme #menu-toggle button, html.dark-theme #menu-toggle button:hover, html.dark-theme #menu-toggle button:focus { - background-color: #000000; - color: #333333; + background-color: var(--primary-color);/*#000000;*/ + color: rgba(255, 255, 255, 0.8);/*#333333;*/ font-size: 1.3rem; } From d191c66e09e9e313c756426009477cac217f73f5 Mon Sep 17 00:00:00 2001 From: demyr17 <61029105+demyr17@users.noreply.github.com> Date: Sun, 8 Oct 2023 18:31:34 +0300 Subject: [PATCH 10/23] Update ci-responsive.css --- public/assets/css/ci-responsive.css | 31 +++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/public/assets/css/ci-responsive.css b/public/assets/css/ci-responsive.css index 52f4750..6559aec 100644 --- a/public/assets/css/ci-responsive.css +++ b/public/assets/css/ci-responsive.css @@ -98,10 +98,15 @@ height: 180px; padding: 10px; box-sizing: border-box; - border: 1px solid var(--white); + border: 1px solid rgba(255, 255, 255, 0.2);/*var(--white);*/ margin: 18px 10px 0 10px; transition: box-shadow 0.5s; - transition: margin-top 0.5s; + transition: margin-top 0.3s; + transition: border 0.3s; + } + .ci-features-box:hover { + border: 1px solid rgba(255, 255, 255, 0.5);/*var(--white);*/ + margin: 18px 10px 0 10px; } .ci-features-box-icon { @@ -265,10 +270,15 @@ height: 190px; padding: 10px; box-sizing: border-box; - border: 1px solid var(--white); + border: 1px solid rgba(255, 255, 255, 0.2);/*var(--white);*/ margin: 18px 10px 0 10px; transition: box-shadow 0.5s; - transition: margin-top 0.5s; + transition: margin-top 0.3s; + transition: border 0.3s; + } + .ci-features-box:hover { + border: 1px solid rgba(255, 255, 255, 0.5);/*var(--white);*/ + margin: 18px 10px 0 10px; } footer#footer-outer { @@ -411,19 +421,19 @@ width: 90%; text-decoration: none; color: #434343; - font-weight: 300; + font-weight: 400; height: 30px; margin: 0; padding: 20px 15px 0 15px; text-align: center; - border-bottom: 1px solid var(--soft-white); + border-bottom: 1px solid rgba(255, 255, 255, 0.3);/*var(--soft-white);*/ } a.top-menu-item:hover, a.top-menu-item:focus { color: var(--primary-color); border-bottom: 1px solid var(--primary-color); - background: #fbf6f4; + /*background: #fbf6f4;*/ } a.top-menu-item-active:link, @@ -638,10 +648,15 @@ height: 180px; padding: 10px; box-sizing: border-box; - border: 1px solid var(--white); + border: 1px solid rgba(255, 255, 255, 0.2);/*var(--white);*/ margin: 18px 10px 0 10px; transition: box-shadow 0.5s; transition: margin-top 0.3s; + transition: border 0.3s; + } + .ci-features-box:hover { + border: 1px solid rgba(255, 255, 255, 0.5);/*var(--white);*/ + margin: 18px 10px 0 10px; } footer#footer-outer { From f9985bbad269b41a3c8a96f44dcd64a6d9b511e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 11:20:29 +0000 Subject: [PATCH 11/23] chore(deps): bump knplabs/github-api from 3.12.0 to 3.13.0 Bumps [knplabs/github-api](https://github.com/KnpLabs/php-github-api) from 3.12.0 to 3.13.0. - [Release notes](https://github.com/KnpLabs/php-github-api/releases) - [Changelog](https://github.com/KnpLabs/php-github-api/blob/master/CHANGELOG-3.X.md) - [Commits](https://github.com/KnpLabs/php-github-api/compare/v3.12.0...v3.13.0) --- updated-dependencies: - dependency-name: knplabs/github-api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/composer.lock b/composer.lock index d5b855e..100b7cc 100644 --- a/composer.lock +++ b/composer.lock @@ -675,16 +675,16 @@ }, { "name": "knplabs/github-api", - "version": "v3.12.0", + "version": "v3.13.0", "source": { "type": "git", "url": "https://github.com/KnpLabs/php-github-api.git", - "reference": "b50fc1f40bb5ac50957d32c5732fcde9167ac30a" + "reference": "47024f3483520c0fafdfc5c10d2a20d87b4c7ceb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/b50fc1f40bb5ac50957d32c5732fcde9167ac30a", - "reference": "b50fc1f40bb5ac50957d32c5732fcde9167ac30a", + "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/47024f3483520c0fafdfc5c10d2a20d87b4c7ceb", + "reference": "47024f3483520c0fafdfc5c10d2a20d87b4c7ceb", "shasum": "" }, "require": { @@ -718,7 +718,7 @@ "extra": { "branch-alias": { "dev-2.x": "2.20.x-dev", - "dev-master": "3.11.x-dev" + "dev-master": "3.12-dev" } }, "autoload": { @@ -751,7 +751,7 @@ ], "support": { "issues": "https://github.com/KnpLabs/php-github-api/issues", - "source": "https://github.com/KnpLabs/php-github-api/tree/v3.12.0" + "source": "https://github.com/KnpLabs/php-github-api/tree/v3.13.0" }, "funding": [ { @@ -759,7 +759,7 @@ "type": "github" } ], - "time": "2023-09-30T16:42:04+00:00" + "time": "2023-11-19T21:08:19+00:00" }, { "name": "laminas/laminas-escaper", @@ -1599,31 +1599,26 @@ }, { "name": "php-http/promise", - "version": "1.1.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/php-http/promise.git", - "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88" + "reference": "44a67cb59f708f826f3bec35f22030b3edb90119" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/promise/zipball/4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", - "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", + "url": "https://api.github.com/repos/php-http/promise/zipball/44a67cb59f708f826f3bec35f22030b3edb90119", + "reference": "44a67cb59f708f826f3bec35f22030b3edb90119", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "friends-of-phpspec/phpspec-code-coverage": "^4.3.2", - "phpspec/phpspec": "^5.1.2 || ^6.2" + "friends-of-phpspec/phpspec-code-coverage": "^4.3.2 || ^6.3", + "phpspec/phpspec": "^5.1.2 || ^6.2 || ^7.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, "autoload": { "psr-4": { "Http\\Promise\\": "src/" @@ -1650,9 +1645,9 @@ ], "support": { "issues": "https://github.com/php-http/promise/issues", - "source": "https://github.com/php-http/promise/tree/1.1.0" + "source": "https://github.com/php-http/promise/tree/1.2.1" }, - "time": "2020-07-07T09:29:14+00:00" + "time": "2023-11-08T12:57:08+00:00" }, { "name": "psr/cache", @@ -2108,7 +2103,7 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -2155,7 +2150,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -7732,5 +7727,5 @@ "php": "^7.4 || ^8.0" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } From c2d699b0e0d1cbc488bd84dc20361eb6205a6757 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 11:19:10 +0000 Subject: [PATCH 12/23] chore(deps): bump guzzlehttp/guzzle from 7.8.0 to 7.8.1 Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.8.0 to 7.8.1. - [Release notes](https://github.com/guzzle/guzzle/releases) - [Changelog](https://github.com/guzzle/guzzle/blob/7.8/CHANGELOG.md) - [Commits](https://github.com/guzzle/guzzle/compare/7.8.0...7.8.1) --- updated-dependencies: - dependency-name: guzzlehttp/guzzle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/composer.lock b/composer.lock index 100b7cc..6c53900 100644 --- a/composer.lock +++ b/composer.lock @@ -292,16 +292,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.8.0", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9" + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", "shasum": "" }, "require": { @@ -316,11 +316,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -398,7 +398,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.0" + "source": "https://github.com/guzzle/guzzle/tree/7.8.1" }, "funding": [ { @@ -414,28 +414,28 @@ "type": "tidelift" } ], - "time": "2023-08-27T10:20:53+00:00" + "time": "2023-12-03T20:35:24+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "type": "library", "extra": { @@ -481,7 +481,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.1" + "source": "https://github.com/guzzle/promises/tree/2.0.2" }, "funding": [ { @@ -497,20 +497,20 @@ "type": "tidelift" } ], - "time": "2023-08-03T15:11:55+00:00" + "time": "2023-12-03T20:19:20+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.1", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727" + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", "shasum": "" }, "require": { @@ -524,9 +524,9 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -597,7 +597,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.1" + "source": "https://github.com/guzzle/psr7/tree/2.6.2" }, "funding": [ { @@ -613,7 +613,7 @@ "type": "tidelift" } ], - "time": "2023-08-27T10:13:57+00:00" + "time": "2023-12-03T20:05:35+00:00" }, { "name": "http-interop/http-factory-guzzle", From e1795f7e4631191f38230cd1a215a1f09df8e269 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 11:08:20 +0000 Subject: [PATCH 13/23] chore(deps): bump actions/cache from 3 to 4 Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/infection.yml | 2 +- .github/workflows/phpcsfixer.yml | 2 +- .github/workflows/phpstan.yml | 4 ++-- .github/workflows/phpunit.yml | 2 +- .github/workflows/rector.yml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/infection.yml b/.github/workflows/infection.yml index ee05ec1..e7d0993 100644 --- a/.github/workflows/infection.yml +++ b/.github/workflows/infection.yml @@ -48,7 +48,7 @@ jobs: run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.COMPOSER_CACHE_FILES_DIR }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/phpcsfixer.yml b/.github/workflows/phpcsfixer.yml index 1a9233b..79e5ecb 100644 --- a/.github/workflows/phpcsfixer.yml +++ b/.github/workflows/phpcsfixer.yml @@ -49,7 +49,7 @@ jobs: run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.COMPOSER_CACHE_FILES_DIR }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index ee06002..9ff74c7 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -54,7 +54,7 @@ jobs: run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.COMPOSER_CACHE_FILES_DIR }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }} @@ -64,7 +64,7 @@ jobs: run: mkdir -p build/phpstan - name: Cache PHPStan results - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: build/phpstan key: ${{ runner.os }}-phpstan-${{ github.sha }} diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 3bba810..11f7fcc 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -45,7 +45,7 @@ jobs: run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.COMPOSER_CACHE_FILES_DIR }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 4662a9c..59518cf 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -54,7 +54,7 @@ jobs: run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.COMPOSER_CACHE_FILES_DIR }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }} From 10198f96e92fd1ce41feb6462604da32b4880851 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sun, 21 Jan 2024 14:10:22 +0900 Subject: [PATCH 14/23] Patch framework (v4.4.1 => v4.4.4) Conflicts: Config/Boot/development.php Config/Boot/production.php Config/Boot/testing.php app/Config/Autoload.php app/Config/Cache.php app/Config/Kint.php app/Config/View.php --- app/Config/App.php | 3 +-- app/Config/Autoload.php | 8 +++--- app/Config/Cache.php | 2 +- app/Config/Email.php | 2 +- app/Config/Filters.php | 7 +++--- app/Config/Kint.php | 9 ++++++- app/Config/Migrations.php | 4 +-- app/Config/Modules.php | 4 +-- app/Config/Publisher.php | 2 +- app/Config/Session.php | 2 +- app/Config/View.php | 10 +++++--- app/Views/errors/cli/error_exception.php | 17 ++++++++++--- app/Views/errors/html/error_404.php | 2 +- app/Views/errors/html/error_exception.php | 30 +++++++++++++++++++++-- env | 2 +- spark | 2 +- 16 files changed, 73 insertions(+), 33 deletions(-) diff --git a/app/Config/App.php b/app/Config/App.php index 3c6fb8e..17a7d65 100644 --- a/app/Config/App.php +++ b/app/Config/App.php @@ -27,8 +27,7 @@ class App extends BaseConfig * 'http://accounts.example.com/': * ['media.example.com', 'accounts.example.com'] * - * @var string[] - * @phpstan-var list + * @var list */ public array $allowedHostnames = []; diff --git a/app/Config/Autoload.php b/app/Config/Autoload.php index fbe8d5e..647b5ee 100644 --- a/app/Config/Autoload.php +++ b/app/Config/Autoload.php @@ -41,7 +41,7 @@ class Autoload extends AutoloadConfig * 'App' => APPPATH * ]; * - * @var array + * @var array|string> */ public $psr4 = [ APP_NAMESPACE => APPPATH, // For custom app namespace @@ -80,8 +80,7 @@ class Autoload extends AutoloadConfig * '/path/to/my/file.php', * ]; * - * @var string[] - * @phpstan-var list + * @var list */ public $files = []; @@ -94,8 +93,7 @@ class Autoload extends AutoloadConfig * 'form', * ]; * - * @var string[] - * @phpstan-var list + * @var list */ public $helpers = []; } diff --git a/app/Config/Cache.php b/app/Config/Cache.php index 659d9ed..3c519de 100644 --- a/app/Config/Cache.php +++ b/app/Config/Cache.php @@ -156,7 +156,7 @@ class Cache extends BaseConfig * This is an array of cache engine alias' and class names. Only engines * that are listed here are allowed to be used. * - * @var array + * @var array> */ public array $validHandlers = [ 'dummy' => DummyHandler::class, diff --git a/app/Config/Email.php b/app/Config/Email.php index 01b805a..4dce650 100644 --- a/app/Config/Email.php +++ b/app/Config/Email.php @@ -26,7 +26,7 @@ class Email extends BaseConfig public string $mailPath = '/usr/sbin/sendmail'; /** - * SMTP Server Address + * SMTP Server Hostname */ public string $SMTPHost = ''; diff --git a/app/Config/Filters.php b/app/Config/Filters.php index 6860077..4c3aae8 100644 --- a/app/Config/Filters.php +++ b/app/Config/Filters.php @@ -15,8 +15,8 @@ class Filters extends BaseConfig * Configures aliases for Filter classes to * make reading things nicer and simpler. * - * @var array - * @phpstan-var array + * @var array> [filter_name => classname] + * or [filter_name => [classname1, classname2, ...]] */ public array $aliases = [ 'csrf' => CSRF::class, @@ -30,8 +30,7 @@ class Filters extends BaseConfig * List of filter aliases that are always * applied before and after every request. * - * @var array>>|array> - * @phpstan-var array>|array>> + * @var array>>|array> */ public array $globals = [ 'before' => [ diff --git a/app/Config/Kint.php b/app/Config/Kint.php index c7b570c..4a7ea01 100644 --- a/app/Config/Kint.php +++ b/app/Config/Kint.php @@ -23,6 +23,9 @@ class Kint extends BaseConfig |-------------------------------------------------------------------------- */ + /** + * @var list|ConstructablePluginInterface>|null + */ public $plugins; public int $maxDepth = 6; public bool $displayCalledFrom = true; @@ -37,11 +40,15 @@ class Kint extends BaseConfig public bool $richFolder = false; /** - * @psalm-suppress UndefinedClass + * @var array>|null */ public int $richSort = AbstractRenderer::SORT_FULL; public $richObjectPlugins; + + /** + * @var array>|null + */ public $richTabPlugins; /* diff --git a/app/Config/Migrations.php b/app/Config/Migrations.php index af28e8e..ee3d89d 100644 --- a/app/Config/Migrations.php +++ b/app/Config/Migrations.php @@ -25,9 +25,7 @@ class Migrations extends BaseConfig * * This is the name of the table that will store the current migrations state. * When migrations runs it will store in a database table which migration - * level the system is at. It then compares the migration level in this - * table to the $config['migration_version'] if they are not the same it - * will migrate up. This must be set. + * files have already been run. */ public string $table = 'migrations'; diff --git a/app/Config/Modules.php b/app/Config/Modules.php index f84580c..8d4bf56 100644 --- a/app/Config/Modules.php +++ b/app/Config/Modules.php @@ -58,7 +58,7 @@ class Modules extends BaseModules * ], * ] * - * @var array + * @var array{only?: list, exclude?: list} */ public $composerPackages = []; @@ -72,7 +72,7 @@ class Modules extends BaseModules * * If it is not listed, only the base application elements will be used. * - * @var string[] + * @var list */ public $aliases = [ 'events', diff --git a/app/Config/Publisher.php b/app/Config/Publisher.php index 4747511..bf03be1 100644 --- a/app/Config/Publisher.php +++ b/app/Config/Publisher.php @@ -19,7 +19,7 @@ class Publisher extends BasePublisher * result in a PublisherException. Files that do no fit the * pattern will cause copy/merge to fail. * - * @var array + * @var array */ public $restrictions = [ ROOTPATH => '*', diff --git a/app/Config/Session.php b/app/Config/Session.php index ea83480..e077df6 100644 --- a/app/Config/Session.php +++ b/app/Config/Session.php @@ -19,7 +19,7 @@ class Session extends BaseConfig * - `CodeIgniter\Session\Handlers\MemcachedHandler` * - `CodeIgniter\Session\Handlers\RedisHandler` * - * @phpstan-var class-string + * @var class-string */ public string $driver = FileHandler::class; diff --git a/app/Config/View.php b/app/Config/View.php index c6bc069..cf00863 100644 --- a/app/Config/View.php +++ b/app/Config/View.php @@ -5,6 +5,10 @@ use CodeIgniter\Config\View as BaseView; use CodeIgniter\View\ViewDecoratorInterface; +/** + * @phpstan-type ParserCallable (callable(mixed): mixed) + * @phpstan-type ParserCallableString (callable(mixed): mixed)&string + */ class View extends BaseView { /** @@ -31,7 +35,7 @@ class View extends BaseView * { created_on|date(Y-m-d)|esc(attr) } * * @var array - * @phpstan-var array + * @phpstan-var array */ public $filters = []; @@ -40,8 +44,8 @@ class View extends BaseView * by the core Parser by creating aliases that will be replaced with * any callable. Can be single or tag pair. * - * @var array - * @phpstan-var array + * @var array|callable|string> + * @phpstan-var array|ParserCallableString|ParserCallable> */ public $plugins = []; diff --git a/app/Views/errors/cli/error_exception.php b/app/Views/errors/cli/error_exception.php index f24e98f..98d83b0 100644 --- a/app/Views/errors/cli/error_exception.php +++ b/app/Views/errors/cli/error_exception.php @@ -3,17 +3,26 @@ use CodeIgniter\CLI\CLI; // The main Exception -CLI::newLine(); CLI::write('[' . get_class($exception) . ']', 'light_gray', 'red'); -CLI::newLine(); CLI::write($message); -CLI::newLine(); CLI::write('at ' . CLI::color(clean_path($exception->getFile()) . ':' . $exception->getLine(), 'green')); CLI::newLine(); +$last = $exception; + +while ($prevException = $last->getPrevious()) { + $last = $prevException; + + CLI::write(' Caused by:'); + CLI::write(' [' . get_class($prevException) . ']', 'red'); + CLI::write(' ' . $prevException->getMessage()); + CLI::write(' at ' . CLI::color(clean_path($prevException->getFile()) . ':' . $prevException->getLine(), 'green')); + CLI::newLine(); +} + // The backtrace if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE) { - $backtraces = $exception->getTrace(); + $backtraces = $last->getTrace(); if ($backtraces) { CLI::write('Backtrace:', 'green'); diff --git a/app/Views/errors/html/error_404.php b/app/Views/errors/html/error_404.php index c301013..e506f08 100644 --- a/app/Views/errors/html/error_404.php +++ b/app/Views/errors/html/error_404.php @@ -77,7 +77,7 @@ - +

diff --git a/app/Views/errors/html/error_exception.php b/app/Views/errors/html/error_exception.php index f311d91..406b48e 100644 --- a/app/Views/errors/html/error_exception.php +++ b/app/Views/errors/html/error_exception.php @@ -44,6 +44,30 @@ +
+ getPrevious()) { + $last = $prevException; + ?> + +
+    Caused by:
+    getCode() ? ' #' . $prevException->getCode() : '') ?>
+
+    getMessage())) ?>
+    getMessage())) ?>"
+       rel="noreferrer" target="_blank">search →
+    getFile()) . ':' . $prevException->getLine()) ?>
+    
+ + +
+ +
    @@ -66,7 +90,7 @@
  • - +

+