-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/add routing manifest support #1
base: v2.x
Are you sure you want to change the base?
Conversation
publishable/config/api.php
Outdated
| strategy for each Resource in every version. | ||
*/ | ||
|
||
'routing_manifest_path' => storage_path('api-resources/manifest.json'), |
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.
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.
makes sense
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/APIResourceManager.php
Outdated
*/ | ||
protected function parseClassname($classname, $forceLatest = false) | ||
protected function parseClassname(string $classname, bool $forceLatest = false): string |
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 method that you're looking to modify is
public function resolve($classname)
The difference is that this method will simply try to resolve the class from the version name. This is how the manifest should be made
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.
819eaaf
to
0e7adbd
Compare
a98ead2
to
c2c84f5
Compare
src/Resolvers/Resolver.php
Outdated
/** | ||
* @return class-string<JsonResource|ResourceCollection> | ||
*/ | ||
abstract protected function resolve(): ?string; |
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.
Let's resolve or exception
Boom,
first, the resolution strategy, if it is alright I can move to the commands part 👌