reinstall dependencies on php 7.4

This commit is contained in:
Attila Jozsef Kerekes
2022-11-14 21:15:40 +01:00
parent 8972a11c0a
commit 98401f20a2
681 changed files with 65697 additions and 9274 deletions

View File

@@ -32,14 +32,14 @@ class AttributeMatchingExtension extends AbstractExtension
public function getAttributeMatchingTranslators(): array
{
return [
'exists' => $this->translateExists(...),
'=' => $this->translateEquals(...),
'~=' => $this->translateIncludes(...),
'|=' => $this->translateDashMatch(...),
'^=' => $this->translatePrefixMatch(...),
'$=' => $this->translateSuffixMatch(...),
'*=' => $this->translateSubstringMatch(...),
'!=' => $this->translateDifferent(...),
'exists' => [$this, 'translateExists'],
'=' => [$this, 'translateEquals'],
'~=' => [$this, 'translateIncludes'],
'|=' => [$this, 'translateDashMatch'],
'^=' => [$this, 'translatePrefixMatch'],
'$=' => [$this, 'translateSuffixMatch'],
'*=' => [$this, 'translateSubstringMatch'],
'!=' => [$this, 'translateDifferent'],
];
}

View File

@@ -31,10 +31,10 @@ class CombinationExtension extends AbstractExtension
public function getCombinationTranslators(): array
{
return [
' ' => $this->translateDescendant(...),
'>' => $this->translateChild(...),
'+' => $this->translateDirectAdjacent(...),
'~' => $this->translateIndirectAdjacent(...),
' ' => [$this, 'translateDescendant'],
'>' => [$this, 'translateChild'],
'+' => [$this, 'translateDirectAdjacent'],
'~' => [$this, 'translateIndirectAdjacent'],
];
}

View File

@@ -36,12 +36,12 @@ class FunctionExtension extends AbstractExtension
public function getFunctionTranslators(): array
{
return [
'nth-child' => $this->translateNthChild(...),
'nth-last-child' => $this->translateNthLastChild(...),
'nth-of-type' => $this->translateNthOfType(...),
'nth-last-of-type' => $this->translateNthLastOfType(...),
'contains' => $this->translateContains(...),
'lang' => $this->translateLang(...),
'nth-child' => [$this, 'translateNthChild'],
'nth-last-child' => [$this, 'translateNthLastChild'],
'nth-of-type' => [$this, 'translateNthOfType'],
'nth-last-of-type' => [$this, 'translateNthLastOfType'],
'contains' => [$this, 'translateContains'],
'lang' => [$this, 'translateLang'],
];
}

View File

@@ -42,14 +42,14 @@ class HtmlExtension extends AbstractExtension
public function getPseudoClassTranslators(): array
{
return [
'checked' => $this->translateChecked(...),
'link' => $this->translateLink(...),
'disabled' => $this->translateDisabled(...),
'enabled' => $this->translateEnabled(...),
'selected' => $this->translateSelected(...),
'invalid' => $this->translateInvalid(...),
'hover' => $this->translateHover(...),
'visited' => $this->translateVisited(...),
'checked' => [$this, 'translateChecked'],
'link' => [$this, 'translateLink'],
'disabled' => [$this, 'translateDisabled'],
'enabled' => [$this, 'translateEnabled'],
'selected' => [$this, 'translateSelected'],
'invalid' => [$this, 'translateInvalid'],
'hover' => [$this, 'translateHover'],
'visited' => [$this, 'translateVisited'],
];
}
@@ -59,7 +59,7 @@ class HtmlExtension extends AbstractExtension
public function getFunctionTranslators(): array
{
return [
'lang' => $this->translateLang(...),
'lang' => [$this, 'translateLang'],
];
}

View File

