Skip to content

Add Upsert/UpsertBatch to builder #6294

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

Closed
wants to merge 169 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
baa8ed5
add language strings to error_404.php
sba Jul 23, 2022
b36d1b0
add language strings for error_404.php
sba Jul 23, 2022
d6eb12f
make error_404.php design same as production.php
sba Jul 23, 2022
d398c18
do not show error message twice
sba Jul 23, 2022
1919d07
Merge branch 'codeigniter4:4.3' into 4.3
sba Jul 26, 2022
e1995a7
Undo style changes, translation only.
sba Jul 30, 2022
898c756
test: add tests for Token Randomization in Cookie CSRF
kenjis Jul 31, 2022
4466c88
test: fix setUp()
kenjis Jul 31, 2022
333290d
refactor: remove $_COOKIE
kenjis Jul 31, 2022
06f4ceb
refactor: move `if`
kenjis Jul 31, 2022
e056312
refactor: extract restoreHash() method
kenjis Jul 31, 2022
0184261
refactor: generateHash() always generate new hash
kenjis Jul 31, 2022
f4c1fa4
refactor: extract removeTokenInRequest() method
kenjis Jul 31, 2022
2b890fe
docs: add doc comments
kenjis Jul 31, 2022
bf7c6bc
Add Timer method record for callables
rumpfc Jul 31, 2022
ba1cc5c
Code fixes
rumpfc Jul 31, 2022
22194d0
Changelogs and user guide
rumpfc Jul 31, 2022
3dbcc7f
CS-Fixer changes
rumpfc Jul 31, 2022
838995b
Fixed CS-Fixer style issues
rumpfc Jul 31, 2022
a47411b
Unit test fixes for v7, added more new lines
rumpfc Jul 31, 2022
9603cea
Further CS-Fixer changes
rumpfc Jul 31, 2022
95524d8
fix: OCI8 uses deprecated Entity
kenjis Aug 1, 2022
d3562d1
docs: remove git intatllation
kenjis Jul 30, 2022
ed4b80d
docs: fix description
kenjis Aug 1, 2022
d9dfeb7
docs: fix section titles
kenjis Aug 1, 2022
c746b49
docs: fix title underlines
kenjis Aug 1, 2022
b8c3ff0
docs: add initial configuration
kenjis Aug 1, 2022
5417518
docs: add section title
kenjis Aug 1, 2022
22a9ac7
docs: change section title
kenjis Aug 1, 2022
0ef2bec
docs: change note position
kenjis Aug 1, 2022
71da808
docs: add property name
kenjis Aug 1, 2022
1d641a5
docs: add note about baseURL and debug toolbar
kenjis Aug 1, 2022
0e70ccd
Merge pull request #6323 from kenjis/fix-OCI8-Entity
samsonasik Aug 1, 2022
6ac3a7b
fix: move PHP version check to index.php/spark
kenjis Aug 1, 2022
20487a6
docs: fix by proofreading
kenjis Aug 1, 2022
170d84a
Merge pull request #6318 from kenjis/fix-docs-remove-install-git
kenjis Aug 1, 2022
6636a3e
camelCase language vars
sba Aug 1, 2022
7f2c79c
camelCase language vars
sba Aug 1, 2022
de315fa
Code style
sba Aug 1, 2022
66d271c
Changes according to Reviews
rumpfc Aug 1, 2022
70e5e64
Merge branch '4.3' into feature-timer-record-callable
rumpfc Aug 1, 2022
7adabf7
Add Upsert/UpsertBatch to builder
sclubricants Jul 24, 2022
dbb5c64
refactor insertBatch() and setInsertBatch()
sclubricants Jul 25, 2022
e7453dc
Added documentation and change log
sclubricants Jul 27, 2022
000dd38
fixes from kenjis review
sclubricants Jul 29, 2022
ab86890
fixes kenjis review 2
sclubricants Jul 29, 2022
efb9579
Update system/Database/BaseBuilder.php
sclubricants Aug 1, 2022
8da1421
Update system/Database/BaseBuilder.php
sclubricants Aug 1, 2022
ba8ca6e
Merge pull request #6320 from kenjis/remove-superglobal-from-Security
kenjis Aug 1, 2022
26a30d7
added return value tests
sclubricants Aug 1, 2022
61d580c
docs: fix link to wrong page
kenjis Aug 2, 2022
56b360a
docs: fix by proofreading
kenjis Aug 2, 2022
b93cbed
docs: fix by proofreading
kenjis Aug 2, 2022
9974df1
docs: fix by proofreading
kenjis Aug 2, 2022
be61a5d
Improved unit tests, style and docu
rumpfc Aug 2, 2022
6e0ed39
Merge pull request #6328 from kenjis/fix-docs-update-changelog-v4.0.4…
samsonasik Aug 2, 2022
b953462
remove $value from setBatch()
sclubricants Aug 2, 2022
c2ae683
fix line spacing
sclubricants Aug 2, 2022
b5d5591
reduced sleep time in unit tests
rumpfc Aug 2, 2022
68cdb6e
docs: improve explanations
kenjis Aug 2, 2022
4df89ed
Merge pull request #6324 from kenjis/fix-docs-installation
kenjis Aug 2, 2022
d6ec6f1
Merge pull request #6288 from sba/4.3
kenjis Aug 2, 2022
d190434
fix: 404 page may display Exception message in production environment
kenjis Aug 2, 2022
8fb0e7e
refactor: remove unused '(null)'
kenjis Aug 2, 2022
6536f5c
feat: add StreamWrapper for php protocol
kenjis Aug 3, 2022
e311426
feat: make CLI::input() testable
kenjis Aug 3, 2022
d787fe6
test: add test for CLI::prompt()
kenjis Aug 3, 2022
e7a2712
Merge remote-tracking branch 'upstream/develop' into 4.3
kenjis Aug 3, 2022
71edcc9
Merge pull request #6327 from kenjis/fix-php-version-check
kenjis Aug 3, 2022
a47dfb6
chore(deps-dev): update rector/rector requirement from 0.13.9 to 0.13.10
dependabot[bot] Aug 3, 2022
c638e0f
re-run rector with enable RemoveDeadZeroAndOneOperationRector
samsonasik Aug 3, 2022
0e598d1
re-run rector with enable RemoveAlwaysTrueIfConditionRector with skip…
samsonasik Aug 3, 2022
d8c7a4b
use array check
samsonasik Aug 3, 2022
3b39f26
use array check
samsonasik Aug 3, 2022
0a032d1
Merge branch '4.3' into feature-timer-record-callable
rumpfc Aug 3, 2022
5512618
Removed whitespaces in blank line
rumpfc Aug 3, 2022
5901d10
Merge remote-tracking branch 'upstream/develop' into 4.3
kenjis Aug 4, 2022
f313732
feat: add HTTPExceptionInterface and ExitExceptionInterface
kenjis Jul 4, 2022
85b4e67
fix: incorrect HTTP status code or Exit code may return
kenjis Jul 4, 2022
eff6b99
feat: rename ExitExceptionInterface and add getExitCode()
kenjis Jul 24, 2022
cb1b570
docs: add user guide
kenjis Aug 4, 2022
f67736f
Merge pull request #6331 from kenjis/fix-docs-QB-getCompiled
kenjis Aug 4, 2022
8b77bf2
Merge pull request #6333 from kenjis/fix-error_404
kenjis Aug 4, 2022
d840ee2
Merge pull request #6338 from codeigniter4/dependabot/composer/rector…
samsonasik Aug 4, 2022
20056d0
docs: add user guide
kenjis Aug 3, 2022
c4cefdb
refactor: make PhpStreamWrapper final
kenjis Aug 4, 2022
ecda636
chore: add ext for suggest
kenjis Aug 1, 2022
681a9c7
fix: random_string('crypto') may return string less than $len or Erro…
kenjis Aug 3, 2022
b55b3e7
docs: add user guide
kenjis Aug 4, 2022
2bf7753
docs: add explanation about stream wrapper
kenjis Aug 4, 2022
7676ba2
docs: fix types in PHPDocs
kenjis Jul 29, 2022
a0ababf
docs: fix @return
kenjis Aug 4, 2022
d6cd7b1
docs: add int to @param $id
kenjis Aug 4, 2022
237e5da
Merge pull request #6334 from kenjis/fix-random_string-crypto
kenjis Aug 4, 2022
c0b9928
Merge pull request #6311 from kenjis/fix-type-RESTful-controllers
kenjis Aug 4, 2022
9a0ad26
PHP version specific test
rumpfc Aug 4, 2022
4a122f3
Fixed CS
rumpfc Aug 4, 2022
0eab5af
docs: fix by proofreading
kenjis Aug 5, 2022
815cfd8
docs: fix by proofreading
kenjis Aug 5, 2022
c09628c
docs: fix by proofreading
kenjis Aug 5, 2022
a2df8da
docs: fix by proofreading
kenjis Aug 5, 2022
d4bc0fa
docs: fix by proofreading
kenjis Aug 5, 2022
9a2a0ce
docs: fix by proofreading
kenjis Aug 5, 2022
6d81280
Merge pull request #6335 from kenjis/feat-CLI-input-testable
kenjis Aug 5, 2022
b410ca7
chore: update Kint to 4.1.4 in ThirdParty
kenjis Aug 5, 2022
313d7d3
docs: fix PHPDocs related to Model::insert()
kenjis Aug 5, 2022
b6840cd
Merge pull request #6321 from rumpfc/feature-timer-record-callable
MGatner Aug 5, 2022
d7dcdf2
Merge pull request #6343 from kenjis/fix-docs-model-insert
MGatner Aug 5, 2022
ec1e6d1
Merge pull request #6342 from kenjis/update-kint
MGatner Aug 5, 2022
8e02dbc
Merge pull request #6322 from kenjis/add-suggest-ext
MGatner Aug 5, 2022
13d6e36
Prep for 4.2.2 release
MGatner Aug 5, 2022
fb52378
Merge pull request #6344 from codeigniter4/release-4.2.2
MGatner Aug 5, 2022
26b247d
Merge pull request #6345 from codeigniter4/develop
MGatner Aug 5, 2022
d94e054
Merge branch 'develop' into 4.3
MGatner Aug 5, 2022
b5ea1c9
docs: fix Content Changes
kenjis Aug 5, 2022
4441fd1
feat: add public method to regenerate CSRF token
kenjis Jul 28, 2022
23d71d6
docs: add changelog and note
kenjis Aug 1, 2022
f1db96b
docs: the session_id acquisition method that is not described
naente Aug 6, 2022
8275327
Merge pull request #6347 from kenjis/fix-docs-upgrade_422.rst
samsonasik Aug 6, 2022
9bdd9f5
Merge pull request #6228 from kenjis/fix-exceptionHandler-statusCode
kenjis Aug 6, 2022
4632602
Merge pull request from GHSA-6gch-wjxj-hc2w
MGatner Aug 6, 2022
cb71f73
Prep for 4.2.3 release
MGatner Aug 6, 2022
01dac95
Merge pull request #6349 from naente/develop
MGatner Aug 6, 2022
1be14e7
Update CHANGELOG.md
MGatner Aug 6, 2022
d77883e
Merge pull request #6353 from codeigniter4/release-4.2.3
MGatner Aug 7, 2022
9c0c695
Merge pull request #6354 from codeigniter4/develop
MGatner Aug 7, 2022
0a23584
Merge branch 'develop' into 4.3
MGatner Aug 7, 2022
68ad806
docs: add @property to Session
kenjis Aug 7, 2022
55f3c23
docs: add Prefious and Next button
kenjis Aug 7, 2022
dc84e94
docs: add upgrade_423 in upgrading.rst
kenjis Aug 7, 2022
ab6aa3c
docs: remove space
kenjis Aug 7, 2022
a42651b
docs: add missing command prompt
kenjis Aug 7, 2022
b2aac31
docs: remove out-of-dated? description
kenjis Aug 7, 2022
d75dabd
docs: remove `--prefer-source`
kenjis Aug 7, 2022
fa50250
docs: improve description
kenjis Aug 7, 2022
d8fe98d
Merge pull request #6355 from kenjis/phpdocs-add-property-to-Session
samsonasik Aug 7, 2022
b667425
docs: remove unused directories in Structure
kenjis Aug 7, 2022
db1833a
docs: add missing tests directory
kenjis Aug 7, 2022
d0f0881
docs: remove `two`
kenjis Aug 7, 2022
23a18eb
Merge pull request #6356 from kenjis/fix-docs-upgrade_423.rst
kenjis Aug 7, 2022
776926f
chore: convert warning into error
kenjis Aug 8, 2022
b471880
docs: refactor sample code
kenjis Aug 8, 2022
09bcef4
chore: tweak options
kenjis Aug 8, 2022
cb33c36
fixes
sclubricants Aug 8, 2022
2da8ef8
Merge pull request #6357 from kenjis/fix-docs-installing_composer.rst
kenjis Aug 9, 2022
899187a
feat: add IntBoolCast for Entity
kenjis Aug 6, 2022
076a542
refactor: change cast handler name to `int-bool`
kenjis Aug 9, 2022
dd077aa
docs: add user guide
kenjis Aug 9, 2022
d4b0483
docs: fix @param type
kenjis Aug 9, 2022
6d51b2c
fix: Email class may not log an error when it fails to send
kenjis Aug 9, 2022
4511b3f
docs: improve explanation
kenjis Aug 9, 2022
cf662be
docs: add missing deprecation
kenjis Aug 9, 2022
1086703
Merge pull request #6359 from kenjis/make-sphinx-warning-to-error
kenjis Aug 9, 2022
4fdffaa
Merge pull request #6363 from kenjis/fix-docs-Forge-createTable
kenjis Aug 10, 2022
9204889
Merge pull request #6362 from kenjis/fix-email-logging
kenjis Aug 10, 2022
4649b0a
Merge pull request #6348 from kenjis/feat-int-bool-cast
kenjis Aug 10, 2022
c82cbd6
Merge remote-tracking branch 'upstream/develop' into 4.3
kenjis Aug 10, 2022
d36e0fb
Add Upsert/UpsertBatch to builder
sclubricants Jul 24, 2022
2e6f25a
refactor insertBatch() and setInsertBatch()
sclubricants Jul 25, 2022
290a8e2
Added documentation and change log
sclubricants Jul 27, 2022
0be866a
fixes from kenjis review
sclubricants Jul 29, 2022
9bb80ef
fixes kenjis review 2
sclubricants Jul 29, 2022
3a27020
Update system/Database/BaseBuilder.php
sclubricants Aug 1, 2022
0bdcd75
Update system/Database/BaseBuilder.php
sclubricants Aug 1, 2022
61a64de
added return value tests
sclubricants Aug 1, 2022
a4b33ce
remove $value from setBatch()
sclubricants Aug 2, 2022
2c4c2ce
fix line spacing
sclubricants Aug 2, 2022
8d841fe
fixes
sclubricants Aug 8, 2022
bbd609e
Merge branch 'UpsertUpsertBatch' of https://github.com/sclubricants/C…
sclubricants Aug 10, 2022
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
1 change: 1 addition & 0 deletions .github/workflows/test-userguide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ jobs:
- uses: ammaraskar/[email protected]
with:
docs-folder: user_guide_src
build-command: 'make html SPHINXOPTS="-W --keep-going -w /tmp/sphinx-log"'
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,64 @@
# Changelog

