You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am porting from CakePHP 2 to 3 and have noticed that the names in the 'model' field of the Aros table should now be plural (i.e. 'Group' is now 'Groups' and 'User' is now 'Users'). Is there a way to force the plugin to look for the singular form of the model name so that the database is not changed? Thanks.
The text was updated successfully, but these errors were encountered:
It is recommended to migrate from CakePHP 2.x to 3.x using a staged process (CakeFest 2017, '3.4 and the Path to 4.0.0 - Mark Story @mark_story', https://www.youtube.com/watch?v=DtH__Iz9Mjs, answer to question after 44m:15s into the video to 46m:30s). If sharing the same underlying database between a 2.x application which uses ACL and a partially upgraded 3.x version which using this plugin, how might one go about adapting the plugin, perhaps using Inflector::pluralize($aros.model), so that the plugin works on the 2.x aros table?
Would a good place to start be by altering how the model field in the ArosTable.php file is read? How might one do that to change it into plural form?
Are there likely to be any other places which need changing if it is changed via the ArosTable.php file? A search on 'model' (case insensitive) in the source code shows that most of the fixtures and test cases use the singular values User and Group, and so don't appear to have been updated for CakePHP 3.x yet. BaseAuthorize.php sets 'userModel' => 'Users', so is not using a value from the table.
I am porting from CakePHP 2 to 3 and have noticed that the names in the 'model' field of the Aros table should now be plural (i.e. 'Group' is now 'Groups' and 'User' is now 'Users'). Is there a way to force the plugin to look for the singular form of the model name so that the database is not changed? Thanks.
The text was updated successfully, but these errors were encountered: