Download the PHP package wieni/wmcodestyle without Composer

On this page you can find all versions of the php package wieni/wmcodestyle. 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 wmcodestyle

wmcodestyle

Latest Stable Version Total Downloads License

A set of Wieni best practices, coding standards and tools to enforce them.

Why?

Table of Contents

  1. Coding standards
  2. Tooling
    • Installation
    • Sync config files with your project
    • PHP-CS-Fixer
    • Rector
    • PHPStan
    • composer-normalize
    • Running code style fixers
  3. Changelog
  4. Security
  5. License
  6. Acknowledgments

Coding standards

Tooling

Installation

This package requires PHP 7.1 or higher and can be installed using Composer:

Sync config files with your project

This package provides a command to sync any file from this repository to your project. It is recommended to add it to the scripts section of composer.json so it is automatically executed at the appropriate time.

PHP-CS-Fixer

This package provides a configuration factory and multiple rule sets for friendsofphp/php-cs-fixer.

Configuration

Pick one of the rule sets:

Create a configuration file .php_cs.php in the root of your project:

By default, risky rules are not used. To use them, pass --allow-risky=yes to php-cs-fixer or set the WMCODESTYLE_RISKY=1 environment variable.

Git

All configuration examples use the caching feature, and if you want to use it as well, you should add the cache folder to .gitignore:

Configuration with override rules

:bulb: Optionally override rules from a rule set by passing in an array of rules to be merged in:

Rector

Instant upgrade and refactoring of your PHP code

This package provides multiple rule sets for rector/rector. These rule sets are largely identical to the default rule sets, with the exception of a couple individual rules we don't like/need. Instead of rector/rector, rector/rector-prefixed is added as dependency to make it easier to include this package in your Composer project.

Rule sets

Pick one of the rule sets:

Example configuration

Add Symfony container XML

To work with some Symfony rules, you now need to link your container XML file:

Dumping the container is not possible out-of-the-box when using Drupal, but our Container Dumper module makes this possible.

PHPStan

PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs even before you write tests for the code. It moves PHP closer to compiled languages in the sense that the correctness of each line of the code can be checked before you run the actual line.

Drupal

For better integration with Drupal, consider adding mglaman/phpstan-drupal and phpstan/phpstan-symfony to your project. These extensions are required when using the drupal-module or drupal-site configs.

You can use the Container Dumper module to dump the Symfony container to an XML file. The Symfony extension can then use this file to get better insights into your project. Add the following to your PHPStan config:

Symfony

For better integration with Symfony, consider adding phpstan/phpstan-symfony and phpstan/phpstan-doctrine to your project.

composer-normalize

Provides a composer plugin for normalizing composer.json.

We highly recommend this Composer plugin to make sure your composer.json is formatted consistently.

Running code style fixers

Makefile

If you like Makefiles, create a Makefile with a coding-standards target:

Run

to automatically fix coding standard violations.

Composer script

If you like composer scripts, add a coding-standards script to composer.json:

Run

Changelog

All notable changes to this project will be documented in the CHANGELOG file.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

License

Distributed under the MIT License. See the LICENSE file for more information.

Acknowledgments


All versions of wmcodestyle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1 || ^8.0
friendsofphp/php-cs-fixer Version ^3.0
phpstan/phpstan Version ^1.0
phpstan/phpstan-deprecation-rules Version ^1.0
phpstan/phpstan-strict-rules Version ^1.0
rector/rector Version ^0.13
symfony/console Version ^2.8 || ^3 || ^4 || ^5 || ^6
symfony/filesystem Version ^3 || ^4 || ^5 || ^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 wieni/wmcodestyle contains the following files

Loading the files please wait ....