Skip to content
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

Minor fixes #107

Closed
wants to merge 1 commit into from
Closed

Minor fixes #107

wants to merge 1 commit into from

Conversation

weareredrobot
Copy link

  • Display UTF-8 characters correctly in the browser, also shows how to add headers to responses
  • Add command to create empty composer.json before running require (stops potential prompts about the file being missing)

* Display UTF-8 characters correctly in the browser, also shows how to add headers to responses
* Add command to create empty composer.json before running require (stops potential prompts about the file being missing)
@weareredrobot
Copy link
Author

Let me know if you're happy with this, and I'll update framework-x/docs/getting-started/quickstart.md to match the changes.

@SimonFrings
Copy link
Contributor

@weareredrobot Thank you for looking into this 👍

There's nothing wrong to set up composer manually, but I don't think it is necessary to add the composer init command to the installation instructions. If you set up a fresh project without any composer files and then run composer require clue/framework-x:dev-main it will automatically create a composer.json and a composer.lock file.

You also added the Content-Type header which makes perfect sense ^^
The only thing I noticed is that the casing seems a bit off and that we often use single quotation marks for our headers (as seen in the response chapter).
This would look something like this:

return new React\Http\Message\Response(
    200, 
    [
        'Content-Type' => 'text/plain; charset=UTF-8'
    ],
    "Hello " . $request->getAttribute('name') . "!\n"
);

I'm interested in your thoughts on this!

@clue clue added the documentation Improvements or additions to documentation label Feb 4, 2022
@weareredrobot
Copy link
Author

All good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants