Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into 4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsn committed Oct 20, 2024
2 parents b068de9 + 28d7607 commit b837ab9
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 22 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/deploy-distributables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,15 @@ jobs:
token: ${{ secrets.ACCESS_TOKEN }}
path: userguide

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Sphinx
run: |
sudo apt install python3-sphinx
sudo pip3 install sphinxcontrib-phpdomain
sudo pip3 install sphinx_rtd_theme
python -m pip install --upgrade pip
pip install -r ./source/user_guide_src/requirements.txt
- name: Chmod
run: chmod +x ./source/.github/scripts/deploy-userguide
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/deploy-userguide-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,20 @@ jobs:
php-version: '8.1'
coverage: none

# Build the latest User Guide
- name: Build with Sphinx
uses: ammaraskar/[email protected]
- name: Setup Python
uses: actions/setup-python@v5
with:
docs-folder: user_guide_src/
python-version: '3.12'

- name: Install Sphinx
run: |
python -m pip install --upgrade pip
pip install -r user_guide_src/requirements.txt
# Build the latest User Guide
- name: Build Docs with Sphinx
run: make html
working-directory: user_guide_src

- name: Add "Edit this page" links
run: |
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/test-userguide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Sphinx
run: |
python -m pip install --upgrade pip
pip install -r user_guide_src/requirements.txt
- name: Detect usage of tabs in RST files
run: php utils/check_tabs_in_rst.php

- uses: ammaraskar/[email protected]
with:
docs-folder: user_guide_src
build-command: 'make html SPHINXOPTS="-W --keep-going -w /tmp/sphinx-log"'
- name: Build Docs with Sphinx
run: make html SPHINXOPTS="-W --keep-going -w /tmp/sphinx-log"
working-directory: user_guide_src
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"phpunit/phpcov": "^9.0.2 || ^10.0",
"phpunit/phpunit": "^10.5.16 || ^11.2",
"predis/predis": "^1.1 || ^2.0",
"rector/rector": "1.2.7"
"rector/rector": "1.2.8"
},
"replace": {
"codeigniter4/framework": "self.version"
Expand Down
7 changes: 2 additions & 5 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
*/

use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector;
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector;
use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector;
use Rector\CodeQuality\Rector\FuncCall\SimplifyStrposLowerRector;
use Rector\CodeQuality\Rector\FuncCall\SingleInArrayToCompareRector;
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
use Rector\CodeQuality\Rector\If_\CombineIfRector;
Expand Down Expand Up @@ -190,7 +188,6 @@
CountArrayToEmptyArrayComparisonRector::class,
ChangeNestedForeachIfsToEarlyContinueRector::class,
ChangeIfElseValueAssignToEarlyReturnRector::class,
SimplifyStrposLowerRector::class,
CombineIfRector::class,
SimplifyIfReturnBoolRector::class,
InlineIfToExplicitIfRector::class,
Expand All @@ -203,7 +200,6 @@
RemoveErrorSuppressInTryCatchStmtsRector::class,
FuncGetArgsToVariadicParamRector::class,
MakeInheritedMethodVisibilitySameAsParentRector::class,
SimplifyEmptyArrayCheckRector::class,
SimplifyEmptyCheckOnEmptyArrayRector::class,
TernaryEmptyArrayArrayDimFetchToCoalesceRector::class,
EmptyOnNullableObjectToInstanceOfRector::class,
Expand All @@ -223,4 +219,5 @@
->withConfiguredRule(StringClassNameToClassConstantRector::class, [
// keep '\\' prefix string on string '\Foo\Bar'
StringClassNameToClassConstantRector::SHOULD_KEEP_PRE_SLASH => true,
]);
])
->withCodeQualityLevel(9);
10 changes: 5 additions & 5 deletions tests/system/Database/Live/UpdateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ public function testUpdateBatchConstraintsRawSqlAndAlias(): void

public function testUpdateBatchUpdateFieldsAndAlias(): void
{
if ($this->db->DBDriver === 'SQLite3' && ! (version_compare($this->db->getVersion(), '3.33.0') >= 0)) {
if ($this->db->DBDriver === 'SQLite3' && version_compare($this->db->getVersion(), '3.33.0') < 0) {
$this->markTestSkipped('Only SQLite 3.33 and newer can complete this test.');
}

Expand Down Expand Up @@ -557,7 +557,7 @@ public function testUpdateBatchUpdateFieldsAndAlias(): void

public function testUpdateBatchWithoutOnConstraint(): void
{
if ($this->db->DBDriver === 'SQLite3' && ! (version_compare($this->db->getVersion(), '3.33.0') >= 0)) {
if ($this->db->DBDriver === 'SQLite3' && version_compare($this->db->getVersion(), '3.33.0') < 0) {
$this->markTestSkipped('Only SQLite 3.33 and newer can complete this test.');
}

Expand Down Expand Up @@ -599,7 +599,7 @@ public function testUpdateBatchWithoutOnConstraint(): void

public function testRawSqlConstraint(): void
{
if ($this->db->DBDriver === 'SQLite3' && ! (version_compare($this->db->getVersion(), '3.33.0') >= 0)) {
if ($this->db->DBDriver === 'SQLite3' && version_compare($this->db->getVersion(), '3.33.0') < 0) {
$this->markTestSkipped('Only SQLite 3.33 and newer can complete this test.');
}

Expand All @@ -623,7 +623,7 @@ public function testRawSqlConstraint(): void

public function testRawSqlConstraintWithKey(): void
{
if ($this->db->DBDriver === 'SQLite3' && ! (version_compare($this->db->getVersion(), '3.33.0') >= 0)) {
if ($this->db->DBDriver === 'SQLite3' && version_compare($this->db->getVersion(), '3.33.0') < 0) {
$this->markTestSkipped('Only SQLite 3.33 and newer can complete this test.');
}

Expand Down Expand Up @@ -710,7 +710,7 @@ public function testUpdateBatchWithQuery(): void
];
$this->db->table('user2')->insertBatch($data);

if ($this->db->DBDriver === 'SQLite3' && ! (version_compare($this->db->getVersion(), '3.33.0') >= 0)) {
if ($this->db->DBDriver === 'SQLite3' && version_compare($this->db->getVersion(), '3.33.0') < 0) {
$this->markTestSkipped('Only SQLite 3.33 and newer can complete this test.');
}

Expand Down

0 comments on commit b837ab9

Please sign in to comment.