Skip to content

refactor: Switch to php documentor reflection#44

Draft
DannyvdSluijs wants to merge 2 commits into
felixfbecker:masterfrom
DannyvdSluijs:Switch-to-php-documentor-reflection
Draft

refactor: Switch to php documentor reflection#44
DannyvdSluijs wants to merge 2 commits into
felixfbecker:masterfrom
DannyvdSluijs:Switch-to-php-documentor-reflection

Conversation

@DannyvdSluijs

@DannyvdSluijs DannyvdSluijs commented Jan 9, 2021

Copy link
Copy Markdown
Contributor

This draft pull request shows a rough implementation of how php-advanced-json-rpc could use PhpDocumentor Reflection. In order to resolve #9.
I've added this PR to have a more constructive discussion about the pros and cons. I've based this on the latest stable mayor version of PHPDocumentor Reflection (^4.0). That version only support PHP 7.2 and up (Which is causing the build to fail). This already raises some concern as this lib is aiming to support PHP 7.0 but that is already two years EOL (See https://www.php.net/supported-versions.php). So perhaps some updates are needed for this lib as well?

This PR has the following changes:

  • Extracts the current implementation, based on the native reflection classes of PHP, into an interface (strategy pattern)
  • Implements a PhpDocumentor Reflection implementation of above interface

In order to complete this PR the following is needed:

  • Add unit tests for the new implementation
  • Decide if the current approach with the Reflection abstraction layer is something that is desired
  • Resolve any @todo added in this PR
  • General cleanup of the PR.
  • Ensure if we have the optimal way of caching implemented in order to resolve Cache more reflection objects #2

@DannyvdSluijs DannyvdSluijs force-pushed the Switch-to-php-documentor-reflection branch from 8006920 to e269399 Compare January 11, 2021 20:05
@DannyvdSluijs DannyvdSluijs changed the title Switch to php documentor reflection refactor: Switch to php documentor reflection Jan 11, 2021
@codecov

codecov Bot commented Jan 11, 2021

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch to phpDocumentor/reflection Cache more reflection objects

1 participant