I've recently started using zend framework 3 for work; and was asked about the possibility of using the same library files within another application, or project.
The application folder 'manufactoring' contains all expected folders within a zf3 structure, such as modules, library, etc.
The question is: can you refer to the library files within 'manufactoring' within another application/project?
This would reduce code duplication.
I have tried answers to other questions on Stack Overflow; however they related to files within the same project.
I was able to link and execute using include or require, which allowed variables to be defined, or functions to be called from a source outside the application/project; however for my use I needed to define a new class, and this method did not work for that purpose.
Any insight would be greatly appreciated.
EDIT: I found this answer from another stackoverflow question: https://stackoverflow.com/a/3272684/10647325 which suggests a solution I am aiming for. This example has a common folder at the same level as the application folders, which contains libraries which can be linked to application folders.
EDIT: I've also tried changing the library path on composer.json. This worked after running composer dump-autoload for migration.