Skip to content

v0.4.0-alpha — dev-environment commands

Pre-release
Pre-release

Choose a tag to compare

@bcordis bcordis released this 07 May 20:28
· 58 commits to main since this release
v0.4.0-alpha
70b7c72

First release on the 0.4 line. Adds the dev-environment command surface — every CWM extension can now drive its local Joomla dev workflow through composer-script aliases instead of carrying its own ~1400-line build script.

Added

  • cwm-setup — interactive wizard; writes build.properties (paths, URLs, versions, DB creds, admin creds).
  • cwm-link — symlinks the project tree into every configured Joomla install. Auto-derives the standard set from extension.* and manifests.extensions[] (component admin/site/media; library lib_Xlibraries/X + manifest mirror; plugins/<group>/<element>; modules/[admin]/<name>). Explicit dev.links[] and dev.internalLinks[] merged in. All symlinks created with relative paths so the dev tree is portable across machines and CI.
  • cwm-link-check — verifies every expected symlink without recreating; non-zero exit on drift, CI-friendly.
  • cwm-clean — removes every dev symlink; real files at the link paths are left alone.
  • cwm-verify — confirms each install has every project sub-extension registered in #__extensions. Reads each manifest XML to discover type/element/folder/namespace; uses PDO so it does not bootstrap Joomla. --fix reconciles drift (UPDATE state, INSERT missing libraries/plugins, run library install SQL).
  • cwm-joomla-install — downloads the Joomla full-package release into every configured install path. --force to overwrite.
  • cwm-joomla-latest — prints the latest stable tag from the joomla-cms releases feed.
  • src/Dev/: InstallConfig, PropertiesReader, LinkResolver, Linker, ExtensionVerifier, JoomlaInstaller (PSR-4, PHP 8.3+).
  • templates/build.properties.tmpl and a new dev: block in cwm-build.config.json.tmpl.
  • templates/gitignore-managed.txt includes build.properties so consumers pick it up via composer sync-configs.

Configuration split

File Committed? Purpose
cwm-build.config.json yes What the project IS — extension layout, manifest paths, optional dev: block. No secrets.
build.properties no — gitignored Where the developer's local installs live: paths, URLs, versions, DB and admin credentials.

PropertiesReader accepts both the new INI-section format and Proclaim's legacy flat builder.joomla_paths= layout, so consumers migrating from Proclaim can drop the new toolchain in without rewriting their existing properties first.

Changed (breaking)

  • Removed ars.changelogUrl from the config schema (modern Akeeba ARS has no changelogurl field on #__ars_updatestreams). Migration: move the value to changelog.url and add a <changelogurl> element to your top-level extension manifest. See full notes in CHANGELOG.md.

How to consume

composer require --dev cwm/build-tools:^0.4@alpha

Then in composer.json:

"scripts": {
  "setup":           "vendor/bin/cwm-setup",
  "link":            "vendor/bin/cwm-link",
  "link-check":      "vendor/bin/cwm-link-check",
  "clean":           "vendor/bin/cwm-clean",
  "verify":          "vendor/bin/cwm-verify",
  "joomla-install":  "vendor/bin/cwm-joomla-install",
  "joomla-latest":   "vendor/bin/cwm-joomla-latest"
}

Surfaced by Joomla-Bible-Study/cwmconnect#77. Lifted from Proclaim's build/proclaim_build.php.