Skip to content

Commit 63d7d1c

Browse files
author
Fabian Pechstein
committed
update to work with pimcore 6
1 parent 3cf6673 commit 63d7d1c

6 files changed

Lines changed: 18 additions & 10 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
],
3030
"require": {
3131
"php": ">=7.0",
32-
"pimcore/pimcore": ">=5.0"
32+
"pimcore/pimcore": ">=6.0"
3333
},
3434
"autoload": {
3535
"psr-4": {

src/Xliff2Bundle/DependencyInjection/Compiler/Xliff20CompilerPass.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ public function process(ContainerBuilder $container)
2929
$definition = $container->getDefinition('Pimcore\Translation\ExportDataExtractorService\DataExtractor\DocumentDataExtractor');
3030
$definition->setClass('Xliff2Bundle\Translation\ExportDataExtractorService\DataExtractor\NotedDocumentDataExtractor');
3131

32-
3332
$definition = $container->getDefinition('Pimcore\Translation\ExportDataExtractorService\ExportDataExtractorServiceInterface');
3433
$definition->setClass('Xliff2Bundle\Translation\ExportDataExtractorService\NotedExportDataExtractorServiceInterface');
3534

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
services:
2+
# default configuration for services in *this* file
3+
_defaults:
4+
# automatically injects dependencies in your services
5+
autowire: true
6+
# automatically registers your services as commands, event subscribers, etc.
7+
autoconfigure: true
8+
# this means you cannot fetch services directly from the container via $container->get()
9+
# if you need to do this, you can override this setting on individual services
10+
public: false

src/Xliff2Bundle/Translation/AttributeSet/NotedAttributeSet.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,12 @@ public function isEmpty(): bool
119119
* @param string $content
120120
* @param bool $isReadonly
121121
*
122+
* @param array $targetContent
122123
* @return AttributeSet
123124
*/
124-
public function addAttribute(string $type, string $name, string $content, bool $isReadonly = false): AttributeSet
125+
public function addAttribute(string $type, string $name, string $content, bool $isReadonly = false, array $targetContent = []): AttributeSet
125126
{
126-
$this->set->addAttribute($type, $name, $content, $isReadonly);
127+
$this->set->addAttribute($type, $name, $content, $isReadonly, $targetContent);
127128

128129
return $this;
129130
}

src/Xliff2Bundle/Translation/Escaper/Xliff20Escaper.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
class Xliff20Escaper
1616
{
17-
18-
1917
const SELFCLOSING_TAGS = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
2018
const CONTENT = "content";
2119
const ORIGINAL_DATA = "originalData";
@@ -167,4 +165,4 @@ public function setUpOriginalData($originalData)
167165
}
168166
}
169167
}
170-
}
168+
}

src/Xliff2Bundle/Translation/ExportService/Exporter/Xliff20Exporter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ class Xliff20Exporter implements ExporterInterface
3030
*/
3131
private $xliff20Escaper;
3232

33-
public function __construct(Xliff20Escaper $xliff20Escaper)
33+
public function __construct()
3434
{
35-
$this->xliff20Escaper = $xliff20Escaper;
35+
$this->xliff20Escaper = new Xliff20Escaper();
3636
}
3737

3838

@@ -228,4 +228,4 @@ private function appendNotes(\SimpleXMLElement $unit, array $notes)
228228
}
229229

230230
}
231-
}
231+
}

0 commit comments

Comments
 (0)