Skip to content

Commit

Permalink
V4.2.2 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette authored Jun 2, 2019
2 parents 07d9035 + 9c9ae30 commit fb1b721
Show file tree
Hide file tree
Showing 413 changed files with 12,905 additions and 3,937 deletions.
6 changes: 3 additions & 3 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ $rules = [
'braces' => true,
'cast_spaces' => true,
'class_definition' => true,
'concat_space' => ['spacing' => 'one'],
'declare_equal_normalize' => true,
'elseif' => true,
'encoding' => true,
Expand Down Expand Up @@ -89,15 +90,14 @@ $rules = [
'switch_case_semicolon_to_colon' => true,
'switch_case_space' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline_array' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'visibility_required' => true,
'whitespace_after_comma_in_array' => true,

'header_comment' => [
'header' => $header,
'separate' => 'bottom',
'comment_type' => 'PHPDoc',
'header' => $header
]
];

Expand Down
13 changes: 13 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
finder:
exclude:
- "tests"
name: "*.php"
not-name:
- "*Stub.php"
- "*Test.php"

enabled:
- concat_with_spaces

disabled:
- concat_without_spaces
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ language: php
services:
- mysql
- postgresql
- memcached
- redis-server

php:
- 5.6
Expand All @@ -18,18 +20,22 @@ env:
- DB=mysql
- DB=sqlite
- DB=pgsql
- DB=memory

cache:
directories:
- $HOME/.composer/cache

before_install:
# copy sprinkles.json
- cp app/sprinkles.example.json app/sprinkles.json
# set up db
- bash build/before_install.sh $DB
# update node
- nvm install 10.12.0
# Install Redis and Memcached
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- printf "\n" | pecl install -f redis

before_script:
# install deps and UF
Expand Down
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [v4.2.2]

### Added
- New group factory (`'UserFrosting\Sprinkle\Account\Database\Models\Group'`)
- New `withController` Trait, as an alternative for deprecated `ControllerTestCase`
- StyleCI config
- [Travis] SQLite in-memory DB testing
- [Travis] enabled memcache & Redis service

### Fixed
- DefaultPermissions seed results in SQL errors ([#981]; [#983])
- Make group & role schema consistent between creation and edition. Prevents group and role without a name or slug to be created during edition.
- Factories changed to make sure slugs are unique
- 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)
- Force close db connection on test `tearDown` procedure

### Changed
- Recommended PHP version is now 7.2, as 7.1 will be EOL in less than 6 months
- Added tests coverage for all build-in controllers
- Applied styling rules from StyleCI & updated php-cs-fixer rules to match StyleCI config

### Deprecated
- `ControllerTestCase`. Use `withController` Trait instead.


## [v4.2.1]

### Added
Expand Down Expand Up @@ -731,6 +756,9 @@ See [http://learn.userfrosting.com/upgrading/40-to-41](Upgrading 4.0.x to 4.1.x
[#958]: https://github.com/userfrosting/UserFrosting/issues/958
[#963]: https://github.com/userfrosting/UserFrosting/issues/963
[#968]: https://github.com/userfrosting/UserFrosting/issues/968
[#981]: https://github.com/userfrosting/UserFrosting/issues/981
[#983]: https://github.com/userfrosting/UserFrosting/issues/983

[v4.2.0]: https://github.com/userfrosting/UserFrosting/compare/v4.1.22...v4.2.0
[v4.2.1]: https://github.com/userfrosting/UserFrosting/compare/v4.2.0...v4.2.1
[v4.2.1]: https://github.com/userfrosting/UserFrosting/compare/v4.2.0...v.4.2.1
[v4.2.2]: https://github.com/userfrosting/UserFrosting/compare/v.4.2.1...v4.2.2
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
# UserFrosting 4.2

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

| Branch | Status |
| ------ | ------ |
| 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) |
| 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) |
| Branch | Version | Build | Coverage | Style |
| ------ |:-------:|:-----:|:--------:|:-----:|
| [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] |
| [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] |
| [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] |

<!-- Links -->
[master]: https://github.com/userfrosting/UserFrosting
[hotfix]: https://github.com/userfrosting/UserFrosting/tree/hotfix
[develop]: https://github.com/userfrosting/UserFrosting/tree/develop
[UF-Travis]: https://travis-ci.org/userfrosting/UserFrosting
[UF-Codecov]: https://codecov.io/gh/userfrosting/userfrosting
[style-master]: https://github.styleci.io/repos/18148206/shield?branch=master&style=flat
[style-hotfix]: https://github.styleci.io/repos/18148206/shield?branch=hotfix&style=flat
[style-develop]: https://github.styleci.io/repos/18148206/shield?branch=develop&style=flat
[style]: https://github.styleci.io/repos/18148206

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

Expand Down
7 changes: 4 additions & 3 deletions app/defines.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
/**

/*
* UserFrosting (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/UserFrosting
Expand All @@ -10,10 +11,10 @@
namespace UserFrosting;

// Some standard defines
define('UserFrosting\VERSION', '4.2.1');
define('UserFrosting\VERSION', '4.2.2');
define('UserFrosting\DS', '/');
define('UserFrosting\PHP_MIN_VERSION', '5.6');
define('UserFrosting\PHP_RECOMMENDED_VERSION', '7.1');
define('UserFrosting\PHP_RECOMMENDED_VERSION', '7.2');
define('UserFrosting\NODE_MIN_VERSION', 'v10.12.0');
define('UserFrosting\NPM_MIN_VERSION', '6.0.0');

Expand Down
5 changes: 3 additions & 2 deletions app/sprinkles/account/config/debug.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
/**

/*
* UserFrosting (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/UserFrosting
Expand All @@ -12,6 +13,6 @@
*/
return [
'debug' => [
'auth' => true
'auth' => true,
],
];
37 changes: 19 additions & 18 deletions app/sprinkles/account/config/default.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
/**

/*
* UserFrosting (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/UserFrosting
Expand Down Expand Up @@ -33,7 +34,7 @@
* to log. This can help debugging your permissions and roles
*/
'debug' => [
'auth' => false
'auth' => false,
],

/*
Expand All @@ -45,8 +46,8 @@
'algorithm' => 'sha512',
'timeouts' => [
'create' => 86400,
'reset' => 10800
]
'reset' => 10800,
],
],

/*
Expand All @@ -57,12 +58,12 @@
*/
'remember_me' => [
'cookie' => [
'name' => 'rememberme'
'name' => 'rememberme',
],
'expire_time' => 604800,
'session' => [
'path' => '/'
]
'path' => '/',
],
],

/*
Expand All @@ -74,7 +75,7 @@
*/
'reserved_user_ids' => [
'guest' => -1,
'master' => 1
'master' => 1,
],

/*
Expand All @@ -86,8 +87,8 @@
'session' => [
'keys' => [
'current_user_id' => 'account.current_user_id', // the key to use for storing the authenticated user's id
'captcha' => 'account.captcha' // Key used to store a captcha hash during captcha verification
]
'captcha' => 'account.captcha', // Key used to store a captcha hash during captcha verification
],
],

/*
Expand All @@ -99,7 +100,7 @@
*/
'site' => [
'login' => [
'enable_email' => true // Set to false to allow login by username only
'enable_email' => true, // Set to false to allow login by username only
],
'registration' => [
'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
Expand All @@ -110,10 +111,10 @@
'locale' => 'en_US',
'group' => 'terran',
'roles' => [
'user' => true
]
]
]
'user' => true,
],
],
],
],

/*
Expand All @@ -129,7 +130,7 @@
'password_reset_request' => null,
'registration_attempt' => null,
'sign_in_attempt' => null,
'verification_request' => null
'verification_request' => null,
],

/*
Expand All @@ -139,6 +140,6 @@
*/
'verification' => [
'algorithm' => 'sha512',
'timeout' => 10800
]
'timeout' => 10800,
],
];
27 changes: 14 additions & 13 deletions app/sprinkles/account/config/production.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
/**

/*
* UserFrosting (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/UserFrosting
Expand All @@ -24,8 +25,8 @@
'method' => 'ip',
'interval' => 3600,
'delays' => [
40 => 1000
]
40 => 1000,
],
],
'password_reset_request' => [
'method' => 'ip',
Expand All @@ -36,8 +37,8 @@
4 => 20,
5 => 40,
6 => 80,
7 => 600
]
7 => 600,
],
],
'registration_attempt' => [
'method' => 'ip',
Expand All @@ -48,8 +49,8 @@
4 => 20,
5 => 40,
6 => 80,
7 => 600
]
7 => 600,
],
],
'sign_in_attempt' => [
'method' => 'ip',
Expand All @@ -60,8 +61,8 @@
6 => 20,
7 => 40,
8 => 80,
9 => 600
]
9 => 600,
],
],
'verification_request' => [
'method' => 'ip',
Expand All @@ -72,8 +73,8 @@
4 => 20,
5 => 40,
6 => 80,
7 => 600
]
]
]
7 => 600,
],
],
],
];
22 changes: 22 additions & 0 deletions app/sprinkles/account/factories/Group.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

/*
* UserFrosting (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/UserFrosting
* @copyright Copyright (c) 2019 Alexander Weissman
* @license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)
*/

use League\FactoryMuffin\Faker\Facade as Faker;

/*
* General factory for the Group Model
*/
$fm->define('UserFrosting\Sprinkle\Account\Database\Models\Group')->setDefinitions([
'name' => Faker::word(),
'description' => Faker::paragraph(),
'slug' => function ($object, $saved) {
return uniqid();
},
]);
Loading

0 comments on commit fb1b721

Please sign in to comment.