yiisoft / yiisoft/data-response

Is there a way to return raw data from a controller?

Open
#96 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:docs
Dominant language
PHP
Stars
19
Forks
13
Avg merge
1h 6m
Merged PRs (30d)
1

Description

E.g. to return ['foo' => 'bar'] instead of

return $this->dataResponseFactory->create(['foo' => 'bar']);

In case it is, let's add corresponding configs and all the related code to documentation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how controllers currently create responses through dataResponseFactory and locate the existing configuration and documentation entry points. Determine whether returning raw controller data is supported, then document the relevant configuration and usage; done means the behavior and setup are clearly covered in the documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.