Skip to content

Commit

Permalink
Upgraded to Prestashop 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BitcoinMitchell committed Oct 7, 2024
1 parent 332aae8 commit f4cc2cd
Show file tree
Hide file tree
Showing 16 changed files with 5,984 additions and 4,420 deletions.
31 changes: 11 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ jobs:
- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@v2" # https://github.com/shivammathur/setup-php
with:
php-version: "7.3"
php-version: "8.0"
extensions: "mbstring, xml, ctype, iconv, intl, gd"
tools: "composer:v2"
- name: "Get composer cache directory"
id: "composercache"
run: "echo '::set-output name=dir::$(composer config cache-files-dir)'"
id: "composer-cache"
run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
- name: "Cache composer dependencies"
uses: "actions/cache@v4"
with:
path: "${{ steps.composercache.outputs.dir }}"
path: "${{ steps.composer-cache.outputs.dir }}"
key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: "${{ runner.os }}-composer-"
- name: "Validate composer"
Expand All @@ -34,24 +35,14 @@ jobs:
- name: "Make zip"
run: "make"

# Make a release from the tag
# Make a release from the tag and upload the zip
- name: "Create Release"
id: "create_release"
uses: "actions/create-release@v1"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" # This token is provided by Actions, you do not need to create your own token
with:
tag_name: "${{ github.ref }}"
release_name: "Release ${{ github.ref }}"

# Upload the zip to the release
- name: "Upload Release Asset"
id: "upload-release-asset"
uses: "actions/upload-release-asset@v1"
uses: "softprops/action-gh-release@v2"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
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
asset_path: "./build/cryptwerk.zip"
asset_name: "cryptwerk.zip"
asset_content_type: "application/zip"
name: "Release ${{ github.ref_name }}"
files: "./build/cryptwerk.zip"
fail_on_unmatched_files: true
generate_release_notes: true
10 changes: 5 additions & 5 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ jobs:
name: "Linting (PHP ${{ matrix.php-versions }})"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
php-versions: [ '7.3', '7.4' ]
php-versions: [ '8.0' ]
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
Expand All @@ -18,13 +17,14 @@ jobs:
with:
php-version: "${{ matrix.php-versions }}"
extensions: "mbstring, xml, ctype, iconv, intl, gd"
tools: "composer:v2"
- name: "Get composer cache directory"
id: "composercache"
run: "echo '::set-output name=dir::$(composer config cache-files-dir)'"
id: "composer-cache"
run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
- name: "Cache composer dependencies"
uses: "actions/cache@v4"
with:
path: "${{ steps.composercache.outputs.dir }}"
path: "${{ steps.composer-cache.outputs.dir }}"
key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: "${{ runner.os }}-composer-"
- name: "Validate composer"
Expand Down
21 changes: 9 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,27 @@ build/
cryptwerk.zip

# Ignore php-cs-fixer cache
.php-cs-fixer.cache
.php_cs.cache
.php-cs-fixer.cache

# Ignore phpcs cache
.phpcs-cache

# Ignore developer specific docker-compose
docker-compose.override.yml

# Ignore files in the module that are added via `make`
/modules/cryptwerk/LICENSE
/modules/cryptwerk/README.md
/modules/cryptwerk/docs/README.md

# We dont care about the lib/vendor folder
/modules/cryptwerk/lib/
/modules/cryptwerk/vendor/

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

.idea/

# CMake
Expand Down Expand Up @@ -67,12 +74,10 @@ fabric.properties
### Prestashop ###
# Private files
# The following files contain your database credentials and other personal data.

config/settings.*.php

# Cache, temp and generated files
# The following files are generated by PrestaShop.

admin-dev/autoupgrade/
/cache/*
!/cache/index.php
Expand All @@ -92,21 +97,13 @@ modules/*/config*.xml

# Site content
# The following folders contain product images, virtual products, CSV's, etc.

