Skip to content

Commit

Permalink
Merge branch 'release/0.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
WengerK committed Jul 12, 2023
2 parents 0ebc483 + 508c5ac commit 7733d8c
Show file tree
Hide file tree
Showing 22 changed files with 251 additions and 5,041 deletions.
3 changes: 3 additions & 0 deletions .chanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"release-prefix": ""
}
2 changes: 1 addition & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
service_name: travis-ci
service_name: github-actions

# for php-coveralls
coverage_clover: build/logs/clover.xml
42 changes: 20 additions & 22 deletions .github/workflows/code-styles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '8.0'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: php-cs-fixer, cs2pr
- uses: actions/checkout@master
- uses: actions/checkout@v2
- run: composer install --prefer-dist
- run: ./vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | cs2pr

Expand All @@ -21,11 +21,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '8.1'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
- uses: actions/checkout@master
- uses: actions/checkout@v2
- run: composer install --prefer-dist
- run: ./vendor/bin/phpmd ./ text ./phpmd.xml --suffixes php,inc,test --exclude vendor,bin,tests

Expand All @@ -34,25 +34,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '8.1'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
- uses: actions/checkout@master
- uses: actions/checkout@v2
- run: composer install --prefer-dist
- run: ./vendor/bin/phpcpd ./ --names=*.php,*.inc,*.test --names-exclude=*.md --ansi --exclude=vendor --exclude=bin --exclude=tests
- run: ./vendor/bin/phpcpd ./ --suffix .php --suffix .inc --suffix .test --exclude vendor --exclude bin --exclude tests

phpstan:
name: phpstan
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '8.1'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: phpstan, cs2pr
- uses: actions/checkout@master
- uses: actions/checkout@v2
- run: composer install --prefer-dist
- run: ./vendor/bin/phpstan analyse ./src ./tests --error-format=checkstyle | cs2pr

Expand All @@ -61,11 +61,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '8.1'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
- uses: actions/checkout@master
- uses: actions/checkout@v2
- run: composer install --prefer-dist
- run: ./vendor/bin/psalm --output-format=github

Expand All @@ -74,11 +74,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: php-cs-fixer, cs2pr
- uses: actions/checkout@master
tools: composer:v2
- uses: actions/checkout@v2
- run: composer install --prefer-dist
- run: ./vendor/bin/security-checker security:check ./composer.lock
- uses: symfonycorp/security-checker-action@v3
31 changes: 31 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Tests
on:
push:
schedule:
- cron: "0 0 * * THU"

jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ['8.0', '8.1']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer:v2
- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php-versions }}
version: 2
- run: XDEBUG_MODE=coverage ./vendor/bin/phpunit
- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.env
/vendor
composer.lock
.phpunit.result.cache

# Ignore file generated by MacOS
*.DS_Store
Expand All @@ -16,3 +18,4 @@
# PHPCS cache files
.php_cs.cache
.phpcs-cache
.php-cs-fixer.cache
15 changes: 15 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

$finder = \PhpCsFixer\Finder::create()
->exclude('vendor')
->exclude('.sonarlint')
->in(__DIR__);

$config = new \PhpCsFixer\Config();

return $config->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'phpdoc_align' => ['align' => 'vertical', 'tags' => ['type', 'var']],
])
->setFinder($finder);
16 changes: 0 additions & 16 deletions .php_cs.dist

This file was deleted.

13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

41 changes: 34 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
CHANGELOG
---------
# Changelog
All notable changes to this project will be documented in this file.

## 0.0.1-alpha (2020-06-12)
- allow conversion of GPS (WGS84) coordinates from/to CH1903/LV03 (MN03)
- allow conversion of GPS (WGS84) coordinates from/to CH1995/LV95 (MN95)
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.0.0 (2020-06-12)
- under heavy development
## [Unreleased]

## [0.0.1] - 2023-07-12
### Fixed
- fixed deprecations for development
- fixed deprecations for PHP 8.1

### Changed
- update changelog following 'keep a changelog' format
- run code-styles Github Actions on PHP 8.1
- update symfony checker to use new symfonycorp/security-checker-action
- use assertion with Delta on PHPUnit float values

### Added
- add run of tests on Github Actions
- add coverage to coveralls

### Removed
- remove Travis integration for tests
- remove StyleCI integration
- remove support for PHP 7.4

