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 3 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
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 || >=8.0",
iruzevic marked this conversation as resolved.
Show resolved Hide resolved
"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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"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
12 changes: 10 additions & 2 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,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