Changelog
phil/sitemapPas encore traduite
Cette page n’est pas encore traduite en français ; elle est montrée en anglais.
All notable changes to phil/sitemap will be documented in this file.
Updates should follow the Keep a CHANGELOG principles.
0.1.1-alpha - 2026-11-11
Security
- An address — of a page, an alternate, an image, a sitemap file — is read by
phil/urlas a browser reads it, no longer byfilter_var(FILTER_VALIDATE_URL), which took a user name for a host:https://example.com@evil.example/, a page on evil.example, passed as a page of example.com. An address with a user name or a password, or whose host is an IP address (https://127.0.0.1/,https://2130706433/) or a single name (http://intranet/), or with port 0, is now anInvalidSitemap.
Added
allowLocalhost,falseby default, onUrl,Alternate,ImageandXmlWriter::index():true, in development and tests, lets an address be onlocalhostor under.localhost; an IP address stays refused.
Changed
Url::$loc,Alternate::$hrefandImage::$lochold the address in its canonical form, which the XML writes: scheme and host in lower case, an international host in its ASCII form (accepted, where it was refused), the default port dropped, the root path written/, the segments.and..resolved, escaped or not, and the characters a part cannot hold percent-encoded,"among them. The constructors keep their arguments,allowLocalhostadded.- The package requires
phil/url0.1.3 instead ofext-filter.
0.1.0-alpha - 2026-11-11
Added
Url,ChangeFrequency,Alternate(hreflangalternates) andImage, checked as the protocol and the search engines expect;InvalidSitemap.UrlContainerandUrlProvider, the contract of the parts of a site that add pages.Sitemap: pages by section, maybe of one section only, cut into files of 50,000 pages at most. A section may not end in an underscore and digits (news_1), the names of the numbered parts of a section;Sitemap::sectionOfFile()reads the section of a file's name, andSitemap::sectionNamed()gives a key that ends so —news_2026— the sectionnews-2026.XmlWriter: theurlsetof a file, with alternates and images, and thesitemapindexof the files.- The documentation in
doc/, indexed by the README. CONTRIBUTING.md,SECURITY.mdandCODE_OF_CONDUCT.md.