Releases: hydephp/develop
v0.50.0-beta - 2022-07-26
About
This release contains several breaking changes. You will need to update your configuration to continue using the new changes. Each one has been documented in this changelog entry, which at the end has an upgrade guide.
Overview of major changes
As there are a lot of changes, here is first a quick overview of the major ones. See the full list after this section.
- Alpine.js is now used for interactions.
- HydeFront has been rewritten and is now on version 2.x.
- The hyde.css and hyde.js files have now for all intents and purposes been merge into app.css and refactored to Alpine.js, respectively.
- The documentation pages are now styled using TailwindCSS instead of Lagrafo.
- Moved some configuration options from hyde.php to site.php
- Moved Composer dependencies, you will laravel-zero/framework added to your Hyde composer.json file.
Note that the goal with this release is to make the framework more stable and developer friendly, but without it affecting the end user experience. For example, the visual experience as well as the interactions of the refactored documentation pages are minimal and most users won't notice any change. However, for developers, the changes are significant and will reduce a lot of complexity in the future.
Added
- Added Alpine.js to the default HydePHP layout
- Added a new configuration file,
config/site.php
, see below - Added RSS feed configuration stubs to
config/site.php
- Added an
Includes
facade that can quickly import partials - Added an automatic option to load footer Markdown from partial
- Added the
hyde.load_app_styles_from_cdn
option to load_media/app.css
from the CDN
Changed
- Move laravel-zero/framework Composer dependency to hyde/hyde package
- Moved site specific configuration settings to
config/site.php
- Moved config option
hyde.name
tosite.name
- Moved config option
hyde.site_url
tosite.url
- Moved config option
hyde.pretty_urls
tosite.pretty_urls
- Moved config option
hyde.generate_sitemap
tosite.generate_sitemap
- Moved config option
hyde.language
tosite.language
- Moved config option
hyde.output_directory
tosite.output_directory
- Moved config option
- The default
site.url
is nowhttp://localhost
instead ofnull
- Merged configuration options for the footer, see below
- Rebrand
lagrafo
documentation driver toHydeDocs
- Hyde now requires a minimum version of HydeFront v2.x, see release notes below
- internal: Refactor navigation menu components and improve link helpers
- internal: The main Hyde facade class has been split to house the logic in the HydeKernel class, but all methods are still available through the new facade with the same namespace
- internal: Move tests foundation to new testing package
- internal: Renamed
GeneratesTableOfContents.php
toGeneratesSidebarTableOfContents.php
Removed
- Removed
\Hyde\Framework\Facades\Route
. You can swap out usages with\Hyde\Framework\Models\Route
without side effects. - Removed ConvertsFooterMarkdown.php
- Removed internal
$siteName
config variable fromconfig/hyde.php
Fixed
- Fixed bug #260 where the command to publish a homepage did not display the selected value when it was supplied as a parameter
- Fixed bug #272, only generate the table of contents when and where it is actually used
- Fixed bug #41 where search window does not work reliably on Safari
Upgrade Guide
Here are some instructions for upgrading an existing project.
You should also read the standard upgrade guide first for general advice, https://hydephp.com/docs/master/updating-hyde.
If you use Git, you may be able to automatically configure some of these by merging https://github.com/hydephp/hyde into your project. Alternatively, you can download the release and unzip it into your project directory, and using GitHub Desktop or VS Code (or whatever you use) to stage the new changes without affecting your project's configuration.
Core file changes
Here is an overview of the core files that have changed and that you will most likely need to update. Some of these have detailed instructions further down.
config/site.php
(new)config/hyde.php
(changed)config/app.php
(changed)app/bootstrap.php
(changed)composer.json
(changed)package.json
(changed)resources\assets\app.css
(changed)_pages\404.blade.php
(changed)
A large number of Blade views have also changed. You may want to update pretty much all of them. See the diff for a list of files that have changed.
Updating Composer
When updating an existing project, you may need to add laravel-zero/framework to your Hyde composer.json file.
"require": {
"php": "^8.0",
"hyde/framework": "^0.50",
"laravel-zero/framework": "^9.1"
},
Using the new site config
Site-specific config options have been moved from config/hyde.php
to config/site.php
. The Hyde config is now used to configure behaviour of the site, while the site config is used to customize the look and feel, the presentation, of the site.
The following configuration options have been moved. The actual usages remain the same, so you can upgrade by using copying over these options to the new file.
hyde.name
hyde.site_url
(is now justsite.url
)hyde.pretty_urls
hyde.generate_sitemap
hyde.language
hyde.output_directory
If you have published and Blade views or written custom code that uses the config options, you may need to update them. You can do this by republishing the Blade views, and/or using search and replace across your code. VSCode has a useful feature to make this a breeze: CMD/CTRL+Shift+F
.
Using the new footer config
The footer configuration options have been merged. Prior to this update, the config option looked as follows:
// filepath: config/hyde.php
'footer' => [
'enabled' => true,
'markdown' => 'Markdown text...'
],
Now, the config option looks as follows:
// filepath: config/hyde.php
// To use Markdown text
'footer' => 'Markdown text...',
// To disable it completely
'footer' => false,
As you can see, the new config option is a string or the boolean false instead of an array. We use the same option for both the Markdown text and the footer disabled state.
Updating Blade Documentation Views
This release rewrites almost all of the documentation page components to use TailwindCSS. In most cases you won't need to do anything to update, however, if you have previously published the documentation views, you will need to update them.
Release Notes for HydeFront v2.x
HydeFront version 2.0 is a major release and has several breaking changes.
It is not compatible with HydePHP versions lower than v0.50.0-beta. HydePHP versions equal to or later than v0.50.0-beta require HydeFront version 2.0 or higher.
Many files have been removed, as HydePHP now uses Alpine.js for interactions, and TailwindCSS for the documentation pages.
HydeFront v1.x will receive security fixes only.
What's Changed
- Add a link component to resolve routes automatically by @caendesilva in #225
- Add missing test by @caendesilva in #226
- Improve relative link helpers by @caendesilva in #227
- Add more view tests by @caendesilva in #229
- Refactor navigation link components by @caendesilva in #231
- Remove Facades\Route.php by @caendesilva in #232
- Add
Route::home()
helper by @caendesilva in #233 - Rename Router class to Services\RoutingService by @caendesilva in #234
- Delete internal projects/rocket directory from monorepo by @caendesilva in #235
- Add public add route method to route service by @caendesilva in #236
- Create site.php config for site-specific settings by @caendesilva in #237
- Update configuration documentation by @caendesilva in #239
- Update documentation and add default values for RSS feed configuration by @caendesilva in #240
- Set default site URL to localhost instead of null by @caendesilva in #243
- Change config option site.site_url to site.url by @caendesilva in #244
- Add _includes directory for quickly adding automatic snippets by @caendesilva in #245
- Refactor footer component to use includes facade by @caendesilva in #246
- Delete ConvertsFooterMarkdown.php by @caendesilva in #247
- Add back config option to load app.css from CDN by @caendesilva in #248
- Set up infrastructure for automated Cypress frontend testing by @caendesilva in #252
- Add Cypress tests by @caendesilva in #253
- Update to Laravel v9.21.0 by @caendesilva in #255
- Bump terser from 4.8.0 to 4.8.1 by @dependabot in #256
- Add Laravel Dusk for browser testing by @caendesilva in #254
- Move laravel-zero/framework dependency to hyde/hyde by @Caend...
v0.49.0-beta - 2022-07-15
Added
- Added configuration option to quickly enable HTML tags in Markdown
Changed
- The DataCollection module now no longers filters out files starting with an underscore
- Moves the scripts that create the documentation page search window to HydeFront CDN
- Updated autoloaded HydeFront version to 1.13.x
What's Changed
- Add a NavItem::toRoute() helper by @caendesilva in #216
- Delete smslant.flf by @caendesilva in #221
- Remove underscore filter from Markdown DataCollections by @caendesilva in #222
- Add easy config option to enable HTML in Markdown config by @caendesilva in #223
- Move documentation search window scripts to HydeFront by @caendesilva in #224
Full Changelog: v0.48.0-beta...v0.49.0-beta
v0.48.0-beta - 2022-07-10
About
This release brings a massive refactor in the way the HydePHP auto-discovery process works. It does this by centralizing all discovery logic to the new pseudo-router module which discovers and maps all source files and output paths.
The update also refactors related code to use the router. Part of this is a major rewrite of the navigation menu generation. If you have set any custom navigation links you will need to update your configuration files as the syntax has changed to use the NavItem model instead of array keys.
You will also need to update navigation related Blade templates, if you have previously published them.
Added
- Added a pseudo-router module which will internally be used to improve Hyde auto-discovery
- Added a Route facade that allows you to quickly get a route instance from a route key or path
- Added a new NavItem model to represent navigation menu items
- Added a new configuration array for customizing the navigation menu, see the
hyde.navigation
array config
Changed
- Changed how the navigation menu is generated, configuration files and published views must be updated
- Changed bootstrap.php to Stt Hyde base path using dirname instead of getcwd
- Reversed deprecation for
StaticPageBuilder::$outputPath
- internal refactor: Creates a new build service to handle the build process
Deprecated
- Deprecated
DiscoveryService::findModelFromFilePath()
- Use the Router instead. - Deprecated
DiscoveryService.php
- Use the Router instead. (Some helpers may be moved to FluentPathHelpers.php)
Removed
- The "no pages found, skipping" message has been removed as the build loop no longer recieves empty collections.
- Removed the
hyde.navigation_menu_links
andhyde.navigation_menu_blacklist
configuration options, see new addition above.
What's Changed
- Pseudo-routing take two by @caendesilva in #168
- Clickable filepaths should fall back to the input string if the file does not exist by @caendesilva in #173
- Add
array_map_unique()
helper by @caendesilva in #175 - Create build service to utilize the router and move logic away from command by @caendesilva in #174
- Disable autoloader optimization in default composer config by @caendesilva in #176
- Don't display estimated search index generation time if it's less than 1 second by @caendesilva in #177
- Refactor RebuildService to use the Router by @caendesilva in #182
- Add a Route facade by @caendesilva in #184
- Add macroable trait to the Hyde facade by @caendesilva in #185
- Merge v0.47.0-beta into master by @caendesilva in #188
- Add more route helpers by @caendesilva in #189
- Merge from master by @caendesilva in #191
- Minor route improvements by @caendesilva in #192
- Update minimum Hyde Realtime Compiler version to 2.3 to be compatible with Hyde 0.44 by @caendesilva in #194
- Fix bug causing footer to disappear by @caendesilva in #195
- Convert navigation menu generation to service by @caendesilva in #187
- Improve navigation menu configuration options and documentation by @caendesilva in #198
- Throw exception if route is not found by @caendesilva in #200
- Add new support for custom navigation menu links by @caendesilva in #201
- Revert deprecation for
StaticPageBuilder::$outputPath
by @caendesilva in #203 - Update Router namespaces by @caendesilva in #205
- Convert Router into Singleton by @caendesilva in #207
- Deprecate
DiscoveryService.php
by @caendesilva in #208 - Update the Realtime Compiler plugin to use the new Router service by @caendesilva in #210
- Update sitemap generator to use the router by @caendesilva in #211
- Set Hyde base path using dirname instead of getcwd by @caendesilva in #213
- Prepare for v0.48.0-beta release by @caendesilva in #214
Full Changelog: v0.47.0-beta...v0.48.0-beta
v0.47.0-beta - 2022-07-05
v0.46.0-beta - 2022-07-03
Added
- Added
DocumentationPage::indexPath()
, replacingHyde::docsIndexPath()
Changed
- internal: Move service provider helper methods to the RegistersFileLocations trait
- internal: Add helpers.php to reduce repeated code and boilerplate
- internal: Change internal monorepo scripts for semi-automating the release process
- Added
DocumentationPage
as a class alias, allowing you to use it directly in Blade views, without having to add full namespace.
Removed
- Remove deprecated
Hyde::getDocumentationOutputDirectory()
, replaced withDocumentationPage::getOutputDirectory()
- Remove deprecated
Hyde::docsIndexPath()
, replaced withDocumentationPage::indexPath()
- Remove deprecated
DocumentationPage::getDocumentationOutputPath()
, useDocumentationPage::getOutputPath()
instead
Fixed
- Fix minor bug in Blade view registry where merged array was not unique
What's Changed
- v0.45.0-beta - 2022-07-03 by @caendesilva in #158
- Add helper functions by @caendesilva in #159
- Replace repeated code with new
unslash
helper function by @caendesilva in #160 - Refactor the HydeServiceProvider structure by @caendesilva in #161
- Remove deprecated
Hyde::getDocumentationOutputDirectory()
helper by @caendesilva in #163 - Move deprecated
Hyde::docsIndexPath()
helper toDocumentationPage::indexPath()
by @caendesilva in #164 - Remove deprecated
DocumentationPage::getDocumentationOutputPath()
by @caendesilva in #165 - Improve changelog management by @caendesilva in #166
Full Changelog: v0.45.0-beta...v0.46.0-beta
v0.45.0-beta - 2022-07-03
Added
- Add dummy file to persist base Tailwind utilities #141
- Add configuration feature for DataCollections to enable/disable automatic _data directory generation #142
Changed
- DataCollections are now disabled by default
- Rename internal trait RegistersDefaultDirectories to RegistersFileLocations
Removed
- Removes the automatic check to see if the configuration file is up to date #143
- Remove deprecated
Hyde::titleFromSlug()
helper, useHyde::makeTitle()
instead - Removed deprecated CollectionService::getBladePageList, is renamed to getBladePageFiles
- Removed deprecated CollectionService::getMarkdownPageList, is renamed to getMarkdownPageFiles
- Removed deprecated CollectionService::getMarkdownPostList, is renamed to getMarkdownPostFiles
- Removed deprecated CollectionService::getDocumentationPageList, is renamed to getDocumentationPageFiles
Fixed
- Fix bug causing files starting with underscores to add empty values to the file collection array #140
What's Changed
- Fix bug causing files starting with underscores to add empty values to the file collection array by @caendesilva in #140
- Add dummy file to persist base Tailwind utilities by @caendesilva in #141
- Add configuration feature for DataCollections to enable/disable automatic _data directory generation by @caendesilva in #142
- Remove automatic configuration update checking by @caendesilva in #143
- Remove deprecated code by @caendesilva in #144
- Rename internal trait RegistersDefaultDirectories to RegistersFileLocations by @caendesilva in #145
- Add test for HydePackageDiscoverCommand.php by @caendesilva in #148
- Fix missing tests for BladeDownProcessor.php by @caendesilva in #150
- Add test for ConvertsFooterMarkdown.php by @caendesilva in #152
- Add tests for FileHelpers::image() by @caendesilva in #154
- Add tests for Image::getLink() by @caendesilva in #156
- Replace deprecated method usages with new output directory helper by @caendesilva in #157
Full Changelog: v0.44.0-beta...v0.45.0-beta
v0.44.0-beta - 2022-07-02 - Internal code restructuring
About
This release mainly makes internal changes to the Framework API. If you are an end user, most of the changes are not relevant.
However, if you are a package developer, or if you have published Blade views or otherwise extended Hyde you may want to take a look as there are internal breaking changes.
Added
- Added Hyde::makeTitle() helper, an improved version of Hyde::titleFromSlug()
- Added new helper method render() to MarkdownDocuments to compile the Markdown to HTML, fixes #109
- Added
MarkdownPost
as a class alias, allowing you to use it directly in Blade views, without having to add full namespace.
Changed
- Update default HydeFront version to v1.12.x
- Updates the codebase to use the new Hyde::makeTitle() helper
- Several internal changes to how page models are structured, #122
- Internal: Separate the MarkdownDocument into a dedicated abstract page class, #126
- Moved
Hyde\Framework\Models\BladePage
to new namespaceHyde\Framework\Models\Pages\BladePage
- Moved
Hyde\Framework\Models\MarkdownPage
to new namespaceHyde\Framework\Models\Pages\MarkdownPage
- Moved
Hyde\Framework\Models\MarkdownPost
to new namespaceHyde\Framework\Models\Pages\MarkdownPost
- Moved
Hyde\Framework\Models\DocumentationPage
to new namespaceHyde\Framework\Models\Pages\DocumentationPage
- Improves how the site output directory is emptied, helping prevent accidental deletion of files #135
- The emptying of the site output directory can now be disabled by setting the new config option
hyde.empty_output_directory
to false #136
Deprecated
- Deprecated Hyde::titleFromSlug(), use Hyde::makeTitle() instead
- Deprecate DocumentationPage::getDocumentationOutputPath()
- Deprecate Hyde::docsIndexPath()
- Deprecate Hyde::getDocumentationOutputDirectory()
- Deprecate RegistersDefaultDirectories.php pending rename
- Deprecated CollectionService::getBladePageList, is renamed to getBladePageFiles
- Deprecated CollectionService::getMarkdownPageList, is renamed to getMarkdownPageFiles
- Deprecated CollectionService::getMarkdownPostList, is renamed to getMarkdownPostFiles
- Deprecated CollectionService::getDocumentationPageList, is renamed to getDocumentationPageFiles
Removed
- Remove unused
$withoutNavigation
variable from the app layout - Removed deprecated 'hyde.site_output_path' config option (use
hyde.output_directory
instead) - Remove long deprecated
hyde.version
andframework.version
service container bindings - Removed deprecated StarterFileService which was deprecated in v0.20.x
Fixed
- Fix style bug #117, Hyde title helper should not capitalize non-principal words
What's Changed
- Push split monorepo directly to master branches by @caendesilva in #114
- Update default HydeFront to v1.12.x by @caendesilva in #115
- Remove unused
$withoutNavigation
variable from the app layout by @caendesilva in #119 - Improve Hyde title generation helper by @caendesilva in #120
- Improve internal page model structure by @caendesilva in #122
- Refactor the CollectionService to reduce boilerplate by @caendesilva in #123
- Fix missing parent constructor call and test for UnsupportedPageTypeException.php by @caendesilva in #124
- Remove CouldNotParseDateStringException by @caendesilva in #125
- Separate the MarkdownDocument into a dedicated abstract page class by @caendesilva in #126
- Refine markdown document classes by @caendesilva in #127
- Fix static analysis issues by @caendesilva in #128
- Move page models into new Models\Pages namespace to make them more distinct from auxiliary helper models by @caendesilva in #130
- Add MarkdownPost as a class alias to make it available directly in Blade views by @caendesilva in #131
- Removed deprecated 'hyde.site_output_path' config option by @caendesilva in #132
- Remove deprecated code by @caendesilva in #133
- Update composer.lock by @caendesilva in #134
- Improves how the site output directory is emptied, helping prevent accidental deletion of files by @caendesilva in #135
- Add a configuration option to disable emptying of the output directory by @caendesilva in #136
- Change internal class member visibilities from private to protected by @caendesilva in #137
- Replace self with static by @caendesilva in #138
Full Changelog: v0.43.0-beta...v0.44.0-beta
v0.43.0-beta - 2022-06-25 - File-based Collections
Added
- Added configuration option
hyde.media_extensions
to allow you to specify additional comma separated media file types. #39 - Adds a safer config option
hyde.output_directory
for customizing the output directory - Adds a file-based way to create and interact with collections, https://hydephp.com/docs/master/collections
Removed
- Removed the
--pretty
build command option which was deprecated in v0.25.x - Removed deprecated internal AssetManager trait which was replaced with the Asset facade
Fixed
- HydeRC: Fixes a bug in the auxiliary exception handler leading to unintentional recursion causing out of memory errors in both the browser and the PHP server.
What's Changed
- Add configuration option to allow more file types in the media directory by @caendesilva in #105
- Add a safer output directory config option to replace deprecated setting by @caendesilva in #106
- Remove the
--pretty
build command option which was deprecated in v0.25.x by @caendesilva in #107 - HydeRC: Fix bug causing out of memory failures in exception handler by @caendesilva in #108
- Create static file collections by @caendesilva in #110
- Remove deprecated internal AssetManager trait by @caendesilva in #111
- v0.43.0-beta - 2022-06-25 - File-based Collections by @caendesilva in #113
Full Changelog: v0.42.0-beta...v0.43.0-beta
v0.42.0-beta - 2022-06-24
Added
- Added a
@section
hook to the docs layout to allow yielding content - HydeRC: Add ping route to check if a HydeRC server is running hydephp/realtime-compiler#9
- internal: Added an HtmlResponse object to the realtime compiler
Changed
- Change the the Prettier integration to only modify HTML files #102
- Change how the
docs/search.html
page is rendered, by handling page logic in the view, to decouple it from the build search command
Fixed
- HydeRC: Rewrite request docs to docs/index to fix hydephp/realtime-compiler#10
- Fix bug #93 where styles were missing on search.html when changing the output directory to root
What's Changed
- Merge development branch into master by @caendesilva in #104
Full Changelog: v0.41.0-beta...v0.42.0-beta
v0.41.0-beta - 2022-06-24 - Add an Asset facade
About
This release refactors and improves the Asset Service, adding auto-configuration features and a new Asset facade.
Using the Asset facade in Blade views
Instead of the long syntax Hyde::assetManager()
you can now use the Asset
facade directly. See this example, which both do the exact same thing using the same underlying service:
Hyde::assetManager()->hasMediaFile('app.css')
Asset::hasMediaFile('app.css')
If you don't know what any of this means, good news! You don't have to worry about it. Hyde's got your back.
Added
- Added feature to dynamically load hyde.css and hyde.js if they exist locally
- Added the Asset facade to be used instead of
Hyde::assetManager()
- Added the Asset facade as a class alias to
config/app.css
Changed
- Changed
scripts.blade.php
andstyles.blade.php
to use the Asset facade
Deprecated
- Deprecated AssetManager.php (
Hyde::assetManager()
). Use the Asset facade instead
What's Changed
- Add monorepo phpstorm .idea configuration by @caendesilva in #95
- Fix bug #94: Hyde::docsIndexPath() checks the hard-coded source directory by @caendesilva in #96
- Monorepo: Commit PHPUnit configuration for PhpStorm by @caendesilva in #97
- HydeFront/Patch: Remove top padding on first documentation sidebar group, fix #92 by @caendesilva in #98
- Improve AssetService and style/script handling by @caendesilva in #103
Full Changelog: v0.40.0-beta.3...v0.41.0-beta