Releases: gpslab/sitemap
Release 2.0.1
Changelog (since 2.0.0...2.0.1
)
- bug #110 Fix invalid XML namespace (@spideyfusion)
Release 2.0.0
Changelog (since 1.1.4...2.0.0
)
- feature #109 Add example result of index
sitemap.xml
(@peter-gribanov) - feature #106 Optimize calculate change frequency by last modify (@peter-gribanov)
- bug #107 Correct declare Github Action events (@peter-gribanov)
- bug #108 Correct calculate path nesting level (@peter-gribanov)
- feature #105 Optimize calculate number of slashes in
Priority::createByLocation()
(@peter-gribanov) - feature #104 Build from GitHub CI (@peter-gribanov)
- bug #99 Fix tests (@peter-gribanov)
- bug #100 Fix errors in docs (@peter-gribanov)
- feature #98 Scope tracking (@peter-gribanov)
- feature #95 Rewrite construct of
Url
class and removeSmartUrl
class (@peter-gribanov) - feature #93 Optimize check state in
Writers
(@peter-gribanov) - bug #94 Fix unit tests (@peter-gribanov)
- bug #97 Ignore fail of execution coveralls command (@peter-gribanov)
- feature #92 Add description for group build in a
README
file (@peter-gribanov) - feature #91 Validate location length (@peter-gribanov)
- feature #85 Use Value Objects (@peter-gribanov)
- bug #84 Test escaping characters in location (@peter-gribanov)
- bug #82 Language locations should be unique in
Url::createLanguageUrls()
(@peter-gribanov) - bug #81 Fix typo of usage
Url::createLanguageUrls()
inREADME
(@peter-gribanov) - feature #78 Add support language URLs (@peter-gribanov)
- feature #80 Add info about generated XML in
README
file (@peter-gribanov) - feature #79 Add supported features section in
README
(@peter-gribanov) - bug #77 Fix error in unit test on Windows (@peter-gribanov)
- bug #76
XMLWriter
on Windows (@peter-gribanov) - feature #75 Mark
Renders
andStreams
asfinal
classes (@peter-gribanov) - bug #74 Suggest use Zlib (@peter-gribanov)
- feature #72 Test project with PHPStan (@peter-gribanov)
- feature #73 Change Travis CI config (@peter-gribanov)
- bug #71 Remove SensioLabs Insight build icon (@peter-gribanov)
- feature #70 Remove
@copyright
from header comment (@peter-gribanov) - feature #65 Add Deflate compression writers (@peter-gribanov)
- bug #64 Test gzip compression levels (@peter-gribanov)
- bug #63 Fix typo (@peter-gribanov)
- feature #62 Writers (@peter-gribanov)
- feature #61 Сhange
$priority
fromstring
toint
(@peter-gribanov) - feature #60 Move out a location validation code (@peter-gribanov)
- feature #59 Rename method
Url::getChangeFreq()
->Url::getChangeFrequency()
(@peter-gribanov) - feature #58 Update
UPGRADE.md
(@peter-gribanov) - feature #57 Create Sitemap ValueObject (@peter-gribanov)
- feature #56 The date of last URL modify should not look to future (@peter-gribanov)
- feature #55 Validate URL location (@peter-gribanov)
- feature #54 Validate change frequency (@peter-gribanov)
- feature #53 Validate URL priority (@peter-gribanov)
- feature #52 The
lastmod
,changefreq
andpriority
fields is not required (@peter-gribanov) - bug #51 Add web path to
PlainTextSitemapRender
andXMLWriterSitemapRender
(@peter-gribanov) - feature #50 Build with PHP
7.4snapshot
and PHPnightly
(@peter-gribanov) - feature #48 Allow add validating schema for W3 (@peter-gribanov)
- bug #49 Use real file modified time so as not to break tests (@peter-gribanov)
- feature #45 Test empty
MultiStream
(@peter-gribanov) - feature #44 Refactor URL class (@peter-gribanov)
- bug #43 Mark
STATE_*
constants inStreamState
class as private (@peter-gribanov) - bug #42 No throw exception in
StreamState::__destruct()
(@peter-gribanov) - feature #41 Add
XMLWriter
for rendersitemap.xml
(@peter-gribanov) - bug #40 Calculate overflow bytes in
RenderGzipFileStream
(@peter-gribanov) - bug #38 Render end string after render first url (@peter-gribanov)
- bug #36 Fix test (@peter-gribanov)
- feature #34 Show time in lastmod (@peter-gribanov)
- bug #29 Сorrect path to php-coveralls
.travis.yml
(@peter-gribanov) - feature #28 Free memory in sitemap index (@peter-gribanov)
- bug #27 Correct format text in
UPGRADE.md
file (@peter-gribanov) - feature #26 Add remind for free memory for 2.0 (@peter-gribanov)
- bug #16 Write
sitemap.xml
to temporary file (@peter-gribanov) - feature #13 2.0 (@peter-gribanov)
Upgrade from 1.1 to 2.0
-
The
SilentSitemapBuilder
was removed. -
The
SymfonySitemapBuilder
was removed. -
The
CompressFileStream
was removed. -
The
RenderBzip2FileStream
was removed. -
The
Stream
not extendsCountable
interface. -
The
UrlBuilder
not extendsCountable
interface and not requiregetName
method. -
The
UrlBuilderCollection
changed toMultiUrlBuilder
. -
The
CompressionLevelException
changed to final. -
The
FileAccessException
changed to final. -
The
LinksOverflowException
changed to final. -
The
OverflowException
changed to abstract. -
The
SizeOverflowException
changed to final. -
The
StreamStateException
changed to final. -
The
$compression_level
inRenderGzipFileStream
can be only integer. -
Move
CHANGE_FREQ_*
constants fromURL
class to newChangeFrequency
class. -
Mark
STATE_*
constants inStreamState
class as private. -
The
Url::getLoc()
was renamed toUrl::getLocation()
method. -
The
Url::getLastMod()
was renamed toUrl::getLastModify()
method. -
The
Url::getChangeFreq()
was renamed toUrl::getChangeFrequency()
method. -
The arguments of
PlainTextSitemapRender::sitemap()
was changed.Before:
$render = PlainTextSitemapRender::sitemap(string $path, ?\DateTimeInterface $last_modify = null)
After:
$render = PlainTextSitemapRender::sitemap(Sitemap $sitemap)
-
The
$host
argument inRenderIndexFileStream::__construct()
was removed. -
The
$web_path
argument inPlainTextSitemapIndexRender::__construct()
was removed.Before:
$web_path = 'https://example.com/'; $index_render = new PlainTextSitemapIndexRender(); $index_stream = new RenderFileStream($index_render, $stream, $web_path, $filename_index);
After:
$index_render = new PlainTextSitemapIndexRender(); $index_stream = new RenderFileStream($index_render, $stream, $filename_index);
-
The
CallbackStream
was removed. -
The
RenderGzipFileStream
was removed. UseWritingStream
instead.Before:
$stream = new RenderGzipFileStream($render, $filename, $compression_level);
After:
$stream = new WritingStream($render, new GzipTempFileWriter($compression_level), $filename);
-
The
RenderFileStream
was removed. UseWritingStream
instead.Before:
$stream = new RenderFileStream($render, $filename);
After:
$stream = new WritingStream($render, new TempFileWriter(), $filename);
-
The
FileStream
was removed. -
The
RenderIndexFileStream
was removed. UseWritingSplitIndexStream
instead.Before:
$web_path = 'https://example.com'; $filename_index = __DIR__.'/sitemap.xml'; $filename_part = sys_get_temp_dir().'/sitemap.xml'; $render = new PlainTextSitemapRender(); $stream = new RenderFileStream($render, $filename_part) $index_render = new PlainTextSitemapIndexRender(); $index_stream = new RenderIndexFileStream($index_render, $stream, $web_path, $filename_index);
After:
$index_filename = __DIR__.'/sitemap.xml'; $part_filename = __DIR__.'/sitemap%d.xml'; $part_web_path = 'https://example.com/sitemap%d.xml'; $index_render = new PlainTextSitemapIndexRender(); $index_writer = new TempFileWriter(); $part_render = new PlainTextSitemapRender(); $part_writer = new TempFileWriter(); $stream = new WritingSplitIndexStream( $index_render, $part_render, $index_writer, $part_writer, $index_filename, $part_filename, $part_web_path );
-
The
CompressionLevelException
was removed. -
The
FileAccessException
was removed. -
The
Stream::LINKS_LIMIT
constants was removed. UseLimiter::LINKS_LIMIT
instead. -
The
Stream::BYTE_LIMIT
constants was removed. UseLimiter::BYTE_LIMIT
instead. -
The return value of
Url::getLocation()
was changed to aLocation
object. -
The return value of
Url::getChangeFrequency()
was changed to aChangeFrequency
object. -
The
Url
changed to final. -
The
Url::__construct
require objects as arguments.Before:
$url = new Url('/contacts.html', new \DateTimeImmutable('-1 month'), ChangeFrequency::MONTHLY, '0.7');
After:
$url = Url::create('https://example.com/contacts.html', new \DateTimeImmutable('-1 month'), ChangeFrequency::MONTHLY, '0.7');
Or
$url = new Url( new Location('https://example.com/contacts.html'), new \DateTimeImmutable('-1 month'), ChangeFrequency::monthly(), Priority::create(7) );
-
The
SmartUrl
was removed.Before:
$url = new SmartUrl('/article/123');
After:
$url = Url::createSmart('https://example.com/article/123');
-
Use absolute URL in
Url
class.Before:
$url = Url::create('/contacts.html');
After:
$url = Url::create('https://example.com/contacts.html');
-
Allow use
int
andfloat
as$priority
inURL
class.Before:
$url = Url::create('/contacts.html', new \DateTimeImmutable('-1 month'), ChangeFrequency::MONTHLY, '0.7');
After:
$url = Url::create('https://example.com/contacts.html', new \DateTimeImmutable('-1 month'), ChangeFrequency::monthly(), 7); $url = Url::create('https://example.com/contacts.html', new \DateTimeImmutable('-1 month'), ChangeFrequency::monthly(), .7);
Release 1.1.4
Changelog (since 1.1.3...1.1.4
)
- feature #101 Build from GitHub CI (@peter-gribanov)
- bug #103 Fix overflow size tests (@peter-gribanov)
- feature #90 Validate location length (@peter-gribanov)
- feature #89 Test project by PHPStan (@peter-gribanov)
Release 1.1.3
Changelog (since 1.1.2...1.1.3
)
- feature #69 Test enhancement (@peter279k )
- bug #87 Remove dependency
scrutinizer/ocular
andsatooshi/php-coveralls
(@peter-gribanov) - bug #86 Update Travis CI config (@peter-gribanov)
- bug #88 SensioLabs Insight not used any more (@peter-gribanov)
Release 1.1.2
Changelog (since 1.1.1...1.1.2
)
- bug #67 Correct return type in
UrlBuilder::getIterator()
(@peter-gribanov) - bug #39 Detect Gzip and Bzip2 bytes overflow (@peter-gribanov)
- feature #33 Show time in
lastmod
(@peter-gribanov) - bug #30 Correct path to
php-coveralls
in.travis.yml
(@peter-gribanov)
Release 1.1.1
Changelog (since 1.1.0...1.1.1
)
- feature #25 Add remind for free memory (@peter-gribanov)
- bug #24 Correct build project in Travis CI (@peter-gribanov)
- bug #23 Use host in RenderIndexFileStream (@peter-gribanov)
Release 1.1.0
Changelog (since v1.0.4...v1.1.0
)
- bug #19 Not removed old sitemap parts (@peter-gribanov)
- bug #18 Lost link on overfill a sitemap part (@peter-gribanov)
- bug #17 Write
sitemap.xml
to temporary file (@peter-gribanov)
Release 1.0.4
Changelog (since v1.0.3...v1.0.4
)
- bug. Correct access to
StreamState::$state
field (@peter-gribanov) - feature #11 Add support Symfony 4 (@peter-gribanov)
Release 1.0.3
Changelog (since v1.0.2...v1.0.3
)
- bug #6 Reset stream counters on close it (@peter-gribanov)
- bug #5 Fix type in
LoggerStream
(@peter-gribanov)
Release 1.0.2
Changelog (since v1.0.1...v1.0.2
)
- Fix typo in
SymfonySitemapBuilder
(@peter-gribanov) - Add example build image (@peter-gribanov)