mirror of
https://github.com/flarum/framework.git
synced 2024-12-11 21:43:38 +08:00
37a882118a
* chore(deps): bump glob-parent in /extensions/emoji/js Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 3.1.0 to 5.1.2. - [Release notes](https://github.com/gulpjs/glob-parent/releases) - [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md) - [Commits](https://github.com/gulpjs/glob-parent/compare/v3.1.0...v5.1.2) --- updated-dependencies: - dependency-name: glob-parent dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Apply fixes from StyleCI [ci skip] [skip ci] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: StyleCI Bot <bot@styleci.io>
31 lines
799 B
PHP
31 lines
799 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Flarum.
|
|
*
|
|
* For detailed copyright and license information, please view the
|
|
* LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Flarum\PackageManager\Tests\integration;
|
|
|
|
trait DummyExtensions
|
|
{
|
|
protected function makeDummyExtensionCompatibleWith(string $name, string $coreVersions): void
|
|
{
|
|
$dirName = $this->tmpDir().'/packages/'.str_replace('/', '-', $name);
|
|
|
|
if (! file_exists($dirName)) {
|
|
mkdir($dirName);
|
|
}
|
|
|
|
file_put_contents($dirName.'/composer.json', json_encode([
|
|
'name' => $name,
|
|
'version' => '1.0.0',
|
|
'require' => [
|
|
'flarum/core' => $coreVersions
|
|
],
|
|
], JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT));
|
|
}
|
|
}
|