-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge magento-commerce/2.4-develop into magento-performance/MCP-180
- Loading branch information
Showing
930 changed files
with
56,718 additions
and
36,561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,21 +15,24 @@ | |
</a> | ||
</p> | ||
|
||
## Welcome | ||
# Welcome | ||
|
||
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results. | ||
|
||
## Magento System Requirements | ||
[Magento System Requirements](https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements.html). | ||
|
||
[Magento System Requirements](https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html). | ||
|
||
## Install Magento | ||
|
||
* [Installation Guide](https://devdocs.magento.com/guides/v2.3/install-gde/bk-install-guide.html). | ||
* [Installation Guide](https://devdocs.magento.com/guides/v2.4/install-gde/bk-install-guide.html). | ||
|
||
## Learn More About GraphQL in Magento 2 | ||
|
||
* [GraphQL Developer Guide](https://devdocs.magento.com/guides/v2.3/graphql/index.html) | ||
* [GraphQL Developer Guide](https://devdocs.magento.com/guides/v2.4/graphql/index.html) | ||
|
||
## Contributing to the Magento 2 Code Base | ||
|
||
<h2>Contributing to the Magento 2 Code Base</h2> | ||
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations, or just good suggestions. | ||
|
||
To learn about how to contribute, click [here][1]. | ||
|
@@ -38,27 +41,27 @@ To learn about issues, click [here][2]. To open an issue, click [here][3]. | |
|
||
To suggest documentation improvements, click [here][4]. | ||
|
||
[1]: https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html | ||
[2]: https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#report | ||
[1]: https://devdocs.magento.com/guides/v2.4/contributor-guide/contributing.html | ||
[2]: https://devdocs.magento.com/guides/v2.4/contributor-guide/contributing.html#report | ||
[3]: https://github.com/magento/magento2/issues | ||
[4]: https://devdocs.magento.com | ||
|
||
<h3>Community Maintainers</h3> | ||
### Community Maintainers | ||
|
||
The members of this team have been recognized for their outstanding commitment to maintaining and improving Magento. Magento has granted them permission to accept, merge, and reject pull requests, as well as review issues, and thanks to these Community Maintainers for their valuable contributions. | ||
|
||
<a href="https://magento.com/magento-contributors#maintainers"> | ||
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/maintainers.png"/> | ||
</a> | ||
[![](https://raw.githubusercontent.com/wiki/magento/magento2/images/maintainers.png)](https://magento.com/magento-contributors#maintainers) | ||
|
||
### Top Contributors | ||
|
||
<h3>Top Contributors</h3> | ||
Magento is thankful for any contribution that can improve our codebase, documentation or increase test coverage. We always recognize our most active members, as their contributions are the foundation of the Magento Open Source platform. | ||
<a href="https://magento.com/magento-contributors"> | ||
<img src="https://raw.githubusercontent.com/wiki/magento/magento2/images/contributors.png"/> | ||
</a> | ||
|
||
[![](https://raw.githubusercontent.com/wiki/magento/magento2/images/contributors.png)](https://magento.com/magento-contributors) | ||
|
||
### Labels Applied by the Magento Team | ||
|
||
We apply labels to public Pull Requests and Issues to help other participants retrieve additional information about current progress, component assignments, Magento release lines, and much more. | ||
Please review the [Code Contributions guide](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#labels) for detailed information on labels used in Magento 2 repositories. | ||
Please review the [Code Contributions guide](https://devdocs.magento.com/guides/v2.4/contributor-guide/contributing.html#labels) for detailed information on labels used in Magento 2 repositories. | ||
|
||
## Reporting Security Issues | ||
|
||
|
@@ -71,18 +74,17 @@ Stay up-to-date on the latest security news and patches for Magento by signing u | |
Each Magento source file included in this distribution is licensed under OSL 3.0 or the Magento Enterprise Edition (MEE) license. | ||
|
||
[Open Software License (OSL 3.0)](https://opensource.org/licenses/osl-3.0.php). | ||
Please see [LICENSE.txt](https://github.com/magento/magento2/blob/2.3-develop/LICENSE.txt) for the full text of the OSL 3.0 license or contact [email protected] for a copy. | ||
Please see [LICENSE.txt](https://github.com/magento/magento2/blob/2.4-develop/LICENSE.txt) for the full text of the OSL 3.0 license or contact [email protected] for a copy. | ||
|
||
Subject to Licensee's payment of fees and compliance with the terms and conditions of the MEE License, the MEE License supersedes the OSL 3.0 license for each source file. | ||
Please see LICENSE_EE.txt for the full text of the MEE License or visit https://magento.com/legal/terms/enterprise. | ||
Please see LICENSE_EE.txt for the full text of the MEE License or visit <https://magento.com/legal/terms/enterprise>. | ||
|
||
## Community Engineering Slack | ||
|
||
To connect with Magento and the Community, join us on the [Magento Community Engineering Slack](https://magentocommeng.slack.com). If you are interested in joining Slack, or a specific channel, send us a request at [[email protected]](mailto:[email protected]) or [self signup](https://opensource.magento.com/slack). | ||
|
||
|
||
We have channels for each project. These channels are recommended for new members: | ||
|
||
- [general](https://magentocommeng.slack.com/messages/C4YS78WE6): Open chat for introductions and Magento 2 questions | ||
- [github](https://magentocommeng.slack.com/messages/C7KB93M32): Support for GitHub issues, pull requests, and processes | ||
- [public-backlog](https://magentocommeng.slack.com/messages/CCV3J3RV5): Discussions of the Magento 2 backlog | ||
* [general](https://magentocommeng.slack.com/messages/C4YS78WE6): Open chat for introductions and Magento 2 questions | ||
* [github](https://magentocommeng.slack.com/messages/C7KB93M32): Support for GitHub issues, pull requests, and processes | ||
* [public-backlog](https://magentocommeng.slack.com/messages/CCV3J3RV5): Discussions of the Magento 2 backlog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
app/code/Magento/AdvancedPricingImportExport/Model/CurrencyResolver.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\AdvancedPricingImportExport\Model; | ||
|
||
use Magento\Directory\Helper\Data as DirectoryData; | ||
use Magento\Store\Model\StoreManagerInterface; | ||
|
||
/** | ||
* Currency resolver for tier price scope | ||
*/ | ||
class CurrencyResolver | ||
{ | ||
/** | ||
* @var StoreManagerInterface | ||
*/ | ||
private $storeManager; | ||
|
||
/** | ||
* @var DirectoryData | ||
*/ | ||
private $directoryData; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $defaultBaseCurrency; | ||
|
||
/** | ||
* Associative array with website code as the key and base currency as the value | ||
* | ||
* @var array | ||
*/ | ||
private $websitesBaseCurrency; | ||
|
||
/** | ||
* @param StoreManagerInterface $storeManager | ||
* @param DirectoryData $directoryData | ||
*/ | ||
public function __construct( | ||
StoreManagerInterface $storeManager, | ||
DirectoryData $directoryData | ||
) { | ||
$this->storeManager = $storeManager; | ||
$this->directoryData = $directoryData; | ||
} | ||
|
||
/** | ||
* Get base currency for all websites | ||
* | ||
* @return array associative array with website code as the key and base currency as the value | ||
*/ | ||
public function getWebsitesBaseCurrency(): array | ||
{ | ||
if ($this->websitesBaseCurrency === null) { | ||
$this->websitesBaseCurrency = []; | ||
foreach ($this->storeManager->getWebsites() as $website) { | ||
$this->websitesBaseCurrency[$website->getCode()] = $website->getBaseCurrencyCode(); | ||
} | ||
} | ||
|
||
return $this->websitesBaseCurrency; | ||
} | ||
|
||
/** | ||
* Get default scope base currency | ||
* | ||
* @return string | ||
*/ | ||
public function getDefaultBaseCurrency(): string | ||
{ | ||
if ($this->defaultBaseCurrency === null) { | ||
$this->defaultBaseCurrency = $this->directoryData->getBaseCurrencyCode(); | ||
} | ||
|
||
return $this->defaultBaseCurrency; | ||
} | ||
} |
Oops, something went wrong.