You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/pages/6.0/01.quick-start/docs.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
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.
4
4
---
5
5
6
6
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
27
27
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.
Copy file name to clipboardExpand all lines: app/pages/6.0/03.structure/02.dependencies/docs.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,10 @@ While UserFrosting uses dozens of dependencies, here's a rundown of the most imp
10
10
## Slim 4
11
11
**[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**!
12
12
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.
14
14
15
15
## 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.
17
17
18
18
## Eloquent (Laravel 10)
19
19
**[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
26
26
## Twig 3
27
27
**[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.
28
28
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.
31
31
32
32
## Vite
33
33
**[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.
Copy file name to clipboardExpand all lines: app/pages/6.0/03.structure/03.framework/docs.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,6 @@ The documentation for each part is embedded in the next chapters, but you can st
14
14
-[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.
-[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.
Copy file name to clipboardExpand all lines: app/pages/6.0/03.structure/04.sprinkles/docs.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Your app can have as many sprinkles as you want. A sprinkle could even depend on
13
13
14
14
## Bundled Sprinkles
15
15
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.
17
17
18
18
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.
Copy file name to clipboardExpand all lines: app/pages/6.0/04.installation/02.environment/02.docker/docs.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,9 +41,9 @@ First, you'll need to install Docker. Just follow the installation instructions
41
41
42
42
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:
@@ -65,7 +65,7 @@ Now it's simply a matter of navigating to the directory containing the source co
65
65
2. Build each of the Docker Containers (this might take a while):
66
66
67
67
```bash
68
-
docker-compose build --no-cache
68
+
dockercompose build --no-cache
69
69
```
70
70
71
71
3. Copy the `.env` template
@@ -76,7 +76,7 @@ Now it's simply a matter of navigating to the directory containing the source co
76
76
4. Start each Docker Container:
77
77
78
78
```bash
79
-
docker-compose up -d
79
+
dockercompose up -d
80
80
```
81
81
82
82
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
90
90
6. Install PHP dependencies:
91
91
92
92
```bash
93
-
docker-compose exec app composer update
93
+
dockercompose exec app composer install
94
94
```
95
95
96
96
7. Install UserFrosting (database configuration and migrations, creation of admin user, etc.). You'll need to provide info to create the admin user:
97
97
98
98
```bash
99
-
docker-compose exec app php bakery bake
99
+
dockercompose exec app php bakery bake
100
100
```
101
101
102
102
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
108
108
To stop the containers, run:
109
109
110
110
```bash
111
-
docker-compose stop
111
+
dockercompose stop
112
112
```
113
113
114
114
## Mailpit
115
115
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.
117
117
118
118
While UserFrosting is running, you may access the Mailpit web interface at: [http://localhost:8025](http://localhost:8025).
119
119
@@ -124,54 +124,54 @@ Every Bakery command needs to be wrapped in Docker Compose syntax, since you nee
124
124
For example:
125
125
126
126
```bash
127
-
docker-compose exec app php bakery ...
127
+
dockercompose exec app php bakery ...
128
128
```
129
129
130
130
## Working with the Containers
131
131
132
132
If you need to stop the UserFrosting Docker containers, change to your UserFrosting directory and run:
133
133
134
134
```bash
135
-
docker-compose stop
135
+
dockercompose stop
136
136
```
137
137
138
138
To start the containers again, change to your UserFrosting directory and run:
139
139
140
140
```bash
141
-
docker-compose up -d
141
+
dockercompose up -d
142
142
```
143
143
144
144
If you need to purge your Docker containers (this will not delete any source files or sprinkles, but will empty the database), run:
145
145
146
146
```bash
147
-
docker-compose down --remove-orphans
147
+
dockercompose down --remove-orphans
148
148
```
149
149
150
150
And then start the installation process again.
151
151
152
152
## Advanced configuration
153
153
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.
155
155
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.
157
157
158
158
> [!WARNING]
159
159
> If you have **multiple** instances of UserFrosting on your computer, **they will share the same configuration by default**. This means:
160
160
> 1. You can't run multiple Docker instances of UserFrosting *simultaneously* with the default configuration, as ports will conflict.
161
161
> 2. Both instances will share the same database.
162
162
>
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.
164
164
165
165
> [!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`.
167
167
168
168
## Production Environment
169
169
170
170
**This setup is not (yet) meant for production!**
171
171
172
172
You may be tempted to use this configuration in production, but it has not been security-hardened. For example:
173
173
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.
175
175
- Database credentials are hard-coded, which is not secure.
176
176
- File permissions may be more permissive than necessary.
Copy file name to clipboardExpand all lines: app/pages/6.0/05.sprinkles/02.content/docs.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,9 +108,9 @@ The `storage` directory is used to store files managed by Filesystem service. Th
108
108
109
109
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.
110
110
111
-
### /app/test
111
+
### /app/tests
112
112
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).
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 :
- `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
+
332
349
## Removing default sprinkles
333
350
334
351
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.
Copy file name to clipboardExpand all lines: app/pages/6.0/05.sprinkles/04.customize/docs.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,7 +142,7 @@ $ composer update
142
142
```
143
143
144
144
> [!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.
0 commit comments