Skip to content

Commit a6abdec

Browse files
committed
Merge branch 'develop' into develop-4.3-jordan
2 parents 10fa02c + fc00e07 commit a6abdec

421 files changed

Lines changed: 13879 additions & 4078 deletions

File tree

Some content is hidden

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

.github/stale.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Configuration for probot-stale - https://github.com/probot/stale
2+
3+
# Number of days of inactivity before an Issue or Pull Request becomes stale
4+
daysUntilStale: 550
5+
6+
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7+
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
8+
daysUntilClose: 7
9+
10+
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
11+
onlyLabels: []
12+
13+
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
14+
exemptLabels:
15+
- "confirmed bug"
16+
- security
17+
- "long-range planning"
18+
19+
# Set to true to ignore issues in a project (defaults to false)
20+
exemptProjects: false
21+
22+
# Set to true to ignore issues in a milestone (defaults to false)
23+
exemptMilestones: true
24+
25+
# Set to true to ignore issues with an assignee (defaults to false)
26+
exemptAssignees: false
27+
28+
# Label to use when marking as stale
29+
staleLabel: wontfix
30+
31+
# Comment to post when marking as stale. Set to `false` to disable
32+
markComment: >
33+
This issue has been automatically marked as stale because it has not had
34+
recent activity. It will be closed if no further activity occurs. Thank you
35+
for your contributions.
36+
37+
# Comment to post when removing the stale label.
38+
# unmarkComment: >
39+
# Your comment here.
40+
41+
# Comment to post when closing a stale Issue or Pull Request.
42+
# closeComment: >
43+
# Your comment here.
44+
45+
# Limit the number of actions per hour, from 1-30. Default is 30
46+
limitPerRun: 30
47+
48+
# Limit to only `issues` or `pulls`
49+
# only: issues
50+
51+
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
52+
# pulls:
53+
# daysUntilStale: 30
54+
# markComment: >
55+
# This pull request has been automatically marked as stale because it has not had
56+
# recent activity. It will be closed if no further activity occurs. Thank you
57+
# for your contributions.
58+
59+
# issues:
60+
# exemptLabels:
61+
# - confirmed

.php_cs

Lines changed: 3 additions & 3 deletions
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

Lines changed: 13 additions & 0 deletions
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

Lines changed: 8 additions & 2 deletions
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
- 7.1
@@ -16,22 +18,26 @@ env:
1618
- DB=mysql
1719
- DB=sqlite
1820
- DB=pgsql
21+
- DB=memory
1922

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

3238
before_script:
3339
# install deps and UF
34-
- composer install
40+
- COMPOSER_MEMORY_LIMIT=-1 travis_retry composer install --no-interaction
3541
- php bakery debug
3642
- php bakery build-assets
3743
- php bakery migrate

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,50 @@ 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+
33+
## [v4.2.1]
34+
35+
### Added
36+
- `UserFrosting\Sprinkle\Core\Database\Models\Session` model for the `sessions` db table.
37+
- `TEST_SESSION_HANDLER` environment variable to set the session save handler to use for Testing.
38+
- `withDatabaseSessionHandler` Trait for testing. Use `$this->useDatabaseSessionHandler()` to use database session handler in tests.
39+
40+
### Fixed
41+
- Italian translation ([#950])
42+
- User Registration failing when trying to register two accounts with the same email address ([#953])
43+
- Bad test case for `CoreController::getAsset`.
44+
- User Model `forceDelete` doesn't remove the record from the DB ([#951])
45+
- Fix PHP Fatal error that can be thrown when registering a new User
46+
- Session not working with database handler ([#952])
47+
- Remove any persistences when forceDeleting user to prevent Foreign Key Constraints issue ([#963])
48+
- More helpful error message in checkEnvironment.php (Thanks @amosfolz; [#958])
49+
- Hide locale select from UI if only one locale is available (Thanks @avsdev-cw; [#968])
50+
- Download CSV filename error ([#893])
51+
852
## [v4.2.0]
953
### Changed Requirements
1054
- Changed minimum Node.js version to **v10.12.0**
@@ -702,7 +746,19 @@ See [http://learn.userfrosting.com/upgrading/40-to-41](Upgrading 4.0.x to 4.1.x
702746
[#869]: https://github.com/userfrosting/UserFrosting/issues/869
703747
[#872]: https://github.com/userfrosting/UserFrosting/issues/872
704748
[#888]: https://github.com/userfrosting/UserFrosting/issues/888
749+
[#893]: https://github.com/userfrosting/UserFrosting/issues/893
705750
[#919]: https://github.com/userfrosting/UserFrosting/issues/919
706751
[#940]: https://github.com/userfrosting/UserFrosting/issues/940
752+
[#950]: https://github.com/userfrosting/UserFrosting/issues/950
753+
[#951]: https://github.com/userfrosting/UserFrosting/issues/951
754+
[#952]: https://github.com/userfrosting/UserFrosting/issues/952
755+
[#953]: https://github.com/userfrosting/UserFrosting/issues/953
756+
[#958]: https://github.com/userfrosting/UserFrosting/issues/958
757+
[#963]: https://github.com/userfrosting/UserFrosting/issues/963
758+
[#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
707761

708762
[v4.2.0]: https://github.com/userfrosting/UserFrosting/compare/v4.1.22...v4.2.0
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

Lines changed: 17 additions & 4 deletions
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

Lines changed: 4 additions & 3 deletions
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.0');
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

Lines changed: 3 additions & 2 deletions
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

Lines changed: 19 additions & 18 deletions
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
];

0 commit comments

Comments
 (0)