Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
76 changes: 76 additions & 0 deletions .github/workflows/test-autoreview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,79 @@ jobs:
php-version: '8.1'
job-id: auto-review-tests
group-name: AutoReview

composer-normalize-tests:
name: Check normalized composer.json
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'

- name: Install dependencies
run: composer update

- name: Run on root composer.json
id: normalize-root-composer
if: ${{ always() }}
run: |
echo "ROOT_COMPOSER_RESULT<<RCR" >> $GITHUB_OUTPUT
echo "$(composer normalize)" >> $GITHUB_OUTPUT
echo "RCR" >> $GITHUB_OUTPUT

- name: Run on framework composer.json
id: normalize-framework-composer
if: ${{ always() }}
working-directory: admin/framework
run: |
echo "FRAMEWORK_COMPOSER_RESULT<<FCR" >> $GITHUB_OUTPUT
echo "$(composer normalize)" >> $GITHUB_OUTPUT
echo "FCR" >> $GITHUB_OUTPUT

- name: Run on starter composer.json
id: normalize-starter-composer
if: ${{ always() }}
working-directory: admin/starter
run: |
echo "STARTER_COMPOSER_RESULT<<SCR" >> $GITHUB_OUTPUT
echo "$(composer normalize)" >> $GITHUB_OUTPUT
echo "SCR" >> $GITHUB_OUTPUT

- name: Analyse normalization results
run: |
if [[ '${{ steps.normalize-root-composer.conclusion }}' == 'failure' ]]; then
echo 'Normalization of root composer.json encountered a problem.';
echo 'Please run it locally: `composer normalize`';
exit 1;
fi

if [[ ${{ contains(steps.normalize-root-composer.outputs.ROOT_COMPOSER_RESULT, 'Successfully normalized') }} == true ]]; then
echo 'Root composer.json is not yet normalized.';
exit 1;
fi

if [[ '${{ steps.normalize-framework-composer.conclusion }}' == 'failure' ]]; then
echo 'Normalization of framework composer.json encountered a problem.';
echo 'Please run it locally: `composer normalize -d admin/framework`';
exit 1;
fi

if [[ ${{ contains(steps.normalize-framework-composer.outputs.FRAMEWORK_COMPOSER_RESULT, 'Successfully normalized') }} == true ]]; then
echo 'Framework composer.json is not yet normalized.';
exit 1;
fi

if [[ '${{ steps.normalize-starter-composer.conclusion }}' == 'failure' ]]; then
echo 'Normalization of starter composer.json encountered a problem.';
echo 'Please run it locally: `composer normalize -d admin/starter`';
exit 1;
fi

