Skip to content

Commit

Permalink
Rewrite to newer symfony versions (#12)
Browse files Browse the repository at this point in the history
A lot of things were made during rewrite:

*    migrate to src, tests folder
*    drop php <7.2 support (mainly due to symfony and phpunit version restrictions)
*    enable support of symfony 4.x and symfony 5.x (had to add forward-compatibility layer in tests and change container injection to service injection)
*    codestyle added
*    add test coverage for maps generation (requires api key, otherwise skips)
  • Loading branch information
mente authored Oct 13, 2020
1 parent aab089b commit 99afafb
Show file tree
Hide file tree
Showing 64 changed files with 922 additions and 747 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ Tests/testkernel/cache/*
phpunit.xml
vendor
composer.lock
*.cache
var/cache
22 changes: 22 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

declare(strict_types=1);

$finder = PhpCsFixer\Finder::create()
->in('src')
->in('tests')
->exclude('tests/testkernel/cache');

return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'no_unused_imports' => true,
'ordered_imports' => true,
'phpdoc_summary' => false,
'phpdoc_to_comment' => false,
'concat_space' => ['spacing' => 'one'],
'array_syntax' => ['syntax' => 'short'],
'yoda_style' => null,
'phpdoc_types_order' => false,
])
->setFinder($finder);
17 changes: 9 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ cache:
- $HOME/.composer

php:
- hhvm
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
env:
- deps=high
- deps=low
- deps=^3.4
- deps=^4.4
- deps=^5.0

install:
- if [ "$deps" = "high" ]; then composer --prefer-dist -n --no-progress update; fi;
- if [ "$deps" = "low" ]; then composer --prefer-dist -n --no-progress --prefer-lowest update; fi;
- sed -i.bak "s/\^3.4 || ^4.4 || ^5.0/${deps}/" composer.json
- composer --prefer-dist -n --no-progress update

script:
- vendor/bin/php-cs-fixer fix --config=.php_cs.dist --dry-run
- composer test
72 changes: 0 additions & 72 deletions Adwords.php

This file was deleted.

24 changes: 0 additions & 24 deletions GoogleBundle.php

This file was deleted.

82 changes: 0 additions & 82 deletions Maps/AbstractMap.php

This file was deleted.

19 changes: 0 additions & 19 deletions Maps/MapInterface.php

This file was deleted.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ google:
key: YOUR-API-KEY-FROM-GOOGLE
host: YOUR-HOST // Host where the gmap image is served.
(Optional, only needed if script is running from CLI. If not set $_SERVER is used)
uploadDir: '%kernel.project_dir%/web/maps' // absolute path to directory where map files
publicDir: '/maps' //http path where map files supposed to be publicly available
```

Get your key at https://code.google.com/apis/console/
Expand Down
80 changes: 0 additions & 80 deletions Tests/Analytics/TransactionTest.php

This file was deleted.

Loading

0 comments on commit 99afafb

Please sign in to comment.