Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ on: [push, pull_request]
jobs:
# Check there is no syntax errors in the project
php-linter:
name: PHP Syntax check 5.6 => 8.1
name: PHP Syntax check 7.2 => 8.2
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.0.0

- name: PHP syntax checker 5.6
uses: prestashop/github-action-php-lint/5.6@master
uses: actions/checkout@v3.1.0

- name: PHP syntax checker 7.2
uses: prestashop/github-action-php-lint/7.2@master
Expand All @@ -27,6 +24,9 @@ jobs:
- name: PHP syntax checker 8.1
uses: prestashop/github-action-php-lint/8.1@master

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

# Check the PHP code follow the coding standards
php-cs-fixer:
name: PHP-CS-Fixer
Expand All @@ -38,10 +38,10 @@ jobs:
php-version: '7.4'

- name: Checkout
uses: actions/checkout@v3.0.0
uses: actions/checkout@v3.1.0

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: vendor
key: php-${{ hashFiles('composer.lock') }}
Expand All @@ -58,26 +58,26 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
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']
presta-versions: ['1.7.7', '1.7.8', '8.0', 'latest']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Checkout
uses: actions/checkout@v3.0.0
uses: actions/checkout@v3.1.0

# Add vendor folder in cache to make next builds faster
- name: Cache vendor folder
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: vendor
key: php-${{ hashFiles('composer.lock') }}

# Add composer local folder in cache to make next builds faster
- name: Cache composer folder
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.composer/cache
key: php-composer-cache
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

Enrich your stats, display the pages requested by your visitors that could not be found.

## Compatibility

PrestaShop: `1.7.7.0` or later

## Reporting issues

You can report issues with this module in the main PrestaShop repository. [Click here to report an issue][report-issue].
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"require": {
"php": ">=5.6.0"
"php": ">=7.1.3"
},
"require-dev": {
"prestashop/php-dev-tools": "^4.3"
Expand Down
62 changes: 33 additions & 29 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>pagesnotfound</name>
<displayName><![CDATA[Pages not found]]></displayName>
<version><![CDATA[2.0.3]]></version>
<version><![CDATA[3.0.0]]></version>
<description><![CDATA[Displays the pages requested by your visitors that have not been found.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[analytics_stats]]></tab>
Expand Down
47 changes: 20 additions & 27 deletions pagesnotfound.php
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
<?php
/*
* 2007-2016 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2016 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/

/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
if (!defined('_PS_VERSION_')) {
exit;
}
Expand All @@ -36,15 +29,15 @@ public function __construct()
{
$this->name = 'pagesnotfound';
$this->tab = 'administration';
$this->version = '2.0.3';
$this->version = '3.0.0';
$this->author = 'PrestaShop';
$this->need_instance = 0;

parent::__construct();

$this->displayName = $this->trans('Pages not found', [], 'Modules.Pagesnotfound.Admin');
$this->description = $this->trans('Enrich your stats, display the pages requested by your visitors that could not be found.', [], 'Modules.Pagesnotfound.Admin');
$this->ps_versions_compliancy = ['min' => '1.7.1.0', 'max' => _PS_VERSION_];
$this->ps_versions_compliancy = ['min' => '1.7.7', 'max' => _PS_VERSION_];
}

public function install()
Expand Down
2 changes: 1 addition & 1 deletion tests/phpstan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/presta
# Clear previous instance of the module in the PrestaShop volume
echo "Clear previous module"

docker exec -t temp-ps rm -rf /var/www/html/modules/pagesnotfound
docker exec -t --user root temp-ps sh -c 'find /var/www/html/modules/pagesnotfound -type f -exec rm {} +'

# Run a container for PHPStan, having access to the module content and PrestaShop sources.
# This tool is outside the composer.json because of the compatibility with PHP 5.6
Expand Down
2 changes: 0 additions & 2 deletions tests/phpstan/phpstan-1.7.2.5.neon

This file was deleted.

2 changes: 0 additions & 2 deletions tests/phpstan/phpstan-1.7.3.4.neon

This file was deleted.

2 changes: 0 additions & 2 deletions tests/phpstan/phpstan-1.7.4.4.neon

This file was deleted.

2 changes: 0 additions & 2 deletions tests/phpstan/phpstan-1.7.5.1.neon

This file was deleted.

2 changes: 0 additions & 2 deletions tests/phpstan/phpstan-1.7.6.neon

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion upgrade/upgrade-2.0.2.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
Expand Down
Loading