Skip to content

Commit b37e2c7

Browse files
authored
Merge branch '1.9.4.x' into replace-1525
2 parents 43a91fb + d1ef6e4 commit b37e2c7

File tree

8,872 files changed

+10103
-90627
lines changed

Some content is hidden

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

8,872 files changed

+10103
-90627
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
matrix:
1212
operating-system: [ubuntu-latest]
13-
php-versions: ['7.3']
13+
php-versions: ['7.4']
1414
steps:
1515
- name: Checkout repository
1616
uses: actions/checkout@master
@@ -26,6 +26,10 @@ jobs:
2626
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
2727
restore-keys: ${{ runner.os }}-composer-
2828

29+
- name: Require legacy frontend themes on v19
30+
if: startsWith(github.event.release.tag_name, 'v19')
31+
run: composer require --no-install --prefer-dist --no-progress --ignore-platform-req=ext-* openmage/legacy-frontend-themes
32+
2933
- name: Require Mage_Backup on v19
3034
if: startsWith(github.event.release.tag_name, 'v19')
3135
run: composer require --no-install --prefer-dist --no-progress --ignore-platform-req=ext-* openmage/module-mage-backup
@@ -37,6 +41,9 @@ jobs:
3741
- name: Composer install
3842
run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-* --no-dev
3943

44+
- name: Optimize autoloader
45+
run: composer dump-autoload --optimize
46+
4047
- name: Create ZIP file
4148
run: zip -rq openmage-${{ github.event.release.tag_name }}.zip . -x '.git/*'
4249

.github/workflows/syntax-php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
php: ['7.3', '8.1', '8.2']
17+
php: ['7.4', '8.1', '8.2']
1818

1919
name: PHP Syntax ${{ matrix.php }}
2020

.github/workflows/workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373

7474
phpstan:
7575
name: PHPStan
76-
needs: [check, composer, phpcs, php-cs-fixer]
76+
needs: [check, composer]
7777
if: |
7878
needs.check.outputs.php > 0 ||
7979
needs.check.outputs.phpstan > 0 ||

.htaccess

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@
197197
ExpiresByType text/x-javascript "access plus 1 month"
198198
ExpiresByType application/x-shockwave-flash "access plus 1 month"
199199
ExpiresByType image/x-icon "access plus 1 year"
200+
ExpiresByType image/svg+xml "access plus 1 year"
200201
ExpiresDefault "access plus 2 days"
201202
</IfModule>
202203

README.md

Lines changed: 82 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<p align="center">
22
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
3-
<a href="#contributors-"><img src="https://img.shields.io/badge/all_contributors-151-orange.svg" alt="All Contributors"></a>
3+
<a href="#contributors-"><img src="https://img.shields.io/badge/all_contributors-152-orange.svg" alt="All Contributors"></a>
44
<!-- ALL-CONTRIBUTORS-BADGE:END -->
55
<a href="https://packagist.org/packages/openmage/magento-lts"><img src="https://poser.pugx.org/openmage/magento-lts/d/total.svg" alt="Total Downloads"></a>
66
<a href="https://packagist.org/packages/openmage/magento-lts"><img src="https://poser.pugx.org/openmage/magento-lts/license.svg" alt="License"></a>
@@ -21,8 +21,8 @@ level of backwards compatibility to the official releases.
2121
## Table of contents
2222

