Skip to content

Commit b1dcbdb

Browse files
Merge branch 'develop' of https://github.com/userfrosting/UserFrosting into develop-jordan
2 parents 145dd4b + 213e697 commit b1dcbdb

36 files changed

Lines changed: 829 additions & 115 deletions

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ env:
1919
- DB=sqlite
2020
- DB=pgsql
2121

22+
cache:
23+
directories:
24+
- $HOME/.composer/cache
25+
2226
before_install:
2327
# copy sprinkles.json
2428
- cp app/sprinkles.example.json app/sprinkles.json

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,28 @@ 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-
## 4.2.0
8+
## 4.2.0-beta.2
9+
10+
### Added
11+
- Added `sprinkle:list` bakery command
12+
- Changed the sprinkle list in the bakery `debug` command to use the new `sprinkle:list` table
13+
14+
### Fix
15+
- Fix for `Test` Bakery command
16+
- Added `coverage-format` and `coverage-path` options to `test` Bakery command
17+
- Sprinkle Testscope is now case insensitive
18+
- **Class testscope now relative to `/` instead of `/UserFrosting/Sprinkle/` for more intuitive usage and to enable testing of non sprinkle tests**
19+
- Detect and use the sprinkle `phpunit.xml` config when testing a specific sprinkle
20+
- SprinkleManager Improvements :
21+
- Added public `getSprinklePath` method to get path to the sprinkle directory
22+
- Added public `getSprinkleClassNamespace` method to get sprinkle base namespace
23+
- Added public `getSprinkle` method. Returns the sprinkle name as formatted in `sprinkles.json` file, independent of the case of the search argument.
24+
- Public `isAvailable` method now case insensitive.
25+
- Added public `getSprinklesPath` & `setSprinklesPath` to return or set the path to the sprinkle dir (`app/sprinkles/`)
26+
- Added `JsonException` if `sprinkles.json` doesn't contain valid json.
27+
- Added specific tests for sprinkleManager with 100% test coverage
28+
29+
## 4.2.0-beta.1
930

1031
### Changed Requirements
1132
- Changed minimum Node.js version to **v10.12.0**

app/sprinkles/account/routes/routes.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* @license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)
88
*/
99

10+
use UserFrosting\Sprinkle\Core\Util\NoCache;
11+
1012
$app->group('/account', function () {
1113
$this->get('/captcha', 'UserFrosting\Sprinkle\Account\Controller\AccountController:imageCaptcha');
1214

@@ -55,6 +57,6 @@
5557

5658
$this->post('/settings/profile', 'UserFrosting\Sprinkle\Account\Controller\AccountController:profile')
5759
->add('authGuard');
58-
});
60+
})->add(new NoCache());
5961

6062
$app->get('/modals/account/tos', 'UserFrosting\Sprinkle\Account\Controller\AccountController:getModalAccountTos');

app/sprinkles/account/tests/Integration/AuthorizationManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function testCheckAccess_withNormalUser()
131131
$authLogger->shouldReceive('debug')->once()->with('No matching permissions found. Access denied.');
132132
$authLogger->shouldReceive('debug')->times(2);
133133

134-
$this->assertFalse($this->getManager()->checkAccess($user, 'foo'));
134+
$this->assertFalse($this->getManager()->checkAccess($user, 'blah'));
135135
}
136136

137137
/**

app/sprinkles/admin/routes/activities.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
* @license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)
88
*/
99

10+
use UserFrosting\Sprinkle\Core\Util\NoCache;
11+
1012
/**
1113
* Routes for administrative activity monitoring.
1214
*/
1315
$app->group('/activities', function () {
1416
$this->get('', 'UserFrosting\Sprinkle\Admin\Controller\ActivityController:pageList')
1517
->setName('uri_activities');
16-
})->add('authGuard');
18+
})->add('authGuard')->add(new NoCache());
1719

1820
$app->group('/api/activities', function () {
1921
$this->get('', 'UserFrosting\Sprinkle\Admin\Controller\ActivityController:getList');
20-
})->add('authGuard');
22+
})->add('authGuard')->add(new NoCache());

app/sprinkles/admin/routes/admin.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@
77
* @license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)
88
*/
99

10+
use UserFrosting\Sprinkle\Core\Util\NoCache;
11+
1012
/**
1113
* Routes for administrative panel management.
1214
*/
1315
$app->group('/dashboard', function () {
1416
$this->get('', 'UserFrosting\Sprinkle\Admin\Controller\AdminController:pageDashboard')
1517
->setName('dashboard');
16-
})->add('authGuard');
18+
})->add('authGuard')->add(new NoCache());
1719

1820
$app->group('/api/dashboard', function () {
1921
$this->post('/clear-cache', 'UserFrosting\Sprinkle\Admin\Controller\AdminController:clearCache');
20-
})->add('authGuard');
22+
})->add('authGuard')->add(new NoCache());
2123

2224
$app->group('/modals/dashboard', function () {
2325
$this->get('/clear-cache', 'UserFrosting\Sprinkle\Admin\Controller\AdminController:getModalConfirmClearCache');
24-
})->add('authGuard');
26+
})->add('authGuard')->add(new NoCache());

app/sprinkles/admin/routes/groups.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* @license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)
88
*/
99

10+
use UserFrosting\Sprinkle\Core\Util\NoCache;
11+
1012
/**
1113
* Routes for administrative group management.
1214
*/
@@ -15,7 +17,7 @@
1517
->setName('uri_groups');
1618

