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

WIP : PHP8 #273

Merged
merged 6 commits into from
Nov 6, 2023
Merged
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
/public
/vendor
/node_modules
/storybook
.DS_Store
28 changes: 19 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
"source": "https://github.com/infinum/eightshift-boilerplate"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
"infinum/eightshift-coding-standards": "^1.6",
"php-stubs/wordpress-stubs": "^6.1.1",
"szepeviktor/phpstan-wordpress": "^1.1.7"
"dealerdirect/phpcodesniffer-composer-installer": "^v1.0.0",
"infinum/eightshift-coding-standards": "2.0.0-beta",
"php-stubs/wordpress-stubs": "^6.3",
"szepeviktor/phpstan-wordpress": "^1.1.7",
"wp-cli/wp-cli": "^2.9"
},
"require": {
"php": "^7.4 || <8.0",
"infinum/eightshift-libs": "^6.0.0",
"php": ">=7.4",
"infinum/eightshift-libs": "dev-develop-php8",
"typisttech/imposter-plugin": "^0.6.2"
},
"autoload": {
Expand All @@ -50,10 +51,19 @@
"typisttech/imposter-plugin": true
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/infinum/eightshift-libs.git"
}
],
"scripts": {
"analyze": "@php ./vendor/bin/phpstan analyze",
"standards:check": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs",
"standards:fix": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf"
"test:types": "@php ./vendor/bin/phpstan analyze",
"test:standards": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 7.4-",
"test": [
"@test:standards",
"@test:types"
]
},
"extra": {
"imposter": {
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,15 @@
"lint": "npm run lintJs && npm run lintStyle && composer standards:check -- --filter=gitstaged",
"start": "webpack --progress --watch --mode development",
"build": "webpack --progress --mode production",
"test": "wp boilerplate",
"storybookBuild": "build-storybook -s public -o storybook",
"storybook": "start-storybook -s public"
"test": "wp boilerplate"
},
"devDependencies": {
"husky": "^8.0.3",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1"
},
"dependencies": {
"@eightshift/frontend-libs": "^8.0.0"
"@eightshift/frontend-libs": "https://github.com/infinum/eightshift-frontend-libs.git#develop-php8"
},
"husky": {
"hooks": {
Expand Down
13 changes: 10 additions & 3 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/public/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/storybook/*</exclude-pattern>

<!-- Additional arguments. -->
<arg value="sp"/>
Expand All @@ -19,11 +18,19 @@
<file>.</file>

<!-- Check for PHP cross-version compatibility. -->
<config name="testVersion" value="7.2-"/>
<config name="testVersion" value="7.4-"/>
<rule ref="PHPCompatibilityWP"/>

<config name="minimum_supported_wp_version" value="5.3"/>
<!-- Support only latest 3 WP versions. -->
<config name="minimum_supported_wp_version" value="6.0"/>

<exclude-pattern>/src/CompiledContainer\.php</exclude-pattern>

<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="300" />
<property name="ignoreComments" value="true" />
</properties>
</rule>

</ruleset>
1 change: 1 addition & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ parameters:
- '#^Variable \$innerBlockContent might not be defined\.#'
- '#^Variable \$this might not be defined\.#'
- '#^Variable \$templatePath might not be defined\.#'
checkGenericClassInNonGenericObjectType: false