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

EZP-30722: Make sure siteaccess is loaded before console commands on run #2687

Merged
merged 9 commits into from
Jul 5, 2019

Conversation

andrerom
Copy link
Contributor

@andrerom andrerom commented Jul 4, 2019

Question Answer
JIRA issue EZP-30722
Bug yes
Target version 6.7
BC breaks no
Tests pass yes
Doc needed no

This fixes the root issue of siteaccess being set after commands are loaded when you run them.

Implies some of the fixes done on 2.5.2 can be reverted, specifically:

  • The once making services lazy can be omitted.
  • Maybe also the once making commands lazy

Changes to drop use of dynamic settings should probably stay as it makes the code more bullet proof also for request scope cases of this, and it aligns code with v3.

TODO:

  • Implement feature / fix a bug.
  • Implement tests.
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

andrerom and others added 2 commits July 4, 2019 14:43
Co-Authored-By: Andrew Longosz <alongosz@users.noreply.github.com>
@andrerom andrerom changed the title EZP-30722: [POC] Make sure siteaccess is loaded before console commands on run EZP-30722: Make sure siteaccess is loaded before console commands on run Jul 4, 2019
if (Kernel::MAJOR_VERSION < 3) {
parent::__construct(new Command('invalid'), $input, $output);
} else {
parent::__construct(null, $input, $output);
Copy link
Member

Choose a reason for hiding this comment

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

We should get rid of this on merge up to 7.5 ;)

@andrerom
Copy link
Contributor Author

andrerom commented Jul 5, 2019

Ready for wider review now @Nattfarinn / @adamwojs ;)

eZ/Publish/Core/MVC/Symfony/MVCEvents.php Outdated Show resolved Hide resolved
Co-Authored-By: Adam Wójs <adam.wojs@ez.no>
@andrerom andrerom merged commit 44756b5 into 6.7 Jul 5, 2019
@andrerom andrerom deleted the EZP-30722 branch July 5, 2019 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants