Skip to content

Commit

Permalink
Merge pull request #9 from dachcom-digital/pimcore_x
Browse files Browse the repository at this point in the history
remove deprecations
  • Loading branch information
solverat committed Oct 14, 2021
2 parents 9858388 + 5dfd694 commit ec94f37
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This bundle requires the `spatie/schema-org` package.
[![Software License](https://img.shields.io/badge/license-GPLv3-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Latest Release](https://img.shields.io/packagist/v/dachcom-digital/schema.svg?style=flat-square)](https://packagist.org/packages/dachcom-digital/schema)
[![Tests](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-schema/Codeception/master?style=flat-square&logo=github&label=codeception)](https://github.com/dachcom-digital/pimcore-schema/actions?query=workflow%3ACodeception+branch%3Amaster)
[![PhpStan](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-schema/PHP%20Stan/master?style=flat-square&logo=github&label=phpstan%20level%202)](https://github.com/dachcom-digital/pimcore-schema/actions?query=workflow%3A"PHP+Stan"+branch%3Amaster)
[![PhpStan](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-schema/PHP%20Stan/master?style=flat-square&logo=github&label=phpstan%20level%204)](https://github.com/dachcom-digital/pimcore-schema/actions?query=workflow%3A"PHP+Stan"+branch%3Amaster)

### Release Plan

Expand Down
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
"bundles": [
"SchemaBundle\\SchemaBundle"
]
},
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"require": {
Expand Down
5 changes: 1 addition & 4 deletions src/SchemaBundle/Processor/SchemaRequestProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ public function process(Request $request): void
*/
protected function appendHeadMeta(Graph $graph, array $schemaBlocks): void
{
// spatie/schema-org changed getProperties to getNodes after 2.14
$nodes = method_exists($graph, 'getProperties')
? $graph->getProperties()
: $graph->getNodes();
$nodes = $graph->getNodes();

if (count($nodes) > 0) {
$this->headMeta->addRaw($graph->toScript());
Expand Down
5 changes: 1 addition & 4 deletions src/SchemaBundle/Seo/Middleware/SchemaGraphAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ public function getTaskArguments(): array

public function onFinish(SeoMetaDataInterface $seoMetadata): void
{
// spatie/schema-org changed getProperties to getNodes after 2.14
$nodes = method_exists($this->graph, 'getProperties')
? $this->graph->getProperties()
: $this->graph->getNodes();
$nodes = $this->graph->getNodes();

if (count($nodes) > 0) {
$seoMetadata->addSchema($this->graph->toArray());
Expand Down

0 comments on commit ec94f37

Please sign in to comment.