## [v4.2.3](https://github.com/codeigniter4/CodeIgniter4/tree/v4.2.3) (2022-08-06)
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.2...v4.2.3)

* SECURITY: Improve CSRF protection (for Shield CSRF security fix)

## [v4.2.2](https://github.com/codeigniter4/CodeIgniter4/tree/v4.2.2) (2022-08-05)
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.1...v4.2.2)

### Breaking Changes
* fix: when running on CLI, two Request objects were used in the system by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6089
* fix: Builder insert()/update() does not accept an object by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6216
* fix: create table if not exists when indexes already exist by @sclubricants in https://github.com/codeigniter4/CodeIgniter4/pull/6249
* fix: page cache saves Response data before running after filters by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6282
* fix: random_string('crypto') may return string less than $len or ErrorException by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6334

### Fixed Bugs
* Fixed: BaseBuilder increment/decrement do not reset state after a query by @iRedds in https://github.com/codeigniter4/CodeIgniter4/pull/6146
* fix: SQLite3\Connection\getIndexData() error by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6152
* fix: `is_image` causes PHP 8.1 deprecated error by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6157
* fix: prepared query is executed when using QueryBuilder by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6164
* fix: Time::getAge() calculation by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6159
* fix: Session cookies are sent twice with Ajax by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6167
* fix: QueryBuilder breaks select when escape is false by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/5118
* fix: PHPDoc return type in ControllerTestTrait methods by @iRedds in https://github.com/codeigniter4/CodeIgniter4/pull/6168
* fix: `$routes->group('/', ...)` creates the route `foo///bar` by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6186
* fix: use lang('HTTP.pageNotFound') on production 404 page by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6202
* fix: BaseConnection may create dynamic property by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6198
* fix: Email SMTP may throw Uncaught ErrorException by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6184
* fix: CSP reportOnly behavior by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6201
* fix: lang() causes Error on CLI by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6209
* fix: multiple pagers with models do not work by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6211
* fix: tweak empty line output of `spark db:table` by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6215
* fix: custom validation error is cleared when calling setRule() twice by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6241
* Fix: Validation of fields with a leading asterisk. by @iRedds in https://github.com/codeigniter4/CodeIgniter4/pull/6243
* fix: Call to undefined method CodeIgniter\Pager\PagerRenderer::getDetails() by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6251
* fix: exceptionHandler may cause HTTPException: Unknown HTTP status code by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6254
* fix: invalid INSERT/DELETE query when Query Builder uses table alias by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/5376
* fix: Add db port entry into env file. by @nalakapws in https://github.com/codeigniter4/CodeIgniter4/pull/6250
* fix: update `.gitattributes` by @totoprayogo1916 in https://github.com/codeigniter4/CodeIgniter4/pull/6256
* fix: format_number() can't be used on CLI by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6263
* fix: add parameter checking for max_size by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6261
* fix: route name is not displayed in Exception message by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6269
* fix: `spark routes` shows 404 error when using regex by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6279
* fix: Entity::hasChanged() returns wrong result to mapped property by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6285
* fix: unable to add more than one file to FileCollection constructor by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6291
* fix: Security::derandomize() may cause hex2bin() error by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6292
* fix: use getenv() instead of $_SERVER in detectEnvironment() by @fcosrno in https://github.com/codeigniter4/CodeIgniter4/pull/6257
* fix: OCI8 uses deprecated Entity by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6323
* fix: Parse error occurs before PHP version check by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6327
* fix: 404 page might display Exception message in production environment by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6333

