Download the PHP package koshuang/laravel-hexagonal without Composer

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

Laravel Hexagonal

Package CI Latest Stable Version License

Laravel scaffolding for modular Hexagonal Architecture (Ports and Adapters). It gives a fresh Laravel application a repeatable module structure without shipping an example domain into the application.

The complete Account money-transfer example lives in the companion repository:

https://github.com/koshuang/laravel-hexagonal-architecture

Requirements

Installation

The installer is idempotent. Existing files are preserved by default. Use --force only when intentionally replacing generated files:

Create a module:

New modules are registered as enabled in modules_statuses.json, which lets Nwidart load the generated module immediately. To scaffold a disabled module, use:

Custom stubs

The package ships with the default module, Shared contracts, and Deptrac stubs. Publish them when the application needs to customize the generated files:

The published files are placed under stubs/hexagonal. Subsequent runs of hexagonal:install and hexagonal:make-module use those files automatically. For a one-off module template, pass a different directory explicitly:

Custom module stubs must keep the filenames shipped by the package and may use the {{MODULE}}, {{MODULE_LOWER}}, {{MODULE_NAMESPACE}}, and {{PROVIDER}} placeholders.

The generated module has this dependency direction:

Generated structure

The installer also creates Modules/Shared/Domain/Contracts, a generic deptrac.yaml, and the Modules\\ PSR-4 autoload entry in the application. It adds deptrac/deptrac to the application's development dependencies so the architecture check is reproducible in local development and CI. It also adds nwidart/laravel-modules and enables its Composer merge plugin in the application root, because Composer plugin permissions are root-project configuration and cannot be inherited from a package.

The generated deptrac.yaml covers both app/ and Modules/. Carbon and Illuminate allowances can be disabled in config/hexagonal.php under deptrac.allowances before rerunning php artisan hexagonal:install --force.

Validate the dependency direction after adding module code:

The generated rules enforce Infrastructure -> Application -> Domain and do not allow Domain code to depend on Laravel framework classes.

Development

The package development suite includes:

The package keeps its external interface small: the Laravel service provider, the three Artisan commands, and the publishable stub set. File writing and module scaffolding are internal seams covered by unit tests.

Versioning

Releases follow Semantic Versioning. This project is pre-1.0: while the external interface is stable in practice, breaking changes land in 0.x minor bumps rather than a 1.0 major, so pin a ^0.<minor> constraint to stay stable during onboarding. The 0.x line targets Laravel 13 and PHP 8.4+. Laravel major-version support changes require a compatibility update in composer.json, CI, and this document.

Contributing

See CONTRIBUTING.md for development and pull request requirements. Changes are tracked in CHANGELOG.md.

License

This package is open-sourced software licensed under the MIT license.


All versions of laravel-hexagonal with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
illuminate/console Version ^13.0
illuminate/filesystem Version ^13.0
illuminate/support Version ^13.0
symfony/process Version ^7.4|^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 koshuang/laravel-hexagonal contains the following files

Loading the files please wait ...