Download the PHP package drfraker/snipe-migrations without Composer

On this page you can find all versions of the php package drfraker/snipe-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 snipe-migrations

build status StyleCI

Snipe Migrations

Blazing fast database migrations for Laravel tests.

The package takes a snapshot of your mysql database and imports the schema to your test database rather than running all of your migrations when the test suite starts up.

If you have a project with many migration files, this process can provide you with a massive speed improvement when initializing your test suite. This package can be used as a replacement for the RefreshDatabase trait that is provided out of the box with Laravel.

As an example, we tested this on an application that takes about 4 seconds to run all migrations with RefreshDatabase. Using SnipeMigrations the tests start up in 200 ms.

Requirements

  1. Laravel >= 5.5
  2. PHP >= 7.1
  3. MySql or MariaDb, with separate database for testing.
    • For example if you have a development database for your application called amazingapp you would create a test database called amazingapp_test and add the details of the database in your phpunit.xml file. amazingapp_test is the database that Snipe will keep in sync for you.

Installation

Require the package using composer.

Usage

After you've installed the package via composer

  1. Add the SnipeMigrations trait to your tests/TestCase file. Don't forget to import the class at the top of the file. Once you have added the SnipeMigrations trait, simply use the RefreshDatabase trait in any tests in which you wish to use database access, and Snipe will handle the rest for you.

When you're done, your tests/TestCase.php file should look like this.

  1. By default, SnipeMigrations will store a .snipe file and the snipe_snapshot.sql file in /vendor/drfraker/snipe-migrations/snapshots. If you would like to change the location of the files follow the directions below to publish the snipe config file.

    • To publish the snipe config file, run php artisan vendor:publish and select snipe-config from the list.
  2. If the snipe_snapshot.sql file gets out of sync for any reason you can clear it by running php artisan snipe:clear. After running this command your original database migrations will run again creating a new snipe_snapshot.sql file.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT


All versions of snipe-migrations with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^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 drfraker/snipe-migrations contains the following files

Loading the files please wait ....