Skip to content

Commit 6b016de

Browse files
committed
1.0 release 😱
1 parent 389e025 commit 6b016de

File tree

8 files changed

+21
-11
lines changed

8 files changed

+21
-11
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 1.0
4+
5+
I am not very proud of idea having a major release in such terrible state. This release is just freeze from 2017
6+
compatible API and behaviour with some bugfixies. It looks like some people use the library and I want to perform some
7+
radical refactoring. See you in `2.x`.
8+
9+
- **Fix**: Do not return extra `:` while parsing unsupported extensions if there is no namespace for child element
10+
- **Fix**: Fixed Copyright test
11+
312
## 1.0-RC5
413

514
- **Change:** Moved PHPUnit to development dependencies.
@@ -27,4 +36,4 @@
2736

2837
## 1.0-RC1
2938

30-
Initial release
39+
Initial release

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Currently supported output formats:
196196
You can easily install phpGPX library with composer. There is no stable release yet, so please use release candidates.
197197

198198
```
199-
composer require sibyx/phpgpx:@RC
199+
composer require sibyx/phpgpx:@1.0
200200
```
201201

202202
## Configuration

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sibyx/phpgpx",
33
"type": "library",
4-
"version": "1.0-RC5",
4+
"version": "1.0",
55
"description": "A simple PHP library for GPX import/export",
66
"minimum-stability": "stable",
77
"license": "MIT",
@@ -13,7 +13,7 @@
1313
}
1414
],
1515
"require": {
16-
"php": ">=5.4",
16+
"php": ">=5.5",
1717
"lib-libxml": "*",
1818
"ext-simplexml": "*",
1919
"ext-dom": "*"

example/Example.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
require_once '../vendor/autoload.php';
1010

1111
$gpx = new phpGPX();
12-
$file = $gpx->load('Evening_Ride.gpx');
12+
$file = $gpx->load('endomondo.gpx');
1313

1414
phpGPX::$PRETTY_PRINT = true;
15-
$file->save('output_Evening_Ride.gpx', phpGPX::XML_FORMAT);
15+
//$file->save('output_Evening_Ride.gpx', phpGPX::XML_FORMAT);
1616

1717
foreach ($file->tracks as $track) {
1818
var_dump($track->stats->toArray());

src/phpGPX/Parsers/ExtensionParser.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public static function parse($nodes)
4141
break;
4242
default:
4343
foreach ($nodes->children($namespace) as $child_key => $value) {
44-
$extensions->unsupported["$key:$child_key"] = (string) $value;
44+
45+
$extensions->unsupported[$key ? "$key:$child_key" : "$child_key"] = (string) $value;
4546
}
4647
}
4748
}

src/phpGPX/phpGPX.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class phpGPX
2222
const XML_FORMAT = 'xml';
2323

2424
const PACKAGE_NAME = 'phpGPX';
25-
const VERSION = '1.0RC5';
25+
const VERSION = '1.0';
2626

2727
/**
2828
* Create Stats object for each track, segment and route

tests/CreateWaypointTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
declare(strict_types=1);
32

43
use PHPUnit\Framework\TestCase;
54

tests/UnitTests/phpGPX/Parsers/CopyrightParserTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
* @author Jakub Dubec <[email protected]>
44
*/
55

6-
namespace UnitTests\phpGPX\Parsers;
6+
namespace phpGPX\Tests\UnitTests\phpGPX\Parsers;
77

88
use phpGPX\Models\Copyright;
99
use phpGPX\Parsers\CopyrightParser;
10+
use UnitTests\phpGPX\Parsers\AbstractParserTest;
1011

1112
class CopyrightParserTest extends AbstractParserTest
1213
{
@@ -24,7 +25,7 @@ public static function createTestInstance()
2425

2526
$copyright->author = "Jakub Dubec";
2627
$copyright->license = "https://github.com/Sibyx/phpGPX/blob/master/LICENSE";
27-
$copyright->year = 2017;
28+
$copyright->year = '2017';
2829

2930
return $copyright;
3031
}

0 commit comments

Comments
 (0)