drush ev 'cache_set("foo", "bar", "cache");'
drush ev '$x = new MemCacheDrupal("cache"); print_r($x->get("foo"));'
snippet to check if memcache is working.
drush ev 'cache_set("foo", "bar", "cache");'
drush ev '$x = new MemCacheDrupal("cache"); print_r($x->get("foo"));'
snippet to check if memcache is working.
This problem with access permissions has become common in latest versions of Mac OS, you need to give permissions to apps (executables) so they can do/use stuff on your disk/computer. Most of the times you will get a prompt for asking/checking this but sometimes this will quietly fail.
You fixed something in contrib module and you want to create quick patch from that, if it spans through multiple commits, best way to do that is to make a patch from multiple commits, to combine them into one file, write this
So you have and order, but don't know how to get to payments that are referencing this order, there are few ways you can achieve that. First is to load it by properties
$payments = \Drupal::entityTypeManager()->getStorage('commerce_payment')->loadByProperties(['order_id' => $order->id()]);
second is to load them by order
To have shared history between sessions in terminal I use this settings so that history is appended to each new window I open
I needed to manipulate some text output from JS function, to do that we need to create DOM element from that output. So what you can do is
Good article on all aspects of GIT https://dev.to/unseenwizzard/learn-git-concepts-not-commands-4gjc
So you made a mistake and made a revert, then you want to introduce again the code you use in new merge, if you try to make merge request(MR) from branch you made original MR you reverted you will get nothing in that MR. This is not a bug, but a feature of git. Reverting does not roll back, but rather appends the revert to the front of the HEAD.
To get route name that you maybe want to use in some custom code you can get it with this 2 ways
So if you want for some reason to get a count for each of the entites in your DB, run this code and get some output for it