Skip to content

Commit 0535d26

Browse files
authored
Merge pull request #30 from PrestaShop/dev
Release version 2.0.3
2 parents ef485ad + eca2797 commit 0535d26

27 files changed

Lines changed: 2670 additions & 130 deletions
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: Build
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build-and-release-draft:
6+
name: Build & Release draft
7+
uses: PrestaShop/.github/.github/workflows/build-release.yml@master

.github/workflows/php.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
name: PHP tests
3+
on: [push, pull_request]
4+
jobs:
5+
# Check there is no syntax errors in the project
6+
php-linter:
7+
name: PHP Syntax check 5.6 => 8.1
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2.0.0
12+
13+
- name: PHP syntax checker 5.6
14+
uses: prestashop/github-action-php-lint/5.6@master
15+
16+
- name: PHP syntax checker 7.2
17+
uses: prestashop/github-action-php-lint/7.2@master
18+
19+
- name: PHP syntax checker 7.3
20+
uses: prestashop/github-action-php-lint/7.3@master
21+
22+
- name: PHP syntax checker 7.4
23+
uses: prestashop/github-action-php-lint/7.4@master
24+
25+
- name: PHP syntax checker 8.0
26+
uses: prestashop/github-action-php-lint/8.0@master
27+
28+
- name: PHP syntax checker 8.1
29+
uses: prestashop/github-action-php-lint/8.1@master
30+
31+
# Check the PHP code follow the coding standards
32+
php-cs-fixer:
33+
name: PHP-CS-Fixer
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Setup PHP
37+
uses: shivammathur/setup-php@v2
38+
with:
39+
php-version: '7.4'
40+
41+
- name: Checkout
42+
uses: actions/checkout@v2.0.0
43+
44+
- name: Cache dependencies
45+
uses: actions/cache@v2
46+
with:
47+
path: vendor
48+
key: php-${{ hashFiles('composer.lock') }}
49+
50+
- name: Install dependencies
51+
run: composer install
52+
53+
- name: Run PHP-CS-Fixer
54+
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no --diff-format udiff
55+
56+
# Run PHPStan against the module and a PrestaShop release
57+
phpstan:
58+
name: PHPStan
59+
runs-on: ubuntu-latest
60+
strategy:
61+
matrix:
62+
presta-versions: ['1.7.1.2', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', 'latest']
63+
steps:
64+
- name: Setup PHP
65+
uses: shivammathur/setup-php@v2
66+
with:
67+
php-version: '7.4'
68+
69+
- name: Checkout
70+
uses: actions/checkout@v2.0.0
71+
72+
# Add vendor folder in cache to make next builds faster
73+
- name: Cache vendor folder
74+
uses: actions/cache@v1
75+
with:
76+
path: vendor
77+
key: php-${{ hashFiles('composer.lock') }}
78+
79+
# Add composer local folder in cache to make next builds faster
80+
- name: Cache composer folder
81+
uses: actions/cache@v1
82+
with:
83+
path: ~/.composer/cache
84+
key: php-composer-cache
85+
86+
- run: composer install
87+
88+
# Docker images prestashop/prestashop may be used, even if the shop remains uninstalled
89+
- name: Execute PHPStan on PrestaShop (Tag ${{ matrix.presta-versions }})
90+
run: ./tests/phpstan.sh ${{ matrix.presta-versions }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/config_*
2+
/node_modules
3+
/vendor
4+
/.php_cs.cache

.php_cs.dist

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
$config = new PrestaShop\CodingStandards\CsFixer\Config();
4+
5+
$config
6+
->setUsingCache(true)
7+
->getFinder()
8+
->in(__DIR__)
9+
->exclude('vendor');
10+
11+
return $config;

Readme.md renamed to README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
Enrich your stats, give your catalog a quick evaluation to better analyze your activity.
66

7+
## Compatibility
8+
9+
PrestaShop: `1.7.1.0` or later
10+
711
## Reporting issues
812

913
You can report issues with this module in the main PrestaShop repository. [Click here to report an issue][report-issue].

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@
1212
"require": {
1313
"php": ">=5.4"
1414
},
15+
"require-dev": {
16+
"prestashop/php-dev-tools": "^3.4"
17+
},
1518
"config": {
16-
"preferred-install": "dist"
19+
"preferred-install": "dist",
20+
"classmap-authoritative": true,
21+
"optimize-autoloader": true,
22+
"prepend-autoloader": false
1723
},
1824
"type": "prestashop-module"
1925
}

0 commit comments

Comments
 (0)