-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: horea <[email protected]>
There was a problem hiding this 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/ |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace Api\Book; | |
namespace Core\Book; |
Because you're in src/Core/src/Book/src
not src/Book/src
.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
Signed-off-by: horea <[email protected]>
Signed-off-by: horea <[email protected]>
Signed-off-by: horea <[email protected]>
Signed-off-by: horea <[email protected]>
No description provided.