pfrenssen
Repos
141
Followers
59
Following
3

The Joinup project moved to https://git.fpfis.eu/ec-europa/digit-joinup-reference

42
20

An integration layer between Behat, Mink Extension, and Drupal.

205
174

Library for accessing the Matomo Reporting API in PHP

9
7

Bash script to convert video files into Google Chromecast supported format.

163
32

Web app for budget tracking, written as an exercise to learn Rust and the actix-web framework. WIP

1
1

https://www.drupal.org/project/og

88
103

Events

Update Drupal to 9.4.7.

Created at 1 day ago
issue comment
Fix execution of deploy hooks inside a module with _deploy in the name.

Interesting that this is working on Appveyor. On linux the test fails correctly:

$ composer functional -- --filter testDeployHooksInModuleWithDeployInName
[...]
1) Unish\DeployHookTest::testDeployHooksInModuleWithDeployInName
Exception: Unexpected exit code 1 (expected 0) for command:
/home/pieter/drush/vendor/drush/drush/drush --uri=dev --no-interaction deploy:hook --yes/home/pieter/drush/vendor/drush/drush/drush --uri=dev --no-interaction deploy:hook --yes

Exit Code: 1(General error)

Working directory: /home/pieter/drush/vendor/drush/drush

Output:
================
 -------- ----------------- -------------------------------------------
  Module   Hook              Description
 -------- ----------------- -------------------------------------------
  woot     deploy_function   Deploy hook in module containing _deploy.
 -------- ----------------- -------------------------------------------


 // Do you wish to run the specified pending deploy hooks?: yes.



Error Output:
================
>  [warning] Deploy hook function woot_deploy_deploy_function not found in file woot.deploy.php
>  [error]  Deploy hook failed: woot_deploy_deploy_function
 [error]  Update aborted by: woot_deploy_deploy_function
 [error]  Finished performing deploy hooks.


/home/pieter/drush/vendor/drush/drush/src/TestTraits/CliTestTrait.php:158
/home/pieter/drush/vendor/drush/drush/tests/unish/CommandUnishTestCase.php:102
/home/pieter/drush/vendor/drush/drush/tests/functional/DeployHookTest.php:108
phpvfscomposer:///home/pieter/drush/vendor/drush/drush/vendor/phpunit/phpunit/phpunit:97
Created at 4 weeks ago

Support deploy hooks in modules with _deploy in the name.

Created at 1 month ago

Test execution of deploy hooks inside a module with _deploy in the name.

Test for #5216

Created at 1 month ago
pull request closed
Module name error on deploy:hook when module name contains _deploy

Hello;

I noticed a rather specific error when the module's name contains the substring _deploy on its name.

Take mymodule_deploy as an example, with a mymodule_deploy_deploy_myfunction deploy hook and a mymodule_deploy.deploy.php file.

Running drush deploy:hook will fail with the following error:

[warning] Deploy hook function mymodule_deploy_deploy_myfunction not found in file mymodule.deploy.php

This is because list($module, $name) = explode('_deploy_', $function, 2); will set $module to just mymodule and not mymodule_deploy and, thus, the $filename will be wrong.

This is an uncommon but not rare scenario. In fact, it happened to me because I had a separate custom module dedicated to deploy hooks that had the deploy substring on the name.

The attached patch tries to solve this by first locating the deploy name and then substracting it from the function name in order to get the real module name.

Created at 1 month ago
issue comment
Module name error on deploy:hook when module name contains _deploy

Thanks for the report!

Sorry this was not responded to earlier, but possibly since there was no corresponding issue and the test was failing this fell through the cracks.

In the meantime this has gone stale and doesn't apply to 11.x.

Created issue: #5216 and a new PR at #5217.

Closing this since it is superseded by #5217.

Created at 1 month ago
pull request opened
Test execution of deploy hooks inside a module with _deploy in the name.

Fixes #5216

Created at 1 month ago
create branch
pfrenssen create branch deploy-deploy
Created at 1 month ago
opened issue
Deploy hook not found when module name contains _deploy

Describe the bug This was originally reported in #5112 by @idiazroncero.

I noticed a rather specific error when the module's name contains the substring _deploy on its name.

Take mymodule_deploy as an example, with a mymodule_deploy_deploy_myfunction deploy hook and a mymodule_deploy.deploy.php file.

Running drush deploy:hook will fail with the following error:

[warning] Deploy hook function mymodule_deploy_deploy_myfunction not found in file mymodule.deploy.php

This is because list($module, $name) = explode('_deploy_', $function, 2); will set $module to just mymodule and not mymodule_deploy and, thus, the $filename will be wrong.

This is an uncommon but not rare scenario. In fact, it happened to me because I had a separate custom module dedicated to deploy hooks that had the deploy substring on the name.

To Reproduce

  • Create a module named myproject_deploy.
  • Create a myproject_deploy.deploy.php file which has a deploy function named myproject_deploy_deploy_my_update().
  • Run drush deploy

Expected behavior Deploy hook is executed normally.

Actual behavior

 [warning] Deploy hook function myproject_deploy_deploy_my_update not found in file myproject.deploy.php
 [error]  Deploy hook failed: myproject_deploy_deploy_my_update
 [error]  Update aborted by: myproject_deploy_deploy_my_update
Created at 1 month ago
pull request opened
Only the first method parameter is checked

When checking whether method parameters are camelcased, the CamelCaseMethodParameterSniff currently will stop processing as soon as it finds a valid parameter. It should check the remaining parameters as well.

