Skip to content

Commit 2bda38e

Browse files
authored
Merge pull request #7071 from codeigniter4/4.3
Merge 4.3 into develop
2 parents 558db23 + 2422ae1 commit 2bda38e

File tree

625 files changed

+20745
-6752
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

625 files changed

+20745
-6752
lines changed

.github/workflows/test-phpcpd.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,12 @@ jobs:
4646
extensions: dom, mbstring
4747

4848
- name: Detect code duplication
49-
run: phpcpd --exclude system/Test --exclude system/ThirdParty --exclude system/Database/SQLSRV/Builder.php --exclude system/Database/SQLSRV/Forge.php -- app/ public/ system/
49+
run: phpcpd
50+
--exclude system/Test
51+
--exclude system/ThirdParty
52+
--exclude system/Database/SQLSRV/Builder.php
53+
--exclude system/Database/SQLSRV/Forge.php
54+
--exclude system/Database/MySQLi/Builder.php
55+
--exclude system/Database/OCI8/Builder.php
56+
--exclude system/Database/Postgre/Builder.php
57+
-- app/ public/ system/

.github/workflows/test-psalm.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Psalm
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
- '4.*'
8+
paths:
9+
- '**.php'
10+
- 'composer.*'
11+
- 'psalm*'
12+
- '.github/workflows/test-psalm.yml'
13+
push:
14+
branches:
15+
- develop
16+
- '4.*'
17+
paths:
18+
- '**.php'
19+
- 'composer.*'
20+
- 'psalm*'
21+
- '.github/workflows/test-psalm.yml'
22+
23+
jobs:
24+
build:
25+
name: Psalm Analysis
26+
runs-on: ubuntu-latest
27+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v3
32+
33+
- name: Setup PHP
34+
uses: shivammathur/setup-php@v2
35+
with:
36+
php-version: '8.1'
37+
tools: phpstan, phpunit
38+
extensions: intl, json, mbstring, xml, oci8
39+
coverage: none
40+
env:
41+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Get composer cache directory
44+
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
45+
46+
- name: Cache composer dependencies
47+
uses: actions/cache@v3
48+
with:
49+
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
50+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
51+
restore-keys: ${{ runner.os }}-composer-
52+
53+
- name: Create Psalm cache directory
54+
run: mkdir -p build/psalm
55+
56+
- name: Cache Psalm results
57+
uses: actions/cache@v3
58+
with:
59+
path: build/psalm
60+
key: ${{ runner.os }}-psalm-${{ github.sha }}
61+
restore-keys: ${{ runner.os }}-psalm-
62+
63+
- name: Install dependencies
64+
run: |
65+
if [ -f composer.lock ]; then
66+
composer install --no-progress
67+
else
68+
composer update --no-progress
69+
fi
70+
71+
- name: Run Psalm analysis
72+
run: vendor/bin/psalm

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# CodeIgniter 4 Development
22

3-
[![Build Status](https://github.com/codeigniter4/CodeIgniter4/workflows/PHPUnit/badge.svg)](https://github.com/codeigniter4/CodeIgniter4/actions?query=workflow%3A%22PHPUnit%22)
3+
[![PHPUnit](https://github.com/codeigniter4/CodeIgniter4/workflows/PHPUnit/badge.svg)](https://github.com/codeigniter4/CodeIgniter4/actions/workflows/test-phpunit.yml)
4+
[![PHPStan](https://github.com/codeigniter4/CodeIgniter4/actions/workflows/test-phpstan.yml/badge.svg)](https://github.com/codeigniter4/CodeIgniter4/actions/workflows/test-phpstan.yml)
5+
[![Psalm](https://github.com/codeigniter4/CodeIgniter4/actions/workflows/test-psalm.yml/badge.svg)](https://github.com/codeigniter4/CodeIgniter4/actions/workflows/test-psalm.yml)
46
[![Coverage Status](https://coveralls.io/repos/github/codeigniter4/CodeIgniter4/badge.svg?branch=develop)](https://coveralls.io/github/codeigniter4/CodeIgniter4?branch=develop)
57
[![Downloads](https://poser.pugx.org/codeigniter4/framework/downloads)](https://packagist.org/packages/codeigniter4/framework)
68
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/codeigniter4/CodeIgniter4)](https://packagist.org/packages/codeigniter4/framework)

admin/framework/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
"ext-intl": "*",
1010
"ext-json": "*",
1111
"ext-mbstring": "*",
12-
"kint-php/kint": "^4.2",
1312
"laminas/laminas-escaper": "^2.9",
1413
"psr/log": "^1.1"
1514
},
1615
"require-dev": {
16+
"kint-php/kint": "^5.0.1",
1717
"codeigniter/coding-standard": "^1.5",
1818
"fakerphp/faker": "^1.9",
1919
"friendsofphp/php-cs-fixer": "3.13.0",

admin/starter/app/Config/Paths.php

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ class Paths
2222
*
2323
* This must contain the name of your "system" folder. Include
2424
* the path if the folder is not in the same directory as this file.
25-
*
26-
* @var string
2725
*/
28-
public $systemDirectory = __DIR__ . '/../../vendor/codeigniter4/framework/system';
26+
public string $systemDirectory = __DIR__ . '/../../vendor/codeigniter4/framework/system';
2927

3028
/**
3129
* ---------------------------------------------------------------
@@ -38,10 +36,8 @@ class Paths
3836
* you do, use a full server path.
3937
*
4038
* @see http://codeigniter.com/user_guide/general/managing_apps.html
41-
*
42-
* @var string
4339
*/
44-
public $appDirectory = __DIR__ . '/..';
40+
public string $appDirectory = __DIR__ . '/..';
4541

4642
/**
4743
* ---------------------------------------------------------------
@@ -53,21 +49,17 @@ class Paths
5349
* need write permission to a single place that can be tucked away
5450
* for maximum security, keeping it out of the app and/or
5551
* system directories.
56-
*
57-
* @var string
5852
*/
59-
public $writableDirectory = __DIR__ . '/../../writable';
53+
public string $writableDirectory = __DIR__ . '/../../writable';
6054

6155
/**
6256
* ---------------------------------------------------------------
6357
* TESTS DIRECTORY NAME
6458
* ---------------------------------------------------------------
6559
*
6660
* This variable must contain the name of your "tests" directory.
67-
*
68-
* @var string
6961
*/
70-
public $testsDirectory = __DIR__ . '/../../tests';
62+
public string $testsDirectory = __DIR__ . '/../../tests';
7163

7264
/**
7365
* ---------------------------------------------------------------
@@ -78,8 +70,6 @@ class Paths
7870
* contains the view files used by your application. By
7971
* default this is in `app/Views`. This value
8072
* is used when no value is provided to `Services::renderer()`.
81-
*
82-
* @var string
8373
*/
84-
public $viewDirectory = __DIR__ . '/../Views';
74+
public string $viewDirectory = __DIR__ . '/../Views';
8575
}

0 commit comments

Comments
 (0)