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

[Forwardport] Move functions.php into Framework #17960

Merged
merged 2 commits into from
Sep 11, 2018

Conversation

fooman
Copy link
Contributor

@fooman fooman commented Sep 7, 2018

Original PR: #16800

Description

functions.php provides the custom Magento function __() to trigger translations. For some unknown reason this file lives under app/code. As such it is only distributed via the full magento distribution package. This in turn makes it a lot harder for developers to work with Magento in a modular fashion.

Ideally I want to be able to run .
composer require magento/framework .
run my unit tests

Due to __() only being available in the complete distribution I need to require all of Magento for 1 single file. A difference of 100+ modules.

I currently do not see any rationale for why this file is not part of any module. This PR proposes to move it into the Framework module. It also simplifies the bootstrapping processing as this file can be autoloaded. Happy to move it into any other module if desired.

Fixed Issues (if relevant)

N/A

Manual testing scenarios

install Magento
install any language pack, for example composer require splendidinternet/mage2-locale-de-de
enable locale and ensure translations still work

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 on Travis CI are green)

(cherry picked from commit c8860f5)
@magento-engcom-team
Copy link
Contributor

Hi @fooman. 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-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me {$VERSION} instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.0 milestone Sep 7, 2018
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-2935 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @fooman. Thank you for your contribution.
We will aim to release these changes as part of 2.3.0.
Please check the release notes for final confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants