Skip to content

Commit

Permalink
Dependency updates. (#51)
Browse files Browse the repository at this point in the history
* Bump the version of phpSpec to 4.0

* Remove license from composer and license.

* Remove support for PHP 5.6

* More https fixes.
  • Loading branch information
ThePixelDeveloper committed Sep 18, 2017
1 parent 4fafbbd commit 7dd4951
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -7,7 +7,6 @@ cache:
language: php

php:
- 5.6
- 7.0
- 7.1

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright (C) 2013 Mathew Davies <thepixeldeveloper@googlemail.com>
Copyright (C) 2017 Mathew Davies

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Expand Up @@ -7,7 +7,6 @@
"authors": [
{
"name": "Mathew Davies",
"email": "thepixeldeveloper@googlemail.com",
"homepage": "http://mathew-davies.co.uk",
"role": "Developer"
}
Expand All @@ -16,7 +15,7 @@
"php": ">=5.6.0"
},
"require-dev": {
"phpspec/phpspec": "^2.4"
"phpspec/phpspec": "^4.0"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 4 additions & 4 deletions spec/OutputSpec.php
Expand Up @@ -22,7 +22,7 @@ function it_should_format_a_sitemapindex_with_n_sitemaps()
{
$xml = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemapindex xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.example.com/sitemap1.xml.gz</loc>
</sitemap>
Expand All @@ -43,7 +43,7 @@ function it_should_generate_a_sitemap_of_images()
{
$xml = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="https://www.google.com/schemas/sitemap-image/1.1">
<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="https://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>https://www.example.com/1</loc>
<image:image>
Expand Down Expand Up @@ -101,7 +101,7 @@ function it_should_generate_a_sitemap_with_links()
{
$xml = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://www.example.com/english/</loc>
<xhtml:link rel="alternate" hreflang="de" href="https://www.example.com/deutsch/"/>
Expand Down Expand Up @@ -149,7 +149,7 @@ function it_should_write_processing_instructions()
$xml = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/path/to/xslt/main-sitemap.xsl"?>
<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<urlset xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://www.example.com/english/</loc>
<xhtml:link rel="alternate" hreflang="de" href="https://www.example.com/deutsch/"/>
Expand Down
2 changes: 1 addition & 1 deletion spec/UrlsetSpec.php
Expand Up @@ -32,7 +32,7 @@ function it_should_only_append_attributes_once_for_each_subelement_type(XMLWrite
{
$xmlWriter->startElement('urlset')->shouldBeCalled();
$xmlWriter->writeAttribute('xmlns:xsi', 'https://www.w3.org/2001/XMLSchema-instance')->shouldBeCalled();
$xmlWriter->writeAttribute('xsi:schemaLocation', 'http://www.sitemaps.org/schemas/sitemap/0.9 ' . 'http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd')->shouldBeCalled();
$xmlWriter->writeAttribute('xsi:schemaLocation', 'http://www.sitemaps.org/schemas/sitemap/0.9 ' . 'https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd')->shouldBeCalled();
$xmlWriter->writeAttribute('xmlns', 'http://www.sitemaps.org/schemas/sitemap/0.9')->shouldBeCalled();

$url->getSubelementsThatAppend()->willReturn([$image, $video]);
Expand Down
2 changes: 1 addition & 1 deletion src/SitemapIndex.php
Expand Up @@ -43,7 +43,7 @@ public function generateXML(XMLWriter $XMLWriter)
$XMLWriter->writeAttribute(
'xsi:schemaLocation',
'http://www.sitemaps.org/schemas/sitemap/0.9 ' .
'http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd'
'https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd'
);

$XMLWriter->writeAttribute('xmlns', 'http://www.sitemaps.org/schemas/sitemap/0.9');
Expand Down
2 changes: 1 addition & 1 deletion src/Urlset.php
Expand Up @@ -50,7 +50,7 @@ public function generateXML(XMLWriter $XMLWriter)

$XMLWriter->writeAttribute('xsi:schemaLocation',
'http://www.sitemaps.org/schemas/sitemap/0.9 ' .
'http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd');
'https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd');

$XMLWriter->writeAttribute('xmlns', 'http://www.sitemaps.org/schemas/sitemap/0.9');

Expand Down

0 comments on commit 7dd4951

Please sign in to comment.