Skip to content

Upgrading livewire/livewire 0.7 to 1

Breakingv0.7.4 → v1.3.9Breaking11New38Changed9Fixed69Other2

BreakingUpgrade verdict

10 breaking changes.

  • When you pass data into a Livewire component, you now name each value instead of just listing them in order.
  • The single tag that loaded Livewire's CSS and JavaScript is split into two tags, one for styles in the head and one for scripts at the end of the body.
  • Vue.js integration that was announced with version 1.0 is no longer supported.
  • Livewire no longer includes Vue integration out of the box. If you still want Vue, install the separate plugin.
Top 3 of 10 that need code or config changes

Moves illuminate/database ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0 → ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0, illuminate/support ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0 → ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0, illuminate/validation ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0 → ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0. Your build may pick other versions.

Breaking10
Converts initial component parameters from positional values to a key=>value array.
@livewirekey()
Replaces @livewireAssets with separate @livewireStyles and @livewireScripts directives.
@livewireAssets@livewireStyles@livewireScripts
Removes support for VueJS, which was advertised during the 1.0 bump.
Removes Vue component support from core; a separate plugin is available for Vue users.
Removes the entire wire:transition API; use AlpineJS transitions instead.
wire:transition
Removes the entire transition API (wire:transition).
wire:transition
Removes Vue component integration support, moved to a separate repository.
Moves published default stubs to the /stubs directory with new filenames.
artisan livewire:stubartisan make:livewire
Removes support for custom, named stubs.
artisan livewire:stub
Removes the --stub option from artisan make:livewire, so components can no longer be created from custom stubs.
artisan make:livewire--stub

