Skip to content

Commit

Permalink
Merge pull request #46 from tangrufus/php8
Browse files Browse the repository at this point in the history
Update to PHP >=8.0; Update actions/cache to v4; Test PHP 8.0 to 8.4; Add dependabot config
  • Loading branch information
swalkinshaw authored Nov 26, 2024
2 parents da298c3 + 99f5781 commit 833311e
Show file tree
Hide file tree
Showing 10 changed files with 386 additions and 619 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
12 changes: 8 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,28 @@ on:
jobs:
main:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.0', '8.1', '8.2', '8.3', '8.4']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: ${{ matrix.php }}
coverage: xdebug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get composer cache directory
id: composercache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-8.0.x-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-8.0.x-composer-
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: PHP int
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
vendor
coverage
.phpunit.result.cache
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@ Magically, everything still works. See this [comment](https://github.com/roots/w

Any existing bcrypt hashed passwords will remain that way. Any new users or users resetting a password will get a new MD5 hashed password.

**Why aren't you using the password_compat library so this works back to PHP 5.3.7?**

The [password_compact](https://github.com/ircmaxell/password_compat) library is great if you really need it. But the Roots team advocates using supported versions of PHP which of now (March 2016) is 5.5 and above. Part of security is using a version of PHP that still gets security patches so we won't actively do something to support old unsupported versions of PHP.

**Why doesn't this plugin show up in the admin?**

If you're using Composer, then the `wp-password-bcrypt.php` file is automatically autoloaded. It's not treated as a true WordPress plugin since the package type is not set to `wordpress-muplugin` so it won't show up in the plugin list.
Expand Down
12 changes: 10 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
}
},
"require": {
"php": ">=5.6.0"
"php": ">=8.0"
},
"require-dev": {
"brain/monkey": "^2.6",
"mockery/mockery": "^1.4",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"phpunit/phpunit": "<= 9.3",
"phpunit/phpunit": "^9.6",
"squizlabs/php_codesniffer": "^3.5",
"phpcompatibility/php-compatibility": "^9.3"
},
Expand All @@ -67,5 +67,13 @@
"test": "phpunit",
"lint": "phpcs",
"coverage": "XDEBUG_MODE=coverage phpunit --coverage-text --coverage-html=coverage"
},
"config": {
"platform": {
"php": "8.0.0"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading

0 comments on commit 833311e

Please sign in to comment.