Download the PHP package dev-reymark/laravel-source-encryptor without Composer

On this page you can find all versions of the php package dev-reymark/laravel-source-encryptor. 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-source-encryptor

Laravel Source Encryptor

Latest Version Total Downloads License Laravel Tests

Encrypt Laravel source code and safely distribute applications without exposing PHP source files. Converts your Laravel application's PHP files into encrypted code that is decrypted only at runtime, allowing you to distribute Laravel applications while protecting your intellectual property.

Features

Quick Installation

The source:install command will automatically publish the configuration file and securely generate and inject a SOURCE_ENCRYPTION_KEY into your .env file.

Usage

Build Production Distribution

The command will:

  1. Installs Composer dependencies (--no-dev)
  2. Installs npm dependencies if needed
  3. Builds frontend assets (Vite / React / Vue)
  4. Encrypts Laravel source files
  5. Bundles encrypted code into a runtime file
  6. Removes the original app/ directory
  7. Generates encrypted route loaders
  8. Create a clean distribution folder at dist/

Distribution Structure

The original app/ directory is removed. All encrypted source code is stored inside bootstrap/cache/source.enc.

Build Options

Skip frontend build:

By default, the build command will automatically attempt to run npm install and npm run build if it detects frontend assets. Use the --no-frontend flag to skip this process entirely. This is highly recommended for API-only applications or if you compile your frontend assets separately.

Skip composer install:

By default, the build command automatically runs composer install --no-dev inside the new dist/ directory. Use the --skip-composer flag to skip this step if you are running the build in a CI/CD pipeline or Docker environment where you prefer to handle Composer installation manually to utilize caching and speed up build times.

Configuration

You can customize the encryption behavior by modifying the config/source-encryptor.php file.

Excluding Directories from Encryption

If you have specific directories (or files) that you want to exclude from the encryption process (for example, if they need to be readable by third-party packages or contain specific assets), you can add them to the exclude array:

Any files inside these excluded paths will be copied over to the dist directory exactly as they are, without being encrypted.

Running the Encrypted Application

Laravel automatically loads encrypted classes through the runtime loader.

How It Works

  1. PHP files are compressed and encrypted using AES-256-CBC
  2. Encrypted code is bundled into bootstrap/cache/source.enc
  3. During runtime: Autoload request → EncryptedAutoloader → SourceLoader decrypts → PHP executes
  4. Decrypted source never persists on disk

Frontend Support

The build system automatically detects frontend environments:

Environment Behavior
API-only Laravel Skips frontend build
Laravel + Blade Skips if no build script
Vue Starter Kit Runs npm install + npm run build
React Starter Kit Runs npm install + npm run build
Vite Projects Fully supported

Requirements

Security Notes

License

MIT License

Author

Rey Mark Tapar

Website | GitHub


All versions of laravel-source-encryptor with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5 || ^8.0
illuminate/support Version ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.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 dev-reymark/laravel-source-encryptor contains the following files

Loading the files please wait ...