Skip to content

Commit 28a9f1a

Browse files
committed
Add missing throw
1 parent fcbf244 commit 28a9f1a

File tree

1 file changed

+11
-9
lines changed
  • pages/22.upgrading/02.50-to-51/02.guide

1 file changed

+11
-9
lines changed

pages/22.upgrading/02.50-to-51/02.guide/docs.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ $ php bakery bake
8181

8282
### Font Awesome
8383

84-
UserFrosting 5.1 now ship with Font Awesome 6 in the AdminLTE theme. While Font Awesome 6 is backward compatible with Font Awesome 5, some icons [have been renamed](https://docs.fontawesome.com/web/setup/upgrade/whats-changed#icons-renamed-in-version-6) and you might need to manually update these in your sprinkle.
84+
UserFrosting 5.1 now ships with Font Awesome 6 in the AdminLTE theme. While Font Awesome 6 is backward compatible with Font Awesome 5, some icons [have been renamed](https://docs.fontawesome.com/web/setup/upgrade/whats-changed#icons-renamed-in-version-6) and you might need to manually update these in your sprinkle.
8585

86-
Checkout Font Awesome guide for more information : [https://docs.fontawesome.com/web/setup/upgrade/whats-changed](https://docs.fontawesome.com/web/setup/upgrade/whats-changed)
86+
Checkout the Font Awesome guide for more information : [https://docs.fontawesome.com/web/setup/upgrade/whats-changed](https://docs.fontawesome.com/web/setup/upgrade/whats-changed)
8787

8888
### Missing default permissions
8989

90-
Some build-in permissions [were missing from the database](https://github.com/userfrosting/UserFrosting/issues/1225) :
90+
Some built-in permissions [were missing from the database](https://github.com/userfrosting/UserFrosting/issues/1225) :
9191
- `uri_role`
9292
- `uri_roles`
9393
- `uri_permissions`
@@ -100,28 +100,28 @@ Some build-in permissions [were missing from the database](https://github.com/us
100100
- `view_system_info`
101101
- `clear_cache`
102102

103-
To add them to the database, run `php bakery seed` and select `UserFrosting\Sprinkle\Account\Database\Seeds\DefaultPermissions`. Theses will also be added to the `site-admin` role when running the seed.
103+
To add them to the database, run `php bakery seed` and select `UserFrosting\Sprinkle\Account\Database\Seeds\DefaultPermissions`. These will also be added to the `site-admin` role when running the seed.
104104

105-
[notice=warning]If your application defines custom permissions to the `site-admin` role or you customized this role, **do not run the seed** unless you want to lose any custom changes. Running the seed will revert back that role to it's default state.[/notice]
105+
[notice=warning]If your application defines custom permissions to the `site-admin` role or you customized this role, **do not run the seed** unless you want to lose any custom changes. Running the seed will revert back the role to it's default state.[/notice]
106106

107107
The `site-admin` role is now on par with the root user permission by default, except for the last two permissions added, `view_system_info` & `clear_cache`. Theses can be added to the role if desired using the UI.
108108

109109
### `urlFor` service change
110110

111-
When calling [`urlFor`](/templating-with-twig/filters-and-functions#urlfor) **in PHP** (not Twig) to generate a route from it's name, the service as been replaced. Find and replace the following import to upgrade:
111+
When calling [`urlFor`](/templating-with-twig/filters-and-functions#urlfor) **in PHP** (not Twig) to generate a route from its name, the service has been replaced. Find and replace the following import to upgrade:
112112
- Find : `use Slim\Interfaces\RouteParserInterface;`
113113
- Replace : `use UserFrosting\Sprinkle\Core\Util\RouteParserInterface;`
114114

115115
### Alerts
116116

117-
When using the [alerts](/advanced/alert-stream) service, replace `addMessageTranslated(...);` with `addMessage(...);`. The old method is still available, but deprecated and will be removed in a future version.
117+
When using the [alerts](/advanced/alert-stream) service, replace `addMessageTranslated(...);` with `addMessage(...);`. The old method is still available, but it is deprecated and will be removed in a future version.
118118

119119
### Fortress
120120

121-
Fortress has been complexly rewritten for UserFrosting 5.1. Most class have been kept and will continue working, but these have been marked deprecated and will be removed in future version. It is recommended to upgrade your code now to avoid issues later.
121+
Fortress has been completely rewritten for UserFrosting 5.1. Most classes have been kept and will continue working, but these have been marked deprecated and will be removed in future version. It is recommended to upgrade your code now to avoid issues later.
122122

123123
#### RequestSchema
124-
`UserFrosting\Fortress\RequestSchema` constructor first argument now accept the schema data as an array, as well as a string representing a path to the schema json or yaml file. The argument can still be omitted to create an empty schema. This change makes `UserFrosting\Fortress\RequestSchema\RequestSchemaRepository` obsolete and and such been ***deprecated***. For example:
124+
The `UserFrosting\Fortress\RequestSchema` constructor's first argument now accepts the schema data as an array, as well as a string representing a path to the schema json or yaml file. The argument can still be omitted to create an empty schema. This change makes `UserFrosting\Fortress\RequestSchema\RequestSchemaRepository` obsolete and and such been ***deprecated***. For example:
125125

126126
```php
127127
// Before
@@ -243,6 +243,8 @@ $errors = $this->validator->validate($schema, $data);
243243
if (count($errors) !== 0) {
244244
$e = new ValidationException();
245245
$e->addErrors($errors);
246+
247+
throw $e;
246248
}
247249
```
248250

0 commit comments

Comments
 (0)