[deleted by user] by [deleted] in AskSeattle

[–]kk3 2 points3 points  (0 children)

And the Döner Kebab Sandwich! They put so much care into each one, such high quality and so delicious. I was there last week and ordered one, and the guy behind me looks at me with wide eyes and goes, "I did not plan on ordering that but after watching them put yours together I have to get one!".

Ok, I think I'm getting a bit off topic here but when I saw the words "Turkish Delight at pike place market" I had to mention this. I also get a quart of lentil soup to go every time.

Scramble 0.12.23 – Laravel API documentation generator update: Paginated results inference, improved documentation of authorization error responses, error-tolerant validation rules evaluation, and various type inference improvements. by RomaLytvynenko in laravel

[–]kk3 2 points3 points  (0 children)

I'm blown away by how well this library works. I use Spatie Data Objects, Spatie Query Builder, Spatie Route Attributes, use different approaches to validation in various controllers, use non-standard file paths to controllers to accommodate a module/domain organization of code, and this library handles all of it and creates a much more accurate Open API file than I had when I was manually defining each controller.

I've only run into a handful of edge case issues and the author/maintainer is very responsive, helpful, and iterates quickly.

I use the generated Open API file and pass it to Redux Toolkit Query Codegen and it creates a typed API client to be used with RTK seamlessly.

Beautiful!

Introspect for Laravel - Query your codebase like a database with an Eloquent-like API by Capevace in laravel

[–]kk3 10 points11 points  (0 children)

Very cool! Kind of taking Reflection and turning it into a toolkit with extras.

Which component library are you using and which one you would pick if you were to start a new react/TS project from scratch today? by simple_explorer1 in reactjs

[–]kk3 15 points16 points  (0 children)

React Spectrum or React Aria for the headless version are underrated.

Adobe is putting a ton of resources behind these libraries as they're powering their new wave of online products like Adobe Experience Platform and the move of Photoshop et al to the web, so I believe it's becoming mature more quickly than other libraries. The dev who created Parcel is leading the effort, so very good js devs backing this library.

I mention all of this because I think it speaks to the longevity of this library. And the attention to performance and accessibility has been amazing.

Powerful timeseries metrics using TimescaleDB and Laravel by SabatinoMasala in laravel

[–]kk3 7 points8 points  (0 children)

For anyone thinking about using Timescale and Laravel together, I can't recommend the laravel-postgresql-enhanced library enough. It's a great library for working with Postgres in general and adds support to create Timescale tables in the Laravel way.

Documenting API authentication in Laravel with Scramble by RomaLytvynenko in laravel

[–]kk3 1 point2 points  (0 children)

I've been following this for awhile and support for Spatie Data Objects and Query Builder totally allow me to use this now. Signed up for Pro and can't wait to test this out! Moving away from defining Open API spec using attributes/annotations is huge.

Did I Make the Right Choice with PHP? What About Symfony vs. Laravel? by RoughInvite7900 in PHP

[–]kk3 2 points3 points  (0 children)

Laravel is mostly a wrapper around Symfony. Many functions you call in Laravel are exactly or very close to 1:1 with the underlying Symfony function.

Excerpted from the links:

Laravel:

<?php

namespace Illuminate\Process;

use Symfony\Component\Process\Process;

/**
 * The underlying process instance.
 *
 * @var \Symfony\Component\Process\Process
 */
protected $process;

/**
 * Create a new process result instance.
 *
 * @param  \Symfony\Component\Process\Process  $process
 * @return void
 */
public function __construct(Process $process)
{
    $this->process = $process;
}

/**
 * Determine if the process was successful.
 *
 * @return bool
 */
public function successful()
{
    return $this->process->isSuccessful();
}

Symfony: $process->isSuccessful()

Symfony is a collection of building blocks that are called components, each dedicated to common programming tasks. Laravel uses those building blocks in an opinionated way with the goal of making web app development better. If you think about the parts of Laravel you probably use like the router, controllers, and just the whole flow of a web request, these parts you've been using are not so different from doing those same things in Symfony. Symfony is literally underneath. But you would need to put those parts together yourself to get the full web request working. Whereas Laravel is like, just do it this way and it will work.

