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

[DEPS]: Bump inpsyde/wp-translation-downloader from 2.1.1 to 2.3 #253

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 22, 2022

Bumps inpsyde/wp-translation-downloader from 2.1.1 to 2.3.

Release notes

Sourced from inpsyde/wp-translation-downloader's releases.

2.3

Downloader, Unzipper and Cache

The complete logic of Downloader, Unzipper and Cache was refactored and now works seamlessly with Composer v2.

The logic we follow now is:

  1. Create a Composer Package for each translation package. In this "fake" package, we set the "dist" URL, to the URL of translation package we want to download
  2. we instantiate a Composer's Downloader via Composer's Composer\Downloader\DownloadManager::getDownloader()
  3. we use the Downloader to download the "fake" package, via the Composer's SyncHelper::downloadAndInstallPackageSync which is an utility that Composer's developers introduced for this exact scope.

This logic is implemented in


Code changes

A new FnMatcher object

Many places in the plugin accepts package names/types via "shell wildcard patterns" (that is, using *). The new FnMatcher will provide some reusable code which is used in multiple places.

More powerful download command

The download command already accepts a list of packages, but that list must contain exact names. E. g. "inpsyde/foo", "inpsyde/bar", etc. As a consequence of having the new FnMatcher class, now the command accepts pattern as well, so we can do --packages="inpsyde/*"


Further improvements

  • Support for Composer v1 is now completely removed. It was already officially "not supported", but in composer.json we still had compatible constraints, and we had code to deal with v1, now we only require v2 in composer.json and all code that dealt with v1 has been removed.
  • A bug was there when using root packages, due to the fact that often root packages have no version, so Composer adds a "fake" version that causes troubles with the APIs.
  • Various plugin tasks/commands are made more "lazy" making the code do nothing until last minute, to avoid undesired side-effects
  • PackageNameResolver was a single-static-method class used in two classes in the "Package" namespace. It has been converted to a trait in the "Package" namespace to keep root namespace clean.
  • The "logo" has been made more "slim", and some other output improvements, for example display the number of errors for each package and an "overall stats" which was missing.
  • To make code more "future proof" the method Composer::getComposer is not used when using a Composer version where it is deprecated (v2.3+).
  • The PluginConfiguration class now uses constants for hardcoded strings for keys, to avoid typos and get auto-complete.
  • Some output messages are improved to bring more clarity, or just read better in English.

Test & QA changes

  • Psalm has been added to the library.
  • PHPUnit usage of mocks as been reduced to the minimum, preferring real classes whenever possible without much effort.
  • Behat test setup has been optimized to run tests locally.
  • GitHub action workflows have been optimized

Big props to @​gmazzap for the time and work put into this 💪

... (truncated)

Commits
  • 2539fd3 Merge pull request #32 from inpsyde/refactor/downloader
  • 3f70c45 Add .po to allowed translation files
  • 55c6f7a Fix bug when translations have multi dots in file names
  • f766b35 Small improvement to schema
  • 26c6493 Restore ComposerGetterTrait: requireComposer is 2.3+
  • ad5715a Entirely remove support for Composer v1
  • f7e736f Normalize PHP file headers
  • a4982f9 More love to docs
  • d0160ac Refresh documentation
  • 262401c Empty version for placeholders only when starts with "dev-"
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file php Pull requests that update Php code labels Jun 22, 2022
@anthonywnz
Copy link
Contributor

@dependabot rebase

Bumps [inpsyde/wp-translation-downloader](https://github.com/inpsyde/wp-translation-downloader) from 2.1.1 to 2.3.
- [Release notes](https://github.com/inpsyde/wp-translation-downloader/releases)
- [Commits](inpsyde/wp-translation-downloader@2.1.1...2.3)

---
updated-dependencies:
- dependency-name: inpsyde/wp-translation-downloader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/composer/inpsyde/wp-translation-downloader-2.3 branch from 45582d4 to 1db4ca2 Compare July 20, 2022 08:21
@anthonywnz anthonywnz merged commit 7636281 into main Jul 20, 2022
@dependabot dependabot bot deleted the dependabot/composer/inpsyde/wp-translation-downloader-2.3 branch July 20, 2022 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant