Skip to content

Commit f2ee36f

Browse files
committed
Remove the sitemap processing_time_ms attribute as it adds no value
This is not a standard attribute, it's just a "cool thing" that adds no real value, as this file is not even intended for humans to read.
1 parent 79a7862 commit f2ee36f

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ This serves two purposes:
2727
- Minor: Data collection files are now validated for syntax errors during discovery in https://github.com/hydephp/develop/pull/1732
2828
- Minor: Methods in the `Includes` facade now return `HtmlString` objects instead of `string` in https://github.com/hydephp/develop/pull/1738. For more information, see below.
2929
- Minor: `Includes::path()` and `Includes::get()` methods now normalizes paths to be basenames to match the behaviour of the other include methods in https://github.com/hydephp/develop/pull/1738. This means that nested directories are no longer supported, as you should use a data collection for that.
30+
- Minor: The `processing_time_ms` attribute in the `sitemap.xml` file has now been removed in https://github.com/hydephp/develop/pull/1744
3031
- Improved the sitemap data generation to be even smarter in https://github.com/hydephp/develop/pull/1744
3132
- The `hasFeature` method on the Hyde facade and HydeKernel now only accepts a Feature enum value instead of a string for its parameter.
3233
- Changed how the documentation search is generated, to be an `InMemoryPage` instead of a post-build task.

packages/framework/src/Framework/Features/XmlGenerators/SitemapGenerator.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ public function generate(): static
4242

4343
public function getXml(): string
4444
{
45-
$this->xmlElement->addAttribute('processing_time_ms', $this->getFormattedProcessingTime());
46-
4745
return parent::getXml();
4846
}
4947

@@ -121,10 +119,4 @@ protected function resolveRouteLink(Route $route): string
121119
return Hyde::url($route->getOutputPath());
122120
}
123121
}
124-
125-
/** @return numeric-string */
126-
protected function getFormattedProcessingTime(): string
127-
{
128-
return (string) $this->getExecutionTimeInMs();
129-
}
130122
}

packages/framework/tests/Feature/SitemapFeatureTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function testTheSitemapFeature()
4545
protected function expected(): string
4646
{
4747
return <<<'XML'
48-
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9" generator="HydePHP {{ dynamic }}" processing_time_ms="{{ dynamic }}">
48+
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9" generator="HydePHP {{ dynamic }}">
4949
<url>
5050
<loc>https://example.com/contact.html</loc>
5151
<lastmod>{{ dynamic }}</lastmod>

0 commit comments

Comments
 (0)