Releases: coenjacobs/mozart
Release 1.2.3
What's Changed
- Fix: Throw explicit exception when namespace inference fails by @coenjacobs in #385
- Fix: Add deleteFile() to FilesHandler by @coenjacobs in #387
- Fix: Attach zero-config Mozart to package by @coenjacobs in #389
- Fix: Skip PSR-4 entry when no namespace deps exist by @coenjacobs in #391
Full Changelog: 1.2.2...1.2.3
Docker Images
This release includes Docker images for multiple architectures (linux/amd64, linux/arm64, linux/arm/v7).
Pull from Docker Hub
docker pull coenjacobs/mozart:1.2.3Pull from GitHub Container Registry
docker pull ghcr.io/coenjacobs/mozart:1.2.3Available Tags
-
1.2.3- This release -
latest- Latest stable version (if this is the highest version)
Links
Release 1.2.2
What's Changed
- Backport: fix alias qualified names by @coenjacobs in #382 - thanks @nickvergessen 🙌
Full Changelog: 1.2.1...1.2.2
Docker Images
This release includes Docker images for multiple architectures (linux/amd64, linux/arm64, linux/arm/v7).
Pull from Docker Hub
docker pull coenjacobs/mozart:1.2.2Pull from GitHub Container Registry
docker pull ghcr.io/coenjacobs/mozart:1.2.2Available Tags
-
1.2.2- This release -
latest- Latest stable version (if this is the highest version)
Links
Release 1.1.6
What's Changed
- Backport: fix alias qualified names by @coenjacobs in #383 - thanks @nickvergessen 🙌
Full Changelog: 1.1.5...1.1.6
Docker Images
This release includes Docker images for multiple architectures (linux/amd64, linux/arm64, linux/arm/v7).
Pull from Docker Hub
docker pull coenjacobs/mozart:1.1.6Pull from GitHub Container Registry
docker pull ghcr.io/coenjacobs/mozart:1.1.6Available Tags
-
1.1.6- This release -
latest- Latest stable version (if this is the highest version)
Links
Release 1.2.1
What's Changed
- BACKPORT: Fix symlinks in vendor packages causing UnableToListContents failure by @coenjacobs in #373
Full Changelog: 1.2.0...1.2.1
Docker Images
This release includes Docker images for multiple architectures (linux/amd64, linux/arm64, linux/arm/v7).
Pull from Docker Hub
docker pull coenjacobs/mozart:1.2.1Pull from GitHub Container Registry
docker pull ghcr.io/coenjacobs/mozart:1.2.1Available Tags
-
1.2.1- This release -
latest- Latest stable version (if this is the highest version)
Links
Release 1.1.5
What's Changed
- BACKPORT: Fix symlinks in vendor packages causing UnableToListContents failure by @coenjacobs in #374
Full Changelog: 1.1.4...1.1.5
Docker Images
This release includes Docker images for multiple architectures (linux/amd64, linux/arm64, linux/arm/v7).
Pull from Docker Hub
docker pull coenjacobs/mozart:1.1.5Pull from GitHub Container Registry
docker pull ghcr.io/coenjacobs/mozart:1.1.5Available Tags
-
1.1.5- This release -
latest- Latest stable version (if this is the highest version)
Links
Release 1.2.0
Mozart 1.2.0 is a major feature release. 🎉 The headline: Mozart now works with zero configuration — just run mozart compose and it handles the rest. This release also adds global-scope constant and function prefixing and automatic autoloader generation.
New features
- Zero configuration — Running
mozart composeis now the only opt-in required. All six settings have sensible defaults, inferred from your project'scomposer.json. Existingextra.mozartblocks continue to work unchanged. A newmozart configcommand lets you inspect the resolved configuration and where each value came from. #316 - Autoloader generation — Mozart now generates a Composer-compatible autoloader file covering PSR-4, classmap, and files entries for all processed dependencies. This is enabled by default (
generate_autoloader: true) and replaces the need to manually configure your project'scomposer.jsonautoload section. See usage docs. #315 - Global-scope constant prefixing — Constants declared with
constordefine()at global scope are now prefixed withconstant_prefix(defaults to an uppercased version ofclassmap_prefix). References viaconstant(),defined(), and bare constant fetches are updated throughout the codebase. #308 - Global-scope function prefixing — Functions declared at global scope are now prefixed with
functions_prefix(defaults to a lowercased version ofclassmap_prefix). References viafunction_exists()and direct function calls are updated accordingly. #308 - PHP built-in symbol protection — Mozart ships a database of PHP built-in symbols (PHP 7.4–8.5) and skips them during renaming. Polyfill packages like
symfony/polyfill-php80are no longer broken by having their declarations prefixed. #306
Improvements
- Namespaced
define()calls routed correctly —define()inside a namespace block is now handled by the namespace replacer instead of being incorrectly prefixed withconstant_prefix. #353 - Files autoloader basename collision — Global-scope files with the same basename but in different directories are no longer flattened to the same target path. #351
- NameVisitor routes by symbol type — Class, constant, and function references are now matched against their respective maps, preventing cross-type collisions. #363
- Case-insensitive symbol lookups — Class and function name matching is now case-insensitive (as PHP itself is), while constant matching remains case-sensitive. #314
- Parent replacer propagation for files autoloaders — Namespaced files autoloader entries in parent packages now receive constant and function renames from child packages. #365, #367
- Generated autoloader hardening — Fixed file identifier collisions, Windows path separators in
$baseDir, and absolute classmap paths. #362 - Boolean config values detected correctly —
delete_vendor_directories: falseandgenerate_autoloader: falseare now properly distinguished from "not set" when reporting config sources. #323 - Parent replacer early return — Fixed
replaceParentPackage()exiting after the first autoloader combination instead of processing all of them. #288 - Enum declaration support — Enums are now handled in both the declaration visitor and classmap mode. #290, #313
- Diamond dependency reprocessing — Added a visited-set to
replacePackages()to prevent processing the same package twice. #292 - Typed exceptions — All bare exceptions replaced with
MozartExceptionsubtypes; error output useswriteln()instead ofwrite(). #294 - FilesHandler exception wrapping — All Flysystem exceptions are now wrapped in
FileOperationException. #296 - Windows directory separator — Fixed PSR-4 path flattening breaking on Windows backslashes. #310
Forward ported bug fixes
These bug fixes have been released earlier today in versions 1.1.4 and 1.0.10 as well:
- PHPDoc FQCN prefixing hardened — Fully-qualified class names in PHPDoc annotations (
@param,@return,@var,@throws, etc.) logic reworked and are now properly rewritten to use the prefixed namespace. #360 - Shared vendor dependencies preserved during cleanup — Vendor directories required by non-processed installed packages are no longer deleted. #357
Infrastructure
- PHP minimum raised to 8.2 (from 8.1) #368
- Upgraded to PHPUnit 11, PHPStan 2.x, Symfony 7.x, php-parser 5.x (only) #368
- Docker images updated to Composer 2.9.5 and Xdebug 3.5.1 #368
- GitHub Actions bumped to latest major versions #368
Upgrade notes
- PHP 8.2 required — Mozart 1.2.0 requires PHP 8.2 or higher. The resulting bundled files can still target any PHP version.
- Autoloader generation is on by default — If you already manually configure autoloading in your project's
composer.jsonfor Mozart-processed dependencies, have your code include the newly createdautoload.phpto benefit from this new feature. Or alternatively, setgenerate_autoloadertofalsein yourextra.mozartblock to keep your existing setup. See the configuration docs. - New prefixes are applied automatically —
constant_prefixandfunctions_prefixare derived fromclassmap_prefixby default. If your dependencies declare global-scope constants or functions, these will now be prefixed. Set either to an empty string inextra.mozartto disable.
Documentation
Full documentation for all features is available in docs/:
- Configuration reference — all settings, defaults, and inference chain
- Usage guide — autoloader generation and Composer integration
- Replace pipeline — how AST-based replacement works
- Autoloaders — PSR-4, PSR-0, classmap, and files autoloader handling
Full Changelog: 1.1.4...1.2.0
Docker Images
This release includes Docker images for multiple architectures (linux/amd64, linux/arm64, linux/arm/v7).
Pull from Docker Hub
docker pull coenjacobs/mozart:1.2.0Pull from GitHub Container Registry
docker pull ghcr.io/coenjacobs/mozart:1.2.0Available Tags
-
1.2.0- This release -
latest- Latest stable version (if this is the highest version)
Links
Release 1.1.4
Maintenance release, containing:
Full Changelog: 1.1.3...1.1.4
Docker Images
This release includes Docker images for multiple architectures (linux/amd64, linux/arm64, linux/arm/v7).
Pull from Docker Hub
docker pull coenjacobs/mozart:1.1.4Pull from GitHub Container Registry
docker pull ghcr.io/coenjacobs/mozart:1.1.4Available Tags
-
1.1.4- This release -
latest- Latest stable version (if this is the highest version)
Links
Release 1.0.10
Maintenance release, containing:
- Backported: Preserve shared vendor dependencies during cleanup #356
- Backported: Fix PHPDoc namespace prefixing #361
Full Changelog: 1.0.9...1.0.10
Docker Images
This release includes Docker images for multiple architectures (linux/amd64, linux/arm64, linux/arm/v7).
Pull from Docker Hub
docker pull coenjacobs/mozart:1.0.10Pull from GitHub Container Registry
docker pull ghcr.io/coenjacobs/mozart:1.0.10Available Tags
-
1.0.10- This release -
latest- Latest stable version (if this is the highest version)
Links
Release 1.1.3
- [FORWARD PORT] Fix delete_vendor_directories setter name mismatch #321
Full Changelog: 1.1.2...1.1.3
Docker Images
This release includes Docker images for multiple architectures (linux/amd64, linux/arm64, linux/arm/v7).
Pull from Docker Hub
docker pull coenjacobs/mozart:1.1.3Pull from GitHub Container Registry
docker pull ghcr.io/coenjacobs/mozart:1.1.3Available Tags
-
1.1.3- This release -
latest- Latest stable version (if this is the highest version)
Links
Release 1.0.9
Maintenance release, containing:
- Fix delete_vendor_directories setter name mismatch #320
Full Changelog: 1.0.8...1.0.9
Docker Images
This release includes Docker images for multiple architectures (linux/amd64, linux/arm64, linux/arm/v7).
Pull from Docker Hub
docker pull coenjacobs/mozart:1.0.9Pull from GitHub Container Registry
docker pull ghcr.io/coenjacobs/mozart:1.0.9Available Tags
-
1.0.9- This release -
latest- Latest stable version (if this is the highest version)