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

(Future work) Define statement-level helper (Top) to bypass prefixing #176

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 7, 2023

  1. Define Top helper to load classes regardless of namespace prefixing

    Currently, `cv` has a list of php-scoper rules to exclude certain classes from prefixing.
    The same list has to be adapted to use in `civix` - so, presumbly, they'll have to be
    sync'd over time.
    
    The main reason for this is to allow the PHAR to call-out to the UF during bootstrap -- and
    each UF has a different list of rules.
    
    In theory, we could drop these rules -- and replace any lines like
    `drupal_bootstrap()` with `Top::call('drupal_bootstrap')`. Then there would be no
    need to keep the rules in sync.
    
    Additionally, it would allow `cv.phar` to take advantage of libraries (like `symfony/event`)
    that might be dual-purpose. (Ex: cv.phar and UF both have `EventDispatcher`s; and you want
    to add listeners to both of them.)
    totten committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    797ef33 View commit details
    Browse the repository at this point in the history