Skip to content

Commit 9405600

Browse files
authored
Merge branch 'main' into spellcheck
2 parents b77e88d + c296d3a commit 9405600

File tree

134 files changed

+553
-511
lines changed

Some content is hidden

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

134 files changed

+553
-511
lines changed

.all-contributorsrc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,51 @@
16251625
"contributions": [
16261626
"bug"
16271627
]
1628+
},
1629+
{
1630+
"login": "nprovoost",
1631+
"name": "Nicky",
1632+
"avatar_url": "https://avatars.githubusercontent.com/u/25850269?v=4",
1633+
"profile": "http://twopointzero.eu",
1634+
"contributions": [
1635+
"bug"
1636+
]
1637+
},
1638+
{
1639+
"login": "pauldpauld",
1640+
"name": "pauldpauld",
1641+
"avatar_url": "https://avatars.githubusercontent.com/u/1549372?v=4",
1642+
"profile": "https://alond.com.au/",
1643+
"contributions": [
1644+
"bug"
1645+
]
1646+
},
1647+
{
1648+
"login": "PapaDragonov",
1649+
"name": "PapaDragonov",
1650+
"avatar_url": "https://avatars.githubusercontent.com/u/17141028?v=4",
1651+
"profile": "https://github.com/PapaDragonov",
1652+
"contributions": [
1653+
"bug"
1654+
]
1655+
},
1656+
{
1657+
"login": "magentox",
1658+
"name": "magentox",
1659+
"avatar_url": "https://avatars.githubusercontent.com/u/44047835?v=4",
1660+
"profile": "https://github.com/magentox",
1661+
"contributions": [
1662+
"bug"
1663+
]
1664+
},
1665+
{
1666+
"login": "stasadev",
1667+
"name": "Stanislav Zhuk",
1668+
"avatar_url": "https://avatars.githubusercontent.com/u/24270994?v=4",
1669+
"profile": "https://github.com/stasadev",
1670+
"contributions": [
1671+
"code"
1672+
]
16281673
}
16291674
],
16301675
"commitType": "docs"

.ddev/commands/web/openmage-admin

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ fi
2929
RANDOM_STRING=$({ tr -dc A-Za-z0-9 </dev/urandom | head -c 32 ; })
3030

3131
if [[ "${ACTION}" =~ ^(update|u) ]]; then
32-
if mysql -u db -h db db -e "UPDATE "${TABLE_PREFIX}"admin_user SET password=CONCAT(MD5('"${RANDOM_STRING}""${ADMIN_PASSWORD}"'),':"${RANDOM_STRING}"') WHERE username='"${ADMIN_USER}"'"; then
32+
if mysql -u db -pdb -h db db -e "UPDATE "${TABLE_PREFIX}"admin_user SET password=CONCAT(MD5('"${RANDOM_STRING}""${ADMIN_PASSWORD}"'),':"${RANDOM_STRING}"') WHERE username='"${ADMIN_USER}"'"; then
3333
echo "If the account "${ADMIN_USER}" exists it has been updated."
3434
else
3535
exit 1
3636
fi
3737
elif [[ "${ACTION}" =~ ^(create|c) ]]; then
38-
if mysql -u db -h db db -e "INSERT INTO "${TABLE_PREFIX}"admin_user (firstname, lastname, email, username, password) VALUES ('"${ADMIN_FIRSTNAME}"', '"${ADMIN_LASTNAME}"', '"${ADMIN_EMAIL}"', '"${ADMIN_USER}"', CONCAT(MD5('"${RANDOM_STRING}""${ADMIN_PASSWORD}"'), ':"${RANDOM_STRING}"'))"; then
39-
mysql -u db -h db db -e "INSERT INTO "${TABLE_PREFIX}"admin_role(parent_id, tree_level, sort_order, role_type, user_id, role_name)
38+
if mysql -u db -pdb -h db db -e "INSERT INTO "${TABLE_PREFIX}"admin_user (firstname, lastname, email, username, password) VALUES ('"${ADMIN_FIRSTNAME}"', '"${ADMIN_LASTNAME}"', '"${ADMIN_EMAIL}"', '"${ADMIN_USER}"', CONCAT(MD5('"${RANDOM_STRING}""${ADMIN_PASSWORD}"'), ':"${RANDOM_STRING}"'))"; then
39+
mysql -u db -pdb -h db db -e "INSERT INTO "${TABLE_PREFIX}"admin_role(parent_id, tree_level, sort_order, role_type, user_id, role_name)
4040
VALUES (1, 2, 0, 'U',(SELECT user_id FROM "${TABLE_PREFIX}"admin_user WHERE username = '"${ADMIN_USER}"'),'"${ADMIN_FIRSTNAME}"')"
4141
echo "The account "$ADMIN_USER" has been created."
4242
else

