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

Fix .env support when running from phar archive #239

Merged
merged 2 commits into from
Sep 15, 2023

Commits on Sep 15, 2023

  1. Enable phpcs and phpcbf checks to run from phar

    We need the 2 CLI scripts and the CodeSniffer.conf file
    to be added to the phar, so we can "include" the scripts
    for execution and copy the conf file temporarily to
    be together with the phar (that's the way CodeSniffer
    expects it).
    
    Note this will reduce a little bit code-coverage but in
    a future PR I want to add some integration tests to cover
    the execution from phar, hardly can be done from unit tests.
    stronk7 committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    4d76194 View commit details
    Browse the repository at this point in the history
  2. Fix .env support when running from phar archive

    With this changes, the moodle-plugin-ci execution
    will be able to find a .env file in the same directory
    that the .phar file containing it.
    
    That way install will be able to create that file and
    the rest of commands will access to that information
    via dotenv, avoiding to have to export any env variable
    manually for phar-based executions.
    stronk7 committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    1bb9c4e View commit details
    Browse the repository at this point in the history