Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy #416

Merged
merged 31 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5961d93
chore: update workflows
kenjis Sep 29, 2023
2d0fe06
chore: update rector.php
kenjis Sep 29, 2023
734d4d3
chore: change TypedPropertyFromAssignsRector::INLINE_PUBLIC to false
kenjis Sep 29, 2023
18ac989
refactor: by rector
kenjis Sep 29, 2023
dd736a1
chore: update phpunit.yml
kenjis Sep 29, 2023
c47b3fe
chore: fix infection.yml
kenjis Sep 29, 2023
206f7b1
Merge pull request #404 from kenjis/update-github-workflows
kenjis Sep 29, 2023
2160655
chore(deps): bump knplabs/github-api from 3.11.0 to 3.12.0
dependabot[bot] Oct 2, 2023
1841309
fix github icon dark theme
Arhell Oct 3, 2023
5ed42c4
Merge pull request #407 from codeigniter4projects/git
lonnieezell Oct 4, 2023
9e2dcdf
Merge pull request #406 from codeigniter4projects/dependabot/composer…
lonnieezell Oct 4, 2023
7105b79
Update ci-theme.css
demyr17 Oct 8, 2023
d191c66
Update ci-responsive.css
demyr17 Oct 8, 2023
9e4f263
Merge pull request #408 from demyr17/develop
lonnieezell Oct 9, 2023
f9985bb
chore(deps): bump knplabs/github-api from 3.12.0 to 3.13.0
dependabot[bot] Nov 20, 2023
e6fc522
Merge pull request #411 from codeigniter4projects/dependabot/composer…
MGatner Nov 20, 2023
c2d699b
chore(deps): bump guzzlehttp/guzzle from 7.8.0 to 7.8.1
dependabot[bot] Dec 4, 2023
984a460
Merge pull request #412 from codeigniter4projects/dependabot/composer…
Arhell Dec 5, 2023
e1795f7
chore(deps): bump actions/cache from 3 to 4
dependabot[bot] Jan 18, 2024
71fae58
Merge pull request #414 from codeigniter4projects/dependabot/github_a…
Arhell Jan 21, 2024
10198f9
Patch framework (v4.4.1 => v4.4.4)
kenjis Jan 21, 2024
5b508dc
chore: require PHP ^8.1
kenjis Jan 21, 2024
a130c21
chore: composer update by PHP 8.1
kenjis Jan 21, 2024
8daa8f6
style: composer cs-fix
kenjis Jan 21, 2024
5fa8049
config: overwrite with latest Config files
kenjis Jan 21, 2024
be2846f
chore: update psalm_autoload.php
kenjis Jan 21, 2024
53ca28a
chore: add psalm baseline
kenjis Jan 21, 2024
c290908
chore: composer update by PHP 8.1
kenjis Jan 21, 2024
2f0669d
chore: update rector.php from devkit
kenjis Jan 21, 2024
3d5ff7a
refactor: replace empty()
kenjis Jan 21, 2024
7d8d48a
Merge pull request #415 from kenjis/update-ci-to-444
kenjis Jan 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 57 additions & 10 deletions .github/workflows/infection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,62 @@ on:
- 'composer.*'
- 'phpunit*'
- '.github/workflows/infection.yml'
push:
branches:
- develop
paths:
- '**.php'
- '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@v4
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 }}
52 changes: 50 additions & 2 deletions .github/workflows/phpcsfixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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@v4
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
63 changes: 61 additions & 2 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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@v4
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@v4
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
8 changes: 4 additions & 4 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,13 +39,13 @@ 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

- 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') }}
Expand All @@ -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: |
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -40,13 +48,13 @@ 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

- 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') }}
Expand All @@ -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
3 changes: 1 addition & 2 deletions app/Config/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ class App extends BaseConfig
* 'http://accounts.example.com/':
* ['media.example.com', 'accounts.example.com']
*
* @var string[]
* @phpstan-var list<string>
* @var list<string>
*/
public array $allowedHostnames = [];

Expand Down
8 changes: 3 additions & 5 deletions app/Config/Autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Autoload extends AutoloadConfig
* 'App' => APPPATH
* ];
*
* @var array<string, string>
* @var array<string, list<string>|string>
*/
public $psr4 = [
APP_NAMESPACE => APPPATH, // For custom app namespace
Expand Down Expand Up @@ -80,8 +80,7 @@ class Autoload extends AutoloadConfig
* '/path/to/my/file.php',
* ];
*
* @var string[]
* @phpstan-var list<string>
* @var list<string>
*/
public $files = [];

Expand All @@ -94,8 +93,7 @@ class Autoload extends AutoloadConfig
* 'form',
* ];
*
* @var string[]
* @phpstan-var list<string>
* @var list<string>
*/
public $helpers = [];
}
3 changes: 2 additions & 1 deletion app/Config/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Config;

use CodeIgniter\Cache\CacheInterface;
use CodeIgniter\Cache\Handlers\DummyHandler;
use CodeIgniter\Cache\Handlers\FileHandler;
use CodeIgniter\Cache\Handlers\MemcachedHandler;
Expand Down Expand Up @@ -156,7 +157,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<string, string>
* @var array<string, class-string<CacheInterface>>
*/
public array $validHandlers = [
'dummy' => DummyHandler::class,
Expand Down
2 changes: 1 addition & 1 deletion app/Config/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Email extends BaseConfig
public string $mailPath = '/usr/sbin/sendmail';

/**
* SMTP Server Address
* SMTP Server Hostname
*/
public string $SMTPHost = '';

Expand Down
7 changes: 3 additions & 4 deletions app/Config/Filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class Filters extends BaseConfig
* Configures aliases for Filter classes to
* make reading things nicer and simpler.
*
* @var array<string, string>
* @phpstan-var array<string, class-string>
* @var array<string, class-string|list<class-string>> [filter_name => classname]
* or [filter_name => [classname1, classname2, ...]]
*/
public array $aliases = [
'csrf' => CSRF::class,
Expand All @@ -30,8 +30,7 @@ class Filters extends BaseConfig
* List of filter aliases that are always
* applied before and after every request.
*
* @var array<string, array<string, array<string, string>>>|array<string, array<string>>
* @phpstan-var array<string, list<string>>|array<string, array<string, array<string, string>>>
* @var array<string, array<string, array<string, string>>>|array<string, list<string>>
*/
public array $globals = [
'before' => [
Expand Down
Loading
Loading