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

chore: Bisect should use CacheClearCommand in core instead #4023

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

datlechin
Copy link
Contributor

Currently, the Flarum framework (https://github.com/flarum/framework/blob/2.x/framework/core/src/Extension/Bisect.php#L35) uses the Composer\Command\ClearCacheCommand class, but the core composer.json does not require the composer/composer package. This causes an error when running the php flarum command.

To resolve this, there are two possible approaches:

  1. Move the composer/composer package to the core and remove it from the extension-manager.
  2. Create a new command in the core to handle clearing the Composer cache by forking the necessary code from the composer/composer package.

In this PR, I've opted for the first solution by moving the composer/composer package to the core composer.json and removing it from the extension-manager.

Fixes #0000

Changes proposed in this pull request:

Reviewers should focus on:

Screenshot

QA

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

Required changes:

  • Related documentation PR: (Remove if irrelevant)
  • Related core extension PRs: (Remove if irrelevant)

@datlechin datlechin requested a review from a team as a code owner September 25, 2024 03:54
@SychO9
Copy link
Member

SychO9 commented Sep 25, 2024

Thanks for the PR!

The mistake is actually that the bisect class should be using the core CleaeCacheCommand instead. We would definitely not want to require composer in core otherwise.

Could you please make that change?

@datlechin datlechin changed the title chore: move composer/composer package to framework chore: Bisect should use CacheClearCommand in core instead Sep 25, 2024
@SychO9 SychO9 merged commit e08a9f6 into flarum:2.x Sep 25, 2024
7 of 18 checks passed
@datlechin datlechin deleted the chore/move-composer-package branch September 26, 2024 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants