Skip to content

Commit

Permalink
chore: swap mozart to strauss; update packages to minimum PHP version
Browse files Browse the repository at this point in the history
  • Loading branch information
Dartui committed Apr 17, 2024
1 parent 8ba436d commit 947383a
Show file tree
Hide file tree
Showing 11 changed files with 3,711 additions and 2,838 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ jobs:
coverage: none
- name: Install Composer dependencies
uses: "ramsey/composer-install@v2"
- name: Install Composer build dependencies
run: composer bin build install --no-progress
- name: Compose dependencies
run: composer compose
- name: Analyze
run: composer phpstan
phplint:
Expand All @@ -53,10 +49,6 @@ jobs:
coverage: none
- name: Install Composer dependencies
uses: "ramsey/composer-install@v2"
- name: Install Composer build dependencies
run: composer bin build install --no-progress
- name: Compose dependencies
run: composer compose
- name: Lint
run: composer phplint
phpunit:
Expand All @@ -77,10 +69,6 @@ jobs:
run: yarn install --immutable
- name: Install Composer dependencies
uses: "ramsey/composer-install@v2"
- name: Install Composer build dependencies
run: composer bin build install --no-progress
- name: Compose dependencies
run: composer compose
- name: Start wp-env
env:
WP_ENV_PHP_VERSION: ${{ matrix.php }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ node_modules/
/vendor/
package-lock.json
/resources/*/dist/
/src/Dependencies/
/dependencies/
/tests/_wordpress/
/vendor-bin/**/vendor/

Expand Down
2 changes: 1 addition & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"phpVersion": "8.2",
"phpVersion": "7.4",
"mappings": {
"wp-content/plugins/notification": "."
}
Expand Down
2 changes: 1 addition & 1 deletion compat/src-deprecated/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function notification_display_wizard() {
function notification_ajax_handler() {
_deprecated_function( __FUNCTION__, '8.0.0' );

return new BracketSpace\Notification\Dependencies\Micropackage\Ajax\Response();
return new \BracketSpace\Notification\Dependencies\Micropackage\Ajax\Response();
}

/**
Expand Down
34 changes: 21 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"micropackage/templates": "^1.1"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4",
"brain/monkey": "^2.6",
"brianhenryie/strauss": "^0.17.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
"pestphp/pest": "^1.23",
"php-parallel-lint/php-parallel-lint": "^1.3",
Expand All @@ -36,21 +36,13 @@
"allow-plugins": true,
"platform-check": false
},
"extra": {
"mozart": {
"dep_namespace": "BracketSpace\\Notification\\Dependencies\\",
"dep_directory": "/src/Dependencies/",
"classmap_directory": "/classes/dependencies/",
"classmap_prefix": "BRSET_",
"delete_vendor_directories": true
}
},
"autoload": {
"psr-4": {
"BracketSpace\\Notification\\": "src/"
},
"classmap": [
"compat/src-deprecated/"
"compat/src-deprecated/",
"dependencies/"
],
"files": [
"compat/src-deprecated/functions.php",
Expand All @@ -63,11 +55,27 @@
"Tests\\": "tests/"
}
},
"extra": {
"strauss": {
"namespace_prefix": "BracketSpace\\Notification\\Dependencies\\",
"target_directory": "dependencies",
"classmap_prefix": "BRSET_"
}
},
"scripts": {
"compose": "mozart compose && composer dump-autoload",
"phpcbf": "phpcbf",
"phpcs": "phpcs",
"phplint": "parallel-lint --exclude node_modules --exclude vendor --exclude vendor-bin .",
"phpstan": "phpstan analyze --memory-limit=-1"
"phpstan": "phpstan analyze --memory-limit=-1",
"prefix-namespaces": [
"strauss",
"composer dump-autoload"
],
"post-install-cmd": [
"@prefix-namespaces"
],
"post-update-cmd": [
"@prefix-namespaces"
]
}
}
Loading

0 comments on commit 947383a

Please sign in to comment.