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

Releases: davidyell/CakePHP-Proffer

Minor fixes

07 Oct 07:43
Compare
Choose a tag to compare

This is a minor release which fixes some small issues raised by the Symfony Insights tool. It fixes syntax errors in the yaml files and refactors the calls to exit() in the shell with the correctly matching method.

Major fix release

06 Oct 20:07
Compare
Choose a tag to compare

This is a major fix release which overhauls the way that the validation works. Thanks to @hiromi2424 for spotting this.

Changes have been made to the ProfferRules class to remove validation methods which duplicate existing core validation methods. The tests have also been updated to match.

A new migration guide has been created to aid with migration between major versions and to track major changes.

Thanks to everyone who submitted tickets, prs and helped with this release.

Major release

25 Aug 13:10
Compare
Choose a tag to compare

I have updated the way that the plugin assigns its data type mapping, which means that you no longer need the initializeSchema method in your Table classes, and you also no longer need to bootstrap the plugin.

Overall, this change means less code to type, less configuration and less to manage in the future.

If you are using an older version, and you update to this version, please update your Plugin::load('Proffer') to remove the ['bootstrap' => true] otherwise you will encounter errors. You can then also remove the initializeSchema method from your Table classes, which use Proffer.

Thanks to everyone who submitted bugs, patches and ideas for this release.

Patch release

22 Jul 09:20
Compare
Choose a tag to compare

This is a patch release to address some issues in the documentation.

There are also a minor bugfix to the ImageTransform class which was causing errors when using the shell to generate thumbnails for an upload field which doesn't have any thumbnail configuration.

The shell now can also have a path and transform class passed to it for injection into the shell process.

Minor release

01 May 08:43
Compare
Choose a tag to compare

Now that CakePHP 3.0 has been released the plugin needs to be updated so that the composer requirement matches with the 3.x branch.

If you are struggling to install the plugin due to a version mismatch, please update your composer to this release.

Thanks to everyone who contributed to this release.

Major release

02 Apr 13:24
Compare
Choose a tag to compare

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.

Feature release

17 Mar 16:32
Compare
Choose a tag to compare

This new release includes a number of bugfixes, documentation updates and some new features.

  • Created a new FAQ page in the documentation
  • Updated the configuration documentation to include an example of a form
  • Allowed the table part of the path to be customised in an event listener
  • Wrapped file system commands with existence checks to prevent warnings
  • Generating thumbnails is now optional by configuration
  • Added more tests to cover the new changes

If you are using an older version, you only need to update if you require the new functionality, however it is recommended.

Thanks to everyone who contributed code and issues to this release.

Hotfix

17 Mar 10:01
Compare
Choose a tag to compare

This is a hotfix release to correct a bug introduced by the new type casting in the core.

If you are using an older version it is recommended that you update to this release to maintain functionality.

Thanks to the contributors and bug reporters for helping with this release.

Bugfix release

17 Mar 08:34
Compare
Choose a tag to compare

This is a minor release to address a few bugs and tweak some of the code. It also introduces more tests to the suite.

  • Lots more tests to help strengthen the testing
  • Minor bugfix to validation
  • Restructuring the events

Feature release

09 Mar 10:47
Compare
Choose a tag to compare

A minor feature release to allow uploading of file from the local filesystem.

The focus on using move_uploaded_file() and is_uploaded_file() prevented failed form submissions from submitting the the same file array again.

Thanks to damianoporta