Replace roave/infection-static-analysis-plugin
to infection/infection
#606
Annotations
11 warnings
mutation / PHP 8.3-ubuntu-latest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetLoader.php#L47
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
* @param string|null $basePath The root directory storing the asset files. See {@see withBasePath()}.
* @param string|null $baseUrl The base URL that can be used to access the asset files. See {@see withBaseUrl()}.
*/
- public function __construct(private readonly Aliases $aliases, private bool $appendTimestamp = false, private array $assetMap = [], private ?string $basePath = null, private ?string $baseUrl = null)
+ public function __construct(private readonly Aliases $aliases, private bool $appendTimestamp = true, private array $assetMap = [], private ?string $basePath = null, private ?string $baseUrl = null)
{
}
public function getAssetUrl(AssetBundle $bundle, string $assetPath) : string
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetLoader.php#L260
Escaped Mutant for Mutator "CastString":
--- Original
+++ New
@@ @@
if ($bundle->baseUrl === null && $this->baseUrl === null) {
return null;
}
- return $this->aliases->get($bundle->baseUrl ?? (string) $this->baseUrl);
+ return $this->aliases->get($bundle->baseUrl ?? $this->baseUrl);
}
}
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetManager.php#L359
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
}
if (!isset($this->registeredBundles[$name])) {
$bundle = $this->publishBundle($this->loadBundle($name));
- $this->bundlesInRegisterProcess[$name] = true;
+ $this->bundlesInRegisterProcess[$name] = false;
/** @var string $dep */
foreach ($bundle->depends as $dep) {
$this->registerAssetBundle($dep, $bundle->jsPosition, $bundle->cssPosition);
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetManager.php#L391
Escaped Mutant for Mutator "GreaterThan":
--- Original
+++ New
@@ @@
if ($cssPosition !== null) {
if ($bundle->cssPosition === null) {
$bundle->cssPosition = $cssPosition;
- } elseif ($bundle->cssPosition > $cssPosition) {
+ } elseif ($bundle->cssPosition >= $cssPosition) {
throw new RuntimeException("An asset bundle that depends on \"{$name}\" has a higher CSS file " . "position configured than \"{$name}\".");
}
}
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetManager.php#L457
Escaped Mutant for Mutator "AssignCoalesce":
--- Original
+++ New
@@ @@
/** @psalm-suppress RedundantConditionGivenDocblockType */
if ($this->customizedBundles[$name] === false) {
/** @psalm-suppress MixedArgumentTypeCoercion */
- return $this->dummyBundles[$name] ??= $this->loader->loadBundle($name, (array) new AssetBundle());
+ return $this->dummyBundles[$name] = $this->loader->loadBundle($name, (array) new AssetBundle());
}
throw new InvalidConfigException("Invalid configuration of the \"{$name}\" asset bundle.");
}
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetManager.php#L474
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
*/
private function publishBundle(AssetBundle $bundle) : AssetBundle
{
- if (!$bundle->cdn && $this->publisher !== null && !empty($bundle->sourcePath)) {
+ if ((!$bundle->cdn || $this->publisher !== null) && !empty($bundle->sourcePath)) {
[$bundle->basePath, $bundle->baseUrl] = $this->publisher->publish($bundle);
}
return $bundle;
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetManager.php#L489
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
* @throws InvalidConfigException For invalid asset bundle configuration.
* @throws RuntimeException If The asset bundle name is not allowed.
*/
- public function checkAllowedBundleName(string $name) : void
+ protected function checkAllowedBundleName(string $name) : void
{
if (isset($this->loadedBundles[$name]) || in_array($name, $this->allowedBundleNames, true)) {
return;
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetPublisher.php#L65
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
* directory. See {@see withForceCopy()}.
* @param bool $linkAssets Whether to use symbolic link to publish asset files. See {@see withLinkAssets()}.
*/
- public function __construct(private readonly Aliases $aliases, private bool $forceCopy = false, private bool $linkAssets = false)
+ public function __construct(private readonly Aliases $aliases, private bool $forceCopy = true, private bool $linkAssets = false)
{
}
public function publish(AssetBundle $bundle) : array
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetPublisher.php#L66
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
* directory. See {@see withForceCopy()}.
* @param bool $linkAssets Whether to use symbolic link to publish asset files. See {@see withLinkAssets()}.
*/
- public function __construct(private readonly Aliases $aliases, private bool $forceCopy = false, private bool $linkAssets = false)
+ public function __construct(private readonly Aliases $aliases, private bool $forceCopy = false, private bool $linkAssets = true)
{
}
public function publish(AssetBundle $bundle) : array
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetPublisher.php#L260
Escaped Mutant for Mutator "CastString":
--- Original
+++ New
@@ @@
*/
private function publishBundleDirectory(AssetBundle $bundle) : array
{
- $src = $this->aliases->get((string) $bundle->sourcePath);
+ $src = $this->aliases->get($bundle->sourcePath);
$dir = $this->hash($src);
$dstDir = "{$this->aliases->get((string) $bundle->basePath)}/{$dir}";
if ($this->linkAssets) {
|