- Package is now publicly available.
- Package was renamed to
cpsit/frontend-asset-handler
. - Root PSR-4 namespace is now
CPSIT\FrontendAssetHandler
.
- Package was renamed to
- Package was converted to Composer library.
- Package does no longer act as Composer plugin.
- Console commands are no longer available within Composer.
- Separate console application is now provided as
vendor/bin/frontend-assets
. - Execute commands like follows:
vendor/bin/frontend-assets <command>
- Console commands were renamed.
fetch-assets
must now be executed asvendor/bin/frontend-assets fetch
.wait-for-assets
must now be executed asvendor/bin/frontend-assets inspect --wait-for-deployments
(see following migration).
- Console command
wait-for-assets
was rewritten.- Use
vendor/bin/frontend-assets inspect --wait-for-deployments
instead.
- Use
- Configuration schema was hardened.
- Add a
type
configuration to thevcs
definition. - Explicitly configure
url
andrevision-url
for thesource
definition. - Migrate the
source.revision-file
configuration tosource.revision-url
:"source": { "type": "http", "url": "https://example.com/assets/{environment}.tar.gz", - "revision-url": "https://example.com/assets/{environment}/{revision-file}", - "revision-file": "REVISION" + "revision-url": "https://example.com/assets/{environment}/REVISION" }
- See Configuration for all available configuration options and check out the updated schema file.
- Add a
- Asset handlers are now configurable.
- Implement the
HandlerInterface
for custom handlers. - Reference the handler type within the asset definition:
{ + "handler": "my-custom-handler", "source": { /* ... */ }, "target": { /* ... */ } }
- Implement the
- Custom service configuration can now be configured.
- Add a
services.yaml
orservices.php
file to your code base. - Reference the files in the asset configuration file:
{ "frontend-assets": [ /* ... */ - ] + ], + "services": [ + "/path/to/my/services.php", + "/path/to/my/services.yaml" + ] }
- See Dependency injection for a detailed overview.
- Add a
- Minimum PHP version is now 8.1.
- Upgrade your code base to PHP 8.1.
- Support for configuration via
composer.json
has been removed.- Migrate your configuration at
extra/frontend-assets
to an external file, e.g.assets.json
. - Reference the external file with the new command option
--config
(shorthand:-c
). - Remove reference to external config file in
composer.json
.
- Migrate your configuration at
- Environment map configuration changed.
- For static transformers, no migration is needed.
- For other transformers, migrate your configuration as follows
(see Environment Transformers):
"environments": { "map": { - "feature/*": "fe-{slug}" + "feature/*": { + "transformer": "slug", + "options": { + "pattern": "fe-{slug}" + } + } }, "merge": true }
- Several classes were adapted for the use of dependency injection.
- Upgrade third-party code if necessary.
- Minimum PHP version was raised to PHP 7.4.
- Upgrade your codebase to support at least PHP 7.4.
- Several classes were marked as
final
.- If you still need to extend or override them, consider refactoring your code.
- Try using dependency injection to use customized services.