csrdelft.nl icon indicating copy to clipboard operation
csrdelft.nl copied to clipboard

Symfony 6 / PHP 8

Open qurben opened this issue 2 years ago • 0 comments

Overzicht van wat nodig is voor Symfony 6, sowieso is een update naar PHP 8 nodig. Voor de update naar PHP 8 zijn er al een paar andere dingen te doen.

Op PHP 7

  • [ ] Update sensio/framework-extra-bundle naar v6.2.9 (of verwijderen, want abandoned)
  • [ ] Update psalm/plugin-symfony naar v5.0.0
  • [x] Update trikoder/oauth2-bundle #1057
  • [x] Update spatie/phpunit-snapshot-assertions naar 4.2.16
  • [x] Update nelmio/cors-bundle naar 2.2.0
  • [ ] PHP 8. Is pas beschikbaar in Debian 12 Bookworm wiki
  • [ ] Faker vervangen door FakerPHP/Faker (heeft php ^7.4 nodig)
composer why-not php 8.1
fzaninotto/faker v1.9.2 requires php (^5.3.3 || ^7.0) Kan niet updaten
laminas/laminas-code 3.4.1 requires php (^7.1) Er is een PHP 8.1 versie die gekozen kan worden door composer.
lcobucci/jwt 3.4.6 requires php (^5.6 || ^7.0) Er is een PHP 8.1 versie die gekozen kan worden door composer.
spatie/phpunit-snapshot-assertions 3.0.0 requires php (^7.2) Moet expliciet geupdate worden

Op PHP 8

  • [ ] Update symfony/panther naar v2.0.1
  • [ ] Update symfony/*

Coole tool: rector

// rector.php
// Voor PHP 7.3 (huidig)
<?php

use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;

return static function (RectorConfig $rectorConfig): void {
	$rectorConfig->sets([LevelSetList::UP_TO_PHP_73]);

	$rectorConfig->paths([__DIR__ . '/lib']);
};
// rector.php
// Voor php 7.4 (Bullseye)
<?php

use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;

return static function (RectorConfig $rectorConfig): void {
	$rectorConfig->sets([LevelSetList::UP_TO_PHP_74]);

	$rectorConfig->paths([__DIR__ . '/lib']);
};
// rector.php
// Voor php 8.1 (Bookworm)
<?php

use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;

return static function (RectorConfig $rectorConfig): void {
	$rectorConfig->sets([LevelSetList::UP_TO_PHP_81]);

	$rectorConfig->paths([__DIR__ . '/lib']);
};

qurben avatar Jan 05 '23 21:01 qurben