Add your comments directly to the page. Include links to any relevant research, data, or feedback.

Summarize this decision in the table below. Type /date to quickly add the due date and @mention the driver, approver, contributors, and informed to keep everyone on the same page.

Status

Impact

Driver

Ruth Cheesley Nick Veenhof (Deactivated) 

Approver

Alan Hartless Mohit Aghera

Contributors

Jan Linhart Mohit Aghera Alan Hartless Florian Wessels

Informed

Ruth Cheesley

Due date

Outcome

What did you decide?

Background

We want to move to supporting Composer-base install and upgrades natively in Mautic. To do that we have identified several challenges:

We need to brainstorm the folder structure that we need, and come to an agreement of what it would be:

Provide context on the decision the team needs to make. Include links to relevant research, pages, and related decisions, as well as information on constraints or challenges that may impact the outcome.

Questions / discussion points

Suggested Composer package structure

http://github.com/mautic/mautic

The project as seen from the outside and where PR’s are made against. Like it is today

http://github.com/mautic/app or mautic/core?

Git subtree split from the github.com/mautic/mautic/app folder. To be discussed if we need to change this to core.

http://github.com/mautic/core-recommended

Separate package to guarantee that all of the dependencies from mautic/core

http://github.com/mautic/core-composer-scaffold

Composer plugin to make sure we can have some mautic knowledge similar to https://github.com/nickveenhof/mautic-core-composer-scaffold

It would all come together in a project called http://github.com/mautic/recommended-project similar to https://github.com/nickveenhof/mautic-project

This means we have the following as required packages in recommended-project

"mautic/core-composer-scaffold": "^4.0"

"mautic/core-recommended": "^4.0"

Suggested folder structure

This also means that the following folders and files should be generated from within the scaffold resource folder in mautic/core

index.php (first time setup coming from app/assets/scaffold/files/index.php)
.htaccess (first time setup coming from app/assets/scaffold/files/.htaccess)
app → Core Mautic application coming from mautic/core
themes/contrib → themes downloaded by composer (public)
themes/contrib → themes downloaded by composer or custom written (private)
plugins/contrib → plugins downloaded by composer
plugins/custom → plugins from own packagists or custom code
media/ → all media files similar to today including the different folders
config/ → Configuration (user created)
vendor/ → All dependencies from composer

Alternative folder structures possible with composer

web/index.php (first time setup coming from app/assets/scaffold/files/index.php)
web/.htaccess (first time setup coming from app/assets/scaffold/files/.htaccess)
web/app → Core Mautic application coming from mautic/core
web/themes/contrib → themes downloaded by composer (public)
web/themes/contrib → themes downloaded by composer or custom written (private)
web/plugins/contrib → plugins downloaded by composer
web/plugins/custom → plugins from own packagists or custom code
web/media/ → all media files similar to today including the different folders
config/ → Configuration files
vendor/ → All dependencies from composer

This means the in the mautic/core (or mautic/app) we should also have folders such as app/plugins and app/themes where the core plugins and core themes live

Options considered

Mautic core/app folder name

Option 1:

Option 2:

Description

core

app

Pros and cons

(plus) In line with Drupal project and easier to learn from

(minus) a change in how mautic works today

(plus) The folder stays similar as it is today

(minus) Harder to map when learning from the Drupal project

Estimated cost

Action items

Add action items to close the loop on open questions or concerns

Outcome

Summarize the outcome below