Skip to content

2.1

Compare
Choose a tag to compare
@Chrico Chrico released this 12 May 08:30
· 75 commits to master since this release
050c8fd

Locker

This release introduces the Util\Locker-class, which will generate on installation a wp-translation-downloader.lock-file to keep track of the installated translations. On next run it will check against the lock file and only download newer translation files.

Related issues: #9 #26
Read more: https://github.com/inpsyde/wp-translation-downloader/blob/master/docs/Locker.md

Custom composer types and directories

This release will allow you to configure in your wp-translation-downloader.json the directories.names and directories.types mapping with a sub-folder name. This will also open this package to install every Composer type available, instead of just the pre-defined static ones included in this package.

The configuration key directory is now deprecated and will be removed in future. Please make sure to update your configuration to the new key languageRootDir.

Related issues: #13 #27
Read more: https://github.com/inpsyde/wp-translation-downloader/blob/master/docs/Configuraton.md#languagerootdir-and-directories

Support for root package

The root package, which contains the wp-translation-downloader-configuration, is now also added to the list of packages to process.

Related issue: #25 #27

JSON Schema validation

When loading the wp-translation-downloader-configuration, we will now use https://json-schema.org/ to validate the file by using justinrainbow/json-schema, which is included in Composer.

The PluginConfigurationBuilder::build() will now return null when the JSON Schema does not validate successfully against the input and print out information about the errors.

Related issue: #28

Changes under the hood

This release contains a few changes under the hood, including some refactored code and simplifications:

  • Removed Inpsyde\WpTranslationDownloader\Io - instead Composer\IO\IOInterface is now used.
  • Introduced a new TranslateablePackage and TranslatablePackageInterface which replaces the specific implementations of WpCorePackage, WpThemePackage, WpPluginPackage, LibraryPackage and the TranslatablePackageTrait.
  • Plugin will now not create services on activate(). Instead a new method Plugin::bootstrap() was implemented and is being used in the event callbacks to instantiate the Services late.
  • ApiEndpointResolver was merged into TranslatablePackageFactory.
  • PluginConfiguration::isValid() was removed due the newly implemented JSON Schema implementation.

Improvements

  • Documentation is now moved into docs/-folder, split into mulitiple files and has more examples and details in it.
  • Allow composer/installers v2.
  • composer normalize.
  • add config.allow-plugins property.
  • Run tests on PHP v8.0 and v8.1.
  • More behat tests were added 😱
  • Removed issue templates - the global Inpsyde ones from https://github.com/inpsyde/.github are now used.
  • Use inpsyde/reusable-workflows for running Github Action workflows.

props to @tyrann0us 💪 and myself @Chrico 😬