Skip to content

Commit

Permalink
Enable laravel 9 (#56)
Browse files Browse the repository at this point in the history
* feat: Enables Laravel 9

Closes #55
  • Loading branch information
Oliver Schupp authored Feb 13, 2022
1 parent d252115 commit 52f845c
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 34 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on: [push, pull_request, workflow_dispatch]
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.4', '8.0', '8.1']
phpunit-versions: ['latest']
include:
- operating-system: 'ubuntu-latest'
php-versions: '7.2'
phpunit-versions: '8.5.21'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
ini-values: post_max_size=256M, max_execution_time=180
tools: phpunit:${{ matrix.phpunit-versions }}
coverage: xdebug
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Test with phpunit
run: vendor/bin/phpunit --coverage-text
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ composer.phar
composer.lock
.DS_Store
.idea
/.phpunit.result.cache
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PasswordStrength Package
================
[![Build Status](https://travis-ci.org/schuppo/PasswordStrengthPackage.png?branch=2.x)](https://travis-ci.org/schuppo/PasswordStrengthPackage)
![Build Status](https://github.com/schuppo/PasswordStrengthPackage/actions/workflows/unit_test.yml/badge.svg)
[![Total Downloads](https://poser.pugx.org/schuppo/password-strength/downloads)](https://packagist.org/packages/schuppo/password-strength)
[![License](https://poser.pugx.org/schuppo/password-strength/license)](https://packagist.org/packages/schuppo/password-strength)

This package provides a validator that ensures strong passwords in Laravel 4, 5 & 6 applications. It is influenced a lot by [PasswordStrengthBundle for Symfony 2](https://github.com/jbafford/PasswordStrengthBundle).
This package provides a validator that ensures strong passwords in Laravel 4 - 9 applications. It is influenced a lot by [PasswordStrengthBundle for Symfony 2](https://github.com/jbafford/PasswordStrengthBundle).

It is out now for a while and since there were no complaints it very likely fulfills its purpose.

Expand All @@ -21,7 +21,7 @@ The provided validations include:

### Get the package

**For Laravel 6/7 users**
**For Laravel 6 - 9 users**
> Requires PHP 7.1+
Just ```composer require schuppo/password-strength:"~2.0"```.
Expand All @@ -40,7 +40,7 @@ Just ```composer require schuppo/password-strength:"~0.10"```.
**Caution**

I recently recognized a small conflict in the usage of this package in combination with [unique-with](https://github.com/felixkiss/uniquewith-validator): One runs into problems when adding the ```PasswordStrengthServiceProvider``` **after** ```UniqueWithValidatorServiceProvider``` to the providers array, the rules of this package stay unknown to the Laravel ```Validator```.
I recognized a small conflict in the usage of this package in combination with [unique-with](https://github.com/felixkiss/uniquewith-validator): One runs into problems when adding the ```PasswordStrengthServiceProvider``` **after** ```UniqueWithValidatorServiceProvider``` to the providers array, the rules of this package stay unknown to the Laravel ```Validator```.

The problem is easy to fix though: Just add the service provider of this package in front of the service provider of *unique-with*. In that order both packages work fine.

Expand All @@ -67,7 +67,10 @@ Notice that you can validate any value with the new rules. The only reason why t

# History

**[Laravel 6 / 7 / 8]**
**[Laravel 6 - 9]**

**[2.5]**
- Added support for Laravel 9

**[2.4]**

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
"authors": [
{
"name": "Oliver Schupp",
"email": "[email protected]"
"email": "[email protected]"
}
],
"require": {
"php": ">=7.1.0",
"illuminate/support": "^5.1|^6.0|^7.0|^8.0",
"illuminate/translation": "^5.1|6.*|7.*|8.*"
"illuminate/support": "^5.1|^6.0|^7.0|^8.0|^9.0",
"illuminate/translation": "^5.1|6.*|7.*|8.*|9.*"
},
"require-dev": {
"illuminate/validation": "~5.1|6.*|7.*|8.*",
"illuminate/validation": "~5.1|6.*|7.*|8.*|9.*",
"phpunit/phpunit": "^6.0|^7.0|^8.0",
"orchestra/testbench": "^3.5|^4.0|^5.0|^6.0"
},
Expand Down

0 comments on commit 52f845c

Please sign in to comment.