Skip to content

Update GH actions to run successfully #597

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

Merged
merged 4 commits into from
Sep 3, 2022
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
12 changes: 10 additions & 2 deletions .github/workflows/frameworks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
version: ['^4.4', '@stable', '@dev'] # Test current LTS, current release, and future release
version: ['^5.4', '@stable', '@dev'] # Test current LTS, current release, and future release
php: ['7.4', '8.0', '8.1']
composer-version: [v2]
include:
- version: '^4.4'
- version: '^5.4'
psr-simple-cache-version: '^1.0|^2.0'
- version: '@stable'
psr-simple-cache-version: '^1.0|^2.0|^3.0'
Expand Down Expand Up @@ -64,6 +64,10 @@ jobs:
working-directory: ./project
run: composer require "psr/simple-cache:${{ matrix.psr-simple-cache-version }}"
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Allow plugin
working-directory: ./project
run: composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Install PHPInsights
working-directory: ./project
run: composer require --dev "nunomaduro/phpinsights:*" -n --ansi --with-all-dependencies
Expand Down Expand Up @@ -133,6 +137,10 @@ jobs:
working-directory: ./project
run: composer require --dev phpunit/phpunit:^9.0 --update-with-dependencies -n --ansi
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Allow plugin
working-directory: ./project
run: composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
continue-on-error: ${{ env.allow_failure == 'true' }}
- name: Install PHPInsights
working-directory: ./project
run: composer require --dev "nunomaduro/phpinsights:*" -n --ansi --with-all-dependencies
Expand Down
7 changes: 4 additions & 3 deletions src/Application/Adapters/WordPress/Preset.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ public static function shouldBeApplied(Composer $composer): bool
$requirements = $composer->getRequirements();

foreach (array_keys($requirements) as $requirement) {
$requirement = (string) $requirement;
if (strpos($requirement, 'johnpbloch/wordpress') !== false) {
return true;
}

if (strpos($requirement, 'johnpbloch/wordpress') !== false
|| strpos($requirement, 'roots/wordpress') !== false) {
if (strpos($requirement, 'roots/wordpress') !== false) {
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Domain/Insights/SyntaxCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private function getTarget(): string
}

/**
* Recursively search for composer binary folder path
* Recursively search for composer binary folder path.
*/
private function composerBinaryFolderFind(string $directory): string
{
Expand Down