Skip to content

#91. Changed finder constraint #92

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 6 commits into from
May 4, 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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
# Install all dependencies and run check tasks.
build_and_test:
docker:
- image: circleci/php:8.0-cli-node
- image: cimg/php:8.1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems we just needed to update to newer PHP as I think it was here in Finder library where it failed

$this->dirs = array_merge($this->dirs, ...$resolvedDirs);

circleci/php is deprecated so moving to cimg/php ( https://circleci.com/developer/images/image/cimg/php )

There was no cli tag and node is not needed. At least I don't know why it would be needed.

steps:
# Check out source code.
- checkout
Expand Down
12 changes: 12 additions & 0 deletions .lando.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: code-quality
recipe: lamp
config:
php: '8.1'
xdebug: true

tooling:
phpunit:
service: appserver
description: Run Drupal PHPUnit tests. Run 'lando phpunit --help' for more information.
cmd:
- "/app/.lando/tooling-phpunit.sh"
14 changes: 14 additions & 0 deletions .lando/tooling-phpunit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

#
# Helper script to run drupal tests.
#

set -euo pipefail
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/app/vendor/bin
install -d /app/public/simpletest/browser_output
cd /app/
XDEBUG_MODE=debug php \
/app/vendor/bin/phpunit \
--configuration /app/phpunit.xml \
"$@"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This repository currently has the following checks:
## Pre-requisites

* Composer
* PHP >= 7.1
* PHP >= 7.3

## Installation

Expand Down
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"phpstan/phpstan-deprecation-rules": "^1.0",
"vimeo/psalm": "^4",
"nette/finder": "^2.5",
"symfony/finder": "^4.4"
"symfony/finder": "^4.4 || ^5.3 || ^6"
},
"autoload": {
"psr-4": {
Expand All @@ -55,5 +55,11 @@
},
"require-dev": {
"phpunit/phpunit": "^8.3"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpro/grumphp": true
}
}
}
2 changes: 1 addition & 1 deletion tests/AbstractSinglePathProcessingTaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public function testHandlesParallelProcess(): void {
$this->process
->expects($this->exactly(2))
->method('isRunning')
->willReturnOnConsecutiveCalls([TRUE, FALSE]);
->willReturnOnConsecutiveCalls(TRUE, FALSE);
Copy link
Collaborator

@hkirsman hkirsman Mar 31, 2023

Choose a reason for hiding this comment

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

isRunning() method should be returning boolean, but this was mocking it so that it would return array of those booleans. In older version is seemed to have worked or fail silently, but in newer version of Symfony it has return type defined so it failed:

image

$this->process
->expects($this->once())
->method('isSuccessful')
Expand Down