### Refactoring
* refactor: replace $e->getMessage() with $e in log_message() by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6182
* refactor: add CompleteDynamicPropertiesRector by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6187
* refactor: debug toolbar by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6272
* refactor: Exception exit code by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6286
* chore: Remove Vagrant by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6314
* refactor: CSRF protection by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6320

## [v4.2.1](https://github.com/codeigniter4/CodeIgniter4/tree/v4.2.1) (2022-06-16)
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.0...v4.2.1)

Expand Down
6 changes: 4 additions & 2 deletions admin/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Documentation guide based on the releases of `4.0.5` and `4.1.0` on January 31, 2021.
>
> Updated for `4.1.6` on December 24, 2021.
> Updated for `4.2.3` on August 6, 2022.
>
> -MGatner

Expand All @@ -29,8 +29,9 @@ git clone [email protected]:codeigniter4/CodeIgniter4.git
git clone [email protected]:codeigniter4/userguide.git
```
* Vet the **admin/** folders for any removed hidden files (Action deploy scripts *do not remove these*)
* Merge any Security Advisory PRs in private forks

## CodeIgniter4
## Process

> Note: Most changes that need noting in the User Guide and docs should have been included
> with their PR, so this process assumes you will not be generating much new content.
Expand Down Expand Up @@ -75,6 +76,7 @@ composer create-project codeigniter4/appstarter release-test
cd release-test
composer test && composer info codeigniter4/framework
```
* publish any Security Advisories that were resolved from private forks