if [[ ${{ contains(steps.normalize-starter-composer.outputs.STARTER_COMPOSER_RESULT, 'Successfully normalized') }} == true ]]; then
echo 'Starter composer.json is not yet normalized.';
exit 1;
fi
50 changes: 25 additions & 25 deletions admin/framework/composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"name": "codeigniter4/framework",
"type": "project",
"description": "The CodeIgniter framework v4",
"homepage": "https://codeigniter.com",
"license": "MIT",
"type": "project",
"homepage": "https://codeigniter.com",
"support": {
"forum": "https://forum.codeigniter.com/",
"source": "https://github.com/codeigniter4/CodeIgniter4",
"slack": "https://codeigniterchat.slack.com"
},
"require": {
"php": "^7.4 || ^8.0",
"ext-intl": "*",
Expand All @@ -13,39 +18,34 @@
"psr/log": "^1.1"
},
"require-dev": {
"kint-php/kint": "^5.0.4",
"codeigniter/coding-standard": "^1.5",
"fakerphp/faker": "^1.9",
"friendsofphp/php-cs-fixer": "3.13.0",
"kint-php/kint": "^5.0.4",
"mikey179/vfsstream": "^1.6",
"nexusphp/cs-config": "^3.6",
"phpunit/phpunit": "^9.1",
"predis/predis": "^1.1 || ^2.0"
},
"suggest": {
"ext-curl": "If you use CURLRequest class",
"ext-imagick": "If you use Image class ImageMagickHandler",
"ext-gd": "If you use Image class GDHandler",
"ext-dom": "If you use TestResponse",
"ext-exif": "If you run Image class tests",
"ext-simplexml": "If you format XML",
"ext-fileinfo": "Improves mime type detection for files",
"ext-gd": "If you use Image class GDHandler",
"ext-imagick": "If you use Image class ImageMagickHandler",
"ext-libxml": "If you use TestResponse",
"ext-memcache": "If you use Cache class MemcachedHandler with Memcache",
"ext-memcached": "If you use Cache class MemcachedHandler with Memcached",
"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-readline": "Improves CLI::input() usability",
"ext-redis": "If you use Cache class RedisHandler",
"ext-dom": "If you use TestResponse",
"ext-libxml": "If you use TestResponse",
"ext-xdebug": "If you use CIUnitTestCase::assertHeaderEmitted()",
"ext-fileinfo": "Improves mime type detection for files",
"ext-readline": "Improves CLI::input() usability"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
"ext-simplexml": "If you format XML",
"ext-sqlite3": "If you use SQLite3",
"ext-sqlsrv": "If you use SQL Server",
"ext-xdebug": "If you use CIUnitTestCase::assertHeaderEmitted()"
},
"autoload": {
"psr-4": {
Expand All @@ -55,12 +55,12 @@
"**/Database/Migrations/**"
]
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"scripts": {
"test": "phpunit"
},
"support": {
"forum": "https://forum.codeigniter.com/",
"source": "https://github.com/codeigniter4/CodeIgniter4",
"slack": "https://codeigniterchat.slack.com"
}
}
24 changes: 12 additions & 12 deletions admin/starter/composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"name": "codeigniter4/appstarter",
"type": "project",
"description": "CodeIgniter4 starter app",
"homepage": "https://codeigniter.com",
"license": "MIT",
"type": "project",
"homepage": "https://codeigniter.com",
"support": {
"forum": "https://forum.codeigniter.com/",
"source": "https://github.com/codeigniter4/CodeIgniter4",
"slack": "https://codeigniterchat.slack.com"
},
"require": {
"php": "^7.4 || ^8.0",
"codeigniter4/framework": "^4.0"
Expand All @@ -13,11 +18,6 @@
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": "^9.1"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"autoload": {
"exclude-from-classmap": [
"**/Database/Migrations/**"
Expand All @@ -28,12 +28,12 @@
"Tests\\Support\\": "tests/_support"
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"scripts": {
"test": "phpunit"
},
"support": {
"forum": "https://forum.codeigniter.com/",
"source": "https://github.com/codeigniter4/CodeIgniter4",
"slack": "https://codeigniterchat.slack.com"
}
}
74 changes: 39 additions & 35 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"name": "codeigniter4/codeigniter4",
"type": "project",
"description": "The CodeIgniter framework v4",
"homepage": "https://codeigniter.com",
"license": "MIT",
"type": "project",
"homepage": "https://codeigniter.com",
"support": {
"forum": "https://forum.codeigniter.com/",
"source": "https://github.com/codeigniter4/CodeIgniter4",
"slack": "https://codeigniterchat.slack.com"
},
"require": {
"php": "^7.4 || ^8.0",
"ext-intl": "*",
Expand All @@ -13,9 +18,10 @@
"psr/log": "^1.1"
},
"require-dev": {
"kint-php/kint": "^5.0.4",
"codeigniter/coding-standard": "^1.5",
"ergebnis/composer-normalize": "^2.28",
"fakerphp/faker": "^1.9",
"kint-php/kint": "^5.0.4",
"mikey179/vfsstream": "^1.6",
"nexusphp/cs-config": "^3.6",
"nexusphp/tachycardia": "^1.0",
Expand All @@ -29,33 +35,23 @@
},
"suggest": {
"ext-curl": "If you use CURLRequest class",
"ext-imagick": "If you use Image class ImageMagickHandler",
"ext-gd": "If you use Image class GDHandler",
"ext-dom": "If you use TestResponse",
"ext-exif": "If you run Image class tests",
"ext-simplexml": "If you format XML",
"ext-fileinfo": "Improves mime type detection for files",
"ext-gd": "If you use Image class GDHandler",
"ext-imagick": "If you use Image class ImageMagickHandler",
"ext-libxml": "If you use TestResponse",
"ext-memcache": "If you use Cache class MemcachedHandler with Memcache",
"ext-memcached": "If you use Cache class MemcachedHandler with Memcached",
"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-readline": "Improves CLI::input() usability",
"ext-redis": "If you use Cache class RedisHandler",
"ext-dom": "If you use TestResponse",
"ext-libxml": "If you use TestResponse",
"ext-xdebug": "If you use CIUnitTestCase::assertHeaderEmitted()",
"ext-fileinfo": "Improves mime type detection for files",
"ext-readline": "Improves CLI::input() usability"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"branch-alias": {
"dev-develop": "4.x-dev"
}
"ext-simplexml": "If you format XML",
"ext-sqlite3": "If you use SQLite3",
"ext-sqlsrv": "If you use SQL Server",
"ext-xdebug": "If you use CIUnitTestCase::assertHeaderEmitted()"
},
"autoload": {
"psr-4": {
Expand All @@ -71,6 +67,19 @@
"Utils\\": "utils/"
}
},
"config": {
"allow-plugins": {
"ergebnis/composer-normalize": true
},
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"branch-alias": {
"dev-develop": "4.x-dev"
}
},
"scripts": {
"post-update-cmd": [
"CodeIgniter\\ComposerScripts::postUpdate",
Expand All @@ -81,8 +90,6 @@
"bash -c \"XDEBUG_MODE=off phpstan analyse\"",
"rector process --dry-run"
],
"sa": "@analyze",
"test": "phpunit",
"cs": [
"Composer\\Config::disableProcessTimeout",
"php-cs-fixer fix --ansi --verbose --dry-run --diff --config=.php-cs-fixer.user-guide.php",
Expand All @@ -95,17 +102,14 @@
"php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.no-header.php",
"php-cs-fixer fix --ansi --verbose --diff"
],
"style": "@cs-fix"
"sa": "@analyze",
"style": "@cs-fix",
"test": "phpunit"
},
"scripts-descriptions": {
"analyze": "Run static analysis",
"test": "Run unit tests",
"cs": "Check the coding style",
"cs-fix": "Fix the coding style"
},
"support": {
"forum": "https://forum.codeigniter.com/",
"source": "https://github.com/codeigniter4/CodeIgniter4",
"slack": "https://codeigniterchat.slack.com"
"cs-fix": "Fix the coding style",
"test": "Run unit tests"
}
}
Loading