Download the PHP package odinns/coding-style without Composer

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

Odinns Coding Style

Shared Rector and PHPStan defaults for Laravel projects.

This package gives Laravel apps a small, boring way to share static-analysis and automated-refactoring rules. The package owns the defaults. Each application owns its paths, baselines, ignore rules, and local skips.

That split matters. Shared config should describe current taste. Local config should describe local history.

Requirements

Installation

Install the published package as a development dependency:

The package installs Rector, PHPStan, Larastan, and the supported PHPStan extensions it configures.

Local Path Install

For local development, install this checkout into another Laravel project as a Composer path repository:

Then copy the starter config files:

If the consuming project already has rector.php or phpstan.neon, merge the package calls into the existing files instead of overwriting them.

Rector

Create a rector.php file in the consuming project:

Then add Composer scripts:

Run Rector in check mode:

Apply changes:

Local Rector skips

Keep skips in the consuming project:

Do not upstream local skip lists into this package. A skip caused by one app's history is not a coding standard.

PHPStan and Larastan

Create a phpstan.neon file in the consuming project:

Then add Composer scripts:

Run PHPStan:

Baselines

Baselines belong to the consuming project:

Generate a baseline:

Baselines are debt registers. Keep them local and shrink them when the code changes nearby.

Local ignores

Project-specific ignores also stay local:

If an ignore only makes sense in one app, it does not belong in this package.

Included Defaults

Rector

The shared Rector setup enables conservative automated improvements:

The package automatically uses the consuming project's phpstan.neon when it exists, falling back to phpstan.neon.dist. It also loads Larastan's bootstrap file when the consuming project has one installed.

PHPStan

The base PHPStan config enables:

The Larastan config adds:

Stubs

Copy-ready stubs are included:

They are deliberately plain files. No generator command. No plugin. No theatrical machinery.

Update Strategy

Use normal Composer updates:

After updating, run:

If Rector proposes a large change set, review it as a normal refactor. Automated does not mean harmless. It means repeatable.

Design Principles

What This Package Does Not Do

Testing With Pest

The package test suite uses Pest.

Add tests under tests/Unit:

Run the suite:

Developing This Package

Install dependencies:

Run all checks:

Run checks separately:

Contributing

Keep changes small and explain the behavior change. Add shared rules only when they are broadly useful across Laravel projects.

Do not add one application's skip list, baseline, or legacy exception to this package. That path leads to a swamp with invoices.

Security

If you discover a security issue, report it privately to the maintainer instead of opening a public issue.

License

The MIT License. See LICENSE.


All versions of coding-style with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
driftingly/rector-laravel Version ^2.3
larastan/larastan Version ^3.9
phpstan/phpstan Version ^2.1
phpstan/phpstan-deprecation-rules Version ^2.0
phpstan/phpstan-mockery Version ^2.0
rector/rector Version ^2.4
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 odinns/coding-style contains the following files

Loading the files please wait ...