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
BC break with protected $Template property #4086
Comments
Yes, we still need to decide whether accessing ->Template of PageRegular publicly should be allowed or not. In the past it was allowed, but probably an oversight. However, even if it was not intentional, the current state is inconsistent. |
Can we allow it in 4.13 and ultimately drop it everywhere in 5.0? |
Before 4.9.24 you could actually access |
Or how would you add some properties to the page template? |
I would do it via the |
Can we make it a public member in Contao 4.9/4.13 and private in Contao 5.0? |
Huh? I don‘t understand. I have merged the original fix, so why is this breaking now? |
Then this was also a BC break then. |
Like discussed already: #3894 (comment) 😅 |
jup, it must be public. Or probably just not be set at all. I noticed that too while reading the PR 😂 |
I'm in for making it public, I doubt that people made the property protected or private by themself. But otherwise, why not leave it as it was and don't set it at all until 5.0? 🤷♂️ |
Creating dynamic properties is deprecated as of PHP 8.2, which is why this issue came up in the first place. https://github.com/contao/contao/runs/4498623325?check_suite_focus=true |
True, I've already missed that again. So making it public would be the only (futureproof) way. |
How about adding a |
You mean: leave everything as it was before (i.e. reverting #4075 again 🙈) and only implement |
There is another issue. We cannot revert #4075 because there are actually extensions who directly access |
If we cannot guarantee BC otherwise, we could add |
As discussed in the Contao call, we do want to add |
And use a protected property in Contao 5.0 and remove |
Affected version(s)
4.9.26
Description
The fix from #4075 has still a BC break in
PageRegular
:The text was updated successfully, but these errors were encountered: