Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distmaker - Don't require dummy config file for building Joomla #19357

Merged
merged 2 commits into from
Jan 11, 2021

Conversation

totten
Copy link
Member

@totten totten commented Jan 11, 2021

Overview

This addresses a quirky requirement in the workflow for building Civi-Joomla.

Before

To run distmaker and produce Joomla ZIPs, you need to create two dummy files.

For example, this is how cividist does it: https://github.com/civicrm/civicrm-buildkit/blob/v19.07.0/bin/cividist#L119-L121

It seems that is just a long-winded way of setting up the Civi classloader. (It wouldn't make sense to use any other Civi services as this is a pre-bootstrap environment.)

After

The dummy file is neither needed nor used. We just get the classloader directly.

BEFORE: To run distmaker and produce Joomla ZIPs, you need to create a dummy settings file.
For example, this is how `cividist` does it:

https://github.com/civicrm/civicrm-buildkit/blob/v19.07.0/bin/cividist#L119-L121

It seems that is just a long-winded way of setting up the Civi classloader. (It wouldn't
make sense to use any other Civi services this is a pre-bootstrap environment.)

AFTER: The dummy file is neither needed nor used. We just get the classloader directly.
…tion

Makes this much easier to read.

Honestly, I'm not sure it should even be checking $_SERVER like this --
$argv is probably enough, and I suspect that $_SERVER won't give the
expected values in most PHP environments.
@civibot
Copy link

civibot bot commented Jan 11, 2021

(Standard links)

@civibot civibot bot added the master label Jan 11, 2021
@seamuslee001
Copy link
Contributor

looks fine to me merge on pass

@totten totten merged commit 0075ec3 into civicrm:master Jan 11, 2021
@totten totten deleted the master-joomla branch January 11, 2021 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants