Download the PHP package dragon-code/codestyler without Composer

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

The Dragon Code Styler

Codestyler

Stable Version Total Downloads

[!NOTE]

Codestyler 5 is the last version that runs on its own code and includes a mechanism for publishing files via command parameters. It is also the last version installed globally via Composer.

Starting with Codestyler 6, the project will contain pint.json and .editorconfig files, and adding them to the project will be done by calling a console command.

Installation

You can install the package using Composer:

It is also possible to establish dependence in the global area of visibility:

After installing the dependency, add a file copy command to the scripts.post-update-cmd section. This will automatically copy the pint.json file to the project root.

When adding the command, replace 8.5 with the minimum PHP version your application works with. Available presets: 8.2, 8.3, 8.4 and `8.5.

You can also add copying the .editorconfig file to help the IDE and calling normalize the composer.json file and biome.json file for Biome Linter:

When using a globally established dependence, the call must be replaced with the following:

For JS, CSS, JSON

If it is necessary to correct the code style for JS, CSS and JSON, you need to separately set the dependence through the NPM package manager (or any other):

After that, write the commands in the package.json file:

Usage

PHP Linter

Laravel Pint is used as the linter for PHP.

The linter is invoked by a console command:

Rector

Rector is uses as the code rector for PHP.

The Rector is invoked by a console command:

To do this, make sure the file is in the root of the project. You can also automate this process by adding a call to the file copy function in the scripts.post-update-cmd section of the composer.json file.

Available presets:

Node Linter

Biome is used as the linter for JS, CSS and JSON.

Make sure the biome.json file is in the root of the project. You can also automate this process by adding a call to the file copy function in the scripts.post-update-cmd section of the composer.json file:

EditorConfig

The .editorconfig file helps your IDE to work according to certain rules.

To do this, make sure the file is in the root of the project. You can also automate this process by adding a call to the file copy function in the scripts.post-update-cmd section of the composer.json file.

Composer Normalize

We recommend using the Composer Normalize plugin, which normalizes the composer.json file appearance to match its schema. This will keep each project's file consistent, making it much easier to read.

To activate the plugin, call the console command:

To use this feature, add a call parameter to the post-update-cmd block of the composer.json file:

Now you can just a run console command:

Finalized composer.json

After completing all the steps, the composer.json file will have the following changes:

Finalized package.json

After completing all the steps, the package.json file will have the following changes:

GitHub Actions

To use the Linter with GitHub Actions, just create a file .github/workflows/code-style.yml and insert this content into it:

Defaults:

IDE

After executing the composer update console command, a .editorconfig file will be added to your application. If the file already exists, it will be replaced.

In order for your IDE to read the code style settings from it, make sure its support is enabled in the settings.

For example, in phpStorm the setting is in the File | Settings | Editor | Code Style:

image

License

This package is licensed under the MIT License.


All versions of codestyler with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
driftingly/rector-laravel Version ^2.1.8
ergebnis/composer-normalize Version ^2.48.2
laravel/pint Version ^1.26
symfony/console Version ^7.4 || ^8.0
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 dragon-code/codestyler contains the following files

Loading the files please wait ...