Skip to content

Commit ca42b9c

Browse files
authored
Merge pull request #163 from userfrosting/agents/review-60-docs-for-release
Fix technical inaccuracies and update documentation for release
2 parents dc56c01 + 39a66cb commit ca42b9c

46 files changed

Lines changed: 170 additions & 146 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.

app/pages/6.0/01.quick-start/docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Quick Start Guide
3-
description: The official documentation for UserFrosting, a PHP framework and full-featured user management application.
3+
description: Get UserFrosting up and running quickly. This guide walks you through installing and launching UserFrosting on your local machine.
44
---
55

66
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.
@@ -27,7 +27,7 @@ UserFrosting has a few system requirements. You need to make sure your local Use
2727
Use Composer to create a new project with the latest version of UserFrosting into a `UserFrosting` folder. This will clone the skeleton repository and run the installation process.
2828

2929
```bash
30-
composer create-project userfrosting/userfrosting UserFrosting "^6.0-beta"
30+
composer create-project userfrosting/userfrosting UserFrosting "^6.0"
3131
```
3232

3333
> [!TIP]

app/pages/6.0/03.structure/02.dependencies/docs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ While UserFrosting uses dozens of dependencies, here's a rundown of the most imp
1010
## Slim 4
1111
**[Slim](https://www.slimframework.com)** is a PHP _micro framework_ that helps you quickly write simple yet powerful web applications and APIs. Slim is the backbone of UserFrosting. To be more precise, **UserFrosting _is_ a Slim Application**!
1212

13-
Except for the Bakery system (which uses _[Symfony Console](#symfony-console-5)_), UserFrosting uses Slim at every level to perform middleware management, route collections, and everything else needed to actually display a web page.
13+
Except for the Bakery system (which uses _[Symfony Console](#symfony-console-6)_), UserFrosting uses Slim at every level to perform middleware management, route collections, and everything else needed to actually display a web page.
1414

1515
## PHP-DI 7
16-
**[PHP-DI](https://php-di.org)** is a _dependency injection container_. Dependency injection is one of the fundamental pillars of modern object-oriented software design. It is used extensively throughout UserFrosting to glue all services together while maintaining great flexibility to extend the basics functionalities of UserFrosting to create your own project. We'll explain dependency injection in detail in a later chapter. For now, it's only important to note **PHP-DI** is the dependency manager used by UserFrosting 5 to handle all dependency injection.
16+
**[PHP-DI](https://php-di.org)** is a _dependency injection container_. Dependency injection is one of the fundamental pillars of modern object-oriented software design. It is used extensively throughout UserFrosting to glue all services together while maintaining great flexibility to extend the basics functionalities of UserFrosting to create your own project. We'll explain dependency injection in detail in a later chapter. For now, it's only important to note **PHP-DI** is the dependency manager used by **UserFrosting** to handle all dependency injection.
1717

1818
## Eloquent (Laravel 10)
1919
**[Eloquent](https://laravel.com/docs/10.x/eloquent)** is part of the Laravel Framework. Eloquent makes it enjoyable to interact with a database. When using Eloquent, each database table has a corresponding "Model" that is used to interact with that table. In addition to retrieving records from the database table, Eloquent models allow you to insert, update, and delete records from the table as well.
@@ -26,8 +26,8 @@ Eloquent is one of the most powerful and easy to use tools available to interact
2626
## Twig 3
2727
**[Twig](https://twig.symfony.com/doc/)** is a flexible, fast, and secure template engine for PHP. Initially developed for the Symfony framework, Twig is easy to use. Twig provides the necessary tools to use the data generated by PHP and render the HTML page the end user gets to see.
2828

29-
## Symfony Console 5
30-
**[Symfony Console](https://symfony.com/doc/5.4/components/console.html)** eases the creation of beautiful and testable command line interfaces. This is used to power the **Bakery** command line interface tool used by UserFrosting.
29+
## Symfony Console 6
30+
**[Symfony Console](https://symfony.com/doc/6.4/components/console.html)** eases the creation of beautiful and testable command line interfaces. This is used to power the **Bakery** command line interface tool used by UserFrosting.
3131

3232
## Vite
3333
**[Vite](https://vitejs.dev)** is a modern build tool that provides lightning-fast development with Hot Module Replacement (HMR), instant server start, and optimized production builds. Vite is used by UserFrosting to build and serve all frontend assets including CSS, JavaScript, TypeScript, and Vue components.

app/pages/6.0/03.structure/03.framework/docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ The documentation for each part is embedded in the next chapters, but you can st
1414
- [Cache](https://github.com/userfrosting/framework/tree/main/src/Cache) : Wrapper function for Laravel cache system for easier integration of the cache system in standalone projects.
1515
- [Config](https://github.com/userfrosting/framework/tree/main/src/Config) : Configuration files aggregator
1616
- [Fortress](https://github.com/userfrosting/framework/tree/main/src/Fortress) : A schema-driven system for elegant whitelisting, transformation and validation of user input, on both the client and server sides, from a unified set of rules.
17-
- [i81n](https://github.com/userfrosting/framework/tree/main/src/I18n) : The I18n module handles translation tasks.
17+
- [I18n](https://github.com/userfrosting/framework/tree/main/src/I18n) : The I18n module handles translation tasks.
1818
- [Session](https://github.com/userfrosting/framework/tree/main/src/Session) : PHP Session wrapper
1919
- [UniformResourceLocator](https://github.com/userfrosting/framework/tree/main/src/UniformResourceLocator) : The Uniform Resource Locator module handles resource aggregation and stream wrapper

app/pages/6.0/03.structure/04.sprinkles/docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Your app can have as many sprinkles as you want. A sprinkle could even depend on
1313

1414
## Bundled Sprinkles
1515

16-
A default UserFrosting installation comes with **four** sprinkles, each of which will be downloaded by [Composer](/installation/requirements/essential-tools-for-php#composer) in the `/vendor` directory during installation.
16+
A default UserFrosting installation comes with **three sprinkles and one theme package**, each of which will be downloaded by [Composer](/installation/requirements/essential-tools-for-php#composer) in the `/vendor` directory during installation.
1717

1818
Because UserFrosting is modular, you can decide to use these bundled sprinkles or not. You may or may not need the functionality each provides in your app. We'll go over how to enable and disable them [later](/sprinkles/recipe#removing-default-sprinkles). For now, let's focus on their features.
1919

app/pages/6.0/04.installation/02.environment/01.native/02.install/docs.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ Now that your local development environment is setup and ready to go, it's final
99

1010
Use Composer to create an empty project with the latest version of UserFrosting skeleton into a new `UserFrosting` folder:
1111

12-
<!-- TODO : UPDATE FOR OFFICIAL RELEASE -->
1312
```bash
14-
composer create-project userfrosting/userfrosting UserFrosting "^6.0" --stability=beta
13+
composer create-project userfrosting/userfrosting UserFrosting "^6.0"
1514
```
1615

1716
> [!TIP]
@@ -52,7 +51,7 @@ This starts the backend on [http://localhost:8080](http://localhost:8080).
5251
**Terminal 2 - Start the Vite dev server:**
5352

5453
```bash
55-
npm run dev
54+
npm run vite:dev
5655
```
5756

5857
This starts the Vite development server with Hot Module Replacement (HMR) for instant frontend updates.

app/pages/6.0/04.installation/02.environment/02.docker/docs.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ First, you'll need to install Docker. Just follow the installation instructions
4141

4242
For the next part, you'll need to use the command line. We'll use Composer (through a Docker image) to create an empty project, with the latest version of the UserFrosting skeleton, into a new `UserFrosting` subdirectory:
4343

44-
<!-- TODO : UPDATE FOR OFFICIAL RELEASE -->
44+
4545
```bash
46-
docker run --rm -it -v "$(pwd):/app" composer create-project userfrosting/userfrosting UserFrosting "^6.0-beta" --no-scripts --no-install --ignore-platform-reqs
46+
docker run --rm -it -v "$(pwd):/app" composer create-project userfrosting/userfrosting UserFrosting "^6.0" --no-scripts --no-install --ignore-platform-reqs
4747
```
4848

4949
> [!TIP]
@@ -65,7 +65,7 @@ Now it's simply a matter of navigating to the directory containing the source co
6565
2. Build each of the Docker Containers (this might take a while):
6666

6767
```bash
68-
docker-compose build --no-cache
68+
docker compose build --no-cache
6969
```
7070

7171
3. Copy the `.env` template
@@ -76,7 +76,7 @@ Now it's simply a matter of navigating to the directory containing the source co
7676
4. Start each Docker Container:
7777

7878
```bash
79-
docker-compose up -d
79+
docker compose up -d
8080
```
8181

8282
5. Set some directory permissions (you may have to enter your root password):
@@ -90,13 +90,13 @@ Now it's simply a matter of navigating to the directory containing the source co
9090
6. Install PHP dependencies:
9191

9292
```bash
93-
docker-compose exec app composer update
93+
docker compose exec app composer install
9494
```
9595

9696
7. Install UserFrosting (database configuration and migrations, creation of admin user, etc.). You'll need to provide info to create the admin user:
9797

9898
```bash
99-
docker-compose exec app php bakery bake
99+
docker compose exec app php bakery bake
100100
```
101101

102102
Now visit [http://localhost:8080](http://localhost:8080) to see your UserFrosting homepage!
@@ -108,12 +108,12 @@ You should see the default UserFrosting pages and be able to log in with the new
108108
To stop the containers, run:
109109

110110
```bash
111-
docker-compose stop
111+
docker compose stop
112112
```
113113

114114
## Mailpit
115115

116-
UserFrosting's default `docker-compose.yml` file contains a service entry for [Mailpit](https://github.com/axllent/mailpit). Mailpit intercepts emails sent by your application during local development and provides a convenient web interface so that you can preview your email messages in your browser.
116+
UserFrosting's default `compose.yaml` file contains a service entry for [Mailpit](https://github.com/axllent/mailpit). Mailpit intercepts emails sent by your application during local development and provides a convenient web interface so that you can preview your email messages in your browser.
117117

118118
While UserFrosting is running, you may access the Mailpit web interface at: [http://localhost:8025](http://localhost:8025).
119119

@@ -124,54 +124,54 @@ Every Bakery command needs to be wrapped in Docker Compose syntax, since you nee
124124
For example:
125125

126126
```bash
127-
docker-compose exec app php bakery ...
127+
docker compose exec app php bakery ...
128128
```
129129

130130
## Working with the Containers
131131

132132
If you need to stop the UserFrosting Docker containers, change to your UserFrosting directory and run:
133133

134134
```bash
135-
docker-compose stop
135+
docker compose stop
136136
```
137137

138138
To start the containers again, change to your UserFrosting directory and run:
139139

140140
```bash
141-
docker-compose up -d
141+
docker compose up -d
142142
```
143143

144144
If you need to purge your Docker containers (this will not delete any source files or sprinkles, but will empty the database), run:
145145

146146
```bash
147-
docker-compose down --remove-orphans
147+
docker compose down --remove-orphans
148148
```
149149

150150
And then start the installation process again.
151151

152152
## Advanced configuration
153153

154-
At the heart of everything is the `docker-compose.yml` file. If you're experienced with Docker and Docker Compose, this is where you can customize your Docker experience. For example, you can customize the port each service runs on. Since the file is located in *your sprinkle* (your app), it's possible to save this file in your repository.
154+
At the heart of everything is the `compose.yaml` file. If you're experienced with Docker and Docker Compose, this is where you can customize your Docker experience. For example, you can customize the port each service runs on. Since the file is located in *your sprinkle* (your app), it's possible to save this file in your repository.
155155

156-
The `docker-compose.yml` file also contains the MySQL database and Mail environment variables. Since these variables are defined globally inside the container, they don't need to be redefined inside the `.env` file.
156+
The `compose.yaml` file also contains the MySQL database and Mail environment variables. Since these variables are defined globally inside the container, they don't need to be redefined inside the `.env` file.
157157

158158
> [!WARNING]
159159
> If you have **multiple** instances of UserFrosting on your computer, **they will share the same configuration by default**. This means:
160160
> 1. You can't run multiple Docker instances of UserFrosting *simultaneously* with the default configuration, as ports will conflict.
161161
> 2. Both instances will share the same database.
162162
>
163-
> If you wish to run multiple instances of UserFrosting on the same computer with Docker, you must edit the `docker-compose.yml` for each instance and change the ports and database volumes/database names.
163+
> If you wish to run multiple instances of UserFrosting on the same computer with Docker, you must edit the `compose.yaml` for each instance and change the ports and database volumes/database names.
164164
165165
> [!NOTE]
166-
> An "*address already in use*" error can be thrown if a port defined in `docker-compose.yml` is already used on your system. For example, if Mailpit is installed locally and running on the default port, you'll get an "address already in use" error when running Docker. This can be solved by changing the port in `docker-compose.yml`.
166+
> An "*address already in use*" error can be thrown if a port defined in `compose.yaml` is already used on your system. For example, if Mailpit is installed locally and running on the default port, you'll get an "address already in use" error when running Docker. This can be solved by changing the port in `compose.yaml`.
167167
168168
## Production Environment
169169

170170
**This setup is not (yet) meant for production!**
171171

172172
You may be tempted to use this configuration in production, but it has not been security-hardened. For example:
173173

174-
- The database is exposed on port 8593 so you can access MySQL using your favorite client at `localhost:8593`. However, the way Docker exposes ports bypasses common firewalls like `ufw`. This should not be exposed in production.
174+
- The database is exposed on port 8503 so you can access MySQL using your favorite client at `localhost:8503`. However, the way Docker exposes ports bypasses common firewalls like `ufw`. This should not be exposed in production.
175175
- Database credentials are hard-coded, which is not secure.
176176
- File permissions may be more permissive than necessary.
177177
- HTTPS is not implemented.

app/pages/6.0/05.sprinkles/02.content/docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ The `storage` directory is used to store files managed by Filesystem service. Th
108108

109109
To separate content and logic, UserFrosting uses the popular [Twig](http://twig.symfony.com/) templating engine. Since Twig has its own system for [loading templates](http://twig.symfony.com/doc/api.html#built-in-loaders), UserFrosting builds upon this to allow overriding templates in sprinkles. See [Templating with Twig](/pages-and-layout) for more information on how Twig is integrated into UserFrosting.
110110

111-
### /app/test
111+
### /app/tests
112112

113-
The `test` directory is similar to `/src`, but for your [Tests](/testing).
113+
The `tests` directory is similar to `/src`, but for your [Tests](/testing).
114114

115115
### /app/.env
116116

app/pages/6.0/05.sprinkles/03.recipe/docs.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ The available sub-recipes includes:
199199
| [MiddlewareRecipe](#middlewarerecipe) | Registering [Middlewares](/advanced/middlewares) |
200200
| [EventListenerRecipe](#eventlistenerrecipe) | Registering [Event Listeners](/advanced/events) |
201201
| [TwigExtensionRecipe](#twigextensionrecipe) | Registering [Twig Extension](/pages-and-layout/filters-and-functions#extending-twig-extensions) |
202+
| [MarkdownExtensionRecipe](#markdownextensionrecipe) | Register custom CommonMark extensions |
202203

203204
Your recipe simply needs to implement the corresponding interface. Classes may implement more than one interface if desired by separating each interface with a comma. For example :
204205

@@ -329,6 +330,22 @@ Methods to implement :
329330
}
330331
```
331332

333+
### MarkdownExtensionRecipe
334+
Interface : `UserFrosting\Sprinkle\Core\Sprinkle\Recipe\MarkdownExtensionRecipe`
335+
336+
Methods to implement :
337+
- `getMarkdownExtensions` : Return a list of custom [CommonMark](https://commonmark.thephpleague.com/) extension classes
338+
339+
**Example:**
340+
```php
341+
public function getMarkdownExtensions(): array
342+
{
343+
return [
344+
MyCustomMarkdownExtension::class,
345+
];
346+
}
347+
```
348+
332349
## Removing default sprinkles
333350

334351
A default install, from the Skeleton, enables every [default sprinkle](/structure/sprinkles#bundled-sprinkles). But your app may not require every feature provided by these default sprinkles. For example, you might not need the Admin sprinkle if you don't need any user management features.

app/pages/6.0/05.sprinkles/04.customize/docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ $ composer update
142142
```
143143

144144
> [!NOTE]
145-
> If after running these steps, UserFrosting fails to find new classes that you add to `src/`, make sure that that the user running Composer had read permissions for your sprinkle. You can check that the path to your sprinkle's `src/` directory was actually added in `app/vendor/composer/autoload_psr4.php` You can also try running Composer with the `-vvv` flag for more detailed reporting.
145+
> If after running these steps, UserFrosting fails to find new classes that you add to `src/`, make sure that that the user running Composer had read permissions for your sprinkle. You can check that the path to your sprinkle's `src/` directory was actually added in `vendor/composer/autoload_psr4.php` You can also try running Composer with the `-vvv` flag for more detailed reporting.
146146
147147
### The recipe
148148

app/pages/6.0/06.dependency-injection/02.the-di-container/docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This is where the **dependency injection container (DIC)** comes into play. The
3737
>
3838
> You don't need a container to do dependency injection. However, a container can make injections easier.
3939
40-
UserFrosting uses [_PHP-DI 7_](https://php-di.org) as it's DIC implementation since it provides many powerful features that we rely on:
40+
UserFrosting uses [_PHP-DI 7_](https://php-di.org) as its DIC implementation since it provides many powerful features that we rely on:
4141

4242
1. It creates dependencies lazily ("on demand"). Any service (and its dependencies) won't be created until the first time we access them.
4343
2. Once an object has been created in the container, the same object is returned in each subsequent call to the container.

0 commit comments

Comments
 (0)