Update rector/rector requirement from ^1.2 to ^2.0 #602
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#L93
Escaped Mutant for Mutator "GreaterThan":
--- Original
+++ New
@@ @@
if (!is_file($path)) {
throw new InvalidConfigException("Asset files not found: \"{$path}\".");
}
- if ($this->appendTimestamp && ($timestamp = FileHelper::lastModifiedTime($path)) > 0) {
+ if ($this->appendTimestamp && ($timestamp = FileHelper::lastModifiedTime($path)) >= 0) {
return "{$url}?v={$timestamp}";
}
return $url;
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetManager.php#L319
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
}
foreach ($this->allowedBundleNames as $name) {
$this->registerAssetBundle($name);
- $this->registerFiles($name);
+
}
}
/**
|
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#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#L277
Escaped Mutant for Mutator "LogicalNot":
--- Original
+++ New
@@ @@
}
}
}
- } elseif (!empty($bundle->publishOptions['forceCopy']) || $this->forceCopy && !isset($bundle->publishOptions['forceCopy']) || !is_dir($dstDir)) {
+ } elseif (!empty($bundle->publishOptions['forceCopy']) || $this->forceCopy && isset($bundle->publishOptions['forceCopy']) || !is_dir($dstDir)) {
$publishOptions = ['dirMode' => $this->dirMode, 'fileMode' => $this->fileMode, 'copyEmptyDirectories' => false];
foreach (['afterCopy', 'beforeCopy', 'filter', 'recursive'] as $key) {
if (array_key_exists($key, $bundle->publishOptions)) {
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetRegistrar.php#L119
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function withConverter(AssetConverterInterface $converter) : self
{
- $new = clone $this;
+ $new = $this;
$new->converter = $converter;
return $new;
}
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetRegistrar.php#L129
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function withLoader(AssetLoaderInterface $loader) : self
{
- $new = clone $this;
+ $new = $this;
$new->loader = $loader;
return $new;
}
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetRegistrar.php#L203
Escaped Mutant for Mutator "IfNegation":
--- Original
+++ New
@@ @@
foreach ($bundle->css as $i => $css) {
if (is_array($css)) {
$file = $css[0];
- if (AssetUtil::isRelative($file)) {
+ if (!AssetUtil::isRelative($file)) {
$baseFile = $this->aliases->get("{$bundle->basePath}/{$file}");
if (is_file($baseFile)) {
$css[0] = $this->converter->convert($file, $bundle->basePath, $bundle->converterOptions);
|
mutation / PHP 8.3-ubuntu-latest:
src/AssetRegistrar.php#L205
Escaped Mutant for Mutator "IfNegation":
--- Original
+++ New
@@ @@
$file = $css[0];
if (AssetUtil::isRelative($file)) {
$baseFile = $this->aliases->get("{$bundle->basePath}/{$file}");
- if (is_file($baseFile)) {
+ if (!is_file($baseFile)) {
$css[0] = $this->converter->convert($file, $bundle->basePath, $bundle->converterOptions);
$bundle->css[$i] = $css;
}
|