Skip to content

Commit 9e544eb

Browse files
gromovdmiluckyraul
andauthored
init 2.4 (#7)
* init 2.4 * Delete .travis.yml * upd requires * phpstan.neon Co-authored-by: Nikita <luckyraul@users.noreply.github.com>
1 parent d52e988 commit 9e544eb

File tree

14 files changed

+94
-51
lines changed

14 files changed

+94
-51
lines changed

.github/workflows/grumphp.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Static Test
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- v2.4
8+
push:
9+
branches:
10+
- v2.4
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
php-versions: ['7.4', '8.1']
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Setup PHP, with composer and extensions
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php-versions }}
25+
extensions: mbstring, xml, ctype, iconv, intl, mysql
26+
- name: Get composer cache directory
27+
id: composer-cache
28+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
29+
- name: Cache composer dependencies
30+
uses: actions/cache@v2
31+
with:
32+
path: ${{ steps.composer-cache.outputs.dir }}
33+
# Use composer.json for key, if composer.lock is not committed.
34+
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
35+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
36+
restore-keys: ${{ runner.os }}-composer-
37+
- run: composer self-update --2
38+
- run: echo "{\"http-basic\":{\"repo.magento.com\":{\"username\":\"${MAGE_LOGIN}\",\"password\":\"${MAGE_PWD}\"}}}" > auth.json
39+
env:
40+
MAGE_LOGIN: ${{ secrets.MAGE_LOGIN }}
41+
MAGE_PWD: ${{ secrets.MAGE_PWD }}
42+
- name: Install Composer dependencies
43+
run: composer install --no-progress --prefer-dist --optimize-autoloader
44+
- run: php vendor/bin/phpcs --config-set ignore_warnings_on_exit 1
45+
- run: php vendor/bin/phpcs --config-set show_warnings 0
46+
- name: Run Tests
47+
run: php vendor/bin/grumphp run

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
/vendor
55
/composer.lock
66
.DS_Store
7-
.php_cs.cache
7+
.php_cs.cache
8+
.php-cs-fixer.cache

.php_cs renamed to .php-cs-fixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
$header = <<<EOF
33
@author Mygento Team
4-
@copyright 2015-2020 Mygento (https://www.mygento.ru)
4+
@copyright 2015-2022 Mygento (https://www.mygento.ru)
55
@package Mygento_Metrika
66
EOF;
77

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

Block/Tracker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @author Mygento Team
5-
* @copyright 2015-2020 Mygento (https://www.mygento.ru)
5+
* @copyright 2015-2022 Mygento (https://www.mygento.ru)
66
* @package Mygento_Metrika
77
*/
88

Block/Tracker/Product.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @author Mygento Team
5-
* @copyright 2015-2020 Mygento (https://www.mygento.ru)
5+
* @copyright 2015-2022 Mygento (https://www.mygento.ru)
66
* @package Mygento_Metrika
77
*/
88

Block/Tracker/Success.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @author Mygento Team
5-
* @copyright 2015-2020 Mygento (https://www.mygento.ru)
5+
* @copyright 2015-2022 Mygento (https://www.mygento.ru)
66
* @package Mygento_Metrika
77
*/
88

Observer/AddToCart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @author Mygento Team
5-
* @copyright 2015-2020 Mygento (https://www.mygento.ru)
5+
* @copyright 2015-2022 Mygento (https://www.mygento.ru)
66
* @package Mygento_Metrika
77
*/
88

Observer/QuoteRemoveItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @author Mygento Team
5-
* @copyright 2015-2020 Mygento (https://www.mygento.ru)
5+
* @copyright 2015-2022 Mygento (https://www.mygento.ru)
66
* @package Mygento_Metrika
77
*/
88

composer.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "mygento/module-metrika",
33
"type": "magento2-module",
4-
"version": "2.3.2",
54
"license": "OSL-3.0",
65
"homepage": "https://github.com/mygento/module-metrika",
76
"description": "Yandex Metrika Integration to Magento",
@@ -26,10 +25,10 @@
2625
"yandex"
2726
],
2827
"require": {
29-
"mygento/module-base": "~2.3.9"
28+
"mygento/module-base": "~2.4.0"
3029
},
3130
"require-dev": {
32-
"mygento/coding-standard": "~2.13.5"
31+
"mygento/coding-standard": "~2.14.0"
3332
},
3433
"autoload": {
3534
"files": [
@@ -44,5 +43,11 @@
4443
"type": "composer",
4544
"url": "https://repo.magento.com"
4645
}
47-
]
46+
],
47+
"config": {
48+
"allow-plugins": {
49+
"magento/composer-dependency-version-audit-plugin": true,
50+
"phpro/grumphp": true
51+
}
52+
}
4853
}

grumphp.yml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
parameters:
2-
git_dir: .
3-
bin_dir: vendor/bin
4-
tasks:
5-
composer:
6-
no_check_lock: true
7-
git_blacklist:
8-
keywords:
9-
- "die("
10-
- "var_dump("
11-
- "exit;"
12-
phplint:
13-
phpcsfixer2:
14-
config: '.php_cs'
15-
phpmd:
16-
ruleset: ['vendor/mygento/coding-standard/Mygento-Mage2/phpmd.xml']
17-
phpcs:
18-
warning_severity: null
19-
xmllint:
1+
grumphp:
2+
tasks:
3+
composer:
4+
no_check_lock: true
5+
git_blacklist:
6+
keywords:
7+
- "die("
8+
- "var_dump("
9+
- "exit;"
10+
phplint:
11+
phpcsfixer:
12+
config: '.php-cs-fixer.php'
13+
phpmd:
14+
ruleset: ['vendor/mygento/coding-standard/Mygento-Mage2/phpmd.xml']
15+
phpcs:
16+
warning_severity: 0
17+
xmllint:
18+
phpstan:
19+
autoload_file: 'vendor/mygento/coding-standard/stan/autoload.php'
20+
ignore_patterns: ['Test']
21+
level: 1

phpcs.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ruleset name="Mygento-Mage2MOD">
33
<rule ref="./vendor/mygento/coding-standard/Mygento-Mage2"/>
4-
<rule ref="./vendor/magento-ecg/coding-standard/EcgM2"/>
5-
<!-- <rule ref="./vendor/magento/marketplace-eqp"/> -->
6-
</ruleset>
4+
<exclude-pattern>*/Test/*</exclude-pattern>
5+
</ruleset>

phpstan.neon

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
includes:
2+
- vendor/mygento/coding-standard/stan/extension.neon
3+
4+
parameters:
5+
bootstrapFiles:
6+
- 'vendor/mygento/coding-standard/stan/autoload.php'

registration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @author Mygento Team
5-
* @copyright 2015-2020 Mygento (https://www.mygento.ru)
5+
* @copyright 2015-2022 Mygento (https://www.mygento.ru)
66
* @package Mygento_Metrika
77
*/
88

0 commit comments

Comments
 (0)