Show depreciations symfony
Hello,
I'm using the automapper package on a project, and it's generating a lot of deprecations (lot of on symfony/property-info). I try to fix them but i'm not very familiar with this package, "property-info", and "type-info".
I just created a pull request to see the deprecations, not necessarily to include them in the project.
Do you think it's easy to fix?
1367x: Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\PropertyInfoExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\PropertyInfoExtractor::getType()" instead.
196x in AutoMapperTest::testDateTimeMapping from AutoMapper\Tests
172x in AutoMapperTest::testAutoMapperFixtures from AutoMapper\Tests
136x in ServiceInstantiationTest::testWarmup from AutoMapper\Tests\Bundle
34x in ServiceInstantiationTest::testAutoMapper from AutoMapper\Tests\Bundle
30x in AutoMapperTest::testAutoMapping from AutoMapper\Tests
...
427x: Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.
54x in AutoMapperTest::testAutoMapperFixtures from AutoMapper\Tests
49x in AutoMapperTest::testDateTimeMapping from AutoMapper\Tests
32x in ServiceInstantiationTest::testWarmup from AutoMapper\Tests\Bundle
22x in MetadataFactoryTest::testCreateWithBothObjects from AutoMapper\Tests\Metadata
16x in AutoMapperTest::testConstructor from AutoMapper\Tests
...
301x: Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getType()" instead.
49x in AutoMapperTest::testDateTimeMapping from AutoMapper\Tests
47x in AutoMapperTest::testAutoMapperFixtures from AutoMapper\Tests
15x in AutoMapperTest::testConstructorForced from AutoMapper\Tests
14x in ServiceInstantiationTest::testWarmup from AutoMapper\Tests\Bundle
11x in AutoMapperTest::testConstructor from AutoMapper\Tests
...
4x: Since api-platform/symfony 4.1.0: Currently, the kernel will always be booted when a new client is created, but in API Platform 5.0, it will not be booted unless you set `static::$alwaysBootKernel` to `true` (the default will be `false`). See https://github.com/api-platform/core/issues/6971 for more information.
1x in ApiPlatformTest::testGetBookCollectionOnApip4 from AutoMapper\Tests\Bundle
1x in ApiPlatformTest::testGetBook from AutoMapper\Tests\Bundle
1x in ApiPlatformTest::testCreateBook from AutoMapper\Tests\Bundle
1x in ApiPlatformTest::testUpdateBook from AutoMapper\Tests\Bundle
1x: Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Type" class is deprecated. Use "Symfony\Component\TypeInfo\Type" class from "symfony/type-info" instead.
1x in AutoMapperMapToTest::setUp from AutoMapper\Tests
Hey @germ1f, thanks for reporting all theses, I do know about this deprecation messages since I helped making the new symfony/type-info component but I was a bit lazy to avoid refactoring the AutoMapper library.
I will try to allocate some time to it, it's kinda a big work to do but it will make a way better codebase in the end :ok_hand:
Thanks for this pull request, at least I can see all the work that is remaining :pray:
Hey @germ1f, thanks for reporting all theses, I do know about this deprecation messages since I helped making the new
symfony/type-infocomponent but I was a bit lazy to avoid refactoring the AutoMapper library. I will try to allocate some time to it, it's kinda a big work to do but it will make a way better codebase in the end 👌Thanks for this pull request, at least I can see all the work that is remaining 🙏
Thanks for your feedback @Korbeil. Indeed, I think it's a big work :cry:
Thanks for this PR, there is work on https://github.com/jolicode/automapper/pull/297 to support symfony 8, you can already give it a try if you want.
However this will need a BC break since we have to replace a component that was part of our public interface so it will be a major version.
I will close this one, we added depreciations in phpunit but in an other way since we want to use phpunit 12.
Thanks again.