Skip to content

Upgrade guide

This guide describes how to upgrade from v0.5.x to v0.6.x.

Updating the architecture configuration high impact

Aside from improved clarity, the changes below are motivated by an internal refactor that introduces a configuration object serving as the single source of truth for both the back-end and the front-end.

Architecture preset

The architecture.preset and architecture.domains_directory configurations have been removed. Instead, you may configure your desired architecture in a service provider.

If you were using modules, you will need to add the following in a service provider:

public function boot(Hybridly $hybridly): void

If you were using architecture.domains_directory with a different directory name, update domains accordingly in the snippet above.

To disable the default architecture, you will need to set architecture.load_default_module to false.

'architecture' => [
    'preset' => 'default',
		'load_default_module' => true,

Root view

The hybridly.root_view configuration option has been moved to hybridly.architecture.root_view. You will need to update your config/hybridly.php accordingly.

The \Hybridly\Hybridly::DEFAULT_ROOT_VIEW constant has been moved to Hybridly\Support\Configuration\Architecture::ROOT_VIEW and will need to be replaced in config/hybridly.php as well as other places it may be used.

use Hybridly\Hybridly;
use Hybridly\Support\Configuration\Architecture;

return [
    'root_view' => Hybridly::DEFAULT_ROOT_VIEW,
    'architecture' => [
        'root_view' => Architecture::ROOT_VIEW,

Other configuration options

The following configurations options have changed:

  • architecture.root has been renamed to architecture.root_directory
  • architecture.application has been updated to architecture.application_directory and architecture.application_main
'architecture' => [
    'root' => 'resources',
    'application' => 'resources/application/main.ts',
		'root_directory' => 'resources',
		'application_directory' => 'application',
		'application_main' => 'main.ts',

Updating to Vite 5 medium impact

Hybridly now depends on Vite 5. You will need to upgrade it.

Updating to ESM syntax medium impact

Vite is deprecating its CommonJS API, which means projects should migrate to EcmaScript Modules.

For projects already using ESM syntax, this is simply a matter of adding "type": "module" to package.json. For other projects, you will have to update the syntax in order to upgrade to v0.6.x.

Updating the force_case configuration medium impact

The following configuration options have been renamed and may need to be updated in config/hybridly.php:

  • hybridly.force_case.input ->
  • hybridly.force_case.output ->

Updating vite.config.ts low impact

Hybridly now embeds its own plugin to integrate with Laravel instead of relying on laravel/vite-plugin. This allows us to have more control over functionalities and updates.

You may remove the laravel property from the plugin if you were using it:

import { defineConfig } from 'vite'
import hybridly from 'hybridly/vite'

export default defineConfig({
	plugins: [
			laravel: {
				valetTls: true,

If you were specifying a custom input value through the laravel property, you may do so via build.rollupOptions.input instead.

Calls to Hybridly#flash low impact

The flash method of the Hybridly class, which was a convenience method for flashing data to the session, was deprecated and has been removed in this version.