admin-dev/backups/
admin-dev/export/
admin-dev/import/
download/
/img/*
upload/

# Other modules we don't care about
/modules/
!/modules/cryptwerk/*

# We dont care about the lib/vendor folder
/modules/cryptwerk/vendor/

### Symfony ###
# Cache and logs (Symfony2)
/app/cache/*
Expand Down
3 changes: 2 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

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

Expand All @@ -16,6 +16,7 @@
'concat_space' => false,
'fopen_flags' => false,
'native_function_invocation' => false,
'native_constant_invocation' => false,
'phpdoc_summary' => false,
'protected_to_private' => false,
'psr_autoloading' => false,
Expand Down
2 changes: 1 addition & 1 deletion .php-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.3
8.0
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ deps: ## Download and make all dependencies
@cd "$(MODULE_FOLDER)/$(MODULE)" \
&& composer dump-autoload -o --no-dev

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

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

update: ## Update all dependencies (including development)
# Upgrading all root dependencies
@composer update

# Upgrading all module dependencies
@cd "$(MODULE_FOLDER)/$(MODULE)" \
&& composer update

upgrade: ## Upgrade all dependencies (including development)
# Upgrading all root dependencies
@composer upgrade -W

# Upgrading all module dependencies
@cd "$(MODULE_FOLDER)/$(MODULE)" \
&& composer upgrade -W

clean: ## Remove previous builds
# Removing the ZIP
@rm -f $(MODULE_OUT)
Expand Down
76 changes: 47 additions & 29 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
"source": "https://github.com/bitcoinmitchell/cryptwerk-plugin"
},
"require": {
"php": ">=7.3.0",
"php": ">=8.0",
"ext-PDO": "*",
"ext-bcmath": "*",
"ext-curl": "*",
"ext-dom": "*",
"ext-fileinfo": "*",
Expand All @@ -29,38 +30,39 @@
"ext-mbstring": "*",
"ext-simplexml": "*",
"ext-zip": "*",
"composer/installers": "^v1.9.0"
"composer/installers": "^1.12.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
"ergebnis/composer-normalize": "^2.20",
"ezyang/htmlpurifier": "dev-master as v4.14.0",
"friendsofphp/php-cs-fixer": "^v2.19.2",
"johnkary/phpunit-speedtrap": "^v4.0.0",
"pheromone/phpcs-security-audit": "^2.0.1",
"phpspec/prophecy-phpunit": "^v2.0.1",
"prestashop/laminas-code-lts": "dev-4.5-lts",
"prestashop/prestashop": "dev-develop",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
"ergebnis/composer-normalize": "^2.43.0",
"ezyang/htmlpurifier": "dev-master as 4.17.0",
"friendsofphp/php-cs-fixer": "^3.4.0",
"lcobucci/jwt": "dev-3.4.6-patch as 3.4.6",
"php-parallel-lint/php-console-highlighter": "^1.0",
"php-parallel-lint/php-parallel-lint": "^1.4.0",
"phpoffice/phpspreadsheet": "^1.29.1",
"prestashop/autoindex": "^2.1",
"prestashop/php-dev-tools": "^5",
"prestashop/prestashop": "^8.1.7",
"roave/security-advisories": "dev-latest",
"slevomat/coding-standard": "^8.4",
"squizlabs/php_codesniffer": "^3.7.1",
"symfony/phpunit-bridge": "^v7.1.4"
"slevomat/coding-standard": "^8.15.0",
"squizlabs/php_codesniffer": "^3.10.2"
},
"replace": {
"prestashop/blockreassurance": "^5.0",
"prestashop/blockwishlist": "^2.1.2",
"prestashop/blockreassurance": "^5.1.4",
"prestashop/blockwishlist": "^3",
"prestashop/classic": "^2.0.0-beta",
"prestashop/contactform": "^v4.3.0",
"prestashop/contactform": "^4.3.0",
"prestashop/dashactivity": "^2",
"prestashop/dashgoals": "^2",
"prestashop/dashproducts": "^2",
"prestashop/dashtrends": "^2",
"prestashop/gamification": "^v2.4.0",
"prestashop/gamification": "^2.4.0",
"prestashop/graphnvd3": "^2",
"prestashop/gridhtml": "^2",
"prestashop/gsitemap": "^4",
"prestashop/pagesnotfound": "^2",
"prestashop/productcomments": "^5.0",
"prestashop/productcomments": "^7.0",
"prestashop/ps_banner": "^2",
"prestashop/ps_bestsellers": "^1.0",
"prestashop/ps_brandlist": "^1.0",
Expand All @@ -75,21 +77,21 @@
"prestashop/ps_customersignin": "^2",
"prestashop/ps_customtext": "^4",
"prestashop/ps_dataprivacy": "^2.0",
"prestashop/ps_distributionapiclient": "^1.0",
"prestashop/ps_emailalerts": "^v2.0",
"prestashop/ps_emailsubscription": "^v2.7.0",
"prestashop/ps_facetedsearch": "^v3.7.1",
"prestashop/ps_distributionapiclient": "^1.0.1",
"prestashop/ps_emailalerts": "^3.0",
"prestashop/ps_emailsubscription": "^2.7.0",
"prestashop/ps_facetedsearch": "^3.7.1",
"prestashop/ps_faviconnotificationbo": "^2",
"prestashop/ps_featuredproducts": "^2",
"prestashop/ps_googleanalytics": "^v4.0",
"prestashop/ps_googleanalytics": "^5.0",
"prestashop/ps_imageslider": "^3",
"prestashop/ps_languageselector": "^2",
"prestashop/ps_linklist": "^5",
"prestashop/ps_linklist": "^6",
"prestashop/ps_mainmenu": "^2",
"prestashop/ps_newproducts": "^1.0",
"prestashop/ps_searchbar": "^2",
"prestashop/ps_sharebuttons": "^2",
"prestashop/ps_shoppingcart": "^2",
"prestashop/ps_shoppingcart": "^3",
"prestashop/ps_socialfollow": "^2",
"prestashop/ps_specials": "^1.0",
"prestashop/ps_supplierlist": "^1.0",
Expand All @@ -114,9 +116,25 @@
"prestashop/statsregistrations": "^2",
"prestashop/statssales": "^2",
"prestashop/statssearch": "^2",
"prestashop/statsstock": "^2"
"prestashop/statsstock": "^2",
"symfony/polyfill-mbstring": "*",
"symfony/polyfill-php54": "*",
"symfony/polyfill-php55": "^1.10",
"symfony/polyfill-php56": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*"
},
"minimum-stability": "stable",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/PrestaShop/jwt"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"CryptWerk\\": "modules/cryptwerk/src"
Expand All @@ -141,7 +159,7 @@
"@install-codestandards"
],
"install-codestandards": [
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
"PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
]
}
}
Loading

0 comments on commit f4cc2cd

Please sign in to comment.