A small CLI tool to check missing dependency declarations in the composer.json and module.xml

Overview

Integrity checker

Package allows to run static analysis on Magento 2 Module Packages to provide an integrity check of package.

Supported tools:

  • Composer.json package dependencies checker - check *.php and *.phtml on a subject if other packages used inside and check if corresponding module/package is declared as required in composer.json.
  • Module.xml dependencies checker - analyse if packages' etc/module.xml file contains in 'sequence' section all Magento 2 modules which classes are used in *.php and *.phtml files of the package.
  • Package structure checker - verify if all newly added Magento 2 modules has a proper structure with all required files.

Standalone Installation

  1. Add your access token to auth.json (see how to create access token).
composer config --global --auth gitlab-token.gitlab.com {ACCESS_TOKEN}
  1. Install project from gitlab repository
composer create-project run_as_root/integrity-checker --repository-url="{\"type\": \"vcs\", \"url\": \"[email protected]:oleksandr.kravchuk1/integrity-checker.git\"}" -s dev integrity-checker dev-development --remove-vcs

Package Installation

  1. Add Gitlab repository to list of available repositories for your project composer.json
composer config repositories.integrity-checker '{"type": "vcs", "url": "[email protected]:oleksandr.kravchuk1/integrity-checker.git"}'
  1. Add your access token to auth.json (see how to create access token).
