Download the PHP package phpro/magento-conventions without Composer

On this page you can find all versions of the php package phpro/magento-conventions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package magento-conventions

GrumPHP Magento Convention

This package is to be required on all PHPro's Magento projects.

Configuration

The project grumphp.yml should contain at least:

Configurable parameters

GENERAL

Parameter Default Info
root_conventions_dir vendor/phpro/magento-conventions/Conventions/ Relative path to the root directory of the convention installation

PHPCS

Parameter Default Info
phpcs.standard [ Magento2, PSR2 ] The standards to check code styling
phpcs.severity ~ Global severity level
phpcs.warning_severity ~ Warning severity level
phpcs.error_severity ~ Error severity level
phpcs.whitelist_patterns [ '/^app\/code\/(.*)/' ] Whitelist patterns to check code styling
phpcs.ignore_patterns [ "Test/Unit", "Setup/Patch/Data", "Setup/Upgrade", "Setup/Install" ] Ignore patterns
phpcs.exclude [ Magento2.Functions.StaticFunction, Magento2.Exceptions.DirectThrow, Magento2.Exceptions.ThrowCatch, Magento2.Commenting.ClassAndInterfacePHPDocFormatting, Magento2.Commenting.ClassPropertyPHPDocFormatting, Magento2.Commenting.ConstantsPHPDocFormatting, Magento2.Annotation.MethodAnnotationStructure, Magento2.Annotation.MethodArguments ] Bullet list of excluded sniffs
phpcs.triggered_by [ php ] Triggered by

PHP CS FIXER

If you want to change the rules or check paths, we recommend to create and use your own .php-cs-fixer.php file in your project.

Parameter Default Info
phpcs_file cs/.php-cs-fixer.php Relative path to CS config file
phpcsfixer.allow_risky ~ Allow risky
phpcsfixer.cache_file ~ Create a .php_cs cache file
phpcsfixer.config '%root_dir%%phpcs_file%' Path to php CS config file
phpcsfixer.rules [ ] Add custom rules
phpcsfixer.using_cache ~ Use caching
phpcsfixer.config_contains_finder true Configuration file uses a finder
phpcsfixer.verbose true Verbose
phpcsfixer.diff false Diff
phpcsfixer.triggered_by [ 'php' ] Php triggered by files

PHPLINT

Parameter Default Info
phplint.exclude [ 'vendor' ] Excluded directories
phplint.jobs ~ Lint jobs
phplint.short_open_tag false Short open tags
phplint.ignore_patterns [ ] ignore patterns
phplint.triggered_by [ 'php', 'phtml' ] Triggered by files

PHPSTAN

For existing Magento 2 project, we recommend to set the level to 1 or 0 and fix the issues you encounter.

The minimal PHPStan version in your project should be 0.12.65 to ensure the excludePaths config will work.

Parameter Default Info
phpstan_file phpstan/phpstan.neon Relative path to PHPStan neon file
phpstan.autoload_file ~ Autoload files
phpstan.configuration '%root_dir%%phpstan_file%' Path to configuration file
phpstan.level 5 Level of PHPstan (0-8)
phpstan.triggered_by [ 'php' ] PHPStan triggered files
phpstan.memory_limit "-1" Memory limit PHPStan uses
phpstan.use_grumphp_paths true Use GrumPHP paths
phpstan.ignore_patterns [ "/Test/", "/Setup/", "pub/" ] Ingore patterns

PHPUNIT

Make sure you create a phpunit.xml file in your project root.

Parameter Default Info
phpunit.config_file ~ Path to phpunit.xml
phpunit.testsuite ~ Run tests for certain suite
phpunit.group [ ] Run tests for certain group
phpunit.always_execute true Always run the whole test suite, even if no PHP files were changed
phpunit.order null Run tests in a specific order

COMPOSER

Parameter Default Info
composer.file ./composer.json File location
composer.no_check_all false Check all
composer.no_check_lock true Check lock file
composer.no_check_publish true Check publish
composer.no_local_repository true Check for local repo's
composer.with_dependencies true Check dependencies
composer.strict false Set composer to strict

GIT

Parameter Default Info
git.project PROJECT Project abbreviation code used in Jira. Use (FOO|BAR) for multiple projects
git_commit_message.matchers ['/%git.project%-([0-9]*)/'] Match commit message to PROJECT-{number}...
git_commit_message.max_subject_width 70 Git commit subject message length
git_commit_message.max_body_width 80 Git commit body message length
git_commit_message.case_insensitive true Message is case sensitive
git_commit_message.multiline true Message can contain multiple lines
git_branch_name.blacklist [ "development", "production", "staging", "master", "infra" ] List of non-wanted branch names
git_branch_name.whitelist Check phpro-grumphp.yml itself Allowed branch names
git_blacklist.keywords Check phpro-grumphp.yml itself Disallowed words
git_blacklist.triggered_by ['php', 'js', 'html', 'phtml'] Triggered by files
git_branch_name.allow_detached_head true Allow detached head

FILE SIZE

Parameter Default Info
file_size.size 5M The maximum file size
file_size.ignore_patterns [ ] Patterns that will be ignored

CLOVER

Parameter Default Info
clover_coverage.clover_file ./.clover.xml The maximum file size
clover_coverage.minimum_level 20 Clover minimum level, this will hard fail if not reached
clover_coverage.target_level 80 Clover target level, this will soft fail if not reached

SECURITYCHECKER COMPOSERAUDIT

Parameter Default Info
securitychecker_composeraudit.format null
securitychecker_composeraudit.locked true
securitychecker_composeraudit.no_dev false
securitychecker_composeraudit.run_always true
securitychecker_composeraudit.working_dir null
securitychecker_composeraudit.abandoned ignore Ignore abandoned packages, Magento uses some

All versions of magento-conventions with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
composer-plugin-api Version >=2.4
dealerdirect/phpcodesniffer-composer-installer Version ~0.5 || ~0.7 || ~1.0
magento/magento-coding-standard Version *
php-cs-fixer/shim Version ^3.57
php-parallel-lint/php-parallel-lint Version ^1.3
phpro/grumphp-shim Version ^2
phpstan/phpstan Version ^1.12 || ^2.0
phpunit/phpunit Version ~6.5.0 || ^9 || ^10 || ^11
squizlabs/php_codesniffer Version ~3.4 || ~3.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phpro/magento-conventions contains the following files

Loading the files please wait ...