diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 0bd947e..eb62cd4 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.4', '8.0', '8.1'] + php-versions: ['8.1', '8.2', '8.3', '8.4'] steps: - name: Checkout diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index b93f852..8694f14 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.4', '8.0', '8.1'] + php-versions: ['8.1', '8.2', '8.3', '8.4'] steps: - name: Checkout diff --git a/.gitignore b/.gitignore index 11192f3..988be09 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,129 @@ -vendor/ -build/ -phpunit*.xml +#------------------------- +# Operating Specific Junk Files +#------------------------- + +# OS X +.DS_Store +.AppleDouble +.LSOverride + +# OS X Thumbnails +._* + +# Windows image file caches +Thumbs.db +ehthumbs.db +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# Linux +*~ + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +#------------------------- +# Environment Files +#------------------------- +# These should never be under version control, +# as it poses a security risk. +.env +.vagrant +Vagrantfile + +#------------------------- +# Temporary Files +#------------------------- +writable/cache/* +!writable/cache/index.html + +writable/logs/* +!writable/logs/index.html + +writable/session/* +!writable/session/index.html + +writable/uploads/* +!writable/uploads/index.html + +writable/debugbar/* +!writable/debugbar/index.html + +writable/**/*.db +writable/**/*.sqlite + +php_errors.log + +#------------------------- +# User Guide Temp Files +#------------------------- +user_guide_src/build/* + +#------------------------- +# Test Files +#------------------------- +tests/coverage* + +# Don't save phpunit under version control. phpunit -*.cache + +#------------------------- +# Composer +#------------------------- +vendor/ composer.lock -.DS_Store + +#------------------------- +# IDE / Development Files +#------------------------- + +# Modules Testing +_modules/* + +# phpenv local config +.php-version + +# Jetbrains editors (PHPStorm, etc) +.idea/ +*.iml + +# Netbeans +nbproject/ +build/ +nbbuild/ +dist/ +nbdist/ +nbactions.xml +nb-configuration.xml +.nb-gradle/ + +# Sublime Text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache +*.sublime-workspace +*.sublime-project +.phpintel +/api/ + +# Visual Studio Code +.vscode/ + +/results/ +/phpunit*.xml + +/.php-cs-fixer.php diff --git a/composer.json b/composer.json index 0d5e77f..c313b9d 100644 --- a/composer.json +++ b/composer.json @@ -22,24 +22,24 @@ ], "homepage": "https://github.com/codeigniter4/devkit", "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "codeigniter/coding-standard": "^1.5", "fakerphp/faker": "^1.9", "mikey179/vfsstream": "^1.6", "nexusphp/cs-config": "^3.6", - "nexusphp/tachycardia": "^1.3 || ^2.0", + "nexusphp/tachycardia": "^2.0", "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.3 || ^10.5.16", - "rector/rector": "^0.19 || ^1.0.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-deprecation-rules": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^10.5 || ^11.5", + "rector/rector": "^2.0", "roave/security-advisories": "dev-latest", - "vimeo/psalm": "^5.0" + "vimeo/psalm": "^6.0" }, "require-dev": { "codeigniter4/framework": "^4.1", - "icanhazstring/composer-unused": "^0.8.2" + "icanhazstring/composer-unused": "dev-main" }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 113d258..83cbc02 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -6,8 +6,7 @@ parameters: bootstrapFiles: - vendor/codeigniter4/framework/system/Test/bootstrap.php excludePaths: - - src/Config/Routes.php - - src/Views/* + - src/docker/* ignoreErrors: universalObjectCratesClasses: - CodeIgniter\Entity diff --git a/src/Template/.github/workflows/infection.yml b/src/Template/.github/workflows/infection.yml index cb6dda1..f58dc6a 100644 --- a/src/Template/.github/workflows/infection.yml +++ b/src/Template/.github/workflows/infection.yml @@ -23,7 +23,7 @@ jobs: - name: Set up PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' tools: infection, phpunit extensions: intl, json, mbstring, gd, xml, sqlite3 coverage: xdebug diff --git a/src/Template/.github/workflows/phpstan.yml b/src/Template/.github/workflows/phpstan.yml index fd67635..eb62cd4 100644 --- a/src/Template/.github/workflows/phpstan.yml +++ b/src/Template/.github/workflows/phpstan.yml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.4', '8.0', '8.1', '8.2'] + php-versions: ['8.1', '8.2', '8.3', '8.4'] steps: - name: Checkout diff --git a/src/Template/.github/workflows/phpunit.yml b/src/Template/.github/workflows/phpunit.yml index 7f355eb..5df1604 100644 --- a/src/Template/.github/workflows/phpunit.yml +++ b/src/Template/.github/workflows/phpunit.yml @@ -25,7 +25,7 @@ jobs: if: (! contains(github.event.head_commit.message, '[ci skip]')) strategy: matrix: - php-versions: ['7.4', '8.0', '8.1', '8.2'] + php-versions: ['8.1', '8.2', '8.3', '8.4'] steps: - name: Checkout diff --git a/src/Template/.github/workflows/rector.yml b/src/Template/.github/workflows/rector.yml index 26b0b8c..8694f14 100644 --- a/src/Template/.github/workflows/rector.yml +++ b/src/Template/.github/workflows/rector.yml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.4', '8.0', '8.1', '8.2'] + php-versions: ['8.1', '8.2', '8.3', '8.4'] steps: - name: Checkout diff --git a/src/Template/phpunit.xml.dist b/src/Template/phpunit.xml.dist index 21a5f6e..968d75a 100644 --- a/src/Template/phpunit.xml.dist +++ b/src/Template/phpunit.xml.dist @@ -12,7 +12,7 @@ stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" - cacheDirectory=".phpunit.cache" + cacheDirectory="build/.phpunit.cache" beStrictAboutCoverageMetadata="true"> diff --git a/src/Template/rector.php b/src/Template/rector.php index 71c499e..0c364d1 100644 --- a/src/Template/rector.php +++ b/src/Template/rector.php @@ -47,7 +47,7 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->sets([ SetList::DEAD_CODE, - LevelSetList::UP_TO_PHP_74, + LevelSetList::UP_TO_PHP_81, PHPUnitSetList::PHPUNIT_CODE_QUALITY, PHPUnitSetList::PHPUNIT_100, ]); @@ -81,7 +81,7 @@ } // Set the target version for refactoring - $rectorConfig->phpVersion(PhpVersion::PHP_74); + $rectorConfig->phpVersion(PhpVersion::PHP_81); // Auto-import fully qualified class names $rectorConfig->importNames();