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

Build is broken #1458

Closed
garak opened this issue Jul 5, 2024 · 1 comment
Closed

Build is broken #1458

garak opened this issue Jul 5, 2024 · 1 comment

Comments

@garak
Copy link
Collaborator

garak commented Jul 5, 2024

Our tests are currently broken, even if the last build succeded (with a minor problem of style).
Probably some changes in Symfony broken our tests.
At the bottom of this issue description I pasted the output of PHPUnit.

We need to fix the tests:

  1. check the reason for the missing annotations library problem. Probably we need to convert out tests to use only attributes
  2. check the problem of missing AnnotationReader service. Probably related to the first point
  3. check why the test kernel is not found
  4. fix the notices about the Doctrine configuration
  5. fix the style errors seen in out last build (see the "Actions" tab above)

PHPUnit output, you can reproduce in by cloning this repo and running TARGET=83 make tests:

Testing 
..EE.FE.E.......E.......................SSS.SSSS...............  63 / 264 ( 23%)
................................................EEEEEE......... 126 / 264 ( 47%)
............................................................... 189 / 264 ( 71%)
............................SSSSSSSSSSSS....................EEE 252 / 264 ( 95%)
SE

Time: 00:04.561, Memory: 71.00 MB

There were 15 errors:

1) Vich\UploaderBundle\Tests\Command\MappingDebugClassCommandTest::testNotUploadableClass
Vich\UploaderBundle\Exception\MissingPackageException: Annotations support missing. Try running "composer require doctrine/annotations".

2) Vich\UploaderBundle\Tests\Command\MappingDebugClassCommandTest::testUploadableClass
Vich\UploaderBundle\Exception\MissingPackageException: Annotations support missing. Try running "composer require doctrine/annotations".

3) Vich\UploaderBundle\Tests\Command\MappingDebugCommandTest::testExistentMapping
Vich\UploaderBundle\Exception\MissingPackageException: Annotations support missing. Try running "composer require doctrine/annotations".

4) Vich\UploaderBundle\Tests\Command\MappingListClassesCommandTest::testListClasses
Vich\UploaderBundle\Exception\MissingPackageException: Annotations support missing. Try running "composer require doctrine/annotations".

5) Vich\UploaderBundle\Tests\DependencyInjection\VichUploaderExtensionTest::testMetadataAnnotation
Vich\UploaderBundle\Exception\MissingPackageException: Annotations support missing. Try running "composer require doctrine/annotations".

6) Vich\UploaderBundle\Tests\Metadata\Driver\AnnotationDriverTest::testReadUploadableAnnotation
PHPUnit\Framework\MockObject\UnknownTypeException: Class or interface "Doctrine\Common\Annotations\Reader" does not exist

7) Vich\UploaderBundle\Tests\Metadata\Driver\AnnotationDriverTest::testReadUploadableAnnotationReturnsNullWhenNonePresent
PHPUnit\Framework\MockObject\UnknownTypeException: Class or interface "Doctrine\Common\Annotations\Reader" does not exist

8) Vich\UploaderBundle\Tests\Metadata\Driver\AnnotationDriverTest::testReadTwoUploadableFields
PHPUnit\Framework\MockObject\UnknownTypeException: Class or interface "Doctrine\Common\Annotations\Reader" does not exist

/srv/vich-uploader/tests/Metadata/Driver/AnnotationDriverTest.php:102

9) Vich\UploaderBundle\Tests\Metadata\Driver\AnnotationDriverTest::testReadNoUploadableFieldsWhenNoneExist
PHPUnit\Framework\MockObject\UnknownTypeException: Class or interface "Doctrine\Common\Annotations\Reader" does not exist

/srv/vich-uploader/tests/Metadata/Driver/AnnotationDriverTest.php:159

10) Vich\UploaderBundle\Tests\Metadata\Driver\AnnotationDriverTest::testReadUploadableAnnotationInParentClass
PHPUnit\Framework\MockObject\UnknownTypeException: Class or interface "Doctrine\Common\Annotations\Reader" does not exist

/srv/vich-uploader/tests/Metadata/Driver/AnnotationDriverTest.php:176

11) Vich\UploaderBundle\Tests\Metadata\Driver\AnnotationDriverTest::testReadUploadableAnnotationReturnsNullWhenNonePresentInParentClass
PHPUnit\Framework\MockObject\UnknownTypeException: Class or interface "Doctrine\Common\Annotations\Reader" does not exist

12) Vich\UploaderBundle\Tests\VichUploaderBundleTest::testSimpleKernel
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: Service "kernel" not found: the container inside "Symfony\Component\DependencyInjection\Argument\ServiceLocator" is a smaller service locator that is empty...

13) Vich\UploaderBundle\Tests\VichUploaderBundleTest::testFilesystemKernel
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: Service "kernel" not found: the container inside "Symfony\Component\DependencyInjection\Argument\ServiceLocator" is a smaller service locator that is empty...

14) Vich\UploaderBundle\Tests\VichUploaderBundleTest::testFlysystemOfficialKernel
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: Service "kernel" not found: the container inside "Symfony\Component\DependencyInjection\Argument\ServiceLocator" is a smaller service locator that is empty...

15) Vich\UploaderBundle\Tests\VichUploaderBundleTest::testReplacingFileIsCorrectlyUploaded
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: Service "kernel" not found: the container inside "Symfony\Component\DependencyInjection\Argument\ServiceLocator" is a smaller service locator that is empty...

--

There was 1 failure:

1) Vich\UploaderBundle\Tests\Command\MappingDebugCommandTest::testNotExistentMapping
Failed asserting that exception of type "Vich\UploaderBundle\Exception\MissingPackageException" matches expected exception "Vich\UploaderBundle\Exception\MappingNotFoundException". Message was: "Annotations support missing. Try running "composer require doctrine/annotations"." at
/srv/vich-uploader/src/DependencyInjection/VichUploaderExtension.php:145


ERRORS!
Tests: 264, Assertions: 534, Errors: 15, Failures: 1, Skipped: 20.

Remaining indirect deprecation notices (10)

  5x: Since doctrine/doctrine-bundle 2.12: The default value of "doctrine.orm.controller_resolver.auto_mapping" will be changed from `true` to `false`. Explicitly configure `true` to keep existing behaviour.
    1x in MappingDebugClassCommandTest::testNotUploadableClass from Vich\UploaderBundle\Tests\Command
    1x in MappingDebugClassCommandTest::testUploadableClass from Vich\UploaderBundle\Tests\Command
    1x in MappingDebugCommandTest::testNotExistentMapping from Vich\UploaderBundle\Tests\Command
    1x in MappingDebugCommandTest::testExistentMapping from Vich\UploaderBundle\Tests\Command
    1x in MappingListClassesCommandTest::testListClasses from Vich\UploaderBundle\Tests\Command

  5x: Since doctrine/doctrine-bundle 2.11: Not setting "doctrine.orm.enable_lazy_ghost_objects" to true is deprecated.
    1x in MappingDebugClassCommandTest::testNotUploadableClass from Vich\UploaderBundle\Tests\Command
    1x in MappingDebugClassCommandTest::testUploadableClass from Vich\UploaderBundle\Tests\Command
    1x in MappingDebugCommandTest::testNotExistentMapping from Vich\UploaderBundle\Tests\Command
    1x in MappingDebugCommandTest::testExistentMapping from Vich\UploaderBundle\Tests\Command
    1x in MappingListClassesCommandTest::testListClasses from Vich\UploaderBundle\Tests\Command
@garak
Copy link
Collaborator Author

garak commented Jul 7, 2024

Fixed in #1459

@garak garak closed this as completed Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant