Issues with URL generator #22

Closed
opened 2017-07-10 06:55:02 +00:00 by jamie · 3 comments
jamie commented 2017-07-10 06:55:02 +00:00 (Migrated from git.hazaar.io)

The URL generator is a bit of an issue when used in a service. The problem is that SCRIPT_NAME is the actual name of the PHP script when run from the command line. We need to somehow figure out a way to get this to use the URL from the frontend side of the application.

The URL generator is a bit of an issue when used in a service. The problem is that SCRIPT_NAME is the actual name of the PHP script when run from the command line. We need to somehow figure out a way to get this to use the URL from the frontend side of the application.
jamie commented 2017-07-10 07:07:11 +00:00 (Migrated from git.hazaar.io)

mentioned in commit 33890f2583

mentioned in commit 33890f258374d134fb1685598744a49002bf5c15
jamie commented 2017-07-11 01:12:12 +00:00 (Migrated from git.hazaar.io)

closed via commit bfe2111e30

closed via commit bfe2111e303f72e9ca07d433fc656dcff80e874b
jamie commented 2017-07-11 01:14:34 +00:00 (Migrated from git.hazaar.io)

So the fix for this was to allow the webroot used in URL generation to be configured. This part is now handled in the application class of MVC. The Warlock server has been updated to default that to '/' on start so that the $_SERVER['SCRIPT_NAME'] variable is not used. This can now also be configured in the service config which now allows application config overrides with the "config" sections.

For example:

{
  "development": {
    "include": "production",
    "commit": {
      "subscribe": {
        "commit_pending": "checkPendingCommits"
      }
    },
    "notify": {
      "config": {
        "app": {
          "root": "/public/"
        }
      }
    }
  }
}
So the fix for this was to allow the webroot used in URL generation to be configured. This part is now handled in the application class of MVC. The Warlock server has been updated to default that to '/' on start so that the ```$_SERVER['SCRIPT_NAME']``` variable is not used. This can now also be configured in the service config which now allows application config overrides with the "config" sections. For example: ```json { "development": { "include": "production", "commit": { "subscribe": { "commit_pending": "checkPendingCommits" } }, "notify": { "config": { "app": { "root": "/public/" } } } } } ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hazaar/hazaar-warlock#22
No description provided.