Issue #3176468 by longwave, jungle: Remove support for EasyRDF 0.9
parent
e2d3a3ee24
commit
6be0f7b425
|
@ -37,7 +37,7 @@
|
|||
"symfony/lock": "^5.4",
|
||||
"symfony/browser-kit": "^5.4",
|
||||
"symfony/dom-crawler": "^5.4",
|
||||
"easyrdf/easyrdf": "^0.9 || ^1.0"
|
||||
"easyrdf/easyrdf": "^1.0"
|
||||
},
|
||||
"replace": {
|
||||
"symfony/polyfill-php72": "*",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "210789b4f85a82f083006db5aeafc33d",
|
||||
"content-hash": "37d8d1300ab9c7bcc69ee336d9aa26d7",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asm89/stack-cors",
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"behat/mink-selenium2-driver": "^1.4",
|
||||
"composer/composer": "^2.0.2",
|
||||
"drupal/coder": "^8.3.10",
|
||||
"easyrdf/easyrdf": "^0.9 || ^1.0",
|
||||
"easyrdf/easyrdf": "^1.0",
|
||||
"friends-of-behat/mink-browserkit-driver": "^1.4",
|
||||
"instaclick/php-webdriver": "^1.4.1",
|
||||
"justinrainbow/json-schema": "^5.2",
|
||||
|
|
|
@ -37,8 +37,8 @@ trait RdfParsingTrait {
|
|||
* @throws \EasyRdf\Exception
|
||||
*/
|
||||
protected function hasRdfProperty($html, $base_uri, $resource, $property, array $value) {
|
||||
$parser = $this->getInstanceParser();
|
||||
$graph = $this->getInstanceGraph();
|
||||
$parser = new Rdfa();
|
||||
$graph = new Graph();
|
||||
$parser->parse($graph, $html, 'rdfa', $base_uri);
|
||||
|
||||
return $graph->hasProperty($resource, $property, $value);
|
||||
|
@ -72,8 +72,8 @@ trait RdfParsingTrait {
|
|||
* @throws \EasyRdf\Exception
|
||||
*/
|
||||
protected function hasRdfChildProperty($html, $base_uri, $resource, $parent_property, string $child_property, array $value) {
|
||||
$parser = $this->getInstanceParser();
|
||||
$graph = $this->getInstanceGraph();
|
||||
$parser = new Rdfa();
|
||||
$graph = new Graph();
|
||||
$parser->parse($graph, $html, 'rdfa', $base_uri);
|
||||
$node = $graph->get($resource, $parent_property);
|
||||
return $graph->hasProperty($node, $child_property, $value);
|
||||
|
@ -95,8 +95,8 @@ trait RdfParsingTrait {
|
|||
* @throws \EasyRdf\Exception
|
||||
*/
|
||||
protected function getElementByRdfTypeCount(Url $url, $base_uri, $type) {
|
||||
$parser = $this->getInstanceParser();
|
||||
$graph = $this->getInstanceGraph();
|
||||
$parser = new Rdfa();
|
||||
$graph = new Graph();
|
||||
$parser->parse($graph, $this->drupalGet($url), 'rdfa', $base_uri);
|
||||
return count($graph->allOfType($type));
|
||||
}
|
||||
|
@ -117,8 +117,8 @@ trait RdfParsingTrait {
|
|||
* @throws \EasyRdf\Exception
|
||||
*/
|
||||
protected function getElementRdfType(Url $url, $base_uri, $resource_uri) {
|
||||
$parser = $this->getInstanceParser();
|
||||
$graph = $this->getInstanceGraph();
|
||||
$parser = new Rdfa();
|
||||
$graph = new Graph();
|
||||
$parser->parse($graph, $this->drupalGet($url), 'rdfa', $base_uri);
|
||||
return $graph->type($resource_uri);
|
||||
}
|
||||
|
@ -141,42 +141,10 @@ trait RdfParsingTrait {
|
|||
* @throws \EasyRdf\Exception
|
||||
*/
|
||||
protected function rdfElementIsBlankNode($html, $base_uri, $resource_uri, $property) {
|
||||
$parser = $this->getInstanceParser();
|
||||
$graph = $this->getInstanceGraph();
|
||||
$parser = new Rdfa();
|
||||
$graph = new Graph();
|
||||
$parser->parse($graph, $html, 'rdfa', $base_uri);
|
||||
return $graph->get($resource_uri, $property)->isBnode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a new instance of EasyRdf\Parser\Rdfa or EasyRdf_Parser_Rdfa.
|
||||
*
|
||||
* @return \EasyRdf\Parser\Rdfa|\EasyRdf_Parser_Rdfa
|
||||
* The instance.
|
||||
*
|
||||
* @todo Clean this up in drupal:10.0.0.
|
||||
* @see https://www.drupal.org/node/3176468
|
||||
*/
|
||||
private function getInstanceParser() {
|
||||
if (class_exists('EasyRdf\Parser\Rdfa')) {
|
||||
return new Rdfa();
|
||||
}
|
||||
return new \EasyRdf_Parser_Rdfa();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a new instance of EasyRdf\Graph or EasyRdf_Graph.
|
||||
*
|
||||
* @return \EasyRdf\Graph|\EasyRdf_Graph
|
||||
* The instance.
|
||||
*
|
||||
* @todo Clean this up in drupal:10.0.0.
|
||||
* @see https://www.drupal.org/node/3176468
|
||||
*/
|
||||
private function getInstanceGraph() {
|
||||
if (class_exists('EasyRdf\Graph')) {
|
||||
return new Graph();
|
||||
}
|
||||
return new \EasyRdf_Graph();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -605,96 +605,6 @@ parameters:
|
|||
count: 1
|
||||
path: modules/quickedit/tests/src/FunctionalJavascript/QuickEditJavascriptTestBase.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Graph not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/CommentAttributesTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Parser_Rdfa not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/CommentAttributesTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Graph not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Parser_Rdfa not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/EntityReferenceFieldAttributesTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Graph not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/FileFieldAttributesTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Parser_Rdfa not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/FileFieldAttributesTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Graph not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Parser_Rdfa not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Graph not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/NodeAttributesTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Parser_Rdfa not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/NodeAttributesTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Graph not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/StandardProfileTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Parser_Rdfa not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/StandardProfileTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Graph not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Parser_Rdfa not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/TaxonomyAttributesTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Graph not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/UserAttributesTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Parser_Rdfa not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Functional/UserAttributesTest.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Graph not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php
|
||||
|
||||
-
|
||||
message: "#^Instantiated class EasyRdf_Parser_Rdfa not found\\.$#"
|
||||
count: 1
|
||||
path: modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php
|
||||
|
||||
-
|
||||
message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:10\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
|
||||
count: 1
|
||||
|
|
Loading…
Reference in New Issue