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

🔩 chore: Mozart integration #153

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
**Tested up to:** 6.4.2
**WC requires at least:** 5.0.0
**WC tested up to:** 8.4.0
**Requires PHP:** 7.2
**Requires PHP:** 7.4
**Stable tag:** 1.2.7
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
Expand Down
2 changes: 1 addition & 1 deletion bin/zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ npm run build

# Copy all files
status "Copying files... ✌️"
FILES=(wepos.php readme.txt assets includes languages templates composer.json composer.lock)
FILES=(wepos.php readme.txt assets dependencies includes languages templates composer.json composer.lock)

for file in ${FILES[@]}; do
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double quote array expansions to prevent issues.

- for file in ${FILES[@]}; do
+ for file in "${FILES[@]}"; do

Shellcheck warning SC2068: Double quote array expansions to avoid re-splitting elements.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
for file in ${FILES[@]}; do
for file in "${FILES[@]}"; do
Tools
Shellcheck

[error] 49-49: Double quote array expansions to avoid re-splitting elements. (SC2068)

cp -R $file $BUILD_DIR
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double quote this variable to prevent globbing and word splitting.

- cp -R $file $BUILD_DIR
+ cp -R "$file" "$BUILD_DIR"

Shellcheck warnings SC2086: Double quote to prevent globbing and word splitting.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
cp -R $file $BUILD_DIR
cp -R "$file" "$BUILD_DIR"
Tools
Shellcheck

[info] 50-50: Double quote to prevent globbing and word splitting. (SC2086)


[info] 50-50: Double quote to prevent globbing and word splitting. (SC2086)

Expand Down
44 changes: 38 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,41 @@
],
"minimum-stability": "dev",
"require": {
"php": ">=7.2",
"appsero/client": "dev-develop",
"php": ">=7.4",
"appsero/client": "^v2.0.2",
"ext-json": "*"
},
"require-dev": {
"wp-coding-standards/wpcs": "dev-master",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1"
"wp-coding-standards/wpcs": "dev-develop",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
"coenjacobs/mozart": "^0.7.1"
},
"autoload" : {
"psr-4": {
"WeDevs\\WePOS\\": "includes/"
"WeDevs\\WePOS\\": "includes/",
"WeDevs\\WePOS\\Dependencies\\": "dependencies/"
}
},
"extra": {
"mozart": {
"dep_namespace": "WeDevs\\WePOS\\Dependencies\\",
"dep_directory": "/dependencies/",
"classmap_directory": "/dependencies/classes/",
"classmap_prefix": "WeDevs_WePOS_",
"packages": [
"appsero/client"
],
"excluded_packages": [
"psr/container"
],
"override_autoload": {
"google/apiclient": {
"classmap": [
"src/"
]
}
},
"delete_vendor_directories": true
}
},
"scripts": {
Expand All @@ -30,11 +54,19 @@
],
"phpcbf": [
"phpcbf -p"
],
"post-install-cmd": [
"[ $COMPOSER_DEV_MODE -eq 0 ] || \"vendor/bin/mozart\" compose",
"composer dump-autoload"
],
"post-update-cmd": [
"[ $COMPOSER_DEV_MODE -eq 0 ] || \"vendor/bin/mozart\" compose",
"composer dump-autoload"
]
},
"config": {
"platform": {
"php": "7.2"
"php": "7.4"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
Expand Down
Loading