Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Parameters documentation improvements #2187

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

Merged
soyuka merged 5 commits into api-platform:4.1 from soyuka:parameters-doc
Aug 21, 2025
Merged

Conversation

@soyuka
Copy link
Member

@soyuka soyuka commented Aug 18, 2025

No description provided.

core/filters.md Outdated
parameters: [
'dummy' => new QueryParameter(
provider: ReadLinkParameterProvider::class,
extraProperties: ['resource_class' => Dummy::class]
Copy link
Contributor

@GregoireHebert GregoireHebert Aug 18, 2025

Choose a reason for hiding this comment

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

Should it also showcase the extra property uri_template?

soyuka reacted with thumbs up emoji
core/filters.md Outdated
private ?int $id = null;
public function apply(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, ?Operation $operation = null, array $context = []): void
{
$value = $context['parameter']?->getValue();
Copy link
Contributor

@GregoireHebert GregoireHebert Aug 18, 2025

Choose a reason for hiding this comment

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

Should it advocate for $operation->getParameters()->get('myParameter')->getValue(); approach more than through the context?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really imo as the filter receives the parameter it is called on, in the other case you need to find the parameter though a filter may be used on many parameters.

GregoireHebert reacted with thumbs up emoji
@soyuka soyuka merged commit 399784d into api-platform:4.1 Aug 21, 2025
1 check passed
@soyuka soyuka deleted the parameters-doc branch August 21, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers

@GregoireHebert GregoireHebert GregoireHebert left review comments

@aegypius aegypius aegypius approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /