Download the PHP package nkmryu/laravel-strong-migrations without Composer

On this page you can find all versions of the php package nkmryu/laravel-strong-migrations. 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 laravel-strong-migrations

Laravel Strong Migrations

Laravel Strong Migrations detects potentially dangerous database migrations before they are deployed. It brings the safety-oriented workflow of ankane/strong_migrations to Laravel projects using structural PHP AST analysis.

Requirements

Install

Install the package with Composer:

Publish the optional configuration file:

Usage

Lint the configured migration paths:

Use CI mode to fail when a finding meets the configured fail_on severity:

Use JSON output or override the paths when integrating with other tools:

Add #[SafetyAssured(reason: '...')] to a migration's anonymous class only after reviewing and accepting the operation's safety.

Rules

Rule Severity What it detects
DropColumnRule High Columns dropped while deployed application instances may still use them.
DropTableRule High Tables dropped while deployed application instances may still query them.
RenameColumnRule High Column renames that are incompatible with old application instances.
RenameTableRule High Table renames that are incompatible with old application instances.
ChangeColumnRule High Column changes that may lock or rebuild a table.
AddNotNullColumnRule High Required columns added without a default for existing rows.
RawDdlRule High Raw DDL that bypasses structural safety checks.
AddIndexRule Medium Index creation that may scan a table and block writes.
AddUniqueIndexRule Medium Unique index creation that may block writes or fail on duplicate data.

Configuration

The published config/strong-migrations.php file supports these keys:

Key Description
migration_paths Files and directories scanned by migration:lint. The default is database/migrations.
contract_paths Migration paths excluded from linting because they contain deliberate contract operations. In an expand/contract workflow, place migrations that remove old columns or tables here and run them only after all deployed code has stopped using the old schema. The default is database/migrations/post-deploy.
start_after An optional migration timestamp in YYYY_MM_DD_HHMMSS format. Migrations at or before this value are ignored, which lets an existing project adopt the package without reporting its full migration history. Newer migrations remain checked.
disabled_rules Rule class names to skip, such as AddIndexRule. Keep this list empty unless the project has a documented alternative safety control.
fail_on The minimum severity that makes migration:lint --ci fail. Use high to fail only on high-severity findings or medium to fail on both medium- and high-severity findings.

Safety assurance

Use SafetyAssured only when a specific migration has been reviewed and the reason can be recorded in code. Apply the attribute to the anonymous migration class:

Why

Zero-downtime schema changes usually follow the expand/contract pattern: add the new schema first, migrate application behavior and data, then remove the old schema later. During a deployment, old application instances may still run while migrations and new instances start, so an immediate rename or removal can break live requests. Laravel Strong Migrations catches operations that violate this overlap and points toward staged alternatives. This package is inspired by and pays respect to ankane/strong_migrations, which established this safety-oriented workflow for Rails applications.


All versions of laravel-strong-migrations with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^12.0|^13.0
nikic/php-parser Version ^5.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 nkmryu/laravel-strong-migrations contains the following files

Loading the files please wait ...