Skip to content

Commit

Permalink
Merge pull request #189 from fox-john/feature/refactor-code-base
Browse files Browse the repository at this point in the history
Feature: refactor module
  • Loading branch information
nicosomb authored Mar 23, 2023
2 parents f263e2a + 77bdecf commit 4d4cf6e
Show file tree
Hide file tree
Showing 139 changed files with 9,643 additions and 8,176 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@ name: PHP tests
on: [push, pull_request]
jobs:
php-linter:
name: PHP Syntax check 5.6 => 8.1
name: PHP Syntax check 7.2 => 8.1
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.0.0

- name: PHP syntax checker 5.6
uses: prestashop/github-action-php-lint/5.6@master

- name: PHP syntax checker 7.2
uses: prestashop/github-action-php-lint/7.2@master

Expand All @@ -32,7 +29,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: "7.2"

- name: Checkout
uses: actions/checkout@v2.0.0
Expand All @@ -47,18 +44,18 @@ jobs:
run: composer install

- name: Run PHP-CS-Fixer
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no --diff-format udiff
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no
phpstan:
name: PHPStan
runs-on: ubuntu-latest
strategy:
matrix:
presta-versions: ['1.7.0.6', '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']
presta-versions: ["8.0", "latest"]
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: "7.2"

- name: Checkout
uses: actions/checkout@v2.0.0
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ tests/php/coverage
config_*.xml
.php_cs.cache
.idea
.php-cs-fixer.cache
File renamed without changes.
28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
LOCAL_USER_UID ?= $(shell id -u)
LOCAL_USER_GID ?= $(shell id -g)

DOCKER_COMPOSE_CMD ?= docker-compose --file "./docker/docker-compose.yml"

# target: default - Calling help by default
default: help

# target: help - Get help on this file
help:
@egrep "^#" Makefile

# target: php-tests - Launch all php tests/lints suite
tests:
php-tests

# target: php-cs-fixer-fix - Run php cs fixer fix
php-cs-fixer-fix:
${DOCKER_COMPOSE_CMD} run --rm php sh -c "vendor/bin/php-cs-fixer fix"

# target: php-cs-fixer-lint - Run php cs fixer dry run
php-cs-fixer-lint:
${DOCKER_COMPOSE_CMD} run --rm php sh -c "vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no"

# target: php-stan - Run php stan
php-stan:
docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop; docker run --rm --volumes-from temp-ps -v $(shell echo $(PWD)):/web/module -e _PS_ROOT_DIR_=/var/www/html --workdir=/web/module ghcr.io/phpstan/phpstan analyse --configuration=/web/module/tests/phpstan/phpstan.neon

152 changes: 0 additions & 152 deletions classes/GDPRConsent.php

This file was deleted.

Loading

0 comments on commit 4d4cf6e

Please sign in to comment.