Skip to content

Upgrade guide

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

Updating calls to defineLayout and defineLayoutProperties high impact

The defineLayout and defineLayoutProperties utils were removed. Instead, you may use defineOptions, a macro provided by Vue 3.3+.

Before:

ts
defineLayout(main)
defineLayoutProperties({
	fullscreen: false,
})

After:

ts
defineOptions({
	layout: main,
	properties: {
		fullscreen: false,
	},
})

Manually import previously auto-imported TypeScript utilities high impact

The way Hybridly imports TypeScript files has changed, and some files which exports would previously be auto-imported will no longer be.

You may use loadTypeScriptFilesFrom to instruct Hybridly to load them, or simply manually import them.

Update the recursive arguments of loadModuleFrom low impact

The recursive argument of the loadModuleFrom, loadModulesFrom and loadModule methods has been renamed to deep to better reflect what it does. If you were using named parameters, you will have to update your code accordingly.

Remove the php options on the Vite plugin low impact

This option was used to specify the path to the PHP executable. This is no longer supported. You should use the PHP_EXECUTABLE_PATH environment variable instead.

ts
export default defineConfig({
	plugins: [
		hybridly({
			php: 'custom/path/to/php'
		}),
	],
})

Replace useContext by getRouterContext low impact

useContext has been replaced by getRouterContext. You will need to update calls accordingly:

ts
const url = useContext().value?.url 
const url = getRouterContext()?.url 

Update view identifiers to be lowercase low impact

If you were loading page components in your back-end directories using loadModule, you may have gotten mixed-case component identifiers, like foo::Bar.Baz.index.

This was fixed in v0.7, and you will need to update these calls to lowercase: foo::bar.baz.index.