Skip to content

Failed to locate civicrm.settings.php - prevents civix from being used as a tool in workflows where there is no CMS/CiviCRM site, this is a major bummer 😢 and limits how this tool can be used #401

@agileware-justin

Description

@agileware-justin

Failed to locate civicrm.settings.php - prevents civix from being used as a tool in workflows where there is no CMS/CiviCRM site, this is a major bummer 😢 and limits how this tool can be used.

For example, a github action which runs to perform a civix upgrade on an extension is non-functional because the workflow aborts as follows.

Incremental upgrades
====================

Current civix format is v23.02.1.

Upgrade v23.02.1 => v24.09.0
----------------------------

Executing upgrade script /home/runner/.composer/vendor/civicrm/civix/upgrades/24.09.0.up.php

 ! [NOTE] This update adds a new helper, E::schema(), which requires the library
 !        civimix-schema@5. To enable support for older versions of CiviCRM     
 !        (<5.73), the update will:                                             
 !                                                                              
 !        1. Create mixin/lib/pathload-0.php                                    
 !        2. Create mixin/lib/civimix-schema@5.80.2.phar                        

Set civix format to 24.09.0 in info.xml
Write info.xml

Upgrade v24.09.0 => v24.09.1
----------------------------

Executing upgrade script /home/runner/.composer/vendor/civicrm/civix/upgrades/24.09.1.up.php

Entity Framework v1 => v2
=========================

 ! [NOTE] This update converts data-storage from Entity Framework v1 (EFv1) to  
 !        Entity Framework v2 (EFv2).                                           
 !                                                                              
 !        EFv2 stores schema as *.php. It has simpler workflows and less        
 !        boilerplate. SQL is generated during installation. (More details:     
 !        https://github.com/totten/civix/wiki/Entity-Templates)                
 !                                                                              
 !        The upgrader will make the following changes:                         
 !                                                                              
 !        1. Update info.xml to use CiviMix\Schema\Outlook365\AutomaticUpgrader 
 !        (which delegates to CRM_Outlook365_Upgrader)                          
 !                                                                              
 !        This should work for many extensions, but it should be tested. You may
 !        encounter issues if any of these scenarios apply:                     
 !                                                                              
 !        1. Your target environment is CiviCRM v5.44 or earlier.               
 !        2. The SQL files include custom/manual statements.                    
 !        3. The class CRM_Outlook365_Upgrader overrides any internal plumbing  
 !        (e.g. setCurrentRevision(), appendTask(), or getRevisions())          
 !                                                                              
 !        You may skip this update. However, going forward, civix will only     
 !        support EFv2. You will be responsible for maintaining any boilerplate 
 !        for EFv1.                                                             

 Should we apply the update? [Yes, update to Entity Framework v2]:
  [y] Yes, update to Entity Framework v2
  [n] No, stay on Entity Framework v1
  [a] Abort
 > 

Review Entity Framework v1
--------------------------

 ! [NOTE] Before converting, please review the existing entity configuration    
 !        files.                                                                
 !                                                                              
 !        Every entity should normally have a pair of files (XML+PHP).          
 !                                                                              
 !        +--------+--------+-----+-----+                                       
 !        | Entity | Folder | XML | PHP |                                       
 !        +--------+--------+-----+-----+                                       
 !                                                                              
 !        The converter will read any XML files and generate new (consolidated) 
 !        PHP files in ./schema.                                                

Write info.xml

In Bootstrap.php line [178]
                                                                               
  Failed to locate civicrm.settings.php. By default, this tool searches the p  
  arent directories for a standard CMS (Drupal, WordPress, etal) and standard  
   civicrm.settings.php. Symlinks and multisite configurations may interfere.  
   To customize, set variable CIVICRM_SETTINGS to point to the preferred civi  
  crm.settings.php.                                                            
                                                                               

upgrade [--start START] [--yes]

Error: Process completed with exit code 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions