Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/book/v1/chapter-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The first step is to add alongside your current packages the required entries for our Doctrine installation.
We would add the following to our `composer.json` file located in our root folder:

![composer](images/composer.png)
![composer.json](images/composer.png)

```text
"dotkernel/dot-cache": "^4.0",
Expand Down Expand Up @@ -84,8 +84,9 @@ This package takes all the provided configs from the `config/config.php` file an

Our new `src/App/src/ConfigProvider.php` class would look like this now:

![Config provider factories update](images/config-provider-1.png)
![Doctrine config function](images/config-provider-2.png)
![config-provider-1](images/config-provider-1.png)

![config-provider-1](images/config-provider-2.png)

```php
public function __invoke(): array
Expand Down Expand Up @@ -198,7 +199,7 @@ return DependencyFactory::fromEntityManager(
Now that everything has been configured we only need to do one last thing, to create an executable for the Doctrine CLI.
In our case we will create a `doctrine` file inside the application's `bin` directory:

![bin/doctrine](images/doctrine.png)
![doctrine](images/doctrine.png)

```php
#!/usr/bin/env php
Expand All @@ -223,7 +224,7 @@ ConsoleRunner::run(new SingleManagerProvider($entityManager));
(Optional) To keep things tidy, we recommend making an executable for the migrations of Doctrine as well.
For this, we create `doctrine-migrations` file inside the application's `bin` directory:

![bin/doctrine-migrations](images/doctrine-migrations.png)
![doctrine-migrations](images/doctrine-migrations.png)

```php
#!/usr/bin/env php
Expand Down
Binary file modified docs/book/v1/images/cli-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/v1/images/composer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/v1/images/config-provider-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/v1/images/config-provider-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/v1/images/doctrine-migrations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/v1/images/doctrine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/v1/images/local.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/book/v1/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Introduction

For the upcoming tutorial steps we assume that you already have installed the following:

- A UNIX-based development environment.
If not, we recommend [AlmaLinux](https://almalinux.org/) in a WSL2 container
- A recent IDE, for example [PhpStorm](https://www.jetbrains.com/phpstorm/) or [VSCode](https://code.visualstudio.com/)
- A fresh installation of [Dotkernel Light](https://github.com/dotkernel/light)
- Default UTF-8 encoding for files and LF type line separator

For any further tips related to the development environment we suggest that you check out our [development documentation](https://docs.dotkernel.org/development/v2/setup/installation/).
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ extra:
- v1
nav:
- Home: index.md
- book:
- Tutorial:
- Introduction: v1/introduction.md
- Chapter 1: v1/chapter-1.md
site_name: Dotkernel 101
site_description: "Beginner tutorial for using Dotkernel"
Expand Down