Closed Ernestopheles closed 10 months ago
Next adaption (004) towards Contao 5.
Replace the TL_MODE query with a Scopematcher check.
Added a Helper-class to enhance readability, maintenance, reusage and test.
See useCases tested with cypress: tests Contao 4.13.31, Isotope 2.9 and PHP 8.1
We can create more Helper classes. An advantage of having one class just for Scope matching is the easy readable use, we have "Scope::isBackend" instead of perhaps *Helper::isBackend" or "Helper::scopeIsBackend"
Yes, but since all those helper functions somewhat belong together, I would prefer to group them. Similar to the Contao StringUtil
class. Maybe we could have a \Isotope\CompatibilityHelper::isBackendScope()
and \Isotope\CompatibilityHelper::getProjectDir()
?
\Isotope\CompatibilityHelper::getProjectDir() ... coming later
Such conflicts seems to be inevitable. I usually create each PR based on branch 2.9. If one oder more PR are merged, this base is not valid any more for the remaining PR and might lead to conflicts as seen here. Instead of creating independent PR maybe its better to base a PR on the last one created before? But this means, the PR must be merged in this sequence. I do not think we really do want that. Not sure how to solve this. Hope its ok for you to resove this conflict (both use statements are wanted).
What a mess! I did my best to resolve the conflicts; donna know why Track.php got all these unneccessary changes now; used contao\easy-coding-standard the way Contao Core does and only activated namespace ordering; this worked fine in all files except Track.php, where there are more (unneccessary) changes. Also did namespace ordering in more files (I hope this is ok).
Please resolve this conflict
Thank you @Ernestopheles
Next adaption towards Contao 5.
See useCases tested with cypress: tests Contao 4.13.31, Isotope 2.9 and PHP 8.1