Skip to content

Commit

Permalink
1.0 release 😱
Browse files Browse the repository at this point in the history
  • Loading branch information
Sibyx committed Nov 7, 2020
1 parent 389e025 commit 6b016de
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 11 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 1.0

I am not very proud of idea having a major release in such terrible state. This release is just freeze from 2017
compatible API and behaviour with some bugfixies. It looks like some people use the library and I want to perform some
radical refactoring. See you in `2.x`.

- **Fix**: Do not return extra `:` while parsing unsupported extensions if there is no namespace for child element
- **Fix**: Fixed Copyright test

## 1.0-RC5

- **Change:** Moved PHPUnit to development dependencies.
Expand Down Expand Up @@ -27,4 +36,4 @@

## 1.0-RC1

Initial release
Initial release
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Currently supported output formats:
You can easily install phpGPX library with composer. There is no stable release yet, so please use release candidates.

```
composer require sibyx/phpgpx:@RC
composer require sibyx/phpgpx:@1.0
```

## Configuration
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sibyx/phpgpx",
"type": "library",
"version": "1.0-RC5",
"version": "1.0",
"description": "A simple PHP library for GPX import/export",
"minimum-stability": "stable",
"license": "MIT",
Expand All @@ -13,7 +13,7 @@
}
],
"require": {
"php": ">=5.4",
"php": ">=5.5",
"lib-libxml": "*",
"ext-simplexml": "*",
"ext-dom": "*"
Expand Down
4 changes: 2 additions & 2 deletions example/Example.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
require_once '../vendor/autoload.php';

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

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

foreach ($file->tracks as $track) {
var_dump($track->stats->toArray());
Expand Down
3 changes: 2 additions & 1 deletion src/phpGPX/Parsers/ExtensionParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public static function parse($nodes)
break;
default:
foreach ($nodes->children($namespace) as $child_key => $value) {
$extensions->unsupported["$key:$child_key"] = (string) $value;

$extensions->unsupported[$key ? "$key:$child_key" : "$child_key"] = (string) $value;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/phpGPX/phpGPX.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class phpGPX
const XML_FORMAT = 'xml';

const PACKAGE_NAME = 'phpGPX';
const VERSION = '1.0RC5';
const VERSION = '1.0';

/**
* Create Stats object for each track, segment and route
Expand Down
1 change: 0 additions & 1 deletion tests/CreateWaypointTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
declare(strict_types=1);

use PHPUnit\Framework\TestCase;

Expand Down
5 changes: 3 additions & 2 deletions tests/UnitTests/phpGPX/Parsers/CopyrightParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
* @author Jakub Dubec <[email protected]>
*/

namespace UnitTests\phpGPX\Parsers;
namespace phpGPX\Tests\UnitTests\phpGPX\Parsers;

use phpGPX\Models\Copyright;
use phpGPX\Parsers\CopyrightParser;
use UnitTests\phpGPX\Parsers\AbstractParserTest;

class CopyrightParserTest extends AbstractParserTest
{
Expand All @@ -24,7 +25,7 @@ public static function createTestInstance()

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

return $copyright;
}
Expand Down

0 comments on commit 6b016de

Please sign in to comment.