Skip to content

Commit fb1b721

Browse files
authored
V4.2.2 Release
2 parents 07d9035 + 9c9ae30 commit fb1b721

File tree

413 files changed

+12905
-3937
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

413 files changed

+12905
-3937
lines changed

.php_cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ $rules = [
1616
'braces' => true,
1717
'cast_spaces' => true,
1818
'class_definition' => true,
19+
'concat_space' => ['spacing' => 'one'],
1920
'declare_equal_normalize' => true,
2021
'elseif' => true,
2122
'encoding' => true,
@@ -89,15 +90,14 @@ $rules = [
8990
'switch_case_semicolon_to_colon' => true,
9091
'switch_case_space' => true,
9192
'ternary_operator_spaces' => true,
93+
'trailing_comma_in_multiline_array' => true,
9294
'trim_array_spaces' => true,
9395
'unary_operator_spaces' => true,
9496
'visibility_required' => true,
9597
'whitespace_after_comma_in_array' => true,
9698

9799
'header_comment' => [
98-
'header' => $header,
99-
'separate' => 'bottom',
100-
'comment_type' => 'PHPDoc',
100+
'header' => $header
101101
]
102102
];
103103

.styleci.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
finder:
2+
exclude:
3+
- "tests"
4+
name: "*.php"
5+
not-name:
6+
- "*Stub.php"
7+
- "*Test.php"
8+
9+
enabled:
10+
- concat_with_spaces
11+
12+
disabled:
13+
- concat_without_spaces

.travis.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ language: php
55
services:
66
- mysql
77
- postgresql
8+
- memcached
9+
- redis-server
810

911
php:
1012
- 5.6
@@ -18,18 +20,22 @@ env:
1820
- DB=mysql
1921
- DB=sqlite
2022
- DB=pgsql
23+
- DB=memory
2124

2225
cache:
2326
directories:
2427
- $HOME/.composer/cache
25-
28+
2629
before_install:
2730
# copy sprinkles.json
2831
- cp app/sprinkles.example.json app/sprinkles.json
2932
# set up db
3033
- bash build/before_install.sh $DB
3134
# update node
3235
- nvm install 10.12.0
36+
# Install Redis and Memcached
37+
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
38+
- printf "\n" | pecl install -f redis
3339

3440
before_script:
3541
# install deps and UF

CHANGELOG.md

+29-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [v4.2.2]
9+
10+
### Added
11+
- New group factory (`'UserFrosting\Sprinkle\Account\Database\Models\Group'`)
12+
- New `withController` Trait, as an alternative for deprecated `ControllerTestCase`
13+
- StyleCI config
14+
- [Travis] SQLite in-memory DB testing
15+
- [Travis] enabled memcache & Redis service
16+
17+
### Fixed
18+
- DefaultPermissions seed results in SQL errors ([#981]; [#983])
19+
- Make group & role schema consistent between creation and edition. Prevents group and role without a name or slug to be created during edition.
20+
- Factories changed to make sure slugs are unique
21+
- Fix `WithTestUser` Trait returning a user with id of zero or reserve master id when a non-master user was asked. If master user already exist, will return it instead of trying to create a new one (with the same id)
22+
- Force close db connection on test `tearDown` procedure
23+
24+
### Changed
25+
- Recommended PHP version is now 7.2, as 7.1 will be EOL in less than 6 months
26+
- Added tests coverage for all build-in controllers
27+
- Applied styling rules from StyleCI & updated php-cs-fixer rules to match StyleCI config
28+
29+
### Deprecated
30+
- `ControllerTestCase`. Use `withController` Trait instead.
31+
32+
833
## [v4.2.1]
934

1035
### Added
@@ -731,6 +756,9 @@ See [http://learn.userfrosting.com/upgrading/40-to-41](Upgrading 4.0.x to 4.1.x
731756
[#958]: https://github.com/userfrosting/UserFrosting/issues/958
732757
[#963]: https://github.com/userfrosting/UserFrosting/issues/963
733758
[#968]: https://github.com/userfrosting/UserFrosting/issues/968
759+
[#981]: https://github.com/userfrosting/UserFrosting/issues/981
760+
[#983]: https://github.com/userfrosting/UserFrosting/issues/983
734761

735762
[v4.2.0]: https://github.com/userfrosting/UserFrosting/compare/v4.1.22...v4.2.0
736-
[v4.2.1]: https://github.com/userfrosting/UserFrosting/compare/v4.2.0...v4.2.1
763+
[v4.2.1]: https://github.com/userfrosting/UserFrosting/compare/v4.2.0...v.4.2.1
764+
[v4.2.2]: https://github.com/userfrosting/UserFrosting/compare/v.4.2.1...v4.2.2

README.md

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
11
# UserFrosting 4.2
22

33
[![Latest Version](https://img.shields.io/github/release/userfrosting/UserFrosting.svg)](https://github.com/userfrosting/UserFrosting/releases)
4+
![PHP Version](https://img.shields.io/packagist/php-v/userfrosting/userfrosting.svg?color=brightgreen)
45
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE.md)
56
[![Join the chat at https://chat.userfrosting.com/channel/support](https://demo.rocket.chat/images/join-chat.svg)](https://chat.userfrosting.com/channel/support)
67
[![Backers on Open Collective](https://opencollective.com/userfrosting/backers/badge.svg)](#backers)
78
[![Sponsors on Open Collective](https://opencollective.com/userfrosting/sponsors/badge.svg)](#sponsors)
89
[![Donate](https://img.shields.io/badge/Open%20Collective-Donate-blue.svg)](https://opencollective.com/userfrosting#backer)
910

10-
| Branch | Status |
11-
| ------ | ------ |
12-
| master | [![Build Status](https://travis-ci.org/userfrosting/UserFrosting.svg?branch=master)](https://travis-ci.org/userfrosting/UserFrosting) [![codecov](https://codecov.io/gh/userfrosting/userfrosting/branch/master/graph/badge.svg)](https://codecov.io/gh/userfrosting/userfrosting/branch/master) |
13-
| develop | [![Build Status](https://travis-ci.org/userfrosting/UserFrosting.svg?branch=develop)](https://travis-ci.org/userfrosting/UserFrosting) [![codecov](https://codecov.io/gh/userfrosting/userfrosting/branch/develop/graph/badge.svg)](https://codecov.io/gh/userfrosting/userfrosting/branch/develop) |
11+
| Branch | Version | Build | Coverage | Style |
12+
| ------ |:-------:|:-----:|:--------:|:-----:|
13+
| [master] | ![](https://img.shields.io/github/release/userfrosting/userfrosting.svg?color=success&label=Version) | [![](https://travis-ci.org/userfrosting/UserFrosting.svg?branch=master)][UF-Travis] | [![](https://codecov.io/gh/userfrosting/userfrosting/branch/master/graph/badge.svg)][UF-Codecov] | [![][style-master]][style] |
14+
| [hotfix] | ![](https://img.shields.io/badge/Version-v4.2.x-yellow.svg) | [![](https://travis-ci.org/userfrosting/UserFrosting.svg?branch=hotfix)][UF-Travis] | [![](https://codecov.io/gh/userfrosting/userfrosting/branch/hotfix/graph/badge.svg)][UF-Codecov] | [![][style-hotfix]][style] |
15+
| [develop] | ![](https://img.shields.io/badge/Version-v4.3.x-orange.svg) | [![](https://travis-ci.org/userfrosting/UserFrosting.svg?branch=develop)][UF-Travis] | [![](https://codecov.io/gh/userfrosting/userfrosting/branch/develop/graph/badge.svg)][UF-Codecov] | [![][style-develop]][style] |
16+
17+
<!-- Links -->
18+
[master]: https://github.com/userfrosting/UserFrosting
19+
[hotfix]: https://github.com/userfrosting/UserFrosting/tree/hotfix
20+
[develop]: https://github.com/userfrosting/UserFrosting/tree/develop
21+
[UF-Travis]: https://travis-ci.org/userfrosting/UserFrosting
22+
[UF-Codecov]: https://codecov.io/gh/userfrosting/userfrosting
23+
[style-master]: https://github.styleci.io/repos/18148206/shield?branch=master&style=flat
24+
[style-hotfix]: https://github.styleci.io/repos/18148206/shield?branch=hotfix&style=flat
25+
[style-develop]: https://github.styleci.io/repos/18148206/shield?branch=develop&style=flat
26+
[style]: https://github.styleci.io/repos/18148206
1427

1528
[https://www.userfrosting.com](https://www.userfrosting.com)
1629

app/defines.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
2-
/**
2+
3+
/*
34
* UserFrosting (http://www.userfrosting.com)
45
*
56
* @link https://github.com/userfrosting/UserFrosting
@@ -10,10 +11,10 @@
1011
namespace UserFrosting;
1112

1213
// Some standard defines
13-
define('UserFrosting\VERSION', '4.2.1');
14+
define('UserFrosting\VERSION', '4.2.2');
1415
define('UserFrosting\DS', '/');
1516
define('UserFrosting\PHP_MIN_VERSION', '5.6');
16-
define('UserFrosting\PHP_RECOMMENDED_VERSION', '7.1');
17+
define('UserFrosting\PHP_RECOMMENDED_VERSION', '7.2');
1718
define('UserFrosting\NODE_MIN_VERSION', 'v10.12.0');
1819
define('UserFrosting\NPM_MIN_VERSION', '6.0.0');
1920

app/sprinkles/account/config/debug.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
2-
/**
2+
3+
/*
34
* UserFrosting (http://www.userfrosting.com)
45
*
56
* @link https://github.com/userfrosting/UserFrosting
@@ -12,6 +13,6 @@
1213
*/
1314
return [
1415
'debug' => [
15-
'auth' => true
16+
'auth' => true,
1617
],
1718
];

app/sprinkles/account/config/default.php

+19-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
2-
/**
2+
3+
/*
34
* UserFrosting (http://www.userfrosting.com)
45
*
56
* @link https://github.com/userfrosting/UserFrosting
@@ -33,7 +34,7 @@
3334
* to log. This can help debugging your permissions and roles
3435
*/
3536
'debug' => [
36-
'auth' => false
37+
'auth' => false,
3738
],
3839

3940
/*
@@ -45,8 +46,8 @@
4546
'algorithm' => 'sha512',
4647
'timeouts' => [
4748
'create' => 86400,
48-
'reset' => 10800
49-
]
49+
'reset' => 10800,
50+
],
5051
],
5152

5253
/*
@@ -57,12 +58,12 @@
5758
*/
5859
'remember_me' => [
5960
'cookie' => [
60-
'name' => 'rememberme'
61+
'name' => 'rememberme',
6162
],
6263
'expire_time' => 604800,
6364
'session' => [
64-
'path' => '/'
65-
]
65+
'path' => '/',
66+
],
6667
],
6768

6869
/*
@@ -74,7 +75,7 @@
7475
*/
7576
'reserved_user_ids' => [
7677
'guest' => -1,
77-
'master' => 1
78+
'master' => 1,
7879
],
7980

8081
/*
@@ -86,8 +87,8 @@
8687
'session' => [
8788
'keys' => [
8889
'current_user_id' => 'account.current_user_id', // the key to use for storing the authenticated user's id
89-
'captcha' => 'account.captcha' // Key used to store a captcha hash during captcha verification
90-
]
90+
'captcha' => 'account.captcha', // Key used to store a captcha hash during captcha verification
91+
],
9192
],
9293

9394
/*
@@ -99,7 +100,7 @@
99100
*/
100101
'site' => [
101102
'login' => [
102-
'enable_email' => true // Set to false to allow login by username only
103+
'enable_email' => true, // Set to false to allow login by username only
103104
],
104105
'registration' => [
105106
'enabled' => true, //if this set to false, you probably want to also set require_email_verification to false as well to disable the link on the signup page
@@ -110,10 +111,10 @@
110111
'locale' => 'en_US',
111112
'group' => 'terran',
112113
'roles' => [
113-
'user' => true
114-
]
115-
]
116-
]
114+
'user' => true,
115+
],
116+
],
117+
],
117118
],
118119

119120
/*
@@ -129,7 +130,7 @@
129130
'password_reset_request' => null,
130131
'registration_attempt' => null,
131132
'sign_in_attempt' => null,
132-
'verification_request' => null
133+
'verification_request' => null,
133134
],
134135

135136
/*
@@ -139,6 +140,6 @@
139140
*/
140141
'verification' => [
141142
'algorithm' => 'sha512',
142-
'timeout' => 10800
143-
]
143+
'timeout' => 10800,
144+
],
144145
];

app/sprinkles/account/config/production.php

+14-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
2-
/**
2+
3+
/*
34
* UserFrosting (http://www.userfrosting.com)
45
*
56
* @link https://github.com/userfrosting/UserFrosting
@@ -24,8 +25,8 @@
2425
'method' => 'ip',
2526
'interval' => 3600,
2627
'delays' => [
27-
40 => 1000
28-
]
28+
40 => 1000,
29+
],
2930
],
3031
'password_reset_request' => [
3132
'method' => 'ip',
@@ -36,8 +37,8 @@
3637
4 => 20,
3738
5 => 40,
3839
6 => 80,
39-
7 => 600
40-
]
40+
7 => 600,
41+
],
4142
],
4243
'registration_attempt' => [
4344
'method' => 'ip',
@@ -48,8 +49,8 @@
4849
4 => 20,
4950
5 => 40,
5051
6 => 80,
51-
7 => 600
52-
]
52+
7 => 600,
53+
],
5354
],
5455
'sign_in_attempt' => [
5556
'method' => 'ip',
@@ -60,8 +61,8 @@
6061
6 => 20,
6162
7 => 40,
6263
8 => 80,
63-
9 => 600
64-
]
64+
9 => 600,
65+
],
6566
],
6667
'verification_request' => [
6768
'method' => 'ip',
@@ -72,8 +73,8 @@
7273
4 => 20,
7374
5 => 40,
7475
6 => 80,
75-
7 => 600
76-
]
77-
]
78-
]
76+
7 => 600,
77+
],
78+
],
79+
],
7980
];
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
/*
4+
* UserFrosting (http://www.userfrosting.com)
5+
*
6+
* @link https://github.com/userfrosting/UserFrosting
7+
* @copyright Copyright (c) 2019 Alexander Weissman
8+
* @license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)
9+
*/
10+
11+
use League\FactoryMuffin\Faker\Facade as Faker;
12+
13+
/*
14+
* General factory for the Group Model
15+
*/
16+
$fm->define('UserFrosting\Sprinkle\Account\Database\Models\Group')->setDefinitions([
17+
'name' => Faker::word(),
18+
'description' => Faker::paragraph(),
19+
'slug' => function ($object, $saved) {
20+
return uniqid();
21+
},
22+
]);

0 commit comments

Comments
 (0)