Skip to content

Commit

Permalink
Merge branch '5.0' into 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Feb 17, 2024
2 parents ac992ec + 168ad54 commit 6f1a802
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 19 deletions.
2 changes: 1 addition & 1 deletion pages/01.quick-start/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ taxonomy:
category: docs
---

[notice=note]This quick start guide is aimed at experienced PHP developers who already have a development environment set up. If it's not your case, head over to the [First Chapter](/background) to start your journey.[/notice]
[notice=note]This quick start guide is aimed at experienced PHP developers who already have a development environment set up. If that's not your case, head over to the [First Chapter](/background) to start your journey.[/notice]

UserFrosting is a free, open-source jumping-off point for building user-centered web applications with PHP and Javascript. It comes with a sleek, modern interface, basic user account features, and an administrative user management system - all fully functioning out of the box.

Expand Down
6 changes: 3 additions & 3 deletions pages/05.troubleshooting/02.getting-help/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ taxonomy:

On Github, UserFrosting Chat, and Stack Overflow, please keep in mind the following:

1. Remember that courtesy and proper grammar go a long way. Please take the time to craft a **precise, polite issue**. We will do our best to help, but remember that this is an open-source project - none of us are getting paid a salary to develop this project, or act as your personal support hotline ;-). We do however understand the language barrier can be an issue for some people, so don't be afraid to ask questions even if English is not perfect!
1. Remember that courtesy and proper grammar go a long way. Please take the time to craft a **precise, polite issue**. We will do our best to help, but remember that this is an open-source project - none of us are getting paid a salary to develop this project, or to act as your personal support hotline ;-). We understand the language barrier can be an issue for some people, so don't be afraid to ask questions even if your English is not perfect!

2. Report any errors in detail. Vague issues like "it doesn't work when I do this" are not helpful. Show that you have put some effort into identifying the cause of the error. See the [previous section](/troubleshooting/debugging) for information on how to get more details about errors and other problems. Including a stack trace with your report is the best way we can help you.

Expand Down Expand Up @@ -47,7 +47,7 @@ Check [Stack Overflow](http://stackoverflow.com/tags/userfrosting) and the [issu

#### Use Markdown to format blocks of code.

Markdown is the _de facto_ standard for basic text formatting on the web. If you are unfamiliar with Markdown, please [take a few minutes to learn](https://guides.github.com/features/mastering-markdown/#what). It will help you not just here, but all over the web! In particular, please make sure you know where the **backtick** key (`) is located on your keyboard:
Markdown is the _de facto_ standard for basic text formatting on the web. If you are unfamiliar with Markdown, please [take a few minutes to learn](https://guides.github.com/features/mastering-markdown/#what). It will help you all over the web! In particular, please make sure you know where the **backtick** key (`) is located on your keyboard:

![Location of backtick key](/images/backtick.png)

Expand Down Expand Up @@ -119,7 +119,7 @@ Tag your question as `userfrosting`, as well as any other relevant tags (`twig`,
You may also find the following communities useful in certain cases:

- [Information Security](http://security.stackexchange.com/)
- [User Experience](http://http://ux.stackexchange.com/)
- [User Experience](http://ux.stackexchange.com/)
- [Webmasters](http://webmasters.stackexchange.com/)
- [Code Review](http://codereview.stackexchange.com/)
- [Unix & Linux](http://unix.stackexchange.com/)
Expand Down
12 changes: 2 additions & 10 deletions pages/05.troubleshooting/03.common-problems/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,11 @@ When trying to view your site you get an error similar to this :
<!-- TODO : The above error needs to be updated ! -->

This is an indication that asset build failed or you missed a step in the installation process. Try [running the installer](/installation/environment/native#run-the-installer) again with `php bakery bake` and check for any error messages.

If you're using the [Homestead dev environment](/installation/environment/homestead), you'll need to login to the VM first to run the bake command inside the UserFrosting directory :

```bash
vagrant ssh
cd userfrosting
php bakery bake
```
This is an indication that asset build failed or you missed a step in the installation process. Try [running the installer](/installation/environment/native/install#clone-the-userfrosting-repository) again with `php bakery bake` and check for any error messages.

### Installation went fine, except I don't see any styling on my home page. I am using Apache.

UserFrosting uses a [dynamic routing system](/asset-management/basic-usage#PublicassetURLs) for serving assets in a development environment. For this to work on an Apache webserver, `mod_rewrite` needs to be enabled, **and** you need to give Apache permission to use the `.htaccess` file in `public/`.
UserFrosting uses a [dynamic routing system](/asset-management/basic-usage) for serving assets in a development environment. For this to work on an Apache webserver, `mod_rewrite` needs to be enabled, **and** you need to give Apache permission to use the `.htaccess` file in `public/`.

#### Enabling `mod_rewrite`

Expand Down
2 changes: 1 addition & 1 deletion pages/06.sprinkles/05.community/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ If your sprinkle includes any Javascript, you'll need to show npm how to install
"repository": "@owlfancy/sprinkle-owlery",
```

[notice=tip]Consider including a ["files" section](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#files), so that only Javascript files are included in `/node_modules`--npm doesn't typically need PHP or Twig files! Different sprinkles may need npm to be aware of different files or folders.[notice]
[notice=tip]Consider including a ["files" section](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#files), so that only Javascript files are included in `/node_modules`--npm doesn't typically need PHP or Twig files! Different sprinkles may need npm to be aware of different files or folders.[/notice]

#### Npmjs
[Npmjs](https://www.npmjs.com/about) is a registry of JS projects, similar to Packagist for Composer.
Expand Down
8 changes: 4 additions & 4 deletions pages/10.users/02.access-control/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ In your code, access is controlled through the use of access checks on permissio
This can be done by calling the `checkAccess` method of the `AuthorizationManager` service. For example:

```php
#[Inject]
#[\DI\Attribute\Inject]
protected Authenticator $authenticator

#[Inject]
#[\DI\Attribute\Inject]
protected AuthorizationManager $authorizer

// ...

$currentUser = $this->authorizer->user();
$currentUser = $this->authenticator->user();

if (!$this->authorizer->checkAccess($currentUser, 'uri_users')) {
throw new ForbiddenException();
Expand All @@ -60,7 +60,7 @@ if (!$this->authorizer->checkAccess($currentUser, 'uri_users')) {
Or simply use the `checkAccess` method of the `Authenticator` service, which is a shortcut for the above code (the current user will be automatically passed to `AuthorizationManager` behind the scene). For example:

```php
#[Inject]
#[\DI\Attribute\Inject]
protected Authenticator $authenticator

// ...
Expand Down

0 comments on commit 6f1a802

Please sign in to comment.