Skip to content

Commit 7e223f9

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.5
2 parents cdaee9d + 5bbf3af commit 7e223f9

File tree

12 files changed

+227
-66
lines changed

12 files changed

+227
-66
lines changed

.github/workflows/reusable-coveralls.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
3838
3939
- name: Cache dependencies
40-
uses: actions/cache@v3
40+
uses: actions/cache@v4
4141
with:
4242
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
4343
key: ${{ github.job }}-php-${{ inputs.php-version }}-${{ hashFiles('**/composer.*') }}
@@ -46,7 +46,7 @@ jobs:
4646
${{ github.job }}-
4747
4848
- name: Cache PHPUnit's static analysis cache
49-
uses: actions/cache@v3
49+
uses: actions/cache@v4
5050
with:
5151
path: build/.phpunit.cache/code-coverage
5252
key: phpunit-code-coverage-${{ hashFiles('**/phpunit.*') }}

.github/workflows/reusable-phpunit-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
echo "ARTIFACT_NAME=${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}-db-${{ inputs.db-platform || 'none' }}" >> $GITHUB_ENV
168168
169169
- name: Cache dependencies
170-
uses: actions/cache@v3
170+
uses: actions/cache@v4
171171
with:
172172
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
173173
key: ${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}-db-${{ inputs.db-platform || 'none' }}-${{ hashFiles('**/composer.*') }}
@@ -178,7 +178,7 @@ jobs:
178178
179179
- name: Cache PHPUnit's static analysis cache
180180
if: ${{ inputs.enable-artifact-upload }}
181-
uses: actions/cache@v3
181+
uses: actions/cache@v4
182182
with:
183183
path: build/.phpunit.cache/code-coverage
184184
key: phpunit-code-coverage-${{ hashFiles('**/phpunit.*') }}

.github/workflows/reusable-serviceless-phpunit-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
echo "ARTIFACT_NAME=${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}" >> $GITHUB_ENV
8080
8181
- name: Cache Composer dependencies
82-
uses: actions/cache@v3
82+
uses: actions/cache@v4
8383
with:
8484
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
8585
key: ${{ inputs.job-id || github.job }}-php-${{ inputs.php-version }}-${{ hashFiles('**/composer.*') }}
@@ -89,7 +89,7 @@ jobs:
8989
9090
- name: Cache PHPUnit's static analysis cache
9191
if: ${{ inputs.enable-artifact-upload }}
92-
uses: actions/cache@v3
92+
uses: actions/cache@v4
9393
with:
9494
path: build/.phpunit.cache/code-coverage
9595
key: phpunit-code-coverage-${{ hashFiles('**/phpunit.*') }}

.github/workflows/test-coding-standards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
4747

4848
- name: Cache dependencies
49-
uses: actions/cache@v3
49+
uses: actions/cache@v4
5050
with:
5151
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
5252
key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}

.github/workflows/test-deptrac.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
5454

5555
- name: Cache dependencies
56-
uses: actions/cache@v3
56+
uses: actions/cache@v4
5757
with:
5858
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
5959
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
@@ -63,7 +63,7 @@ jobs:
6363
run: mkdir -p build/
6464

6565
- name: Cache Deptrac results
66-
uses: actions/cache@v3
66+
uses: actions/cache@v4
6767
with:
6868
path: build
6969
key: ${{ runner.os }}-deptrac-${{ github.sha }}

.github/workflows/test-phpstan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
6464

6565
- name: Cache dependencies
66-
uses: actions/cache@v3
66+
uses: actions/cache@v4
6767
with:
6868
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
6969
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
@@ -73,7 +73,7 @@ jobs:
7373
run: mkdir -p build/phpstan
7474

7575
- name: Cache PHPStan result cache directory
76-
uses: actions/cache@v3
76+
uses: actions/cache@v4
7777
with:
7878
path: build/phpstan
7979
key: ${{ runner.os }}-phpstan-${{ github.sha }}

.github/workflows/test-psalm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
4545

4646
- name: Cache composer dependencies
47-
uses: actions/cache@v3
47+
uses: actions/cache@v4
4848
with:
4949
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
5050
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
@@ -54,7 +54,7 @@ jobs:
5454
run: mkdir -p build/psalm
5555

5656
- name: Cache Psalm results
57-
uses: actions/cache@v3
57+
uses: actions/cache@v4
5858
with:
5959
path: build/psalm
6060
key: ${{ runner.os }}-psalm-${{ github.sha }}

.github/workflows/test-rector.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
7272

7373
- name: Cache dependencies
74-
uses: actions/cache@v3
74+
uses: actions/cache@v4
7575
with:
7676
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
7777
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}

system/Database/OCI8/Forge.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ protected function _attributeType(array &$attributes)
256256
$attributes['TYPE'] = 'NUMBER';
257257
$attributes['CONSTRAINT'] = 1;
258258
$attributes['UNSIGNED'] = true;
259-
$attributes['NULL'] = false;
260259

261260
return;
262261

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* This file is part of CodeIgniter 4 framework.
7+
*
8+
* (c) CodeIgniter Foundation <admin@codeigniter.com>
9+
*
10+
* For the full copyright and license information, please view
11+
* the LICENSE file that was distributed with this source code.
12+
*/
13+
14+
namespace CodeIgniter\Database\Live;
15+
16+
use CodeIgniter\Database\BaseConnection;
17+
use CodeIgniter\Database\Forge;
18+
use CodeIgniter\Test\CIUnitTestCase;
19+
use Config\Database;
20+
21+
abstract class AbstractGetFieldDataTest extends CIUnitTestCase
22+
{
23+
/**
24+
* @var BaseConnection
25+
*/
26+
protected $db;
27+
28+
protected Forge $forge;
29+
30+
protected function setUp(): void
31+
{
32+
parent::setUp();
33+
34+
$this->db = Database::connect($this->DBGroup);
35+
36+
$this->createForge();
37+
$this->createTable();
38+
}
39+
40+
/**
41+
* Make sure that $db and $forge are instantiated.
42+
*/
43+
abstract protected function createForge(): void;
44+
45+
protected function tearDown(): void
46+
{
47+
parent::tearDown();
48+
49+
$this->forge->dropTable('test1', true);
50+
}
51+
52+
protected function createTable()
53+
{
54+
$this->forge->dropTable('test1', true);
55+
56+
$this->forge->addField([
57+
'id' => [
58+
'type' => 'INT',
59+
'auto_increment' => true,
60+
],
61+
'text_not_null' => [
62+
'type' => 'VARCHAR',
63+
'constraint' => 64,
64+
],
65+
'text_null' => [
66+
'type' => 'VARCHAR',
67+
'constraint' => 64,
68+
'null' => true,
69+
],
70+
'int_default_0' => [
71+
'type' => 'INT',
72+
'default' => 0,
73+
],
74+
'text_default_null' => [
75+
'type' => 'VARCHAR',
76+
'constraint' => 64,
77+
'default' => null,
78+
],
79+
'text_default_text_null' => [
80+
'type' => 'VARCHAR',
81+
'constraint' => 64,
82+
'default' => 'null',
83+
],
84+
'text_default_abc' => [
85+
'type' => 'VARCHAR',
86+
'constraint' => 64,
87+
'default' => 'abc',
88+
],
89+
]);
90+
$this->forge->addKey('id', true);
91+
$this->forge->createTable('test1');
92+
}
93+
94+
abstract public function testGetFieldData(): void;
95+
}

0 commit comments

Comments
 (0)