Skip to content

Latest commit

 

History

History
61 lines (38 loc) · 3.07 KB

from-v7-to-v8.md

File metadata and controls

61 lines (38 loc) · 3.07 KB

Upgrade from v7 to v8

First, make sure to follow the base package upgrade guide.

Then, follow the steps below to upgrade the package extension.

New trait to implement in models

The extension does live separately from the base package.

As so, you now have to add the ExtendsMediaAbilities trait use in each model that implement the InteractsWithMedia trait to allow them to use the extension extra features.

Config changes

The config('media-library.queued_conversions') extension is not used anymore.

Make sure to remove the line from the config file.

To avoid conversions to be queued, you'll have to use the ->nonQueued() method, as specified in the base package documentation.

Method signature changes

The following methods name have been changed. Make sure to change them in your code.

  • Search and replace all ->validationRules( calls by ->getMediaValidationRules(.
  • Search and replace all ->mimesValidationRules( calls by ->getMediaMimesValidationRules(.
  • Search and replace all ->mimeTypesValidationRules( calls by ->getMediaMimeTypesValidationRules(.
  • Search and replace all ->dimensionValidationRules( calls by ->getMediaDimensionValidationRules(.
  • Search and replace all ->sizeValidationRule( calls by ->getMediaSizeValidationRule(.
  • Search and replace all ->constraintsCaption( calls by ->getMediaCaption(.
  • Search and replace all ->dimensionsCaption( calls by ->getMediaDimensionsCaption(.
  • Search and replace all ->mimeTypesCaption( calls by ->getMediaMimeTypesCaption(.
  • Search and replace all ->sizeCaption( calls by ->getMediaSizeCaption(.

Deprecated methods removed

Some deprecated methods have been remove. Make sure to change them in your code.

  • Search and replace all ->constraintsLegend( calls by ->getMediaCaption(.
  • Search and replace all ->dimensionsLegend( calls by ->getMediaDimensionsCaption(.
  • Search and replace all ->mimeTypesLegend( calls by ->getMediaMimeTypesCaption(.
  • Search and replace all ->validationConstraints( calls by ->getMediaValidationRules(.
  • Search and replace all ->mimesValidationConstraints( calls by ->getMediaMimesValidationRules(.
  • Search and replace all ->mimeTypesValidationConstraints( calls by ->getMediaMimeTypesValidationRules(.
  • Search and replace all ->dimensionValidationConstraints( calls by ->getMediaDimensionValidationRules(.

Translations

The translations files have been removed and will not be used anymore.

Translations have now to be handled this way.

See the extension documentation the see which sentences are available for translation.

See all changes

See all change with the comparison tool.

Undocumented changes

If you see any forgotten and undocumented change, please submit a PR to add them to this upgrade guide.