Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[php-di v7] AnnotationBasedAutowiring with additional options for performance tweaks #19

Open
wants to merge 4 commits into
base: mod7
Choose a base branch
from

Conversation

partikus
Copy link
Collaborator

Version compatible with PHP ^8.0 as a successor of #4

1. Detected deprecations in use:
- Rule "braces" is deprecated. Use "single_space_around_construct", "control_structure_braces", "control_structure_continuation_position", "declare_parentheses", "no_multiple_statements_per_line", "curly_braces_position", "statement_indentation" and "no_extra_blank_lines" instead.

2. Detected deprecations in use:
- Rule "curly_braces_position" is deprecated. Use "braces_position" instead.
@partikus partikus force-pushed the feature/php-di-7-annotations-autowiring-options branch 2 times, most recently from 1a859b4 to 40b4b87 Compare January 10, 2024 12:51
@falkenhawk
Copy link
Member

I am not sure if this is still necessary - if performance differences are significant when disabling reading attributes - since now they are, in fact, attributes, and not custom phpdoc annotations - so the whole overhead of reading annotations is gone anyway. 🤔

@falkenhawk
Copy link
Member

I suppose it won't do any harm, and could only make it perform better while skipping making reflections and reading properties and methods when not necessary, but it would be nice to have a glimpse of what's the difference in performance now by running a perf test

mnapoli and others added 3 commits January 10, 2024 19:05
…ions

feat: php-cs-fixer - removing deprecations
- adds possibility to disable features which are not used
- useAnnotations(boolean) toggle on autowire() helper to enable/disable reading annotations on specific definitions
@partikus partikus force-pushed the feature/php-di-7-annotations-autowiring-options branch from 40b4b87 to 55a5e10 Compare January 11, 2024 11:08
@falkenhawk
Copy link
Member

@partikus could you add the performance test results and conclusions in a comment here, for the record, and close it, when you have some time, please?

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

Successfully merging this pull request may close these issues.

3 participants