2323
- [Requirements](#requirements)
24-
- [Optional](#optional)
2524
- [Installation](#installation)
25+
- [Manual Install](#manual-install)
2626
- [Composer](#composer)
2727
- [Git](#git)
2828
- [Secure your installation](#secure-your-installation)
@@ -36,7 +36,7 @@ level of backwards compatibility to the official releases.
3636
- [New Events](#new-events)
3737
- [Changes to SOAP/WSDL](#changes-to-soapwsdl)
3838
- [Development Environment with ddev](#development-environment-with-ddev)
39-
- [Development with PHP 8.1](#development-with-php-81)
39+
- [Development with PHP 8.1+](#development-with-php-81)
4040
- [PhpStorm Factory Helper](#phpstorm-factory-helper)
4141
- [Versioning](#versioning)
4242
- [Public Communication](#public-communication)
@@ -46,36 +46,80 @@ level of backwards compatibility to the official releases.
4646

4747
## Requirements
4848

49-
- PHP 7.3+ (PHP 8.0 is supported, PHP 8.1 is work in progress)
49+
- 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)
5050
- MySQL 5.6+ (8.0+ recommended) or MariaDB
51+
- optional: Redis 5.x, 6.x and 7.0.x are supported
5152

5253

5354
- PHP extension `intl` <small>since 1.9.4.19 & 20.0.17</small>
5455
- Command `patch` 2.7+ (or `gpatch` on MacOS/HomeBrew) <small>since 1.9.5.0 & 20.1.0</small>
5556

56-
__Please be aware that although OpenMage is compatible that one or more extensions may not be.__
57-
58-
### Optional
57+
## Installation
5958

60-
- Redis 5+ (6.x recommended, latest verified compatible 6.0.7 with 20.x)
59+
### Manual Install
6160

62-
## Installation
61+
Download the latest [release archive](https://github.com/OpenMage/magento-lts/releases) and extract it over your existing install. **Important:** you must download the ZIP file from a tagged version on the releases page, otherwise there will be missing dependencies.
6362

6463
### Composer
6564

66-
Download the latest archive and extract it, clone the repo, or add a composer dependency to your existing project like so:
65+
Step 1: Create a new composer project:
6766

6867
```bash
69-
composer require "openmage/magento-lts":"^19.5.0"
68+
composer init
69+
```
70+
71+
Step 2: Configure composer. **The below options are required.** You can see all options [here](https://github.com/AydinHassan/magento-core-composer-installer#configuration).
72+
73+
```bash
74+
# Allow composer to apply patches to dependencies of magento-lts
75+
composer config --json extra.enable-patching true
76+
77+
# Configure Magento core composer installer to use magento-lts as the Magento source package
78+
composer config extra.magento-core-package-type magento-source
79+
80+
# Configure the root directory that magento-lts will be installed to, such as "pub", "htdocs", or "www"
81+
composer config extra.magento-root-dir pub
7082
```
7183

72-
To get the latest changes use:
84+
Step 3: Require `magento-core-composer-installer`:
85+
86+
``` bash
87+
# PHP 7
88+
composer require "aydin-hassan/magento-core-composer-installer":"~2.0.0"
89+
90+
# PHP 8
91+
composer require "aydin-hassan/magento-core-composer-installer":"^2.1.0"
92+
```
93+
94+
<small>Note: be sure to select `y` if composer asks you to trust `aydin-hassan/magento-core-composer-installer`.</small>
95+
96+
Step 4: Require `magento-lts`:
7397

7498
```bash
75-
composer require "openmage/magento-lts":"dev-main"
99+
# OpenMage v19
100+
composer require "openmage/magento-lts":"^19.4.0"
101+
102+
# OpenMage v20
103+
composer require "openmage/magento-lts":"^20.0.0"
76104
```
77105

78-
<small>Note: `dev-main` is just an alias for current `1.9.4.x` branch and may change</small>
106+
<small>Note: be sure to select `y` if composer asks you to trust `magento-hackathon/magento-composer-installer` or `cweagans/composer-patches`.</small>
107+
108+
To install the latest development version (may be unstable):
109+
110+
```bash
111+
# OpenMage v19
112+
composer require "openmage/magento-lts":"1.9.4.x-dev"
113+
114+
# OpenMage v20
115+
composer require "openmage/magento-lts":"20.0.x-dev"
116+
```
117+
118+
When deploying to a production environment, it's recommended to optimize Composer's autoloader to speed up classes lookup time:
119+
120+
```bash
121+
composer dump-autoload --optimize
122+
```
79123

80124
### Git
81125

@@ -129,11 +173,14 @@ Most important changes will be listed here, all other changes since `19.4.0` can
129173

130174
### Between Magento 1.9.4.5 and OpenMage 19.x
131175

132-
- bug fixes and PHP 7.x, 8.0 and 8.1 compatibility
176+
- bug fixes and PHP 7.x, 8.0, 8.1 and 8.2 compatibility
133177
- added config cache for system.xml ([#1916](https://github.com/OpenMage/magento-lts/pull/1916))
178+
- added frontend_type color ([#2945](https://github.com/OpenMage/magento-lts/pull/2945))
134179
- search for "NULL" in backend grids ([#1203](https://github.com/OpenMage/magento-lts/pull/1203))
135180
- removed `lib/flex` containing unused ActionScript "file uploader" files ([#2271](https://github.com/OpenMage/magento-lts/pull/2271))
136181
- Mage_Catalog_Model_Resource_Abstract::getAttributeRawValue() now returns `'0'` instead of `false` if the value stored in the database is `0` ([#572](https://github.com/OpenMage/magento-lts/pull/572))
182+
- PHP extension `intl` is required
183+
- Deprecation errors are not suppressed anymore
137184
- removed modules:
138185
- `Mage_Backup` ([#2811](https://github.com/OpenMage/magento-lts/pull/2811))
139186
- `Mage_Compiler`
@@ -145,28 +192,28 @@ Most important changes will be listed here, all other changes since `19.4.0` can
145192
_If you rely on those modules you can reinstall them with composer:_
146193
- `Mage_Backup`: `composer require openmage/module-mage-backup`
147194
- `Mage_PageCache`: `composer require openmage/module-mage-pagecache`
148-
149-
### Between OpenMage 19.4.18 / 20.0.16 and 19.4.19 / 20.0.17
150-
151-
- PHP extension `intl` is required
195+
- `Legacy frontend themes`: `composer require openmage/legacy-frontend-themes`
152196

153197
### Between OpenMage 19.x and 20.x
154198

155199
Do not use 20.x.x if you need IE support.
156200

157-
- removed IE conditional comments, IE styles, IE scripts and IE eot files [#1073](https://github.com/OpenMage/magento-lts/pull/1073)
158-
- removed frontend default themes (default, modern, iphone, german, french, blank, blue) [#1600](https://github.com/OpenMage/magento-lts/pull/1600)
159-
- added redis as a valid option for `global/session_save` [#1513](https://github.com/OpenMage/magento-lts/pull/1513)
160-
- reduce needless saves by avoiding setting `_hasDataChanges` flag [#2066](https://github.com/OpenMage/magento-lts/pull/2066)
161-
- removed support for `global/sales/old_fields_map` defined in XML [#921](https://github.com/OpenMage/magento-lts/pull/921)
162-
- removed lib/flex containing unused ActionScript "file uploader" files [#2271](https://github.com/OpenMage/magento-lts/pull/2271)
163-
- enabled website level config cache [#2355](https://github.com/OpenMage/magento-lts/pull/2355)
164-
- make overrides of Mage_Core_Model_Resource_Db_Abstract::delete respect parent api [#1257](https://github.com/OpenMage/magento-lts/pull/1257)
201+
- removed IE conditional comments, IE styles, IE scripts and IE eot files ([#1073](https://github.com/OpenMage/magento-lts/pull/1073))
202+
- removed frontend default themes (default, modern, iphone, german, french, blank, blue) ([#1600](https://github.com/OpenMage/magento-lts/pull/1600))
203+
- added redis as a valid option for `global/session_save` ([#1513](https://github.com/OpenMage/magento-lts/pull/1513))
204+
- reduce needless saves by avoiding setting `_hasDataChanges` flag ([#2066](https://github.com/OpenMage/magento-lts/pull/2066))
205+
- removed support for `global/sales/old_fields_map` defined in XML ([#921](https://github.com/OpenMage/magento-lts/pull/921))
206+
- enabled website level config cache ([#2355](https://github.com/OpenMage/magento-lts/pull/2355))
207+
- made overrides of Mage_Core_Model_Resource_Db_Abstract::delete respect parent api ([#1257](https://github.com/OpenMage/magento-lts/pull/1257))
208+
- rewrote Mage_Eav_Model_Config as cache for all eav entity and attribute reads ([#2993](https://github.com/OpenMage/magento-lts/pull/2993))
209+
- removed module Mage_Poll ([3098](https://github.com/OpenMage/magento-lts/pull/3098), you can install it with `composer require openmage/module-mage-poll`)
165210

166211
For full list of changes, you can [compare tags](https://github.com/OpenMage/magento-lts/compare/1.9.4.x...20.0).
167212

168213
### Since OpenMage 19.5.0 / 20.1.0
169214

215+
PHP 7.4 is now the minimum required version.
216+
170217
Most of the 3rd party libraries/modules that were bundled in our repository were removed and migrated to composer dependencies.
171218
This allows for better maintenance and upgradability.
172219

@@ -178,14 +225,18 @@ If your project uses OpenMage through composer then all dependencies will be man
178225
If you just extracted the release zip/tarball in your project's main folder then be sure to:
179226
- remove the old copy of aforementioned libraries from your project, you can do that with this command:
180227
```bash
181-
rm -rf lib/Cm lib/Credis lib/mcryptcompat lib/Pelago lib/phpseclib lib/Zend
228+
rm -rf app/code/core/Zend lib/Cm lib/Credis lib/mcryptcompat lib/Pelago lib/phpseclib lib/Zend
182229
```
183230

184-
185231
- download the new release zip file that is named `openmage-VERSIONNUMBER.zip`, this one is built to contain the `vendor`
186232
folder generated by composer, with all the dependencies in it
187233
- extract the zip file in your project's repository as you always did
188234

235+
We also decided to remove our Zend_DB patches (that were stored in `app/code/core/Zend`) because they were very old and
236+
not compatible with the new implementations made by ZF1-Future, which is much more advanced and feature rich.
237+
This may generate a problem with `Zend_Db_Select' statements that do not use 'Zend_Db_Expr' to quote expressions.
238+
If you see SQL errors after upgrading please remember to check for this specific issue in your code.
239+
189240
### New Config Options
190241

191242
- `admin/design/use_legacy_theme`
@@ -251,13 +302,7 @@ grep -rn 'urn:Magento' --include \*.xml
251302
- Open your site in browser
252303
```bash
253304
ddev launch
254-
```
255-
256-
## Development with PHP 8.1
257-
258-
Deprecation errors are supressed by default.
259-
260-
If you want to work on PHP 8.1 support, set environment variable `DEV_PHP_STRICT` to `1`, to show all errors.
305+
```
261306

262307
## PhpStorm Factory Helper
263308

@@ -501,6 +546,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
501546
<td align="center" valign="top" width="14.28%"><a href="https://github.com/discountscott"><img src="https://avatars.githubusercontent.com/u/5454596?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Scott Moore</b></sub></a></td>
502547
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rfeese"><img src="https://avatars.githubusercontent.com/u/7074181?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Roger Feese</b></sub></a></td>
503548
<td align="center" valign="top" width="14.28%"><a href="https://github.com/AGelzer"><img src="https://avatars.githubusercontent.com/u/34437931?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Alexander Gelzer</b></sub></a></td>
549+
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/davidhiendl"><img src="https://avatars.githubusercontent.com/u/11006964?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>David Hiendl</b></sub></a></td>
504550
</tr>
505551
</tbody>
506552
</table>

api.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22
/**
33
* OpenMage
44
*
5-
* NOTICE OF LICENSE
6-
*
75
* This source file is subject to the Open Software License (OSL 3.0)
86
* that is bundled with this package in the file LICENSE.txt.
9-
* It is also available through the world-wide-web at this URL:
10-
* https://opensource.org/licenses/osl-3.0.php
11-
* If you did not receive a copy of the license and are unable to
12-
* obtain it through the world-wide-web, please send an email
13-
* to license@magento.com so we can send you a copy immediately.
7+
* It is also available at https://opensource.org/license/osl-3-0-php
148
*
159
* @category Mage
1610
* @package Mage
@@ -19,11 +13,6 @@
1913
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
2014
*/
2115

22-
if (version_compare(phpversion(), '7.3.0', '<') === true) {
23-
echo 'It looks like you have an invalid PHP version. OpenMage supports PHP 7.3.0 or newer';
24-
exit;
25-
}
26-
2716
$magentoRootDir = getcwd();
2817
$bootstrapFilename = $magentoRootDir . '/app/bootstrap.php';
2918
$mageFilename = $magentoRootDir . '/app/Mage.php';

app/Mage.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22
/**
33
* OpenMage
44
*
5-
* NOTICE OF LICENSE
6-
*
75
* This source file is subject to the Open Software License (OSL 3.0)
86
* that is bundled with this package in the file LICENSE.txt.
9-
* It is also available through the world-wide-web at this URL:
10-
* https://opensource.org/licenses/osl-3.0.php
11-
* If you did not receive a copy of the license and are unable to
12-
* obtain it through the world-wide-web, please send an email
13-
* to license@magento.com so we can send you a copy immediately.
7+
* It is also available at https://opensource.org/license/osl-3-0-php
148
*
159
* @category Mage
1610
* @package Mage
@@ -214,7 +208,7 @@ public static function getOpenMageVersionInfo(): array
214208
'major' => '20',
215209
'minor' => '1',
216210
'patch' => '0',
217-
'stability' => 'rc1', // beta,alpha,rc
211+
'stability' => 'rc3', // beta,alpha,rc
218212
'number' => '', // 1,2,3,0.3.7,x.7.z.92 @see https://semver.org/#spec-item-9
219213
];
220214
}
@@ -223,7 +217,7 @@ public static function getOpenMageVersionInfo(): array
223217
'major' => '19',
224218
'minor' => '5',
225219
'patch' => '0',
226-
'stability' => 'rc1', // beta,alpha,rc
220+
'stability' => 'rc3', // beta,alpha,rc
227221
'number' => '', // 1,2,3,0.3.7,x.7.z.92 @see https://semver.org/#spec-item-9
228222
];
229223
}
@@ -526,7 +520,7 @@ public static function getModel($modelClass = '', $arguments = [])
526520
*
527521
* @param string $modelClass
528522
* @param array $arguments
529-
* @return Mage_Core_Model_Abstract
523+
* @return Mage_Core_Model_Abstract|false
530524
*/
531525
public static function getSingleton($modelClass = '', array $arguments = [])
532526
{

app/bootstrap.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22
/**
33
* OpenMage
44
*
5-
* NOTICE OF LICENSE
6-
*
75
* This source file is subject to the Open Software License (OSL 3.0)
86
* that is bundled with this package in the file LICENSE.txt.
9-
* It is also available through the world-wide-web at this URL:
10-
* https://opensource.org/licenses/osl-3.0.php
11-
* If you did not receive a copy of the license and are unable to
12-
* obtain it through the world-wide-web, please send an email
13-
* to license@magento.com so we can send you a copy immediately.
7+
* It is also available at https://opensource.org/license/osl-3-0-php
148
*
159
* @category Mage
1610
* @package Mage

app/code/core/Mage/Admin/Helper/Block.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22
/**
33
* OpenMage
44
*
5-
* NOTICE OF LICENSE
6-
*
75
* This source file is subject to the Open Software License (OSL 3.0)
86
* that is bundled with this package in the file LICENSE.txt.
9-
* It is also available through the world-wide-web at this URL:
10-
* https://opensource.org/licenses/osl-3.0.php
11-
* If you did not receive a copy of the license and are unable to
12-
* obtain it through the world-wide-web, please send an email
13-
* to license@magento.com so we can send you a copy immediately.
7+
* It is also available at https://opensource.org/license/osl-3-0-php
148
*
159
* @category Mage
1610
* @package Mage_Admin

app/code/core/Mage/Admin/Helper/Data.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22
/**
33
* OpenMage
44
*
5-
* NOTICE OF LICENSE
6-
*
75
* This source file is subject to the Open Software License (OSL 3.0)
86
* that is bundled with this package in the file LICENSE.txt.
9-
* It is also available through the world-wide-web at this URL:
10-
* https://opensource.org/licenses/osl-3.0.php
11-
* If you did not receive a copy of the license and are unable to
12-
* obtain it through the world-wide-web, please send an email
13-
* to license@magento.com so we can send you a copy immediately.
7+
* It is also available at https://opensource.org/license/osl-3-0-php
148
*
159
* @category Mage
1610
* @package Mage_Admin

0 commit comments

Comments
 (0)