Problem/Motivation

Civictheme is not currently passing shipshape on GovCMS

[FILE] Banned PHP methods and classes
Name
[FILE] Banned PHP methods and classes
Execution time
0.00ms
System output
{"message"=>"file: /builds/xxx/yyy/themes/civictheme/src/CivicthemeColorManager.php:\n        - line 330: Cannot access constant VERSION on Drupal"}

{"message"=>"file: /builds/xxx/yyy/themes/civictheme/src/CivicthemeStylesheetGenerator.php:\n        - line 174: Cannot access constant EXISTS_REPLACE on Drupal\\Core\\File\\FileSystemInterface"}

{"message"=>"file: /builds/xxx/yyy/themes/civictheme/src/Settings/CivicthemeSettingsFormSectionBase.php:\n        - line 146: Cannot access constant EXISTS_REPLACE on Drupal\\Core\\File\\FileSystemInterface"}

{"message"=>"file: /builds/xxx/yyy/themes/civictheme/theme-settings.provision.inc:\n        - line 575: Cannot access constant EXISTS_REPLACE on Drupal\\Core\\File\\FileSystemInterface"}

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

sime created an issue. See original summary.

granticusiv’s picture

I'm not sure if it's of any help, but I did find this regex '#Cannot access constant (\w+)#' in the ignore rules for PHP standards in GovCMS - https://projects.govcms.gov.au/GovCMS/govcms-ci/-/blob/master/config/php...

I was suddenly encountering the same "Cannot access constant ...." error for the bootstrap theme last week, but now I'm not.

granticusiv’s picture

Following up from my own comment above, I was triggering the "Cannot access constant" error when I switched the base theme in my sub-theme's info.yml (in my case, switching from bootstrap to bootstrap_barrio). My workaround was to create a clone of my sub-theme and base it on bootstrap_barrio and leave the origin sub-theme based on boostrap. The pipeline was fixed in the next deployment.

richardgaunt’s picture

Status: Active » Needs review

We have merged a fix for this issue today: https://github.com/civictheme/monorepo-drupal/pull/1314

richardgaunt’s picture

  • 3795ef07 committed on 1.x
    Issue #3475110 by joshua1234511, richardgaunt, sime, granticusiv:...
fionamorrison23’s picture

Issue tags: +civictheme-release-1.9
richardgaunt’s picture

Version: 1.8.1 » 1.x-dev
Status: Needs review » Reviewed & tested by the community
richardgaunt’s picture

Version: 1.x-dev » 1.9.0
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.