.ddev/commands/web/openmage-install

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ if [ -f "${LOCALXML}" ]; then
5353
fi
5454

5555
if [[ "${DELETE}" =~ ^(yes|y) ]]; then
56-
mysql -u db -h db -e "DROP SCHEMA IF EXISTS db; CREATE SCHEMA db;";
56+
mysql -u db -pdb -h db -e "DROP SCHEMA IF EXISTS db; CREATE SCHEMA db;";
5757
rm "${LOCALXML}"
5858
else
5959
exit 1
@@ -96,7 +96,7 @@ if [[ $INSTALL_SAMPLE_DATA =~ ^(yes|y) ]]; then
9696
rm -rf "${ROOT}"/"${DDEV_DOCROOT}/var/cache/"*
9797

9898
echo "Importing Sample Data into the database..."
99-
mysql -u db -h db db < "${SAMPLE_DATA_DIRECTORY}"/magento-sample-data-1.9.2.4/magento_sample_data_for_1.9.2.4.sql
99+
mysql -u db -pdb -h db db < "${SAMPLE_DATA_DIRECTORY}"/magento-sample-data-1.9.2.4/magento_sample_data_for_1.9.2.4.sql
100100

101101
# remove sample data
102102
if [[ "${SAMPLE_DATA_KEEP_FLAG}" ]]; then

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Make packagist / composer download smaller
2-
/.ddev export-ignore
32
/.github export-ignore
43
/dev export-ignore
54
/docs export-ignore

.github/release-drafter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ categories:
2525
- 'dependencies'
2626
change-template: '- $TITLE ([#$NUMBER](https://github.com/OpenMage/magento-lts/pull/$NUMBER))'
2727
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
28-
exclude-contributors:
29-
- 'allcontributors'
28+
exclude-labels:
29+
- 'allcontributors-bot'
3030
version-resolver:
3131
major:
3232
labels:

.rector.php

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@
77
use Rector\DeadCode\Rector as DeadCode;
88
use Rector\Exception\Configuration\InvalidConfigurationException;
99
use Rector\Php53\Rector as Php53;
10-
use Rector\Php70\Rector as Php70;
1110
use Rector\Php71\Rector as Php71;
1211
use Rector\Php73\Rector as Php73;
1312
use Rector\Php74\Rector as Php74;
1413
use Rector\Php80\Rector as Php80;
14+
use Rector\Php81\Rector as Php81;
15+
use Rector\Php82\Rector as Php82;
16+
use Rector\Php83\Rector as Php83;
17+
use Rector\Php84\Rector as Php84;
1518
use Rector\TypeDeclaration\Rector as TypeDeclaration;
1619

