Skip to content

Commit 16c8807

Browse files
authored
Merge branch 'codeigniter4:develop' into patch-1
2 parents 0216f6f + 3aeafc8 commit 16c8807

File tree

31 files changed

+395
-55
lines changed

31 files changed

+395
-55
lines changed

.github/workflows/docs.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: docs
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-python@v4
12+
with:
13+
python-version: 3.x
14+
- run: pip install mkdocs-material
15+
- run: mkdocs gh-deploy --force

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ phpunit
66
composer.lock
77
.DS_Store
88
.idea/
9+
site

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,16 @@ See the [An Official Auth Library](https://codeigniter.com/news/shield) for more
4747

4848
Usage of Shield requires the following:
4949

50-
- A [CodeIgniter 4.2.3+](https://github.com/codeigniter4/CodeIgniter4/) based project
50+
- A [CodeIgniter 4.2.7+](https://github.com/codeigniter4/CodeIgniter4/) based project
5151
- [Composer](https://getcomposer.org/) for package management
5252
- PHP 7.4.3+
5353

5454
### Installation
5555

5656
Installation is done through Composer.
57-
58-
> composer require codeigniter4/shield
57+
```console
58+
composer require codeigniter4/shield
59+
```
5960

6061
See the [docs](docs/index.md) for more specific instructions on installation and usage recommendations.
6162

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"require-dev": {
2525
"codeigniter4/devkit": "^1.0",
26-
"codeigniter4/framework": "^4.2.3",
26+
"codeigniter4/framework": "^4.2.7",
2727
"mockery/mockery": "^1.0"
2828
},
2929
"provide": {

docs/assets/favicon.ico

4.97 KB
Binary file not shown.

docs/assets/flame.svg

Lines changed: 11 additions & 0 deletions
Loading

docs/assets/hljs.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
document.addEventListener('DOMContentLoaded', (event) => {
2+
hljs.highlightAll();
3+
});

docs/concepts.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@ on the standard Config class if nothing is found in the database.
2525
## User Providers
2626

2727
You can use your own models to handle user persistence. Shield calls this the "User Provider" class. A default model
28-
is provided for you at `CodeIgniter\Shield\Models\UserModel`. You can change this in the `Config\Auth->userProvider` setting.
28+
is provided for you at `CodeIgniter\Shield\Models\UserModel`. You can change this in the `Config\Auth::$userProvider` setting.
2929
The only requirement is that your new class MUST extend the provided `UserModel`.
3030

3131
```php
3232
public $userProvider = 'CodeIgniter\Shield\Models\UserModel';
3333
```
3434

35-
<a name="identities" />
36-
3735
## User Identities
3836

3937
User accounts are stored separately from the information needed to identify that user. These identifying pieces of data are
@@ -59,13 +57,13 @@ systems that are appropriate for your application. The following Validators are
5957
like ensuring it contained a symbol, a number, etc. According to the current
6058
[NIST recommendations](https://pages.nist.gov/800-63-3/sp800-63b.html) this only enforces a
6159
minimum length on the password. You can define the minimum length in
62-
`Config\Auth->public $minimumPasswordLength;` This is enabled by default. The default minimum
60+
`Config\Auth::$minimumPasswordLength` This is enabled by default. The default minimum
6361
value is `8`.
6462
- **NothingPersonalValidator** will compare the password against any fields that have been specified
65-
in `Config\Auth->personalFields`, like first or last names, etc. Additionally, it compares it
63+
in `Config\Auth::$personalFields`, like first or last names, etc. Additionally, it compares it
6664
against a few simple variations of the username. If the given password too closely matches
6765
any of the personal information, it will be rejected. The similarity value is defined in
68-
`Config\Auth->maxSimilarity`. The default value is 50, but see the docblock in the config
66+
`Config\Auth::$maxSimilarity`. The default value is 50, but see the docblock in the config
6967
file for more details. This is enabled by default.
7068
- **DictionaryValidator** will compare the password against a provided file with about 600,000
7169
frequently used passwords that have been seen in various data dumps over the years. If the
@@ -78,7 +76,7 @@ systems that are appropriate for your application. The following Validators are
7876
find acceptable. You should use either this validator or the `DictionaryValidator`, not both.
7977
This is disabled by default.
8078

81-
You can choose which validators are used in `Config\Auth->passwordValidators`:
79+
You can choose which validators are used in `Config\Auth::$passwordValidators`:
8280

8381
```php
8482
public $passwordValidators = [

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
* [Testing](testing.md)
1111
* [Customization](customization.md)
1212

13-
Guides:
13+
## Guides
1414
* [Protecting an API with Access Tokens](guides/api_tokens.md)
1515
* [Mobile Authentication with Access Tokens](guides/mobile_apps.md)

docs/install.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ These instructions assume that you have already [installed the CodeIgniter 4 app
1717
## Requirements
1818

1919
- [Composer](https://getcomposer.org)
20-
- Codeigniter **v4.2.3** or later
20+
- Codeigniter **v4.2.7** or later
2121
- A created database that you can access via the Spark CLI script
2222

2323
## Composer Installation
2424

2525
Installation is done through [Composer](https://getcomposer.org). The example assumes you have it installed globally.
2626
If you have it installed as a phar, or otherwise you will need to adjust the way you call composer itself.
2727

28-
```
29-
> composer require codeigniter4/shield
28+
```console
29+
composer require codeigniter4/shield
3030
```
3131

3232
### Troubleshooting
@@ -35,29 +35,29 @@ If you have it installed as a phar, or otherwise you will need to adjust the way
3535

3636
If you get the following error:
3737

38-
```
39-
Could not find a version of package codeigniter4/shield matching your minimum-stability (stable).
40-
Require it with an explicit version constraint allowing its desired stability.
38+
```console
39+
Could not find a version of package codeigniter4/shield matching your minimum-stability (stable).
40+
Require it with an explicit version constraint allowing its desired stability.
4141
```
4242

4343
1. Add the following to change your [minimum-stability](https://getcomposer.org/doc/articles/versions.md#minimum-stability) in your project `composer.json`:
4444

4545
```json
46-
"minimum-stability": "dev",
47-
"prefer-stable": true,
46+
"minimum-stability": "dev",
47+
"prefer-stable": true,
4848
```
4949

5050
2. Or specify an explicit version:
5151

5252
```console
53-
> composer require codeigniter4/shield:dev-develop
53+
composer require codeigniter4/shield:dev-develop
5454
```
5555

5656
The above specifies `develop` branch.
5757
See https://getcomposer.org/doc/articles/versions.md#branches
5858

5959
```console
60-
> composer require codeigniter4/shield:^1.0.0-beta
60+
composer require codeigniter4/shield:^1.0.0-beta
6161
```
6262

6363
The above specifies `v1.0.0-beta` or later and before `v2.0.0`.
@@ -70,7 +70,7 @@ If you get the following error:
7070
1. Run the following command. This command handles steps 1-5 of *Manual Setup* and runs the migrations.
7171

7272
```console
73-
> php spark shield:setup
73+
php spark shield:setup
7474
```
7575

7676
### Manual Setup
@@ -120,7 +120,7 @@ your project.
120120
5. **Migration** Run the migrations.
121121

122122
```console
123-
> php spark migrate --all
123+
php spark migrate --all
124124
```
125125

126126
#### Note: migration error

0 commit comments

Comments
 (0)