Skip to content

Commit

Permalink
Namespaces are http
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuurlijk committed Dec 21, 2018
1 parent 9ce71f6 commit 9793292
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Convert old Fluid namespaces {brace style} to html tag with attributes.
```
Will become:
```html
<html xmlns:f="https://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
data-namespace-typo3-fluid="true">
<section>
</section>
Expand Down
2 changes: 1 addition & 1 deletion bin/typo3migrate
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../../../../autoload.p

use MichielRoos\TYPO3Migrate\Console\Application;

$app = new Application('TYPO3Migrate', '1.3.0');
$app = new Application('TYPO3Migrate', '1.3.1');
$app->add(new \MichielRoos\TYPO3Migrate\Command\ConvertFluidNamespacesCommand());
$app->add(new \MichielRoos\TYPO3Migrate\Command\Xml2XlfCommand());
$app->run();
4 changes: 2 additions & 2 deletions src/TYPO3Migrate/Command/ConvertFluidNamespacesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ protected function convertFile($target, InputInterface $input, OutputInterface $
$output->writeln(sprintf('- <comment>%s</comment>', $namespace));
}

$htmlTag = '<html xmlns:f="https://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"' . PHP_EOL;
$htmlTag = '<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"' . PHP_EOL;
foreach ($namespaces as $namespace) {
$namespace = trim($namespace, '{}');
$namespace = preg_replace('/^namespace\s+([^ ]*)/', '$1', $namespace);
list($key, $class) = explode('=', $namespace);
$htmlTag .= sprintf("\t xmlns:%s=\"https://typo3.org/ns/%s\"" . PHP_EOL, $key, str_replace('\\', '/', $class));
$htmlTag .= sprintf("\t xmlns:%s=\"http://typo3.org/ns/%s\"" . PHP_EOL, $key, str_replace('\\', '/', $class));
}
$htmlTag .= ' data-namespace-typo3-fluid="true">' . PHP_EOL;

Expand Down

0 comments on commit 9793292

Please sign in to comment.