Update Composer, update everything

This commit is contained in:
Oliver Davies 2018-11-23 12:29:20 +00:00
parent ea3e94409f
commit dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions

View file

@ -12,11 +12,21 @@ git push -u origin [issue-number]-[issue-description]
# Create patch
git diff 8.x-5.x > [project_name]-[issue-description]-[issue-number]-00.patch
# Apply remote patch
curl https://www.drupal.org/files/issues/[project_name]-[issue-description]-[issue-number]-00.patch | git apply -
# Force apply patch
patch -p1 < webform_whitespace_inconsistencies-2989606-5.diff
# Remove patch and untracked files
git reset --hard; git clean -f -d
# Create interdiff
interdiff \
[issue-number]-[old-comment-number].patch \
[issue-number]-[new-comment-number].patch \
> interdiff-[issue-number]-[old-comment-number]-[new-comment-number].txt
cat interdiff-[issue-number]-[old-comment-number]-[new-comment-number].txt
# Merge branch with all commits
git checkout 8.x-5.x
@ -29,9 +39,25 @@ git merge --squash [issue-number]-[issue-description]
git commit -m 'Issue #[issue-number]: [issue-description]'
git push
# Delete branch
# Delete local and remote branch
git branch -D [issue-number]-[issue-description]
git push origin :[issue-number]-[issue-description]
# Delete remove branch
git push origin --delete [issue-number]-[issue-description]
```
**Generate Drush Make and Composer Files**
```bash
drush webform-libraries-make > webform.libraries.make.yml
drush webform-libraries-composer > composer.json
```
**Manually Execute an Update Hook**
```bash
drush php-eval 'module_load_include('install', 'webform'); webform_update_8144()';
```
**Import and Export Configuration**
@ -40,66 +66,173 @@ git push origin :[issue-number]-[issue-description]
# Generate *.features.yml for the webform.module and sub-modules.
# These files will be ignored. @see .gitignore.
echo 'true' > webform.features.yml
echo 'true' > modules/webform_examples/webform_examples.features.yml
echo 'true' > modules/webform_examples_accessibility/webform_examples_accessibility.features.yml
echo 'true' > modules/webform_example_element/webform_example_element.features.yml
echo 'true' > modules/webform_example_composite/webform_example_composite.features.yml
echo 'true' > modules/webform_example_handler/webform_example_handler.features.yml
echo 'true' > modules/webform_example_element/webform_example_remote_post.features.yml
echo 'true' > modules/webform_templates/webform_templates.features.yml
echo 'true' > modules/webform_templates/webform_templates.features.yml
echo 'true' > modules/webform_image_select/webform_image_select.features.yml
echo 'true' > modules/webform_image_select/tests/modules/webform_image_select_test.features.yml
echo 'true' > modules/webform_node/webform_node.features.yml
echo 'true' > modules/webform_node/tests/modules/webform_node_test_multiple/webform_node_test_multiple.features.yml
echo 'true' > modules/webform_node/tests/modules/webform_node_test_translation/webform_node_test_translation.features.yml
echo 'true' > modules/webform_scheduled_email/tests/modules/webform_scheduled_email_test/webform_scheduled_email_test.features.yml
echo 'true' > modules/webform_demo/webform_demo_application_evaluation/webform_demo_application_evaluation.features.yml
echo 'true' > modules/webform_demo/webform_demo_event_registration/webform_demo_event_registration.features.yml
echo 'true' > modules/webform_demo/webform_demo_region_contact/webform_demo_region_contact.features.yml
echo 'true' > tests/modules/webform_test/webform_test.features.yml
echo 'true' > tests/modules/webform_test_ajax/webform_test_ajax.features.yml
echo 'true' > tests/modules/webform_test_alter_hooks/webform_test_alter_hooks.features.yml
echo 'true' > tests/modules/webform_test_block_context/webform_test_block_context.features.yml
echo 'true' > tests/modules/webform_test_block_custom/webform_test_block_custom.features.yml
echo 'true' > tests/modules/webform_test_block_submission_limit/webform_test_block_submission_limit.features.yml
echo 'true' > tests/modules/webform_test_config_performance/webform_test_config_performance.features.yml
echo 'true' > tests/modules/webform_test_custom_properties/webform_test_custom_properties.features.yml
echo 'true' > tests/modules/webform_test_element/webform_test_element.features.yml
echo 'true' > tests/modules/webform_test_handler/webform_test_handler.features.yml
echo 'true' > tests/modules/webform_test_handler_remote_post/webform_test_handler_remote_post.features.yml
echo 'true' > tests/modules/webform_test_options/webform_test_options.features.yml
echo 'true' > tests/modules/webform_test_paragraphs/webform_test_paragraphs.features.yml
echo 'true' > tests/modules/webform_test_rest/webform_test_rest.features.yml
echo 'true' > tests/modules/webform_test_submissions/webform_test_submissions.features.yml
echo 'true' > tests/modules/webform_test_third_party_settings/webform_test_third_party_settings.features.yml
echo 'true' > tests/modules/webform_test_translation/webform_test_translation.features.yml
echo 'true' > tests/modules/webform_test_translation_lingotek/webform_test_translation_lingotek.features.yml
echo 'true' > tests/modules/webform_test_validate/webform_test_validate.features.yml
echo 'true' > tests/modules/webform_test_views/webform_test_views.features.yml
echo 'true' > tests/modules/webform_test_wizard_custom/webform_test_wizard_custom.features.yml
# Make sure all modules that are going to be exported are enabled
drush en -y webform\
webform_demo_application_evaluation\
webform_demo_event_registration\
webform_demo_region_contact\
webform_examples\
webform_examples_accessibility\
webform_example_element\
webform_example_handler\
webform_example_remote_post\
webform_image_select\
webform_node\
webform_templates\
webform_test\
webform_test_element\
webform_test_handler\
webform_test_handler_remote_post\
webform_test_options\
webform_test_views\
webform_test_rest\
webform_test_submissions\
webform_test_translation\
webform_node;
webform_test_views\
webform_image_select_test\
webform_node_test_multiple\
webform_node_test_translation\
webform_scheduled_email_test;
# Show the difference between the active config and the default config.
drush features-diff webform
drush features-diff webform_test
# Export webform configuration from your site.
# Export webform configuration from your site.
drush features-export -y webform
drush features-export -y webform_demo_application_evaluation
drush features-export -y webform_demo_event_registration
drush features-export -y webform_demo_region_contact
drush features-export -y webform_examples
drush features-export -y webform_examples_accessibility
drush features-export -y webform_example_element
drush features-export -y webform_example_composite
drush features-export -y webform_example_handler
drush features-export -y webform_example_remote_post
drush features-export -y webform_node
drush features-export -y webform_image_select
drush features-export -y webform_templates
drush features-export -y webform_test
drush features-export -y webform_test_block_submission_limit
drush features-export -y webform_test_element
drush features-export -y webform_test_handler
drush features-export -y webform_test_handler_remote_post
drush features-export -y webform_test_options
drush features-export -y webform_test_views
drush features-export -y webform_test_rest
drush features-export -y webform_test_submissions
drush features-export -y webform_test_translation
drush features-export -y webform_node
drush features-export -y webform_test_views
drush features-export -y webform_test_paragraphs
drush features-export -y webform_image_select_test
drush features-export -y webform_node_test_multiple
drush features-export -y webform_node_test_translation
drush features-export -y webform_scheduled_email_test
# Revert all feature update to *.info.yml files.
git checkout -- *.info.yml
# Tidy webform configuration from your site.
drush webform-tidy -y --dependencies webform
drush webform-tidy -y --dependencies webform_demo_application_evaluation
drush webform-tidy -y --dependencies webform_examples
drush webform-tidy -y --dependencies webform_templates
drush webform-tidy -y --dependencies webform_test
drush webform-tidy -y --dependencies webform_test_element
drush webform-tidy -y --dependencies webform_test_handler
drush webform-tidy -y --dependencies webform_test_options
drush webform-tidy -y --dependencies webform_test_views
drush webform-tidy -y --dependencies webform_test_translation
drush webform-tidy -y --dependencies webform_node
# Tidy webform configuration from your site.
drush webform:tidy -y --dependencies webform
drush webform:tidy -y --dependencies webform_demo_application_evaluation
drush webform:tidy -y --dependencies webform_demo_event_registration
drush webform:tidy -y --dependencies webform_demo_region_contact
drush webform:tidy -y --dependencies webform_examples
drush webform:tidy -y --dependencies webform_examples_accessibility
drush webform:tidy -y --dependencies webform_example_element
drush webform:tidy -y --dependencies webform_example_composite
drush webform:tidy -y --dependencies webform_example_handler
drush webform:tidy -y --dependencies webform_example_remote_post
drush webform:tidy -y --dependencies webform_image_select
drush webform:tidy -y --dependencies webform_node
drush webform:tidy -y --dependencies webform_templates
drush webform:tidy -y --dependencies webform_test
drush webform:tidy -y --dependencies webform_test_block_submission_limit
drush webform:tidy -y --dependencies webform_test_element
drush webform:tidy -y --dependencies webform_test_handler
drush webform:tidy -y --dependencies webform_test_handler_remote_post
drush webform:tidy -y --dependencies webform_test_options
drush webform:tidy -y --dependencies webform_test_paragraphs
drush webform:tidy -y --dependencies webform_test_rest
drush webform:tidy -y --dependencies webform_test_submissions
drush webform:tidy -y --dependencies webform_test_translation
drush webform:tidy -y --dependencies webform_test_views
drush webform:tidy -y --dependencies webform_image_select_test
drush webform:tidy -y --dependencies webform_node_test_multiple
drush webform:tidy -y --dependencies webform_node_test_translation
drush webform:tidy -y --dependencies webform_scheduled_email_test
# Re-import all webform configuration into your site.
# Re-import all webform configuration into your site.
drush features-import -y webform
drush features-import -y webform_demo_application_evaluation
drush features-import -y webform_demo_event_registration
drush features-import -y webform_demo_region_contact
drush features-import -y webform_examples
drush features-import -y webform_examples_accessibility
drush features-import -y webform_example_element
drush features-import -y webform_example_composite
drush features-import -y webform_example_handler
drush features-import -y webform_example_remote_post
drush features-import -y webform_node
drush features-import -y webform_image_select
drush features-import -y webform_templates
drush features-import -y webform_test
drush features-import -y webform_test_element
drush features-import -y webform_test_block_submission_limit
drush features-import -y webform_test_handler
drush features-import -y webform_test_handler_remote_post
drush features-import -y webform_test_options
drush features-import -y webform_test_views
drush features-import -y webform_test_paragraphs
drush features-import -y webform_test_rest
drush features-import -y webform_test_submissions
drush features-import -y webform_test_translation
drush features-import -y webform_node
drush features-import -y webform_test_views
drush features-import -y webform_image_select_test
drush features-import -y webform_node_test_multiple
drush features-import -y webform_node_test_translation
drush features-import -y webform_scheduled_email_test
```

