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

Finish conversion to EPP templates #2545

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Finish conversion to EPP templates #2545

wants to merge 8 commits into from

Commits on Jun 6, 2024

  1. Add missing line breaks

    This code section is weird.  My guess is someone unexpectedly pressed
    `J` in vi and joined multiple lines.
    smortex authored and Ramesh7 committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    ae3632a View commit details
    Browse the repository at this point in the history
  2. Remove unused file

    smortex authored and Ramesh7 committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    b2b0350 View commit details
    Browse the repository at this point in the history
  3. Fix apache::vhost::error_documents data type

    The template in templates/vhost/_error_document.erb is only functionnal
    if we pass an array of hashes.  This is going to be simplified in a
    future commit so only accept values that produce working configuration
    and reject configuration that is invalid and ignored.
    smortex authored and Ramesh7 committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    e3320a5 View commit details
    Browse the repository at this point in the history
  4. Make sure we still support ERB templates when provided

    `apache::mod::php` allows to pass an ERB template, switching the default
    template to EPP will require us to change the default value of the
    `template` parameter which is generally a breaking change.
    
    Users who rely on this parameter to provide a custom template are
    currently using an ERB template, so we must preserve the legacy behavior
    for them, and detect if the template should be processed as ERB or EPP.
    
    For this purpose, we check the file extension in a conservative way (any
    template whose filename does not end with `.epp` is assumbed to be an
    ERB template).
    
    As a result, this change is backwards-compatible for end-users.
    smortex authored and Ramesh7 committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    ce29022 View commit details
    Browse the repository at this point in the history
  5. Switch last templates to EPP

    A lot of work was done to convert the module templates form ERB to EPP,
    but a few templates where still to be converted.
    
    Along with various benefits, EPP templates offer better detection for
    access to undefined variables.  This refactoring therefore fix a few
    issues that where reported while converting.  Also a bunch of outdated
    comments about which template use which variable where removed no that
    this usage is explicit.
    
    The extensive test suite helped ensure the conversion was not
    introducing regressions.
    smortex authored and Ramesh7 committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    adb5b1a View commit details
    Browse the repository at this point in the history
  6. Fix CI

    A required variable in the template does not exist in the class
    parameters.  Maybe nobody use this and we can just ignore this for the
    next few weeks RedHat 7 (the only OS exercising this code path) is
    supported?
    smortex authored and Ramesh7 committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    14f2189 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7c48bce View commit details
    Browse the repository at this point in the history
  8. Simplify type checking

    The typing system allows us to build more straightforward type checking,
    while here replace some conditional constructs to non-conditional ones
    as we usualy do nowadays.
    smortex authored and Ramesh7 committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    6d15dbe View commit details
    Browse the repository at this point in the history