Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Major release

Compare
Choose a tag to compare
@davidyell davidyell released this 02 Apr 13:24
· 156 commits to master since this release

Multiple changes, some new features, some stuff reworked and other things updated.

Events
The proffer.beforeThumbs and proffer.afterThumbs events have been removed from the behaviour. This was to remove a dependency on Imagine in the ImageTransform class. There is now no dependency meaning that you can swap out the whole thumbnail generation class for your own, giving you absolute control over how thumbnails are created and with which library.

The tests have been updated to reflect this new change. With no events, the event based test case has been removed.

Customisation
Users can now replace the whole path class and image transform classes, by specifying the full class namespace in the behaviours configuration. These will then be injected into the behaviour, which gives the developer ultimate control over how these two key components work. There are now interfaces for these two classes which developers can implement in their own classes.

The new configuration options have been added to the configuration documentation, and the class injection is covered in the advanced customisation section of the customisation documentation.

Thumbnail generation
The thumbnail generation has been refactored so that the actual generation of the thumbnails is handled by the ImageTransform class, rather than being processed inside the behaviour. This respects the S in SOLID by removing the thumbnail responsibility from the upload part of the plugin and moving it into the actual transform part.

API changes
Due to the above, there is no longer a makeThumbs() method inside the behaviour class, as this has been moved in favour of ImageTransform::processThumbnails(). As the kickoff point for processing thumbnails, which reduces the amount of thumbnail related code inside the behaviour.

The event listener has been removed from the plugin because the events no longer exist so there is nothing to listen for.

Both of the interfaces provided with the plugin now no longer specify the constructor. This choice is because the interface should not be reaching out for dependancies, nor should it be including implementation details.

Shell tasks
The shell tasks have been improved. They now feedback more information to the user and are clearer to use. The checking of the schema is more strict, and I've also implemented the -v verbose option so that the shell tasks can return more helpful information if the developer needs it.

The cleanup task also now has a -d or --dry-run option which will output which files and folders will be deleted rather than actually doing the deletion. So that developers can see what will be removed before actually doing the deletion.

The verbose option for cleanup will output absolute paths to allow easier tracking of files on the local filesystem.

The shell tasks still rely on using the default path class being used to know where your files are. This is a known issue in #81.

ProfferPath
A number of bug fixes and improvements have been made to this class, mostly around how the various parts of the path class interact with each other. The class is also now more robust with missing segments of the path, and creation and deletion of folders.

Multi-field uploads
A bug which was preventing multi-file uploads on a single entity has now been fixed which means that you can now properly upload many files to a single Table.

Thanks to everyone who contributed code, feedback and thoughts for this release.