-
Notifications
You must be signed in to change notification settings - Fork 6
Labels
Platform migrationChanges related to platform migrationsChanges related to platform migrationsenhancementNew feature or requestNew feature or requestqaImprovements in quality assurance of the projectImprovements in quality assurance of the project
Milestone
Description
Proposed Version
0.0.x
Basic Information
- ServiceManager v4 added.
- AdapterManager implemented (see below)
- Existing Unit Test passing
- Existing Integration testing passing
- Deprecated code removal (see below)
- General code refactoring (see below)
- Php language feature refactoring (see below)
- Unit test to cover new code
- Integration test to cover new code
- Psalm coverage
- Code aligned with coding standard v3
Background
N/A
Considerations
AdapterManager
- Base implementation is complete. Code is working
- Unit test have not be written as of yet
- Integration test have not been written as of yet
- All required factories have been implemented. Some secondary factories will be provided to allow application level code to override certain components such as the ResultInterface.
- All services are aliased to their Interfaces with the service identifier mapping to the actual service. All use FQCN as identifiers.
- All factories for ALL satellite packages MUST return the interface from the factory invoke method since its possible that factories may return more than a given single instance of any particular service. See the current factories in laminas-db-adapter-mysql as reference.
General refactoring
- Typing is being updated AS I touch the code. Why not in bulk, maybe via some sort of tooling you might ask. Well, the docblock comments have proven to be, lets say, not reliable. You must trace the usage from Interface to concrete implementation and VERIFY ALL typing. Which is why its being updated as the classes are touched since that is what is being worked on then the developer (me) currently has all of that code open and can review it or I have it in memory (my memory) at the time.
- Redundant docblock data is and shall be removed from all code. If its not then the CI tooling will just complain about it later anyway. Only general comments or Psalm relevant should be present. Generally there is little need to use @inheritdoc, it just works in 99% of cases these days.
Php Language feature refactoring
- As I touch the files, where possible they are moving to constructor promoted properties
- Nullsafe calls are replacing isset calls for nullable types.
- Null coalescing is being introduced where appropriate
- As well as other various improvements to readability.
Proposal(s)
Adapter Interface implementation details.
I have maintained the original entry path to laminas-db e.g.
$adapter = $container->get(AdapterInterface::class);The historical AdapterServiceFactory now simply proxies to the AdapterManager to pull the service instance.
Each satellite package will be expected to provide the following.
- Factories for all required services
- A delegator factory that targets the creation context for the AdapterManager service.
Appendix/Additional Info
- Existing Unit test that have been migrated are running. All are passing or have been marked skipped due to change in setup etc. Solutions for these issues are under consideration and will be resolved pretty quick.
- Existing integration test are running and passing.
######General notes about testing.
There are several files where the file name suggest these were part of the Integration "group" of test at some point in the past. Nearly all of those have comparable test in the current integration group. We need to decide what is to be done with these. I see no reason to duplicate test. IMHO it simply gives the impression that testing is more robust than it actual is.
Metadata
Metadata
Assignees
Labels
Platform migrationChanges related to platform migrationsChanges related to platform migrationsenhancementNew feature or requestNew feature or requestqaImprovements in quality assurance of the projectImprovements in quality assurance of the project
Type
Projects
Status
Done
Status
Done