View file

@ -63,6 +63,22 @@ git push
git archive --format zip --output webform-[issue-number]-[issue-description].zip [issue-number]-[issue-description]
```
**Reverting a branch**
```bash
# Remove anything staged but not committed:
git reset --hard
# Adding changes to the last commit
git commit --amendd ../
# Unstage a file about to be committed
git reset HEAD <file>
# Revert (in SVN terms) an uncommitted file to the copy in your latest commit
git checkout -- filename
```
**Delete issue branch**
```bash
@ -84,6 +100,12 @@ interdiff \
### Drush
**Execute Webform update hook **
```bash
drush php-eval 'module_load_include('install', 'webform'); webform_update_N();';
```
**Reinstall Webform module.**
```bash
@ -114,39 +136,70 @@ drush en -y webform captcha image_captcha honeypot validators;
**Create test roles and users.**
```bash
# developer
drush role-create developer
drush role-add-perm developer 'view the administration theme,access toolbar,access administration pages,access content overview,access webform overview,administer webform,edit webform assets,administer blocks,administer nodes'
drush role-add-perm developer '
view the administration theme,access toolbar,access administration pages,access content overview,administer blocks,administer nodes,
access webform overview,administer webform,edit webform assets'
drush user-create developer --password="developer"
drush user-add-role developer developer
# admin
drush role-create admin
drush role-add-perm admin 'view the administration theme,access toolbar,access administration pages,access content overview,access webform overview,administer webform submission'
drush role-add-perm admin '
view the administration theme,access toolbar,access administration pages,access content overview,
access webform overview,
administer webform submission'
drush user-create admin --password="admin"
drush user-add-role admin admin
# manager
drush role-create manager
drush role-add-perm manager 'view the administration theme,access toolbar,access administration pages,access content overview,access webform overview'
drush role-add-perm manager '
view the administration theme,access toolbar,access administration pages,access content overview,
access webform overview'
drush user-create manager --password="manager"
drush user-add-role manager manager
# viewer
drush role-create viewer
drush role-add-perm viewer 'view the administration theme,access toolbar,access administration pages,access content overview,access webform overview,view any webform submission'
drush role-add-perm viewer '
view the administration theme,access toolbar,access administration pages,access content overview,
access webform overview,
view any webform submission'
drush user-create viewer --password="viewer"
drush user-add-role viewer viewer
# user
drush role-create user
drush user-create user --password="user"
drush user-add-role user user
# any
drush role-create any
drush user-create any --password="any"
drush role-add-perm any 'view the administration theme,access administration pages,access toolbar,access webform overview,edit webform assets,create webform,edit any webform,delete any webform,view webform submissions any node,edit webform submissions any node,delete webform submissions any node'
drush role-add-perm any '
view the administration theme,access toolbar,access administration pages,
access webform overview,edit webform assets,
create webform,edit any webform,delete any webform,
view any webform submission, edit any webform submission, delete any webform submission,
view webform submissions any node,edit webform submissions any node,delete webform submissions any node'
drush user-add-role any any
# own
drush role-create own
drush user-create own --password="own"
drush role-add-perm own 'view the administration theme,access administration pages,access toolbar,access webform overview,edit webform assets,create webform,edit own webform,delete own webform,view webform submissions own node,edit webform submissions own node,delete webform submissions own node'
drush role-add-perm own '
view the administration theme,,access toolbaraccess administration pages,
access webform overview,edit webform assets,
create webform,edit own webform,delete own webform,
view own webform submission, edit own webform submission, delete own webform submission,
view webform submissions own node,edit webform submissions own node,delete webform submissions own node'
drush user-add-role own own
# anonymous
drush role-add-perm anonymous '
view own webform submission, edit own webform submission, delete own webform submission'
```
**Create test submissions for 'Contact' and 'Example: Elements' webform.**

View file

@ -0,0 +1,86 @@
Steps for testing Drush 8.x and 9.x commands
--------------------------------------------
# Drush 8.x and below
```bash
# Version.
drush --version
# Help.
drush help --filter=webform
# Submissions.
drush webform-generate contact
drush webform-export contact
drush webform-purge -y contact
# Option.
drush webform-generate --entity-type=node --entity-id={ENTER_NID} contact
drush webform-export --delimiter="\t" --header-format="key" contact
# Libraries.
drush webform-libraries-status
drush webform-libraries-remove
drush webform-libraries-download
drush webform-libraries-make
drush webform-libraries-composer
# Tidy.
drush webform-tidy
# Repair.
drush webform-repair -y
# Docs.
drush en -y readme
drush webform-docs
# Composer.
drush webform-composer-update
# Commands.
drush webform-generate-commands
```
# Drush 9.x and above
```bash
# Version.
drush --version
# Help.
drush list --filter=webform
# Submissions.
drush webform:generate contact
drush webform:export contact
drush webform:purge -y contact
# Options.
drush webform:generate --entity-type=node --entity-id={ENTER_NID} contact
drush webform:export --delimiter="\t" --header-format=key contact
# Libraries.
drush webform:libraries:status
drush webform:libraries:remove
drush webform:libraries:download
drush webform:libraries:make
drush webform:libraries:composer
# Tidy.
drush webform:tidy
# Repair.
drush webform:repair -y
# Docs.
drush en -y readme
drush webform:docs
# Composer.
drush webform:composer:update
# Commands.
drush webform:generate:commands
```

View file

@ -62,16 +62,16 @@ available in Drupal 8 is supported by the Webform module.
Form elements include:
- **HTML:** Textfield, Textareas, Checkboxes, Radios, Select menu,
Password, and more...
Password, and more
- **HTML5:** Email, Url, Number, Telephone, Date, Number, Range,
and more...
and more
- **Drupal specific** File uploads, Entity References, Table select, Date list,
and more...
and more
- **Custom:** [Likert scale](https://en.wikipedia.org/wiki/Likert_scale),
Star rating, Toggle, Buttons, Credit card number, Geolocation,
Select/Checkboxes/Radios with other, and more...
Star rating, Toggle, Buttons, Geolocation,
Select/Checkboxes/Radios with other, and more
- **Markups** Inline dismissable messages, HTML Markup, Details, and Fieldsets.
- **Composite elements:** Name, Address, Contact, and Credit Card
- **Composite elements:** Name, Address, and Contact
## Element Settings
@ -278,7 +278,6 @@ and more.
Reusable options include:
- Country codes & names
- Credit card codes
- Days, Months, Time zones
- Education, Employment status, Ethnicity, Industry, Languages, Marital status, Relationship, Size, and Titles
- Likert agreement, comparison, importance, quality, satisfaction, ten scale, and
@ -386,7 +385,3 @@ Drush commands are provided to:
- Purge webform submissions
- Download and manage third party libraries
- Tidy YAML configuration files
--------------------------------------------------------------------------------
_This file was generated from [FEATURES.md](http://cgit.drupalcode.org/webform/tree/FEATURES.md?h=8.x-5.x)._

View file

@ -1,125 +0,0 @@
Known Issues
------------
Below are known Drupal 8 core issues that are affecting the Webform module.
### Configuration Management
**[Issue #2808287: Importing Webform config file via the UI is throwing serialization error](https://www.drupal.org/node/2808287)**
> Importing configuration files using Drush is working fine.
**[Issue #1920902: Unable to tidy the bulk export of Webform and WebformOptions config files
because Drupal's YAML utility is not a service.](https://www.drupal.org/node/1920902)**
> The Webform module provides drush commands to 'tidy' exported YAML and
> configuration files that so they are easier to read and edit.
### Form Elements
**[Drupal core webforms system issues](https://www.drupal.org/project/issues/drupal?status=Open&version=8.x&component=forms+system)**
> Any changes, improvements, and bug fixes for Drupal's Form API may directly
> impact the Webform module.
- [Issue #1593964: Allow FAPI usage of the datalist element](https://www.drupal.org/node/1593964)
**[Issue #2502195: Regression: Webform throws LogicException when trying to render a webform with object as an element's default value.](https://www.drupal.org/node/2502195)**
> Impacts previewing entity autocomplete elements.
**[Issue #2207383: Create a tooltip component](https://www.drupal.org/node/2207383)**
> Impacts displaying element description in a tooltip. jQuery UI's tooltip's UX
> is not great.
**[Issue #2741877: Nested modals don't work: when using CKEditor in a modal, then clicking the image button opens another modal, which closes the original modal](https://www.drupal.org/node/2741877)**
> Makes it impossible to display the CKEditor in a dialog.
> Workaround: Use custom download of CKEditor which include a CKEditor specific
> link dialog.
### \#states API (Conditionals)
#### Button (button & submit)
**[Issue #1671190 by Lucasljj, idebr, Cameron Tod: Use <button /> webform element type instead of <input type="submit" />](https://www.drupal.org/node/1671190)**
#### Date/time (datetime)
**[Issue #2419131: #states attribute does not work on #type datetime](https://www.drupal.org/node/2419131)**
#### Details (details)
**[Issue #2348851: Regression: Allow HTML tags inside detail summary](https://www.drupal.org/node/2348851)**
#### Item (item)
**[Issue #783438: #states doesn't work for #type item](https://www.drupal.org/node/783438)**
#### HTML markup (markup)
**[Issue #2700667: Notice: Undefined index: #type in drupal_process_states()](https://www.drupal.org/node/2700667)**
#### Managed file (managed_file)
**[Issue #2705471: Webform states managed file fields](https://www.drupal.org/node/2705471)**
#### Password confirm (password_confirm)
**[Issue #1427838: password and password_confirm children do not pick up #states or #attributes](https://www.drupal.org/node/1427838)**
#### Select (select)
**[Issue #1426646: "-Select-" option is lost when webform elements uses '#states'](https://www.drupal.org/node/1426646)**
**[Issue #1149078: States API doesn't work with multiple select fields](https://www.drupal.org/node/1149078)**
**[Issue #2791741: FAPI states: fields aren't hidden initially when depending on multi-value selection](https://www.drupal.org/node/2791741)**
#### Radios (radios)
**[Issue #2731991: Setting required on radios marks all options required](https://www.drupal.org/node/2731991)**
**[Issue #994360: #states cannot disable/enable radios and checkboxes](https://www.drupal.org/node/994360)**
#### Text format (text_format)
**[Issue #997826: #states doesn't work correctly with type text_format](https://www.drupal.org/node/997826)**
**[Issue #2625128: Text format selection stays visible when using editor and a hidden webform state](https://www.drupal.org/node/2625128)**
### Submission Display
**[Issue #2484693: Telephone Link field formatter breaks Drupal with 5 digits or less in the number](https://www.drupal.org/node/2720923)**
> Workaround is to manually build a static HTML link.
> See: \Drupal\webform\Plugin\WebformElement\Telephone::formatHtml
### Access Control
**[Issue #2636066: Access control is not applied to config entity queries](https://www.drupal.org/node/2636066)**
> Workaround: Manually check webform access.
> See: Drupal\webform\WebformEntityListBuilder
### User Interface
**[Issue #2235581: Make Token Dialog support inserting in WYSIWYGs (TinyMCE, CKEditor, etc.)](https://www.drupal.org/node/2235581)**
> This blocks tokens from being inserted easily into the CodeMirror widget.
> Workaround: Disable '\#click_insert' functionality from the token dialog.
**Config entity does NOT support [Entity Validation API](https://www.drupal.org/node/2015613)**
> Validation constraints are only applicable to content entities and fields.
>
> In D8 all config entity validation is handled via
\Drupal\Core\Form\FormInterface::validateForm
>
> Workaround: Created the WebformEntityElementsValidator service.
**[Issue #2585169: Unable to alter local actions prior to rendering](https://www.drupal.org/node/2585169)**
> Makes it impossible to open an action in a dialog.
> Workaround: Add local action to a controller's response.

View file

@ -1,47 +1,39 @@
Steps for creating a new release
--------------------------------
1. Cleanup code
2. Export configuration
3. Review code
4. Run tests
5. Generate release notes
6. Tag and create a new release
7. Upload screencast to YouTube
1. Cleanup code
---------------
[Convert to short array syntax](https://www.drupal.org/project/short_array_syntax)
drush short-array-syntax webform
Tidy YAML files
@see DEVELOPMENT-CHEATSHEET.md
1. Review code
2. Review accessibility
3. Run tests
4. Generate release notes
5. Tag and create a new release
2. Export configuration
-----------------------
@see DEVELOPMENT-CHEATSHEET.md
3. Review code
1. Review code
--------------
[Online](http://pareview.sh)
[PHP](https://www.drupal.org/node/1587138)
http://git.drupal.org/project/webform.git 8.x-5.x
# Check Drupal PHP coding standards
cd /var/www/sites/d8_webform/web
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info modules/sandbox/webform > ~/webform-php-coding-standards.txt
cat ~/webform-php-coding-standards.txt
[Commandline](https://www.drupal.org/node/1587138)
# Check Drupal PHP best practices
cd /var/www/sites/d8_webform/web
phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,js,css,info modules/sandbox/webform > ~/webform-php-best-practice.txt
cat ~/webform-php-best-practice.txt
# Check Drupal coding standards
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info modules/sandbox/webform
[JavaScript](https://www.drupal.org/node/2873849)
# Install Eslint. (One-time)
cd /var/www/sites/d8_webform/web/core
yarn install
# Check Drupal best practices
phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,js,css,info modules/sandbox/webform
# Check Drupal JavaScript (ES5) legacy coding standards.
cd /var/www/sites/d8_webform/web
core/node_modules/.bin/eslint --no-eslintrc -c=core/.eslintrc.legacy.json --ext=.js modules/sandbox/webform > ~/webform-javascript-coding-standards.txt
cat ~/webform-javascript-coding-standards.txt
[File Permissions](https://www.drupal.org/comment/reply/2690335#comment-form)
@ -51,37 +43,71 @@ Tidy YAML files
# Directories should be 755 or drwxr-xr-x
find . -type f -print0 | xargs -0 chmod 0644
2. Review accessibility
-----------------------
4. Run tests
[Pa11y](http://pa11y.org/)
Pa11y is your automated accessibility testing pal.
Notes
- Requires node 8.x+
drush en -y webform_example_accessibility
pa11y http://localhost/wf/webform/example_accessibility_basic
pa11y http://localhost/wf/webform/example_accessibility_advanced
pa11y http://localhost/wf/webform/example_accessibility_containers
pa11y http://localhost/wf/webform/example_accessibility_wizard
3. Run tests
------------
[SimpleTest](https://www.drupal.org/node/645286)
# Run all tests
php core/scripts/run-tests.sh --url http://localhost/d8_dev --module webform
cd /var/www/sites/d8_webform
php core/scripts/run-tests.sh --suppress-deprecations --url http://localhost/wf --module webform --dburl mysql://drupal_d8_webform:drupal.@dm1n@localhost/drupal_d8_webform
# Run single tests
cd /var/www/sites/d8_webform
php core/scripts/run-tests.sh --suppress-deprecations --url http://localhost/wf --verbose --class "Drupal\Tests\webform\Functional\WebformListBuilderTest"
[PHPUnit](https://www.drupal.org/node/2116263)
# Execute all Webform PHPUnit tests.
cd core
php ../vendor/phpunit/phpunit/phpunit --group webform
Notes
- Links to PHP Unit HTML responses are not being printed by PHPStorm
cd core
References
- [Issue #2870145: Set printerClass in phpunit.xml.dist](https://www.drupal.org/node/2870145)
- [Lesson 10.2 - Unit testing](https://docs.acquia.com/article/lesson-102-unit-testing)
# Export database and base URL.
export SIMPLETEST_DB=mysql://drupal_d8_webform:drupal.@dm1n@localhost/drupal_d8_webform;
export SIMPLETEST_BASE_URL='http://localhost/wf';
# Execute all Webform PHPUnit tests.
cd /var/www/sites/d8_webform/web/core
php ../../vendor/phpunit/phpunit/phpunit --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" --group webform
# Execute individual PHPUnit tests.
export SIMPLETEST_DB=mysql://drupal_d8_dev:drupal.@dm1n@localhost/drupal_d8_dev;
cd /var/www/sites/d8_webform/web/core
# Functional test.
php ../vendor/phpunit/phpunit/phpunit ../modules/sandbox/webform/tests/src/Functional/WebformExampleFunctionalTest.php
# Functional test.
php ../../vendor/phpunit/phpunit/phpunit --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" ../modules/sandbox/webform/tests/src/Functional/WebformExampleFunctionalTest.php
# Kernal test.
php ../vendor/phpunit/phpunit/phpunit ../modules/sandbox/webform/tests/src/Kernal/Utility/WebformDialogHelperTest.php
# Kernal test.
php ../../vendor/phpunit/phpunit/phpunit --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" ../modules/sandbox/webform/tests/src/Kernal/Utility/WebformDialogHelperTest.php
# Unit test.
php ../vendor/phpunit/phpunit/phpunit ../modules/sandbox/webform/tests/src/Unit/Utility/WebformYamlTest.php
php ../../vendor/phpunit/phpunit/phpunit --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" ../modules/sandbox/webform/tests/src/Unit/Utility/WebformYamlTest.php
php ../../vendor/phpunit/phpunit/phpunit --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" ../modules/sandbox/webform/tests/src/Unit/Access/WebformAccessCheckTest
5. Generate release notes
4. Generate release notes
-------------------------
[Git Release Notes for Drush](https://www.drupal.org/project/grn)
@ -89,7 +115,7 @@ Tidy YAML files
drush release-notes --nouser 8.x-5.0-VERSION 8.x-5.x
6. Tag and create a new release
5. Tag and create a new release
-------------------------------
[Tag a release](https://www.drupal.org/node/1066342)
@ -99,11 +125,3 @@ Tidy YAML files
git push origin tag 8.x-5.0-VERSION
[Create new release](https://www.drupal.org/node/add/project-release/2640714)
7. Upload screencast to YouTube
-------------------------------
- Title : Webform 8.x-5.x-betaXX
- Tags: Drupal 8,Webform,Form Builder
- Privacy: listed

View file

@ -0,0 +1,85 @@
Steps for updating libraries
----------------------------
1. Create a ticket in the Webform issue queue
2. Create a list of all recent releases
3. Update WebformLibrariesManager
4. Update webform.libraries.yml
5. Test changes
6. Update webform_libraries.module
7. Update composer.libraries.json
1. Create a ticket in the Webform issue queue
----------------------------------------------
- https://www.drupal.org/node/add/project-issue/webform
2. Create a list of all recent releases
---------------------------------------
- Enable all external libraries (admin/structure/webform/config/libraries)
- Manually check for new releases. Only update to stable releases.
- Add list of updated external libraries to issue on Drupal.org
3. Update WebformLibrariesManager
---------------------------------
- \Drupal\webform\WebformLibrariesManager::initLibraries
4. Update webform.libraries.yml
---------------------------------
- webform.libraries.yml
5. Test changes
---------------
Check external libraries are loaded from CDN.
drush webform:libraries:remove
Check external libraries are download.
drush webform:libraries:download
6. Update webform_libraries.module
----------------------------------
Enable and download all libraries
cd /var/www/sites/d8_webform
drush php-eval "\Drupal::configFactory()->getEditable('webform.settings')->set('libraries.excluded_libraries', [])->save();"
drush en -y webform_image_select
drush webform:libraries:download
Update libraries.zip
# Remove libraries.zip.
rm -Rf /var/www/sites/d8_webform/web/modules/sandbox/webform_libraries/libraries.zip
# Create libraries.zip
cd /var/www/sites/d8_webform/web/
zip -r libraries.zip libraries
mv libraries.zip /private/var/www/sites/d8_webform/web/modules/sandbox/webform_libraries/libraries.zip
Commit changes
# Commit changes.
cd /private/var/www/sites/d8_webform/web/modules/sandbox/webform_libraries/
git commit -am"Update webform_libraries"
git push
7. Update composer.libraries.json
----------------------------------
cd /private/var/www/sites/d8_webform/web/modules/sandbox/webform
drush webform:libraries:composer > composer.libraries.json