luya-module-cms icon indicating copy to clipboard operation
luya-module-cms copied to clipboard

Added new block's page property

Open hbugdoll opened this issue 10 months ago • 3 comments

What are you changing/introducing

  • Added page property for blocks in both admin and frontend context as a replacement for getEnvOption('pageObject') resp. getPageObject(), which is now deprecated
  • Added new unit test testPageObjectPlaceholderIteration() and therefore TestingPageObjectBlock
  • Fixed typo in test names:
    • testConcretImplementation() testConcreteImplementation()
    • ConcretImplementationBlockConcreteImplementationBlock

What is the reason for changing/introducing

  • see https://github.com/luyadev/luya-module-cms/issues/414#issuecomment-1980312072

QA

Q A
Is bugfix? no
New feature? yes
Breaks BC? no
Tests pass? yes
Fixed issues

hbugdoll avatar Apr 05 '24 17:04 hbugdoll

New unit test was added. In case of frontend context the page object data is simplified in renderFrontend() before stringification, which is needed because of the internal processing of renderPlaceholder().

Updates to guide will be done afterwards...

hbugdoll avatar Apr 05 '24 20:04 hbugdoll

in generel, we have to discuss this change because the interfaces changes, which is a clear BC break, and must be released along with 6.0

I assumed that a minor release can deal with that BC break along with the deprecated annotation. Ok, then introduction with version 6.0. Can we then drop the getEnvOption('pageObject') & getPageObject() immediately or only later with version 7.0 ?

hbugdoll avatar Apr 06 '24 20:04 hbugdoll

I assumed that a minor release can deal with that BC break along with the deprecated annotation.

no, if someone implement that interface this will break the application

Can we then drop the getEnvOption('pageObject') & getPageObject() immediately or only later with version 7.0 ?

It would be better to first trigger deprecation notices, its better migration path for developers 👍

nadar avatar Apr 20 '24 07:04 nadar