New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Also migrate the "useFolderUrl" setting #1987
Conversation
What do you need exactly? Maybe you can solve it with |
Well the static function is not a property. I want to do $config = $this->createMock(Config::class);
$config
->expects($this->once())
->method('has')
->with('folderUrl')
->willReturn(false)
; But this will fail:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will work. If folderUrl
is disable in the root pages, the migration will always run again. The correct migration would be to check if the field exists in the database, and only migrate if it does not. That obviously won't fix current RCs, but we don't provide such fixes for RCs.
Only if you re-add the setting in your But generally I agree, the migration should only run, if the database field does not exist yet. |
It could even be added to the |
Alright, I have integrated it into the
|
Right, forgot about the functional tests. Updated. |
Thank you @fritzmg. |
Description ----------- | Q | A | -----------------| --- | Fixed issues | - | Docs PR or issue | - When upgrading a Contao 4.9 instance to 4.10 I noticed that the `folderUrl` setting wasn't migrated to the `tl_page` settings. _Note:_ I need some help with the unit tests, as I am not sure how to properly mock the `Config` singleton, which also has static methods. Commits ------- 5638df5 provide migration for folderUrl setting 69c840f fix code style and namespace fb2566f use existing RoutingMigration 4e3f302 Merge branch '4.10' into migrate-folderUrl-config 4c9ce4e update functional test c873d39 fix code style
When upgrading a Contao 4.9 instance to 4.10 I noticed that the
folderUrl
setting wasn't migrated to thetl_page
settings.Note: I need some help with the unit tests, as I am not sure how to properly mock the
Config
singleton, which also has static methods.