-
Notifications
You must be signed in to change notification settings - Fork 89
Migration questions #80
Comments
I think the casing should be Changing everything to lowercase may simplify things though...
Tests shouldn't change, as that makes it even more complex to deal with BC. The aliases should be adapted, IMO.
Yes, but only if it still respects the signature of the service manager (must be a subtype of any of the |
In v2, because of the normalization, "Config" is actually transformed to "config" in all cases. But v3 no longer normalizes any thing, so it was decided to use the simplest "config" (as it was stored in v2 after normalization). |
Thanks @bakura10 - so for forward compatibility we should be changing it to "config" where used inside plugin managers, etc? |
Thinking about it in light of #81 (and keep in mind it's late) I think it would make more sense to have the aliases all Factories will need two entries:: protected $factories = [
Class:class => InvokableFactory::class,
'namespaceclass' => InvokableFactory::class,
]; Tests will need to be updated were they use old-style aliases in v3. Is there any easier way to detect the version, other than |
@kynx These are all sorted now with the latest patches I've merged from you, are they not? |
Yup! Will be updating my migration PRs later. |
Couple of things I'm not 100% about:
$services->get('Config')
in lots of v2 packages. In Expressive "config" is lowercased. I'm guessing it should be lowercased to make it compatible with both v2 and v3. Can you confirm?alllower
,camelCase
andCamelCase
, but test cases for lots packages (esp. those dependent on zend-validator) use a lot of snake case in the config ('not_empty', 'string_trim', etc). Should the tests change, or the aliases?AbstractPluginManager
have thevalidate()
method throwing anInvalidServiceException
. Most packages throw their own exception fromvalidatePlugin()
. Is the intention that all v3 packages use theInvalidServiceException
(in which casevalidatePlugin()
should catch and re-throw), or is it OK to throw the package-specific exception fromvalidate()
?Many thanks!
The text was updated successfully, but these errors were encountered: