Skip to content

Commit 88a4156

Browse files
committed
Merge branch 'main' into next
2 parents eaa1b47 + 81702bc commit 88a4156

File tree

1,124 files changed

+2371
-2275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,124 files changed

+2371
-2275
lines changed

README.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ level of backwards compatibility to the official releases.
2020

2121
## Table of contents
2222

23+
- [Releases and Versioning](#releases-and-versioning)
24+
- [Currently Maintained Versions](#currently-maintained-versions)
2325
- [Requirements](#requirements)
2426
- [Installation](#installation)
2527
- [Manual Install](#manual-install)
@@ -28,22 +30,42 @@ level of backwards compatibility to the official releases.
2830
- [Secure your installation](#secure-your-installation)
2931
- [Apache .htaccess](#apache-htaccess)
3032
- [Nginx](#nginx)
33+
- [Magento 1 Compatibility](#magento-1-compatibility)
3134
- [Changes](#changes)
3235
- [Between Magento 1.9.4.5 and OpenMage 19.x](#between-magento-1945-and-openmage-19x)
33-
- [Between OpenMage 19.4.18 / 20.0.16 and 19.4.19 / 20.0.17](#between-openmage-19418--20016-and-19419--20017)
3436
- [Since OpenMage 19.5.0 / 20.1.0](#since-openmage-1950--2010)
3537
- [New Config Options](#new-config-options)
3638
- [New Events](#new-events)
3739
- [Changes to SOAP/WSDL](#changes-to-soapwsdl)
3840
- [Development Environment with ddev](#development-environment-with-ddev)
39-
- [Development with PHP 8.1+](#development-with-php-81)
4041
- [PhpStorm Factory Helper](#phpstorm-factory-helper)
41-
- [Versioning](#versioning)
4242
- [Public Communication](#public-communication)
4343
- [Maintainers](#maintainers)
4444
- [License](#license)
4545
- [Contributors](#contributors-)
4646

47+
## Releases and Versioning
48+
49+
This project more strictly adheres to [Semantic Versioning](http://semver.org/) compared to the original Magento version numbering system where the "1"
50+
was essentially a fixed number. See the [Terminology](https://github.com/OpenMage/rfcs/blob/main/accepted/0002-release-schedule.md#terminology)
51+
section of [RFC 0002 - Release Schedule](https://github.com/OpenMage/rfcs/blob/main/accepted/0002-release-schedule.md) for more information on how the terms MAJOR, MINOR and PATCH are defined and applied.
52+
53+
The OpenMage team and community maintains OpenMage LTS versions as follows:
54+
55+
- The latest MAJOR.MINOR version always receives PATCH updates.
56+
- The latest MAJOR version always receives MINOR updates.
57+
- The latest MAJOR.MINOR branch for each MAJOR version receives PATCH updates for at least 2 years from the time of inception of the initial MAJOR version release.
58+
59+
In a nutshell:
60+
61+
- If you want to stay on the cutting edge with the latest improvements use the latest MAJOR version.
62+
- If you want maximum backwards compatibility and minimal upgrade hassle use the next-latest MAJOR version so that you can still receive important security/stability/regression fixes.
63+
64+
### Currently Maintained Versions
65+
66+
- 20.x is the latest MAJOR version and will receive PATCH updates until 2 years after the date that 21.x is released.
67+
- 19.4.x will receive PATCH updates until April 4, 2025.
68+
4769
## Requirements
4870

4971
- PHP 7.4+ (PHP 8.0 is supported, PHP 8.1 supported but some warnings may be shown/logged, PHP 8.2 is usable but still being tested)
@@ -166,6 +188,14 @@ RewriteRule ^api/rest api.php?type=rest [QSA,L]
166188
rewrite ^/api/(\w+).*$ /api.php?type=$1 last;`
167189
```
168190

191+
## Magento 1 Compatibility
192+
193+
OpenMage LTS 19.4.0 is the first tagged version using the OpenMage LTS version naming system and all 19.x versions are mostly backward-compatible
194+
with Magento 1.9.4.x.
195+
196+
OpenMage LTS 20.x and later have more changes that may not be 100% backward-compatible, but minimizing migration and upgrade hassle for users is always
197+
considered an important goal and factors heavily into the changes that are accepted even when accepting changes for "MAJOR" releases, described in [Releases and Versioning](#releases-and-versioning) above.
198+
169199
## Changes
170200

171201
Most important changes will be listed here, all other changes since `19.4.0` can be found in
@@ -320,11 +350,6 @@ You can add additional meta files in this directory to cover your own project fi
320350
[PhpStorm advanced metadata](https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html)
321351
for more information.
322352

323-
## Versioning
324-
325-
Though Magento does __not__ follow [Semantic Versioning](http://semver.org/) we aim to provide a workable system for
326-
dependency definition.
327-
328353
## Public Communication
329354

330355
* [Discord](https://discord.gg/EV8aNbU) (maintained by Flyingmana)

api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* that is bundled with this package in the file LICENSE.txt.
77
* It is also available at https://opensource.org/license/osl-3-0-php
88
*
9-
* @category Mage
10-
* @package Mage
9+
* @category Mage
10+
* @package Mage
1111
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
1212
* @copyright Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org)
1313
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

app/Mage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* that is bundled with this package in the file LICENSE.txt.
77
* It is also available at https://opensource.org/license/osl-3-0-php
88
*
9-
* @category Mage
10-
* @package Mage
9+
* @category Mage
10+
* @package Mage
1111
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
1212
* @copyright Copyright (c) 2017-2022 The OpenMage Contributors (https://www.openmage.org)
1313
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

app/bootstrap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* that is bundled with this package in the file LICENSE.txt.
77
* It is also available at https://opensource.org/license/osl-3-0-php
88
*
9-
* @category Mage
10-
* @package Mage
9+
* @category Mage
10+
* @package Mage
1111
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
1212
* @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org)
1313
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ public function getDefaultConfigValue($field)
6464
return Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_ITEM . $field, $this->getStoreId());
6565
}
6666

67-
/**
68-
* ######################## TAB settings #################################
69-
*/
7067
public function getTabLabel()
7168
{
7269
return Mage::helper('catalog')->__('Inventory');

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Websites.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ public function getStoreCollection(Mage_Core_Model_Store_Group $group)
3737
return $group->getStores();
3838
}
3939

40-
/**
41-
* ######################## TAB settings #################################
42-
*/
4340
public function getTabLabel()
4441
{
4542
return Mage::helper('catalog')->__('Websites');

app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction;
1717

1818
/**
19-
* @category Mage
2019
* @category Mage
2120
* @package Mage_Adminhtml
2221
* @author Magento Core Team <[email protected]>

app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,6 @@ public function getCreditmemo()
213213
return Mage::registry('current_creditmemo');
214214
}
215215

216-
/**
217-
* ######################### SALES ##################################
218-
*/
219-
220216
/**
221217
* Retrieve available order
222218
*

app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons/Form.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public function __construct()
2727
$this->setId('sales_order_create_coupons_form');
2828
}
2929

30+
/**
31+
* @return string
32+
*/
3033
public function getCouponCode()
3134
{
3235
return $this->getParentBlock()->getQuote()->getCouponCode();

app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Creditmemos.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,22 +120,19 @@ public function getGridUrl()
120120
return $this->getUrl('*/*/creditmemos', ['_current' => true]);
121121
}
122122

123-
/**
124-
* ######################## TAB settings #################################
125-
*/
126123
public function getTabLabel()
127124
{
128125
return Mage::helper('sales')->__('Credit Memos');
129126
}
130127

131128
public function getTabTitle()
132129
{
133-
return Mage::helper('sales')->__('Order Credit Memos');
130+
return Mage::helper('sales')->__('Credit Memos');
134131
}
135132

136133
public function canShowTab()
137134
{
138-
return true;
135+
return Mage::getSingleton('admin/session')->isAllowed('sales/creditmemo');
139136
}
140137

141138
public function isHidden()

app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/History.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public function getTabLabel()
220220
*/
221221
public function getTabTitle()
222222
{
223-
return Mage::helper('sales')->__('Order History');
223+
return Mage::helper('sales')->__('Comments History');
224224
}
225225

226226
/**

app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Info.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,14 @@ public function getViewUrl($orderId)
104104
return $this->getUrl('*/*/*', ['order_id' => $orderId]);
105105
}
106106

107-
/**
108-
* ######################## TAB settings #################################
109-
*/
110107
public function getTabLabel()
111108
{
112109
return Mage::helper('sales')->__('Information');
113110
}
114111

115112
public function getTabTitle()
116113
{
117-
return Mage::helper('sales')->__('Order Information');
114+
return Mage::helper('sales')->__('Information');
118115
}
119116

120117
public function canShowTab()

app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Invoices.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,19 @@ public function getGridUrl()
121121
return $this->getUrl('*/*/invoices', ['_current' => true]);
122122
}
123123

124-
/**
125-
* ######################## TAB settings #################################
126-
*/
127124
public function getTabLabel()
128125
{
129126
return Mage::helper('sales')->__('Invoices');
130127
}
131128

132129
public function getTabTitle()
133130
{
134-
return Mage::helper('sales')->__('Order Invoices');
131+
return Mage::helper('sales')->__('Invoices');
135132
}
136133

137134
public function canShowTab()
138135
{
139-
return true;
136+
return Mage::getSingleton('admin/session')->isAllowed('sales/invoice');
140137
}
141138

142139
public function isHidden()

app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Shipments.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,25 +106,22 @@ public function getGridUrl()
106106
return $this->getUrl('*/*/shipments', ['_current' => true]);
107107
}
108108

109-
/**
110-
* ######################## TAB settings #################################
111-
*/
112109
public function getTabLabel()
113110
{
114111
return Mage::helper('sales')->__('Shipments');
115112
}
116113

117114
public function getTabTitle()
118115
{
119-
return Mage::helper('sales')->__('Order Shipments');
116+
return Mage::helper('sales')->__('Shipments');
120117
}
121118

122119
public function canShowTab()
123120
{
124121
if ($this->getOrder()->getIsVirtual()) {
125122
return false;
126123
}
127-
return true;
124+
return Mage::getSingleton('admin/session')->isAllowed('sales/shipment');
128125
}
129126

130127
public function isHidden()

app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Transactions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function getTabTitle()
6969
*/
7070
public function canShowTab()
7171
{
72-
return true;
72+
return Mage::getSingleton('admin/session')->isAllowed('sales/transactions');
7373
}
7474

7575
/**

app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Price.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,10 @@ public function getCondition()
115115
}
116116
$rate = $this->_getRate($displayCurrency, $this->getColumn()->getCurrencyCode());
117117

118-
if (isset($value['from'])) {
119-
$from = $value['from'] * $rate;
120-
$value['from'] = sprintf('%F', $from);
121-
}
122-
123-
if (isset($value['to'])) {
124-
$to = $value['to'] * $rate;
125-
$value['to'] = sprintf('%F', $to);
118+
foreach (['from', 'to'] as $key) {
119+
if (isset($value[$key]) && is_numeric($value[$key])) {
120+
$value[$key] = sprintf('%F', $value[$key] * $rate);
121+
}
126122
}
127123

128124
$this->prepareRates($displayCurrency);

app/code/core/Mage/Adminhtml/Controller/Sales/Creditmemo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function _construct()
4545
protected function _initAction()
4646
{
4747
$this->loadLayout()
48-
->_setActiveMenu('sales/order')
48+
->_setActiveMenu('sales/creditmemo')
4949
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
5050
->_addBreadcrumb($this->__('Credit Memos'), $this->__('Credit Memos'));
5151
return $this;

app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected function _construct()
4444
protected function _initAction()
4545
{
4646
$this->loadLayout()
47-
->_setActiveMenu('sales/order')
47+
->_setActiveMenu('sales/invoice')
4848
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
4949
->_addBreadcrumb($this->__('Invoices'), $this->__('Invoices'));
5050
return $this;

app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected function _construct()
4444
protected function _initAction()
4545
{
4646
$this->loadLayout()
47-
->_setActiveMenu('sales/order')
47+
->_setActiveMenu('sales/shipment')
4848
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
4949
->_addBreadcrumb($this->__('Shipments'), $this->__('Shipments'));
5050
return $this;

app/code/core/Mage/Adminhtml/Model/Config/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function save()
138138
}
139139
}
140140

141-
$backendClass = $helper->getBackendModelByFieldConfig($fieldConfig);
141+
$backendClass = $fieldConfig ? $helper->getBackendModelByFieldConfig($fieldConfig) : false;
142142
if (!$backendClass) {
143143
$backendClass = 'core/config_data';
144144
}

app/code/core/Mage/Adminhtml/Model/Search/Order.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,10 @@ public function load()
5353
['attribute' => 'billing_firstname', 'like' => $query . '%'],
5454
['attribute' => 'billing_lastname', 'like' => $query . '%'],
5555
['attribute' => 'billing_telephone', 'like' => $query . '%'],
56-
['attribute' => 'billing_postcode', 'like' => $query . '%'],
5756

5857
['attribute' => 'shipping_firstname', 'like' => $query . '%'],
5958
['attribute' => 'shipping_lastname', 'like' => $query . '%'],
6059
['attribute' => 'shipping_telephone', 'like' => $query . '%'],
61-
['attribute' => 'shipping_postcode', 'like' => $query . '%'],
6260
])
6361
->setCurPage($this->getStart())
6462
->setPageSize($this->getLimit())

app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected function _initAction()
6363
$this->loadLayout('popup');
6464
} else {
6565
$this->loadLayout()
66-
->_setActiveMenu('catalog/attributes')
66+
->_setActiveMenu('catalog/attributes/attributes')
6767
->_addBreadcrumb(Mage::helper('catalog')->__('Catalog'), Mage::helper('catalog')->__('Catalog'))
6868
->_addBreadcrumb(
6969
Mage::helper('catalog')->__('Manage Product Attributes'),

app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function indexAction()
3737
$this->_setTypeId();
3838

3939
$this->loadLayout();
40-
$this->_setActiveMenu('catalog/sets');
40+
$this->_setActiveMenu('catalog/attributes/sets');
4141

4242
$this->_addBreadcrumb(Mage::helper('catalog')->__('Catalog'), Mage::helper('catalog')->__('Catalog'));
4343
$this->_addBreadcrumb(
@@ -71,7 +71,7 @@ public function editAction()
7171
Mage::register('current_attribute_set', $attributeSet);
7272

7373
$this->loadLayout();
74-
$this->_setActiveMenu('catalog/sets');
74+
$this->_setActiveMenu('catalog/attributes/sets');
7575
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
7676

7777
$this->_addBreadcrumb(Mage::helper('catalog')->__('Catalog'), Mage::helper('catalog')->__('Catalog'));

app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public function viewAction()
188188
$block = $this->getLayout()->getBlock('sales_creditmemo_view');
189189
$block->updateBackButtonUrl($this->getRequest()->getParam('come_from'));
190190

191-
$this->_setActiveMenu('sales/order')
191+
$this->_setActiveMenu('sales/creditmemo')
192192
->renderLayout();
193193
} else {
194194
$this->_redirect('*/*');
@@ -223,7 +223,7 @@ public function newAction()
223223
}
224224

225225
$this->loadLayout()
226-
->_setActiveMenu('sales/order')
226+
->_setActiveMenu('sales/creditmemo')
227227
->renderLayout();
228228
} else {
229229
$this->_forward('noRoute');

0 commit comments

Comments
 (0)