Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array
@hugronaphor
hugronaphor / drupal-vm-provision-nvm
Last active February 15, 2020 11:13
Install nvm for drupal-vm with post_provision_scripts
#!/bin/bash
# Keep in sync the version defined here with the one in .travis.yml
NODE_VERSION="8.17.0"
VAGRANT_USER="vagrant"
VAGRANT_HOME_PATH="/home/$VAGRANT_USER"
cd $VAGRANT_HOME_PATH || exit 1;
# Specify the NVM_DIR as the script would use the root directory otherwise.
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix (/home/sotarok/.phpenv/versions/5.4.0s). This prefix can be dynamicaly changed by using the
; '-p' argument from the command line.
; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
@hugronaphor
hugronaphor / git-ssh-error-fix.sh
Created March 17, 2022 18:18 — forked from Tamal/git-ssh-error-fix.sh
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
$ git clone [email protected]:xxxxx/xxxx.git my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T [email protected]
ssh: connect to host github.com port 22: Connection timed out
$ # but this might work
diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
index 46e96c9a88..04b65e399b 100644
--- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
+++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
@@ -1748,7 +1748,7 @@ protected function updateDedicatedTableSchema(FieldStorageDefinitionInterface $s
}
else {
if ($this->hasColumnChanges($storage_definition, $original)) {
- throw new FieldStorageDefinitionUpdateForbiddenException('The SQL storage cannot change the schema for an existing field (' . $storage_definition->getName() . ' in ' . $storage_definition->getTargetEntityTypeId() . ' entity) with data.');
+ // throw new FieldStorageDefinitionUpdateForbiddenException('The SQL storage cannot change the schema for an existing field (' . $storage_definition->getName() . ' in ' . $storage_definition->getTargetEntityTypeId() . ' entity) with data.');