Skip to content

Commit

Permalink
Merge pull request #7588 from codeigniter4/develop
Browse files Browse the repository at this point in the history
4.3.6 Ready code
  • Loading branch information
kenjis authored Jun 17, 2023
2 parents 3595944 + b730910 commit 2834ef9
Show file tree
Hide file tree
Showing 88 changed files with 1,288 additions and 694 deletions.
5 changes: 5 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
'ThirdParty',
'Validation/Views',
])
->notPath([
'_support/View/Cells/multiplier.php',
'_support/View/Cells/colors.php',
'_support/View/Cells/addition.php',
])
->notName('#Foobar.php$#')
->append([
__FILE__,
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## [v4.3.6](https://github.com/codeigniter4/CodeIgniter4/tree/v4.3.6) (2023-06-18)
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.3.5...v4.3.6)

### Breaking Changes

* fix: [Validation] DBGroup is ignored when checking the value of a placeholder by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7549
* fix: [Auto Routing Improved] feature testing may not find controller/method by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7543

### Fixed Bugs

* fix: feature test with validation by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7548
* fix: [Postgre] Semicolon in the connection parameters break the DSN string by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/7552
* fix: [QueryBuilder] incorrect SQL without space before "ON DUPLICATE KEY UPDATE" by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7564
* fix: wrong classname in exception message in Cell by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7569
* fix: `imagecreatefrompng()` gd-png: libpng warning by @ping-yee in https://github.com/codeigniter4/CodeIgniter4/pull/7570

### Refactoring

* refactor: remove unneeded code in IncomingRequest by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7525
* refactor: View by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7534
* refactor: [Entity] fix incorrect return value by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7542
* refactor: Database::initDriver() by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7553
* refactor: remove Factories::models() by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/7566
* refactor: Validation::processRules() by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7565
* refactor: [Auto Routing Improved] ensure $httpVerb is lower case by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7575

## [v4.3.5](https://github.com/codeigniter4/CodeIgniter4/tree/v4.3.5) (2023-05-21)
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.3.4...v4.3.5)

Expand Down
8 changes: 0 additions & 8 deletions admin/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,6 @@ the existing content.
* Create **user_guide_src/source/installation/upgrade_{next_version}.rst** and add it to
**upgrading.rst** (See **next-upgrading-guide.rst**)

## After Publishing Security Advisory

