graphqlite icon indicating copy to clipboard operation
graphqlite copied to clipboard

Make the "smallest working example" actually work, see #553

Open shish opened this issue 1 year ago • 5 comments
trafficstars

Make the "smallest working example" actually work, see #553

This example had implicit-and-undocumented dependencies on composer.json, and explicit-but-unexplained dependencies on "a container" and "a cache", leaving the installation and configuring of these as an exercise to the reader. I have changed it so that the example code can be copy-pasted verbatim, and the user will end up with an example which runs, which I find much easier to learn from :)

I'm still not actually sure if I'm doing this correctly, because #553 mentioned loading classes via the PSR-4 autoloader, and I found that it only worked when I manually listed out my controller classes inside the PSR-11 container, but it works...

shish avatar Mar 14 '24 15:03 shish

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.29%. Comparing base (53f9d49) to head (98c0052). Report is 70 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #663      +/-   ##
============================================
- Coverage     95.72%   95.29%   -0.44%     
- Complexity     1773     1818      +45     
============================================
  Files           154      171      +17     
  Lines          4586     4841     +255     
============================================
+ Hits           4390     4613     +223     
- Misses          196      228      +32     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Mar 14 '24 15:03 codecov-commenter

Thanks for this @shish!

Let's stick with APCu in the example with a code comment for Filesystem, like #662.

oojacoboo avatar Mar 15 '24 06:03 oojacoboo

(I do wonder if it'd be worth having example code as actual code (either in an "examples" folder, or a "graphqlite-examples" respository), rather than random code snippets inside a markdown text file -- that way we can use eg github actions to run the code and ensure that it both works and stays working 🤔 )

shish avatar Mar 22 '24 12:03 shish

Let's update this PR such that the docs direct the reader to the examples, instead of maintaining any code here.

oojacoboo avatar Apr 03 '24 06:04 oojacoboo

Let's update this PR such that the docs direct the reader to the examples, instead of maintaining any code here.

@shish ^^

oojacoboo avatar Apr 19 '24 03:04 oojacoboo

@shish would be nice to get this merged. If you're giving up, I'll have to close it.

oojacoboo avatar Dec 18 '24 10:12 oojacoboo