1720
try {
1821
return RectorConfig::configure()
1922
->withPhpSets(
20-
php56: true,
23+
php74: true,
2124
)
2225
->withPaths([
2326
__DIR__,
@@ -26,15 +29,18 @@
2629
->withSkip([
2730
CodeQuality\BooleanNot\SimplifyDeMorganBinaryRector::class,
2831
CodeQuality\If_\SimplifyIfReturnBoolRector::class,
29-
# may conflict with phpstan strict rules
32+
# skip: may conflict with phpstan strict rules
3033
Php53\Ternary\TernaryToElvisRector::class,
31-
Php70\FuncCall\RandomFunctionRector::class,
32-
Php71\FuncCall\RemoveExtraParametersRector::class,
34+
Php71\FuncCall\RemoveExtraParametersRector::class, # todo: check later
35+
# skip: causes syntax error in Varien_Db_Adapter_Pdo_Mysql
3336
Php73\FuncCall\RegexDashEscapeRector::class,
34-
Php80\Class_\AnnotationToAttributeRector::class,
35-
Php80\Class_\ClassPropertyAssignToConstructorPromotionRector::class,
36-
Php80\Class_\StringableForToStringRector::class,
37-
Php80\FunctionLike\MixedTypeRector::class,
37+
# skip: causes issues with some tests
38+
Php74\Closure\ClosureToArrowFunctionRector::class,
39+
# skip: causes issues
40+
Php74\Assign\NullCoalescingOperatorRector::class,
41+
Php80\Class_\AnnotationToAttributeRector::class, # todo: wait for php80
42+
Php80\Class_\ClassPropertyAssignToConstructorPromotionRector::class, # todo: wait for php80
43+
Php80\Class_\StringableForToStringRector::class, # todo: wait for php80
3844
TypeDeclaration\ClassMethod\ReturnNeverTypeRector::class,
3945
__DIR__ . '/shell/translations.php',
4046
__DIR__ . '/shell/update-copyright.php',
@@ -52,7 +58,7 @@
5258
CodeQuality\NotEqual\CommonNotEqualRector::class,
5359
CodeQuality\LogicalAnd\LogicalToBooleanRector::class,
5460
CodeQuality\Ternary\SimplifyTautologyTernaryRector::class,
55-
#CodingStyle\FuncCall\ConsistentImplodeRector::class,
61+
CodingStyle\FuncCall\ConsistentImplodeRector::class,
5662
DeadCode\ClassMethod\RemoveUselessParamTagRector::class,
5763
DeadCode\ClassMethod\RemoveUselessReturnTagRector::class,
5864
DeadCode\Property\RemoveUselessVarTagRector::class,

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,13 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
264264
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dford-avb"><img src="https://avatars.githubusercontent.com/u/52465239?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>David Ford</b></sub></a></td>
265265
<td align="center" valign="top" width="14.28%"><a href="https://www.jandolejs.cz"><img src="https://avatars.githubusercontent.com/u/16374521?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Jan Dolejš</b></sub></a></td>
266266
</tr>
267+
<tr>
268+
<td align="center" valign="top" width="14.28%"><a href="http://twopointzero.eu"><img src="https://avatars.githubusercontent.com/u/25850269?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Nicky</b></sub></a></td>
269+
<td align="center" valign="top" width="14.28%"><a href="https://alond.com.au/"><img src="https://avatars.githubusercontent.com/u/1549372?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>pauldpauld</b></sub></a></td>
270+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/PapaDragonov"><img src="https://avatars.githubusercontent.com/u/17141028?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>PapaDragonov</b></sub></a></td>
271+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/magentox"><img src="https://avatars.githubusercontent.com/u/44047835?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>magentox</b></sub></a></td>
272+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/stasadev"><img src="https://avatars.githubusercontent.com/u/24270994?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Stanislav Zhuk</b></sub></a></td>
273+
</tr>
267274
</tbody>
268275
</table>
269276

app/code/core/Mage/Admin/Model/Resource/User.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,7 @@ public function _saveRelations(Mage_Core_Model_Abstract $user)
237237
$this->saveReloadAclFlag($user, 1);
238238
}
239239
$adapter->commit();
240-
} catch (Mage_Core_Exception $e) {
241-
$adapter->rollBack();
242-
throw $e;
243-
} catch (Exception $e) {
240+
} catch (Mage_Core_Exception|Exception $e) {
244241
$adapter->rollBack();
245242
throw $e;
246243
}

app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function getResTreeJson()
6565

6666
protected function _sortTree($a, $b)
6767
{
68-
return $a['sort_order'] < $b['sort_order'] ? -1 : ($a['sort_order'] > $b['sort_order'] ? 1 : 0);
68+
return $a['sort_order'] <=> $b['sort_order'];
6969
}
7070

7171
protected function _getNodeJson($node, $level = 0)

app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public function generateChart(): array
169169
$this->setAxisLabels($axis, $this->getRowsData($attr, true));
170170
}
171171

172-
list($datas, $dates) = $this->getChartDatasAndDates();
172+
[$datas, $dates] = $this->getChartDatasAndDates();
173173
$this->_axisLabels['x'] = $dates;
174174
$this->_allSeries = $datas;
175175

@@ -234,7 +234,7 @@ private function getChartDatasAndDates(): array
234234
{
235235
$timezoneLocal = Mage::app()->getStore()->getConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE);
236236

237-
list($dateStart, $dateEnd) = Mage::getResourceModel('reports/order_collection')
237+
[$dateStart, $dateEnd] = Mage::getResourceModel('reports/order_collection')
238238
->getDateRange($this->getDataHelper()->getParam('period'), '', '', true);
239239

240240
$dateStart->setTimezone($timezoneLocal);

0 commit comments

Comments
 (0)