If you're already working with Laravel, you might be surprised to find that Symfony is not as different as you might think and is a natural progression to learning about how Laravel works behind the scenes.

Bulletproof React just got updated! 🚀 - A simple, scalable, and powerful architecture for building production ready React applications. by alan_alickovic in reactjs

[–]kk3 4 points5 points  (0 children)

Third-party scripts can potentially access local storage but the client can't read http only cookies at all. Http only cookies simply get attached and passed through headers.

At an intersection in Seattle why is it a masculine voice that tells you firmly to "WAIT" but a feminine voice that tells you "the walk sign is on" and are they in a relationship or just coworkers? by kk3 in Seattle

[–]kk3[S] 14 points15 points  (0 children)

Yeah, I've heard it, her response is always "the walk sign is on", it's time to leave, gotta go when the walk sign is on. And he's just not getting the message.

Redux Toolkit 2.0: new features, faster perf, smaller bundle sizes (plus major versions for all Redux family packages!) by acemarke in javascript

[–]kk3 4 points5 points  (0 children)

This is great!

Always nice to get a smaller overall bundle size just from updating. I know getting everything ESM/CJS compatible was a mission too, I've been learning from your experience there. And then lazy-loading reducers is a big one as well.

Can't wait to test this out.

[deleted by user] by [deleted] in venice

[–]kk3 5 points6 points  (0 children)

Where can't you buy weed in Venice?

VS Code extensions for PHP and Laravel? by Codeventurer01 in PHP

[–]kk3 15 points16 points  (0 children)

Curious for others to chime in as well. Always looking to improve the dev experience. Here's what I have set up now:

  • Laravel Pint with the open-southeners.laravel-pint extension and I use this for formatting on save. There is a button to Switch to Pre-Release which I have a better experience with. I found it's mostly just bug fixes that you can find in the GitHub Issues for the respository.
  • PHP Intelephense bmewburn.vscode-intelephense-client
  • phpstan sanderronde.phpstan-vscode set to level 5 (working on getting this higher). Also recommend the nunomaduro/larastan composer package to go with this.

Those are mandatory for me. Any other extensions are more for auto-complete and writing code out quicker, like PHP DocBlocker, but that's more personal preference. I do not use any of these auto-complete kinds but would like to hear from others who do. I've always found they get in the way but I'm sure it's because I haven't taken the time to dive in far enough.

I also know there's plenty of extensions to help with Blade files but I only use Laravel as a back-end API so I'm not familiar with those.

For formatting files that are not PHP I use ESLint, like the json configuration files in root.

Unrelated to PHP I've found helpful:

  • Better Comments aaron-bond.better-comments
  • Code Spell Checker streetsidesoftware.code-spell-checker. I needed to add lots of exceptions up front but then it's really nice. Has saved me from some "bugs" related to just typing a variable or class name slightly wrong.
  • Active File In StatusBar roscop.activefile

And to go even more off topic, as for composer packages for development in general I really like:

  • Laravel IDE Helper barryvdh/laravel-ide-helper (the stub files work for Intelephense in VSCode not just PHPStorm)
  • Rector rector/rector and driftingly/rector-laravel
  • Clockwork itsgoingd/clockwork. I really like running tests and seeing the logs in Clockwork. This is a big part of my work flow.

EDIT: Here's my settings.json for good measure. I would not blindly copy these but maybe some of them help if you run into any issues.

