Skip to content

magento/magento2#27952: missing store_name in GraphQL resolver - adde… #28855

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

Conversation

sasha19957099
Copy link
Contributor

…d store_name

Description (*)

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Jun 23, 2020

Hi @sasha19957099. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

@sasha19957099
Copy link
Contributor Author

@magento run all tests

@sasha19957099 sasha19957099 linked an issue Jun 23, 2020 that may be closed by this pull request
@danielrenaud danielrenaud self-requested a review June 23, 2020 18:46
$storeConfigData = array_merge(
$this->getBaseConfigData($store),
$this->getExtendedConfigData((int)$store->getId())
return array_merge(
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should swap these, it will change behavior in a way we may not want. If store_name is getting overwritten, you should remove this in di.xml

        <arguments>
            <argument name="extendedConfigData" xsi:type="array">
                <item name="store_name" xsi:type="string">store/information/name</item>
            </argument>
        </arguments>
    </type>```

@@ -88,9 +87,9 @@ private function getBaseConfigData(StoreInterface $store) : array
'secure_base_url' => $storeConfig->getSecureBaseUrl(),
'secure_base_link_url' => $storeConfig->getSecureBaseLinkUrl(),
'secure_base_static_url' => $storeConfig->getSecureBaseStaticUrl(),
'secure_base_media_url' => $storeConfig->getSecureBaseMediaUrl()
'secure_base_media_url' => $storeConfig->getSecureBaseMediaUrl(),
'store_name' => $storeConfig->getStoreName()
Copy link
Contributor

@danielrenaud danielrenaud Jun 23, 2020

Choose a reason for hiding this comment

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

While you're changes look correct, I just wonder if we could do it in a less disruptive way. The current approach introduces a backwards incompatible change because we're adding a new public method to an @api interface.

Could we just use $store->getName() here and avoid the changes outside of GraphQl area?

composer.lock Outdated
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "e86af25d9a4a1942c437cca58f9f1efb",
"content-hash": "f3674961f96b48fdd025a6c94610c8eb",
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't need to update composer.lock for this

Copy link
Contributor Author

@sasha19957099 sasha19957099 Jun 24, 2020

Choose a reason for hiding this comment

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

yes, but without it, local static test fails

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, so actually this change matches the hash in mainline, so I don't know why it is showing up as a change here. Maybe just need to sync up your branch. But it should be fine.

@sasha19957099
Copy link
Contributor Author

@magento run all tests

@sasha19957099
Copy link
Contributor Author

@magento run all tests

Copy link
Contributor

@danielrenaud danielrenaud left a comment

Choose a reason for hiding this comment

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

looks good.
Just a minor static fix for class descriptions.

@@ -7,7 +7,7 @@

/**
* StoreConfig interface
*
* Interface for store config
Copy link
Contributor

Choose a reason for hiding this comment

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

For each of these where you update the class description, can you remove the old, useless description. and add a new line
so for this one it would be

/**
 * Interface for store config
 *
 * @api

composer.lock Outdated
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "e86af25d9a4a1942c437cca58f9f1efb",
"content-hash": "f3674961f96b48fdd025a6c94610c8eb",
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, so actually this change matches the hash in mainline, so I don't know why it is showing up as a change here. Maybe just need to sync up your branch. But it should be fine.

@ghost ghost added the Progress: accept label Jun 24, 2020
@cpartica cpartica added the PAP Partners acceleration program label Jun 24, 2020
@sasha19957099
Copy link
Contributor Author

@magento run all tests

@m2-assistant
Copy link

m2-assistant bot commented Jun 27, 2020

Hi @sasha19957099, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@sasha19957099 sasha19957099 deleted the 27952_Missing_store_name_in_GraphQl_Resolver branch September 18, 2020 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Missing store_name in GraphQl Resolver
4 participants