Skip to content

Commit

Permalink
Update developing with docker: Fix php version to 8.2. (#6490)
Browse files Browse the repository at this point in the history
  • Loading branch information
uncaught authored Nov 23, 2024
1 parent b98a0e1 commit 0d1dbd7
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
9 changes: 6 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,16 @@ above commands in a docker container:

```bash
# Build the docker image
docker compose build
docker compose build --pull
# Install dependencies
docker compose run --rm php composer install
# Run the entire CI suite
docker compose run php composer complete-check
docker compose run --rm php composer complete-check
# Fix the coding standards
docker compose run php composer fix-cs
docker compose run --rm php composer fix-cs
```

## TroubleShooting
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8-cli-alpine
FROM php:8.2-cli-alpine

WORKDIR /etc/rector

Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.8"

services:
php:
build: .
Expand Down
4 changes: 2 additions & 2 deletions rules/Strict/NodeFactory/ExactCompareFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function createIdenticalFalsyCompare(
new Arg(new Array_([
new ArrayItem($result->left->left->right),
new ArrayItem($result->left->right->right),
new ArrayItem($result->right->right)
new ArrayItem($result->right->right),
])),
new Arg(new ConstFetch(new Name('true'))),
]);
Expand Down Expand Up @@ -136,7 +136,7 @@ public function createNotIdenticalFalsyCompare(
new Arg(new Array_([
new ArrayItem($result->left->left->right),
new ArrayItem($result->left->right->right),
new ArrayItem($result->right->right)
new ArrayItem($result->right->right),
])),
new Arg(new ConstFetch(new Name('true'))),
]));
Expand Down
5 changes: 1 addition & 4 deletions scoper.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@
// as they are not designed for open-sourcing
// remove implements is the safest way to avoid error on conflict with real dependency of symplify/rule-doc-generator
static function (string $filePath, string $prefix, string $content): string {
if (! \str_ends_with(
$filePath,
'src/Contract/Rector/RectorInterface.php'
)) {
if (! \str_ends_with($filePath, 'src/Contract/Rector/RectorInterface.php')) {
return $content;
}

Expand Down
4 changes: 3 additions & 1 deletion src/NodeTypeResolver/PHPStan/TypeHasher.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ public function createTypeHash(Type $type): string
}

if ($type instanceof ArrayType) {
return $this->createTypeHash($type->getIterableValueType()) . $this->createTypeHash($type->getIterableKeyType()) . '[]';
return $this->createTypeHash($type->getIterableValueType()) . $this->createTypeHash(
$type->getIterableKeyType()
) . '[]';
}

if ($type instanceof GenericObjectType) {
Expand Down

0 comments on commit 0d1dbd7

Please sign in to comment.