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

Migrate php71 to pre-php80 #387

Open
wants to merge 6 commits into
base: php-migration
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Migrate from PHP 7.3 to 7.4
- Update composer.json PHP version.
- Set migration to 7.4
- Migrate
- Add log file with results of migration

This was a noop.
  • Loading branch information
cinnion committed Nov 3, 2024
commit bd9ab5ba1dd67b2657bafff40062d5a1ee4a3238
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
"type": "project",
"license": "MIT",
"require": {
"php": "^7.3",
"php": "^7.4",
"ext-json": "*",
"laravel/framework": "5.8.*",
"doctrine/dbal": "~2.3",
46 changes: 4 additions & 42 deletions rector.log
Original file line number Diff line number Diff line change
@@ -1,45 +1,7 @@
Script started on 2024-11-02 20:26:06-04:00 [TERM="xterm-256color" TTY="/dev/pts/0" COLUMNS="177" LINES="60"]
0/19 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% 16/19 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░] 84% 19/19 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
2 files with changes
====================
Script started on 2024-11-02 21:05:20-04:00 [TERM="xterm-256color" TTY="/dev/pts/0" COLUMNS="177" LINES="60"]
0/159 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% 16/159 [▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░] 10% 80/159 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░] 50%

1) app/Console/Commands/ImportGrades.php:702

---------- begin diff ----------
@@ @@
->first();

if (is_null($user) === false) {
- if (stripos(trim($user['first_name']), substr(trim($firstName[0]), 0, 2)) === 0 && stripos(
+ if (stripos(trim($user['first_name']), (string) substr(trim($firstName[0]), 0, 2)) === 0 && stripos(
trim($user['last_name']),
trim($lastName[0])
) === 0
----------- end diff -----------

Applied rules:
* StringifyStrNeedlesRector


2) app/Console/Commands/ImportUsers.php:317

---------- begin diff ----------
@@ @@
protected function normalizePinnaceName($name, $pnum, $pid)
{
// Normalize Pinnace names
- if (($pos = strpos($name, $pnum)) > 0) {
+ if (($pos = strpos($name, (string) $pnum)) > 0) {
if (substr($name, 0, 3) == 'Pin') {
$name = substr($name, 0, $pos).' '.$pid;
} else {
----------- end diff -----------

Applied rules:
* StringifyStrNeedlesRector


[OK] 2 files have been changed by Rector
[OK] Rector is done!


Script done on 2024-11-02 20:26:11-04:00 [COMMAND_EXIT_CODE="0"]
Script done on 2024-11-02 21:05:23-04:00 [COMMAND_EXIT_CODE="0"]
8 changes: 6 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\SetList;
use Rector\TypeDeclaration\Rector\Closure\AddClosureVoidReturnTypeWhereNoReturnRector;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;

return RectorConfig::configure()
->withPaths([
@@ -18,6 +19,9 @@
])
// uncomment to reach your current PHP version
// ->withPhpSets()
->withSets([SetList::PHP_73])
->withSkip([AddClosureVoidReturnTypeWhereNoReturnRector::class])
->withSets([SetList::PHP_74])
->withSkip([
AddClosureVoidReturnTypeWhereNoReturnRector::class,
ClosureToArrowFunctionRector::class,
])
->withTypeCoverageLevel(0);