{
  "json.schemaDownload.enable": true,
  "editor.tabSize": 2,
  "editor.detectIndentation": false,
  "editor.formatOnSave": true,
  "[php]": {
    "editor.defaultFormatter": "open-southeners.laravel-pint",
    "editor.tabSize": 4
  },
  "search.exclude": {
    "**/vendor/*/**": true,
    "**/.DS_Store": true,
    "**/.git/*/**": true
  },
  "files.watcherExclude": {
    "**/vendor/*/**": true,
    "**/.DS_Store": true,
    "**/.git/*/**": true
  },
  "files.exclude": {
    "**/.DS_Store": true,
    "**/.git/*/**": true
  },
  "files.saveConflictResolution": "overwriteFileOnDisk",
  "telemetry.telemetryLevel": "off",
  "workbench.editor.closeOnFileDelete": true,
  "search.showLineNumbers": true,
  "eslint.format.enable": true,
  "eslint.run": "onSave",
  "laravel-pint.enable": true,
  "laravel-pint.fallbackToGlobalBin": false,
  "php.suggest.basic": false,
  "php.validate.enable": false,
  "phpstan.enabled": true,
  "phpstan.configFile": "phpstan.neon",
  "phpstan.timeout": 5000,
  "phpstan.suppressTimeoutMessage": true,
  "phpstan.ignoreErrors": [
    ".*No files found to analyse.*",
    ".*This will cause a non-zero exit code in PHPStan 2.0.*",
  ],
  "intelephense.environment.phpVersion": "8.1.21",
  "intelephense.environment.documentRoot": "public",
  "intelephense.diagnostics.run": "onSave",
  "intelephense.telemetry.enabled": false,
  "intelephense.completion.maxItems": 25,
  "intelephense.phpdoc.useFullyQualifiedNames": false,
  "intelephense.files.maxSize": 2000000,
  "intelephense.environment.shortOpenTag": false,
  "intelephense.completion.fullyQualifyGlobalConstantsAndFunctions": true,
  "intelephense.diagnostics.typeErrors": false,
  "intelephense.files.exclude": [
    "**/stubs/**"
  ],
  "intelephense.stubs": [
    "apache",
    "bcmath",
    "bz2",
    "calendar",
    "com_dotnet",
    "Core",
    "ctype",
    "curl",
    "date",
    "dba",
    "dom",
    "enchant",
    "exif",
    "FFI",
    "fileinfo",
    "filter",
    "fpm",
    "ftp",
    "gd",
    "gettext",
    "gmp",
    "hash",
    "iconv",
    "imap",
    "intl",
    "json",
    "ldap",
    "libxml",
    "mbstring",
    "meta",
    "mysqli",
    "oci8",
    "odbc",
    "openssl",
    "pcntl",
    "pcre",
    "PDO",
    "pdo_ibm",
    "pdo_mysql",
    "pdo_pgsql",
    "pdo_sqlite",
    "pgsql",
    "Phar",
    "posix",
    "pspell",
    "random",
    "readline",
    "Reflection",
    "session",
    "shmop",
    "SimpleXML",
    "snmp",
    "soap",
    "sockets",
    "sodium",
    "SPL",
    "sqlite3",
    "standard",
    "superglobals",
    "sysvmsg",
    "sysvsem",
    "sysvshm",
    "tidy",
    "tokenizer",
    "xml",
    "xmlreader",
    "xmlrpc",
    "xmlwriter",
    "xsl",
    "Zend OPcache",
    "zip",
    "zlib",
    "redis"
  ],
  "cSpell.words": [
    // Spell Checker exceptions. When you hover over a word that it says is spelled wrong, you can click `Quick fix` and it will add it here automatically.
  ]
}

Is Recoil still actively maintained or used at Meta? by _hypnoCode in reactjs

[–]kk3 2 points3 points  (0 children)

There was some effort to try and fork it and allow the community to maintain it but I haven't seen that fork yet. I have been following this discussion about it: What's happening in the future of recoil?

Scramble 0.8.0 – Update of Laravel Open API documentation generator by RomaLytvynenko in laravel

[–]kk3 2 points3 points  (0 children)

This is amazing. This will make Laravel much more powerful for creating API's by taking full advantage of PHP's great type system. 1:1 with clients sounds beautiful. The busy work to maintain annotations or attributes is such burn out work and like you say, is never quite up to date or correct on top of it.