Skip to content
This repository has been archived by the owner on Dec 3, 2020. It is now read-only.

Latest commit

 

History

History
46 lines (31 loc) · 2.01 KB

UPGRADE.md

File metadata and controls

46 lines (31 loc) · 2.01 KB

Upgrade Guide

This guide will help you update your app built using Poser when moving up MAJOR version numbers. As Poser uses semantic versioning there is no need to make any upgrade changes unless the major version number increases.

3.x.x-beta to 4.0.0

Expected upgrade time: 0 seconds

This is an update by name only. No breaking changes have been added. Party on, Garth!

2.x.x-beta - 3.x.x-beta

Expected upgrade time: 30 seconds

This update adds a new config entry to the config/poser.php file that enables better compatibility with Linux systems. You may either republish the config file using php artisan vendor:publish --tag=poser or add the entry yourself:

return [

  // Previous config entries
  
  "factories_location" => "tests/Factories/"
  
];

1.x.x-beta - 2.x.x-beta

Expected upgrade time: 0 minutes

This update is mainly a cleanup. It refactors the abstract Factory class to be more readable and easier to change in the future. No public methods have changed, so if you have not overridden any protected properties or methods, you do not need to make any changes.

Changes to protected properties

  • $saveMethodRelationships is now called $withRelationships.
  • $belongsToRelationships is now called $forRelationships.

Changes to protected methods

  • handleSaveMethodRelationships is now called handleWithRelationship.
  • handleBelongsToRelatioships is now called handleForRelationship.
  • getModelDataFromFunctionArguments is now called buildRelationshipData.
  • getFactoryFor is now called getFactoryNameFromMethodNameOrFail. It will also now throw an ArgumentsNotSatisfiableException if it cannot find the corresponding factory.
  • addSaveMethodRelationships is now called buildAllWithRelationships.
  • addBelongsToRelationships is now called buildAllForRelationships.