composer update
This commit is contained in:
parent
f6abc3dce2
commit
71dfaca858
1753 changed files with 45274 additions and 14619 deletions
4
vendor/symfony/dom-crawler/Form.php
vendored
4
vendor/symfony/dom-crawler/Form.php
vendored
|
@ -443,14 +443,14 @@ class Form extends Link implements \ArrayAccess
|
|||
// corresponding elements are either descendants or have a matching HTML5 form attribute
|
||||
$formId = Crawler::xpathLiteral($this->node->getAttribute('id'));
|
||||
|
||||
$fieldNodes = $xpath->query(sprintf('descendant::input[@form=%s] | descendant::button[@form=%1$s] | descendant::textarea[@form=%1$s] | descendant::select[@form=%1$s] | //form[@id=%1$s]//input[not(@form)] | //form[@id=%1$s]//button[not(@form)] | //form[@id=%1$s]//textarea[not(@form)] | //form[@id=%1$s]//select[not(@form)]', $formId));
|
||||
$fieldNodes = $xpath->query(sprintf('( descendant::input[@form=%s] | descendant::button[@form=%1$s] | descendant::textarea[@form=%1$s] | descendant::select[@form=%1$s] | //form[@id=%1$s]//input[not(@form)] | //form[@id=%1$s]//button[not(@form)] | //form[@id=%1$s]//textarea[not(@form)] | //form[@id=%1$s]//select[not(@form)] )[not(ancestor::template)]', $formId));
|
||||
foreach ($fieldNodes as $node) {
|
||||
$this->addField($node);
|
||||
}
|
||||
} else {
|
||||
// do the xpath query with $this->node as the context node, to only find descendant elements
|
||||
// however, descendant elements with form attribute are not part of this form
|
||||
$fieldNodes = $xpath->query('descendant::input[not(@form)] | descendant::button[not(@form)] | descendant::textarea[not(@form)] | descendant::select[not(@form)]', $this->node);
|
||||
$fieldNodes = $xpath->query('( descendant::input[not(@form)] | descendant::button[not(@form)] | descendant::textarea[not(@form)] | descendant::select[not(@form)] )[not(ancestor::template)]', $this->node);
|
||||
foreach ($fieldNodes as $node) {
|
||||
$this->addField($node);
|
||||
}
|
||||
|
|
2
vendor/symfony/dom-crawler/LICENSE
vendored
2
vendor/symfony/dom-crawler/LICENSE
vendored
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2004-2018 Fabien Potencier
|
||||
Copyright (c) 2004-2019 Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
10
vendor/symfony/dom-crawler/Tests/FormTest.php
vendored
10
vendor/symfony/dom-crawler/Tests/FormTest.php
vendored
|
@ -400,6 +400,10 @@ class FormTest extends TestCase
|
|||
|
||||
$form = $this->createForm('<form><input type="text" name="foo" value="foo" disabled="disabled" /><input type="text" name="bar" value="bar" /><input type="submit" /></form>');
|
||||
$this->assertEquals(array('bar' => 'bar'), $form->getValues(), '->getValues() does not include disabled fields');
|
||||
|
||||
$form = $this->createForm('<form><template><input type="text" name="foo" value="foo" /></template><input type="text" name="bar" value="bar" /><input type="submit" /></form>');
|
||||
$this->assertEquals(array('bar' => 'bar'), $form->getValues(), '->getValues() does not include template fields');
|
||||
$this->assertFalse($form->has('foo'));
|
||||
}
|
||||
|
||||
public function testSetValues()
|
||||
|
@ -450,6 +454,10 @@ class FormTest extends TestCase
|
|||
|
||||
$form = $this->createForm('<form method="post"><input type="file" name="foo[bar]" disabled="disabled" /><input type="submit" /></form>');
|
||||
$this->assertEquals(array(), $form->getFiles(), '->getFiles() does not include disabled file fields');
|
||||
|
||||
$form = $this->createForm('<form method="post"><template><input type="file" name="foo"/></template><input type="text" name="bar" value="bar"/><input type="submit"/></form>');
|
||||
$this->assertEquals(array(), $form->getFiles(), '->getFiles() does not include template file fields');
|
||||
$this->assertFalse($form->has('foo'));
|
||||
}
|
||||
|
||||
public function testGetPhpFiles()
|
||||
|
@ -869,7 +877,7 @@ class FormTest extends TestCase
|
|||
protected function createForm($form, $method = null, $currentUri = null)
|
||||
{
|
||||
$dom = new \DOMDocument();
|
||||
$dom->loadHTML('<html>'.$form.'</html>');
|
||||
@$dom->loadHTML('<html>'.$form.'</html>');
|
||||
|
||||
$xPath = new \DOMXPath($dom);
|
||||
$nodes = $xPath->query('//input | //button');
|
||||
|
|
2
vendor/symfony/dom-crawler/phpunit.xml.dist
vendored
2
vendor/symfony/dom-crawler/phpunit.xml.dist
vendored
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
bootstrap="vendor/autoload.php"
|
||||
|
|
Reference in a new issue