@@ -31,7 +31,7 @@ class NodeExtension extends AbstractExtension
public const ATTRIBUTE_NAME_IN_LOWER_CASE = 2;
public const ATTRIBUTE_VALUE_IN_LOWER_CASE = 4;
private int $flags;
private $flags;
public function __construct(int $flags = 0)
{
@@ -41,7 +41,7 @@ class NodeExtension extends AbstractExtension
/**
* @return $this
*/
public function setFlag(int $flag, bool $on): static
public function setFlag(int $flag, bool $on): self
{
if ($on && !$this->hasFlag($flag)) {
$this->flags += $flag;
@@ -65,15 +65,15 @@ class NodeExtension extends AbstractExtension
public function getNodeTranslators(): array
{
return [
'Selector' => $this->translateSelector(...),
'CombinedSelector' => $this->translateCombinedSelector(...),
'Negation' => $this->translateNegation(...),
'Function' => $this->translateFunction(...),
'Pseudo' => $this->translatePseudo(...),
'Attribute' => $this->translateAttribute(...),
'Class' => $this->translateClass(...),
'Hash' => $this->translateHash(...),
'Element' => $this->translateElement(...),
'Selector' => [$this, 'translateSelector'],
'CombinedSelector' => [$this, 'translateCombinedSelector'],
'Negation' => [$this, 'translateNegation'],
'Function' => [$this, 'translateFunction'],
'Pseudo' => [$this, 'translatePseudo'],
'Attribute' => [$this, 'translateAttribute'],
'Class' => [$this, 'translateClass'],
'Hash' => [$this, 'translateHash'],
'Element' => [$this, 'translateElement'],
];
}

View File

@@ -32,14 +32,14 @@ class PseudoClassExtension extends AbstractExtension
public function getPseudoClassTranslators(): array
{
return [
'root' => $this->translateRoot(...),
'first-child' => $this->translateFirstChild(...),
'last-child' => $this->translateLastChild(...),
'first-of-type' => $this->translateFirstOfType(...),
'last-of-type' => $this->translateLastOfType(...),
'only-child' => $this->translateOnlyChild(...),
'only-of-type' => $this->translateOnlyOfType(...),
'empty' => $this->translateEmpty(...),
'root' => [$this, 'translateRoot'],
'first-child' => [$this, 'translateFirstChild'],
'last-child' => [$this, 'translateLastChild'],
'first-of-type' => [$this, 'translateFirstOfType'],
'last-of-type' => [$this, 'translateLastOfType'],
'only-child' => [$this, 'translateOnlyChild'],
'only-of-type' => [$this, 'translateOnlyOfType'],
'empty' => [$this, 'translateEmpty'],
];
}

View File

@@ -30,23 +30,23 @@ use Symfony\Component\CssSelector\Parser\ParserInterface;
*/
class Translator implements TranslatorInterface
{
private ParserInterface $mainParser;
private $mainParser;
/**
* @var ParserInterface[]
*/
private array $shortcutParsers = [];
private $shortcutParsers = [];
/**
* @var Extension\ExtensionInterface[]
*/
private array $extensions = [];
private $extensions = [];
private array $nodeTranslators = [];
private array $combinationTranslators = [];
private array $functionTranslators = [];
private array $pseudoClassTranslators = [];
private array $attributeMatchingTranslators = [];
private $nodeTranslators = [];
private $combinationTranslators = [];
private $functionTranslators = [];
private $pseudoClassTranslators = [];
private $attributeMatchingTranslators = [];
public function __construct(ParserInterface $parser = null)
{
@@ -117,7 +117,7 @@ class Translator implements TranslatorInterface
/**
* @return $this
*/
public function registerExtension(Extension\ExtensionInterface $extension): static
public function registerExtension(Extension\ExtensionInterface $extension): self
{
$this->extensions[$extension->getName()] = $extension;
@@ -145,7 +145,7 @@ class Translator implements TranslatorInterface
/**
* @return $this
*/
public function registerParserShortcut(ParserInterface $shortcut): static
public function registerParserShortcut(ParserInterface $shortcut): self
{
$this->shortcutParsers[] = $shortcut;

View File

@@ -23,9 +23,9 @@ namespace Symfony\Component\CssSelector\XPath;
*/
class XPathExpr
{
private string $path;
private string $element;
private string $condition;
private $path;
private $element;
private $condition;
public function __construct(string $path = '', string $element = '*', string $condition = '', bool $starPrefix = false)
{
@@ -46,7 +46,7 @@ class XPathExpr
/**
* @return $this
*/
public function addCondition(string $condition): static
public function addCondition(string $condition): self
{
$this->condition = $this->condition ? sprintf('(%s) and (%s)', $this->condition, $condition) : $condition;
@@ -61,7 +61,7 @@ class XPathExpr
/**
* @return $this
*/
public function addNameTest(): static
public function addNameTest(): self
{
if ('*' !== $this->element) {
$this->addCondition('name() = '.Translator::getXpathLiteral($this->element));
@@ -74,7 +74,7 @@ class XPathExpr
/**
* @return $this
*/
public function addStarPrefix(): static
public function addStarPrefix(): self
{
$this->path .= '*/';
@@ -86,7 +86,7 @@ class XPathExpr
*
* @return $this
*/
public function join(string $combiner, self $expr): static
public function join(string $combiner, self $expr): self
{
$path = $this->__toString().$combiner;