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

[2.2-dev] Move functions.php into Framework #16800

Merged
merged 1 commit into from Sep 6, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -31,8 +31,6 @@
// Sets default autoload mappings, may be overridden in Bootstrap::create
\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []);
require_once BP . '/app/functions.php';
/* Custom umask value may be provided in optional mage_umask file in root */
$umaskFile = BP . '/magento_umask';
$mask = file_exists($umaskFile) ? octdec(file_get_contents($umaskFile)) : 002;
@@ -6,17 +6,22 @@
/**
* Create value-object \Magento\Framework\Phrase
*
* @deprecated The global function __() is now loaded via Magento Framework, the below require is only
* for backwards compatibility reasons and this file will be removed in a future version
* @see Magento\Framework\Phrase\__.php
* @SuppressWarnings(PHPMD.ShortMethodName)
* @return \Magento\Framework\Phrase
*/
function __()
{
$argc = func_get_args();
if (!function_exists('__')) {
function __()
{
$argc = func_get_args();
$text = array_shift($argc);
if (!empty($argc) && is_array($argc[0])) {
$argc = $argc[0];
}
$text = array_shift($argc);
if (!empty($argc) && is_array($argc[0])) {
$argc = $argc[0];
}
return new \Magento\Framework\Phrase($text, $argc);
return new \Magento\Framework\Phrase($text, $argc);
}
}
@@ -11,7 +11,6 @@
}
require_once __DIR__ . '/autoload.php';
require BP . '/app/functions.php';
setCustomErrorHandler();
@@ -0,0 +1,22 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* Create value-object \Magento\Framework\Phrase
* @SuppressWarnings(PHPMD.ShortMethodName)
* @return \Magento\Framework\Phrase
*/
function __()
{
$argc = func_get_args();
$text = array_shift($argc);
if (!empty($argc) && is_array($argc[0])) {
$argc = $argc[0];
}
return new \Magento\Framework\Phrase($text, $argc);
}
@@ -9,3 +9,7 @@
'magento/framework',
__DIR__
);
if (!function_exists('__')) {
require 'Phrase/__.php';
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.