Closed gschafra closed 4 years ago
Can you try to update only VichUploaderBundle and see what happens?
Yup... doing composer update vich/uploader-bundel
without updating the dependencies...
+----------------------+--------+--------+------------------------------------------------------------------------+
| Production Changes | From | To | Compare |
+----------------------+--------+--------+------------------------------------------------------------------------+
| vich/uploader-bundle | 1.13.2 | 1.14.0 | https://github.com/dustin10/VichUploaderBundle/compare/1.13.2...1.14.0 |
+----------------------+--------+--------+------------------------------------------------------------------------+
... works like a charm.
Hmmm... doing the composer update symfony/*
also without updating any other dependencies...
+----------------------------------+---------+---------+-------------------------------------------------------------------------------+
| Production Changes | From | To | Compare |
+----------------------------------+---------+---------+-------------------------------------------------------------------------------+
| symfony/asset | v4.4.7 | v4.4.10 | https://github.com/symfony/asset/compare/v4.4.7...v4.4.10 |
| symfony/cache | v4.4.7 | v4.4.10 | https://github.com/symfony/cache/compare/v4.4.7...v4.4.10 |
| symfony/cache-contracts | v2.0.1 | v2.1.2 | https://github.com/symfony/cache-contracts/compare/v2.0.1...v2.1.2 |
| symfony/config | v4.4.7 | v4.4.10 | https://github.com/symfony/config/compare/v4.4.7...v4.4.10 |
| symfony/console | v4.4.7 | v4.4.10 | https://github.com/symfony/console/compare/v4.4.7...v4.4.10 |
| symfony/debug | v4.4.7 | v4.4.10 | https://github.com/symfony/debug/compare/v4.4.7...v4.4.10 |
| symfony/dependency-injection | v4.4.7 | v4.4.10 | https://github.com/symfony/dependency-injection/compare/v4.4.7...v4.4.10 |
| symfony/doctrine-bridge | v4.4.7 | v4.4.10 | https://github.com/symfony/doctrine-bridge/compare/v4.4.7...v4.4.10 |
| symfony/dotenv | v4.4.7 | v4.4.10 | https://github.com/symfony/dotenv/compare/v4.4.7...v4.4.10 |
| symfony/error-handler | v4.4.7 | v4.4.10 | https://github.com/symfony/error-handler/compare/v4.4.7...v4.4.10 |
| symfony/event-dispatcher | v4.4.7 | v4.4.10 | https://github.com/symfony/event-dispatcher/compare/v4.4.7...v4.4.10 |
| symfony/expression-language | v4.4.7 | v4.4.10 | https://github.com/symfony/expression-language/compare/v4.4.7...v4.4.10 |
| symfony/filesystem | v4.4.7 | v4.4.10 | https://github.com/symfony/filesystem/compare/v4.4.7...v4.4.10 |
| symfony/finder | v4.4.7 | v4.4.10 | https://github.com/symfony/finder/compare/v4.4.7...v4.4.10 |
| symfony/flex | v1.6.2 | v1.8.4 | https://github.com/symfony/flex/compare/v1.6.2...v1.8.4 |
| symfony/form | v4.4.7 | v4.4.10 | https://github.com/symfony/form/compare/v4.4.7...v4.4.10 |
| symfony/framework-bundle | v4.4.7 | v4.4.10 | https://github.com/symfony/framework-bundle/compare/v4.4.7...v4.4.10 |
| symfony/http-client | v4.4.9 | v4.4.10 | https://github.com/symfony/http-client/compare/v4.4.9...v4.4.10 |
| symfony/http-foundation | v4.4.7 | v4.4.10 | https://github.com/symfony/http-foundation/compare/v4.4.7...v4.4.10 |
| symfony/http-kernel | v4.4.7 | v4.4.10 | https://github.com/symfony/http-kernel/compare/v4.4.7...v4.4.10 |
| symfony/inflector | v4.4.7 | v4.4.10 | https://github.com/symfony/inflector/compare/v4.4.7...v4.4.10 |
| symfony/intl | v4.4.7 | v4.4.10 | https://github.com/symfony/intl/compare/v4.4.7...v4.4.10 |
| symfony/ldap | v4.4.7 | v4.4.10 | https://github.com/symfony/ldap/compare/v4.4.7...v4.4.10 |
| symfony/mime | v4.4.7 | v4.4.10 | https://github.com/symfony/mime/compare/v4.4.7...v4.4.10 |
| symfony/monolog-bridge | v4.4.7 | v4.4.10 | https://github.com/symfony/monolog-bridge/compare/v4.4.7...v4.4.10 |
| symfony/options-resolver | v4.4.7 | v4.4.10 | https://github.com/symfony/options-resolver/compare/v4.4.7...v4.4.10 |
| symfony/polyfill-intl-grapheme | v1.15.0 | v1.17.1 | https://github.com/symfony/polyfill-intl-grapheme/compare/v1.15.0...v1.17.1 |
| symfony/polyfill-intl-icu | v1.15.0 | v1.17.1 | https://github.com/symfony/polyfill-intl-icu/compare/v1.15.0...v1.17.1 |
| symfony/polyfill-intl-idn | v1.15.0 | v1.17.1 | https://github.com/symfony/polyfill-intl-idn/compare/v1.15.0...v1.17.1 |
| symfony/polyfill-intl-normalizer | v1.15.0 | v1.17.1 | https://github.com/symfony/polyfill-intl-normalizer/compare/v1.15.0...v1.17.1 |
| symfony/polyfill-mbstring | v1.15.0 | v1.17.1 | https://github.com/symfony/polyfill-mbstring/compare/v1.15.0...v1.17.1 |
| symfony/polyfill-php72 | v1.15.0 | v1.17.0 | https://github.com/symfony/polyfill-php72/compare/v1.15.0...v1.17.0 |
| symfony/polyfill-php73 | v1.15.0 | v1.17.1 | https://github.com/symfony/polyfill-php73/compare/v1.15.0...v1.17.1 |
| symfony/property-access | v4.4.7 | v4.4.10 | https://github.com/symfony/property-access/compare/v4.4.7...v4.4.10 |
| symfony/property-info | v4.4.7 | v4.4.10 | https://github.com/symfony/property-info/compare/v4.4.7...v4.4.10 |
| symfony/psr-http-message-bridge | v2.0.0 | v2.0.1 | https://github.com/symfony/psr-http-message-bridge/compare/v2.0.0...v2.0.1 |
| symfony/routing | v4.4.7 | v4.4.10 | https://github.com/symfony/routing/compare/v4.4.7...v4.4.10 |
| symfony/security-bundle | v4.4.7 | v4.4.10 | https://github.com/symfony/security-bundle/compare/v4.4.7...v4.4.10 |
| symfony/security-core | v4.4.7 | v4.4.10 | https://github.com/symfony/security-core/compare/v4.4.7...v4.4.10 |
| symfony/security-csrf | v4.4.7 | v4.4.10 | https://github.com/symfony/security-csrf/compare/v4.4.7...v4.4.10 |
| symfony/security-guard | v4.4.7 | v4.4.10 | https://github.com/symfony/security-guard/compare/v4.4.7...v4.4.10 |
| symfony/security-http | v4.4.7 | v4.4.10 | https://github.com/symfony/security-http/compare/v4.4.7...v4.4.10 |
| symfony/serializer | v4.4.7 | v4.4.10 | https://github.com/symfony/serializer/compare/v4.4.7...v4.4.10 |
| symfony/service-contracts | v2.0.1 | v2.1.2 | https://github.com/symfony/service-contracts/compare/v2.0.1...v2.1.2 |
| symfony/stopwatch | v4.4.7 | v4.4.10 | https://github.com/symfony/stopwatch/compare/v4.4.7...v4.4.10 |
| symfony/string | v5.0.7 | v5.1.2 | https://github.com/symfony/string/compare/v5.0.7...v5.1.2 |
| symfony/translation | v4.4.7 | v4.4.10 | https://github.com/symfony/translation/compare/v4.4.7...v4.4.10 |
| symfony/translation-contracts | v2.0.1 | v2.1.2 | https://github.com/symfony/translation-contracts/compare/v2.0.1...v2.1.2 |
| symfony/twig-bridge | v4.4.7 | v4.4.10 | https://github.com/symfony/twig-bridge/compare/v4.4.7...v4.4.10 |
| symfony/twig-bundle | v4.4.7 | v4.4.10 | https://github.com/symfony/twig-bundle/compare/v4.4.7...v4.4.10 |
| symfony/validator | v4.4.7 | v4.4.10 | https://github.com/symfony/validator/compare/v4.4.7...v4.4.10 |
| symfony/var-dumper | v4.4.7 | v4.4.10 | https://github.com/symfony/var-dumper/compare/v4.4.7...v4.4.10 |
| symfony/var-exporter | v4.4.7 | v4.4.10 | https://github.com/symfony/var-exporter/compare/v4.4.7...v4.4.10 |
| symfony/web-link | v4.4.7 | v4.4.10 | https://github.com/symfony/web-link/compare/v4.4.7...v4.4.10 |
| symfony/yaml | v4.4.7 | v4.4.10 | https://github.com/symfony/yaml/compare/v4.4.7...v4.4.10 |
| vich/uploader-bundle | 1.13.2 | 1.14.0 | https://github.com/dustin10/VichUploaderBundle/compare/1.13.2...1.14.0 |
| symfony/polyfill-php80 | NEW | v1.17.1 | |
+----------------------------------+---------+---------+-------------------------------------------------------------------------------+
+------------------------+---------+---------+--------------------------------------------------------------------+
| Dev Changes | From | To | Compare |
+------------------------+---------+---------+--------------------------------------------------------------------+
| symfony/maker-bundle | v1.14.6 | v1.19.0 | https://github.com/symfony/maker-bundle/compare/v1.14.6...v1.19.0 |
| symfony/phpunit-bridge | v4.4.7 | v4.4.10 | https://github.com/symfony/phpunit-bridge/compare/v4.4.7...v4.4.10 |
+------------------------+---------+---------+--------------------------------------------------------------------+
... also works like a charm.
Even after updating api-platform with composer update api-platform/*
(without dependency update with --with-all-dependencies), upload works.
+----------------------------------+---------+---------+-------------------------------------------------------------------------------+ | Production Changes | From | To | Compare | +----------------------------------+---------+---------+-------------------------------------------------------------------------------+ | api-platform/core | v2.5.5 | v2.5.6 | https://github.com/api-platform/core/compare/v2.5.5...v2.5.6 | | symfony/asset | v4.4.7 | v4.4.10 | https://github.com/symfony/asset/compare/v4.4.7...v4.4.10 | | symfony/cache | v4.4.7 | v4.4.10 | https://github.com/symfony/cache/compare/v4.4.7...v4.4.10 | | symfony/cache-contracts | v2.0.1 | v2.1.2 | https://github.com/symfony/cache-contracts/compare/v2.0.1...v2.1.2 | | symfony/config | v4.4.7 | v4.4.10 | https://github.com/symfony/config/compare/v4.4.7...v4.4.10 | | symfony/console | v4.4.7 | v4.4.10 | https://github.com/symfony/console/compare/v4.4.7...v4.4.10 | | symfony/debug | v4.4.7 | v4.4.10 | https://github.com/symfony/debug/compare/v4.4.7...v4.4.10 | | symfony/dependency-injection | v4.4.7 | v4.4.10 | https://github.com/symfony/dependency-injection/compare/v4.4.7...v4.4.10 | | symfony/doctrine-bridge | v4.4.7 | v4.4.10 | https://github.com/symfony/doctrine-bridge/compare/v4.4.7...v4.4.10 | | symfony/dotenv | v4.4.7 | v4.4.10 | https://github.com/symfony/dotenv/compare/v4.4.7...v4.4.10 | | symfony/error-handler | v4.4.7 | v4.4.10 | https://github.com/symfony/error-handler/compare/v4.4.7...v4.4.10 | | symfony/event-dispatcher | v4.4.7 | v4.4.10 | https://github.com/symfony/event-dispatcher/compare/v4.4.7...v4.4.10 | | symfony/expression-language | v4.4.7 | v4.4.10 | https://github.com/symfony/expression-language/compare/v4.4.7...v4.4.10 | | symfony/filesystem | v4.4.7 | v4.4.10 | https://github.com/symfony/filesystem/compare/v4.4.7...v4.4.10 | | symfony/finder | v4.4.7 | v4.4.10 | https://github.com/symfony/finder/compare/v4.4.7...v4.4.10 | | symfony/flex | v1.6.2 | v1.8.4 | https://github.com/symfony/flex/compare/v1.6.2...v1.8.4 | | symfony/form | v4.4.7 | v4.4.10 | https://github.com/symfony/form/compare/v4.4.7...v4.4.10 | | symfony/framework-bundle | v4.4.7 | v4.4.10 | https://github.com/symfony/framework-bundle/compare/v4.4.7...v4.4.10 | | symfony/http-client | v4.4.9 | v4.4.10 | https://github.com/symfony/http-client/compare/v4.4.9...v4.4.10 | | symfony/http-foundation | v4.4.7 | v4.4.10 | https://github.com/symfony/http-foundation/compare/v4.4.7...v4.4.10 | | symfony/http-kernel | v4.4.7 | v4.4.10 | https://github.com/symfony/http-kernel/compare/v4.4.7...v4.4.10 | | symfony/inflector | v4.4.7 | v4.4.10 | https://github.com/symfony/inflector/compare/v4.4.7...v4.4.10 | | symfony/intl | v4.4.7 | v4.4.10 | https://github.com/symfony/intl/compare/v4.4.7...v4.4.10 | | symfony/ldap | v4.4.7 | v4.4.10 | https://github.com/symfony/ldap/compare/v4.4.7...v4.4.10 | | symfony/mime | v4.4.7 | v4.4.10 | https://github.com/symfony/mime/compare/v4.4.7...v4.4.10 | | symfony/monolog-bridge | v4.4.7 | v4.4.10 | https://github.com/symfony/monolog-bridge/compare/v4.4.7...v4.4.10 | | symfony/options-resolver | v4.4.7 | v4.4.10 | https://github.com/symfony/options-resolver/compare/v4.4.7...v4.4.10 | | symfony/polyfill-intl-grapheme | v1.15.0 | v1.17.1 | https://github.com/symfony/polyfill-intl-grapheme/compare/v1.15.0...v1.17.1 | | symfony/polyfill-intl-icu | v1.15.0 | v1.17.1 | https://github.com/symfony/polyfill-intl-icu/compare/v1.15.0...v1.17.1 | | symfony/polyfill-intl-idn | v1.15.0 | v1.17.1 | https://github.com/symfony/polyfill-intl-idn/compare/v1.15.0...v1.17.1 | | symfony/polyfill-intl-normalizer | v1.15.0 | v1.17.1 | https://github.com/symfony/polyfill-intl-normalizer/compare/v1.15.0...v1.17.1 | | symfony/polyfill-mbstring | v1.15.0 | v1.17.1 | https://github.com/symfony/polyfill-mbstring/compare/v1.15.0...v1.17.1 | | symfony/polyfill-php72 | v1.15.0 | v1.17.0 | https://github.com/symfony/polyfill-php72/compare/v1.15.0...v1.17.0 | | symfony/polyfill-php73 | v1.15.0 | v1.17.1 | https://github.com/symfony/polyfill-php73/compare/v1.15.0...v1.17.1 | | symfony/property-access | v4.4.7 | v4.4.10 | https://github.com/symfony/property-access/compare/v4.4.7...v4.4.10 | | symfony/property-info | v4.4.7 | v4.4.10 | https://github.com/symfony/property-info/compare/v4.4.7...v4.4.10 | | symfony/psr-http-message-bridge | v2.0.0 | v2.0.1 | https://github.com/symfony/psr-http-message-bridge/compare/v2.0.0...v2.0.1 | | symfony/routing | v4.4.7 | v4.4.10 | https://github.com/symfony/routing/compare/v4.4.7...v4.4.10 | | symfony/security-bundle | v4.4.7 | v4.4.10 | https://github.com/symfony/security-bundle/compare/v4.4.7...v4.4.10 | | symfony/security-core | v4.4.7 | v4.4.10 | https://github.com/symfony/security-core/compare/v4.4.7...v4.4.10 | | symfony/security-csrf | v4.4.7 | v4.4.10 | https://github.com/symfony/security-csrf/compare/v4.4.7...v4.4.10 | | symfony/security-guard | v4.4.7 | v4.4.10 | https://github.com/symfony/security-guard/compare/v4.4.7...v4.4.10 | | symfony/security-http | v4.4.7 | v4.4.10 | https://github.com/symfony/security-http/compare/v4.4.7...v4.4.10 | | symfony/serializer | v4.4.7 | v4.4.10 | https://github.com/symfony/serializer/compare/v4.4.7...v4.4.10 | | symfony/service-contracts | v2.0.1 | v2.1.2 | https://github.com/symfony/service-contracts/compare/v2.0.1...v2.1.2 | | symfony/stopwatch | v4.4.7 | v4.4.10 | https://github.com/symfony/stopwatch/compare/v4.4.7...v4.4.10 | | symfony/string | v5.0.7 | v5.1.2 | https://github.com/symfony/string/compare/v5.0.7...v5.1.2 | | symfony/translation | v4.4.7 | v4.4.10 | https://github.com/symfony/translation/compare/v4.4.7...v4.4.10 | | symfony/translation-contracts | v2.0.1 | v2.1.2 | https://github.com/symfony/translation-contracts/compare/v2.0.1...v2.1.2 | | symfony/twig-bridge | v4.4.7 | v4.4.10 | https://github.com/symfony/twig-bridge/compare/v4.4.7...v4.4.10 | | symfony/twig-bundle | v4.4.7 | v4.4.10 | https://github.com/symfony/twig-bundle/compare/v4.4.7...v4.4.10 | | symfony/validator | v4.4.7 | v4.4.10 | https://github.com/symfony/validator/compare/v4.4.7...v4.4.10 | | symfony/var-dumper | v4.4.7 | v4.4.10 | https://github.com/symfony/var-dumper/compare/v4.4.7...v4.4.10 | | symfony/var-exporter | v4.4.7 | v4.4.10 | https://github.com/symfony/var-exporter/compare/v4.4.7...v4.4.10 | | symfony/web-link | v4.4.7 | v4.4.10 | https://github.com/symfony/web-link/compare/v4.4.7...v4.4.10 | | symfony/yaml | v4.4.7 | v4.4.10 | https://github.com/symfony/yaml/compare/v4.4.7...v4.4.10 | | vich/uploader-bundle | 1.13.2 | 1.14.0 | https://github.com/dustin10/VichUploaderBundle/compare/1.13.2...1.14.0 | | symfony/polyfill-php80 | NEW | v1.17.1 | | +----------------------------------+---------+---------+-------------------------------------------------------------------------------+
+------------------------+---------+---------+--------------------------------------------------------------------+ | Dev Changes | From | To | Compare | +------------------------+---------+---------+--------------------------------------------------------------------+ | symfony/maker-bundle | v1.14.6 | v1.19.0 | https://github.com/symfony/maker-bundle/compare/v1.14.6...v1.19.0 | | symfony/phpunit-bridge | v4.4.7 | v4.4.10 | https://github.com/symfony/phpunit-bridge/compare/v4.4.7...v4.4.10 | +------------------------+---------+---------+--------------------------------------------------------------------+
Looks like the trouble might be caused by any "subsequent" dependency updated when using --with-all-dependencies
. Have to investigate further...
O.k... when it comes to doctrine/*
updates in the course of doing composer update trikoder/oauth2-bundle --with-all-dependencies
, then the problems begin...
+----------------------------------+---------+---------+----------------------------------------------------------------------------------+
| Production Changes | From | To | Compare |
+----------------------------------+---------+---------+----------------------------------------------------------------------------------+
| api-platform/core | v2.5.5 | v2.5.6 | https://github.com/api-platform/core/compare/v2.5.5...v2.5.6 |
| doctrine/annotations | 1.10.2 | 1.10.3 | https://github.com/doctrine/annotations/compare/1.10.2...1.10.3 |
| doctrine/cache | 1.10.0 | 1.10.1 | https://github.com/doctrine/cache/compare/1.10.0...1.10.1 |
| doctrine/collections | 1.6.4 | 1.6.5 | https://github.com/doctrine/collections/compare/1.6.4...1.6.5 |
| doctrine/common | 2.12.0 | 2.13.3 | https://github.com/doctrine/common/compare/2.12.0...2.13.3 |
| doctrine/doctrine-bundle | 1.12.7 | 1.12.10 | https://github.com/doctrine/DoctrineBundle/compare/1.12.7...1.12.10 |
| doctrine/inflector | 1.3.1 | 1.4.3 | https://github.com/doctrine/inflector/compare/1.3.1...1.4.3 |
| doctrine/instantiator | 1.3.0 | 1.3.1 | https://github.com/doctrine/instantiator/compare/1.3.0...1.3.1 |
| doctrine/lexer | 1.2.0 | 1.2.1 | https://github.com/doctrine/lexer/compare/1.2.0...1.2.1 |
| doctrine/orm | v2.7.2 | v2.7.3 | https://github.com/doctrine/orm/compare/v2.7.2...v2.7.3 |
| lcobucci/jwt | 3.3.1 | 3.3.2 | https://github.com/lcobucci/jwt/compare/3.3.1...3.3.2 |
| league/oauth2-server | 8.0.0 | 8.1.0 | https://github.com/thephpleague/oauth2-server/compare/8.0.0...8.1.0 |
| sensio/framework-extra-bundle | v5.5.3 | v5.5.6 | https://github.com/sensiolabs/SensioFrameworkExtraBundle/compare/v5.5.3...v5.5.6 |
....
Suspect found... doctrine/orm v2.7.3... but why? Maybe somthing for the doctrine/orm
issue list?
Maybe this PR? https://github.com/doctrine/orm/pull/8138
Hmmmm... worth to try out/check... thanks a lot @garak
O.k... seems to be my fault... or an inattention. As stated in the embeddable tutorial a basic @Column
mapping, i.e. @Column annotations must be given in the embeddale class definition, which in my case were dropped by mistake (using a derivated embeddable class to do some API-Platform specific annotation complements). Weird, that it worked in v2.7.2... but this might be related to the PR referenced above. For the sake of completeness here what I've changed:
Before:
<?php
namespace App\Entity;
use App\Entity\Interfaces\EmbeddedFileInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Vich\UploaderBundle\Entity\File;
/**
* Class File
*
* @package App\Entity
*
* @ORM\Embeddable
*/
class EmbeddedFile extends File implements EmbeddedFileInterface
{
/**
* The entity id
*
* @var int|string|null
*/
private $id;
/**
* @var string
*
* @Groups({"idd_read", "idd_write", "document_read", "document_write", "message_document_read", "message_document_write", "message_read"})
*/
protected $name;
/**
* @var string
*
* @Groups({"idd_read", "idd_write", "document_read", "document_write", "message_document_read", "message_document_write", "message_read"})
*/
protected $originalName;
/**
* @var string
*
* @Groups({"idd_read", "idd_write", "document_read", "document_write", "message_document_read", "message_document_write", "message_read"})
*/
protected $mimeType;
/**
* @var int
*
* @Groups({"idd_read", "idd_write", "document_read", "document_write", "message_document_read", "message_document_write", "message_read"})
*/
protected $size;
/**
* @var array
*
* @Groups({"idd_read", "idd_write", "document_read", "document_write", "message_document_read", "message_document_write", "message_read"})
*/
protected $dimensions;
/**
* @var string|null
*
* @ORM\Column(name="url", type="string", length=255, nullable=true)
*
* @Groups({"idd_read", "idd_write", "document_read", "document_write", "message_document_read", "message_document_write", "message_read"})
*/
protected $url;
/**
* @return int|string|null
*/
public function getId()
{
return $this->id;
}
/**
* @param int|string|null $id
*/
public function setId($id): void
{
$this->id = $id;
}
/**
* @return string|null
*/
public function getUrl(): ?string
{
return $this->url;
}
/**
* @param string|null $url
*/
public function setUrl(?string $url): void
{
$this->url = $url;
}
}
After:
<?php
namespace App\Entity;
use App\Entity\Interfaces\EmbeddedFileInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Vich\UploaderBundle\Entity\File;
/**
* Class File
*
* @package App\Entity
*
* @ORM\Embeddable
*/
class EmbeddedFile extends File implements EmbeddedFileInterface
{
/**
* The entity id
*
* @var int|string|null
*/
private $id;
/**
* @var string
*
* @Groups({"idd_read", "idd_write", "document_read", "document_write", "message_document_read", "message_document_write", "message_read"})
*
* @ORM\Column(name="name", nullable=true)
*/
protected $name;
/**
* @var string
*
* @Groups({"idd_read", "idd_write", "document_read", "document_write", "message_document_read", "message_document_write", "message_read"})
*
* @ORM\Column(name="original_name", nullable=true)
*/
protected $originalName;
/**
* @var string
*
* @Groups({"idd_read", "idd_write", "document_read", "document_write", "message_document_read", "message_document_write", "message_read"})
*
* @ORM\Column(name="mime_type", nullable=true)
*/
protected $mimeType;
/**
* @var int
*
* @Groups({"idd_read", "idd_write", "document_read", "document_write", "message_document_read", "message_document_write", "message_read"})
*
* @ORM\Column(name="size", type="integer", nullable=true)
*/
protected $size;
/**
* @var array
*
* @Groups({"idd_read", "idd_write", "document_read", "document_write", "message_document_read", "message_document_write", "message_read"})
*
* @ORM\Column(name="dimensions", type="simple_array", nullable=true)
*/
protected $dimensions;
/**
* @var string|null
*
* @ORM\Column(name="url", type="string", length=255, nullable=true)
*
* @Groups({"idd_read", "idd_write", "document_read", "document_write", "message_document_read", "message_document_write", "message_read"})
*
* @ORM\Column(type="string")
*/
protected $url;
/**
* @return int|string|null
*/
public function getId()
{
return $this->id;
}
/**
* @param int|string|null $id
*/
public function setId($id): void
{
$this->id = $id;
}
/**
* @return string|null
*/
public function getUrl(): ?string
{
return $this->url;
}
/**
* @param string|null $url
*/
public function setUrl(?string $url): void
{
$this->url = $url;
}
}
Bug Report
Summary
Since an upgrade of of Symfony v4.4.7 -> v4.4.10 and API-Platform v2.5.5 -> v2.5.6, file attributes using Vich\UploaderBundle\Entity\File embeddable (fileName, fileOriginalName, fileMimeType) no longer become persisted.
Current behavior
After uploading using api-platform POST endpoint (with custom controller, see https://api-platform.com/docs/core/file-upload/#handling-file-upload), the file info values are NULL:
How to reproduce
composer.json:
Package update info:
Entity:
Controller:
Expected behavior
File info fields become filled correctly after/on upload