1719
$this->get('/g/{slug}', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:pageInfo');
18-
})->add('authGuard');
20+
})->add('authGuard')->add(new NoCache());
1921

2022
$app->group('/api/groups', function () {
2123
$this->delete('/g/{slug}', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:delete');
@@ -29,12 +31,12 @@
2931
$this->post('', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:create');
3032

3133
$this->put('/g/{slug}', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:updateInfo');
32-
})->add('authGuard');
34+
})->add('authGuard')->add(new NoCache());
3335

3436
$app->group('/modals/groups', function () {
3537
$this->get('/confirm-delete', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:getModalConfirmDelete');
3638

3739
$this->get('/create', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:getModalCreate');
3840

3941
$this->get('/edit', 'UserFrosting\Sprinkle\Admin\Controller\GroupController:getModalEdit');
40-
})->add('authGuard');
42+
})->add('authGuard')->add(new NoCache());

app/sprinkles/admin/routes/permissions.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* @license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)
88
*/
99

10+
use UserFrosting\Sprinkle\Core\Util\NoCache;
11+
1012
/**
1113
* Routes for administrative permission management.
1214
*/
@@ -15,12 +17,12 @@
1517
->setName('uri_permissions');
1618

1719
$this->get('/p/{id}', 'UserFrosting\Sprinkle\Admin\Controller\PermissionController:pageInfo');
18-
})->add('authGuard');
20+
})->add('authGuard')->add(new NoCache());
1921

2022
$app->group('/api/permissions', function () {
2123
$this->get('', 'UserFrosting\Sprinkle\Admin\Controller\PermissionController:getList');
2224

2325
$this->get('/p/{id}', 'UserFrosting\Sprinkle\Admin\Controller\PermissionController:getInfo');
2426

2527
$this->get('/p/{id}/users', 'UserFrosting\Sprinkle\Admin\Controller\PermissionController:getUsers');
26-
})->add('authGuard');
28+
})->add('authGuard')->add(new NoCache());

app/sprinkles/admin/routes/roles.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* @license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)
88
*/
99

10+
use UserFrosting\Sprinkle\Core\Util\NoCache;
11+
1012
/**
1113
* Routes for administrative role management.
1214
*/
@@ -15,7 +17,7 @@
1517
->setName('uri_roles');
1618

1719
$this->get('/r/{slug}', 'UserFrosting\Sprinkle\Admin\Controller\RoleController:pageInfo');
18-
})->add('authGuard');
20+
})->add('authGuard')->add(new NoCache());
1921

2022
$app->group('/api/roles', function () {
2123
$this->delete('/r/{slug}', 'UserFrosting\Sprinkle\Admin\Controller\RoleController:delete');
@@ -33,7 +35,7 @@
3335
$this->put('/r/{slug}', 'UserFrosting\Sprinkle\Admin\Controller\RoleController:updateInfo');
3436

3537
$this->put('/r/{slug}/{field}', 'UserFrosting\Sprinkle\Admin\Controller\RoleController:updateField');
36-
})->add('authGuard');
38+
})->add('authGuard')->add(new NoCache());
3739

3840
$app->group('/modals/roles', function () {
3941
$this->get('/confirm-delete', 'UserFrosting\Sprinkle\Admin\Controller\RoleController:getModalConfirmDelete');
@@ -43,4 +45,4 @@
4345
$this->get('/edit', 'UserFrosting\Sprinkle\Admin\Controller\RoleController:getModalEdit');
4446

4547
$this->get('/permissions', 'UserFrosting\Sprinkle\Admin\Controller\RoleController:getModalEditPermissions');
46-
})->add('authGuard');
48+
})->add('authGuard')->add(new NoCache());

app/sprinkles/admin/routes/users.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* @license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)
88
*/
99

10+
use UserFrosting\Sprinkle\Core\Util\NoCache;
11+
1012
/**
1113
* Routes for administrative user management.
1214
*/
@@ -15,7 +17,7 @@
1517
->setName('uri_users');
1618

1719
$this->get('/u/{user_name}', 'UserFrosting\Sprinkle\Admin\Controller\UserController:pageInfo');
18-
})->add('authGuard');
20+
})->add('authGuard')->add(new NoCache());
1921

2022
$app->group('/api/users', function () {
2123
$this->delete('/u/{user_name}', 'UserFrosting\Sprinkle\Admin\Controller\UserController:delete');
@@ -37,7 +39,7 @@
3739
$this->put('/u/{user_name}', 'UserFrosting\Sprinkle\Admin\Controller\UserController:updateInfo');
3840

3941
$this->put('/u/{user_name}/{field}', 'UserFrosting\Sprinkle\Admin\Controller\UserController:updateField');
40-
})->add('authGuard');
42+
})->add('authGuard')->add(new NoCache());
4143

4244
$app->group('/modals/users', function () {
4345
$this->get('/confirm-delete', 'UserFrosting\Sprinkle\Admin\Controller\UserController:getModalConfirmDelete');
@@ -49,4 +51,4 @@
4951
$this->get('/password', 'UserFrosting\Sprinkle\Admin\Controller\UserController:getModalEditPassword');
5052

5153
$this->get('/roles', 'UserFrosting\Sprinkle\Admin\Controller\UserController:getModalEditRoles');
52-
})->add('authGuard');
54+
})->add('authGuard')->add(new NoCache());

0 commit comments

Comments
 (0)