## User Guide

Expand Down
127 changes: 118 additions & 9 deletions app/Config/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,54 @@ class Database extends Config
/**
* The directory that holds the Migrations
* and Seeds directories.
*
* @var string
*/
public string $filesPath = APPPATH . 'Database' . DIRECTORY_SEPARATOR;
public $filesPath = APPPATH . 'Database' . DIRECTORY_SEPARATOR;

/**
* Lets you choose which connection group to
* use if no other is specified.
*
* @var string
*/
public string $defaultGroup = 'default';
public $defaultGroup = 'default';

public $newdb = [
'DSN' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => '',
'database' => 'newdb',
'DBDriver' => 'MySQLi',
'DBPrefix' => 'db_',
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 3306,
];

/**
* The default database connection.
*
* @var array
*/
public array $default = [
public $tests = [
'DSN' => '',
'hostname' => 'localhost',
'username' => '',
'username' => 'root',
'password' => '',
'database' => '',
'database' => 'test',
'DBDriver' => 'MySQLi',
'DBPrefix' => '',
'DBPrefix' => 'db_',
'pConnect' => false,
'DBDebug' => true,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
Expand All @@ -44,11 +70,94 @@ class Database extends Config
'port' => 3306,
];

public $postgre = [
'DSN' => '',
'hostname' => '10.1.5.108',
'username' => 'postgres',
'password' => 'postgres',
'database' => 'test',
'DBDriver' => 'Postgre',
'DBPrefix' => 'db_',
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 5432,
];

public $sqlite3 = [
'DSN' => '',
'hostname' => 'localhost',
'username' => '',
'password' => '',
'database' => 'test.sqlite',
'DBDriver' => 'SQLite3',
'DBPrefix' => 'db_', // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 3306,
'foreignKeys' => true,
];

public $sqlsrv = [ // sqlsrv
'DSN' => '',
'hostname' => '10.1.5.108',
'username' => 'sa',
'password' => '@MssqlPass34',
'database' => 'test',
'DBDriver' => 'SQLSRV',
'DBPrefix' => 'db_',
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 1433,
];

public $oracle = [
'DSN' => '',
'hostname' => '10.1.5.108/orclcdb',
'username' => 'system',
'password' => 'oracle',
'database' => 'SYSTEM',
'DBDriver' => 'OCI8',
'DBPrefix' => 'db_',
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 1521,
];

/**
* This database connection is used when
* running PHPUnit database tests.
*
* @var array
*/
public array $tests = [
public $testst = [
'DSN' => '',
'hostname' => '127.0.0.1',
'username' => '',
Expand All @@ -57,7 +166,7 @@ class Database extends Config
'DBDriver' => 'SQLite3',
'DBPrefix' => 'db_', // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS
'pConnect' => false,
'DBDebug' => true,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
Expand Down
2 changes: 1 addition & 1 deletion app/Config/Routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// where controller filters or CSRF protection are bypassed.
// If you don't want to define all routes, please use the Auto Routing (Improved).
// Set `$autoRoutesImproved` to true in `app/Config/Feature.php` and set the following to true.
//$routes->setAutoRoute(false);
$routes->setAutoRoute(true);

/*
* --------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions app/Views/errors/html/error_404.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>404 Page Not Found</title>
<title><?= lang('Errors.pageNotFound') ?></title>

<style>
div.logo {
Expand Down Expand Up @@ -70,13 +70,13 @@
</head>
<body>
<div class="wrap">
<h1>404 - File Not Found</h1>
<h1>404</h1>

<p>
<?php if (! empty($message) && $message !== '(null)') : ?>
<?php if (ENVIRONMENT !== 'production') : ?>
<?= nl2br(esc($message)) ?>
<?php else : ?>
Sorry! Cannot seem to find the page you were looking for.
<?= lang('Errors.sorryCannotFind') ?>
<?php endif ?>
</p>
</div>
Expand Down
15 changes: 13 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,21 @@
"phpstan/phpstan": "^1.7.1",
"phpunit/phpunit": "^9.1",
"predis/predis": "^1.1 || ^2.0",
"rector/rector": "0.13.9"
"rector/rector": "0.13.10"
},
"suggest": {
"ext-fileinfo": "Improves mime type detection for files"
"ext-imagick": "If you use Image class ImageMagickHandler",
"ext-simplexml": "If you format XML",
"ext-mysqli": "If you use MySQL",
"ext-oci8": "If you use Oracle Database",
"ext-pgsql": "If you use PostgreSQL",
"ext-sqlsrv": "If you use SQL Server",
"ext-sqlite3": "If you use SQLite3",
"ext-memcache": "If you use Cache class MemcachedHandler with Memcache",
"ext-memcached": "If you use Cache class MemcachedHandler with Memcached",
"ext-redis": "If you use Cache class RedisHandler",
"ext-fileinfo": "Improves mime type detection for files",
"ext-readline": "Improves CLI::input() usability"
},
"config": {
"optimize-autoloader": true,
Expand Down
15 changes: 0 additions & 15 deletions phpstan-baseline.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ parameters:
count: 1
path: system/Cache/Handlers/MemcachedHandler.php

-
message: "#^Variable \\$config in empty\\(\\) always exists and is not falsy\\.$#"
count: 1
path: system/Cache/Handlers/MemcachedHandler.php

-
message: "#^Variable \\$data might not be defined\\.$#"
count: 1
Expand All @@ -65,11 +60,6 @@ parameters:
count: 1
path: system/Cache/Handlers/RedisHandler.php

-
message: "#^Variable \\$config in empty\\(\\) always exists and is not falsy\\.$#"
count: 1
path: system/Cache/Handlers/RedisHandler.php

-
message: "#^Call to an undefined method CodeIgniter\\\\HTTP\\\\Request\\:\\:getPost\\(\\)\\.$#"
count: 1
Expand Down Expand Up @@ -395,11 +385,6 @@ parameters:
count: 2
path: system/Database/SQLite3/Result.php

-
message: "#^Expression on left side of \\?\\? is not nullable\\.$#"
count: 1
path: system/Debug/Exceptions.php

-
message: "#^Call to an undefined method CodeIgniter\\\\View\\\\RendererInterface\\:\\:getPerformanceData\\(\\)\\.$#"
count: 1
Expand Down
4 changes: 3 additions & 1 deletion public/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

//phpinfo();exit();
$env = 'development';
define('ENVIRONMENT', $env);
// Path to the front controller (this file)
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);

Expand Down
11 changes: 5 additions & 6 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector;
use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector;
use Rector\DeadCode\Rector\MethodCall\RemoveEmptyMethodCallRector;
use Rector\DeadCode\Rector\Plus\RemoveDeadZeroAndOneOperationRector;
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector;
use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
Expand Down Expand Up @@ -133,11 +132,11 @@
__DIR__ . '/tests/system/Email/EmailTest.php',
],

// buggy on read based on @var on property
RemoveAlwaysTrueIfConditionRector::class,

// buggy on string * int
RemoveDeadZeroAndOneOperationRector::class,
// buggy on read based on @var on property on Trait
RemoveAlwaysTrueIfConditionRector::class => [
'**Trait.php',
__DIR__ . '/system/Test/ControllerTester.php',
],
]);

// auto import fully qualified class names
Expand Down
Loading