Generated by DepDelta from published PHP source. Not mixed with prose notes.

  • removed: class LivewireJavaScriptAssets
  • removed: method LivewireJavaScriptAssets.maps()
  • removed: method LivewireJavaScriptAssets.pretendResponseIsFile($file)
  • removed: method LivewireJavaScriptAssets.source()
  • removed: method LivewireManager.assets($options = …)
  • removed: method LivewireManager.dehydrate($instance, $response)
  • removed: method LivewireManager.hydrate($instance, $request)
  • removed: method LivewireManager.initialDehydrate($instance, $response)
  • removed: method LivewireManager.initialHydrate($instance, $request)
  • removed: method LivewireManager.prefix($prefix = …)
  • removed: method LivewireManager.registerHydrationMiddleware(array $classes)
  • removed: method LivewireManager.registerInitialDehydrationMiddleware(array $callables)
  • removed: method LivewireManager.registerInitialHydrationMiddleware(array $callables)
  • removed: protected method DependencyResolverTrait.alreadyInParameters($class, array $parameters)
  • removed: protected method DependencyResolverTrait.spliceIntoParameters(array &$parameters, $offset, $value)
  • removed: protected method DependencyResolverTrait.transformDependency(ReflectionParameter $parameter, $parameters)
  • removed: protected method LivewireJavaScriptAssets.httpDate($timestamp)
  • removed: protected method LivewireJavaScriptAssets.matchesCache($lastModified)
  • removed: protected property LivewireManager.hydrationMiddleware
  • removed: protected property LivewireManager.initialDehydrationMiddleware
  • removed: protected property LivewireManager.initialHydrationMiddleware
  • removed: protected property LivewireManager.prefix
  • removed: static method LivewireBladeDirectives.livewireAssets($expression)
  • changed: method LivewireManager.mount($name, ...$options) → method LivewireManager.mount($name, $params = …)
  • changed: method LivewireManager.test($name, ...$params) → method LivewireManager.test($name, $params = …)
  • changed: protected method LivewireManager.javaScriptAssets($options, $defer = …) → protected method LivewireManager.javaScriptAssets($options)
  • added: class CreateBladeViewFromString extends Component
  • added: class FileUploadConfiguration
  • added: class GenerateSignedUploadUrl
  • added: class LivewireTagCompiler extends ComponentTagCompiler
  • added: class TemporaryUploadedFile extends UploadedFile
  • added: constructor TemporaryUploadedFile($path, $disk)
  • added: method Component.forgetComputed($key = …)
  • added: method CreateBladeViewFromString.__invoke($contents)
  • added: method CreateBladeViewFromString.render()
  • added: method GenerateSignedUploadUrl.forLocal()
  • added: method GenerateSignedUploadUrl.forS3($file, $visibility = …)
  • added: method LivewireManager.isLaravel7()
  • added: method LivewireTagCompiler.compile($value)
  • added: method Redirector.away($path, $status = …, $headers = …)
  • added: method RegistersHydrationMiddleware.dehydrate($instance, $response)
  • added: method RegistersHydrationMiddleware.dehydrateProperty($callback)
  • added: method RegistersHydrationMiddleware.hydrate($instance, $request)
  • added: method RegistersHydrationMiddleware.hydrateProperty($callback)
  • added: method RegistersHydrationMiddleware.initialDehydrate($instance, $response)
  • added: method RegistersHydrationMiddleware.initialHydrate($instance, $request)
  • added: method RegistersHydrationMiddleware.performDehydrateProperty($value, $property, $instance)
  • added: method RegistersHydrationMiddleware.performHydrateProperty($value, $property, $instance)
  • added: method RegistersHydrationMiddleware.registerHydrationMiddleware(array $classes)
  • added: method RegistersHydrationMiddleware.registerInitialDehydrationMiddleware(array $callables)
  • added: method RegistersHydrationMiddleware.registerInitialHydrationMiddleware(array $callables)
  • added: method TemporaryUploadedFile.delete()
  • added: method TemporaryUploadedFile.exists()
  • added: method TemporaryUploadedFile.extractOriginalNameFromFilePath($path)
  • added: method TemporaryUploadedFile.get()
  • added: method TemporaryUploadedFile.getClientOriginalName()
  • added: method TemporaryUploadedFile.getFilename()
  • added: method TemporaryUploadedFile.getMimeType()
  • added: method TemporaryUploadedFile.getRealPath()
  • added: method TemporaryUploadedFile.getSize()
  • added: method TemporaryUploadedFile.isValid()
  • added: method TemporaryUploadedFile.readStream()
  • added: method TemporaryUploadedFile.serializeForLivewireResponse()
  • added: method TemporaryUploadedFile.storeAs($path, $name, $options = …)
  • added: method TemporaryUploadedFile.temporaryUrl()
  • added: method WithFileUploads.finishUpload($name, $tmpPath, $isMultiple)
  • added: method WithFileUploads.removeUpload($name, $tmpFilename)
  • added: method WithFileUploads.startUpload($name, $fileInfo, $isMultiple)
  • added: method WithFileUploads.uploadErrored($name, $errorsInJson, $isMultiple)
  • added: method WithPagination.resetPage()
  • added: method WithPagination.resolvePage()
  • added: protected method Component.ensureIdPropertyIsntOverridden()
  • added: protected method DependencyResolverTrait.resolveClass(ReflectionParameter $parameter)
  • added: protected method DependencyResolverTrait.resolveDependencies(array $dependencies, $parameters)
  • added: protected method DependencyResolverTrait.resolvePrimitive(ReflectionParameter $parameter)
  • added: protected method DependencyResolverTrait.unresolvablePrimitive(ReflectionParameter $parameter)
  • added: protected method GenerateSignedUploadUrl.headers($signedRequest, $fileType)
  • added: protected method LivewireServiceProvider.registerTagCompiler()
  • added: protected method LivewireTagCompiler.compileLivewireSelfClosingTags($value)
  • added: protected method LivewireTagCompiler.componentString(string $component, array $attributes)
  • added: protected method WithFileUploads.cleanupOldUploads()
  • added: protected method WithFileUploads.dehydratePropertyFromWithFileUploads($name, $value)
  • added: protected method WithFileUploads.hydratePropertyFromWithFileUploads($name, $value)
  • added: protected property RegistersHydrationMiddleware.hydrationMiddleware
  • added: protected property RegistersHydrationMiddleware.initialDehydrationMiddleware
  • added: protected property RegistersHydrationMiddleware.initialHydrationMiddleware
  • added: protected property RegistersHydrationMiddleware.propertyDehydrationMiddleware
  • added: protected property RegistersHydrationMiddleware.propertyHydrationMiddleware
  • added: protected property TemporaryUploadedFile.path
  • added: protected property TemporaryUploadedFile.storage
  • added: protected static method FileUploadConfiguration.directory()
  • added: protected static method FileUploadConfiguration.s3Root()
  • added: static method FileUploadConfiguration.disk()
  • added: static method FileUploadConfiguration.diskConfig()
  • added: static method FileUploadConfiguration.isUsingS3()
  • added: static method FileUploadConfiguration.middleware()
  • added: static method FileUploadConfiguration.path($path = …, $withS3Root = …)
  • added: static method FileUploadConfiguration.rules()
  • added: static method FileUploadConfiguration.storage()
  • added: static method TemporaryUploadedFile.canUnserialize($subject)
  • added: static method TemporaryUploadedFile.createFromLivewire($filePath)
  • added: static method TemporaryUploadedFile.generateHashNameWithOriginalNameEmbedded($file)
  • added: static method TemporaryUploadedFile.serializeMultipleForLivewireResponse($files)
  • added: static method TemporaryUploadedFile.unserializeFromLivewireRequest($subject)
  • added: trait RegistersHydrationMiddleware
  • added: trait WithFileUploads
  • removed: class StubCommand extends Command
  • removed: method StubCommand.handle()
  • removed: protected method StubCommand.createClassStubIfDoesNotExist()
  • removed: protected method StubCommand.createViewStubIfDoesNotExist()
  • removed: protected method StubCommand.ensureDirectoryExists($path)
  • removed: protected property ComponentParser.stubClassPath
  • removed: protected property ComponentParser.stubViewPath
  • removed: protected property StubCommand.description
  • removed: protected property StubCommand.parser
  • removed: protected property StubCommand.signature
  • changed: constructor ComponentParser($classNamespace, $viewPath, $rawCommand, $stub = …) → constructor ComponentParser($classNamespace, $viewPath, $rawCommand)
  • changed: method ComponentParser.classContents() → method ComponentParser.classContents($inline = …)
  • changed: method ComponentParserFromExistingComponent.classContents() → method ComponentParserFromExistingComponent.classContents($inline = …)
  • changed: protected method CopyCommand.copyClass($force) → protected method CopyCommand.copyClass($force, $inline)
  • changed: protected method MakeCommand.createClass($force = …) → protected method MakeCommand.createClass($force = …, $inline = …)
  • changed: protected method MakeCommand.createView($force = …) → protected method MakeCommand.createView($force = …, $inline = …)
  • added: class S3CleanupCommand extends Command
  • added: class StubsCommand extends Command
  • added: method S3CleanupCommand.handle()
  • added: method StubsCommand.handle()
  • added: protected property S3CleanupCommand.description
  • added: protected property S3CleanupCommand.signature
  • added: protected property StubsCommand.description
  • added: protected property StubsCommand.parser
  • added: protected property StubsCommand.signature
  • removed: protected method HandlesActions.callBeforeAndAferSyncHooks($name, $value, $callback)
  • added: method InteractsWithProperties.getInitializedPropertyValue(\ReflectionProperty $property)
  • added: method InteractsWithProperties.handleDehydrateProperty($property, $value)
  • added: method InteractsWithProperties.handleHydrateProperty($property, $value)
  • added: method InteractsWithProperties.only($properties)
  • added: method ReceivesEvents.emitSelf($event, ...$params)
  • added: method ReceivesEvents.emitTo($name, $event, ...$params)
  • added: method ValidatesInput.clearValidation($field = …)
  • added: protected method HandlesActions.callBeforeAndAfterSyncHooks($name, $value, $callback)
  • added: protected method ValidatesInput.prepareForValidation(array $attributes)
  • removed: class HttpConnectionHandler extends ConnectionHandler
  • removed: method HttpConnectionHandler.__invoke()
  • added: class FilePreviewHandler
  • added: class FileUploadHandler
  • added: class HttpConnectionHandler extends ConnectionHandler
  • added: class LivewireJavaScriptAssets
  • added: method CanPretendToBeAFile.pretendResponseIsFile($file)
  • added: method FilePreviewHandler.handle($filename)
  • added: method FileUploadHandler.getMiddleware()
  • added: method FileUploadHandler.handle()
  • added: method FileUploadHandler.validateAndStore($files, $disk)
  • added: method HttpConnectionHandler.__invoke()
  • added: method LivewireJavaScriptAssets.maps()
  • added: method LivewireJavaScriptAssets.source()
  • added: protected method CanPretendToBeAFile.httpDate($timestamp)
  • added: protected method CanPretendToBeAFile.matchesCache($lastModified)
  • added: trait CanPretendToBeAFile
  • added: class CannotUseReservedLivewireComponentProperties extends \Exception
  • added: class DirectlyCallingLifecycleHooksNotAllowedException extends \Exception
  • added: class MissingFileUploadsTraitException extends \Exception
  • added: class MountMethodMissingException extends \Exception
  • added: class RootTagMissingFromViewException extends \Exception
  • added: class S3DoesntSupportMultipleFileUploads extends \Exception
  • added: constructor CannotUseReservedLivewireComponentProperties($propertyName, $componentName)
  • added: constructor DirectlyCallingLifecycleHooksNotAllowedException($method, $component)
  • added: constructor MissingFileUploadsTraitException($component)
  • added: constructor MountMethodMissingException($component)
  • added: constructor RootTagMissingFromViewException($component)
  • added: constructor S3DoesntSupportMultipleFileUploads()
  • changed: method AddAttributesToRootTagOfHtml.__invoke($dom, $data) → method AddAttributesToRootTagOfHtml.__invoke($dom, $data, $instance)
  • added: class HydratePropertiesWithCustomRuntimeHydrators implements HydrationMiddleware
  • added: class PersistLocale implements HydrationMiddleware
  • added: protected method HydrateEloquentModelsAsPublicProperties.restoreCollection($value)
  • added: static method HydratePropertiesWithCustomRuntimeHydrators.dehydrate($instance, $response)
  • added: static method HydratePropertiesWithCustomRuntimeHydrators.hydrate($unHydratedInstance, $request)
  • added: static method PersistLocale.dehydrate($instance, $response)
  • added: static method PersistLocale.hydrate($unHydratedInstance, $request)
  • removed: property TestableLivewire.prefix
  • changed: constructor TestableLivewire($name, $prefix, $params = …) → constructor TestableLivewire($name, $params = …)
  • added: method TestableLivewire.callEndpoint($method, $url, $payload)
  • added: method MakesAssertions.assertDontSeeHtml($value)
  • added: method MakesAssertions.assertNotEmitted($value, ...$params)
  • added: method MakesAssertions.assertSeeHtml($value)
  • added: method MakesAssertions.assertSeeHtmlInOrder(array $values)
  • added: method MakesAssertions.assertSeeInOrder(array $values)
  • added: method MakesCallsToComponent.fill($values)
  • added: method MakesCallsToComponent.syncInput($name, $value)
  • added: method MakesCallsToComponent.syncUploadedFiles($name, $files, $isMultiple = …)
  • added: protected method MakesAssertions.stripOutInitialData($subject)
  • added: protected method MakesAssertions.testEmitted($value, $params)