composer config --global --auth gitlab-token.gitlab.com {ACCESS_TOKEN}
  1. Change packages minimum stability to dev (required during development only.
composer config minimum-stability dev 
  1. Install package via composer
composer require --dev run_as_root/integrity-checker dev-development

Usage

Dependencies Checker

bin/dependencies {magento root} {folder} {folder2} {folder3}

{magento root} - path to Magento 2 project root directory. Tool require composer.lock to be defined. All packages inside {folder}'s will be recognized by composer.json file. {folder} - expected to be relative inside the magento root folder. Dependencies check will be run for composer.json and etc/module.xml together.

Module Structure Checker

bin/structure {magento root} {folder} {folder2} {folder3}

{magento root} - path to Magento 2 project root directory. Tool collects all packages in {folder} by registration.php files. For each module it compares current structure with Standard structure and print diff, if Standard structure was not followed.

Standard package structure:

docs
src
  etc
    module.xml
README.md
composer.json
registration.php
You might also like...
World countries - available in multiple languages, in CSV, JSON, PHP, SQL and XML formats

Constantly updated lists of world countries and their associated alpha-2, alpha-3 and numeric country codes as defined by the ISO 3166 standard, available in CSV, JSON , PHP, SQL and XML formats, in multiple languages and with national flags included; also available are the ISO 3166-2 codes of provinces/ states associated with the countries

Victor The Cleaner for Composer - This tool removes unnecessary files and directories from Composer vendor directory.

Victor The Cleaner for Composer This tool removes unnecessary files and directories from Composer vendor directory. The Cleaner leaves only directorie

The easiest way to match data structures like JSON/PlainText/XML against readable patterns. Sandbox:

PHP Matcher Library created for testing all kinds of JSON/XML/TXT/Scalar values against patterns. API: PHPMatcher::match($value = '{"foo": "bar"}', $p

Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel
Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel

Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel , mapping of any format, Google Sheet, data and price modification, improved speed and a lot more!

Sistema disema con aplicación de consultas en XML y JSON

disema-XML-JSON Sistema web para empresa de diseño "Disema", con operaciones básicas CRUD y uso de html, JQ, JS, php y css. Incluye aplicación de cons

laminas-xml2json provides functionality for converting XML structures to JSON

laminas-xml2json This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Stee

Proof of concept for a WordPress plugin check tool.

Plugin Check Proof of concept for a WordPress plugin check tool. For now, this is limited to WP-CLI usage. Eventually, the real plugin checker should

JsonCollectionParser - Event-based parser for large JSON collections (consumes small amount of memory)

Event-based parser for large JSON collections (consumes small amount of memory). Built on top of JSON Streaming Parser This packa

Allows generate class files parse from json and map json to php object, including multi-level and complex objects;

nixihz/php-object Allows generate class files parse from json and map json to php object, including multi-level and complex objects; Installation You

Comments
  • Versions

    Versions

    Me, Dmytro and Vlad have discovered that latest changes to integrity checker works too good. Pipelines has failed - because js and XML dependencies have not been taken into account earlier. We think it would be wise to add possibility for projects to choose which version of integrity checker we can use - like adjusting pipeline config with introducing VERSION variable https://raw.githubusercontent.com/run-as-root/gitlab-pipeline-templates/e5b80914df650b4b76c4e5d050c827c96e3629c5/magento2/integrity-checker.yml

    opened by den-slepnev98 7
  • Detect dependency in JavaScript components

    Detect dependency in JavaScript components

    In case we use a JavaScript component in Module1 from Module2 - Module1 should require Module2

    Example:

    define([
        'Magento_Module2/js/action',
    ], function (action) {
        'use strict';
    
    }
    

    So this module should require Module1

    opened by VladyslavSikailo 0
Releases(1.1.0)
  • 1.1.0(Nov 8, 2022)

  • 1.0.0(Nov 7, 2022)

    What's Changed

    • Fix typos by @sprankhub in https://github.com/run-as-root/Magento-2-Dependency-Checker/pull/2

    New Contributors

    • @sprankhub made their first contribution in https://github.com/run-as-root/Magento-2-Dependency-Checker/pull/2

    Full Changelog: https://github.com/run-as-root/Magento-2-Dependency-Checker/commits/1.0.0

    Source code(tar.gz)
    Source code(zip)
Owner
run_as_root GmbH
remote first eCommerce Agency
run_as_root GmbH
YCOM Impersonate. Login as selected YCOM user 🧙‍♂️in frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

Friends Of REDAXO 17 Sep 12, 2022
JSONFinder - a library that can find json values in a mixed text or html documents, can filter and search the json tree, and converts php objects to json without 'ext-json' extension.

JSONFinder - a library that can find json values in a mixed text or html documents, can filter and search the json tree, and converts php objects to json without 'ext-json' extension.

Eboubaker Eboubaker 2 Jul 31, 2022
This tool check syntax of PHP files faster than serial check with fancier output.

PHP Parallel Lint This application checks syntax of PHP files in parallel. It can output in plain text, colored text, json and checksyntax formats. Ad

PHP Parallel lint 202 Dec 22, 2022
PHP Parallel Lint - This tool check syntax of PHP files faster than serial check with fancier output

PHP Parallel Lint This application checks syntax of PHP files in parallel. It can output in plain text, colored text, json and checksyntax formats. Ad

PHP Parallel lint 156 Apr 24, 2022
Library for check dependency between modules inside projects

PHP Dependency analyzer PHP DA is tool for check and support dependencies inside your project clear. For example: You have project with 3 root namespa

Kir Apukhtin 12 Nov 15, 2022
A composer plugin, to install differenty types of composer packages in custom directories outside the default composer default installation path which is in the vendor folder.

composer-custom-directory-installer A composer plugin, to install differenty types of composer packages in custom directories outside the default comp

Mina Nabil Sami 136 Dec 30, 2022
Provide CSV, JSON, XML and YAML files as an Import Source for the Icinga Director and optionally ship hand-crafted additional Icinga2 config files

Icinga Web 2 Fileshipper module The main purpose of this module is to extend Icinga Director using some of it's exported hooks. Based on them it offer

Icinga 25 Sep 18, 2022
An installer package that let's you install NodeJS and NPM as a Composer dependency.

NodeJS installer for Composer This is an installer that will download NodeJS and NPM and install them in your Composer dependencies. Installation is s

TheCodingMachine 106 Sep 30, 2022
Learning about - Basic HTML & CSS, JSON, XML, Session & Cookies, CRUD Operations in Php using MySQL and Create MVC from scratch

This Project is based on course CSC 3215. Learning about - Basic HTML & CSS, JSON, XML, Session & Cookies, CRUD Operations in Php using MySQL and Create MVC (Model–View–Controller) from scratch. Just learning about web technologies, Not focusing on UI (Bootstrap or other 3rd-Party UI libraries or frameworks).

Alvi Hasan 5 Sep 21, 2022
The main website source code based on php , html/css/js and an independent db system using xml/json.

jsm33t.com Well umm, a neat website LIVE SITE » View Demo · Report Bug · Request a feature About The Project Desc.. Built Using Php UI Frameworks Boot

Jasmeet Singh 5 Nov 23, 2022