Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Version v1.7.0 - 2024-07-05
Added
--open
option in the serve command in Update realtime compiler open flag to support specifying the page to open #1694--format=json
option to theroute:list
command in Add a JSON output format option to the route list command #1724Changed
Hyde::hasSiteUrl()
now returns false if the site URL is for localhost in Improve behaviour when a site URL is not explicitly set #1726Hyde::url()
will now return a relative URL instead of throwing an exception when supplied a path even if the site URL is not set in Improve behaviour when a site URL is not explicitly set #1726.env.example
file to contain more details on the site URL setting's usages in Update site URL documentation to contain more details on its usages #1746Deprecated
unslash()
function, replaced with the existing namespaced\Hyde\unslash()
function in [1.x] Deprecate the globalunslash
function #1753BaseUrlNotSetException
class in [1.x] Deprecate theBaseUrlNotSetException
class #1759Removed
Fixed
Extra information
This release contains changes to how HydePHP behaves when a site URL is not set by the user.
These changes are made to reduce the chance of the default
localhost
value showing up in production environments.Most notably, HydePHP now considers that default site URL
localhost
to mean that a site URL is not set, as the user has not set it.This means that things like automatic canonical URLs will not be added, as Hyde won't know how to make them without a site URL.
The previous behaviour was that Hyde used
localhost
in canonical URLs, which is never useful in production environments.For this reason, we felt it worth it to make this change in a minor release, as it has a such large benefit for sites.
You can read more about the details and design decisions of this change in the following pull request #1726.