## [0.0.1-alpha] - 2020-06-12
### Added
- allow conversion of GPS (WGS84) coordinates from/to CH1903/LV03 (MN03)
- allow conversion of GPS (WGS84) coordinates from/to CH1995/LV95 (MN95)

[Unreleased]: https://github.com/antistatique/swisstopo/compare/0.0.1...HEAD
[0.0.1]: https://github.com/antistatique/swisstopo/compare/0.0.1-alpha...v0.0.1
[0.0.1-alpha]: https://github.com/antistatique/swisstopo/releases/tag/0.0.1-alpha
9 changes: 0 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@ It can modernize your code (like converting the pow function to the ** operator
./vendor/bin/phpstan analyse ./ --error-format=checkstyle
```

### Asserts Security Vulnerabilities

The [SensioLabs Security Checker](https://github.com/sensiolabs/security-checker) is a command line tool that checks
if the application uses dependencies with known security vulnerabilitie.

```bash
./vendor/bin/security-checker security:check ./composer.lock
```

### Improve global code quality using PHPCPD (Code duplication) & PHPMD (PHP Mess Detector)

Detect overcomplicated expressions & Unused parameters, methods, properties
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Antistatique
Copyright (c) 2020–2022 Antistatique

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Convert World Coordinates to Swiss Coordinates - and vice versa
=============

[![Coverage Status](https://coveralls.io/repos/github/antistatique/swisstopo/badge.svg?branch=dev)](https://coveralls.io/github/antistatique/swisstopo?branch=dev)
[![Build](https://github.com/antistatique/swisstopo/actions/workflows/tests.yml/badge.svg)](https://github.com/antistatique/swisstopo/actions/workflows/tests.yml)
[![Packagist](https://img.shields.io/packagist/dt/antistatique/swisstopo.svg?maxAge=2592000)](https://packagist.org/packages/antistatique/swisstopo)
[![License](https://poser.pugx.org/antistatique/swisstopo/license)](https://packagist.org/packages/antistatique/swisstopo)
[![PHP Versions Supported](https://img.shields.io/badge/php-%3E%3D%208.0-8892BF.svg)](https://packagist.org/packages/antistatique/swisstopo)

Super-simple PHP library to transpose GPS (WGS84) coordinates to/from the Swiss military and civilian coordinate
systems CH1903/LV03 (MN03) or CH1995/LV95 (MN95).

Expand All @@ -9,11 +15,6 @@ Swiss plane coordinates.

These formulas are primarily for navigation purposes and may not be used for official or geodetic survey applications!

Requires PHP 7.2+.

[![Build Status](https://travis-ci.org/antistatique/swisstopo.svg?branch=master)](https://travis-ci.org/antistatique/swisstopo)
[![StyleCI](https://github.styleci.io/repos/207270598/shield?branch=master)](https://github.styleci.io/repos/207270598)

Getting started
------------

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1-alpha
0.0.1
3 changes: 0 additions & 3 deletions bin/post-commit
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ echo "\n🙏 \033[0;32mRunning Psalm ...\033[0m"

echo "\n👻 \033[0;32mRunning PHPStan ...\033[0m"
./vendor/bin/phpstan analyse ./src ./tests --error-format=checkstyle

echo "\n⛔ \033[0;32mRunning SensioLabs Security Checker ...\033[0m"
./vendor/bin/security-checker security:check ./composer.lock
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
"description": "Convert GPS (WGS84) to Swiss (LV03 and LV95) coordinates (and vice versa)",
"license": "MIT",
"require": {
"php": ">=7.0"
"php": ">=8.0"
},
"require-dev": {
"phpunit/phpunit": "7.0.*",
"phpunit/php-code-coverage": "^6.0",
"friendsofphp/php-cs-fixer": "^2.16",
"phpunit/phpunit": "^9.0.0",
"phpunit/php-code-coverage": "^9.2.0",
"friendsofphp/php-cs-fixer": "^3.0",
"phpmd/phpmd": "^2.8",
"sebastian/phpcpd": "^4.0",
"sebastian/phpcpd": "^6.0",
"sensiolabs/security-checker": "^5.0",
"php-coveralls/php-coveralls": "^2.1",
"php-mock/php-mock-phpunit": "^2.4",
"vimeo/psalm": "^3.11",
"vimeo/psalm": "^4.29",
"phpstan/phpstan-deprecation-rules": "^0.12.2"
},
"autoload": {
Expand Down
Loading

0 comments on commit 7733d8c

Please sign in to comment.