From 83903e7dc4fb9dfd44c8929b9e2c1a9096724f6e Mon Sep 17 00:00:00 2001 From: juuliabellcom Date: Mon, 22 Feb 2021 17:28:06 +0200 Subject: [PATCH 1/8] Update drupal core upto 8.9.13 --- composer.lock | 265 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 194 insertions(+), 71 deletions(-) diff --git a/composer.lock b/composer.lock index 8af6880..05178b6 100644 --- a/composer.lock +++ b/composer.lock @@ -782,6 +782,20 @@ "validation", "versioning" ], + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], "time": "2020-12-03T15:47:16+00:00" }, { @@ -1904,16 +1918,16 @@ }, { "name": "doctrine/annotations", - "version": "1.11.1", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "ce77a7ba1770462cd705a91a151b6c3746f9c6ad" + "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/ce77a7ba1770462cd705a91a151b6c3746f9c6ad", - "reference": "ce77a7ba1770462cd705a91a151b6c3746f9c6ad", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/b17c5014ef81d212ac539f07a1001832df1b6d3b", + "reference": "b17c5014ef81d212ac539f07a1001832df1b6d3b", "shasum": "" }, "require": { @@ -1928,11 +1942,6 @@ "phpunit/phpunit": "^7.5 || ^9.1.5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" @@ -1971,7 +1980,7 @@ "docblock", "parser" ], - "time": "2020-10-26T10:28:16+00:00" + "time": "2021-02-21T21:00:45+00:00" }, { "name": "doctrine/cache", @@ -3949,16 +3958,16 @@ }, { "name": "drupal/core", - "version": "8.9.10", + "version": "8.9.13", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "e725c01cdf6fb6d8b330a27fa75caab91034805a" + "reference": "a53db77b55a035453d7229e0c3069f8591cb4cb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/e725c01cdf6fb6d8b330a27fa75caab91034805a", - "reference": "e725c01cdf6fb6d8b330a27fa75caab91034805a", + "url": "https://api.github.com/repos/drupal/core/zipball/a53db77b55a035453d7229e0c3069f8591cb4cb6", + "reference": "a53db77b55a035453d7229e0c3069f8591cb4cb6", "shasum": "" }, "require": { @@ -3985,8 +3994,8 @@ "laminas/laminas-diactoros": "^1.8", "laminas/laminas-feed": "^2.12", "masterminds/html5": "^2.1", - "pear/archive_tar": "^1.4.11", - "php": ">=7.0.8", + "pear/archive_tar": "^1.4.12", + "php": "^7.0.8", "psr/log": "^1.0", "stack/builder": "^1.0", "symfony-cmf/routing": "^1.4", @@ -4176,7 +4185,7 @@ "GPL-2.0-or-later" ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", - "time": "2020-11-26T01:49:15+00:00" + "time": "2021-01-19T23:11:00+00:00" }, { "name": "drupal/core-composer-scaffold", @@ -7251,6 +7260,9 @@ }, "type": "drupal-module", "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + }, "drupal": { "version": "8.x-2.2", "datestamp": "1549289280", @@ -8214,16 +8226,16 @@ }, { "name": "egulias/email-validator", - "version": "2.1.24", + "version": "2.1.25", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ca90a3291eee1538cd48ff25163240695bd95448" + "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ca90a3291eee1538cd48ff25163240695bd95448", - "reference": "ca90a3291eee1538cd48ff25163240695bd95448", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0dbf5d78455d4d6a41d186da50adc1122ec066f4", + "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4", "shasum": "" }, "require": { @@ -8268,7 +8280,13 @@ "validation", "validator" ], - "time": "2020-11-14T15:56:27+00:00" + "funding": [ + { + "url": "https://github.com/egulias", + "type": "github" + } + ], + "time": "2020-12-29T14:50:06+00:00" }, { "name": "fabpot/goutte", @@ -10091,16 +10109,16 @@ }, { "name": "pear/archive_tar", - "version": "1.4.11", + "version": "1.4.13", "source": { "type": "git", "url": "https://github.com/pear/Archive_Tar.git", - "reference": "17d355cb7d3c4ff08e5729f29cd7660145208d9d" + "reference": "2b87b41178cc6d4ad3cba678a46a1cae49786011" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/17d355cb7d3c4ff08e5729f29cd7660145208d9d", - "reference": "17d355cb7d3c4ff08e5729f29cd7660145208d9d", + "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/2b87b41178cc6d4ad3cba678a46a1cae49786011", + "reference": "2b87b41178cc6d4ad3cba678a46a1cae49786011", "shasum": "" }, "require": { @@ -10153,7 +10171,17 @@ "archive", "tar" ], - "time": "2020-11-19T22:10:24+00:00" + "funding": [ + { + "url": "https://github.com/mrook", + "type": "github" + }, + { + "url": "https://www.patreon.com/michielrook", + "type": "patreon" + } + ], + "time": "2021-02-16T10:50:50+00:00" }, { "name": "pear/console_getopt", @@ -15010,16 +15038,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { @@ -15031,7 +15059,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -15068,20 +15096,34 @@ "polyfill", "portable" ], - "time": "2020-10-23T14:02:19+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "c536646fdb4f29104dd26effc2fdcb9a5b085024" + "reference": "06fb361659649bcfd6a208a0f1fcaf4e827ad342" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/c536646fdb4f29104dd26effc2fdcb9a5b085024", - "reference": "c536646fdb4f29104dd26effc2fdcb9a5b085024", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/06fb361659649bcfd6a208a0f1fcaf4e827ad342", + "reference": "06fb361659649bcfd6a208a0f1fcaf4e827ad342", "shasum": "" }, "require": { @@ -15093,7 +15135,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -15131,20 +15173,34 @@ "portable", "shim" ], - "time": "2020-10-23T14:02:19+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117" + "reference": "2d63434d922daf7da8dd863e7907e67ee3031483" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3b75acd829741c768bc8b1f84eb33265e7cc5117", - "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/2d63434d922daf7da8dd863e7907e67ee3031483", + "reference": "2d63434d922daf7da8dd863e7907e67ee3031483", "shasum": "" }, "require": { @@ -15158,7 +15214,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -15201,20 +15257,34 @@ "portable", "shim" ], - "time": "2020-10-23T14:02:19+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "727d1096295d807c309fb01a851577302394c897" + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897", - "reference": "727d1096295d807c309fb01a851577302394c897", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", "shasum": "" }, "require": { @@ -15226,7 +15296,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -15268,20 +15338,34 @@ "portable", "shim" ], - "time": "2020-10-23T14:02:19+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", - "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", "shasum": "" }, "require": { @@ -15293,7 +15377,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -15331,7 +15415,21 @@ "portable", "shim" ], - "time": "2020-10-23T14:02:19+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" }, { "name": "symfony/polyfill-php56", @@ -15437,16 +15535,16 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.20.0", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930" + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930", - "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", "shasum": "" }, "require": { @@ -15455,7 +15553,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -15492,7 +15590,21 @@ "portable", "shim" ], - "time": "2020-10-23T14:02:19+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php80", @@ -16246,16 +16358,16 @@ }, { "name": "twig/twig", - "version": "v1.44.1", + "version": "v1.44.2", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "04b15d4c0bb18ddbf82626320ac07f6a73f199c9" + "reference": "138c493c5b8ee7cff3821f80b8896d371366b5fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/04b15d4c0bb18ddbf82626320ac07f6a73f199c9", - "reference": "04b15d4c0bb18ddbf82626320ac07f6a73f199c9", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/138c493c5b8ee7cff3821f80b8896d371366b5fe", + "reference": "138c493c5b8ee7cff3821f80b8896d371366b5fe", "shasum": "" }, "require": { @@ -16306,7 +16418,17 @@ "keywords": [ "templating" ], - "time": "2020-10-27T19:22:48+00:00" + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2021-01-05T10:10:05+00:00" }, { "name": "typo3/phar-stream-wrapper", @@ -16617,12 +16739,12 @@ "version": "1.9.1", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", + "url": "https://github.com/webmozarts/assert.git", "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", "shasum": "" }, @@ -16768,5 +16890,6 @@ "platform": { "php": ">=7.1" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } From ac76448f292c0086c0128adcbb496f67a889d14c Mon Sep 17 00:00:00 2001 From: Andriy Iun Date: Mon, 1 Mar 2021 15:51:29 +0100 Subject: [PATCH 2/8] Adjusted scaffold settings in composer.json file --- composer.json | 3 +++ web/modules/.gitignore | 1 + web/profiles/.gitignore | 1 + web/sites/.gitignore | 1 + web/themes/.gitignore | 1 + 5 files changed, 7 insertions(+) create mode 100644 web/modules/.gitignore create mode 100644 web/profiles/.gitignore create mode 100644 web/sites/.gitignore create mode 100644 web/themes/.gitignore diff --git a/composer.json b/composer.json index 991ca21..3d1fdb9 100644 --- a/composer.json +++ b/composer.json @@ -95,6 +95,9 @@ "initial": { ".editorconfig": "../.editorconfig", ".gitattributes": "../.gitattributes" + }, + "locations": { + "web-root": "web/" } }, "enable-patching": true, diff --git a/web/modules/.gitignore b/web/modules/.gitignore new file mode 100644 index 0000000..739a339 --- /dev/null +++ b/web/modules/.gitignore @@ -0,0 +1 @@ +/README.txt \ No newline at end of file diff --git a/web/profiles/.gitignore b/web/profiles/.gitignore new file mode 100644 index 0000000..739a339 --- /dev/null +++ b/web/profiles/.gitignore @@ -0,0 +1 @@ +/README.txt \ No newline at end of file diff --git a/web/sites/.gitignore b/web/sites/.gitignore new file mode 100644 index 0000000..739a339 --- /dev/null +++ b/web/sites/.gitignore @@ -0,0 +1 @@ +/README.txt \ No newline at end of file diff --git a/web/themes/.gitignore b/web/themes/.gitignore new file mode 100644 index 0000000..739a339 --- /dev/null +++ b/web/themes/.gitignore @@ -0,0 +1 @@ +/README.txt \ No newline at end of file From 0179cba895986008dd687f4c07d4f2abc3139b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mads=20N=C3=B8rgaard?= Date: Tue, 2 Mar 2021 11:27:02 +0100 Subject: [PATCH 3/8] Adding an updated install procedure. --- README.md | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8a337da..51faee1 100755 --- a/README.md +++ b/README.md @@ -7,19 +7,41 @@ ``` git clone git@github.com:OS2Forms/os2forms8.git ``` -* Rename your installation if needed +* Rename your project folder if needed (default is os2forms8) + +* Install Docksal if not yet installed: + + ``` + curl -fsSL https://get.docksal.io | bash + ``` +* Check Docksal version (optional check): + + ``` + fin version + ``` +* Check system info (optional check): -* Go to the installation and start composer ``` - composer install + fin sysinfo ``` -* Follow the regular install process, select ```OS2Forms8``` as install profile. -* After installation is done, enable OS2Forms by: +* Initialize the OS2forms8 project: + + ``` + fin init + ``` +* Script to reinstall drupal from scratch based in os2forms8 profile: + + ``` + fin rebuild-test + ``` +* Add trusted host to settings.php: + ``` - drush en os2forms, os2forms_nemid, os2forms_dawa, os2forms_sbsys + $settings['trusted_host_patterns'] = ['^os2forms8\.docksal$']; ``` -* Enable `Custom theme` for project. This is a recommended theme that has minimum settings, - so you will need to add all required blocks into proper regions afterwards. + +* The installation should now be available on url: `http://os2forms8.docksal` and ready for further development, +eg. by adding a `custom` folder to `web/modules`, `web/themes` and `web/profiles`. ### Drupal settings From 822d965155def20f2fd8ec818865bb2a87785d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mads=20N=C3=B8rgaard?= Date: Tue, 2 Mar 2021 11:34:40 +0100 Subject: [PATCH 4/8] This documentation includes the installation procedure, which works at the top rather than the steps to install using Composer. Added section about development and contribution. --- README.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/README.md b/README.md index 51faee1..05eef49 100755 --- a/README.md +++ b/README.md @@ -72,6 +72,71 @@ to create an issue in github repository issue tracker. For issue description there is expected that you will provide clear and sufficient information about your feature request or bug report. +### Development environment + +For development purposes there has been included development environment driven +by [Docksal](https://docksal.io/). You can find all settings related to in +`/.docksal` folder. + +See official manual on [how to install docksal](https://docksal.io/installation) on your local +development machine. + +Since you have installed docksal it's easy to get installed default installation. +Use following commands: +``` +# Clone project if you didn't do it yet +git clone git@github.com:OS2Forms/os2forms8.git os2forms8-dev +cd os2forms8-dev +# Start docksal environment +fin start +``` +As result, you will get URL like `http://os2forms8-dev.docksal` that is going to + be used for access os2forms application. + +Run `fin help` to see commands you may need. You see [more information about docksal `fin` command](https://docs.docksal.io/fin/fin/) + +Most useful commands: +- `fin start/stop/restart` - start/stop/restart environment +- `fin bash` - get ssh access in CLI container +- `fin drush [comnnand]` - run drush command from host mashine in CLI container +- `fin composer [comnnand]` - run composer command from host mashine in CLI container +- `fin exec 'command'` - run any command from host machine in CLI container + +### Install default installation + +To get default installation just run `fin rebuild-test` command. Docksal will +create default os2forms installation for you. + +Before start using it you need to add trusted hosts settings. See next section. + +### Upload existing db +If you have existing database you want to upload and use, then you have to +configure Drupal settings (see section above). NOTE: It's recommended to add +settings `settings.local.php` file. + +Default db service credentials: + +``` +$databases['default']['default'] = array ( + 'database' => 'default', + 'username' => 'root', + 'password' => 'root', + 'prefix' => '', + 'host' => 'db', + 'port' => '', + 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', + 'driver' => 'mysql', +); +``` + +Use `fin bash` or `fin drush [command]` to upload your database + +You also need to add the rest drupal settings such as salt, sync/tmp folders, +trusted hosts +``` +$settings['trusted_host_patterns'] = ['^os2forms8-dev.docksal$', '^localhost$']; +``` + ### Code review policy See [OS2Forms code review policy](https://github.com/OS2Forms/docs#code-review) From 97573344e852b3fe98f320b0760160d1291f760b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mads=20N=C3=B8rgaard?= Date: Tue, 2 Mar 2021 14:10:28 +0100 Subject: [PATCH 5/8] Fixed mistakes. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 05eef49..e822810 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OS2Forms Drupal 8 project [![Build Status](https://travis-ci.org/OS2Forms/os2forms8.svg?branch=master)](https://travis-ci.org/OS2Forms/os2forms8) -## Usage +## Development usage * Clone the repository @@ -14,12 +14,12 @@ ``` curl -fsSL https://get.docksal.io | bash ``` -* Check Docksal version (optional check): +* Check Docksal version (optional): ``` fin version ``` -* Check system info (optional check): +* Check system info (optional): ``` fin sysinfo @@ -29,19 +29,19 @@ ``` fin init ``` -* Script to reinstall drupal from scratch based in os2forms8 profile: +* Script to reinstall drupal from scratch based on os2forms8 profile: ``` fin rebuild-test ``` -* Add trusted host to settings.php: +* Add trusted host patterns to settings.php: ``` $settings['trusted_host_patterns'] = ['^os2forms8\.docksal$']; ``` * The installation should now be available on url: `http://os2forms8.docksal` and ready for further development, -eg. by adding a `custom` folder to `web/modules`, `web/themes` and `web/profiles`. +eg. by adding a `custom` directory to `web/modules`, `web/themes` and `web/profiles`. ### Drupal settings From 1e2a681510d9b96ba4f34ee7c3ca5474e4787d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mads=20N=C3=B8rgaard?= Date: Tue, 2 Mar 2021 15:14:25 +0100 Subject: [PATCH 6/8] Added full path to settings.php file. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e822810..84d65ef 100755 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ ``` fin rebuild-test ``` -* Add trusted host patterns to settings.php: +* Add trusted host patterns to `web/sites/default/settings.php`: ``` $settings['trusted_host_patterns'] = ['^os2forms8\.docksal$']; From a1b7d573d8f7c47b9860ebb95d94edc4c1d93345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mads=20N=C3=B8rgaard?= Date: Wed, 3 Mar 2021 11:31:44 +0100 Subject: [PATCH 7/8] Restructure and additions per input from ITK. --- README.md | 193 ++++++++++++++++++++++++------------------------------ 1 file changed, 85 insertions(+), 108 deletions(-) diff --git a/README.md b/README.md index 84d65ef..40d93a7 100755 --- a/README.md +++ b/README.md @@ -1,141 +1,118 @@ -# OS2Forms Drupal 8 project [![Build Status](https://travis-ci.org/OS2Forms/os2forms8.svg?branch=master)](https://travis-ci.org/OS2Forms/os2forms8) +# OS2Forms Drupal 8 project -## Development usage +[![Build Status](https://travis-ci.org/OS2Forms/os2forms8.svg?branch=master)](https://travis-ci.org/OS2Forms/os2forms8) -* Clone the repository +## Getting Started - ``` - git clone git@github.com:OS2Forms/os2forms8.git - ``` -* Rename your project folder if needed (default is os2forms8) +These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. -* Install Docksal if not yet installed: +### Prerequisites - ``` - curl -fsSL https://get.docksal.io | bash - ``` -* Check Docksal version (optional): +* [Docksal](https://docksal.io/) - ``` - fin version - ``` -* Check system info (optional): +### Installing - ``` - fin sysinfo - ``` -* Initialize the OS2forms8 project: +1. Clone the git repository + ```sh + git clone git@github.com:OS2Forms/os2forms8.git + ``` - ``` - fin init - ``` -* Script to reinstall drupal from scratch based on os2forms8 profile: +2. Enter the newly created project directory + ```sh + cd os2forms8 + ``` - ``` - fin rebuild-test - ``` -* Add trusted host patterns to `web/sites/default/settings.php`: +3. Start docksal environment + ```sh + fin start + ``` - ``` - $settings['trusted_host_patterns'] = ['^os2forms8\.docksal$']; - ``` - -* The installation should now be available on url: `http://os2forms8.docksal` and ready for further development, -eg. by adding a `custom` directory to `web/modules`, `web/themes` and `web/profiles`. +4. Install dependencies and enable modules + ```sh + fin rebuild-test + ``` -### Drupal settings +5. Create local settings + ```sh + cp web/sites/example.settings.local.php web/sites/default/settings.local.php + ``` -Main Drupal setting file `web/sites/default/settings.php` has been added to git index. -By this way all os2forms projects are getting default settings, like temporary -directory, private directory, sync directory. +6. Configure trusted hosts in settings.local.php (add the following if not present) + ```php + // web/sites/default/settings.local.php -All project's sensitive configuration should be stored in `settings.local.php` -file. This file will be included from main `settings.php` settings. + $settings['trusted_host_patterns'] = ['^os2forms8.docksal$', '^localhost$']; + ``` -#### Multisite/Subsite configuration. +You should now be able to browse to the application at `http://os2forms8.docksal` -On multisite solution main Drupal setting file`web/sites/default/settings.php` -should be included into subsite's `settings.php` file. The easiest way to get -the new configuration on a subsite is to copy prepared template -`web/sites/subsite.settings.php` and add DB configuration, salt. +## Deployment -Hint to generate salt string: -``` -drush php-eval 'echo \Drupal\Component\Utility\Crypt::randomBytesBase64(55) . "\n";' -``` - -## Contribution +These instructions will get you a copy of the project up and running on a live system. +For a more detailed description, you could look at the `web/core/INSTALL.txt` [here](./web/core/INSTALL.txt). -OS2Forms projects is an opened for new features and os course bugfixes. -If you have any suggestion, or you found a bug in project, you are very welcome -to create an issue in github repository issue tracker. -For issue description there is expected that you will provide clear and -sufficient information about your feature request or bug report. +### Prerequisites -### Development environment +* A HTTP server such as [Apache](https://httpd.apache.org/) that supports PHP +* A database service such as [MySQL](https://www.mysql.com/) +* PHP 7 with the following extensions enabled: + * gd + * curl + * simplexml + * xml + * dom + * soap + * mbstring + * database specific extension such as the mysql extension +* [Composer](https://getcomposer.org/) -For development purposes there has been included development environment driven -by [Docksal](https://docksal.io/). You can find all settings related to in -`/.docksal` folder. +### Installing -See official manual on [how to install docksal](https://docksal.io/installation) on your local -development machine. - -Since you have installed docksal it's easy to get installed default installation. -Use following commands: -``` -# Clone project if you didn't do it yet -git clone git@github.com:OS2Forms/os2forms8.git os2forms8-dev -cd os2forms8-dev -# Start docksal environment -fin start +1. Clone the git repository +```sh +git clone git@github.com:OS2Forms/os2forms8.git ``` -As result, you will get URL like `http://os2forms8-dev.docksal` that is going to - be used for access os2forms application. - -Run `fin help` to see commands you may need. You see [more information about docksal `fin` command](https://docs.docksal.io/fin/fin/) -Most useful commands: -- `fin start/stop/restart` - start/stop/restart environment -- `fin bash` - get ssh access in CLI container -- `fin drush [comnnand]` - run drush command from host mashine in CLI container -- `fin composer [comnnand]` - run composer command from host mashine in CLI container -- `fin exec 'command'` - run any command from host machine in CLI container +2. Enter the newly created project directory +```sh +cd os2forms8 +``` -### Install default installation +3. Install dependencies without development dependencies +```sh +composer install --no-dev +``` -To get default installation just run `fin rebuild-test` command. Docksal will -create default os2forms installation for you. +4. Generate a salt string and insert it in web/sites/default/settings.php + ```sh + # Generate salt string - this will output a new salt string + ./vendor/bin/drush php-eval 'echo \Drupal\Component\Utility\Crypt::randomBytesBase64(55) . "\n";' + ``` -Before start using it you need to add trusted hosts settings. See next section. + ```php + // web/sites/default/settings.php + $settings['hash_salt'] = ''; // Insert the generated salt string here + ``` -### Upload existing db -If you have existing database you want to upload and use, then you have to -configure Drupal settings (see section above). NOTE: It's recommended to add -settings `settings.local.php` file. +5. Configure trusted hosts in web/sites/default/settings.php. + For more information on how to write this, see the section for [Trusted Host settings](https://www.drupal.org/docs/installing-drupal/trusted-host-settings) + in the official Drupal installation guide. + ```php + // web/sites/default/settings.php -Default db service credentials: + $settings['trusted_host_patterns'] = ['']; + ``` +6. Visit the url for the os2forms application and follow the instructions + * Select the os2forms install profile for a default os2forms installation -``` -$databases['default']['default'] = array ( - 'database' => 'default', - 'username' => 'root', - 'password' => 'root', - 'prefix' => '', - 'host' => 'db', - 'port' => '', - 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', - 'driver' => 'mysql', -); -``` +7. Enable OS2Forms modules + ```sh + ./vendor/bin/drush en os2forms, os2forms_nemid, os2forms_dawa, os2forms_sbsys + ``` -Use `fin bash` or `fin drush [command]` to upload your database +## Contributing -You also need to add the rest drupal settings such as salt, sync/tmp folders, -trusted hosts -``` -$settings['trusted_host_patterns'] = ['^os2forms8-dev.docksal$', '^localhost$']; -``` +OS2Forms projects is open for new features and os course bugfixes. If you have any suggestion, or you found a bug in project, you are very welcome to create an issue in github repository issue tracker. For issue description there is expected that you will provide clear and sufficient information about your feature request or bug report. ### Code review policy See [OS2Forms code review policy](https://github.com/OS2Forms/docs#code-review) From 47031273c3af1cae2c0611277845d3f59f9a45fa Mon Sep 17 00:00:00 2001 From: Lars Steen Date: Wed, 3 Mar 2021 13:01:32 +0100 Subject: [PATCH 8/8] Adding install description for traditional development environment --- README.md | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 40d93a7..af02d8e 100755 --- a/README.md +++ b/README.md @@ -6,11 +6,43 @@ These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. -### Prerequisites +### Traditional + +#### Installing + +1. Clone the git repository + ```sh + git clone git@github.com:OS2Forms/os2forms8.git + ``` + +2. Enter the newly created project directory + ```sh + cd os2forms8 + ``` + +3. Install dependencies + ```sh + composer install + ``` + +4. Install drupal based on OS2Forms profile. Make sure you substitute the following variables: + * db_pass + * db_user + * db_host + * db_name + * account_password + * site_name + ```sh + drush si os2forms8 --db-url=mysql://db_pass:db_user@db_host/db_name --account-pass=account_password --site-name="site_name" + ``` + +### With Docksal + +#### Prerequisites * [Docksal](https://docksal.io/) -### Installing +#### Installing 1. Clone the git repository ```sh