Skip to content

Commit f4cc2cd

Browse files
Upgraded to Prestashop 8.0
1 parent 332aae8 commit f4cc2cd

File tree

16 files changed

+5984
-4420
lines changed

16 files changed

+5984
-4420
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ jobs:
1414
- name: "Setup PHP, with composer and extensions"
1515
uses: "shivammathur/setup-php@v2" # https://github.com/shivammathur/setup-php
1616
with:
17-
php-version: "7.3"
17+
php-version: "8.0"
1818
extensions: "mbstring, xml, ctype, iconv, intl, gd"
19+
tools: "composer:v2"
1920
- name: "Get composer cache directory"
20-
id: "composercache"
21-
run: "echo '::set-output name=dir::$(composer config cache-files-dir)'"
21+
id: "composer-cache"
22+
run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
2223
- name: "Cache composer dependencies"
2324
uses: "actions/cache@v4"
2425
with:
25-
path: "${{ steps.composercache.outputs.dir }}"
26+
path: "${{ steps.composer-cache.outputs.dir }}"
2627
key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}"
2728
restore-keys: "${{ runner.os }}-composer-"
2829
- name: "Validate composer"
@@ -34,24 +35,14 @@ jobs:
3435
- name: "Make zip"
3536
run: "make"
3637

37-
# Make a release from the tag
38+
# Make a release from the tag and upload the zip
3839
- name: "Create Release"
3940
id: "create_release"
40-
uses: "actions/create-release@v1"
41-
env:
42-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" # This token is provided by Actions, you do not need to create your own token
43-
with:
44-
tag_name: "${{ github.ref }}"
45-
release_name: "Release ${{ github.ref }}"
46-
47-
# Upload the zip to the release
48-
- name: "Upload Release Asset"
49-
id: "upload-release-asset"
50-
uses: "actions/upload-release-asset@v1"
41+
uses: "softprops/action-gh-release@v2"
5142
env:
5243
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
5344
with:
54-
upload_url: "${{ steps.create_release.outputs.upload_url }}" # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
55-
asset_path: "./build/cryptwerk.zip"
56-
asset_name: "cryptwerk.zip"
57-
asset_content_type: "application/zip"
45+
name: "Release ${{ github.ref_name }}"
46+
files: "./build/cryptwerk.zip"
47+
fail_on_unmatched_files: true
48+
generate_release_notes: true

.github/workflows/validate.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ jobs:
77
name: "Linting (PHP ${{ matrix.php-versions }})"
88
runs-on: "ubuntu-latest"
99
strategy:
10-
fail-fast: false
1110
matrix:
12-
php-versions: [ '7.3', '7.4' ]
11+
php-versions: [ '8.0' ]
1312
steps:
1413
- name: "Checkout"
1514
uses: "actions/checkout@v4"
@@ -18,13 +17,14 @@ jobs:
1817
with:
1918
php-version: "${{ matrix.php-versions }}"
2019
extensions: "mbstring, xml, ctype, iconv, intl, gd"
20+
tools: "composer:v2"
2121
- name: "Get composer cache directory"
22-
id: "composercache"
23-
run: "echo '::set-output name=dir::$(composer config cache-files-dir)'"
22+
id: "composer-cache"
23+
run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
2424
- name: "Cache composer dependencies"
2525
uses: "actions/cache@v4"
2626
with:
27-
path: "${{ steps.composercache.outputs.dir }}"
27+
path: "${{ steps.composer-cache.outputs.dir }}"
2828
key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}"
2929
restore-keys: "${{ runner.os }}-composer-"
3030
- name: "Validate composer"

.gitignore

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,27 @@ build/
77
cryptwerk.zip
88

99
# Ignore php-cs-fixer cache
10-
.php-cs-fixer.cache
1110
.php_cs.cache
11+
.php-cs-fixer.cache
1212

1313
# Ignore phpcs cache
1414
.phpcs-cache
1515

16+
# Ignore developer specific docker-compose
17+
docker-compose.override.yml
18+
1619
# Ignore files in the module that are added via `make`
1720
/modules/cryptwerk/LICENSE
1821
/modules/cryptwerk/README.md
22+
/modules/cryptwerk/docs/README.md
23+
24+
# We dont care about the lib/vendor folder
25+
/modules/cryptwerk/lib/
26+
/modules/cryptwerk/vendor/
1927

2028
### PhpStorm ###
2129
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
2230
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
23-
2431
.idea/
2532

2633
# CMake
@@ -67,12 +74,10 @@ fabric.properties
6774
### Prestashop ###
6875
# Private files
6976
# The following files contain your database credentials and other personal data.
70-
7177
config/settings.*.php
7278

