Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
9 changes: 7 additions & 2 deletions docs/book/v1/chapter-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ private function getDoctrineConfig(): array
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:

![doctrine](images/chapter-1/doctrine.png)

```php
#!/usr/bin/env php
<?php
Expand Down Expand Up @@ -207,3 +205,10 @@ Options:
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```

### Summary

- [Modified] composer.json
- [Modified] config/autoload/local.php
- [Modified] src/App/src/ConfigProvider.php
- [+] bin/doctrine
21 changes: 18 additions & 3 deletions docs/book/v1/chapter-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ The call should lead to a call that contains the following output:
Now that we have set up the Doctrine Migrations, we shall now start working on our entities.

We need to create a base for our entities so that they have the same starting point.
For that, we will add a new directory `src/App/src/Entiy` in which we will add an abstract class, `AbstractEntity.php`:
For that, we will add a new directory `src/App/src/Entity` in which we will add an abstract class, `AbstractEntity.php`:

```php
<?php
Expand Down Expand Up @@ -470,7 +470,7 @@ The module is now registered.
For the last step we will create a migration using our `bin/doctrine-migrations` file and then execute it:

```shell
php bin/doctrine-migrations.php migrations:diff
php bin/doctrine-migrations migrations:diff
```

You should get an output similar to:
Expand Down Expand Up @@ -507,11 +507,26 @@ final class Version20251127183637 extends AbstractMigration
We only have to execute the migrations now with the command:

```shell
php bin/doctrine-migrations.php migrations:migrate
php bin/doctrine-migrations migrations:migrate
```

The output should be similar to this:

```terminaloutput
[OK] Successfully migrated to version: Migrations\Version2025112718363
```

### Summary

- [Modified] src/App/src/ConfigProvider.php
- [+] config/cli-config.php
- [+] src/App/src/DBAL/Types/UuidType.php
- [+] bin/doctrine-migrations
- [+] src/App/src/Entity/AbstractEntity.php
- [+] src/Book/src/Entity/Book.php
- [+] src/App/src/Repository/AbstractRepository.php
- [+] src/App/src/Book/BookRepository.php
- [+] src/Book/src/ConfigProvider.php
- [Modified] config/config.php
- [Modified] composer.json
- [+] src/App/src/Migration/Version{date_time}.php
Loading