* Send a PR to [PHP Security Advisories Database](https://github.com/FriendsOfPHP/security-advisories).
* E.g. https://github.com/FriendsOfPHP/security-advisories/pull/606
* See https://github.com/FriendsOfPHP/security-advisories#contributing
* Don't forget to run `php -d memory_limit=-1 validator.php`, before
submitting the PR

## Appendix

### Sphinx Installation
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"phpunit/phpcov": "^8.2",
"phpunit/phpunit": "^9.1",
"predis/predis": "^1.1 || ^2.0",
"rector/rector": "0.16.0",
"rector/rector": "0.17.1",
"vimeo/psalm": "^5.0"
},
"suggest": {
Expand Down
5 changes: 0 additions & 5 deletions phpstan-baseline.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@ parameters:
count: 1
path: system/HTTP/Files/UploadedFile.php

-
message: "#^Property CodeIgniter\\\\HTTP\\\\IncomingRequest\\:\\:\\$locale \\(string\\) on left side of \\?\\? is not nullable\\.$#"
count: 1
path: system/HTTP/IncomingRequest.php

-
message: "#^Property CodeIgniter\\\\HTTP\\\\Message\\:\\:\\$protocolVersion \\(string\\) on left side of \\?\\? is not nullable\\.$#"
count: 1
Expand Down
156 changes: 39 additions & 117 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,212 +1,134 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.30.0@d0bc6e25d89f649e4f36a534f330f8bb4643dd69">
<file src="app/Config/Routes.php">
<MissingFile occurrences="1">
<code>require APPPATH . 'Config/' . ENVIRONMENT . '/Routes.php'</code>
</MissingFile>
</file>
<files psalm-version="5.12.0@f90118cdeacd0088e7215e64c0c99ceca819e176">
<file src="system/Cache/Handlers/MemcachedHandler.php">
<UndefinedClass occurrences="3">
<UndefinedClass>
<code>Memcache</code>
<code>Memcache</code>
<code>Memcache</code>
</UndefinedClass>
<UndefinedDocblockClass occurrences="7">
<code>$this-&gt;memcached</code>
<code>$this-&gt;memcached</code>
<code>$this-&gt;memcached</code>
<code>$this-&gt;memcached</code>
<code>$this-&gt;memcached</code>
<code>$this-&gt;memcached</code>
<UndefinedDocblockClass>
<code><![CDATA[$this->memcached]]></code>
<code><![CDATA[$this->memcached]]></code>
<code><![CDATA[$this->memcached]]></code>
<code><![CDATA[$this->memcached]]></code>
<code><![CDATA[$this->memcached]]></code>
<code><![CDATA[$this->memcached]]></code>
<code>Memcache|Memcached</code>
</UndefinedDocblockClass>
</file>
<file src="system/Commands/Utilities/Routes/AutoRouterImproved/ControllerMethodReader.php">
<DuplicateArrayKey occurrences="1">
<code>$routeWithoutController</code>
</DuplicateArrayKey>
</file>
<file src="system/Commands/Utilities/Routes/ControllerMethodReader.php">
<DuplicateArrayKey occurrences="2">
<DuplicateArrayKey>
<code>$routeWithoutController</code>
<code>$routeWithoutController</code>
</DuplicateArrayKey>
</file>
<file src="system/Database/BasePreparedQuery.php">
<InaccessibleProperty occurrences="1">
<code>$this-&gt;db-&gt;transStatus</code>
<InaccessibleProperty>
<code><![CDATA[$this->db->transStatus]]></code>
</InaccessibleProperty>
</file>
<file src="system/Database/OCI8/Connection.php">
<UndefinedConstant occurrences="5">
<UndefinedConstant>
<code>OCI_COMMIT_ON_SUCCESS</code>
<code>OCI_COMMIT_ON_SUCCESS</code>
<code>OCI_COMMIT_ON_SUCCESS</code>
<code>OCI_NO_AUTO_COMMIT</code>
<code>SQLT_CHR</code>
</UndefinedConstant>
</file>
<file src="system/Database/SQLSRV/Connection.php">
<UndefinedConstant occurrences="3">
<code>SQLSRV_ENC_CHAR</code>
<code>SQLSRV_ERR_ERRORS</code>
<code>SQLSRV_ERR_ERRORS</code>
</UndefinedConstant>
</file>
<file src="system/Database/SQLSRV/Result.php">
<UndefinedConstant occurrences="30">
<code>SQLSRV_FETCH_ASSOC</code>
<code>SQLSRV_SQLTYPE_BIGINT</code>
<code>SQLSRV_SQLTYPE_BIT</code>
<code>SQLSRV_SQLTYPE_CHAR</code>
<code>SQLSRV_SQLTYPE_DATE</code>
<code>SQLSRV_SQLTYPE_DATETIME</code>
<code>SQLSRV_SQLTYPE_DATETIME2</code>
<code>SQLSRV_SQLTYPE_DATETIMEOFFSET</code>
<code>SQLSRV_SQLTYPE_DECIMAL</code>
<code>SQLSRV_SQLTYPE_FLOAT</code>
<code>SQLSRV_SQLTYPE_IMAGE</code>
<code>SQLSRV_SQLTYPE_INT</code>
<code>SQLSRV_SQLTYPE_MONEY</code>
<code>SQLSRV_SQLTYPE_NCHAR</code>
<code>SQLSRV_SQLTYPE_NTEXT</code>
<code>SQLSRV_SQLTYPE_NUMERIC</code>
<code>SQLSRV_SQLTYPE_NVARCHAR</code>
<code>SQLSRV_SQLTYPE_REAL</code>
<code>SQLSRV_SQLTYPE_SMALLDATETIME</code>
<code>SQLSRV_SQLTYPE_SMALLINT</code>
<code>SQLSRV_SQLTYPE_SMALLMONEY</code>
<code>SQLSRV_SQLTYPE_TEXT</code>
<code>SQLSRV_SQLTYPE_TIME</code>
<code>SQLSRV_SQLTYPE_TIMESTAMP</code>
<code>SQLSRV_SQLTYPE_TINYINT</code>
<code>SQLSRV_SQLTYPE_UDT</code>
<code>SQLSRV_SQLTYPE_UNIQUEIDENTIFIER</code>
<code>SQLSRV_SQLTYPE_VARBINARY</code>
<code>SQLSRV_SQLTYPE_VARCHAR</code>
<code>SQLSRV_SQLTYPE_XML</code>
</UndefinedConstant>
</file>
<file src="system/Debug/Toolbar/Views/toolbar.tpl.php">
<InaccessibleMethod occurrences="1">
<InaccessibleMethod>
<code>renderTimeline</code>
</InaccessibleMethod>
<UndefinedGlobalVariable occurrences="1">
<UndefinedGlobalVariable>
<code>$config</code>
</UndefinedGlobalVariable>
</file>
<file src="system/Email/Email.php">
<LoopInvalidation occurrences="1">
<LoopInvalidation>
<code>$timestamp</code>
</LoopInvalidation>
</file>
<file src="system/HTTP/Files/FileCollection.php">
<EmptyArrayAccess occurrences="1">
<EmptyArrayAccess>
<code>$output[$name]</code>
</EmptyArrayAccess>
</file>
<file src="system/Helpers/text_helper.php">
<LoopInvalidation occurrences="3">
<LoopInvalidation>
<code>$count</code>
<code>$count</code>
<code>$count</code>
</LoopInvalidation>
</file>
<file src="system/I18n/TimeTrait.php">
<MissingImmutableAnnotation occurrences="3">
<MissingImmutableAnnotation>
<code>#[ReturnTypeWillChange]</code>
<code>#[ReturnTypeWillChange]</code>
<code>#[ReturnTypeWillChange]</code>
</MissingImmutableAnnotation>
</file>
<file src="system/Test/ControllerResponse.php">
<UnsupportedPropertyReferenceUsage>
<code><![CDATA[$this->dom = &$this->domParser]]></code>
</UnsupportedPropertyReferenceUsage>
</file>
<file src="tests/_support/Config/Filters.php">
<UndefinedGlobalVariable occurrences="1">
<UndefinedGlobalVariable>
<code>$filters</code>
</UndefinedGlobalVariable>
</file>
<file src="tests/_support/Config/Routes.php">
<UndefinedGlobalVariable occurrences="2">
<UndefinedGlobalVariable>
<code>$routes</code>
<code>$routes</code>
</UndefinedGlobalVariable>
</file>
<file src="tests/_support/View/Cells/addition.php">
<UndefinedGlobalVariable occurrences="1">
<code>$value</code>
</UndefinedGlobalVariable>
</file>
<file src="tests/_support/View/Cells/colors.php">
<InvalidScope occurrences="1">
<InvalidScope>
<code>$this</code>
</InvalidScope>
</file>
<file src="tests/_support/View/Cells/greeting.php">
<UndefinedGlobalVariable occurrences="2">
<code>$greeting</code>
<code>$name</code>
</UndefinedGlobalVariable>
</file>
<file src="tests/_support/View/Cells/lister.php">
<UndefinedGlobalVariable occurrences="1">
<code>$items</code>
</UndefinedGlobalVariable>
</file>
<file src="tests/_support/View/Cells/multiplier.php">
<UndefinedGlobalVariable occurrences="1">
<code>$value</code>
</UndefinedGlobalVariable>
</file>
<file src="tests/_support/View/Cells/notice.php">
<UndefinedGlobalVariable occurrences="1">
<code>$message</code>
</UndefinedGlobalVariable>
</file>
<file src="tests/system/CLI/ConsoleTest.php">
<DuplicateArrayKey occurrences="1">
<DuplicateArrayKey>
<code>$command</code>
</DuplicateArrayKey>
</file>
<file src="tests/system/CommonFunctionsTest.php">
<UndefinedClass occurrences="2">
<code>'JobModel'</code>
<UndefinedClass>
<code>UnexsistenceClass</code>
</UndefinedClass>
</file>
<file src="tests/system/Config/BaseConfigTest.php">
<UndefinedClass occurrences="1">
<code>SimpleConfig</code>
</UndefinedClass>
</file>
<file src="tests/system/Config/FactoriesTest.php">
<UndefinedClass occurrences="1">
<code>'SomeWidget'</code>
<UndefinedClass>
<code><![CDATA['SomeWidget']]></code>
</UndefinedClass>
</file>
<file src="tests/system/Database/BaseConnectionTest.php">
<InaccessibleProperty occurrences="2">
<code>$db-&gt;username</code>
<code>$db-&gt;username</code>
<InaccessibleProperty>
<code><![CDATA[$db->username]]></code>
<code><![CDATA[$db->username]]></code>
</InaccessibleProperty>
</file>
<file src="tests/system/Database/Live/OCI8/CallStoredProcedureTest.php">
<UndefinedConstant occurrences="3">
<UndefinedConstant>
<code>OCI_ASSOC</code>
<code>OCI_B_CURSOR</code>
<code>OCI_RETURN_NULLS</code>
</UndefinedConstant>
</file>
<file src="tests/system/Entity/EntityTest.php">
<EmptyArrayAccess occurrences="1">
<EmptyArrayAccess>
<code>$current[$key]</code>
</EmptyArrayAccess>
</file>
<file src="tests/system/HTTP/RedirectResponseTest.php">
<EmptyArrayAccess occurrences="1">
<code>$_SESSION['_ci_old_input']</code>
<EmptyArrayAccess>
<code><![CDATA[$_SESSION['_ci_old_input']]]></code>
</EmptyArrayAccess>
</file>
<file src="tests/system/Test/ControllerTestTraitTest.php">
<UndefinedClass occurrences="1">
<UndefinedClass>
<code>NeverHeardOfIt</code>
</UndefinedClass>
</file>
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
autoloader="psalm_autoload.php"
cacheDirectory="build/psalm/"
errorBaseline="psalm-baseline.xml"
findUnusedBaselineEntry="false"
findUnusedCode="false"
>
<projectFiles>
<directory name="app/" />
Expand Down
19 changes: 19 additions & 0 deletions psalm_autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,23 @@
}
}

$dirs = [
'tests/_support/Controllers',
];

foreach ($dirs as $dir) {
$dir = __DIR__ . '/' . $dir;
if (! is_dir($dir)) {
continue;
}

chdir($dir);

foreach (glob('*.php') as $filename) {
$filePath = realpath($dir . '/' . $filename);

require_once $filePath;
}
}

chdir(__DIR__);
Loading

0 comments on commit 2834ef9

Please sign in to comment.