Created at 1 month ago

Make sure to check all method parameters

When checking whether method parameters are camelcased, the CamelCaseMethodParameterSniff currently will stop processing as soon as it finds a valid parameter. It should check the remaining parameters as well.

Created at 1 month ago
issue comment
DX-5153: Add support for custom Twig tests in the Twig validator.

Thanks for the quick review and suggestions! I made the requested changes.

Created at 1 month ago

DX-5153: Add support for custom Twig tests in the Twig validator.

Fixes #4579

Created at 1 month ago

Update src/Robo/Commands/Validate/TwigCommand.php

Co-authored-by: Dane Powell dane@danepowell.com

Created at 1 month ago

Update drush executor uri check (#4562)

  • refactors drush executor alias check, inspector no longer needs uri added

  • adds debug logger for message received from status check

Bump drupal/core from 9.4.2 to 9.4.3 (#4565)

Bumps drupal/core from 9.4.2 to 9.4.3.


updated-dependencies:

  • dependency-name: drupal/core dependency-type: direct:production update-type: version-update:semver-patch ...

Signed-off-by: dependabot[bot] support@github.com

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

fix automerge

Bump symfony/console from 4.4.43 to 4.4.44 (#4573)

Bumps symfony/console from 4.4.43 to 4.4.44.


updated-dependencies:

  • dependency-name: symfony/console dependency-type: direct:production update-type: version-update:semver-patch ...

Signed-off-by: dependabot[bot] support@github.com

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dane Powell git@danepowell.com

Bump symfony/twig-bridge from 4.4.42 to 4.4.44 (#4572)

Bumps symfony/twig-bridge from 4.4.42 to 4.4.44.


updated-dependencies:

  • dependency-name: symfony/twig-bridge dependency-type: direct:production update-type: version-update:semver-patch ...

Signed-off-by: dependabot[bot] support@github.com

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump symfony/config from 4.4.42 to 4.4.44 (#4570)

Bumps symfony/config from 4.4.42 to 4.4.44.


updated-dependencies:

  • dependency-name: symfony/config dependency-type: direct:production update-type: version-update:semver-patch ...

Signed-off-by: dependabot[bot] support@github.com

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump drupal/core from 9.4.3 to 9.4.4 (#4569)

Bumps drupal/core from 9.4.3 to 9.4.4.


updated-dependencies:

  • dependency-name: drupal/core dependency-type: direct:production update-type: version-update:semver-patch ...

Signed-off-by: dependabot[bot] support@github.com

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

fix label check

DX-5142: Fix #4568: Use stable grasmash/yaml-expander (#4575)

Bump drupal/core from 9.4.4 to 9.4.5 (#4576)

Bumps drupal/core from 9.4.4 to 9.4.5.


updated-dependencies:

  • dependency-name: drupal/core dependency-type: direct:production update-type: version-update:semver-patch ...

Signed-off-by: dependabot[bot] support@github.com

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Fixes #4577: refactoring global access for argv. (#4578)

Merge remote-tracking branch 'origin/main' into DX-5153

Created at 1 month ago
pull request opened
DX-5153: Add support for custom Twig tests in the Twig validator.

Fixes #4579

Testing steps

  1. Add the following code to an existing Twig template:
    <div>{{ myvar is instanceof('\\MyInterface') ? 'yes' : 'no' }}</div>
    
  2. Run the Twig validation. This is expected to throw an error because the instanceof test is not part of core Twig:
    $ blt validate:twig
    ERROR  in /app/docroot/themes/custom/mytheme/templates/mytemplate.html.twig
    >> Unknown "instanceof" test.
    
  3. Now edit blt.yml and add instanceof to the whitelisted Twig tests by adding the following section:
    validate:
      twig:
        tests:
          - instanceof
    
  4. Run the validation again. Now there should not be any errors.
    $ blt validate:twig
    [OK] All 235 Twig files contain valid syntax.
    
Created at 1 month ago
create branch
pfrenssen create branch DX-5153
Created at 1 month ago
Created at 1 month ago
opened issue
Support custom Twig tests in `validate:twig`

Is your feature request related to a problem? Please describe. We can currently validate Twig files that contain custom Twig functions and Twig filters, but when we validate templates that use custom Twig tests an error is thrown:

  ERROR  in /app/docroot/themes/custom/mytheme/templates/mytemplate.html.twig (line 1)
  >>  1   <div>{{ content['#entity'] is instanceof('\\Drupal\\commerce_product\\Entity\\ProductInterface') ? content['#entity'].getDefaultVariation() : '' }}"
  >> Unknown "instanceof" test.

Describe the solution you'd like Support custom Twig tests by whitelisting them in blt.yml, similar to how we support custom functions and filters:

validate:
  twig:
    functions:
      - my_custom_twig_function
    filters:
      - my_custom_twig_filter
    tests:
      - my_custom_twig_test
Created at 1 month ago

Only allow Dependabot to update direct dependencies.

Handle core updates manually.

Update Drupal to 9.4.5.

Created at 1 month ago
issue comment
Bump drupal/photoswipe from 3.0.1 to 3.2.0

@dependabot recreate

Created at 1 month ago
issue comment
Bump drupal/photoswipe from 3.0.1 to 3.2.0

@dependabot rebase

Created at 1 month ago

Handle core updates manually.

Created at 1 month ago
issue comment
Bump drupal/photoswipe from 3.0.1 to 3.2.0

@dependabot recreate

Created at 1 month ago