Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Issue #110: update book tutorial #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

Howriq
Copy link
Member

@Howriq Howriq commented May 12, 2025

No description provided.

@Howriq Howriq requested a review from alexmerlin May 12, 2025 20:55
Copy link
Member

@alexmerlin alexmerlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be continued...

│ ├──Repository/
│ │ └──BookRepository.php
│ └── ConfigProvider.php
└── App/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move App module above the Book module because that's how they appear in the IDE.

* `src/Book/src/InputFilter/BookInputFilter.php` - input filters and validators
* `src/Book/src/InputFilter/Input/*` - input filters and validator configurations
* `src/Book/src/InputFilter/CreateBookInputFilter.php` - input filters and validators
* `src/Core/src/App/src/InputFilter/Input/*` - input filters and validator configurations
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `src/Core/src/App/src/InputFilter/Input/*` - input filters and validator configurations
* `src/Book/src/InputFilter/Input/*` - input fields used by the input filters

Generic inputs are located under src/App/src/InputFilter/Input/
and module-specific inputs under src/<Module>/src/InputFilter/Input/,
but never in the Core directory.


declare(strict_types=1);

namespace Api\Book;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
namespace Api\Book;
namespace Core\Book;

Because you're in src/Core/src/Book/src not src/Book/src.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is not in the Core directory

use Mezzio\Application;
use Mezzio\Hal\Metadata\MetadataMap;

class ConfigProvider
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ConfigProvider file needs to be redone from scratch because it references items from a non-Core ConfigProvider.

];
}

private function getDependencies(): array
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Core ConfigProvider have nothing to do with handlers, in most cases they only register repositories.
See src/Core/src/Admin/src/ConfigProvider.php or src/Core/src/User/src/ConfigProvider.php

@Howriq Howriq linked an issue May 13, 2025 that may be closed by this pull request
@Howriq Howriq linked an issue May 13, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update book tutorial version 6: how to send an email and parse the content
2 participants