Download the PHP package genesis-brain/laravel-excel-import-analysis without Composer

On this page you can find all versions of the php package genesis-brain/laravel-excel-import-analysis. 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-excel-import-analysis

Genesis Brain Laravel Excel Imports Analysis

A reusable, rule-based Excel import analysis framework for Laravel. It provides structured per-row analysis, severity levels, contextual DTOs, and a clean import architecture that integrates seamlessly with Laravel Excel.

This package is designed to help you build robust, extensible, and maintainable Excel import pipelines in your Laravel applications.

✨ Features

πŸ“¦ Installation

Requires:

πŸš€ Basic Usage

1. Create an Import

2. Run the Import

If any analysis results are produced at or above the configured minimal level, an Gbrain\ExcelImports\Exceptions\ExcelImportNotPassedRulesValidation exception will be thrown. You can catch it to surface errors to users or logs.

πŸ” Controlling Analysis Execution: withAnalysis() and withoutAnalysis()

The AnalyzesData trait provides two important methods to control when analysis rules run during an import:

βœ… withAnalysis(bool $withoutImport = false) (default behaviour)

Enables analysis and allows you to decide whether the import should also run.

Since $onlyAnalysis is false by default, calling withAnalysis() without arguments means:

➑ Analysis runs ➑ Import also runs (if analysis passes)

You may optionally pass a boolean:

Example (normal mode):

β›” withoutAnalysis()

Disables all rule checks.

Use this when you want to:

Example:

πŸ”„ How it works internally

withAnalysis() and withoutAnalysis() work together using two internal flags:

According to the current implementation:

βœ” Default state

So calling withAnalysis() with no arguments:

βœ” Truth table

Method call $analyzeBeforeHandle $onlyAnalysis Effect
withAnalysis() true false Run analysis and then import
withAnalysis(false) true false Same as above
withAnalysis(true) true true Run analysis only, no import
withoutAnalysis() false false Skip analysis, run import only

βœ” What actually happens

Summary

This gives you full control over whether to run validation-only scans, full validated imports, or unvalidated imports.**, without changing your import class.

πŸ§ͺ Writing Custom Rules

Rules extend the abstract ExcelImportAnalysisRule and return an ExcelImportAnalysisResultDto when the rule fails.

Then register it in your import’s getRulesCollection() method.

πŸ“Š Severity Levels

The package ships with a built-in severity enum:

Levels are comparable using helper methods:

Internally, comparison is driven by PHP 8 attributes (ComparableValue) attached to each enum case.

🧱 Architecture Overview

πŸ§ͺ Testing

This package is designed to be test-friendly. Example Pest tests:

Run tests with:

πŸ“„ License

MIT


All versions of laravel-excel-import-analysis with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
laravel/framework Version ^12.0|^13.0
maatwebsite/excel Version ^4.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 genesis-brain/laravel-excel-import-analysis contains the following files

Loading the files please wait ...