diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000000000..4d9d6119f --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,16 @@ +{ + "env": { + "browser": true, + "es2021": true, + "jquery": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "rules": { + "no-unused-vars": "warn", + "no-undef": "warn" + } +} diff --git a/Gruntfile.js b/Gruntfile.js index 77cbc58e6..7f562be77 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -76,16 +76,6 @@ module.exports = function (grunt) { flatten: true }] }, - 'jquery-ui-nested': { - files: [{ - expand: true, - src: [ - nodeDir + '/jquery-ui-nested/jquery-ui-nested.js', - ], - dest: assetsDir + '/jquery-ui-nested', - flatten: true - }] - }, 'spectrum-colorpicker': { files: [ { @@ -224,7 +214,6 @@ module.exports = function (grunt) { }, sass: { options: { - implementation: require('node-sass'), style: 'nested' }, dist: { diff --git a/README.md b/README.md index f1b607d94..1f87bb353 100755 --- a/README.md +++ b/README.md @@ -134,6 +134,14 @@ Want to help create a pull request from you clone, just make sure of few things * Request a feature branch if your pull request make major changes in our project or if you really need one. * Create a new issue before making any pull request. +### Developer Notes + +**Removal of `pclzip/pclzip`** + +The `pclzip/pclzip` library has been removed from the project's dependencies. Developers should now use PHP's native `ZipArchive` class for all ZIP file operations. This change was made to reduce the number of external dependencies and rely on PHP's built-in capabilities, which can lead to better performance and security. + +For more information on using `ZipArchive`, please refer to the [official PHP documentation](https://www.php.net/manual/en/class.ziparchive.php). + ### Support For any support related query, please visit our official support forum. diff --git a/composer.json b/composer.json index 73c8a4fb5..53c83de42 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "optimize-autoloader": true }, "require": { - "php": ">=7.2.0", + "php": ">=8.0", "ext-ctype": "*", "ext-json": "*", "ext-openssl": "*", @@ -42,17 +42,17 @@ "ext-mbstring": "*", "ext-gd": "*", "ezyang/htmlpurifier": "4.17.*", - "phpmailer/phpmailer": "6.5.*", - "pclzip/pclzip": "2.8.*", - "phpseclib/phpseclib": "2.0.*", + "phpmailer/phpmailer": "^6.9.1", + "phpseclib/phpseclib": "^3.0", "pensiero/php-openssl-cryptor": "0.1.*", - "google/recaptcha": "1.1.*", - "gettext/gettext": "4.8.*", + "google/recaptcha": "^1.3.0", + "gettext/gettext": "^5.0", "phpseclib/mcrypt_compat": "^1.0" } , "require-dev": { - "roave/security-advisories": "dev-latest" + "roave/security-advisories": "dev-latest", + "phpstan/phpstan": "^1.10" }, "suggest": { "ext-apcu": "Fast PHP user cache", diff --git a/oc-load.php b/oc-load.php index 11958f7f0..7a7e14ece 100755 --- a/oc-load.php +++ b/oc-load.php @@ -126,7 +126,6 @@ //osc_register_script('fancybox', osc_assets_url('js/fancybox/jquery.fancybox.pack.js'), array('jquery')); osc_register_script('jquery-treeview', osc_assets_url('jquery-treeview/jquery.treeview.js'), 'jquery'); -osc_register_script('jquery-nested', osc_assets_url('jquery-ui-nested/jquery-ui-nested.js'), 'jquery-ui'); osc_register_script('jquery-validate', osc_assets_url('jquery-validation/jquery.validate.min.js'), 'jquery'); osc_register_script('jquery-validate-additional', osc_assets_url('jquery-validation/additional-methods.min.js'), 'jquery-validate'); diff --git a/package.json b/package.json index e0e5c1e20..d4b03436c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "osclass", "devDependencies": { "@popperjs/core": "^2.9.2", - "eslint": "^6.8.0", + "eslint": "^8.0.0", "grunt": "^1.4.1", "grunt-cli": "^1.4.3", "grunt-contrib-clean": "^2.0.0", @@ -10,7 +10,7 @@ "grunt-contrib-uglify": "^5.2.2", "grunt-sass": "^3.1.0", "load-grunt-tasks": "^5.1.0", - "node-sass": "^9.0.0" + "sass": "^1.70.0" }, "description": "Osclass is a free and open script to create your advertisement or listings site. Best features: Plugins, themes, multi-language, CAPTCHA, dashboard, SEO friendly.", "scripts": { @@ -28,19 +28,18 @@ }, "homepage": "https://github.com/mindstellar/Osclass#readme", "dependencies": { - "bootstrap": "^5.0.*", - "bootstrap-icons": "^1.5.0", - "chart.js": "^3.5.0", - "jquery": "^3.6.0", - "jquery-migrate": "^3.3.2", + "bootstrap": "^5.3.0", + "bootstrap-icons": "^1.11.0", + "chart.js": "^4.4.0", + "jquery": "^3.7.0", + "jquery-migrate": "^3.4.1", "jquery-treeview": "^1.4.*", - "jquery-ui-dist": "^1.12.*", - "jquery-ui-nested": "^1.3.*", + "jquery-ui-dist": "^1.13.0", "jquery-validation": "^1.19.3", "npm-font-open-sans": "^1.1.*", - "osclass-legacy-assets": "github:mindstellar/osclass-legacy-assets#master", + "osclass-legacy-assets": "github:mindstellar/osclass-legacy-assets#8e05ff7ff33db46ba7a453376e00721f4fd9e72f", "sortablejs": "^1.14.0", "spectrum-colorpicker": "^1.8.*", - "tinymce": "^7.0.1" + "tinymce": "^7.1.0" } } diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 000000000..98d2bc584 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,11 @@ +parameters: + level: 0 # Start at the lowest level + paths: + - oc-admin + - oc-content + - oc-includes + # Add other relevant source directories if any + bootstrapFiles: + - oc-load.php + checkMissingIterableValueType: false + checkGenericClassInNonGenericObjectType: false