1
0
mirror of https://github.com/flarum/core.git synced 2025-07-25 18:51:40 +02:00

chore(deps): bump glob-parent from 3.1.0 to 5.1.2 in /extensions/emoji/js (#3345)

* 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>
This commit is contained in:
dependabot[bot]
2022-03-11 18:11:20 -05:00
committed by GitHub
parent 379c06332a
commit 37a882118a
128 changed files with 9645 additions and 11730 deletions

View File

@@ -1,5 +1,12 @@
<?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\Testing\integration\Extend;
use Flarum\Extend\ExtenderInterface;

View File

@@ -1,5 +1,12 @@
<?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\Testing\integration\Extend;
use Flarum\Extend\ExtenderInterface;
@@ -11,7 +18,7 @@ use Illuminate\Contracts\Container\Container;
class OverrideExtensionManagerForTests implements ExtenderInterface
{
/**
* IDs of extensions to boot
* IDs of extensions to boot.
*/
protected $extensions;

View File

@@ -1,5 +1,12 @@
<?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\Testing\integration\Extend;
use Flarum\Extend\ExtenderInterface;
@@ -10,7 +17,7 @@ use Illuminate\Contracts\Container\Container;
class SetSettingsBeforeBoot implements ExtenderInterface
{
/**
* IDs of extensions to boot
* IDs of extensions to boot.
*/
protected $settings;
@@ -23,7 +30,7 @@ class SetSettingsBeforeBoot implements ExtenderInterface
{
if (count($this->settings)) {
$settings = $container->make(SettingsRepositoryInterface::class);
foreach ($this->settings as $key => $value) {
$settings->set($key, $value);
}

View File

@@ -56,10 +56,10 @@ class ExtensionManagerIncludeCurrent extends ExtensionManager
{
$extensions = parent::getExtensions();
$package = json_decode($this->filesystem->get($this->paths->vendor . '/../composer.json'), true);
$package = json_decode($this->filesystem->get($this->paths->vendor.'/../composer.json'), true);
if (Arr::get($package, 'type') === 'flarum-extension') {
$current = new Extension($this->paths->vendor . '/../', $package);
$current = new Extension($this->paths->vendor.'/../', $package);
$current->setInstalled(true);
$current->setVersion(Arr::get($package, 'version'));
$current->calculateDependencies([], []);
@@ -81,7 +81,9 @@ class ExtensionManagerIncludeCurrent extends ExtensionManager
*/
public function isEnabled($extension)
{
if (!$this->booted) return false;
if (! $this->booted) {
return false;
}
return parent::isEnabled($extension);
}
@@ -108,6 +110,6 @@ class ExtensionManagerIncludeCurrent extends ExtensionManager
*/
protected function getAssetsFilesystem(): Cloud
{
return new FilesystemAdapter(new FlysystemFilesystem(new Local($this->paths->public . '/assets'), ['url' => resolve('flarum.config')->url() . '/assets']));
return new FilesystemAdapter(new FlysystemFilesystem(new Local($this->paths->public.'/assets'), ['url' => resolve('flarum.config')->url().'/assets']));
}
}

View File

@@ -93,7 +93,6 @@ class SetupScript
echo "Database: DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD, DB_PREFIX\n";
echo "Test Config: FLARUM_TEST_TMP_DIR or FLARUM_TEST_TMP_DIR_LOCAL\n";
sleep(4);
echo "\nOff we go...\n";
@@ -111,7 +110,7 @@ class SetupScript
'base' => $tmp,
'public' => "$tmp/public",
'storage' => "$tmp/storage",
'vendor' => getcwd() . '/vendor',
'vendor' => getcwd().'/vendor',
])
);

View File

@@ -93,7 +93,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase
/**
* Each argument should be an instance of an extender that should
* be applied at application boot.
*
*
* Note that this method will have no effect if called after the
* application is booted.
*/
@@ -112,7 +112,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase
* Extensions other than the one currently being tested must be
* listed in this extension's `composer.json` under `require` or
* `require-dev`.
*
*
* Note that this method will have no effect if called after the
* application is booted.
*/
@@ -130,19 +130,19 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase
* Some Flarum code depends on config.php values. Flarum doesn't
* offer a way to set them at runtime, so this method lets you
* add/override them before boot.
*
*
* You can use dot-separated syntax to assign values to subarrays.
*
*
* For example:
*
*
* `$this->config('a.b.c', 'value');` will result in the following:
*
*
* [
* 'a' => [
* 'b' => ['c' => 'value']
* ]
* ]
*
*
* Note that this method will have no effect if called after the
* application is booted.
*/
@@ -162,7 +162,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase
* effect. For instance, in core the active display name driver
* is configured based on the `display_name_driver` setting.
* That setting should be registered using this method.
*
*
* Note that this method will have no effect if called after the
* application is booted.
*/

View File

@@ -1,14 +1,23 @@
<?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\Testing\integration;
trait UsesTmpDir
{
public function tmpDir() {
public function tmpDir()
{
return getenv('FLARUM_TEST_TMP_DIR_LOCAL') ?: getenv('FLARUM_TEST_TMP_DIR') ?: __DIR__.'/tmp';
}
public function setupTmpDir() {
public function setupTmpDir()
{
$DIRS_NEEDED = [
'/',
'/public',
@@ -29,14 +38,14 @@ trait UsesTmpDir
foreach ($DIRS_NEEDED as $path) {
$fullPath = $tmpDir.$path;
if (!file_exists($fullPath)) {
if (! file_exists($fullPath)) {
mkdir($fullPath);
}
}
foreach ($FILES_NEEDED as $path => $contents) {
$fullPath = $tmpDir.$path;
if (!file_exists($fullPath)) {
if (! file_exists($fullPath)) {
file_put_contents($fullPath, $contents);
}
}