7379
# Cache, temp and generated files
7480
# The following files are generated by PrestaShop.
75-
7681
admin-dev/autoupgrade/
7782
/cache/*
7883
!/cache/index.php
@@ -92,21 +97,13 @@ modules/*/config*.xml
9297

9398
# Site content
9499
# The following folders contain product images, virtual products, CSV's, etc.
95-
96100
admin-dev/backups/
97101
admin-dev/export/
98102
admin-dev/import/
99103
download/
100104
/img/*
101105
upload/
102106

103-
# Other modules we don't care about
104-
/modules/
105-
!/modules/cryptwerk/*
106-
107-
# We dont care about the lib/vendor folder
108-
/modules/cryptwerk/vendor/
109-
110107
### Symfony ###
111108
# Cache and logs (Symfony2)
112109
/app/cache/*

.php-cs-fixer.dist.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
$finder = PhpCsFixer\Finder::create()
3+
$finder = (new PhpCsFixer\Finder)
44
->in([__DIR__ . '/modules/cryptwerk'])
55
->exclude('vendor');
66

@@ -16,6 +16,7 @@
1616
'concat_space' => false,
1717
'fopen_flags' => false,
1818
'native_function_invocation' => false,
19+
'native_constant_invocation' => false,
1920
'phpdoc_summary' => false,
2021
'protected_to_private' => false,
2122
'psr_autoloading' => false,

.php-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.3
1+
8.0

Makefile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ deps: ## Download and make all dependencies
1818
@cd "$(MODULE_FOLDER)/$(MODULE)" \
1919
&& composer dump-autoload -o --no-dev
2020

21-
build: deps ## Build the bastard binary file
21+
build: deps ## Build the cryptwerk binary file
2222
# Removing the old ZIP if present
2323
@rm -f $(MODULE_OUT)
2424

@@ -36,6 +36,22 @@ build: deps ## Build the bastard binary file
3636
&& zip -r $(ZIP_NAME) $(MODULE) \
3737
&& mv $(ZIP_NAME) "../$(BUILD_FOLDER)"
3838

39+
update: ## Update all dependencies (including development)
40+
# Upgrading all root dependencies
41+
@composer update
42+
43+
# Upgrading all module dependencies
44+
@cd "$(MODULE_FOLDER)/$(MODULE)" \
45+
&& composer update
46+
47+
upgrade: ## Upgrade all dependencies (including development)
48+
# Upgrading all root dependencies
49+
@composer upgrade -W
50+
51+
# Upgrading all module dependencies
52+
@cd "$(MODULE_FOLDER)/$(MODULE)" \
53+
&& composer upgrade -W
54+
3955
clean: ## Remove previous builds
4056
# Removing the ZIP
4157
@rm -f $(MODULE_OUT)

composer.json

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
"source": "https://github.com/bitcoinmitchell/cryptwerk-plugin"
1818
},
1919
"require": {
20-
"php": ">=7.3.0",
20+
"php": ">=8.0",
2121
"ext-PDO": "*",
22+
"ext-bcmath": "*",
2223
"ext-curl": "*",
2324
"ext-dom": "*",
2425
"ext-fileinfo": "*",
@@ -29,38 +30,39 @@
2930
"ext-mbstring": "*",
3031
"ext-simplexml": "*",
3132
"ext-zip": "*",
32-
"composer/installers": "^v1.9.0"
33+
"composer/installers": "^1.12.0"
3334
},
3435
"require-dev": {
35-
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
36-
"ergebnis/composer-normalize": "^2.20",
37-
"ezyang/htmlpurifier": "dev-master as v4.14.0",
38-
"friendsofphp/php-cs-fixer": "^v2.19.2",
39-
"johnkary/phpunit-speedtrap": "^v4.0.0",
40-
"pheromone/phpcs-security-audit": "^2.0.1",
41-
"phpspec/prophecy-phpunit": "^v2.0.1",
42-
"prestashop/laminas-code-lts": "dev-4.5-lts",
43-
"prestashop/prestashop": "dev-develop",
36+
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
37+
"ergebnis/composer-normalize": "^2.43.0",
38+
"ezyang/htmlpurifier": "dev-master as 4.17.0",
39+
"friendsofphp/php-cs-fixer": "^3.4.0",
40+
"lcobucci/jwt": "dev-3.4.6-patch as 3.4.6",
41+
"php-parallel-lint/php-console-highlighter": "^1.0",
42+
"php-parallel-lint/php-parallel-lint": "^1.4.0",
43+
"phpoffice/phpspreadsheet": "^1.29.1",
44+
"prestashop/autoindex": "^2.1",
45+
"prestashop/php-dev-tools": "^5",
46+
"prestashop/prestashop": "^8.1.7",
4447
"roave/security-advisories": "dev-latest",
45-
"slevomat/coding-standard": "^8.4",
46-
"squizlabs/php_codesniffer": "^3.7.1",
47-
"symfony/phpunit-bridge": "^v7.1.4"
48+
"slevomat/coding-standard": "^8.15.0",
49+
"squizlabs/php_codesniffer": "^3.10.2"
4850
},
4951
"replace": {
50-
"prestashop/blockreassurance": "^5.0",
51-
"prestashop/blockwishlist": "^2.1.2",
52+
"prestashop/blockreassurance": "^5.1.4",
53+
"prestashop/blockwishlist": "^3",
5254
"prestashop/classic": "^2.0.0-beta",
53-
"prestashop/contactform": "^v4.3.0",
55+
"prestashop/contactform": "^4.3.0",
5456
"prestashop/dashactivity": "^2",
5557
"prestashop/dashgoals": "^2",
5658
"prestashop/dashproducts": "^2",
5759
"prestashop/dashtrends": "^2",
58-
"prestashop/gamification": "^v2.4.0",
60+
"prestashop/gamification": "^2.4.0",
5961
"prestashop/graphnvd3": "^2",
6062
"prestashop/gridhtml": "^2",
6163
"prestashop/gsitemap": "^4",
6264
"prestashop/pagesnotfound": "^2",
63-
"prestashop/productcomments": "^5.0",
65+
"prestashop/productcomments": "^7.0",
6466
"prestashop/ps_banner": "^2",
6567
"prestashop/ps_bestsellers": "^1.0",
6668
"prestashop/ps_brandlist": "^1.0",
@@ -75,21 +77,21 @@
7577
"prestashop/ps_customersignin": "^2",
7678
"prestashop/ps_customtext": "^4",
7779
"prestashop/ps_dataprivacy": "^2.0",
78-
"prestashop/ps_distributionapiclient": "^1.0",
79-
"prestashop/ps_emailalerts": "^v2.0",
80-
"prestashop/ps_emailsubscription": "^v2.7.0",
81-
"prestashop/ps_facetedsearch": "^v3.7.1",
80+
"prestashop/ps_distributionapiclient": "^1.0.1",
81+
"prestashop/ps_emailalerts": "^3.0",
82+
"prestashop/ps_emailsubscription": "^2.7.0",
83+
"prestashop/ps_facetedsearch": "^3.7.1",
8284
"prestashop/ps_faviconnotificationbo": "^2",
8385
"prestashop/ps_featuredproducts": "^2",
84-
"prestashop/ps_googleanalytics": "^v4.0",
86+
"prestashop/ps_googleanalytics": "^5.0",
8587
"prestashop/ps_imageslider": "^3",
8688
"prestashop/ps_languageselector": "^2",
87-
"prestashop/ps_linklist": "^5",
89+
"prestashop/ps_linklist": "^6",
8890
"prestashop/ps_mainmenu": "^2",
8991
"prestashop/ps_newproducts": "^1.0",
9092
"prestashop/ps_searchbar": "^2",
9193
"prestashop/ps_sharebuttons": "^2",
92-
"prestashop/ps_shoppingcart": "^2",
94+
"prestashop/ps_shoppingcart": "^3",
9395
"prestashop/ps_socialfollow": "^2",
9496
"prestashop/ps_specials": "^1.0",
9597
"prestashop/ps_supplierlist": "^1.0",
@@ -114,9 +116,25 @@
114116
"prestashop/statsregistrations": "^2",
115117
"prestashop/statssales": "^2",
116118
"prestashop/statssearch": "^2",
117-
"prestashop/statsstock": "^2"
119+
"prestashop/statsstock": "^2",
120+
"symfony/polyfill-mbstring": "*",
121+
"symfony/polyfill-php54": "*",
122+
"symfony/polyfill-php55": "^1.10",
123+
"symfony/polyfill-php56": "*",
124+
"symfony/polyfill-php70": "*",
125+
"symfony/polyfill-php71": "*",
126+
"symfony/polyfill-php72": "*",
127+
"symfony/polyfill-php73": "*",
128+
"symfony/polyfill-php74": "*"
118129
},
119-
"minimum-stability": "stable",
130+
"repositories": [
131+
{
132+
"type": "vcs",
133+
"url": "https://github.com/PrestaShop/jwt"
134+
}
135+
],
136+
"minimum-stability": "dev",
137+
"prefer-stable": true,
120138
"autoload": {
121139
"psr-4": {
122140
"CryptWerk\\": "modules/cryptwerk/src"
@@ -141,7 +159,7 @@
141159
"@install-codestandards"
142160
],
143161
"install-codestandards": [
144-
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
162+
"PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
145163
]
146164
}
147165
}

0 commit comments

Comments
 (0)