Skip to content

Commit 9e554ea

Browse files
committed
Properly use rector
1 parent ef5d5da commit 9e554ea

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

.github/workflows/test-integration.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ jobs:
8888
echo -e "\nLint frontend assets\n" && \
8989
yarn lint
9090
'
91+
- name: Run rectors
92+
if: always()
93+
continue-on-error: true
94+
run: |
95+
cd docker && docker compose exec -T --user www-data engine.dev.openconext.local bash -c '
96+
echo -e "\nRun rector dry run\n" && \
97+
./vendor/bin/rector --config=ci/qa-config/rector.php --dry-run --no-progress-bar
98+
'
9199
- name: Show log on failure
92100
if: failure()
93101
run: |

rector.php renamed to ci/qa-config/rector.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
return RectorConfig::configure()
66
->withPaths([
7-
__DIR__ . '/config',
8-
__DIR__ . '/src',
9-
__DIR__ . '/library',
10-
__DIR__ . '/tests',
7+
__DIR__ . '/../../config',
8+
__DIR__ . '/../../src',
9+
__DIR__ . '/../../library',
10+
__DIR__ . '/../../tests',
1111
])
1212
->withPhpSets()
1313
->withComposerBased(doctrine: true, phpunit: true, symfony: true)

ci/qa/all.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ cd $(dirname $0)/../../
99
./ci/qa/phpunit.sh
1010
./ci/qa/behat.sh
1111
./ci/qa/lint.sh
12+
./ci/qa/rector.sh --dry-run

ci/qa/rector.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
3+
# Ensure we run from project root
4+
cd "$(dirname "$0")/../../" || exit 1
5+
./vendor/bin/rector --config=ci/qa-config/rector.php "$@"

library/EngineBlock/Application/ErrorHandler.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ public function exception(Throwable $e)
7272

7373
public function error($errorNumber, $errorMessage, $errorFile, $errorLine)
7474
{
75-
if($errorNumber === E_DEPRECATED || $errorNumber === E_USER_DEPRECATED){
76-
file_put_contents(__DIR__ . '/../../../var/log/deprecations.log', $errorMessage . '|' . $errorFile . ':' . $errorLine . PHP_EOL, FILE_APPEND);
77-
return false;
78-
}
7975
if (!(error_reporting() & $errorNumber)) {
8076
// This error code is not included in error_reporting
8177
// Execute PHP internal error handler

0 commit comments

Comments
 (0)