Skip to content

Instantly share code, notes, and snippets.

View visabhishek's full-sized avatar
💭
I may be slow to respond.

Abhishek visabhishek

💭
I may be slow to respond.
View GitHub Profile
@visabhishek
visabhishek / drupal_8_9_configure_phpunit_for_testing.md
Created February 9, 2023 14:44 — forked from davidjguru/drupal_8_9_configure_phpunit_for_testing.md
Drupal 8 || 9 - Configure your PHPUnit environment for functional testing
@visabhishek
visabhishek / xdebug_lando_phpstorm.md
Created August 25, 2022 12:25 — forked from miloskroulik/xdebug_lando_phpstorm.md
How to setup xdebug + Lando + PHPstorm when using Drupal 8 recipe

I assume you're using Drupal 8 recipe and Linux as a host OS. Also, xdebug 3.x is assumed, which is standard for Lando-provided PHP image.

Set up Lando

Example .lando.yml file can look like this:

name: xdebug-test
recipe: drupal8
config:
 webroot: web
name: gatsby
proxy:
appserver:
# Though Gatsby will be running on 80, it will still be available via SSH here.
- gatsby.lndo.site
services:
# Prefer appserver as a name since Lando defaults to it - making `lando ssh` functional as opposed to a required service name (`lando ssh nodejs`
appserver:
@visabhishek
visabhishek / .lando.yml
Created January 21, 2022 13:47 — forked from segovia94/.lando.yml
Lando config for running PHPUnit Browser and Javascript tests in Drupal with chromedriver
name: drupal
recipe: drupal9
config:
webroot: .
services:
appserver:
build:
- mkdir -p $LANDO_WEBROOT/sites/simpletest/browser_output
overrides:
environment:
@visabhishek
visabhishek / phpunit.xml
Created July 12, 2021 07:43 — forked from mglaman/phpunit.xml
My Drupal project phpunit.xml configuration
<?xml version="1.0" encoding="UTF-8"?>
<!-- TODO set checkForUnintentionallyCoveredCode="true" once https://www.drupal.org/node/2626832 is resolved. -->
<!-- PHPUnit expects functional tests to be run with either a privileged user
or your current system user. See core/tests/README.md and
https://www.drupal.org/node/2116263 for details.
-->
<phpunit bootstrap="web/core/tests/bootstrap.php" colors="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
@visabhishek
visabhishek / countries.json
Created March 3, 2021 15:38 — forked from codegeous/countries.json
Explains how to build a search filters in react JS websites
[
{
"name": "Afghanistan",
"code": "AF"
},
{
"name": "Åland Islands",
"code": "AX"
},
{
@visabhishek
visabhishek / update-modules.php
Created June 5, 2020 07:09 — forked from twfahey1/update-modules.php
Drush script for automatic updates and commits
#!/usr/bin/env drush
<?php
/**
* This script updates eligible modules and commits automatically.
*
* To use this, place this script in your site docroot. Run it with
* `drush update-modules.php`.
* This script will need the "eligible_modules" key defined in a
* drushrc.php or drushrc.local.php., e.g.:
@visabhishek
visabhishek / .gitconfig
Created September 3, 2019 06:11 — forked from johnpolacek/.gitconfig
My current .gitconfig aliases
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
dmerged = "git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
st = status
@visabhishek
visabhishek / .lando.yml
Created June 26, 2019 08:35 — forked from colorfield/.lando.yml
Drupal Lando configuration for Solr 7 and Search API
name: drupal-solr
recipe: drupal8
config:
# PHP 7 is required for Search API Solr 2.
php: '7.2'
webroot: web
# Get nice url's for each service.
proxy: