Skip to content
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

fix/ADF-1146: Distinguish which method requiresRight cached data belongs to #3620

Merged

Conversation

hectoras
Copy link
Contributor

@hectoras hectoras commented Sep 15, 2022

Associated Jira issue: ADF-1146

This fix enables sharing the @requiresRight cache between ActionDescription instances while keeping track about which method the cached data belongs to, so it avoids using permissions stored previously for a different action in later calls.

There are also two small changes introduced while debugging to avoid errors when running TAO in PHP 8:

  • A deprecated warning when calling strlen() with a null value.
  • A warning when no HTTP Referer header is present that may end up polluting the HTML output if E_ALL is enabled

Related PR: oat-sa/extension-tao-item#595 (it has been closed, as this fix in tao-core alone solves the issue)

@hectoras hectoras changed the title Fix/adf 1146 dont share doc block cache between methods fix/ADF-1146: Distinguish to which method requiresRight cached data belongs to Sep 15, 2022
hectoras and others added 3 commits September 15, 2022 17:51
Co-authored-by: Gabriel Felipe Soares <gabrielfs7@gmail.com>
Co-authored-by: Gabriel Felipe Soares <gabrielfs7@gmail.com>
Co-authored-by: Gabriel Felipe Soares <gabrielfs7@gmail.com>
@hectoras hectoras force-pushed the fix/ADF-1146-dont-share-docBlock-cache-between-methods branch from 1369e8d to e8555e3 Compare September 15, 2022 15:57
@hectoras hectoras changed the title fix/ADF-1146: Distinguish to which method requiresRight cached data belongs to fix/ADF-1146: Distinguish which method requiresRight cached data belongs to Sep 15, 2022
Copy link
Contributor

@gabrielfs7 gabrielfs7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • New code is covered by tests (if applicable)
  • Tests are running successfully (old and new ones) on my local machine (if applicable)
  • New code is respecting code style rules
  • New code is respecting best practices
  • New code is not subject to concurrency issues (if applicable)
  • Feature is working correctly on my local machine (if applicable)
  • Acceptance criteria are respected
  • Pull request title and description are meaningful

@hectoras
Copy link
Contributor Author

Got two approvals, therefore I'm merging this PR in order to start the QA varidation.

@hectoras hectoras merged commit 9996270 into php8-migration Sep 16, 2022
@hectoras hectoras deleted the fix/ADF-1146-dont-share-docBlock-cache-between-methods branch December 7, 2022 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants