!!! FEATURE: Compatibility with neos/metadata 3 - #33
Conversation
6af592f to
f4254a3
Compare
f4254a3 to
91ef4e1
Compare
|
Turned it back to draft, as we haven't released the new metadata package version yet |
|
@kdambekalns I saw that you maintained this package in the last years a bit. So this is just a ping, that we make some bigger changes ;) |
| $connection->executeStatement('CREATE TABLE IF NOT EXISTS neos_metadata_value ( | ||
| `asset_source_id` VARCHAR(255) DEFAULT NULL, | ||
| `asset_id` VARCHAR(40) DEFAULT NULL, | ||
| `property_name` VARCHAR(40) NOT NULL, | ||
| `property_value` VARCHAR(250) NOT NULL, | ||
| `dimension_hash` VARCHAR(250) NOT NULL, | ||
| UNIQUE INDEX idx_unique (`asset_source_id`, `asset_id`, `property_name`, `dimension_hash`) | ||
| ) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
There was a problem hiding this comment.
Uff, this is not good. This will break at any point. Why is this table not created by flow/neos initialization?
There was a problem hiding this comment.
Ah thx! Sorry an oversight I saw that the agent added but then forgot to remove
There was a problem hiding this comment.
Hm the Neos.MetaData Tests do the same, as it doesn't use actual doctrine entities.
Ok I don't know how to solve this the "correct" way. I can neither mock the final MetaDataManager, nor can I rely on the tables to be created.
There was a problem hiding this comment.
You can mock the MetaDataManager by its interface .... it doesn't have 🙄 Maybe it makes sense to add an interface for the public methods. 🤷♂️
There was a problem hiding this comment.
And now I have the same problem of course in the Media.Ui tests…
Maybe one day I will understand how final classes make my life easier, instead of cursing them regularly.
Thanks! I wouldn't have know. 😎 |
This (possible breaking) change makes the package compatible with the changes made in neos/metadata#11
Notable changes:
Breaking changes:
As the API in the metadata changed, this package also works a bit different now. If the package was used "as is", it should be suffice to run
./flow metadata:extractto read the metadata again from the stored assets.If the package was extended, f.e. with custom converters, those need to be adjusted probably.