Skip to content

Update dependencies - PHP 8.1 - 8.4 #134

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

Merged
merged 12 commits into from
Feb 2, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
132 changes: 127 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Contributor

@datamweb datamweb Feb 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michalsn The PHP version in CodeIgniter, DevKit, and other dependencies is defined as ^8.1, while vimeo/psalm version ^6 requires PHP 8.1.17 or higher. This mismatch causes the error.

PS I:\work\Github\shield> composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires codeigniter4/devkit ^1.3 -> satisfiable by codeigniter4/devkit[v1.3.0].
    - codeigniter4/devkit v1.3.0 requires vimeo/psalm ^6.0 -> satisfiable by vimeo/psalm[6.0.0, ..., 6.x-dev].
    - vimeo/psalm[6.0.0, ..., 6.5.0] require php ~8.1.17 || ~8.2.4 || ~8.3.0 || ~8.4.0 -> your php version (8.1.10) does not satisfy that requirement.
    - vimeo/psalm[6.5.1, ..., 6.x-dev] require php ~8.1.31 || ~8.2.27 || ~8.3.16 || ~8.4.3 -> your php version (8.1.10) does not satisfy that requirement.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Would you like to send a fix to the devkit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #135 sent.

},
"require-dev": {
"codeigniter4/framework": "^4.1",
"icanhazstring/composer-unused": "^0.8.2"
"icanhazstring/composer-unused": "dev-main"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
3 changes: 1 addition & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Template/.github/workflows/infection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Template/.github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Template/.github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Template/.github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Template/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
cacheDirectory=".phpunit.cache"
cacheDirectory="build/.phpunit.cache"
beStrictAboutCoverageMetadata="true">
<coverage includeUncoveredFiles="true">
<report>
Expand Down
4 changes: 2 additions & 2 deletions src/Template/rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
Expand Down Expand Up @@ -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();
Expand Down