Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt
shows the following errors/warnings which should be fixed.
FILE: ./bamboo_twig_config/src/TwigExtension/Config.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\bamboo_twig\TwigExtension\TwigExtensionBase. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./bamboo_twig_extensions/src/TwigExtension/TwigArray.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is Twig\Extension\AbstractExtension. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./bamboo_twig_extensions/src/TwigExtension/TwigDate.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\Core\Template\TwigEnvironment. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./bamboo_twig_extensions/src/TwigExtension/TwigText.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\Core\Template\TwigEnvironment. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./bamboo_twig_file/src/TwigExtension/File.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is Twig\TwigFilter. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./bamboo_twig_i18n/src/TwigExtension/I18n.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\bamboo_twig\TwigExtension\TwigExtensionBase. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./bamboo_twig_loader/src/TwigExtension/Loader.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\bamboo_twig\TwigExtension\TwigExtensionBase. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./bamboo_twig_loader/src/TwigExtension/Render.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\bamboo_twig\TwigExtension\TwigExtensionBase. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./bamboo_twig_security/src/TwigExtension/Security.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\bamboo_twig\TwigExtension\TwigExtensionBase. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./bamboo_twig_token/src/TwigExtension/Token.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\bamboo_twig\TwigExtension\TwigExtensionBase. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./drupalci.yml ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 21 | ERROR | [x] Expected 1 newline at end of file; 2 found ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./tests/modules/bamboo_twig_test/src/Controller/TestsController.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\Component\Datetime\DateTimePlus. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./tests/src/Functional/BambooTwigExtensionsI18nTest.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is Drupal\Component\Gettext\PoItem. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./tests/src/Functional/BambooTwigLoaderTest.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\Core\StreamWrapper\PublicStream. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./tests/src/Functional/BambooTwigRenderTest.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\Core\StreamWrapper\PublicStream. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./tests/src/Functional/BambooTwigTestBase.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\language\Entity\ConfigurableLanguage. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./tests/src/Kernel/Loader/EntityBlockTest.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 9 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\Tests\bamboo_twig\Traits\BlockCreationTrait. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./tests/src/Kernel/Render/ContentBlockTest.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\Tests\bamboo_twig\Traits\BlockCreationTrait. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: ./tests/src/Kernel/Render/ImageTest.php ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is | | Drupal\Core\StreamWrapper\PublicStream. ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- Time: 484ms; Memory: 10MB
Comment | File | Size | Author |
---|---|---|---|
#17 | 3350583-17.patch | 66.39 KB | mahtab_alam |
Issue fork bamboo_twig-3350583
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 6.0.x compare
- 3350583-fix-the-issues changes, plain diff MR !4
- apaderno-6.0.x-patch-9d88 changes, plain diff MR !5
Comments
Comment #3
urvashi_vora CreditAttribution: urvashi_vora at Valuebound for Valuebound commentedComment #4
apadernoComment #5
wengerkThanks for your contrib
1. on README.md and CONTRIBUTING.md, when breaking command line please add
\
to keep it usableExemple:
Comment #7
mukesh88 CreditAttribution: mukesh88 at Srijan | A Material+ Company for Drupal India Association commentedComment #8
apadernoThe suggestion given in comment #5 has not been followed.
Comment #9
mukesh88 CreditAttribution: mukesh88 at Srijan | A Material+ Company for Drupal India Association commented@apaderno comment #8 code in hooks in post-commit file which it's not showing in phpcs report and comment #5 has suggested on README.md and CONTRIBUTING.md file which have fixed in merge request.
Comment #10
wengerkWe should look at what Devel did with a phpcsxml dist file and ignore the 80 limit chars for markdown files
https://www.drupal.org/project/devel/issues/3133703
Comment #11
apadernoYes, and use that for any coding standards issue. When users report coding standards, they should be said to use the phpcs.xml.dist file that comes with the module. If they show the output of
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig
, they should be said those reports will not be used.As a side note, even Drupal core uses a phpcs.xml.dist or phpcs.xml file containing their own rules.
Comment #13
pray_12 CreditAttribution: pray_12 commentedFixed the issues reported by phpcs
Comment #15
pray_12 CreditAttribution: pray_12 commentedComment #16
zkhan.aamir CreditAttribution: zkhan.aamir at Specbee for Drupal India Association commentedHi
Patch #13 is empty
Comment #17
mahtab_alam CreditAttribution: mahtab_alam at QED42 commentedComment #18
pray_12 CreditAttribution: pray_12 commentedHi,
Applied the patch #17. This patch is throwing the error.
git apply -v 3350583-17.patch
3350583-17.patch:22: trailing whitespace.
- rework tests by using a custom theme "bamboo_twig" in order of overriding
3350583-17.patch:30: trailing whitespace.
- allow Render form mixed parameter types - Issue #3273960 by darrenwh,
3350583-17.patch:32: trailing whitespace.
- add `bamboo_render_entity_revision` rendering of entity revision -
3350583-17.patch:34: trailing whitespace.
- add `bamboo_load_entity_revision` loading of entity revision -
3350583-17.patch:44: trailing whitespace.
- fix deprecation
Checking patch CHANGELOG.md...
error: while searching for:
### Changed
- re-enable PHPUnit Symfony Deprecation notice
- update codebase to be compliant PHP8.2
- rework tests by using a custom theme "bamboo_twig" in order of overriding *.html.twig template for tests purpose
### Added
- add coverage of Drupal 10.1.x
- allow Render form mixed parameter types - Issue #3273960 by darrenwh, wengerk
- add `bamboo_render_entity_revision` rendering of entity revision - Issue #3254160 by dibix, wengerk
- add `bamboo_load_entity_revision` loading of entity revision - Issue #3254160 by dibix, wengerk
## [6.0.0] - 2022-11-18
### Added
error: patch failed: CHANGELOG.md:8
error: CHANGELOG.md: patch does not apply
Checking patch CONTRIBUTING.md...
Checking patch README.md...
Hunk #15 succeeded at 394 (offset 1 line).
Hunk #16 succeeded at 414 (offset 1 line).
Hunk #17 succeeded at 431 (offset 1 line).
Hunk #18 succeeded at 443 (offset 1 line).
Hunk #19 succeeded at 455 (offset 1 line).
Hunk #20 succeeded at 483 (offset 1 line).
error: while searching for:
{{ bamboo_render_image(1, 'thumbnail') }}
```
`bamboo_render_image_style(path, style, preprocess)` returns the URL string of the
specified image path or URI.
- `path` string
- `style` string
error: patch failed: README.md:437
error: README.md: patch does not apply
Checking patch drupalci.yml...
Checking patch CONTRIBUTING.md...
Checking patch README.md...
error: while searching for:
The Bamboo Twig module provides some Twig extensions with some useful functions
and filters aimed to improve the development experience.
Bamboo Twig has a lot of advantages and brings a lot of new features
to the Twig landscape of Drupal 8.
It boosts performance by using lazy loading, improves the code quality
with automated workflow. It also includes automated unit and kernel tests
error: patch failed: README.md:11
error: README.md: patch does not apply
Checking patch bamboo_twig_config/src/TwigExtension/Config.php...
Checking patch bamboo_twig_extensions/src/TwigExtension/TwigArray.php...
Checking patch bamboo_twig_extensions/src/TwigExtension/TwigDate.php...
Checking patch bamboo_twig_extensions/src/TwigExtension/TwigText.php...
Checking patch bamboo_twig_file/src/TwigExtension/File.php...
Checking patch bamboo_twig_i18n/src/TwigExtension/I18n.php...
Checking patch bamboo_twig_loader/src/TwigExtension/Loader.php...
Checking patch bamboo_twig_loader/src/TwigExtension/Render.php...
Checking patch bamboo_twig_security/src/TwigExtension/Security.php...
Checking patch bamboo_twig_token/src/TwigExtension/Token.php...
Checking patch tests/modules/bamboo_twig_test/src/Controller/TestsController.php...
Checking patch tests/src/Functional/BambooTwigExtensionsI18nTest.php...
Checking patch tests/src/Functional/BambooTwigLoaderTest.php...
Checking patch tests/src/Functional/BambooTwigRenderTest.php...
Checking patch tests/src/Functional/BambooTwigTestBase.php...
Comment #19
nisha_j CreditAttribution: nisha_j commentedHi, the patch #17 is throwing as mentioned above so changing the status to Needs work.
Thankyou.
Comment #20
apadernoComment #21
apadernoComment #23
apadernoI fixed all the warnings/errors for the files the phpcs.xml.dist file committed in the project repository would check.
Comment #24
wengerkThx Apaderno ! I will take a look a it asap.
I'm concerned by the failing tests and open another issue to fix it, it's easy to fix but I currently don't have much time for open source
If you wanna help, you're welcome :)
https://www.drupal.org/project/bamboo_twig/issues/3417699
Comment #25
wengerkMany Many thanks to all of you ! Has been merged on 6.0.x